(function () {
  function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }

  function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }

  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }

  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }

  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

  function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }

  function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }

  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e4) { throw _e4; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e5) { didErr = true; err = _e5; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }

  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }

  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

  function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }

  function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

  function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

  function _createClass2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

  (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["vendor"], {
    /***/
    "+924":
    /*!**************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/string.js ***!
      \**************************************************/

    /*! exports provided: truncate, snipLine, safeJoin, isMatchingPattern, escapeStringForRegex */

    /***/
    function _(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "truncate", function () {
        return truncate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "snipLine", function () {
        return snipLine;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "safeJoin", function () {
        return safeJoin;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isMatchingPattern", function () {
        return isMatchingPattern;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "escapeStringForRegex", function () {
        return escapeStringForRegex;
      });
      /* harmony import */


      var _is__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./is */
      "9AQC");
      /**
       * Truncates given string to the maximum characters count
       *
       * @param str An object that contains serializable values
       * @param max Maximum number of characters in truncated string (0 = unlimited)
       * @returns string Encoded
       */


      function truncate(str, max) {
        if (max === void 0) {
          max = 0;
        }

        if (typeof str !== 'string' || max === 0) {
          return str;
        }

        return str.length <= max ? str : str.substr(0, max) + "...";
      }
      /**
       * This is basically just `trim_line` from
       * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67
       *
       * @param str An object that contains serializable values
       * @param max Maximum number of characters in truncated string
       * @returns string Encoded
       */


      function snipLine(line, colno) {
        var newLine = line;
        var ll = newLine.length;

        if (ll <= 150) {
          return newLine;
        }

        if (colno > ll) {
          // eslint-disable-next-line no-param-reassign
          colno = ll;
        }

        var start = Math.max(colno - 60, 0);

        if (start < 5) {
          start = 0;
        }

        var end = Math.min(start + 140, ll);

        if (end > ll - 5) {
          end = ll;
        }

        if (end === ll) {
          start = Math.max(end - 140, 0);
        }

        newLine = newLine.slice(start, end);

        if (start > 0) {
          newLine = "'{snip} " + newLine;
        }

        if (end < ll) {
          newLine += ' {snip}';
        }

        return newLine;
      }
      /**
       * Join values in array
       * @param input array of values to be joined together
       * @param delimiter string to be placed in-between values
       * @returns Joined values
       */
      // eslint-disable-next-line @typescript-eslint/no-explicit-any


      function safeJoin(input, delimiter) {
        if (!Array.isArray(input)) {
          return '';
        }

        var output = []; // eslint-disable-next-line @typescript-eslint/prefer-for-of

        for (var i = 0; i < input.length; i++) {
          var value = input[i];

          try {
            output.push(String(value));
          } catch (e) {
            output.push('[value cannot be serialized]');
          }
        }

        return output.join(delimiter);
      }
      /**
       * Checks if the value matches a regex or includes the string
       * @param value The string value to be checked against
       * @param pattern Either a regex or a string that must be contained in value
       */


      function isMatchingPattern(value, pattern) {
        if (!Object(_is__WEBPACK_IMPORTED_MODULE_0__["isString"])(value)) {
          return false;
        }

        if (Object(_is__WEBPACK_IMPORTED_MODULE_0__["isRegExp"])(pattern)) {
          return pattern.test(value);
        }

        if (typeof pattern === 'string') {
          return value.indexOf(pattern) !== -1;
        }

        return false;
      }
      /**
       * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to
       * `new RegExp()`.
       *
       * Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime
       * type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node
       * 12+).
       *
       * @param regexString The string to escape
       * @returns An version of the string with all special regex characters escaped
       */


      function escapeStringForRegex(regexString) {
        // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems
        // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.
        return regexString.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d');
      } //# sourceMappingURL=string.js.map

      /***/

    },

    /***/
    "+A1k":
    /*!************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/node.js ***!
      \************************************************/

    /*! exports provided: isNodeEnv, dynamicRequire, loadModule */

    /***/
    function A1k(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* WEBPACK VAR INJECTION */


      (function (module) {
        /* harmony export (binding) */
        __webpack_require__.d(__webpack_exports__, "isNodeEnv", function () {
          return isNodeEnv;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "dynamicRequire", function () {
          return dynamicRequire;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "loadModule", function () {
          return loadModule;
        });
        /**
         * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
         * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.
         */

        /**
         * Checks whether we're in the Node.js or Browser environment
         *
         * @returns Answer to given question
         */


        function isNodeEnv() {
          return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
        }
        /**
         * Requires a module which is protected against bundler minification.
         *
         * @param request The module path to resolve
         */
        // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any


        function dynamicRequire(mod, request) {
          // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
          return mod.require(request);
        }
        /**
         * Helper for dynamically loading module that should work with linked dependencies.
         * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`
         * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during
         * build time. `require.resolve` is also not available in any other way, so we cannot create,
         * a fake helper like we do with `dynamicRequire`.
         *
         * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.
         * That is to mimic the behavior of `require.resolve` exactly.
         *
         * @param moduleName module name to require
         * @returns possibly required module
         */


        function loadModule(moduleName) {
          var mod;

          try {
            mod = dynamicRequire(module, moduleName);
          } catch (e) {// no-empty
          }

          try {
            var cwd = dynamicRequire(module, 'process').cwd;
            mod = dynamicRequire(module, cwd() + "/node_modules/" + moduleName);
          } catch (e) {// no-empty
          }

          return mod;
        } //# sourceMappingURL=node.js.map

        /* WEBPACK VAR INJECTION */

      }).call(this, __webpack_require__(
      /*! ./../../../webpack/buildin/harmony-module.js */
      "3UD+")(module));
      /***/
    },

    /***/
    "+KVS":
    /*!**************************************************!*\
      !*** ./node_modules/@sentry/core/esm/version.js ***!
      \**************************************************/

    /*! exports provided: SDK_VERSION */

    /***/
    function KVS(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SDK_VERSION", function () {
        return SDK_VERSION;
      });

      var SDK_VERSION = '6.15.0'; //# sourceMappingURL=version.js.map

      /***/
    },

    /***/
    "/3cH":
    /*!******************************************************!*\
      !*** ./node_modules/@sentry/core/esm/basebackend.js ***!
      \******************************************************/

    /*! exports provided: BaseBackend */

    /***/
    function cH(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BaseBackend", function () {
        return BaseBackend;
      });
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _transports_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./transports/noop */
      "31uO");
      /**
       * This is the base implemention of a Backend.
       * @hidden
       */


      var BaseBackend =
      /** @class */
      function () {
        /** Creates a new backend instance. */
        function BaseBackend(options) {
          this._options = options;

          if (!this._options.dsn) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('No DSN provided, backend will not do anything.');
          }

          this._transport = this._setupTransport();
        }
        /**
         * @inheritDoc
         */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types


        BaseBackend.prototype.eventFromException = function (_exception, _hint) {
          throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["SentryError"]('Backend has to implement `eventFromException` method');
        };
        /**
         * @inheritDoc
         */


        BaseBackend.prototype.eventFromMessage = function (_message, _level, _hint) {
          throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["SentryError"]('Backend has to implement `eventFromMessage` method');
        };
        /**
         * @inheritDoc
         */


        BaseBackend.prototype.sendEvent = function (event) {
          void this._transport.sendEvent(event).then(null, function (reason) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].error("Error while sending event: " + reason);
          });
        };
        /**
         * @inheritDoc
         */


        BaseBackend.prototype.sendSession = function (session) {
          if (!this._transport.sendSession) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn("Dropping session because custom transport doesn't implement sendSession");

            return;
          }

          void this._transport.sendSession(session).then(null, function (reason) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].error("Error while sending session: " + reason);
          });
        };
        /**
         * @inheritDoc
         */


        BaseBackend.prototype.getTransport = function () {
          return this._transport;
        };
        /**
         * Sets up the transport so it can be used later to send requests.
         */


        BaseBackend.prototype._setupTransport = function () {
          return new _transports_noop__WEBPACK_IMPORTED_MODULE_1__["NoopTransport"]();
        };

        return BaseBackend;
      }(); //# sourceMappingURL=basebackend.js.map

      /***/

    },

    /***/
    "/6Yf":
    /*!************************************************************!*\
      !*** ./node_modules/@firebase/component/dist/index.esm.js ***!
      \************************************************************/

    /*! exports provided: Component, ComponentContainer, Provider */

    /***/
    function Yf(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Component", function () {
        return Component;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ComponentContainer", function () {
        return ComponentContainer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Provider", function () {
        return Provider;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _firebase_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @firebase/util */
      "qOnz");
      /**
       * Component for service name T, e.g. `auth`, `auth-internal`
       */


      var Component =
      /** @class */
      function () {
        /**
         *
         * @param name The public service name, e.g. app, auth, firestore, database
         * @param instanceFactory Service factory responsible for creating the public interface
         * @param type whether the service provided by the component is public or private
         */
        function Component(name, instanceFactory, type) {
          this.name = name;
          this.instanceFactory = instanceFactory;
          this.type = type;
          this.multipleInstances = false;
          /**
           * Properties to be added to the service namespace
           */

          this.serviceProps = {};
          this.instantiationMode = "LAZY"
          /* LAZY */
          ;
          this.onInstanceCreated = null;
        }

        Component.prototype.setInstantiationMode = function (mode) {
          this.instantiationMode = mode;
          return this;
        };

        Component.prototype.setMultipleInstances = function (multipleInstances) {
          this.multipleInstances = multipleInstances;
          return this;
        };

        Component.prototype.setServiceProps = function (props) {
          this.serviceProps = props;
          return this;
        };

        Component.prototype.setInstanceCreatedCallback = function (callback) {
          this.onInstanceCreated = callback;
          return this;
        };

        return Component;
      }();
      /**
       * @license
       * Copyright 2019 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var DEFAULT_ENTRY_NAME = '[DEFAULT]';
      /**
       * @license
       * Copyright 2019 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Provider for instance for service name T, e.g. 'auth', 'auth-internal'
       * NameServiceMapping[T] is an alias for the type of the instance
       */

      var Provider =
      /** @class */
      function () {
        function Provider(name, container) {
          this.name = name;
          this.container = container;
          this.component = null;
          this.instances = new Map();
          this.instancesDeferred = new Map();
          this.instancesOptions = new Map();
          this.onInitCallbacks = new Map();
        }
        /**
         * @param identifier A provider can provide mulitple instances of a service
         * if this.component.multipleInstances is true.
         */


        Provider.prototype.get = function (identifier) {
          // if multipleInstances is not supported, use the default name
          var normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);

          if (!this.instancesDeferred.has(normalizedIdentifier)) {
            var deferred = new _firebase_util__WEBPACK_IMPORTED_MODULE_1__["Deferred"]();
            this.instancesDeferred.set(normalizedIdentifier, deferred);

            if (this.isInitialized(normalizedIdentifier) || this.shouldAutoInitialize()) {
              // initialize the service if it can be auto-initialized
              try {
                var instance = this.getOrInitializeService({
                  instanceIdentifier: normalizedIdentifier
                });

                if (instance) {
                  deferred.resolve(instance);
                }
              } catch (e) {// when the instance factory throws an exception during get(), it should not cause
                // a fatal error. We just return the unresolved promise in this case.
              }
            }
          }

          return this.instancesDeferred.get(normalizedIdentifier).promise;
        };

        Provider.prototype.getImmediate = function (options) {
          var _a; // if multipleInstances is not supported, use the default name


          var normalizedIdentifier = this.normalizeInstanceIdentifier(options === null || options === void 0 ? void 0 : options.identifier);
          var optional = (_a = options === null || options === void 0 ? void 0 : options.optional) !== null && _a !== void 0 ? _a : false;

          if (this.isInitialized(normalizedIdentifier) || this.shouldAutoInitialize()) {
            try {
              return this.getOrInitializeService({
                instanceIdentifier: normalizedIdentifier
              });
            } catch (e) {
              if (optional) {
                return null;
              } else {
                throw e;
              }
            }
          } else {
            // In case a component is not initialized and should/can not be auto-initialized at the moment, return null if the optional flag is set, or throw
            if (optional) {
              return null;
            } else {
              throw Error("Service " + this.name + " is not available");
            }
          }
        };

        Provider.prototype.getComponent = function () {
          return this.component;
        };

        Provider.prototype.setComponent = function (component) {
          var e_1, _a;

          if (component.name !== this.name) {
            throw Error("Mismatching Component " + component.name + " for Provider " + this.name + ".");
          }

          if (this.component) {
            throw Error("Component for " + this.name + " has already been provided");
          }

          this.component = component; // return early without attempting to initialize the component if the component requires explicit initialization (calling `Provider.initialize()`)

          if (!this.shouldAutoInitialize()) {
            return;
          } // if the service is eager, initialize the default instance


          if (isComponentEager(component)) {
            try {
              this.getOrInitializeService({
                instanceIdentifier: DEFAULT_ENTRY_NAME
              });
            } catch (e) {// when the instance factory for an eager Component throws an exception during the eager
              // initialization, it should not cause a fatal error.
              // TODO: Investigate if we need to make it configurable, because some component may want to cause
              // a fatal error in this case?
            }
          }

          try {
            // Create service instances for the pending promises and resolve them
            // NOTE: if this.multipleInstances is false, only the default instance will be created
            // and all promises with resolve with it regardless of the identifier.
            for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(this.instancesDeferred.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {
              var _d = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_c.value, 2),
                  instanceIdentifier = _d[0],
                  instanceDeferred = _d[1];

              var normalizedIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);

              try {
                // `getOrInitializeService()` should always return a valid instance since a component is guaranteed. use ! to make typescript happy.
                var instance = this.getOrInitializeService({
                  instanceIdentifier: normalizedIdentifier
                });
                instanceDeferred.resolve(instance);
              } catch (e) {// when the instance factory throws an exception, it should not cause
                // a fatal error. We just leave the promise unresolved.
              }
            }
          } catch (e_1_1) {
            e_1 = {
              error: e_1_1
            };
          } finally {
            try {
              if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
            } finally {
              if (e_1) throw e_1.error;
            }
          }
        };

        Provider.prototype.clearInstance = function (identifier) {
          if (identifier === void 0) {
            identifier = DEFAULT_ENTRY_NAME;
          }

          this.instancesDeferred["delete"](identifier);
          this.instancesOptions["delete"](identifier);
          this.instances["delete"](identifier);
        }; // app.delete() will call this method on every provider to delete the services
        // TODO: should we mark the provider as deleted?


        Provider.prototype["delete"] = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var services;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) {
              switch (_a.label) {
                case 0:
                  services = Array.from(this.instances.values());
                  return [4
                  /*yield*/
                  , Promise.all(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(services.filter(function (service) {
                    return 'INTERNAL' in service;
                  }) // legacy services
                  // eslint-disable-next-line @typescript-eslint/no-explicit-any
                  .map(function (service) {
                    return service.INTERNAL["delete"]();
                  }))), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(services.filter(function (service) {
                    return '_delete' in service;
                  }) // modularized services
                  // eslint-disable-next-line @typescript-eslint/no-explicit-any
                  .map(function (service) {
                    return service._delete();
                  }))))];

                case 1:
                  _a.sent();

                  return [2
                  /*return*/
                  ];
              }
            });
          });
        };

        Provider.prototype.isComponentSet = function () {
          return this.component != null;
        };

        Provider.prototype.isInitialized = function (identifier) {
          if (identifier === void 0) {
            identifier = DEFAULT_ENTRY_NAME;
          }

          return this.instances.has(identifier);
        };

        Provider.prototype.getOptions = function (identifier) {
          if (identifier === void 0) {
            identifier = DEFAULT_ENTRY_NAME;
          }

          return this.instancesOptions.get(identifier) || {};
        };

        Provider.prototype.initialize = function (opts) {
          var e_2, _a;

          if (opts === void 0) {
            opts = {};
          }

          var _b = opts.options,
              options = _b === void 0 ? {} : _b;
          var normalizedIdentifier = this.normalizeInstanceIdentifier(opts.instanceIdentifier);

          if (this.isInitialized(normalizedIdentifier)) {
            throw Error(this.name + "(" + normalizedIdentifier + ") has already been initialized");
          }

          if (!this.isComponentSet()) {
            throw Error("Component " + this.name + " has not been registered yet");
          }

          var instance = this.getOrInitializeService({
            instanceIdentifier: normalizedIdentifier,
            options: options
          });

          try {
            // resolve any pending promise waiting for the service instance
            for (var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(this.instancesDeferred.entries()), _d = _c.next(); !_d.done; _d = _c.next()) {
              var _e = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_d.value, 2),
                  instanceIdentifier = _e[0],
                  instanceDeferred = _e[1];

              var normalizedDeferredIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);

              if (normalizedIdentifier === normalizedDeferredIdentifier) {
                instanceDeferred.resolve(instance);
              }
            }
          } catch (e_2_1) {
            e_2 = {
              error: e_2_1
            };
          } finally {
            try {
              if (_d && !_d.done && (_a = _c["return"])) _a.call(_c);
            } finally {
              if (e_2) throw e_2.error;
            }
          }

          return instance;
        };
        /**
         *
         * @param callback - a function that will be invoked  after the provider has been initialized by calling provider.initialize().
         * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.
         *
         * @param identifier An optional instance identifier
         * @returns a function to unregister the callback
         */


        Provider.prototype.onInit = function (callback, identifier) {
          var _a;

          var normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);
          var existingCallbacks = (_a = this.onInitCallbacks.get(normalizedIdentifier)) !== null && _a !== void 0 ? _a : new Set();
          existingCallbacks.add(callback);
          this.onInitCallbacks.set(normalizedIdentifier, existingCallbacks);
          var existingInstance = this.instances.get(normalizedIdentifier);

          if (existingInstance) {
            callback(existingInstance, normalizedIdentifier);
          }

          return function () {
            existingCallbacks["delete"](callback);
          };
        };
        /**
         * Invoke onInit callbacks synchronously
         * @param instance the service instance`
         */


        Provider.prototype.invokeOnInitCallbacks = function (instance, identifier) {
          var e_3, _a;

          var callbacks = this.onInitCallbacks.get(identifier);

          if (!callbacks) {
            return;
          }

          try {
            for (var callbacks_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(callbacks), callbacks_1_1 = callbacks_1.next(); !callbacks_1_1.done; callbacks_1_1 = callbacks_1.next()) {
              var callback = callbacks_1_1.value;

              try {
                callback(instance, identifier);
              } catch (_b) {// ignore errors in the onInit callback
              }
            }
          } catch (e_3_1) {
            e_3 = {
              error: e_3_1
            };
          } finally {
            try {
              if (callbacks_1_1 && !callbacks_1_1.done && (_a = callbacks_1["return"])) _a.call(callbacks_1);
            } finally {
              if (e_3) throw e_3.error;
            }
          }
        };

        Provider.prototype.getOrInitializeService = function (_a) {
          var instanceIdentifier = _a.instanceIdentifier,
              _b = _a.options,
              options = _b === void 0 ? {} : _b;
          var instance = this.instances.get(instanceIdentifier);

          if (!instance && this.component) {
            instance = this.component.instanceFactory(this.container, {
              instanceIdentifier: normalizeIdentifierForFactory(instanceIdentifier),
              options: options
            });
            this.instances.set(instanceIdentifier, instance);
            this.instancesOptions.set(instanceIdentifier, options);
            /**
             * Invoke onInit listeners.
             * Note this.component.onInstanceCreated is different, which is used by the component creator,
             * while onInit listeners are registered by consumers of the provider.
             */

            this.invokeOnInitCallbacks(instance, instanceIdentifier);
            /**
             * Order is important
             * onInstanceCreated() should be called after this.instances.set(instanceIdentifier, instance); which
             * makes `isInitialized()` return true.
             */

            if (this.component.onInstanceCreated) {
              try {
                this.component.onInstanceCreated(this.container, instanceIdentifier, instance);
              } catch (_c) {// ignore errors in the onInstanceCreatedCallback
              }
            }
          }

          return instance || null;
        };

        Provider.prototype.normalizeInstanceIdentifier = function (identifier) {
          if (identifier === void 0) {
            identifier = DEFAULT_ENTRY_NAME;
          }

          if (this.component) {
            return this.component.multipleInstances ? identifier : DEFAULT_ENTRY_NAME;
          } else {
            return identifier; // assume multiple instances are supported before the component is provided.
          }
        };

        Provider.prototype.shouldAutoInitialize = function () {
          return !!this.component && this.component.instantiationMode !== "EXPLICIT"
          /* EXPLICIT */
          ;
        };

        return Provider;
      }(); // undefined should be passed to the service factory for the default instance


      function normalizeIdentifierForFactory(identifier) {
        return identifier === DEFAULT_ENTRY_NAME ? undefined : identifier;
      }

      function isComponentEager(component) {
        return component.instantiationMode === "EAGER"
        /* EAGER */
        ;
      }
      /**
       * @license
       * Copyright 2019 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * ComponentContainer that provides Providers for service name T, e.g. `auth`, `auth-internal`
       */


      var ComponentContainer =
      /** @class */
      function () {
        function ComponentContainer(name) {
          this.name = name;
          this.providers = new Map();
        }
        /**
         *
         * @param component Component being added
         * @param overwrite When a component with the same name has already been registered,
         * if overwrite is true: overwrite the existing component with the new component and create a new
         * provider with the new component. It can be useful in tests where you want to use different mocks
         * for different tests.
         * if overwrite is false: throw an exception
         */


        ComponentContainer.prototype.addComponent = function (component) {
          var provider = this.getProvider(component.name);

          if (provider.isComponentSet()) {
            throw new Error("Component " + component.name + " has already been registered with " + this.name);
          }

          provider.setComponent(component);
        };

        ComponentContainer.prototype.addOrOverwriteComponent = function (component) {
          var provider = this.getProvider(component.name);

          if (provider.isComponentSet()) {
            // delete the existing provider from the container, so we can register the new component
            this.providers["delete"](component.name);
          }

          this.addComponent(component);
        };
        /**
         * getProvider provides a type safe interface where it can only be called with a field name
         * present in NameServiceMapping interface.
         *
         * Firebase SDKs providing services should extend NameServiceMapping interface to register
         * themselves.
         */


        ComponentContainer.prototype.getProvider = function (name) {
          if (this.providers.has(name)) {
            return this.providers.get(name);
          } // create a Provider for a service that hasn't registered with Firebase


          var provider = new Provider(name, this);
          this.providers.set(name, provider);
          return provider;
        };

        ComponentContainer.prototype.getProviders = function () {
          return Array.from(this.providers.values());
        };

        return ComponentContainer;
      }(); //# sourceMappingURL=index.esm.js.map

      /***/

    },

    /***/
    "/XPu":
    /*!*****************************************************************************!*\
      !*** ./node_modules/@ionic-native/social-sharing/__ivy_ngcc__/ngx/index.js ***!
      \*****************************************************************************/

    /*! exports provided: SocialSharing */

    /***/
    function XPu(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SocialSharing", function () {
        return SocialSharing;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _ionic_native_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @ionic-native/core */
      "C6fG");

      var SocialSharing =
      /** @class */
      function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SocialSharing, _super);

        function SocialSharing() {
          return _super !== null && _super.apply(this, arguments) || this;
        }

        SocialSharing.prototype.share = function (message, subject, file, url) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "share", {
            "successIndex": 4,
            "errorIndex": 5
          }, arguments);
        };

        SocialSharing.prototype.shareWithOptions = function (options) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "shareWithOptions", {
            "platforms": ["iOS", "Android"]
          }, arguments);
        };

        SocialSharing.prototype.canShareVia = function (appName, message, subject, image, url) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "canShareVia", {
            "successIndex": 5,
            "errorIndex": 6,
            "platforms": ["iOS", "Android"]
          }, arguments);
        };

        SocialSharing.prototype.shareViaTwitter = function (message, image, url) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "shareViaTwitter", {
            "successIndex": 3,
            "errorIndex": 4,
            "platforms": ["iOS", "Android"]
          }, arguments);
        };

        SocialSharing.prototype.shareViaFacebook = function (message, image, url) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "shareViaFacebook", {
            "successIndex": 3,
            "errorIndex": 4,
            "platforms": ["iOS", "Android"]
          }, arguments);
        };

        SocialSharing.prototype.shareViaFacebookWithPasteMessageHint = function (message, image, url, pasteMessageHint) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "shareViaFacebookWithPasteMessageHint", {
            "successIndex": 4,
            "errorIndex": 5,
            "platforms": ["iOS", "Android"]
          }, arguments);
        };

        SocialSharing.prototype.shareViaInstagram = function (message, image) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "shareViaInstagram", {
            "platforms": ["iOS", "Android"]
          }, arguments);
        };

        SocialSharing.prototype.shareViaWhatsApp = function (message, image, url) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "shareViaWhatsApp", {
            "successIndex": 3,
            "errorIndex": 4,
            "platforms": ["iOS", "Android"]
          }, arguments);
        };

        SocialSharing.prototype.shareViaWhatsAppToReceiver = function (receiver, message, image, url) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "shareViaWhatsAppToReceiver", {
            "successIndex": 4,
            "errorIndex": 5,
            "platforms": ["iOS", "Android"]
          }, arguments);
        };

        SocialSharing.prototype.shareViaSMS = function (messge, phoneNumber) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "shareViaSMS", {
            "platforms": ["iOS", "Android"]
          }, arguments);
        };

        SocialSharing.prototype.canShareViaEmail = function () {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "canShareViaEmail", {
            "platforms": ["iOS", "Android"]
          }, arguments);
        };

        SocialSharing.prototype.shareViaEmail = function (message, subject, to, cc, bcc, files) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "shareViaEmail", {
            "platforms": ["iOS", "Android"],
            "successIndex": 6,
            "errorIndex": 7
          }, arguments);
        };

        SocialSharing.prototype.shareVia = function (appName, message, subject, image, url) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "shareVia", {
            "successIndex": 5,
            "errorIndex": 6,
            "platforms": ["iOS", "Android"]
          }, arguments);
        };

        SocialSharing.prototype.setIPadPopupCoordinates = function (targetBounds) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "setIPadPopupCoordinates", {
            "sync": true,
            "platforms": ["iOS"]
          }, arguments);
        };

        SocialSharing.prototype.saveToPhotoAlbum = function (fileOrFileArray) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "saveToPhotoAlbum", {
            "platforms": ["iOS"]
          }, arguments);
        };

        SocialSharing.prototype.shareViaWhatsAppToPhone = function (phone, message, fileOrFileArray, url) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "shareViaWhatsAppToPhone", {
            "successIndex": 5,
            "errorIndex": 6,
            "platforms": ["iOS", "Android"]
          }, arguments);
        };

        SocialSharing.pluginName = "SocialSharing";
        SocialSharing.plugin = "cordova-plugin-x-socialsharing";
        SocialSharing.pluginRef = "plugins.socialsharing";
        SocialSharing.repo = "https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin";
        SocialSharing.platforms = ["Android", "Browser", "iOS", "Windows", "Windows Phone"];

        SocialSharing.ɵfac = function SocialSharing_Factory(t) {
          return ɵSocialSharing_BaseFactory(t || SocialSharing);
        };

        SocialSharing.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
          token: SocialSharing,
          factory: function factory(t) {
            return SocialSharing.ɵfac(t);
          }
        });

        var ɵSocialSharing_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetInheritedFactory"](SocialSharing);
        /*@__PURE__*/


        (function () {
          _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](SocialSharing, [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
          }], null, null);
        })();

        return SocialSharing;
      }(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["IonicNativePlugin"]); //# sourceMappingURL=data:application/json;charset=utf-8;base64, 

      /***/

    },

    /***/
    "/ZhC":
    /*!**********************************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/integrations/breadcrumbs.js ***!
      \**********************************************************************/

    /*! exports provided: Breadcrumbs */

    /***/
    function ZhC(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Breadcrumbs", function () {
        return Breadcrumbs;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/core */
      "wBhU");
      /* harmony import */


      var _sentry_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/types */
      "PIsB");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* eslint-disable @typescript-eslint/no-unsafe-member-access */

      /* eslint-disable max-lines */

      /**
       * Default Breadcrumbs instrumentations
       * TODO: Deprecated - with v6, this will be renamed to `Instrument`
       */


      var Breadcrumbs =
      /** @class */
      function () {
        /**
         * @inheritDoc
         */
        function Breadcrumbs(options) {
          /**
           * @inheritDoc
           */
          this.name = Breadcrumbs.id;
          this._options = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
            console: true,
            dom: true,
            fetch: true,
            history: true,
            sentry: true,
            xhr: true
          }, options);
        }
        /**
         * Create a breadcrumb of `sentry` from the events themselves
         */


        Breadcrumbs.prototype.addSentryBreadcrumb = function (event) {
          if (!this._options.sentry) {
            return;
          }

          Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])().addBreadcrumb({
            category: "sentry." + (event.type === 'transaction' ? 'transaction' : 'event'),
            event_id: event.event_id,
            level: event.level,
            message: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["getEventDescription"])(event)
          }, {
            event: event
          });
        };
        /**
         * Instrument browser built-ins w/ breadcrumb capturing
         *  - Console API
         *  - DOM API (click/typing)
         *  - XMLHttpRequest API
         *  - Fetch API
         *  - History API
         */


        Breadcrumbs.prototype.setupOnce = function () {
          var _this = this;

          if (this._options.console) {
            Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["addInstrumentationHandler"])({
              callback: function callback() {
                var args = [];

                for (var _i = 0; _i < arguments.length; _i++) {
                  args[_i] = arguments[_i];
                }

                _this._consoleBreadcrumb.apply(_this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args));
              },
              type: 'console'
            });
          }

          if (this._options.dom) {
            Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["addInstrumentationHandler"])({
              callback: function callback() {
                var args = [];

                for (var _i = 0; _i < arguments.length; _i++) {
                  args[_i] = arguments[_i];
                }

                _this._domBreadcrumb.apply(_this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args));
              },
              type: 'dom'
            });
          }

          if (this._options.xhr) {
            Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["addInstrumentationHandler"])({
              callback: function callback() {
                var args = [];

                for (var _i = 0; _i < arguments.length; _i++) {
                  args[_i] = arguments[_i];
                }

                _this._xhrBreadcrumb.apply(_this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args));
              },
              type: 'xhr'
            });
          }

          if (this._options.fetch) {
            Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["addInstrumentationHandler"])({
              callback: function callback() {
                var args = [];

                for (var _i = 0; _i < arguments.length; _i++) {
                  args[_i] = arguments[_i];
                }

                _this._fetchBreadcrumb.apply(_this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args));
              },
              type: 'fetch'
            });
          }

          if (this._options.history) {
            Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["addInstrumentationHandler"])({
              callback: function callback() {
                var args = [];

                for (var _i = 0; _i < arguments.length; _i++) {
                  args[_i] = arguments[_i];
                }

                _this._historyBreadcrumb.apply(_this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args));
              },
              type: 'history'
            });
          }
        };
        /**
         * Creates breadcrumbs from console API calls
         */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any


        Breadcrumbs.prototype._consoleBreadcrumb = function (handlerData) {
          var breadcrumb = {
            category: 'console',
            data: {
              arguments: handlerData.args,
              logger: 'console'
            },
            level: _sentry_types__WEBPACK_IMPORTED_MODULE_2__["Severity"].fromString(handlerData.level),
            message: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["safeJoin"])(handlerData.args, ' ')
          };

          if (handlerData.level === 'assert') {
            if (handlerData.args[0] === false) {
              breadcrumb.message = "Assertion failed: " + (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["safeJoin"])(handlerData.args.slice(1), ' ') || 'console.assert');
              breadcrumb.data.arguments = handlerData.args.slice(1);
            } else {
              // Don't capture a breadcrumb for passed assertions
              return;
            }
          }

          Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])().addBreadcrumb(breadcrumb, {
            input: handlerData.args,
            level: handlerData.level
          });
        };
        /**
         * Creates breadcrumbs from DOM API calls
         */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any


        Breadcrumbs.prototype._domBreadcrumb = function (handlerData) {
          var target;
          var keyAttrs = typeof this._options.dom === 'object' ? this._options.dom.serializeAttribute : undefined;

          if (typeof keyAttrs === 'string') {
            keyAttrs = [keyAttrs];
          } // Accessing event.target can throw (see getsentry/raven-js#838, #768)


          try {
            target = handlerData.event.target ? Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["htmlTreeAsString"])(handlerData.event.target, keyAttrs) : Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["htmlTreeAsString"])(handlerData.event, keyAttrs);
          } catch (e) {
            target = '<unknown>';
          }

          if (target.length === 0) {
            return;
          }

          Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])().addBreadcrumb({
            category: "ui." + handlerData.name,
            message: target
          }, {
            event: handlerData.event,
            name: handlerData.name,
            global: handlerData.global
          });
        };
        /**
         * Creates breadcrumbs from XHR API calls
         */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any


        Breadcrumbs.prototype._xhrBreadcrumb = function (handlerData) {
          if (handlerData.endTimestamp) {
            // We only capture complete, non-sentry requests
            if (handlerData.xhr.__sentry_own_request__) {
              return;
            }

            var _a = handlerData.xhr.__sentry_xhr__ || {},
                method = _a.method,
                url = _a.url,
                status_code = _a.status_code,
                body = _a.body;

            Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])().addBreadcrumb({
              category: 'xhr',
              data: {
                method: method,
                url: url,
                status_code: status_code
              },
              type: 'http'
            }, {
              xhr: handlerData.xhr,
              input: body
            });
            return;
          }
        };
        /**
         * Creates breadcrumbs from fetch API calls
         */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any


        Breadcrumbs.prototype._fetchBreadcrumb = function (handlerData) {
          // We only capture complete fetch requests
          if (!handlerData.endTimestamp) {
            return;
          }

          if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {
            // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)
            return;
          }

          if (handlerData.error) {
            Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])().addBreadcrumb({
              category: 'fetch',
              data: handlerData.fetchData,
              level: _sentry_types__WEBPACK_IMPORTED_MODULE_2__["Severity"].Error,
              type: 'http'
            }, {
              data: handlerData.error,
              input: handlerData.args
            });
          } else {
            Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])().addBreadcrumb({
              category: 'fetch',
              data: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, handlerData.fetchData), {
                status_code: handlerData.response.status
              }),
              type: 'http'
            }, {
              input: handlerData.args,
              response: handlerData.response
            });
          }
        };
        /**
         * Creates breadcrumbs from history API calls
         */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any


        Breadcrumbs.prototype._historyBreadcrumb = function (handlerData) {
          var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["getGlobalObject"])();
          var from = handlerData.from;
          var to = handlerData.to;
          var parsedLoc = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["parseUrl"])(global.location.href);
          var parsedFrom = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["parseUrl"])(from);
          var parsedTo = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["parseUrl"])(to); // Initial pushState doesn't provide `from` information

          if (!parsedFrom.path) {
            parsedFrom = parsedLoc;
          } // Use only the path component of the URL if the URL matches the current
          // document (almost all the time when using pushState)


          if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {
            to = parsedTo.relative;
          }

          if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {
            from = parsedFrom.relative;
          }

          Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])().addBreadcrumb({
            category: 'navigation',
            data: {
              from: from,
              to: to
            }
          });
        };
        /**
         * @inheritDoc
         */


        Breadcrumbs.id = 'Breadcrumbs';
        return Breadcrumbs;
      }(); //# sourceMappingURL=breadcrumbs.js.map

      /***/

    },

    /***/
    "/d8p":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/repeat.js ***!
      \*****************************************************************/

    /*! exports provided: repeat */

    /***/
    function d8p(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "repeat", function () {
        return repeat;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _observable_empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../observable/empty */
      "EY2u");

      function repeat() {
        var count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
        return function (source) {
          if (count === 0) {
            return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_1__["empty"])();
          } else if (count < 0) {
            return source.lift(new RepeatOperator(-1, source));
          } else {
            return source.lift(new RepeatOperator(count - 1, source));
          }
        };
      }

      var RepeatOperator = /*#__PURE__*/function () {
        function RepeatOperator(count, source) {
          _classCallCheck(this, RepeatOperator);

          this.count = count;
          this.source = source;
        }

        _createClass2(RepeatOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));
          }
        }]);

        return RepeatOperator;
      }();

      var RepeatSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_) {
        _inherits(RepeatSubscriber, _Subscriber__WEBPACK_);

        var _super2 = _createSuper(RepeatSubscriber);

        function RepeatSubscriber(destination, count, source) {
          var _this2;

          _classCallCheck(this, RepeatSubscriber);

          _this2 = _super2.call(this, destination);
          _this2.count = count;
          _this2.source = source;
          return _this2;
        }

        _createClass2(RepeatSubscriber, [{
          key: "complete",
          value: function complete() {
            if (!this.isStopped) {
              var source = this.source,
                  count = this.count;

              if (count === 0) {
                return _get(_getPrototypeOf(RepeatSubscriber.prototype), "complete", this).call(this);
              } else if (count > -1) {
                this.count = count - 1;
              }

              source.subscribe(this._unsubscribeAndRecycle());
            }
          }
        }]);

        return RepeatSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=repeat.js.map

      /***/

    },

    /***/
    "/uUt":
    /*!*******************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/distinctUntilChanged.js ***!
      \*******************************************************************************/

    /*! exports provided: distinctUntilChanged */

    /***/
    function uUt(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function () {
        return distinctUntilChanged;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function distinctUntilChanged(compare, keySelector) {
        return function (source) {
          return source.lift(new DistinctUntilChangedOperator(compare, keySelector));
        };
      }

      var DistinctUntilChangedOperator = /*#__PURE__*/function () {
        function DistinctUntilChangedOperator(compare, keySelector) {
          _classCallCheck(this, DistinctUntilChangedOperator);

          this.compare = compare;
          this.keySelector = keySelector;
        }

        _createClass2(DistinctUntilChangedOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
          }
        }]);

        return DistinctUntilChangedOperator;
      }();

      var DistinctUntilChangedSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_2) {
        _inherits(DistinctUntilChangedSubscriber, _Subscriber__WEBPACK_2);

        var _super3 = _createSuper(DistinctUntilChangedSubscriber);

        function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
          var _this3;

          _classCallCheck(this, DistinctUntilChangedSubscriber);

          _this3 = _super3.call(this, destination);
          _this3.keySelector = keySelector;
          _this3.hasKey = false;

          if (typeof compare === 'function') {
            _this3.compare = compare;
          }

          return _this3;
        }

        _createClass2(DistinctUntilChangedSubscriber, [{
          key: "compare",
          value: function compare(x, y) {
            return x === y;
          }
        }, {
          key: "_next",
          value: function _next(value) {
            var key;

            try {
              var keySelector = this.keySelector;
              key = keySelector ? keySelector(value) : value;
            } catch (err) {
              return this.destination.error(err);
            }

            var result = false;

            if (this.hasKey) {
              try {
                var compare = this.compare;
                result = compare(this.key, key);
              } catch (err) {
                return this.destination.error(err);
              }
            } else {
              this.hasKey = true;
            }

            if (!result) {
              this.key = key;
              this.destination.next(value);
            }
          }
        }]);

        return DistinctUntilChangedSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=distinctUntilChanged.js.map

      /***/

    },

    /***/
    "02Lk":
    /*!*******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/distinct.js ***!
      \*******************************************************************/

    /*! exports provided: distinct, DistinctSubscriber */

    /***/
    function Lk(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "distinct", function () {
        return distinct;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DistinctSubscriber", function () {
        return DistinctSubscriber;
      });
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function distinct(keySelector, flushes) {
        return function (source) {
          return source.lift(new DistinctOperator(keySelector, flushes));
        };
      }

      var DistinctOperator = /*#__PURE__*/function () {
        function DistinctOperator(keySelector, flushes) {
          _classCallCheck(this, DistinctOperator);

          this.keySelector = keySelector;
          this.flushes = flushes;
        }

        _createClass2(DistinctOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));
          }
        }]);

        return DistinctOperator;
      }();

      var DistinctSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP) {
        _inherits(DistinctSubscriber, _innerSubscribe__WEBP);

        var _super4 = _createSuper(DistinctSubscriber);

        function DistinctSubscriber(destination, keySelector, flushes) {
          var _this4;

          _classCallCheck(this, DistinctSubscriber);

          _this4 = _super4.call(this, destination);
          _this4.keySelector = keySelector;
          _this4.values = new Set();

          if (flushes) {
            _this4.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(flushes, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](_assertThisInitialized(_this4))));
          }

          return _this4;
        }

        _createClass2(DistinctSubscriber, [{
          key: "notifyNext",
          value: function notifyNext() {
            this.values.clear();
          }
        }, {
          key: "notifyError",
          value: function notifyError(error) {
            this._error(error);
          }
        }, {
          key: "_next",
          value: function _next(value) {
            if (this.keySelector) {
              this._useKeySelector(value);
            } else {
              this._finalizeNext(value, value);
            }
          }
        }, {
          key: "_useKeySelector",
          value: function _useKeySelector(value) {
            var key;
            var destination = this.destination;

            try {
              key = this.keySelector(value);
            } catch (err) {
              destination.error(err);
              return;
            }

            this._finalizeNext(key, value);
          }
        }, {
          key: "_finalizeNext",
          value: function _finalizeNext(key, value) {
            var values = this.values;

            if (!values.has(key)) {
              values.add(key);
              this.destination.next(value);
            }
          }
        }]);

        return DistinctSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"]); //# sourceMappingURL=distinct.js.map

      /***/

    },

    /***/
    "04ZW":
    /*!****************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/fromEventPattern.js ***!
      \****************************************************************************/

    /*! exports provided: fromEventPattern */

    /***/
    function ZW(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "fromEventPattern", function () {
        return fromEventPattern;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/isArray */
      "DH7j");
      /* harmony import */


      var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../util/isFunction */
      "n6bG");
      /* harmony import */


      var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../operators/map */
      "lJxs");

      function fromEventPattern(addHandler, removeHandler, resultSelector) {
        if (resultSelector) {
          return fromEventPattern(addHandler, removeHandler).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (args) {
            return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector.apply(void 0, _toConsumableArray(args)) : resultSelector(args);
          }));
        }

        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          var handler = function handler() {
            for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) {
              e[_key] = arguments[_key];
            }

            return subscriber.next(e.length === 1 ? e[0] : e);
          };

          var retValue;

          try {
            retValue = addHandler(handler);
          } catch (err) {
            subscriber.error(err);
            return undefined;
          }

          if (!Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(removeHandler)) {
            return undefined;
          }

          return function () {
            return removeHandler(handler, retValue);
          };
        });
      } //# sourceMappingURL=fromEventPattern.js.map

      /***/

    },

    /***/
    "05l1":
    /*!************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/publishReplay.js ***!
      \************************************************************************/

    /*! exports provided: publishReplay */

    /***/
    function l1(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "publishReplay", function () {
        return publishReplay;
      });
      /* harmony import */


      var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../ReplaySubject */
      "jtHE");
      /* harmony import */


      var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./multicast */
      "oB13");

      function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
        if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
          scheduler = selectorOrScheduler;
        }

        var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
        var subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
        return function (source) {
          return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () {
            return subject;
          }, selector)(source);
        };
      } //# sourceMappingURL=publishReplay.js.map

      /***/

    },

    /***/
    "06fX":
    /*!*********************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/md.transition-eecd3a67.js ***!
      \*********************************************************************/

    /*! exports provided: mdTransitionAnimation */

    /***/
    function fX(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "mdTransitionAnimation", function () {
        return mdTransitionAnimation;
      });
      /* harmony import */


      var _animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./animation-096c6391.js */
      "meiF");
      /* harmony import */


      var _index_931440b1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./index-931440b1.js */
      "Js3/");
      /* harmony import */


      var _helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./helpers-dd7e4b7b.js */
      "1vRN");
      /* harmony import */


      var _index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./index-7a8b7a1c.js */
      "wEJo");

      var mdTransitionAnimation = function mdTransitionAnimation(_, opts) {
        var OFF_BOTTOM = '40px';
        var CENTER = '0px';
        var backDirection = opts.direction === 'back';
        var enteringEl = opts.enteringEl;
        var leavingEl = opts.leavingEl;
        var ionPageElement = Object(_index_931440b1_js__WEBPACK_IMPORTED_MODULE_1__["g"])(enteringEl);
        var enteringToolbarEle = ionPageElement.querySelector('ion-toolbar');
        var rootTransition = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
        rootTransition.addElement(ionPageElement).fill('both').beforeRemoveClass('ion-page-invisible'); // animate the component itself

        if (backDirection) {
          rootTransition.duration(opts.duration || 200).easing('cubic-bezier(0.47,0,0.745,0.715)');
        } else {
          rootTransition.duration(opts.duration || 280).easing('cubic-bezier(0.36,0.66,0.04,1)').fromTo('transform', "translateY(".concat(OFF_BOTTOM, ")"), "translateY(".concat(CENTER, ")")).fromTo('opacity', 0.01, 1);
        } // Animate toolbar if it's there


        if (enteringToolbarEle) {
          var enteringToolBar = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
          enteringToolBar.addElement(enteringToolbarEle);
          rootTransition.addAnimation(enteringToolBar);
        } // setup leaving view


        if (leavingEl && backDirection) {
          // leaving content
          rootTransition.duration(opts.duration || 200).easing('cubic-bezier(0.47,0,0.745,0.715)');
          var leavingPage = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
          leavingPage.addElement(Object(_index_931440b1_js__WEBPACK_IMPORTED_MODULE_1__["g"])(leavingEl)).onFinish(function (currentStep) {
            if (currentStep === 1 && leavingPage.elements.length > 0) {
              leavingPage.elements[0].style.setProperty('display', 'none');
            }
          }).fromTo('transform', "translateY(".concat(CENTER, ")"), "translateY(".concat(OFF_BOTTOM, ")")).fromTo('opacity', 1, 0);
          rootTransition.addAnimation(leavingPage);
        }

        return rootTransition;
      };
      /***/

    },

    /***/
    "0EUg":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/concatAll.js ***!
      \********************************************************************/

    /*! exports provided: concatAll */

    /***/
    function EUg(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "concatAll", function () {
        return concatAll;
      });
      /* harmony import */


      var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./mergeAll */
      "bHdf");

      function concatAll() {
        return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__["mergeAll"])(1);
      } //# sourceMappingURL=concatAll.js.map

      /***/

    },

    /***/
    "0G76":
    /*!*********************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/integrations/node/mongo.js ***!
      \*********************************************************************/

    /*! exports provided: Mongo */

    /***/
    function G76(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Mongo", function () {
        return Mongo;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");

      var OPERATIONS = ['aggregate', 'bulkWrite', 'countDocuments', 'createIndex', 'createIndexes', 'deleteMany', 'deleteOne', 'distinct', 'drop', 'dropIndex', 'dropIndexes', 'estimatedDocumentCount', 'find', 'findOne', 'findOneAndDelete', 'findOneAndReplace', 'findOneAndUpdate', 'indexes', 'indexExists', 'indexInformation', 'initializeOrderedBulkOp', 'insertMany', 'insertOne', 'isCapped', 'mapReduce', 'options', 'parallelCollectionScan', 'rename', 'replaceOne', 'stats', 'updateMany', 'updateOne']; // All of the operations above take `options` and `callback` as their final parameters, but some of them
      // take additional parameters as well. For those operations, this is a map of
      // { <operation name>:  [<names of additional parameters>] }, as a way to know what to call the operation's
      // positional arguments when we add them to the span's `data` object later

      var OPERATION_SIGNATURES = {
        // aggregate intentionally not included because `pipeline` arguments are too complex to serialize well
        // see https://github.com/getsentry/sentry-javascript/pull/3102
        bulkWrite: ['operations'],
        countDocuments: ['query'],
        createIndex: ['fieldOrSpec'],
        createIndexes: ['indexSpecs'],
        deleteMany: ['filter'],
        deleteOne: ['filter'],
        distinct: ['key', 'query'],
        dropIndex: ['indexName'],
        find: ['query'],
        findOne: ['query'],
        findOneAndDelete: ['filter'],
        findOneAndReplace: ['filter', 'replacement'],
        findOneAndUpdate: ['filter', 'update'],
        indexExists: ['indexes'],
        insertMany: ['docs'],
        insertOne: ['doc'],
        mapReduce: ['map', 'reduce'],
        rename: ['newName'],
        replaceOne: ['filter', 'doc'],
        updateMany: ['filter', 'update'],
        updateOne: ['filter', 'update']
      };
      /** Tracing integration for mongo package */

      var Mongo =
      /** @class */
      function () {
        /**
         * @inheritDoc
         */
        function Mongo(options) {
          if (options === void 0) {
            options = {};
          }
          /**
           * @inheritDoc
           */


          this.name = Mongo.id;
          this._operations = Array.isArray(options.operations) ? options.operations : OPERATIONS;
          this._describeOperations = 'describeOperations' in options ? options.describeOperations : true;
          this._useMongoose = !!options.useMongoose;
        }
        /**
         * @inheritDoc
         */


        Mongo.prototype.setupOnce = function (_, getCurrentHub) {
          var moduleName = this._useMongoose ? 'mongoose' : 'mongodb';
          var pkg = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["loadModule"])(moduleName);

          if (!pkg) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error("Mongo Integration was unable to require `" + moduleName + "` package.");

            return;
          }

          this._instrumentOperations(pkg.Collection, this._operations, getCurrentHub);
        };
        /**
         * Patches original collection methods
         */


        Mongo.prototype._instrumentOperations = function (collection, operations, getCurrentHub) {
          var _this = this;

          operations.forEach(function (operation) {
            return _this._patchOperation(collection, operation, getCurrentHub);
          });
        };
        /**
         * Patches original collection to utilize our tracing functionality
         */


        Mongo.prototype._patchOperation = function (collection, operation, getCurrentHub) {
          if (!(operation in collection.prototype)) return;

          var getSpanContext = this._getSpanContextFromOperationArguments.bind(this);

          Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["fill"])(collection.prototype, operation, function (orig) {
            return function () {
              var args = [];

              for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
              }

              var _a, _b, _c, _d;

              var lastArg = args[args.length - 1];
              var scope = getCurrentHub().getScope();
              var parentSpan = (_a = scope) === null || _a === void 0 ? void 0 : _a.getSpan(); // Check if the operation was passed a callback. (mapReduce requires a different check, as
              // its (non-callback) arguments can also be functions.)

              if (typeof lastArg !== 'function' || operation === 'mapReduce' && args.length === 2) {
                var span_1 = (_b = parentSpan) === null || _b === void 0 ? void 0 : _b.startChild(getSpanContext(this, operation, args));
                var maybePromise = orig.call.apply(orig, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([this], args));

                if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isThenable"])(maybePromise)) {
                  return maybePromise.then(function (res) {
                    var _a;

                    (_a = span_1) === null || _a === void 0 ? void 0 : _a.finish();
                    return res;
                  });
                } else {
                  (_c = span_1) === null || _c === void 0 ? void 0 : _c.finish();
                  return maybePromise;
                }
              }

              var span = (_d = parentSpan) === null || _d === void 0 ? void 0 : _d.startChild(getSpanContext(this, operation, args.slice(0, -1)));
              return orig.call.apply(orig, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([this], args.slice(0, -1), [function (err, result) {
                var _a;

                (_a = span) === null || _a === void 0 ? void 0 : _a.finish();
                lastArg(err, result);
              }]));
            };
          });
        };
        /**
         * Form a SpanContext based on the user input to a given operation.
         */


        Mongo.prototype._getSpanContextFromOperationArguments = function (collection, operation, args) {
          var data = {
            collectionName: collection.collectionName,
            dbName: collection.dbName,
            namespace: collection.namespace
          };
          var spanContext = {
            op: "db",
            description: operation,
            data: data
          }; // If the operation takes no arguments besides `options` and `callback`, or if argument
          // collection is disabled for this operation, just return early.

          var signature = OPERATION_SIGNATURES[operation];
          var shouldDescribe = Array.isArray(this._describeOperations) ? this._describeOperations.includes(operation) : this._describeOperations;

          if (!signature || !shouldDescribe) {
            return spanContext;
          }

          try {
            // Special case for `mapReduce`, as the only one accepting functions as arguments.
            if (operation === 'mapReduce') {
              var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(args, 2),
                  map = _a[0],
                  reduce = _a[1];

              data[signature[0]] = typeof map === 'string' ? map : map.name || '<anonymous>';
              data[signature[1]] = typeof reduce === 'string' ? reduce : reduce.name || '<anonymous>';
            } else {
              for (var i = 0; i < signature.length; i++) {
                data[signature[i]] = JSON.stringify(args[i]);
              }
            }
          } catch (_oO) {// no-empty
          }

          return spanContext;
        };
        /**
         * @inheritDoc
         */


        Mongo.id = 'Mongo';
        return Mongo;
      }(); //# sourceMappingURL=mongo.js.map

      /***/

    },

    /***/
    "0Pi8":
    /*!******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/endWith.js ***!
      \******************************************************************/

    /*! exports provided: endWith */

    /***/
    function Pi8(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "endWith", function () {
        return endWith;
      });
      /* harmony import */


      var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../observable/concat */
      "GyhO");
      /* harmony import */


      var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../observable/of */
      "LRne");

      function endWith() {
        for (var _len2 = arguments.length, array = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
          array[_key2] = arguments[_key2];
        }

        return function (source) {
          return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(source, Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"]).apply(void 0, array));
        };
      } //# sourceMappingURL=endWith.js.map

      /***/

    },

    /***/
    "128B":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/reduce.js ***!
      \*****************************************************************/

    /*! exports provided: reduce */

    /***/
    function B(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "reduce", function () {
        return reduce;
      });
      /* harmony import */


      var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./scan */
      "Kqap");
      /* harmony import */


      var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./takeLast */
      "BFxc");
      /* harmony import */


      var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./defaultIfEmpty */
      "xbPD");
      /* harmony import */


      var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../util/pipe */
      "mCNh");

      function reduce(accumulator, seed) {
        if (arguments.length >= 2) {
          return function reduceOperatorFunctionWithSeed(source) {
            return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(accumulator, seed), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1), Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__["defaultIfEmpty"])(seed))(source);
          };
        }

        return function reduceOperatorFunction(source) {
          return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(function (acc, value, index) {
            return accumulator(acc, value, index + 1);
          }), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1))(source);
        };
      } //# sourceMappingURL=reduce.js.map

      /***/

    },

    /***/
    "1Bn7":
    /*!****************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/index.js ***!
      \****************************************************/

    /*! exports provided: createAnimation, iosTransitionAnimation, mdTransitionAnimation, getTimeGivenProgression, createGesture, getPlatforms, initialize, isPlatform, componentOnReady, IonicSafeString, LIFECYCLE_DID_ENTER, LIFECYCLE_DID_LEAVE, LIFECYCLE_WILL_ENTER, LIFECYCLE_WILL_LEAVE, LIFECYCLE_WILL_UNLOAD, menuController, actionSheetController, alertController, loadingController, modalController, pickerController, popoverController, toastController, IonicSlides, IonicSwiper, getMode, setupConfig */

    /***/
    function Bn7(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonicSlides", function () {
        return IonicSlides;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonicSwiper", function () {
        return IonicSwiper;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getMode", function () {
        return getMode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setupConfig", function () {
        return setupConfig;
      });
      /* harmony import */


      var _animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./animation-096c6391.js */
      "meiF");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "createAnimation", function () {
        return _animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"];
      });
      /* harmony import */


      var _ios_transition_12db6216_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./ios.transition-12db6216.js */
      "4IIC");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "iosTransitionAnimation", function () {
        return _ios_transition_12db6216_js__WEBPACK_IMPORTED_MODULE_1__["iosTransitionAnimation"];
      });
      /* harmony import */


      var _md_transition_eecd3a67_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./md.transition-eecd3a67.js */
      "06fX");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "mdTransitionAnimation", function () {
        return _md_transition_eecd3a67_js__WEBPACK_IMPORTED_MODULE_2__["mdTransitionAnimation"];
      });
      /* harmony import */


      var _cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./cubic-bezier-eea9a7a9.js */
      "bC4P");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getTimeGivenProgression", function () {
        return _cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_3__["g"];
      });
      /* harmony import */


      var _index_34cb2743_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./index-34cb2743.js */
      "KF81");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "createGesture", function () {
        return _index_34cb2743_js__WEBPACK_IMPORTED_MODULE_4__["createGesture"];
      });
      /* harmony import */


      var _ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./ionic-global-63a97a32.js */
      "E/Mt");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getPlatforms", function () {
        return _ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_5__["g"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "initialize", function () {
        return _ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_5__["i"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isPlatform", function () {
        return _ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_5__["a"];
      });
      /* harmony import */


      var _helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ./helpers-dd7e4b7b.js */
      "1vRN");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "componentOnReady", function () {
        return _helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_6__["c"];
      });
      /* harmony import */


      var _index_9e3fe806_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! ./index-9e3fe806.js */
      "39oe");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "IonicSafeString", function () {
        return _index_9e3fe806_js__WEBPACK_IMPORTED_MODULE_7__["I"];
      });
      /* harmony import */


      var _index_931440b1_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
      /*! ./index-931440b1.js */
      "Js3/");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "LIFECYCLE_DID_ENTER", function () {
        return _index_931440b1_js__WEBPACK_IMPORTED_MODULE_8__["a"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "LIFECYCLE_DID_LEAVE", function () {
        return _index_931440b1_js__WEBPACK_IMPORTED_MODULE_8__["c"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "LIFECYCLE_WILL_ENTER", function () {
        return _index_931440b1_js__WEBPACK_IMPORTED_MODULE_8__["L"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "LIFECYCLE_WILL_LEAVE", function () {
        return _index_931440b1_js__WEBPACK_IMPORTED_MODULE_8__["b"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "LIFECYCLE_WILL_UNLOAD", function () {
        return _index_931440b1_js__WEBPACK_IMPORTED_MODULE_8__["d"];
      });
      /* harmony import */


      var _index_0d58a5bf_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
      /*! ./index-0d58a5bf.js */
      "r7QR");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "menuController", function () {
        return _index_0d58a5bf_js__WEBPACK_IMPORTED_MODULE_9__["m"];
      });
      /* harmony import */


      var _overlays_e9ccff30_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
      /*! ./overlays-e9ccff30.js */
      "SOSK");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "actionSheetController", function () {
        return _overlays_e9ccff30_js__WEBPACK_IMPORTED_MODULE_10__["b"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "alertController", function () {
        return _overlays_e9ccff30_js__WEBPACK_IMPORTED_MODULE_10__["a"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "loadingController", function () {
        return _overlays_e9ccff30_js__WEBPACK_IMPORTED_MODULE_10__["l"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "modalController", function () {
        return _overlays_e9ccff30_js__WEBPACK_IMPORTED_MODULE_10__["m"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "pickerController", function () {
        return _overlays_e9ccff30_js__WEBPACK_IMPORTED_MODULE_10__["p"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "popoverController", function () {
        return _overlays_e9ccff30_js__WEBPACK_IMPORTED_MODULE_10__["c"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "toastController", function () {
        return _overlays_e9ccff30_js__WEBPACK_IMPORTED_MODULE_10__["t"];
      });
      /* harmony import */


      var _gesture_controller_31cb6bb9_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
      /*! ./gesture-controller-31cb6bb9.js */
      "y08P");
      /* harmony import */


      var _index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
      /*! ./index-7a8b7a1c.js */
      "wEJo");
      /* harmony import */


      var _hardware_back_button_4a6b37fb_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(
      /*! ./hardware-back-button-4a6b37fb.js */
      "B4Jq");

      var setupConfig = function setupConfig(config) {
        var win = window;
        var Ionic = win.Ionic;

        if (Ionic && Ionic.config && Ionic.config.constructor.name !== 'Object') {
          return;
        }

        win.Ionic = win.Ionic || {};
        win.Ionic.config = Object.assign(Object.assign({}, win.Ionic.config), config);
        return win.Ionic.config;
      };

      var getMode = function getMode() {
        var win = window;
        var config = win && win.Ionic && win.Ionic.config;

        if (config) {
          if (config.mode) {
            return config.mode;
          } else {
            return config.get('mode');
          }
        }

        return 'md';
      };
      /**
       * This is a plugin for Swiper that allows it to work
       * with Ionic Framework and the routing integrations.
       * Without this plugin, Swiper would be incapable of correctly
       * determining the dimensions of the slides component as
       * each view is initially hidden before transitioning in.
       */


      var setupSwiperInIonic = function setupSwiperInIonic(swiper) {
        var watchForIonPageChanges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;

        if (typeof window === 'undefined') {
          return;
        }

        var swiperEl = swiper.el;
        var ionPage = swiperEl.closest('.ion-page');

        if (!ionPage) {
          if (watchForIonPageChanges) {
            /**
             * If no ion page found, it is possible
             * that we are in the overlay setup step
             * where the inner component has been
             * created but not attached to the DOM yet.
             * If so, wait for the .ion-page class to
             * appear on the root div and re-run setup.
             */
            var rootNode = swiperEl.getRootNode();

            if (rootNode.tagName === 'DIV') {
              var mo = new MutationObserver(function (m) {
                var mutation = m[0];
                var wasEmpty = mutation.oldValue === null;
                var hasIonPage = rootNode.classList.contains('ion-page');
                /**
                 * Now that we have an .ion-page class
                 * we can safely attempt setup again.
                 */

                if (wasEmpty && hasIonPage) {
                  mo.disconnect();
                  /**
                   * Set false here so we do not
                   * get infinite loops
                   */

                  setupSwiperInIonic(swiper, false);
                }
              });
              mo.observe(rootNode, {
                attributeFilter: ['class'],
                attributeOldValue: true
              });
            }
          }

          return;
        }
        /**
         * If using slides in a modal or
         * popover we need to wait for the
         * overlay to be shown as these components
         * are hidden when they are initially created.
         */


        var modalOrPopover = swiperEl.closest('ion-modal, ion-popover');

        if (modalOrPopover) {
          var eventName = modalOrPopover.tagName === 'ION-MODAL' ? 'ionModalWillPresent' : 'ionPopoverWillPresent';

          var overlayCallback = function overlayCallback() {
            /**
             * We need an raf here so the update
             * is fired one tick after the overlay is shown.
             */
            Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_6__["r"])(function () {
              swiperEl.swiper.update();
              Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_6__["b"])(modalOrPopover, eventName, overlayCallback);
            });
          };

          Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_6__["a"])(modalOrPopover, eventName, overlayCallback);
        } else {
          /**
           * If using slides in a page
           * we need to wait for the ion-page-invisible
           * class to be removed so Swiper can correctly
           * compute the dimensions of the slides.
           */
          var _mo = new MutationObserver(function (m) {
            var _a;

            var mutation = m[0];
            var wasPageHidden = (_a = mutation.oldValue) === null || _a === void 0 ? void 0 : _a.includes('ion-page-invisible');
            var isPageHidden = ionPage.classList.contains('ion-page-invisible');
            /**
             * Only update Swiper if the page was
             * hidden but is no longer hidden.
             */

            if (!isPageHidden && isPageHidden !== wasPageHidden) {
              swiperEl.swiper.update();
            }
          });

          _mo.observe(ionPage, {
            attributeFilter: ['class'],
            attributeOldValue: true
          });
        }
        /**
         * We also need to listen for the appload event
         * which is emitted by Stencil in the
         * event that Swiper is being used on the
         * view that is rendered initially.
         */


        var onAppLoad = function onAppLoad() {
          swiperEl.swiper.update();
          Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_6__["b"])(window, 'appload', onAppLoad);
        };

        Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_6__["a"])(window, 'appload', onAppLoad);
      };

      var IonicSwiper = {
        name: 'ionic',
        on: {
          afterInit: function afterInit(swiper) {
            console.warn('[Deprecation Warning]: The IonicSwiper module has been deprecated in favor of the IonSlides module. This change was made to better support the Swiper 7 release. The IonicSwiper module will be removed in Ionic 7.0. See https://ionicframework.com/docs/api/slides#migration for revised migration steps.');
            setupSwiperInIonic(swiper);
          }
        }
      };

      var IonicSlides = function IonicSlides(opts) {
        var swiper = opts.swiper,
            extendParams = opts.extendParams;
        var slidesParams = {
          effect: undefined,
          direction: 'horizontal',
          initialSlide: 0,
          loop: false,
          parallax: false,
          slidesPerView: 1,
          spaceBetween: 0,
          speed: 300,
          slidesPerColumn: 1,
          slidesPerColumnFill: 'column',
          slidesPerGroup: 1,
          centeredSlides: false,
          slidesOffsetBefore: 0,
          slidesOffsetAfter: 0,
          touchEventsTarget: 'container',
          autoplay: false,
          freeMode: false,
          freeModeMomentum: true,
          freeModeMomentumRatio: 1,
          freeModeMomentumBounce: true,
          freeModeMomentumBounceRatio: 1,
          freeModeMomentumVelocityRatio: 1,
          freeModeSticky: false,
          freeModeMinimumVelocity: 0.02,
          autoHeight: false,
          setWrapperSize: false,
          zoom: {
            maxRatio: 3,
            minRatio: 1,
            toggle: false
          },
          touchRatio: 1,
          touchAngle: 45,
          simulateTouch: true,
          touchStartPreventDefault: false,
          shortSwipes: true,
          longSwipes: true,
          longSwipesRatio: 0.5,
          longSwipesMs: 300,
          followFinger: true,
          threshold: 0,
          touchMoveStopPropagation: true,
          touchReleaseOnEdges: false,
          iOSEdgeSwipeDetection: false,
          iOSEdgeSwipeThreshold: 20,
          resistance: true,
          resistanceRatio: 0.85,
          watchSlidesProgress: false,
          watchSlidesVisibility: false,
          preventClicks: true,
          preventClicksPropagation: true,
          slideToClickedSlide: false,
          loopAdditionalSlides: 0,
          noSwiping: true,
          runCallbacksOnInit: true,
          coverflowEffect: {
            rotate: 50,
            stretch: 0,
            depth: 100,
            modifier: 1,
            slideShadows: true
          },
          flipEffect: {
            slideShadows: true,
            limitRotation: true
          },
          cubeEffect: {
            slideShadows: true,
            shadow: true,
            shadowOffset: 20,
            shadowScale: 0.94
          },
          fadeEffect: {
            crossFade: false
          },
          a11y: {
            prevSlideMessage: 'Previous slide',
            nextSlideMessage: 'Next slide',
            firstSlideMessage: 'This is the first slide',
            lastSlideMessage: 'This is the last slide'
          }
        };

        if (swiper.pagination) {
          slidesParams.pagination = {
            type: 'bullets',
            clickable: false,
            hideOnClick: false
          };
        }

        if (swiper.scrollbar) {
          slidesParams.scrollbar = {
            hide: true
          };
        }

        extendParams(slidesParams);
      };
      /***/

    },

    /***/
    "1G5W":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/takeUntil.js ***!
      \********************************************************************/

    /*! exports provided: takeUntil */

    /***/
    function G5W(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "takeUntil", function () {
        return takeUntil;
      });
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function takeUntil(notifier) {
        return function (source) {
          return source.lift(new TakeUntilOperator(notifier));
        };
      }

      var TakeUntilOperator = /*#__PURE__*/function () {
        function TakeUntilOperator(notifier) {
          _classCallCheck(this, TakeUntilOperator);

          this.notifier = notifier;
        }

        _createClass2(TakeUntilOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);
            var notifierSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(this.notifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](takeUntilSubscriber));

            if (notifierSubscription && !takeUntilSubscriber.seenValue) {
              takeUntilSubscriber.add(notifierSubscription);
              return source.subscribe(takeUntilSubscriber);
            }

            return takeUntilSubscriber;
          }
        }]);

        return TakeUntilOperator;
      }();

      var TakeUntilSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP2) {
        _inherits(TakeUntilSubscriber, _innerSubscribe__WEBP2);

        var _super5 = _createSuper(TakeUntilSubscriber);

        function TakeUntilSubscriber(destination) {
          var _this5;

          _classCallCheck(this, TakeUntilSubscriber);

          _this5 = _super5.call(this, destination);
          _this5.seenValue = false;
          return _this5;
        }

        _createClass2(TakeUntilSubscriber, [{
          key: "notifyNext",
          value: function notifyNext() {
            this.seenValue = true;
            this.complete();
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {}
        }]);

        return TakeUntilSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"]); //# sourceMappingURL=takeUntil.js.map

      /***/

    },

    /***/
    "1Wj6":
    /*!****************************************************!*\
      !*** ./node_modules/@sentry/types/esm/severity.js ***!
      \****************************************************/

    /*! exports provided: Severity */

    /***/
    function Wj6(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Severity", function () {
        return Severity;
      });
      /** JSDoc */
      // eslint-disable-next-line import/export


      var Severity;

      (function (Severity) {
        /** JSDoc */
        Severity["Fatal"] = "fatal";
        /** JSDoc */

        Severity["Error"] = "error";
        /** JSDoc */

        Severity["Warning"] = "warning";
        /** JSDoc */

        Severity["Log"] = "log";
        /** JSDoc */

        Severity["Info"] = "info";
        /** JSDoc */

        Severity["Debug"] = "debug";
        /** JSDoc */

        Severity["Critical"] = "critical";
      })(Severity || (Severity = {})); // eslint-disable-next-line @typescript-eslint/no-namespace, import/export


      (function (Severity) {
        /**
         * Converts a string-based level into a {@link Severity}.
         *
         * @param level string representation of Severity
         * @returns Severity
         */
        function fromString(level) {
          switch (level) {
            case 'debug':
              return Severity.Debug;

            case 'info':
              return Severity.Info;

            case 'warn':
            case 'warning':
              return Severity.Warning;

            case 'error':
              return Severity.Error;

            case 'fatal':
              return Severity.Fatal;

            case 'critical':
              return Severity.Critical;

            case 'log':
            default:
              return Severity.Log;
          }
        }

        Severity.fromString = fromString;
      })(Severity || (Severity = {})); //# sourceMappingURL=severity.js.map

      /***/

    },

    /***/
    "1Ykd":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/sampleTime.js ***!
      \*********************************************************************/

    /*! exports provided: sampleTime */

    /***/
    function Ykd(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "sampleTime", function () {
        return sampleTime;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../scheduler/async */
      "D0XW");

      function sampleTime(period) {
        var scheduler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
        return function (source) {
          return source.lift(new SampleTimeOperator(period, scheduler));
        };
      }

      var SampleTimeOperator = /*#__PURE__*/function () {
        function SampleTimeOperator(period, scheduler) {
          _classCallCheck(this, SampleTimeOperator);

          this.period = period;
          this.scheduler = scheduler;
        }

        _createClass2(SampleTimeOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));
          }
        }]);

        return SampleTimeOperator;
      }();

      var SampleTimeSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_3) {
        _inherits(SampleTimeSubscriber, _Subscriber__WEBPACK_3);

        var _super6 = _createSuper(SampleTimeSubscriber);

        function SampleTimeSubscriber(destination, period, scheduler) {
          var _this6;

          _classCallCheck(this, SampleTimeSubscriber);

          _this6 = _super6.call(this, destination);
          _this6.period = period;
          _this6.scheduler = scheduler;
          _this6.hasValue = false;

          _this6.add(scheduler.schedule(dispatchNotification, period, {
            subscriber: _assertThisInitialized(_this6),
            period: period
          }));

          return _this6;
        }

        _createClass2(SampleTimeSubscriber, [{
          key: "_next",
          value: function _next(value) {
            this.lastValue = value;
            this.hasValue = true;
          }
        }, {
          key: "notifyNext",
          value: function notifyNext() {
            if (this.hasValue) {
              this.hasValue = false;
              this.destination.next(this.lastValue);
            }
          }
        }]);

        return SampleTimeSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]);

      function dispatchNotification(state) {
        var subscriber = state.subscriber,
            period = state.period;
        subscriber.notifyNext();
        this.schedule(state, period);
      } //# sourceMappingURL=sampleTime.js.map

      /***/

    },

    /***/
    "1uSB":
    /*!*************************************************************!*\
      !*** ./node_modules/@angular/compiler/fesm2015/compiler.js ***!
      \*************************************************************/

    /*! exports provided: AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, AotCompiler, AotSummaryResolver, ArrayType, AssertNotNull, AstMemoryEfficientTransformer, AstPath, AstTransformer, AttrAst, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BoundDirectivePropertyAst, BoundElementProperty, BoundElementPropertyAst, BoundEventAst, BoundTextAst, BuiltinMethod, BuiltinType, BuiltinTypeName, BuiltinVar, CONTENT_ATTR, CUSTOM_ELEMENTS_SCHEMA, CastExpr, Chain, ClassField, ClassMethod, ClassStmt, CommaExpr, Comment, CompileDirectiveMetadata, CompileMetadataResolver, CompileNgModuleMetadata, CompilePipeMetadata, CompileReflector, CompileShallowModuleMetadata, CompileStylesheetMetadata, CompileSummaryKind, CompileTemplateMetadata, CompiledStylesheet, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DirectiveAst, DirectiveNormalizer, DirectiveResolver, DomElementSchemaRegistry, EOF, ERROR_COMPONENT_TYPE, Element, ElementAst, ElementSchemaRegistry, EmbeddedTemplateAst, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, Extractor, FunctionCall, FunctionExpr, GeneratedFile, HOST_ATTR, HtmlParser, HtmlTagDefinition, I18NHtmlParser, Identifiers, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation, InterpolationConfig, InvokeFunctionExpr, InvokeMethodExpr, IvyParser, JSDocComment, JitCompiler, JitEvaluator, JitSummaryResolver, KeyedRead, KeyedWrite, LeadingComment, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, MethodCall, NAMED_ENTITIES, NGSP_UNICODE, NONE_TYPE, NO_ERRORS_SCHEMA, NgContentAst, NgModuleCompiler, NgModuleResolver, NodeWithI18n, NonNullAssert, NotExpr, NullTemplateVisitor, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser, ParserError, PipeResolver, PrefixNot, PropertyRead, PropertyWrite, ProviderAst, ProviderAstType, ProviderMeta, Quote, R3BoundTarget, R3FactoryTarget, R3Identifiers, R3ResolvedDependencyType, R3TargetBinder, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveTemplateAstVisitor, RecursiveVisitor, ReferenceAst, ResolvedStaticSymbol, ResourceLoader, ReturnStatement, STRING_TYPE, SafeMethodCall, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StaticReflector, StaticSymbol, StaticSymbolCache, StaticSymbolResolver, StmtModifier, StyleCompiler, StylesCompileDependency, SummaryResolver, TagContentType, TemplateBindingParseResult, TemplateParseError, TemplateParseResult, TemplateParser, Text, TextAst, ThisReceiver, ThrowStmt, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstBoundText, TmplAstContent, TmplAstElement, TmplAstIcu, TmplAstRecursiveVisitor, TmplAstReference, TmplAstTemplate, TmplAstText, TmplAstTextAttribute, TmplAstVariable, Token, TokenType, TransitiveCompileNgModuleMetadata, TreeError, TryCatchStmt, Type, TypeScriptEmitter, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, UrlResolver, VERSION, VariableAst, VariableBinding, Version, ViewCompiler, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ParseAST, analyzeAndValidateNgModules, analyzeFile, analyzeFileForInjectables, analyzeNgModules, collectExternalReferences, compileComponentFromMetadata, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compilePipeFromMetadata, componentFactoryName, computeMsgId, core, createAotCompiler, createAotUrlResolver, createElementCssSelector, createLoweredSymbol, createOfflineCompileUrlResolver, createUrlResolverWithoutPackagePrefix, debugOutputAstAsTypeScript, findNode, flatten, formattedError, getHtmlTagDefinition, getNsPrefix, getParseErrors, getUrlScheme, hostViewClassName, identifierModuleUrl, identifierName, isEmptyExpression, isFormattedError, isIdentifier, isLoweredSymbol, isNgContainer, isNgContent, isNgTemplate, isQuote, isSyntaxError, jsDocComment, leadingComment, literalMap, makeBindingParser, mergeAnalyzedFiles, mergeNsAndName, ngModuleJitUrl, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, removeSummaryDuplicates, rendererTypeName, sanitizeIdentifier, sharedStylesheetJitUrl, splitClasses, splitNsName, syntaxError, templateJitUrl, templateSourceUrl, templateVisitAll, toTypeScript, tokenName, tokenReference, typeSourceSpan, unescapeIdentifier, unwrapResolvedMetadata, verifyHostBindings, viewClassName, visitAll */

    /***/
    function uSB(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      var _BoundPropertyMapping;

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AST", function () {
        return AST;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ASTWithName", function () {
        return ASTWithName;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ASTWithSource", function () {
        return ASTWithSource;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AbsoluteSourceSpan", function () {
        return AbsoluteSourceSpan;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AotCompiler", function () {
        return AotCompiler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AotSummaryResolver", function () {
        return AotSummaryResolver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ArrayType", function () {
        return ArrayType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AssertNotNull", function () {
        return AssertNotNull;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AstMemoryEfficientTransformer", function () {
        return AstMemoryEfficientTransformer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AstPath", function () {
        return AstPath;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AstTransformer", function () {
        return AstTransformer$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AttrAst", function () {
        return AttrAst;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Attribute", function () {
        return Attribute;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Binary", function () {
        return Binary;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BinaryOperator", function () {
        return BinaryOperator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BinaryOperatorExpr", function () {
        return BinaryOperatorExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BindingPipe", function () {
        return BindingPipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BoundDirectivePropertyAst", function () {
        return BoundDirectivePropertyAst;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BoundElementProperty", function () {
        return BoundElementProperty;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BoundElementPropertyAst", function () {
        return BoundElementPropertyAst;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BoundEventAst", function () {
        return BoundEventAst;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BoundTextAst", function () {
        return BoundTextAst;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BuiltinMethod", function () {
        return BuiltinMethod;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BuiltinType", function () {
        return BuiltinType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BuiltinTypeName", function () {
        return BuiltinTypeName;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BuiltinVar", function () {
        return BuiltinVar;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CONTENT_ATTR", function () {
        return CONTENT_ATTR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CUSTOM_ELEMENTS_SCHEMA", function () {
        return CUSTOM_ELEMENTS_SCHEMA;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CastExpr", function () {
        return CastExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Chain", function () {
        return Chain;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ClassField", function () {
        return ClassField;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ClassMethod", function () {
        return ClassMethod;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ClassStmt", function () {
        return ClassStmt;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CommaExpr", function () {
        return CommaExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Comment", function () {
        return Comment;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CompileDirectiveMetadata", function () {
        return CompileDirectiveMetadata;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CompileMetadataResolver", function () {
        return CompileMetadataResolver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CompileNgModuleMetadata", function () {
        return CompileNgModuleMetadata;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CompilePipeMetadata", function () {
        return CompilePipeMetadata;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CompileReflector", function () {
        return CompileReflector;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CompileShallowModuleMetadata", function () {
        return CompileShallowModuleMetadata;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CompileStylesheetMetadata", function () {
        return CompileStylesheetMetadata;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CompileSummaryKind", function () {
        return CompileSummaryKind;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CompileTemplateMetadata", function () {
        return CompileTemplateMetadata;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CompiledStylesheet", function () {
        return CompiledStylesheet;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CompilerConfig", function () {
        return CompilerConfig;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Conditional", function () {
        return Conditional;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ConditionalExpr", function () {
        return ConditionalExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ConstantPool", function () {
        return ConstantPool;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CssSelector", function () {
        return CssSelector;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DEFAULT_INTERPOLATION_CONFIG", function () {
        return DEFAULT_INTERPOLATION_CONFIG;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DYNAMIC_TYPE", function () {
        return DYNAMIC_TYPE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DeclareFunctionStmt", function () {
        return DeclareFunctionStmt;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DeclareVarStmt", function () {
        return DeclareVarStmt;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DirectiveAst", function () {
        return DirectiveAst;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DirectiveNormalizer", function () {
        return DirectiveNormalizer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DirectiveResolver", function () {
        return DirectiveResolver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DomElementSchemaRegistry", function () {
        return DomElementSchemaRegistry;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "EOF", function () {
        return EOF;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ERROR_COMPONENT_TYPE", function () {
        return ERROR_COMPONENT_TYPE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Element", function () {
        return Element$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ElementAst", function () {
        return ElementAst;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ElementSchemaRegistry", function () {
        return ElementSchemaRegistry;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "EmbeddedTemplateAst", function () {
        return EmbeddedTemplateAst;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "EmitterVisitorContext", function () {
        return EmitterVisitorContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "EmptyExpr", function () {
        return EmptyExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Expansion", function () {
        return Expansion;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ExpansionCase", function () {
        return ExpansionCase;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Expression", function () {
        return Expression;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ExpressionBinding", function () {
        return ExpressionBinding;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ExpressionStatement", function () {
        return ExpressionStatement;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ExpressionType", function () {
        return ExpressionType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ExternalExpr", function () {
        return ExternalExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ExternalReference", function () {
        return ExternalReference;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Extractor", function () {
        return Extractor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FunctionCall", function () {
        return FunctionCall;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FunctionExpr", function () {
        return FunctionExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "GeneratedFile", function () {
        return GeneratedFile;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HOST_ATTR", function () {
        return HOST_ATTR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HtmlParser", function () {
        return HtmlParser;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HtmlTagDefinition", function () {
        return HtmlTagDefinition;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "I18NHtmlParser", function () {
        return I18NHtmlParser;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Identifiers", function () {
        return Identifiers;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IfStmt", function () {
        return IfStmt;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ImplicitReceiver", function () {
        return ImplicitReceiver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "InstantiateExpr", function () {
        return InstantiateExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Interpolation", function () {
        return Interpolation;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "InterpolationConfig", function () {
        return InterpolationConfig;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "InvokeFunctionExpr", function () {
        return InvokeFunctionExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "InvokeMethodExpr", function () {
        return InvokeMethodExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IvyParser", function () {
        return IvyParser;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "JSDocComment", function () {
        return JSDocComment;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "JitCompiler", function () {
        return JitCompiler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "JitEvaluator", function () {
        return JitEvaluator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "JitSummaryResolver", function () {
        return JitSummaryResolver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "KeyedRead", function () {
        return KeyedRead;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "KeyedWrite", function () {
        return KeyedWrite;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LeadingComment", function () {
        return LeadingComment;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Lexer", function () {
        return Lexer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LiteralArray", function () {
        return LiteralArray;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LiteralArrayExpr", function () {
        return LiteralArrayExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LiteralExpr", function () {
        return LiteralExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LiteralMap", function () {
        return LiteralMap;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LiteralMapExpr", function () {
        return LiteralMapExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LiteralPrimitive", function () {
        return LiteralPrimitive;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LocalizedString", function () {
        return LocalizedString;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MapType", function () {
        return MapType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MessageBundle", function () {
        return MessageBundle;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MethodCall", function () {
        return MethodCall;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NAMED_ENTITIES", function () {
        return NAMED_ENTITIES;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NGSP_UNICODE", function () {
        return NGSP_UNICODE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NONE_TYPE", function () {
        return NONE_TYPE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NO_ERRORS_SCHEMA", function () {
        return NO_ERRORS_SCHEMA;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgContentAst", function () {
        return NgContentAst;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgModuleCompiler", function () {
        return NgModuleCompiler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgModuleResolver", function () {
        return NgModuleResolver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NodeWithI18n", function () {
        return NodeWithI18n;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NonNullAssert", function () {
        return NonNullAssert;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NotExpr", function () {
        return NotExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NullTemplateVisitor", function () {
        return NullTemplateVisitor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ParseError", function () {
        return ParseError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ParseErrorLevel", function () {
        return ParseErrorLevel;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ParseLocation", function () {
        return ParseLocation;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ParseSourceFile", function () {
        return ParseSourceFile;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ParseSourceSpan", function () {
        return ParseSourceSpan;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ParseSpan", function () {
        return ParseSpan;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ParseTreeResult", function () {
        return ParseTreeResult;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ParsedEvent", function () {
        return ParsedEvent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ParsedProperty", function () {
        return ParsedProperty;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ParsedPropertyType", function () {
        return ParsedPropertyType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ParsedVariable", function () {
        return ParsedVariable;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Parser", function () {
        return Parser$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ParserError", function () {
        return ParserError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PipeResolver", function () {
        return PipeResolver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PrefixNot", function () {
        return PrefixNot;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PropertyRead", function () {
        return PropertyRead;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PropertyWrite", function () {
        return PropertyWrite;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ProviderAst", function () {
        return ProviderAst;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ProviderAstType", function () {
        return ProviderAstType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ProviderMeta", function () {
        return ProviderMeta;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Quote", function () {
        return Quote;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "R3BoundTarget", function () {
        return R3BoundTarget;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "R3FactoryTarget", function () {
        return R3FactoryTarget;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "R3Identifiers", function () {
        return Identifiers$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "R3ResolvedDependencyType", function () {
        return R3ResolvedDependencyType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "R3TargetBinder", function () {
        return R3TargetBinder;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ReadKeyExpr", function () {
        return ReadKeyExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ReadPropExpr", function () {
        return ReadPropExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ReadVarExpr", function () {
        return ReadVarExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RecursiveAstVisitor", function () {
        return RecursiveAstVisitor$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RecursiveTemplateAstVisitor", function () {
        return RecursiveTemplateAstVisitor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RecursiveVisitor", function () {
        return RecursiveVisitor$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ReferenceAst", function () {
        return ReferenceAst;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ResolvedStaticSymbol", function () {
        return ResolvedStaticSymbol;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ResourceLoader", function () {
        return ResourceLoader;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ReturnStatement", function () {
        return ReturnStatement;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "STRING_TYPE", function () {
        return STRING_TYPE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SafeMethodCall", function () {
        return SafeMethodCall;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SafePropertyRead", function () {
        return SafePropertyRead;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SelectorContext", function () {
        return SelectorContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SelectorListContext", function () {
        return SelectorListContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SelectorMatcher", function () {
        return SelectorMatcher;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Serializer", function () {
        return Serializer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SplitInterpolation", function () {
        return SplitInterpolation;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Statement", function () {
        return Statement;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "StaticReflector", function () {
        return StaticReflector;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "StaticSymbol", function () {
        return StaticSymbol;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "StaticSymbolCache", function () {
        return StaticSymbolCache;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "StaticSymbolResolver", function () {
        return StaticSymbolResolver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "StmtModifier", function () {
        return StmtModifier;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "StyleCompiler", function () {
        return StyleCompiler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "StylesCompileDependency", function () {
        return StylesCompileDependency;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SummaryResolver", function () {
        return SummaryResolver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TagContentType", function () {
        return TagContentType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TemplateBindingParseResult", function () {
        return TemplateBindingParseResult;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TemplateParseError", function () {
        return TemplateParseError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TemplateParseResult", function () {
        return TemplateParseResult;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TemplateParser", function () {
        return TemplateParser;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Text", function () {
        return Text$3;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TextAst", function () {
        return TextAst;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ThisReceiver", function () {
        return ThisReceiver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ThrowStmt", function () {
        return ThrowStmt;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TmplAstBoundAttribute", function () {
        return BoundAttribute;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TmplAstBoundEvent", function () {
        return BoundEvent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TmplAstBoundText", function () {
        return BoundText;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TmplAstContent", function () {
        return Content;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TmplAstElement", function () {
        return Element;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TmplAstIcu", function () {
        return Icu;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TmplAstRecursiveVisitor", function () {
        return RecursiveVisitor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TmplAstReference", function () {
        return Reference;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TmplAstTemplate", function () {
        return Template;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TmplAstText", function () {
        return Text;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TmplAstTextAttribute", function () {
        return TextAttribute;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TmplAstVariable", function () {
        return Variable;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Token", function () {
        return Token$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TokenType", function () {
        return TokenType$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TransitiveCompileNgModuleMetadata", function () {
        return TransitiveCompileNgModuleMetadata;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TreeError", function () {
        return TreeError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TryCatchStmt", function () {
        return TryCatchStmt;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Type", function () {
        return Type$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TypeScriptEmitter", function () {
        return TypeScriptEmitter;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TypeofExpr", function () {
        return TypeofExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Unary", function () {
        return Unary;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "UnaryOperator", function () {
        return UnaryOperator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "UnaryOperatorExpr", function () {
        return UnaryOperatorExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "UrlResolver", function () {
        return UrlResolver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VERSION", function () {
        return VERSION$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VariableAst", function () {
        return VariableAst;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VariableBinding", function () {
        return VariableBinding;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Version", function () {
        return Version;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ViewCompiler", function () {
        return ViewCompiler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "WrappedNodeExpr", function () {
        return WrappedNodeExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "WriteKeyExpr", function () {
        return WriteKeyExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "WritePropExpr", function () {
        return WritePropExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "WriteVarExpr", function () {
        return WriteVarExpr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Xliff", function () {
        return Xliff;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Xliff2", function () {
        return Xliff2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Xmb", function () {
        return Xmb;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "XmlParser", function () {
        return XmlParser;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Xtb", function () {
        return Xtb;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "_ParseAST", function () {
        return _ParseAST;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "analyzeAndValidateNgModules", function () {
        return analyzeAndValidateNgModules;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "analyzeFile", function () {
        return analyzeFile;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "analyzeFileForInjectables", function () {
        return analyzeFileForInjectables;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "analyzeNgModules", function () {
        return analyzeNgModules;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "collectExternalReferences", function () {
        return collectExternalReferences;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "compileComponentFromMetadata", function () {
        return compileComponentFromMetadata;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "compileDirectiveFromMetadata", function () {
        return compileDirectiveFromMetadata;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "compileFactoryFunction", function () {
        return compileFactoryFunction;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "compileInjectable", function () {
        return _compileInjectable;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "compileInjector", function () {
        return _compileInjector;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "compileNgModule", function () {
        return _compileNgModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "compilePipeFromMetadata", function () {
        return compilePipeFromMetadata;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "componentFactoryName", function () {
        return componentFactoryName;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "computeMsgId", function () {
        return computeMsgId;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "core", function () {
        return core;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "createAotCompiler", function () {
        return createAotCompiler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "createAotUrlResolver", function () {
        return createAotUrlResolver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "createElementCssSelector", function () {
        return createElementCssSelector;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "createLoweredSymbol", function () {
        return createLoweredSymbol;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "createOfflineCompileUrlResolver", function () {
        return createOfflineCompileUrlResolver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "createUrlResolverWithoutPackagePrefix", function () {
        return createUrlResolverWithoutPackagePrefix;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "debugOutputAstAsTypeScript", function () {
        return debugOutputAstAsTypeScript;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "findNode", function () {
        return findNode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "flatten", function () {
        return flatten;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "formattedError", function () {
        return formattedError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getHtmlTagDefinition", function () {
        return getHtmlTagDefinition;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getNsPrefix", function () {
        return getNsPrefix;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getParseErrors", function () {
        return getParseErrors;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getUrlScheme", function () {
        return getUrlScheme;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "hostViewClassName", function () {
        return hostViewClassName;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "identifierModuleUrl", function () {
        return identifierModuleUrl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "identifierName", function () {
        return identifierName;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isEmptyExpression", function () {
        return isEmptyExpression;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isFormattedError", function () {
        return isFormattedError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isIdentifier", function () {
        return isIdentifier;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isLoweredSymbol", function () {
        return isLoweredSymbol;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isNgContainer", function () {
        return isNgContainer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isNgContent", function () {
        return isNgContent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isNgTemplate", function () {
        return isNgTemplate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isQuote", function () {
        return isQuote;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isSyntaxError", function () {
        return isSyntaxError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "jsDocComment", function () {
        return jsDocComment;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "leadingComment", function () {
        return leadingComment;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "literalMap", function () {
        return literalMap;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "makeBindingParser", function () {
        return makeBindingParser;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "mergeAnalyzedFiles", function () {
        return mergeAnalyzedFiles;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "mergeNsAndName", function () {
        return mergeNsAndName;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ngModuleJitUrl", function () {
        return ngModuleJitUrl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "parseHostBindings", function () {
        return parseHostBindings;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "parseTemplate", function () {
        return parseTemplate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "preserveWhitespacesDefault", function () {
        return preserveWhitespacesDefault;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "publishFacade", function () {
        return publishFacade;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "r3JitTypeSourceSpan", function () {
        return r3JitTypeSourceSpan;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "removeSummaryDuplicates", function () {
        return removeSummaryDuplicates;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "rendererTypeName", function () {
        return rendererTypeName;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "sanitizeIdentifier", function () {
        return sanitizeIdentifier;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "sharedStylesheetJitUrl", function () {
        return sharedStylesheetJitUrl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "splitClasses", function () {
        return splitClasses;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "splitNsName", function () {
        return splitNsName;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "syntaxError", function () {
        return syntaxError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "templateJitUrl", function () {
        return templateJitUrl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "templateSourceUrl", function () {
        return templateSourceUrl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "templateVisitAll", function () {
        return templateVisitAll;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "toTypeScript", function () {
        return toTypeScript;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "tokenName", function () {
        return tokenName;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "tokenReference", function () {
        return tokenReference;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "typeSourceSpan", function () {
        return typeSourceSpan;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "unescapeIdentifier", function () {
        return unescapeIdentifier;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "unwrapResolvedMetadata", function () {
        return unwrapResolvedMetadata;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "verifyHostBindings", function () {
        return verifyHostBindings;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "viewClassName", function () {
        return viewClassName;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "visitAll", function () {
        return visitAll$1;
      });
      /**
       * @license Angular v11.0.9
       * (c) 2010-2020 Google LLC. https://angular.io/
       * License: MIT
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var TagContentType;

      (function (TagContentType) {
        TagContentType[TagContentType["RAW_TEXT"] = 0] = "RAW_TEXT";
        TagContentType[TagContentType["ESCAPABLE_RAW_TEXT"] = 1] = "ESCAPABLE_RAW_TEXT";
        TagContentType[TagContentType["PARSABLE_DATA"] = 2] = "PARSABLE_DATA";
      })(TagContentType || (TagContentType = {}));

      function splitNsName(elementName) {
        if (elementName[0] != ':') {
          return [null, elementName];
        }

        var colonIndex = elementName.indexOf(':', 1);

        if (colonIndex == -1) {
          throw new Error("Unsupported format \"".concat(elementName, "\" expecting \":namespace:name\""));
        }

        return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
      } // `<ng-container>` tags work the same regardless the namespace


      function isNgContainer(tagName) {
        return splitNsName(tagName)[1] === 'ng-container';
      } // `<ng-content>` tags work the same regardless the namespace


      function isNgContent(tagName) {
        return splitNsName(tagName)[1] === 'ng-content';
      } // `<ng-template>` tags work the same regardless the namespace


      function isNgTemplate(tagName) {
        return splitNsName(tagName)[1] === 'ng-template';
      }

      function getNsPrefix(fullName) {
        return fullName === null ? null : splitNsName(fullName)[0];
      }

      function mergeNsAndName(prefix, localName) {
        return prefix ? ":".concat(prefix, ":").concat(localName) : localName;
      } // see https://www.w3.org/TR/html51/syntax.html#named-character-references
      // see https://html.spec.whatwg.org/multipage/entities.json
      // This list is not exhaustive to keep the compiler footprint low.
      // The `&#123;` / `&#x1ab;` syntax should be used when the named character reference does not
      // exist.


      var NAMED_ENTITIES = {
        'Aacute': "\xC1",
        'aacute': "\xE1",
        'Acirc': "\xC2",
        'acirc': "\xE2",
        'acute': "\xB4",
        'AElig': "\xC6",
        'aelig': "\xE6",
        'Agrave': "\xC0",
        'agrave': "\xE0",
        'alefsym': "\u2135",
        'Alpha': "\u0391",
        'alpha': "\u03B1",
        'amp': '&',
        'and': "\u2227",
        'ang': "\u2220",
        'apos': "'",
        'Aring': "\xC5",
        'aring': "\xE5",
        'asymp': "\u2248",
        'Atilde': "\xC3",
        'atilde': "\xE3",
        'Auml': "\xC4",
        'auml': "\xE4",
        'bdquo': "\u201E",
        'Beta': "\u0392",
        'beta': "\u03B2",
        'brvbar': "\xA6",
        'bull': "\u2022",
        'cap': "\u2229",
        'Ccedil': "\xC7",
        'ccedil': "\xE7",
        'cedil': "\xB8",
        'cent': "\xA2",
        'Chi': "\u03A7",
        'chi': "\u03C7",
        'circ': "\u02C6",
        'clubs': "\u2663",
        'cong': "\u2245",
        'copy': "\xA9",
        'crarr': "\u21B5",
        'cup': "\u222A",
        'curren': "\xA4",
        'dagger': "\u2020",
        'Dagger': "\u2021",
        'darr': "\u2193",
        'dArr': "\u21D3",
        'deg': "\xB0",
        'Delta': "\u0394",
        'delta': "\u03B4",
        'diams': "\u2666",
        'divide': "\xF7",
        'Eacute': "\xC9",
        'eacute': "\xE9",
        'Ecirc': "\xCA",
        'ecirc': "\xEA",
        'Egrave': "\xC8",
        'egrave': "\xE8",
        'empty': "\u2205",
        'emsp': "\u2003",
        'ensp': "\u2002",
        'Epsilon': "\u0395",
        'epsilon': "\u03B5",
        'equiv': "\u2261",
        'Eta': "\u0397",
        'eta': "\u03B7",
        'ETH': "\xD0",
        'eth': "\xF0",
        'Euml': "\xCB",
        'euml': "\xEB",
        'euro': "\u20AC",
        'exist': "\u2203",
        'fnof': "\u0192",
        'forall': "\u2200",
        'frac12': "\xBD",
        'frac14': "\xBC",
        'frac34': "\xBE",
        'frasl': "\u2044",
        'Gamma': "\u0393",
        'gamma': "\u03B3",
        'ge': "\u2265",
        'gt': '>',
        'harr': "\u2194",
        'hArr': "\u21D4",
        'hearts': "\u2665",
        'hellip': "\u2026",
        'Iacute': "\xCD",
        'iacute': "\xED",
        'Icirc': "\xCE",
        'icirc': "\xEE",
        'iexcl': "\xA1",
        'Igrave': "\xCC",
        'igrave': "\xEC",
        'image': "\u2111",
        'infin': "\u221E",
        'int': "\u222B",
        'Iota': "\u0399",
        'iota': "\u03B9",
        'iquest': "\xBF",
        'isin': "\u2208",
        'Iuml': "\xCF",
        'iuml': "\xEF",
        'Kappa': "\u039A",
        'kappa': "\u03BA",
        'Lambda': "\u039B",
        'lambda': "\u03BB",
        'lang': "\u27E8",
        'laquo': "\xAB",
        'larr': "\u2190",
        'lArr': "\u21D0",
        'lceil': "\u2308",
        'ldquo': "\u201C",
        'le': "\u2264",
        'lfloor': "\u230A",
        'lowast': "\u2217",
        'loz': "\u25CA",
        'lrm': "\u200E",
        'lsaquo': "\u2039",
        'lsquo': "\u2018",
        'lt': '<',
        'macr': "\xAF",
        'mdash': "\u2014",
        'micro': "\xB5",
        'middot': "\xB7",
        'minus': "\u2212",
        'Mu': "\u039C",
        'mu': "\u03BC",
        'nabla': "\u2207",
        'nbsp': "\xA0",
        'ndash': "\u2013",
        'ne': "\u2260",
        'ni': "\u220B",
        'not': "\xAC",
        'notin': "\u2209",
        'nsub': "\u2284",
        'Ntilde': "\xD1",
        'ntilde': "\xF1",
        'Nu': "\u039D",
        'nu': "\u03BD",
        'Oacute': "\xD3",
        'oacute': "\xF3",
        'Ocirc': "\xD4",
        'ocirc': "\xF4",
        'OElig': "\u0152",
        'oelig': "\u0153",
        'Ograve': "\xD2",
        'ograve': "\xF2",
        'oline': "\u203E",
        'Omega': "\u03A9",
        'omega': "\u03C9",
        'Omicron': "\u039F",
        'omicron': "\u03BF",
        'oplus': "\u2295",
        'or': "\u2228",
        'ordf': "\xAA",
        'ordm': "\xBA",
        'Oslash': "\xD8",
        'oslash': "\xF8",
        'Otilde': "\xD5",
        'otilde': "\xF5",
        'otimes': "\u2297",
        'Ouml': "\xD6",
        'ouml': "\xF6",
        'para': "\xB6",
        'permil': "\u2030",
        'perp': "\u22A5",
        'Phi': "\u03A6",
        'phi': "\u03C6",
        'Pi': "\u03A0",
        'pi': "\u03C0",
        'piv': "\u03D6",
        'plusmn': "\xB1",
        'pound': "\xA3",
        'prime': "\u2032",
        'Prime': "\u2033",
        'prod': "\u220F",
        'prop': "\u221D",
        'Psi': "\u03A8",
        'psi': "\u03C8",
        'quot': "\"",
        'radic': "\u221A",
        'rang': "\u27E9",
        'raquo': "\xBB",
        'rarr': "\u2192",
        'rArr': "\u21D2",
        'rceil': "\u2309",
        'rdquo': "\u201D",
        'real': "\u211C",
        'reg': "\xAE",
        'rfloor': "\u230B",
        'Rho': "\u03A1",
        'rho': "\u03C1",
        'rlm': "\u200F",
        'rsaquo': "\u203A",
        'rsquo': "\u2019",
        'sbquo': "\u201A",
        'Scaron': "\u0160",
        'scaron': "\u0161",
        'sdot': "\u22C5",
        'sect': "\xA7",
        'shy': "\xAD",
        'Sigma': "\u03A3",
        'sigma': "\u03C3",
        'sigmaf': "\u03C2",
        'sim': "\u223C",
        'spades': "\u2660",
        'sub': "\u2282",
        'sube': "\u2286",
        'sum': "\u2211",
        'sup': "\u2283",
        'sup1': "\xB9",
        'sup2': "\xB2",
        'sup3': "\xB3",
        'supe': "\u2287",
        'szlig': "\xDF",
        'Tau': "\u03A4",
        'tau': "\u03C4",
        'there4': "\u2234",
        'Theta': "\u0398",
        'theta': "\u03B8",
        'thetasym': "\u03D1",
        'thinsp': "\u2009",
        'THORN': "\xDE",
        'thorn': "\xFE",
        'tilde': "\u02DC",
        'times': "\xD7",
        'trade': "\u2122",
        'Uacute': "\xDA",
        'uacute': "\xFA",
        'uarr': "\u2191",
        'uArr': "\u21D1",
        'Ucirc': "\xDB",
        'ucirc': "\xFB",
        'Ugrave': "\xD9",
        'ugrave': "\xF9",
        'uml': "\xA8",
        'upsih': "\u03D2",
        'Upsilon': "\u03A5",
        'upsilon': "\u03C5",
        'Uuml': "\xDC",
        'uuml': "\xFC",
        'weierp': "\u2118",
        'Xi': "\u039E",
        'xi': "\u03BE",
        'Yacute': "\xDD",
        'yacute': "\xFD",
        'yen': "\xA5",
        'yuml': "\xFF",
        'Yuml': "\u0178",
        'Zeta': "\u0396",
        'zeta': "\u03B6",
        'zwj': "\u200D",
        'zwnj': "\u200C"
      }; // The &ngsp; pseudo-entity is denoting a space. see:
      // https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart

      var NGSP_UNICODE = "\uE500";
      NAMED_ENTITIES['ngsp'] = NGSP_UNICODE;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var HtmlTagDefinition = /*#__PURE__*/function () {
        function HtmlTagDefinition() {
          var _this7 = this;

          var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
              closedByChildren = _ref2.closedByChildren,
              implicitNamespacePrefix = _ref2.implicitNamespacePrefix,
              _ref2$contentType = _ref2.contentType,
              contentType = _ref2$contentType === void 0 ? TagContentType.PARSABLE_DATA : _ref2$contentType,
              _ref2$closedByParent = _ref2.closedByParent,
              closedByParent = _ref2$closedByParent === void 0 ? false : _ref2$closedByParent,
              _ref2$isVoid = _ref2.isVoid,
              isVoid = _ref2$isVoid === void 0 ? false : _ref2$isVoid,
              _ref2$ignoreFirstLf = _ref2.ignoreFirstLf,
              ignoreFirstLf = _ref2$ignoreFirstLf === void 0 ? false : _ref2$ignoreFirstLf,
              _ref2$preventNamespac = _ref2.preventNamespaceInheritance,
              preventNamespaceInheritance = _ref2$preventNamespac === void 0 ? false : _ref2$preventNamespac;

          _classCallCheck(this, HtmlTagDefinition);

          this.closedByChildren = {};
          this.closedByParent = false;
          this.canSelfClose = false;

          if (closedByChildren && closedByChildren.length > 0) {
            closedByChildren.forEach(function (tagName) {
              return _this7.closedByChildren[tagName] = true;
            });
          }

          this.isVoid = isVoid;
          this.closedByParent = closedByParent || isVoid;
          this.implicitNamespacePrefix = implicitNamespacePrefix || null;
          this.contentType = contentType;
          this.ignoreFirstLf = ignoreFirstLf;
          this.preventNamespaceInheritance = preventNamespaceInheritance;
        }

        _createClass2(HtmlTagDefinition, [{
          key: "isClosedByChild",
          value: function isClosedByChild(name) {
            return this.isVoid || name.toLowerCase() in this.closedByChildren;
          }
        }, {
          key: "getContentType",
          value: function getContentType(prefix) {
            if (typeof this.contentType === 'object') {
              var overrideType = prefix == null ? undefined : this.contentType[prefix];
              return overrideType !== null && overrideType !== void 0 ? overrideType : this.contentType["default"];
            }

            return this.contentType;
          }
        }]);

        return HtmlTagDefinition;
      }();

      var _DEFAULT_TAG_DEFINITION; // see https://www.w3.org/TR/html51/syntax.html#optional-tags
      // This implementation does not fully conform to the HTML5 spec.


      var TAG_DEFINITIONS;

      function getHtmlTagDefinition(tagName) {
        var _a, _b;

        if (!TAG_DEFINITIONS) {
          _DEFAULT_TAG_DEFINITION = new HtmlTagDefinition();
          TAG_DEFINITIONS = {
            'base': new HtmlTagDefinition({
              isVoid: true
            }),
            'meta': new HtmlTagDefinition({
              isVoid: true
            }),
            'area': new HtmlTagDefinition({
              isVoid: true
            }),
            'embed': new HtmlTagDefinition({
              isVoid: true
            }),
            'link': new HtmlTagDefinition({
              isVoid: true
            }),
            'img': new HtmlTagDefinition({
              isVoid: true
            }),
            'input': new HtmlTagDefinition({
              isVoid: true
            }),
            'param': new HtmlTagDefinition({
              isVoid: true
            }),
            'hr': new HtmlTagDefinition({
              isVoid: true
            }),
            'br': new HtmlTagDefinition({
              isVoid: true
            }),
            'source': new HtmlTagDefinition({
              isVoid: true
            }),
            'track': new HtmlTagDefinition({
              isVoid: true
            }),
            'wbr': new HtmlTagDefinition({
              isVoid: true
            }),
            'p': new HtmlTagDefinition({
              closedByChildren: ['address', 'article', 'aside', 'blockquote', 'div', 'dl', 'fieldset', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'main', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul'],
              closedByParent: true
            }),
            'thead': new HtmlTagDefinition({
              closedByChildren: ['tbody', 'tfoot']
            }),
            'tbody': new HtmlTagDefinition({
              closedByChildren: ['tbody', 'tfoot'],
              closedByParent: true
            }),
            'tfoot': new HtmlTagDefinition({
              closedByChildren: ['tbody'],
              closedByParent: true
            }),
            'tr': new HtmlTagDefinition({
              closedByChildren: ['tr'],
              closedByParent: true
            }),
            'td': new HtmlTagDefinition({
              closedByChildren: ['td', 'th'],
              closedByParent: true
            }),
            'th': new HtmlTagDefinition({
              closedByChildren: ['td', 'th'],
              closedByParent: true
            }),
            'col': new HtmlTagDefinition({
              isVoid: true
            }),
            'svg': new HtmlTagDefinition({
              implicitNamespacePrefix: 'svg'
            }),
            'foreignObject': new HtmlTagDefinition({
              // Usually the implicit namespace here would be redundant since it will be inherited from
              // the parent `svg`, but we have to do it for `foreignObject`, because the way the parser
              // works is that the parent node of an end tag is its own start tag which means that
              // the `preventNamespaceInheritance` on `foreignObject` would have it default to the
              // implicit namespace which is `html`, unless specified otherwise.
              implicitNamespacePrefix: 'svg',
              // We want to prevent children of foreignObject from inheriting its namespace, because
              // the point of the element is to allow nodes from other namespaces to be inserted.
              preventNamespaceInheritance: true
            }),
            'math': new HtmlTagDefinition({
              implicitNamespacePrefix: 'math'
            }),
            'li': new HtmlTagDefinition({
              closedByChildren: ['li'],
              closedByParent: true
            }),
            'dt': new HtmlTagDefinition({
              closedByChildren: ['dt', 'dd']
            }),
            'dd': new HtmlTagDefinition({
              closedByChildren: ['dt', 'dd'],
              closedByParent: true
            }),
            'rb': new HtmlTagDefinition({
              closedByChildren: ['rb', 'rt', 'rtc', 'rp'],
              closedByParent: true
            }),
            'rt': new HtmlTagDefinition({
              closedByChildren: ['rb', 'rt', 'rtc', 'rp'],
              closedByParent: true
            }),
            'rtc': new HtmlTagDefinition({
              closedByChildren: ['rb', 'rtc', 'rp'],
              closedByParent: true
            }),
            'rp': new HtmlTagDefinition({
              closedByChildren: ['rb', 'rt', 'rtc', 'rp'],
              closedByParent: true
            }),
            'optgroup': new HtmlTagDefinition({
              closedByChildren: ['optgroup'],
              closedByParent: true
            }),
            'option': new HtmlTagDefinition({
              closedByChildren: ['option', 'optgroup'],
              closedByParent: true
            }),
            'pre': new HtmlTagDefinition({
              ignoreFirstLf: true
            }),
            'listing': new HtmlTagDefinition({
              ignoreFirstLf: true
            }),
            'style': new HtmlTagDefinition({
              contentType: TagContentType.RAW_TEXT
            }),
            'script': new HtmlTagDefinition({
              contentType: TagContentType.RAW_TEXT
            }),
            'title': new HtmlTagDefinition({
              // The browser supports two separate `title` tags which have to use
              // a different content type: `HTMLTitleElement` and `SVGTitleElement`
              contentType: {
                "default": TagContentType.ESCAPABLE_RAW_TEXT,
                svg: TagContentType.PARSABLE_DATA
              }
            }),
            'textarea': new HtmlTagDefinition({
              contentType: TagContentType.ESCAPABLE_RAW_TEXT,
              ignoreFirstLf: true
            })
          };
        } // We have to make both a case-sensitive and a case-insesitive lookup, because
        // HTML tag names are case insensitive, whereas some SVG tags are case sensitive.


        return (_b = (_a = TAG_DEFINITIONS[tagName]) !== null && _a !== void 0 ? _a : TAG_DEFINITIONS[tagName.toLowerCase()]) !== null && _b !== void 0 ? _b : _DEFAULT_TAG_DEFINITION;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _SELECTOR_REGEXP = new RegExp('(\\:not\\()|' + // 1: ":not("
      '(([\\.\\#]?)[-\\w]+)|' + // 2: "tag"; 3: "."/"#";
      // "-" should appear first in the regexp below as FF31 parses "[.-\w]" as a range
      // 4: attribute; 5: attribute_string; 6: attribute_value
      '(?:\\[([-.\\w*]+)(?:=([\"\']?)([^\\]\"\']*)\\5)?\\])|' + // "[name]", "[name=value]",
      // "[name="value"]",
      // "[name='value']"
      '(\\))|' + // 7: ")"
      '(\\s*,\\s*)', // 8: ","
      'g');
      /**
       * A css selector contains an element name,
       * css classes and attribute/value pairs with the purpose
       * of selecting subsets out of them.
       */


      var CssSelector = /*#__PURE__*/function () {
        function CssSelector() {
          _classCallCheck(this, CssSelector);

          this.element = null;
          this.classNames = [];
          /**
           * The selectors are encoded in pairs where:
           * - even locations are attribute names
           * - odd locations are attribute values.
           *
           * Example:
           * Selector: `[key1=value1][key2]` would parse to:
           * ```
           * ['key1', 'value1', 'key2', '']
           * ```
           */

          this.attrs = [];
          this.notSelectors = [];
        }

        _createClass2(CssSelector, [{
          key: "isElementSelector",
          value: function isElementSelector() {
            return this.hasElementSelector() && this.classNames.length == 0 && this.attrs.length == 0 && this.notSelectors.length === 0;
          }
        }, {
          key: "hasElementSelector",
          value: function hasElementSelector() {
            return !!this.element;
          }
        }, {
          key: "setElement",
          value: function setElement() {
            var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
            this.element = element;
          }
          /** Gets a template string for an element that matches the selector. */

        }, {
          key: "getMatchingElementTemplate",
          value: function getMatchingElementTemplate() {
            var tagName = this.element || 'div';
            var classAttr = this.classNames.length > 0 ? " class=\"".concat(this.classNames.join(' '), "\"") : '';
            var attrs = '';

            for (var i = 0; i < this.attrs.length; i += 2) {
              var attrName = this.attrs[i];
              var attrValue = this.attrs[i + 1] !== '' ? "=\"".concat(this.attrs[i + 1], "\"") : '';
              attrs += " ".concat(attrName).concat(attrValue);
            }

            return getHtmlTagDefinition(tagName).isVoid ? "<".concat(tagName).concat(classAttr).concat(attrs, "/>") : "<".concat(tagName).concat(classAttr).concat(attrs, "></").concat(tagName, ">");
          }
        }, {
          key: "getAttrs",
          value: function getAttrs() {
            var result = [];

            if (this.classNames.length > 0) {
              result.push('class', this.classNames.join(' '));
            }

            return result.concat(this.attrs);
          }
        }, {
          key: "addAttribute",
          value: function addAttribute(name) {
            var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
            this.attrs.push(name, value && value.toLowerCase() || '');
          }
        }, {
          key: "addClassName",
          value: function addClassName(name) {
            this.classNames.push(name.toLowerCase());
          }
        }, {
          key: "toString",
          value: function toString() {
            var res = this.element || '';

            if (this.classNames) {
              this.classNames.forEach(function (klass) {
                return res += ".".concat(klass);
              });
            }

            if (this.attrs) {
              for (var i = 0; i < this.attrs.length; i += 2) {
                var name = this.attrs[i];
                var value = this.attrs[i + 1];
                res += "[".concat(name).concat(value ? '=' + value : '', "]");
              }
            }

            this.notSelectors.forEach(function (notSelector) {
              return res += ":not(".concat(notSelector, ")");
            });
            return res;
          }
        }], [{
          key: "parse",
          value: function parse(selector) {
            var results = [];

            var _addResult = function _addResult(res, cssSel) {
              if (cssSel.notSelectors.length > 0 && !cssSel.element && cssSel.classNames.length == 0 && cssSel.attrs.length == 0) {
                cssSel.element = '*';
              }

              res.push(cssSel);
            };

            var cssSelector = new CssSelector();
            var match;
            var current = cssSelector;
            var inNot = false;
            _SELECTOR_REGEXP.lastIndex = 0;

            while (match = _SELECTOR_REGEXP.exec(selector)) {
              if (match[1
              /* NOT */
              ]) {
                if (inNot) {
                  throw new Error('Nesting :not in a selector is not allowed');
                }

                inNot = true;
                current = new CssSelector();
                cssSelector.notSelectors.push(current);
              }

              var tag = match[2
              /* TAG */
              ];

              if (tag) {
                var prefix = match[3
                /* PREFIX */
                ];

                if (prefix === '#') {
                  // #hash
                  current.addAttribute('id', tag.substr(1));
                } else if (prefix === '.') {
                  // Class
                  current.addClassName(tag.substr(1));
                } else {
                  // Element
                  current.setElement(tag);
                }
              }

              var attribute = match[4
              /* ATTRIBUTE */
              ];

              if (attribute) {
                current.addAttribute(attribute, match[6
                /* ATTRIBUTE_VALUE */
                ]);
              }

              if (match[7
              /* NOT_END */
              ]) {
                inNot = false;
                current = cssSelector;
              }

              if (match[8
              /* SEPARATOR */
              ]) {
                if (inNot) {
                  throw new Error('Multiple selectors in :not are not supported');
                }

                _addResult(results, cssSelector);

                cssSelector = current = new CssSelector();
              }
            }

            _addResult(results, cssSelector);

            return results;
          }
        }]);

        return CssSelector;
      }();
      /**
       * Reads a list of CssSelectors and allows to calculate which ones
       * are contained in a given CssSelector.
       */


      var SelectorMatcher = /*#__PURE__*/function () {
        function SelectorMatcher() {
          _classCallCheck(this, SelectorMatcher);

          this._elementMap = new Map();
          this._elementPartialMap = new Map();
          this._classMap = new Map();
          this._classPartialMap = new Map();
          this._attrValueMap = new Map();
          this._attrValuePartialMap = new Map();
          this._listContexts = [];
        }

        _createClass2(SelectorMatcher, [{
          key: "addSelectables",
          value: function addSelectables(cssSelectors, callbackCtxt) {
            var listContext = null;

            if (cssSelectors.length > 1) {
              listContext = new SelectorListContext(cssSelectors);

              this._listContexts.push(listContext);
            }

            for (var i = 0; i < cssSelectors.length; i++) {
              this._addSelectable(cssSelectors[i], callbackCtxt, listContext);
            }
          }
          /**
           * Add an object that can be found later on by calling `match`.
           * @param cssSelector A css selector
           * @param callbackCtxt An opaque object that will be given to the callback of the `match` function
           */

        }, {
          key: "_addSelectable",
          value: function _addSelectable(cssSelector, callbackCtxt, listContext) {
            var matcher = this;
            var element = cssSelector.element;
            var classNames = cssSelector.classNames;
            var attrs = cssSelector.attrs;
            var selectable = new SelectorContext(cssSelector, callbackCtxt, listContext);

            if (element) {
              var isTerminal = attrs.length === 0 && classNames.length === 0;

              if (isTerminal) {
                this._addTerminal(matcher._elementMap, element, selectable);
              } else {
                matcher = this._addPartial(matcher._elementPartialMap, element);
              }
            }

            if (classNames) {
              for (var i = 0; i < classNames.length; i++) {
                var _isTerminal = attrs.length === 0 && i === classNames.length - 1;

                var className = classNames[i];

                if (_isTerminal) {
                  this._addTerminal(matcher._classMap, className, selectable);
                } else {
                  matcher = this._addPartial(matcher._classPartialMap, className);
                }
              }
            }

            if (attrs) {
              for (var _i2 = 0; _i2 < attrs.length; _i2 += 2) {
                var _isTerminal2 = _i2 === attrs.length - 2;

                var name = attrs[_i2];
                var value = attrs[_i2 + 1];

                if (_isTerminal2) {
                  var terminalMap = matcher._attrValueMap;
                  var terminalValuesMap = terminalMap.get(name);

                  if (!terminalValuesMap) {
                    terminalValuesMap = new Map();
                    terminalMap.set(name, terminalValuesMap);
                  }

                  this._addTerminal(terminalValuesMap, value, selectable);
                } else {
                  var partialMap = matcher._attrValuePartialMap;
                  var partialValuesMap = partialMap.get(name);

                  if (!partialValuesMap) {
                    partialValuesMap = new Map();
                    partialMap.set(name, partialValuesMap);
                  }

                  matcher = this._addPartial(partialValuesMap, value);
                }
              }
            }
          }
        }, {
          key: "_addTerminal",
          value: function _addTerminal(map, name, selectable) {
            var terminalList = map.get(name);

            if (!terminalList) {
              terminalList = [];
              map.set(name, terminalList);
            }

            terminalList.push(selectable);
          }
        }, {
          key: "_addPartial",
          value: function _addPartial(map, name) {
            var matcher = map.get(name);

            if (!matcher) {
              matcher = new SelectorMatcher();
              map.set(name, matcher);
            }

            return matcher;
          }
          /**
           * Find the objects that have been added via `addSelectable`
           * whose css selector is contained in the given css selector.
           * @param cssSelector A css selector
           * @param matchedCallback This callback will be called with the object handed into `addSelectable`
           * @return boolean true if a match was found
           */

        }, {
          key: "match",
          value: function match(cssSelector, matchedCallback) {
            var result = false;
            var element = cssSelector.element;
            var classNames = cssSelector.classNames;
            var attrs = cssSelector.attrs;

            for (var i = 0; i < this._listContexts.length; i++) {
              this._listContexts[i].alreadyMatched = false;
            }

            result = this._matchTerminal(this._elementMap, element, cssSelector, matchedCallback) || result;
            result = this._matchPartial(this._elementPartialMap, element, cssSelector, matchedCallback) || result;

            if (classNames) {
              for (var _i3 = 0; _i3 < classNames.length; _i3++) {
                var className = classNames[_i3];
                result = this._matchTerminal(this._classMap, className, cssSelector, matchedCallback) || result;
                result = this._matchPartial(this._classPartialMap, className, cssSelector, matchedCallback) || result;
              }
            }

            if (attrs) {
              for (var _i4 = 0; _i4 < attrs.length; _i4 += 2) {
                var name = attrs[_i4];
                var value = attrs[_i4 + 1];

                var terminalValuesMap = this._attrValueMap.get(name);

                if (value) {
                  result = this._matchTerminal(terminalValuesMap, '', cssSelector, matchedCallback) || result;
                }

                result = this._matchTerminal(terminalValuesMap, value, cssSelector, matchedCallback) || result;

                var partialValuesMap = this._attrValuePartialMap.get(name);

                if (value) {
                  result = this._matchPartial(partialValuesMap, '', cssSelector, matchedCallback) || result;
                }

                result = this._matchPartial(partialValuesMap, value, cssSelector, matchedCallback) || result;
              }
            }

            return result;
          }
          /** @internal */

        }, {
          key: "_matchTerminal",
          value: function _matchTerminal(map, name, cssSelector, matchedCallback) {
            if (!map || typeof name !== 'string') {
              return false;
            }

            var selectables = map.get(name) || [];
            var starSelectables = map.get('*');

            if (starSelectables) {
              selectables = selectables.concat(starSelectables);
            }

            if (selectables.length === 0) {
              return false;
            }

            var selectable;
            var result = false;

            for (var i = 0; i < selectables.length; i++) {
              selectable = selectables[i];
              result = selectable.finalize(cssSelector, matchedCallback) || result;
            }

            return result;
          }
          /** @internal */

        }, {
          key: "_matchPartial",
          value: function _matchPartial(map, name, cssSelector, matchedCallback) {
            if (!map || typeof name !== 'string') {
              return false;
            }

            var nestedSelector = map.get(name);

            if (!nestedSelector) {
              return false;
            } // TODO(perf): get rid of recursion and measure again
            // TODO(perf): don't pass the whole selector into the recursion,
            // but only the not processed parts


            return nestedSelector.match(cssSelector, matchedCallback);
          }
        }], [{
          key: "createNotMatcher",
          value: function createNotMatcher(notSelectors) {
            var notMatcher = new SelectorMatcher();
            notMatcher.addSelectables(notSelectors, null);
            return notMatcher;
          }
        }]);

        return SelectorMatcher;
      }();

      var SelectorListContext = function SelectorListContext(selectors) {
        _classCallCheck(this, SelectorListContext);

        this.selectors = selectors;
        this.alreadyMatched = false;
      }; // Store context to pass back selector and context when a selector is matched


      var SelectorContext = /*#__PURE__*/function () {
        function SelectorContext(selector, cbContext, listContext) {
          _classCallCheck(this, SelectorContext);

          this.selector = selector;
          this.cbContext = cbContext;
          this.listContext = listContext;
          this.notSelectors = selector.notSelectors;
        }

        _createClass2(SelectorContext, [{
          key: "finalize",
          value: function finalize(cssSelector, callback) {
            var result = true;

            if (this.notSelectors.length > 0 && (!this.listContext || !this.listContext.alreadyMatched)) {
              var notMatcher = SelectorMatcher.createNotMatcher(this.notSelectors);
              result = !notMatcher.match(cssSelector, null);
            }

            if (result && callback && (!this.listContext || !this.listContext.alreadyMatched)) {
              if (this.listContext) {
                this.listContext.alreadyMatched = true;
              }

              callback(this.selector, this.cbContext);
            }

            return result;
          }
        }]);

        return SelectorContext;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var createInject = makeMetadataFactory('Inject', function (token) {
        return {
          token: token
        };
      });
      var createInjectionToken = makeMetadataFactory('InjectionToken', function (desc) {
        return {
          _desc: desc,
          ɵprov: undefined
        };
      });
      var createAttribute = makeMetadataFactory('Attribute', function (attributeName) {
        return {
          attributeName: attributeName
        };
      });
      var createContentChildren = makeMetadataFactory('ContentChildren', function (selector) {
        var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
        return Object.assign({
          selector: selector,
          first: false,
          isViewQuery: false,
          descendants: false
        }, data);
      });
      var createContentChild = makeMetadataFactory('ContentChild', function (selector) {
        var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
        return Object.assign({
          selector: selector,
          first: true,
          isViewQuery: false,
          descendants: true
        }, data);
      });
      var createViewChildren = makeMetadataFactory('ViewChildren', function (selector) {
        var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
        return Object.assign({
          selector: selector,
          first: false,
          isViewQuery: true,
          descendants: true
        }, data);
      });
      var createViewChild = makeMetadataFactory('ViewChild', function (selector, data) {
        return Object.assign({
          selector: selector,
          first: true,
          isViewQuery: true,
          descendants: true
        }, data);
      });
      var createDirective = makeMetadataFactory('Directive', function () {
        var dir = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
        return dir;
      });
      var ViewEncapsulation;

      (function (ViewEncapsulation) {
        ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated"; // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.

        ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None";
        ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom";
      })(ViewEncapsulation || (ViewEncapsulation = {}));

      var ChangeDetectionStrategy;

      (function (ChangeDetectionStrategy) {
        ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush";
        ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
      })(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));

      var createComponent = makeMetadataFactory('Component', function () {
        var c = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
        return Object.assign({
          changeDetection: ChangeDetectionStrategy.Default
        }, c);
      });
      var createPipe = makeMetadataFactory('Pipe', function (p) {
        return Object.assign({
          pure: true
        }, p);
      });
      var createInput = makeMetadataFactory('Input', function (bindingPropertyName) {
        return {
          bindingPropertyName: bindingPropertyName
        };
      });
      var createOutput = makeMetadataFactory('Output', function (bindingPropertyName) {
        return {
          bindingPropertyName: bindingPropertyName
        };
      });
      var createHostBinding = makeMetadataFactory('HostBinding', function (hostPropertyName) {
        return {
          hostPropertyName: hostPropertyName
        };
      });
      var createHostListener = makeMetadataFactory('HostListener', function (eventName, args) {
        return {
          eventName: eventName,
          args: args
        };
      });
      var createNgModule = makeMetadataFactory('NgModule', function (ngModule) {
        return ngModule;
      });
      var createInjectable = makeMetadataFactory('Injectable', function () {
        var injectable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
        return injectable;
      });
      var CUSTOM_ELEMENTS_SCHEMA = {
        name: 'custom-elements'
      };
      var NO_ERRORS_SCHEMA = {
        name: 'no-errors-schema'
      };
      var createOptional = makeMetadataFactory('Optional');
      var createSelf = makeMetadataFactory('Self');
      var createSkipSelf = makeMetadataFactory('SkipSelf');
      var createHost = makeMetadataFactory('Host');
      var Type = Function;
      var SecurityContext;

      (function (SecurityContext) {
        SecurityContext[SecurityContext["NONE"] = 0] = "NONE";
        SecurityContext[SecurityContext["HTML"] = 1] = "HTML";
        SecurityContext[SecurityContext["STYLE"] = 2] = "STYLE";
        SecurityContext[SecurityContext["SCRIPT"] = 3] = "SCRIPT";
        SecurityContext[SecurityContext["URL"] = 4] = "URL";
        SecurityContext[SecurityContext["RESOURCE_URL"] = 5] = "RESOURCE_URL";
      })(SecurityContext || (SecurityContext = {}));

      var MissingTranslationStrategy;

      (function (MissingTranslationStrategy) {
        MissingTranslationStrategy[MissingTranslationStrategy["Error"] = 0] = "Error";
        MissingTranslationStrategy[MissingTranslationStrategy["Warning"] = 1] = "Warning";
        MissingTranslationStrategy[MissingTranslationStrategy["Ignore"] = 2] = "Ignore";
      })(MissingTranslationStrategy || (MissingTranslationStrategy = {}));

      function makeMetadataFactory(name, props) {
        // This must be declared as a function, not a fat arrow, so that ES2015 devmode produces code
        // that works with the static_reflector.ts in the ViewEngine compiler.
        // In particular, `_registerDecoratorOrConstructor` assumes that the value returned here can be
        // new'ed.
        function factory() {
          var values = props ? props.apply(void 0, arguments) : {};
          return Object.assign({
            ngMetadataName: name
          }, values);
        }

        factory.isTypeOf = function (obj) {
          return obj && obj.ngMetadataName === name;
        };

        factory.ngMetadataName = name;
        return factory;
      }

      function parserSelectorToSimpleSelector(selector) {
        var classes = selector.classNames && selector.classNames.length ? [8
        /* CLASS */
        ].concat(_toConsumableArray(selector.classNames)) : [];
        var elementName = selector.element && selector.element !== '*' ? selector.element : '';
        return [elementName].concat(_toConsumableArray(selector.attrs), _toConsumableArray(classes));
      }

      function parserSelectorToNegativeSelector(selector) {
        var classes = selector.classNames && selector.classNames.length ? [8
        /* CLASS */
        ].concat(_toConsumableArray(selector.classNames)) : [];

        if (selector.element) {
          return [1
          /* NOT */
          | 4
          /* ELEMENT */
          , selector.element].concat(_toConsumableArray(selector.attrs), _toConsumableArray(classes));
        } else if (selector.attrs.length) {
          return [1
          /* NOT */
          | 2
          /* ATTRIBUTE */
          ].concat(_toConsumableArray(selector.attrs), _toConsumableArray(classes));
        } else {
          return selector.classNames && selector.classNames.length ? [1
          /* NOT */
          | 8
          /* CLASS */
          ].concat(_toConsumableArray(selector.classNames)) : [];
        }
      }

      function parserSelectorToR3Selector(selector) {
        var positive = parserSelectorToSimpleSelector(selector);
        var negative = selector.notSelectors && selector.notSelectors.length ? selector.notSelectors.map(function (notSelector) {
          return parserSelectorToNegativeSelector(notSelector);
        }) : [];
        return positive.concat.apply(positive, _toConsumableArray(negative));
      }

      function parseSelectorToR3Selector(selector) {
        return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];
      }

      var core = /*#__PURE__*/Object.freeze({
        __proto__: null,
        createInject: createInject,
        createInjectionToken: createInjectionToken,
        createAttribute: createAttribute,
        createContentChildren: createContentChildren,
        createContentChild: createContentChild,
        createViewChildren: createViewChildren,
        createViewChild: createViewChild,
        createDirective: createDirective,

        get ViewEncapsulation() {
          return ViewEncapsulation;
        },

        get ChangeDetectionStrategy() {
          return ChangeDetectionStrategy;
        },

        createComponent: createComponent,
        createPipe: createPipe,
        createInput: createInput,
        createOutput: createOutput,
        createHostBinding: createHostBinding,
        createHostListener: createHostListener,
        createNgModule: createNgModule,
        createInjectable: createInjectable,
        CUSTOM_ELEMENTS_SCHEMA: CUSTOM_ELEMENTS_SCHEMA,
        NO_ERRORS_SCHEMA: NO_ERRORS_SCHEMA,
        createOptional: createOptional,
        createSelf: createSelf,
        createSkipSelf: createSkipSelf,
        createHost: createHost,
        Type: Type,

        get SecurityContext() {
          return SecurityContext;
        },

        get MissingTranslationStrategy() {
          return MissingTranslationStrategy;
        },

        parseSelectorToR3Selector: parseSelectorToR3Selector
      });
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      //// Types

      var TypeModifier;

      (function (TypeModifier) {
        TypeModifier[TypeModifier["Const"] = 0] = "Const";
      })(TypeModifier || (TypeModifier = {}));

      var Type$1 = /*#__PURE__*/function () {
        function Type$1() {
          var modifiers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];

          _classCallCheck(this, Type$1);

          this.modifiers = modifiers;
        }

        _createClass2(Type$1, [{
          key: "hasModifier",
          value: function hasModifier(modifier) {
            return this.modifiers.indexOf(modifier) !== -1;
          }
        }]);

        return Type$1;
      }();

      var BuiltinTypeName;

      (function (BuiltinTypeName) {
        BuiltinTypeName[BuiltinTypeName["Dynamic"] = 0] = "Dynamic";
        BuiltinTypeName[BuiltinTypeName["Bool"] = 1] = "Bool";
        BuiltinTypeName[BuiltinTypeName["String"] = 2] = "String";
        BuiltinTypeName[BuiltinTypeName["Int"] = 3] = "Int";
        BuiltinTypeName[BuiltinTypeName["Number"] = 4] = "Number";
        BuiltinTypeName[BuiltinTypeName["Function"] = 5] = "Function";
        BuiltinTypeName[BuiltinTypeName["Inferred"] = 6] = "Inferred";
        BuiltinTypeName[BuiltinTypeName["None"] = 7] = "None";
      })(BuiltinTypeName || (BuiltinTypeName = {}));

      var BuiltinType = /*#__PURE__*/function (_Type$) {
        _inherits(BuiltinType, _Type$);

        var _super7 = _createSuper(BuiltinType);

        function BuiltinType(name, modifiers) {
          var _this8;

          _classCallCheck(this, BuiltinType);

          _this8 = _super7.call(this, modifiers);
          _this8.name = name;
          return _this8;
        }

        _createClass2(BuiltinType, [{
          key: "visitType",
          value: function visitType(visitor, context) {
            return visitor.visitBuiltinType(this, context);
          }
        }]);

        return BuiltinType;
      }(Type$1);

      var ExpressionType = /*#__PURE__*/function (_Type$2) {
        _inherits(ExpressionType, _Type$2);

        var _super8 = _createSuper(ExpressionType);

        function ExpressionType(value, modifiers) {
          var _this9;

          var typeParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

          _classCallCheck(this, ExpressionType);

          _this9 = _super8.call(this, modifiers);
          _this9.value = value;
          _this9.typeParams = typeParams;
          return _this9;
        }

        _createClass2(ExpressionType, [{
          key: "visitType",
          value: function visitType(visitor, context) {
            return visitor.visitExpressionType(this, context);
          }
        }]);

        return ExpressionType;
      }(Type$1);

      var ArrayType = /*#__PURE__*/function (_Type$3) {
        _inherits(ArrayType, _Type$3);

        var _super9 = _createSuper(ArrayType);

        function ArrayType(of, modifiers) {
          var _this10;

          _classCallCheck(this, ArrayType);

          _this10 = _super9.call(this, modifiers);
          _this10.of = of;
          return _this10;
        }

        _createClass2(ArrayType, [{
          key: "visitType",
          value: function visitType(visitor, context) {
            return visitor.visitArrayType(this, context);
          }
        }]);

        return ArrayType;
      }(Type$1);

      var MapType = /*#__PURE__*/function (_Type$4) {
        _inherits(MapType, _Type$4);

        var _super10 = _createSuper(MapType);

        function MapType(valueType, modifiers) {
          var _this11;

          _classCallCheck(this, MapType);

          _this11 = _super10.call(this, modifiers);
          _this11.valueType = valueType || null;
          return _this11;
        }

        _createClass2(MapType, [{
          key: "visitType",
          value: function visitType(visitor, context) {
            return visitor.visitMapType(this, context);
          }
        }]);

        return MapType;
      }(Type$1);

      var DYNAMIC_TYPE = new BuiltinType(BuiltinTypeName.Dynamic);
      var INFERRED_TYPE = new BuiltinType(BuiltinTypeName.Inferred);
      var BOOL_TYPE = new BuiltinType(BuiltinTypeName.Bool);
      var INT_TYPE = new BuiltinType(BuiltinTypeName.Int);
      var NUMBER_TYPE = new BuiltinType(BuiltinTypeName.Number);
      var STRING_TYPE = new BuiltinType(BuiltinTypeName.String);
      var FUNCTION_TYPE = new BuiltinType(BuiltinTypeName.Function);
      var NONE_TYPE = new BuiltinType(BuiltinTypeName.None); ///// Expressions

      var UnaryOperator;

      (function (UnaryOperator) {
        UnaryOperator[UnaryOperator["Minus"] = 0] = "Minus";
        UnaryOperator[UnaryOperator["Plus"] = 1] = "Plus";
      })(UnaryOperator || (UnaryOperator = {}));

      var BinaryOperator;

      (function (BinaryOperator) {
        BinaryOperator[BinaryOperator["Equals"] = 0] = "Equals";
        BinaryOperator[BinaryOperator["NotEquals"] = 1] = "NotEquals";
        BinaryOperator[BinaryOperator["Identical"] = 2] = "Identical";
        BinaryOperator[BinaryOperator["NotIdentical"] = 3] = "NotIdentical";
        BinaryOperator[BinaryOperator["Minus"] = 4] = "Minus";
        BinaryOperator[BinaryOperator["Plus"] = 5] = "Plus";
        BinaryOperator[BinaryOperator["Divide"] = 6] = "Divide";
        BinaryOperator[BinaryOperator["Multiply"] = 7] = "Multiply";
        BinaryOperator[BinaryOperator["Modulo"] = 8] = "Modulo";
        BinaryOperator[BinaryOperator["And"] = 9] = "And";
        BinaryOperator[BinaryOperator["Or"] = 10] = "Or";
        BinaryOperator[BinaryOperator["BitwiseAnd"] = 11] = "BitwiseAnd";
        BinaryOperator[BinaryOperator["Lower"] = 12] = "Lower";
        BinaryOperator[BinaryOperator["LowerEquals"] = 13] = "LowerEquals";
        BinaryOperator[BinaryOperator["Bigger"] = 14] = "Bigger";
        BinaryOperator[BinaryOperator["BiggerEquals"] = 15] = "BiggerEquals";
      })(BinaryOperator || (BinaryOperator = {}));

      function nullSafeIsEquivalent(base, other) {
        if (base == null || other == null) {
          return base == other;
        }

        return base.isEquivalent(other);
      }

      function areAllEquivalent(base, other) {
        var len = base.length;

        if (len !== other.length) {
          return false;
        }

        for (var i = 0; i < len; i++) {
          if (!base[i].isEquivalent(other[i])) {
            return false;
          }
        }

        return true;
      }

      var Expression = /*#__PURE__*/function () {
        function Expression(type, sourceSpan) {
          _classCallCheck(this, Expression);

          this.type = type || null;
          this.sourceSpan = sourceSpan || null;
        }

        _createClass2(Expression, [{
          key: "prop",
          value: function prop(name, sourceSpan) {
            return new ReadPropExpr(this, name, null, sourceSpan);
          }
        }, {
          key: "key",
          value: function key(index, type, sourceSpan) {
            return new ReadKeyExpr(this, index, type, sourceSpan);
          }
        }, {
          key: "callMethod",
          value: function callMethod(name, params, sourceSpan) {
            return new InvokeMethodExpr(this, name, params, null, sourceSpan);
          }
        }, {
          key: "callFn",
          value: function callFn(params, sourceSpan, pure) {
            return new InvokeFunctionExpr(this, params, null, sourceSpan, pure);
          }
        }, {
          key: "instantiate",
          value: function instantiate(params, type, sourceSpan) {
            return new InstantiateExpr(this, params, type, sourceSpan);
          }
        }, {
          key: "conditional",
          value: function conditional(trueCase) {
            var falseCase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            var sourceSpan = arguments.length > 2 ? arguments[2] : undefined;
            return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan);
          }
        }, {
          key: "equals",
          value: function equals(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan);
          }
        }, {
          key: "notEquals",
          value: function notEquals(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan);
          }
        }, {
          key: "identical",
          value: function identical(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan);
          }
        }, {
          key: "notIdentical",
          value: function notIdentical(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan);
          }
        }, {
          key: "minus",
          value: function minus(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan);
          }
        }, {
          key: "plus",
          value: function plus(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan);
          }
        }, {
          key: "divide",
          value: function divide(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan);
          }
        }, {
          key: "multiply",
          value: function multiply(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan);
          }
        }, {
          key: "modulo",
          value: function modulo(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan);
          }
        }, {
          key: "and",
          value: function and(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);
          }
        }, {
          key: "bitwiseAnd",
          value: function bitwiseAnd(rhs, sourceSpan) {
            var parens = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
            return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);
          }
        }, {
          key: "or",
          value: function or(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan);
          }
        }, {
          key: "lower",
          value: function lower(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan);
          }
        }, {
          key: "lowerEquals",
          value: function lowerEquals(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan);
          }
        }, {
          key: "bigger",
          value: function bigger(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan);
          }
        }, {
          key: "biggerEquals",
          value: function biggerEquals(rhs, sourceSpan) {
            return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan);
          }
        }, {
          key: "isBlank",
          value: function isBlank(sourceSpan) {
            // Note: We use equals by purpose here to compare to null and undefined in JS.
            // We use the typed null to allow strictNullChecks to narrow types.
            return this.equals(TYPED_NULL_EXPR, sourceSpan);
          }
        }, {
          key: "cast",
          value: function cast(type, sourceSpan) {
            return new CastExpr(this, type, sourceSpan);
          }
        }, {
          key: "toStmt",
          value: function toStmt() {
            return new ExpressionStatement(this, null);
          }
        }]);

        return Expression;
      }();

      var BuiltinVar;

      (function (BuiltinVar) {
        BuiltinVar[BuiltinVar["This"] = 0] = "This";
        BuiltinVar[BuiltinVar["Super"] = 1] = "Super";
        BuiltinVar[BuiltinVar["CatchError"] = 2] = "CatchError";
        BuiltinVar[BuiltinVar["CatchStack"] = 3] = "CatchStack";
      })(BuiltinVar || (BuiltinVar = {}));

      var ReadVarExpr = /*#__PURE__*/function (_Expression) {
        _inherits(ReadVarExpr, _Expression);

        var _super11 = _createSuper(ReadVarExpr);

        function ReadVarExpr(name, type, sourceSpan) {
          var _this12;

          _classCallCheck(this, ReadVarExpr);

          _this12 = _super11.call(this, type, sourceSpan);

          if (typeof name === 'string') {
            _this12.name = name;
            _this12.builtin = null;
          } else {
            _this12.name = null;
            _this12.builtin = name;
          }

          return _this12;
        }

        _createClass2(ReadVarExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof ReadVarExpr && this.name === e.name && this.builtin === e.builtin;
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitReadVarExpr(this, context);
          }
        }, {
          key: "set",
          value: function set(value) {
            if (!this.name) {
              throw new Error("Built in variable ".concat(this.builtin, " can not be assigned to."));
            }

            return new WriteVarExpr(this.name, value, null, this.sourceSpan);
          }
        }]);

        return ReadVarExpr;
      }(Expression);

      var TypeofExpr = /*#__PURE__*/function (_Expression2) {
        _inherits(TypeofExpr, _Expression2);

        var _super12 = _createSuper(TypeofExpr);

        function TypeofExpr(expr, type, sourceSpan) {
          var _this13;

          _classCallCheck(this, TypeofExpr);

          _this13 = _super12.call(this, type, sourceSpan);
          _this13.expr = expr;
          return _this13;
        }

        _createClass2(TypeofExpr, [{
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitTypeofExpr(this, context);
          }
        }, {
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof TypeofExpr && e.expr.isEquivalent(this.expr);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return this.expr.isConstant();
          }
        }]);

        return TypeofExpr;
      }(Expression);

      var WrappedNodeExpr = /*#__PURE__*/function (_Expression3) {
        _inherits(WrappedNodeExpr, _Expression3);

        var _super13 = _createSuper(WrappedNodeExpr);

        function WrappedNodeExpr(node, type, sourceSpan) {
          var _this14;

          _classCallCheck(this, WrappedNodeExpr);

          _this14 = _super13.call(this, type, sourceSpan);
          _this14.node = node;
          return _this14;
        }

        _createClass2(WrappedNodeExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof WrappedNodeExpr && this.node === e.node;
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitWrappedNodeExpr(this, context);
          }
        }]);

        return WrappedNodeExpr;
      }(Expression);

      var WriteVarExpr = /*#__PURE__*/function (_Expression4) {
        _inherits(WriteVarExpr, _Expression4);

        var _super14 = _createSuper(WriteVarExpr);

        function WriteVarExpr(name, value, type, sourceSpan) {
          var _this15;

          _classCallCheck(this, WriteVarExpr);

          _this15 = _super14.call(this, type || value.type, sourceSpan);
          _this15.name = name;
          _this15.value = value;
          return _this15;
        }

        _createClass2(WriteVarExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitWriteVarExpr(this, context);
          }
        }, {
          key: "toDeclStmt",
          value: function toDeclStmt(type, modifiers) {
            return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);
          }
        }, {
          key: "toConstDecl",
          value: function toConstDecl() {
            return this.toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]);
          }
        }]);

        return WriteVarExpr;
      }(Expression);

      var WriteKeyExpr = /*#__PURE__*/function (_Expression5) {
        _inherits(WriteKeyExpr, _Expression5);

        var _super15 = _createSuper(WriteKeyExpr);

        function WriteKeyExpr(receiver, index, value, type, sourceSpan) {
          var _this16;

          _classCallCheck(this, WriteKeyExpr);

          _this16 = _super15.call(this, type || value.type, sourceSpan);
          _this16.receiver = receiver;
          _this16.index = index;
          _this16.value = value;
          return _this16;
        }

        _createClass2(WriteKeyExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof WriteKeyExpr && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitWriteKeyExpr(this, context);
          }
        }]);

        return WriteKeyExpr;
      }(Expression);

      var WritePropExpr = /*#__PURE__*/function (_Expression6) {
        _inherits(WritePropExpr, _Expression6);

        var _super16 = _createSuper(WritePropExpr);

        function WritePropExpr(receiver, name, value, type, sourceSpan) {
          var _this17;

          _classCallCheck(this, WritePropExpr);

          _this17 = _super16.call(this, type || value.type, sourceSpan);
          _this17.receiver = receiver;
          _this17.name = name;
          _this17.value = value;
          return _this17;
        }

        _createClass2(WritePropExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof WritePropExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name && this.value.isEquivalent(e.value);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitWritePropExpr(this, context);
          }
        }]);

        return WritePropExpr;
      }(Expression);

      var BuiltinMethod;

      (function (BuiltinMethod) {
        BuiltinMethod[BuiltinMethod["ConcatArray"] = 0] = "ConcatArray";
        BuiltinMethod[BuiltinMethod["SubscribeObservable"] = 1] = "SubscribeObservable";
        BuiltinMethod[BuiltinMethod["Bind"] = 2] = "Bind";
      })(BuiltinMethod || (BuiltinMethod = {}));

      var InvokeMethodExpr = /*#__PURE__*/function (_Expression7) {
        _inherits(InvokeMethodExpr, _Expression7);

        var _super17 = _createSuper(InvokeMethodExpr);

        function InvokeMethodExpr(receiver, method, args, type, sourceSpan) {
          var _this18;

          _classCallCheck(this, InvokeMethodExpr);

          _this18 = _super17.call(this, type, sourceSpan);
          _this18.receiver = receiver;
          _this18.args = args;

          if (typeof method === 'string') {
            _this18.name = method;
            _this18.builtin = null;
          } else {
            _this18.name = null;
            _this18.builtin = method;
          }

          return _this18;
        }

        _createClass2(InvokeMethodExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof InvokeMethodExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name && this.builtin === e.builtin && areAllEquivalent(this.args, e.args);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitInvokeMethodExpr(this, context);
          }
        }]);

        return InvokeMethodExpr;
      }(Expression);

      var InvokeFunctionExpr = /*#__PURE__*/function (_Expression8) {
        _inherits(InvokeFunctionExpr, _Expression8);

        var _super18 = _createSuper(InvokeFunctionExpr);

        function InvokeFunctionExpr(fn, args, type, sourceSpan) {
          var _this19;

          var pure = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;

          _classCallCheck(this, InvokeFunctionExpr);

          _this19 = _super18.call(this, type, sourceSpan);
          _this19.fn = fn;
          _this19.args = args;
          _this19.pure = pure;
          return _this19;
        }

        _createClass2(InvokeFunctionExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof InvokeFunctionExpr && this.fn.isEquivalent(e.fn) && areAllEquivalent(this.args, e.args) && this.pure === e.pure;
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitInvokeFunctionExpr(this, context);
          }
        }]);

        return InvokeFunctionExpr;
      }(Expression);

      var InstantiateExpr = /*#__PURE__*/function (_Expression9) {
        _inherits(InstantiateExpr, _Expression9);

        var _super19 = _createSuper(InstantiateExpr);

        function InstantiateExpr(classExpr, args, type, sourceSpan) {
          var _this20;

          _classCallCheck(this, InstantiateExpr);

          _this20 = _super19.call(this, type, sourceSpan);
          _this20.classExpr = classExpr;
          _this20.args = args;
          return _this20;
        }

        _createClass2(InstantiateExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof InstantiateExpr && this.classExpr.isEquivalent(e.classExpr) && areAllEquivalent(this.args, e.args);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitInstantiateExpr(this, context);
          }
        }]);

        return InstantiateExpr;
      }(Expression);

      var LiteralExpr = /*#__PURE__*/function (_Expression10) {
        _inherits(LiteralExpr, _Expression10);

        var _super20 = _createSuper(LiteralExpr);

        function LiteralExpr(value, type, sourceSpan) {
          var _this21;

          _classCallCheck(this, LiteralExpr);

          _this21 = _super20.call(this, type, sourceSpan);
          _this21.value = value;
          return _this21;
        }

        _createClass2(LiteralExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof LiteralExpr && this.value === e.value;
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return true;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitLiteralExpr(this, context);
          }
        }]);

        return LiteralExpr;
      }(Expression);

      var MessagePiece = function MessagePiece(text, sourceSpan) {
        _classCallCheck(this, MessagePiece);

        this.text = text;
        this.sourceSpan = sourceSpan;
      };

      var LiteralPiece = /*#__PURE__*/function (_MessagePiece) {
        _inherits(LiteralPiece, _MessagePiece);

        var _super21 = _createSuper(LiteralPiece);

        function LiteralPiece() {
          _classCallCheck(this, LiteralPiece);

          return _super21.apply(this, arguments);
        }

        return LiteralPiece;
      }(MessagePiece);

      var PlaceholderPiece = /*#__PURE__*/function (_MessagePiece2) {
        _inherits(PlaceholderPiece, _MessagePiece2);

        var _super22 = _createSuper(PlaceholderPiece);

        function PlaceholderPiece() {
          _classCallCheck(this, PlaceholderPiece);

          return _super22.apply(this, arguments);
        }

        return PlaceholderPiece;
      }(MessagePiece);

      var LocalizedString = /*#__PURE__*/function (_Expression11) {
        _inherits(LocalizedString, _Expression11);

        var _super23 = _createSuper(LocalizedString);

        function LocalizedString(metaBlock, messageParts, placeHolderNames, expressions, sourceSpan) {
          var _this22;

          _classCallCheck(this, LocalizedString);

          _this22 = _super23.call(this, STRING_TYPE, sourceSpan);
          _this22.metaBlock = metaBlock;
          _this22.messageParts = messageParts;
          _this22.placeHolderNames = placeHolderNames;
          _this22.expressions = expressions;
          return _this22;
        }

        _createClass2(LocalizedString, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            // return e instanceof LocalizedString && this.message === e.message;
            return false;
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitLocalizedString(this, context);
          }
          /**
           * Serialize the given `meta` and `messagePart` into "cooked" and "raw" strings that can be used
           * in a `$localize` tagged string. The format of the metadata is the same as that parsed by
           * `parseI18nMeta()`.
           *
           * @param meta The metadata to serialize
           * @param messagePart The first part of the tagged string
           */

        }, {
          key: "serializeI18nHead",
          value: function serializeI18nHead() {
            var MEANING_SEPARATOR = '|';
            var ID_SEPARATOR = '@@';
            var LEGACY_ID_INDICATOR = '␟';
            var metaBlock = this.metaBlock.description || '';

            if (this.metaBlock.meaning) {
              metaBlock = "".concat(this.metaBlock.meaning).concat(MEANING_SEPARATOR).concat(metaBlock);
            }

            if (this.metaBlock.customId) {
              metaBlock = "".concat(metaBlock).concat(ID_SEPARATOR).concat(this.metaBlock.customId);
            }

            if (this.metaBlock.legacyIds) {
              this.metaBlock.legacyIds.forEach(function (legacyId) {
                metaBlock = "".concat(metaBlock).concat(LEGACY_ID_INDICATOR).concat(legacyId);
              });
            }

            return createCookedRawString(metaBlock, this.messageParts[0].text, this.getMessagePartSourceSpan(0));
          }
        }, {
          key: "getMessagePartSourceSpan",
          value: function getMessagePartSourceSpan(i) {
            var _a, _b;

            return (_b = (_a = this.messageParts[i]) === null || _a === void 0 ? void 0 : _a.sourceSpan) !== null && _b !== void 0 ? _b : this.sourceSpan;
          }
        }, {
          key: "getPlaceholderSourceSpan",
          value: function getPlaceholderSourceSpan(i) {
            var _a, _b, _c, _d;

            return (_d = (_b = (_a = this.placeHolderNames[i]) === null || _a === void 0 ? void 0 : _a.sourceSpan) !== null && _b !== void 0 ? _b : (_c = this.expressions[i]) === null || _c === void 0 ? void 0 : _c.sourceSpan) !== null && _d !== void 0 ? _d : this.sourceSpan;
          }
          /**
           * Serialize the given `placeholderName` and `messagePart` into "cooked" and "raw" strings that
           * can be used in a `$localize` tagged string.
           *
           * @param placeholderName The placeholder name to serialize
           * @param messagePart The following message string after this placeholder
           */

        }, {
          key: "serializeI18nTemplatePart",
          value: function serializeI18nTemplatePart(partIndex) {
            var placeholderName = this.placeHolderNames[partIndex - 1].text;
            var messagePart = this.messageParts[partIndex];
            return createCookedRawString(placeholderName, messagePart.text, this.getMessagePartSourceSpan(partIndex));
          }
        }]);

        return LocalizedString;
      }(Expression);

      var escapeSlashes = function escapeSlashes(str) {
        return str.replace(/\\/g, '\\\\');
      };

      var escapeStartingColon = function escapeStartingColon(str) {
        return str.replace(/^:/, '\\:');
      };

      var escapeColons = function escapeColons(str) {
        return str.replace(/:/g, '\\:');
      };

      var escapeForMessagePart = function escapeForMessagePart(str) {
        return str.replace(/`/g, '\\`').replace(/\${/g, '$\\{');
      };
      /**
       * Creates a `{cooked, raw}` object from the `metaBlock` and `messagePart`.
       *
       * The `raw` text must have various character sequences escaped:
       * * "\" would otherwise indicate that the next character is a control character.
       * * "`" and "${" are template string control sequences that would otherwise prematurely indicate
       *   the end of a message part.
       * * ":" inside a metablock would prematurely indicate the end of the metablock.
       * * ":" at the start of a messagePart with no metablock would erroneously indicate the start of a
       *   metablock.
       *
       * @param metaBlock Any metadata that should be prepended to the string
       * @param messagePart The message part of the string
       */


      function createCookedRawString(metaBlock, messagePart, range) {
        if (metaBlock === '') {
          return {
            cooked: messagePart,
            raw: escapeForMessagePart(escapeStartingColon(escapeSlashes(messagePart))),
            range: range
          };
        } else {
          return {
            cooked: ":".concat(metaBlock, ":").concat(messagePart),
            raw: escapeForMessagePart(":".concat(escapeColons(escapeSlashes(metaBlock)), ":").concat(escapeSlashes(messagePart))),
            range: range
          };
        }
      }

      var ExternalExpr = /*#__PURE__*/function (_Expression12) {
        _inherits(ExternalExpr, _Expression12);

        var _super24 = _createSuper(ExternalExpr);

        function ExternalExpr(value, type) {
          var _this23;

          var typeParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
          var sourceSpan = arguments.length > 3 ? arguments[3] : undefined;

          _classCallCheck(this, ExternalExpr);

          _this23 = _super24.call(this, type, sourceSpan);
          _this23.value = value;
          _this23.typeParams = typeParams;
          return _this23;
        }

        _createClass2(ExternalExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof ExternalExpr && this.value.name === e.value.name && this.value.moduleName === e.value.moduleName && this.value.runtime === e.value.runtime;
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitExternalExpr(this, context);
          }
        }]);

        return ExternalExpr;
      }(Expression);

      var ExternalReference = function ExternalReference(moduleName, name, runtime) {
        _classCallCheck(this, ExternalReference);

        this.moduleName = moduleName;
        this.name = name;
        this.runtime = runtime;
      };

      var ConditionalExpr = /*#__PURE__*/function (_Expression13) {
        _inherits(ConditionalExpr, _Expression13);

        var _super25 = _createSuper(ConditionalExpr);

        function ConditionalExpr(condition, trueCase) {
          var _this24;

          var falseCase = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
          var type = arguments.length > 3 ? arguments[3] : undefined;
          var sourceSpan = arguments.length > 4 ? arguments[4] : undefined;

          _classCallCheck(this, ConditionalExpr);

          _this24 = _super25.call(this, type || trueCase.type, sourceSpan);
          _this24.condition = condition;
          _this24.falseCase = falseCase;
          _this24.trueCase = trueCase;
          return _this24;
        }

        _createClass2(ConditionalExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof ConditionalExpr && this.condition.isEquivalent(e.condition) && this.trueCase.isEquivalent(e.trueCase) && nullSafeIsEquivalent(this.falseCase, e.falseCase);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitConditionalExpr(this, context);
          }
        }]);

        return ConditionalExpr;
      }(Expression);

      var NotExpr = /*#__PURE__*/function (_Expression14) {
        _inherits(NotExpr, _Expression14);

        var _super26 = _createSuper(NotExpr);

        function NotExpr(condition, sourceSpan) {
          var _this25;

          _classCallCheck(this, NotExpr);

          _this25 = _super26.call(this, BOOL_TYPE, sourceSpan);
          _this25.condition = condition;
          return _this25;
        }

        _createClass2(NotExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof NotExpr && this.condition.isEquivalent(e.condition);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitNotExpr(this, context);
          }
        }]);

        return NotExpr;
      }(Expression);

      var AssertNotNull = /*#__PURE__*/function (_Expression15) {
        _inherits(AssertNotNull, _Expression15);

        var _super27 = _createSuper(AssertNotNull);

        function AssertNotNull(condition, sourceSpan) {
          var _this26;

          _classCallCheck(this, AssertNotNull);

          _this26 = _super27.call(this, condition.type, sourceSpan);
          _this26.condition = condition;
          return _this26;
        }

        _createClass2(AssertNotNull, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof AssertNotNull && this.condition.isEquivalent(e.condition);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitAssertNotNullExpr(this, context);
          }
        }]);

        return AssertNotNull;
      }(Expression);

      var CastExpr = /*#__PURE__*/function (_Expression16) {
        _inherits(CastExpr, _Expression16);

        var _super28 = _createSuper(CastExpr);

        function CastExpr(value, type, sourceSpan) {
          var _this27;

          _classCallCheck(this, CastExpr);

          _this27 = _super28.call(this, type, sourceSpan);
          _this27.value = value;
          return _this27;
        }

        _createClass2(CastExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof CastExpr && this.value.isEquivalent(e.value);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitCastExpr(this, context);
          }
        }]);

        return CastExpr;
      }(Expression);

      var FnParam = /*#__PURE__*/function () {
        function FnParam(name) {
          var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

          _classCallCheck(this, FnParam);

          this.name = name;
          this.type = type;
        }

        _createClass2(FnParam, [{
          key: "isEquivalent",
          value: function isEquivalent(param) {
            return this.name === param.name;
          }
        }]);

        return FnParam;
      }();

      var FunctionExpr = /*#__PURE__*/function (_Expression17) {
        _inherits(FunctionExpr, _Expression17);

        var _super29 = _createSuper(FunctionExpr);

        function FunctionExpr(params, statements, type, sourceSpan, name) {
          var _this28;

          _classCallCheck(this, FunctionExpr);

          _this28 = _super29.call(this, type, sourceSpan);
          _this28.params = params;
          _this28.statements = statements;
          _this28.name = name;
          return _this28;
        }

        _createClass2(FunctionExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof FunctionExpr && areAllEquivalent(this.params, e.params) && areAllEquivalent(this.statements, e.statements);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitFunctionExpr(this, context);
          }
        }, {
          key: "toDeclStmt",
          value: function toDeclStmt(name, modifiers) {
            return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers, this.sourceSpan);
          }
        }]);

        return FunctionExpr;
      }(Expression);

      var UnaryOperatorExpr = /*#__PURE__*/function (_Expression18) {
        _inherits(UnaryOperatorExpr, _Expression18);

        var _super30 = _createSuper(UnaryOperatorExpr);

        function UnaryOperatorExpr(operator, expr, type, sourceSpan) {
          var _this29;

          var parens = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;

          _classCallCheck(this, UnaryOperatorExpr);

          _this29 = _super30.call(this, type || NUMBER_TYPE, sourceSpan);
          _this29.operator = operator;
          _this29.expr = expr;
          _this29.parens = parens;
          return _this29;
        }

        _createClass2(UnaryOperatorExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof UnaryOperatorExpr && this.operator === e.operator && this.expr.isEquivalent(e.expr);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitUnaryOperatorExpr(this, context);
          }
        }]);

        return UnaryOperatorExpr;
      }(Expression);

      var BinaryOperatorExpr = /*#__PURE__*/function (_Expression19) {
        _inherits(BinaryOperatorExpr, _Expression19);

        var _super31 = _createSuper(BinaryOperatorExpr);

        function BinaryOperatorExpr(operator, lhs, rhs, type, sourceSpan) {
          var _this30;

          var parens = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;

          _classCallCheck(this, BinaryOperatorExpr);

          _this30 = _super31.call(this, type || lhs.type, sourceSpan);
          _this30.operator = operator;
          _this30.rhs = rhs;
          _this30.parens = parens;
          _this30.lhs = lhs;
          return _this30;
        }

        _createClass2(BinaryOperatorExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof BinaryOperatorExpr && this.operator === e.operator && this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitBinaryOperatorExpr(this, context);
          }
        }]);

        return BinaryOperatorExpr;
      }(Expression);

      var ReadPropExpr = /*#__PURE__*/function (_Expression20) {
        _inherits(ReadPropExpr, _Expression20);

        var _super32 = _createSuper(ReadPropExpr);

        function ReadPropExpr(receiver, name, type, sourceSpan) {
          var _this31;

          _classCallCheck(this, ReadPropExpr);

          _this31 = _super32.call(this, type, sourceSpan);
          _this31.receiver = receiver;
          _this31.name = name;
          return _this31;
        }

        _createClass2(ReadPropExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name;
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitReadPropExpr(this, context);
          }
        }, {
          key: "set",
          value: function set(value) {
            return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan);
          }
        }]);

        return ReadPropExpr;
      }(Expression);

      var ReadKeyExpr = /*#__PURE__*/function (_Expression21) {
        _inherits(ReadKeyExpr, _Expression21);

        var _super33 = _createSuper(ReadKeyExpr);

        function ReadKeyExpr(receiver, index, type, sourceSpan) {
          var _this32;

          _classCallCheck(this, ReadKeyExpr);

          _this32 = _super33.call(this, type, sourceSpan);
          _this32.receiver = receiver;
          _this32.index = index;
          return _this32;
        }

        _createClass2(ReadKeyExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof ReadKeyExpr && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitReadKeyExpr(this, context);
          }
        }, {
          key: "set",
          value: function set(value) {
            return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan);
          }
        }]);

        return ReadKeyExpr;
      }(Expression);

      var LiteralArrayExpr = /*#__PURE__*/function (_Expression22) {
        _inherits(LiteralArrayExpr, _Expression22);

        var _super34 = _createSuper(LiteralArrayExpr);

        function LiteralArrayExpr(entries, type, sourceSpan) {
          var _this33;

          _classCallCheck(this, LiteralArrayExpr);

          _this33 = _super34.call(this, type, sourceSpan);
          _this33.entries = entries;
          return _this33;
        }

        _createClass2(LiteralArrayExpr, [{
          key: "isConstant",
          value: function isConstant() {
            return this.entries.every(function (e) {
              return e.isConstant();
            });
          }
        }, {
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof LiteralArrayExpr && areAllEquivalent(this.entries, e.entries);
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitLiteralArrayExpr(this, context);
          }
        }]);

        return LiteralArrayExpr;
      }(Expression);

      var LiteralMapEntry = /*#__PURE__*/function () {
        function LiteralMapEntry(key, value, quoted) {
          _classCallCheck(this, LiteralMapEntry);

          this.key = key;
          this.value = value;
          this.quoted = quoted;
        }

        _createClass2(LiteralMapEntry, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return this.key === e.key && this.value.isEquivalent(e.value);
          }
        }]);

        return LiteralMapEntry;
      }();

      var LiteralMapExpr = /*#__PURE__*/function (_Expression23) {
        _inherits(LiteralMapExpr, _Expression23);

        var _super35 = _createSuper(LiteralMapExpr);

        function LiteralMapExpr(entries, type, sourceSpan) {
          var _this34;

          _classCallCheck(this, LiteralMapExpr);

          _this34 = _super35.call(this, type, sourceSpan);
          _this34.entries = entries;
          _this34.valueType = null;

          if (type) {
            _this34.valueType = type.valueType;
          }

          return _this34;
        }

        _createClass2(LiteralMapExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return this.entries.every(function (e) {
              return e.value.isConstant();
            });
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitLiteralMapExpr(this, context);
          }
        }]);

        return LiteralMapExpr;
      }(Expression);

      var CommaExpr = /*#__PURE__*/function (_Expression24) {
        _inherits(CommaExpr, _Expression24);

        var _super36 = _createSuper(CommaExpr);

        function CommaExpr(parts, sourceSpan) {
          var _this35;

          _classCallCheck(this, CommaExpr);

          _this35 = _super36.call(this, parts[parts.length - 1].type, sourceSpan);
          _this35.parts = parts;
          return _this35;
        }

        _createClass2(CommaExpr, [{
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof CommaExpr && areAllEquivalent(this.parts, e.parts);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return false;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            return visitor.visitCommaExpr(this, context);
          }
        }]);

        return CommaExpr;
      }(Expression);

      var THIS_EXPR = new ReadVarExpr(BuiltinVar.This, null, null);
      var SUPER_EXPR = new ReadVarExpr(BuiltinVar.Super, null, null);
      var CATCH_ERROR_VAR = new ReadVarExpr(BuiltinVar.CatchError, null, null);
      var CATCH_STACK_VAR = new ReadVarExpr(BuiltinVar.CatchStack, null, null);
      var NULL_EXPR = new LiteralExpr(null, null, null);
      var TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE, null); //// Statements

      var StmtModifier;

      (function (StmtModifier) {
        StmtModifier[StmtModifier["Final"] = 0] = "Final";
        StmtModifier[StmtModifier["Private"] = 1] = "Private";
        StmtModifier[StmtModifier["Exported"] = 2] = "Exported";
        StmtModifier[StmtModifier["Static"] = 3] = "Static";
      })(StmtModifier || (StmtModifier = {}));

      var LeadingComment = /*#__PURE__*/function () {
        function LeadingComment(text, multiline, trailingNewline) {
          _classCallCheck(this, LeadingComment);

          this.text = text;
          this.multiline = multiline;
          this.trailingNewline = trailingNewline;
        }

        _createClass2(LeadingComment, [{
          key: "toString",
          value: function toString() {
            return this.multiline ? " ".concat(this.text, " ") : this.text;
          }
        }]);

        return LeadingComment;
      }();

      var JSDocComment = /*#__PURE__*/function (_LeadingComment) {
        _inherits(JSDocComment, _LeadingComment);

        var _super37 = _createSuper(JSDocComment);

        function JSDocComment(tags) {
          var _this36;

          _classCallCheck(this, JSDocComment);

          _this36 = _super37.call(this, '',
          /* multiline */
          true,
          /* trailingNewline */
          true);
          _this36.tags = tags;
          return _this36;
        }

        _createClass2(JSDocComment, [{
          key: "toString",
          value: function toString() {
            return serializeTags(this.tags);
          }
        }]);

        return JSDocComment;
      }(LeadingComment);

      var Statement = /*#__PURE__*/function () {
        function Statement() {
          var modifiers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
          var sourceSpan = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
          var leadingComments = arguments.length > 2 ? arguments[2] : undefined;

          _classCallCheck(this, Statement);

          this.modifiers = modifiers;
          this.sourceSpan = sourceSpan;
          this.leadingComments = leadingComments;
        }

        _createClass2(Statement, [{
          key: "hasModifier",
          value: function hasModifier(modifier) {
            return this.modifiers.indexOf(modifier) !== -1;
          }
        }, {
          key: "addLeadingComment",
          value: function addLeadingComment(leadingComment) {
            var _a;

            this.leadingComments = (_a = this.leadingComments) !== null && _a !== void 0 ? _a : [];
            this.leadingComments.push(leadingComment);
          }
        }]);

        return Statement;
      }();

      var DeclareVarStmt = /*#__PURE__*/function (_Statement) {
        _inherits(DeclareVarStmt, _Statement);

        var _super38 = _createSuper(DeclareVarStmt);

        function DeclareVarStmt(name, value, type, modifiers, sourceSpan, leadingComments) {
          var _this37;

          _classCallCheck(this, DeclareVarStmt);

          _this37 = _super38.call(this, modifiers, sourceSpan, leadingComments);
          _this37.name = name;
          _this37.value = value;
          _this37.type = type || value && value.type || null;
          return _this37;
        }

        _createClass2(DeclareVarStmt, [{
          key: "isEquivalent",
          value: function isEquivalent(stmt) {
            return stmt instanceof DeclareVarStmt && this.name === stmt.name && (this.value ? !!stmt.value && this.value.isEquivalent(stmt.value) : !stmt.value);
          }
        }, {
          key: "visitStatement",
          value: function visitStatement(visitor, context) {
            return visitor.visitDeclareVarStmt(this, context);
          }
        }]);

        return DeclareVarStmt;
      }(Statement);

      var DeclareFunctionStmt = /*#__PURE__*/function (_Statement2) {
        _inherits(DeclareFunctionStmt, _Statement2);

        var _super39 = _createSuper(DeclareFunctionStmt);

        function DeclareFunctionStmt(name, params, statements, type, modifiers, sourceSpan, leadingComments) {
          var _this38;

          _classCallCheck(this, DeclareFunctionStmt);

          _this38 = _super39.call(this, modifiers, sourceSpan, leadingComments);
          _this38.name = name;
          _this38.params = params;
          _this38.statements = statements;
          _this38.type = type || null;
          return _this38;
        }

        _createClass2(DeclareFunctionStmt, [{
          key: "isEquivalent",
          value: function isEquivalent(stmt) {
            return stmt instanceof DeclareFunctionStmt && areAllEquivalent(this.params, stmt.params) && areAllEquivalent(this.statements, stmt.statements);
          }
        }, {
          key: "visitStatement",
          value: function visitStatement(visitor, context) {
            return visitor.visitDeclareFunctionStmt(this, context);
          }
        }]);

        return DeclareFunctionStmt;
      }(Statement);

      var ExpressionStatement = /*#__PURE__*/function (_Statement3) {
        _inherits(ExpressionStatement, _Statement3);

        var _super40 = _createSuper(ExpressionStatement);

        function ExpressionStatement(expr, sourceSpan, leadingComments) {
          var _this39;

          _classCallCheck(this, ExpressionStatement);

          _this39 = _super40.call(this, [], sourceSpan, leadingComments);
          _this39.expr = expr;
          return _this39;
        }

        _createClass2(ExpressionStatement, [{
          key: "isEquivalent",
          value: function isEquivalent(stmt) {
            return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr);
          }
        }, {
          key: "visitStatement",
          value: function visitStatement(visitor, context) {
            return visitor.visitExpressionStmt(this, context);
          }
        }]);

        return ExpressionStatement;
      }(Statement);

      var ReturnStatement = /*#__PURE__*/function (_Statement4) {
        _inherits(ReturnStatement, _Statement4);

        var _super41 = _createSuper(ReturnStatement);

        function ReturnStatement(value) {
          var _this40;

          var sourceSpan = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
          var leadingComments = arguments.length > 2 ? arguments[2] : undefined;

          _classCallCheck(this, ReturnStatement);

          _this40 = _super41.call(this, [], sourceSpan, leadingComments);
          _this40.value = value;
          return _this40;
        }

        _createClass2(ReturnStatement, [{
          key: "isEquivalent",
          value: function isEquivalent(stmt) {
            return stmt instanceof ReturnStatement && this.value.isEquivalent(stmt.value);
          }
        }, {
          key: "visitStatement",
          value: function visitStatement(visitor, context) {
            return visitor.visitReturnStmt(this, context);
          }
        }]);

        return ReturnStatement;
      }(Statement);

      var AbstractClassPart = /*#__PURE__*/function () {
        function AbstractClassPart() {
          var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
          var modifiers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];

          _classCallCheck(this, AbstractClassPart);

          this.type = type;
          this.modifiers = modifiers;
        }

        _createClass2(AbstractClassPart, [{
          key: "hasModifier",
          value: function hasModifier(modifier) {
            return this.modifiers.indexOf(modifier) !== -1;
          }
        }]);

        return AbstractClassPart;
      }();

      var ClassField = /*#__PURE__*/function (_AbstractClassPart) {
        _inherits(ClassField, _AbstractClassPart);

        var _super42 = _createSuper(ClassField);

        function ClassField(name, type, modifiers, initializer) {
          var _this41;

          _classCallCheck(this, ClassField);

          _this41 = _super42.call(this, type, modifiers);
          _this41.name = name;
          _this41.initializer = initializer;
          return _this41;
        }

        _createClass2(ClassField, [{
          key: "isEquivalent",
          value: function isEquivalent(f) {
            return this.name === f.name;
          }
        }]);

        return ClassField;
      }(AbstractClassPart);

      var ClassMethod = /*#__PURE__*/function (_AbstractClassPart2) {
        _inherits(ClassMethod, _AbstractClassPart2);

        var _super43 = _createSuper(ClassMethod);

        function ClassMethod(name, params, body, type, modifiers) {
          var _this42;

          _classCallCheck(this, ClassMethod);

          _this42 = _super43.call(this, type, modifiers);
          _this42.name = name;
          _this42.params = params;
          _this42.body = body;
          return _this42;
        }

        _createClass2(ClassMethod, [{
          key: "isEquivalent",
          value: function isEquivalent(m) {
            return this.name === m.name && areAllEquivalent(this.body, m.body);
          }
        }]);

        return ClassMethod;
      }(AbstractClassPart);

      var ClassGetter = /*#__PURE__*/function (_AbstractClassPart3) {
        _inherits(ClassGetter, _AbstractClassPart3);

        var _super44 = _createSuper(ClassGetter);

        function ClassGetter(name, body, type, modifiers) {
          var _this43;

          _classCallCheck(this, ClassGetter);

          _this43 = _super44.call(this, type, modifiers);
          _this43.name = name;
          _this43.body = body;
          return _this43;
        }

        _createClass2(ClassGetter, [{
          key: "isEquivalent",
          value: function isEquivalent(m) {
            return this.name === m.name && areAllEquivalent(this.body, m.body);
          }
        }]);

        return ClassGetter;
      }(AbstractClassPart);

      var ClassStmt = /*#__PURE__*/function (_Statement5) {
        _inherits(ClassStmt, _Statement5);

        var _super45 = _createSuper(ClassStmt);

        function ClassStmt(name, parent, fields, getters, constructorMethod, methods, modifiers, sourceSpan, leadingComments) {
          var _this44;

          _classCallCheck(this, ClassStmt);

          _this44 = _super45.call(this, modifiers, sourceSpan, leadingComments);
          _this44.name = name;
          _this44.parent = parent;
          _this44.fields = fields;
          _this44.getters = getters;
          _this44.constructorMethod = constructorMethod;
          _this44.methods = methods;
          return _this44;
        }

        _createClass2(ClassStmt, [{
          key: "isEquivalent",
          value: function isEquivalent(stmt) {
            return stmt instanceof ClassStmt && this.name === stmt.name && nullSafeIsEquivalent(this.parent, stmt.parent) && areAllEquivalent(this.fields, stmt.fields) && areAllEquivalent(this.getters, stmt.getters) && this.constructorMethod.isEquivalent(stmt.constructorMethod) && areAllEquivalent(this.methods, stmt.methods);
          }
        }, {
          key: "visitStatement",
          value: function visitStatement(visitor, context) {
            return visitor.visitDeclareClassStmt(this, context);
          }
        }]);

        return ClassStmt;
      }(Statement);

      var IfStmt = /*#__PURE__*/function (_Statement6) {
        _inherits(IfStmt, _Statement6);

        var _super46 = _createSuper(IfStmt);

        function IfStmt(condition, trueCase) {
          var _this45;

          var falseCase = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
          var sourceSpan = arguments.length > 3 ? arguments[3] : undefined;
          var leadingComments = arguments.length > 4 ? arguments[4] : undefined;

          _classCallCheck(this, IfStmt);

          _this45 = _super46.call(this, [], sourceSpan, leadingComments);
          _this45.condition = condition;
          _this45.trueCase = trueCase;
          _this45.falseCase = falseCase;
          return _this45;
        }

        _createClass2(IfStmt, [{
          key: "isEquivalent",
          value: function isEquivalent(stmt) {
            return stmt instanceof IfStmt && this.condition.isEquivalent(stmt.condition) && areAllEquivalent(this.trueCase, stmt.trueCase) && areAllEquivalent(this.falseCase, stmt.falseCase);
          }
        }, {
          key: "visitStatement",
          value: function visitStatement(visitor, context) {
            return visitor.visitIfStmt(this, context);
          }
        }]);

        return IfStmt;
      }(Statement);

      var TryCatchStmt = /*#__PURE__*/function (_Statement7) {
        _inherits(TryCatchStmt, _Statement7);

        var _super47 = _createSuper(TryCatchStmt);

        function TryCatchStmt(bodyStmts, catchStmts) {
          var _this46;

          var sourceSpan = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
          var leadingComments = arguments.length > 3 ? arguments[3] : undefined;

          _classCallCheck(this, TryCatchStmt);

          _this46 = _super47.call(this, [], sourceSpan, leadingComments);
          _this46.bodyStmts = bodyStmts;
          _this46.catchStmts = catchStmts;
          return _this46;
        }

        _createClass2(TryCatchStmt, [{
          key: "isEquivalent",
          value: function isEquivalent(stmt) {
            return stmt instanceof TryCatchStmt && areAllEquivalent(this.bodyStmts, stmt.bodyStmts) && areAllEquivalent(this.catchStmts, stmt.catchStmts);
          }
        }, {
          key: "visitStatement",
          value: function visitStatement(visitor, context) {
            return visitor.visitTryCatchStmt(this, context);
          }
        }]);

        return TryCatchStmt;
      }(Statement);

      var ThrowStmt = /*#__PURE__*/function (_Statement8) {
        _inherits(ThrowStmt, _Statement8);

        var _super48 = _createSuper(ThrowStmt);

        function ThrowStmt(error) {
          var _this47;

          var sourceSpan = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
          var leadingComments = arguments.length > 2 ? arguments[2] : undefined;

          _classCallCheck(this, ThrowStmt);

          _this47 = _super48.call(this, [], sourceSpan, leadingComments);
          _this47.error = error;
          return _this47;
        }

        _createClass2(ThrowStmt, [{
          key: "isEquivalent",
          value: function isEquivalent(stmt) {
            return stmt instanceof TryCatchStmt && this.error.isEquivalent(stmt.error);
          }
        }, {
          key: "visitStatement",
          value: function visitStatement(visitor, context) {
            return visitor.visitThrowStmt(this, context);
          }
        }]);

        return ThrowStmt;
      }(Statement);

      var AstTransformer = /*#__PURE__*/function () {
        function AstTransformer() {
          _classCallCheck(this, AstTransformer);
        }

        _createClass2(AstTransformer, [{
          key: "transformExpr",
          value: function transformExpr(expr, context) {
            return expr;
          }
        }, {
          key: "transformStmt",
          value: function transformStmt(stmt, context) {
            return stmt;
          }
        }, {
          key: "visitReadVarExpr",
          value: function visitReadVarExpr(ast, context) {
            return this.transformExpr(ast, context);
          }
        }, {
          key: "visitWrappedNodeExpr",
          value: function visitWrappedNodeExpr(ast, context) {
            return this.transformExpr(ast, context);
          }
        }, {
          key: "visitTypeofExpr",
          value: function visitTypeofExpr(expr, context) {
            return this.transformExpr(new TypeofExpr(expr.expr.visitExpression(this, context), expr.type, expr.sourceSpan), context);
          }
        }, {
          key: "visitWriteVarExpr",
          value: function visitWriteVarExpr(expr, context) {
            return this.transformExpr(new WriteVarExpr(expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);
          }
        }, {
          key: "visitWriteKeyExpr",
          value: function visitWriteKeyExpr(expr, context) {
            return this.transformExpr(new WriteKeyExpr(expr.receiver.visitExpression(this, context), expr.index.visitExpression(this, context), expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);
          }
        }, {
          key: "visitWritePropExpr",
          value: function visitWritePropExpr(expr, context) {
            return this.transformExpr(new WritePropExpr(expr.receiver.visitExpression(this, context), expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);
          }
        }, {
          key: "visitInvokeMethodExpr",
          value: function visitInvokeMethodExpr(ast, context) {
            var method = ast.builtin || ast.name;
            return this.transformExpr(new InvokeMethodExpr(ast.receiver.visitExpression(this, context), method, this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);
          }
        }, {
          key: "visitInvokeFunctionExpr",
          value: function visitInvokeFunctionExpr(ast, context) {
            return this.transformExpr(new InvokeFunctionExpr(ast.fn.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);
          }
        }, {
          key: "visitInstantiateExpr",
          value: function visitInstantiateExpr(ast, context) {
            return this.transformExpr(new InstantiateExpr(ast.classExpr.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);
          }
        }, {
          key: "visitLiteralExpr",
          value: function visitLiteralExpr(ast, context) {
            return this.transformExpr(ast, context);
          }
        }, {
          key: "visitLocalizedString",
          value: function visitLocalizedString(ast, context) {
            return this.transformExpr(new LocalizedString(ast.metaBlock, ast.messageParts, ast.placeHolderNames, this.visitAllExpressions(ast.expressions, context), ast.sourceSpan), context);
          }
        }, {
          key: "visitExternalExpr",
          value: function visitExternalExpr(ast, context) {
            return this.transformExpr(ast, context);
          }
        }, {
          key: "visitConditionalExpr",
          value: function visitConditionalExpr(ast, context) {
            return this.transformExpr(new ConditionalExpr(ast.condition.visitExpression(this, context), ast.trueCase.visitExpression(this, context), ast.falseCase.visitExpression(this, context), ast.type, ast.sourceSpan), context);
          }
        }, {
          key: "visitNotExpr",
          value: function visitNotExpr(ast, context) {
            return this.transformExpr(new NotExpr(ast.condition.visitExpression(this, context), ast.sourceSpan), context);
          }
        }, {
          key: "visitAssertNotNullExpr",
          value: function visitAssertNotNullExpr(ast, context) {
            return this.transformExpr(new AssertNotNull(ast.condition.visitExpression(this, context), ast.sourceSpan), context);
          }
        }, {
          key: "visitCastExpr",
          value: function visitCastExpr(ast, context) {
            return this.transformExpr(new CastExpr(ast.value.visitExpression(this, context), ast.type, ast.sourceSpan), context);
          }
        }, {
          key: "visitFunctionExpr",
          value: function visitFunctionExpr(ast, context) {
            return this.transformExpr(new FunctionExpr(ast.params, this.visitAllStatements(ast.statements, context), ast.type, ast.sourceSpan), context);
          }
        }, {
          key: "visitUnaryOperatorExpr",
          value: function visitUnaryOperatorExpr(ast, context) {
            return this.transformExpr(new UnaryOperatorExpr(ast.operator, ast.expr.visitExpression(this, context), ast.type, ast.sourceSpan), context);
          }
        }, {
          key: "visitBinaryOperatorExpr",
          value: function visitBinaryOperatorExpr(ast, context) {
            return this.transformExpr(new BinaryOperatorExpr(ast.operator, ast.lhs.visitExpression(this, context), ast.rhs.visitExpression(this, context), ast.type, ast.sourceSpan), context);
          }
        }, {
          key: "visitReadPropExpr",
          value: function visitReadPropExpr(ast, context) {
            return this.transformExpr(new ReadPropExpr(ast.receiver.visitExpression(this, context), ast.name, ast.type, ast.sourceSpan), context);
          }
        }, {
          key: "visitReadKeyExpr",
          value: function visitReadKeyExpr(ast, context) {
            return this.transformExpr(new ReadKeyExpr(ast.receiver.visitExpression(this, context), ast.index.visitExpression(this, context), ast.type, ast.sourceSpan), context);
          }
        }, {
          key: "visitLiteralArrayExpr",
          value: function visitLiteralArrayExpr(ast, context) {
            return this.transformExpr(new LiteralArrayExpr(this.visitAllExpressions(ast.entries, context), ast.type, ast.sourceSpan), context);
          }
        }, {
          key: "visitLiteralMapExpr",
          value: function visitLiteralMapExpr(ast, context) {
            var _this48 = this;

            var entries = ast.entries.map(function (entry) {
              return new LiteralMapEntry(entry.key, entry.value.visitExpression(_this48, context), entry.quoted);
            });
            var mapType = new MapType(ast.valueType);
            return this.transformExpr(new LiteralMapExpr(entries, mapType, ast.sourceSpan), context);
          }
        }, {
          key: "visitCommaExpr",
          value: function visitCommaExpr(ast, context) {
            return this.transformExpr(new CommaExpr(this.visitAllExpressions(ast.parts, context), ast.sourceSpan), context);
          }
        }, {
          key: "visitAllExpressions",
          value: function visitAllExpressions(exprs, context) {
            var _this49 = this;

            return exprs.map(function (expr) {
              return expr.visitExpression(_this49, context);
            });
          }
        }, {
          key: "visitDeclareVarStmt",
          value: function visitDeclareVarStmt(stmt, context) {
            var value = stmt.value && stmt.value.visitExpression(this, context);
            return this.transformStmt(new DeclareVarStmt(stmt.name, value, stmt.type, stmt.modifiers, stmt.sourceSpan, stmt.leadingComments), context);
          }
        }, {
          key: "visitDeclareFunctionStmt",
          value: function visitDeclareFunctionStmt(stmt, context) {
            return this.transformStmt(new DeclareFunctionStmt(stmt.name, stmt.params, this.visitAllStatements(stmt.statements, context), stmt.type, stmt.modifiers, stmt.sourceSpan, stmt.leadingComments), context);
          }
        }, {
          key: "visitExpressionStmt",
          value: function visitExpressionStmt(stmt, context) {
            return this.transformStmt(new ExpressionStatement(stmt.expr.visitExpression(this, context), stmt.sourceSpan, stmt.leadingComments), context);
          }
        }, {
          key: "visitReturnStmt",
          value: function visitReturnStmt(stmt, context) {
            return this.transformStmt(new ReturnStatement(stmt.value.visitExpression(this, context), stmt.sourceSpan, stmt.leadingComments), context);
          }
        }, {
          key: "visitDeclareClassStmt",
          value: function visitDeclareClassStmt(stmt, context) {
            var _this50 = this;

            var parent = stmt.parent.visitExpression(this, context);
            var getters = stmt.getters.map(function (getter) {
              return new ClassGetter(getter.name, _this50.visitAllStatements(getter.body, context), getter.type, getter.modifiers);
            });
            var ctorMethod = stmt.constructorMethod && new ClassMethod(stmt.constructorMethod.name, stmt.constructorMethod.params, this.visitAllStatements(stmt.constructorMethod.body, context), stmt.constructorMethod.type, stmt.constructorMethod.modifiers);
            var methods = stmt.methods.map(function (method) {
              return new ClassMethod(method.name, method.params, _this50.visitAllStatements(method.body, context), method.type, method.modifiers);
            });
            return this.transformStmt(new ClassStmt(stmt.name, parent, stmt.fields, getters, ctorMethod, methods, stmt.modifiers, stmt.sourceSpan), context);
          }
        }, {
          key: "visitIfStmt",
          value: function visitIfStmt(stmt, context) {
            return this.transformStmt(new IfStmt(stmt.condition.visitExpression(this, context), this.visitAllStatements(stmt.trueCase, context), this.visitAllStatements(stmt.falseCase, context), stmt.sourceSpan, stmt.leadingComments), context);
          }
        }, {
          key: "visitTryCatchStmt",
          value: function visitTryCatchStmt(stmt, context) {
            return this.transformStmt(new TryCatchStmt(this.visitAllStatements(stmt.bodyStmts, context), this.visitAllStatements(stmt.catchStmts, context), stmt.sourceSpan, stmt.leadingComments), context);
          }
        }, {
          key: "visitThrowStmt",
          value: function visitThrowStmt(stmt, context) {
            return this.transformStmt(new ThrowStmt(stmt.error.visitExpression(this, context), stmt.sourceSpan, stmt.leadingComments), context);
          }
        }, {
          key: "visitAllStatements",
          value: function visitAllStatements(stmts, context) {
            var _this51 = this;

            return stmts.map(function (stmt) {
              return stmt.visitStatement(_this51, context);
            });
          }
        }]);

        return AstTransformer;
      }();

      var RecursiveAstVisitor = /*#__PURE__*/function () {
        function RecursiveAstVisitor() {
          _classCallCheck(this, RecursiveAstVisitor);
        }

        _createClass2(RecursiveAstVisitor, [{
          key: "visitType",
          value: function visitType(ast, context) {
            return ast;
          }
        }, {
          key: "visitExpression",
          value: function visitExpression(ast, context) {
            if (ast.type) {
              ast.type.visitType(this, context);
            }

            return ast;
          }
        }, {
          key: "visitBuiltinType",
          value: function visitBuiltinType(type, context) {
            return this.visitType(type, context);
          }
        }, {
          key: "visitExpressionType",
          value: function visitExpressionType(type, context) {
            var _this52 = this;

            type.value.visitExpression(this, context);

            if (type.typeParams !== null) {
              type.typeParams.forEach(function (param) {
                return _this52.visitType(param, context);
              });
            }

            return this.visitType(type, context);
          }
        }, {
          key: "visitArrayType",
          value: function visitArrayType(type, context) {
            return this.visitType(type, context);
          }
        }, {
          key: "visitMapType",
          value: function visitMapType(type, context) {
            return this.visitType(type, context);
          }
        }, {
          key: "visitWrappedNodeExpr",
          value: function visitWrappedNodeExpr(ast, context) {
            return ast;
          }
        }, {
          key: "visitTypeofExpr",
          value: function visitTypeofExpr(ast, context) {
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitReadVarExpr",
          value: function visitReadVarExpr(ast, context) {
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitWriteVarExpr",
          value: function visitWriteVarExpr(ast, context) {
            ast.value.visitExpression(this, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitWriteKeyExpr",
          value: function visitWriteKeyExpr(ast, context) {
            ast.receiver.visitExpression(this, context);
            ast.index.visitExpression(this, context);
            ast.value.visitExpression(this, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitWritePropExpr",
          value: function visitWritePropExpr(ast, context) {
            ast.receiver.visitExpression(this, context);
            ast.value.visitExpression(this, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitInvokeMethodExpr",
          value: function visitInvokeMethodExpr(ast, context) {
            ast.receiver.visitExpression(this, context);
            this.visitAllExpressions(ast.args, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitInvokeFunctionExpr",
          value: function visitInvokeFunctionExpr(ast, context) {
            ast.fn.visitExpression(this, context);
            this.visitAllExpressions(ast.args, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitInstantiateExpr",
          value: function visitInstantiateExpr(ast, context) {
            ast.classExpr.visitExpression(this, context);
            this.visitAllExpressions(ast.args, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitLiteralExpr",
          value: function visitLiteralExpr(ast, context) {
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitLocalizedString",
          value: function visitLocalizedString(ast, context) {
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitExternalExpr",
          value: function visitExternalExpr(ast, context) {
            var _this53 = this;

            if (ast.typeParams) {
              ast.typeParams.forEach(function (type) {
                return type.visitType(_this53, context);
              });
            }

            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitConditionalExpr",
          value: function visitConditionalExpr(ast, context) {
            ast.condition.visitExpression(this, context);
            ast.trueCase.visitExpression(this, context);
            ast.falseCase.visitExpression(this, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitNotExpr",
          value: function visitNotExpr(ast, context) {
            ast.condition.visitExpression(this, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitAssertNotNullExpr",
          value: function visitAssertNotNullExpr(ast, context) {
            ast.condition.visitExpression(this, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitCastExpr",
          value: function visitCastExpr(ast, context) {
            ast.value.visitExpression(this, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitFunctionExpr",
          value: function visitFunctionExpr(ast, context) {
            this.visitAllStatements(ast.statements, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitUnaryOperatorExpr",
          value: function visitUnaryOperatorExpr(ast, context) {
            ast.expr.visitExpression(this, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitBinaryOperatorExpr",
          value: function visitBinaryOperatorExpr(ast, context) {
            ast.lhs.visitExpression(this, context);
            ast.rhs.visitExpression(this, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitReadPropExpr",
          value: function visitReadPropExpr(ast, context) {
            ast.receiver.visitExpression(this, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitReadKeyExpr",
          value: function visitReadKeyExpr(ast, context) {
            ast.receiver.visitExpression(this, context);
            ast.index.visitExpression(this, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitLiteralArrayExpr",
          value: function visitLiteralArrayExpr(ast, context) {
            this.visitAllExpressions(ast.entries, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitLiteralMapExpr",
          value: function visitLiteralMapExpr(ast, context) {
            var _this54 = this;

            ast.entries.forEach(function (entry) {
              return entry.value.visitExpression(_this54, context);
            });
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitCommaExpr",
          value: function visitCommaExpr(ast, context) {
            this.visitAllExpressions(ast.parts, context);
            return this.visitExpression(ast, context);
          }
        }, {
          key: "visitAllExpressions",
          value: function visitAllExpressions(exprs, context) {
            var _this55 = this;

            exprs.forEach(function (expr) {
              return expr.visitExpression(_this55, context);
            });
          }
        }, {
          key: "visitDeclareVarStmt",
          value: function visitDeclareVarStmt(stmt, context) {
            if (stmt.value) {
              stmt.value.visitExpression(this, context);
            }

            if (stmt.type) {
              stmt.type.visitType(this, context);
            }

            return stmt;
          }
        }, {
          key: "visitDeclareFunctionStmt",
          value: function visitDeclareFunctionStmt(stmt, context) {
            this.visitAllStatements(stmt.statements, context);

            if (stmt.type) {
              stmt.type.visitType(this, context);
            }

            return stmt;
          }
        }, {
          key: "visitExpressionStmt",
          value: function visitExpressionStmt(stmt, context) {
            stmt.expr.visitExpression(this, context);
            return stmt;
          }
        }, {
          key: "visitReturnStmt",
          value: function visitReturnStmt(stmt, context) {
            stmt.value.visitExpression(this, context);
            return stmt;
          }
        }, {
          key: "visitDeclareClassStmt",
          value: function visitDeclareClassStmt(stmt, context) {
            var _this56 = this;

            stmt.parent.visitExpression(this, context);
            stmt.getters.forEach(function (getter) {
              return _this56.visitAllStatements(getter.body, context);
            });

            if (stmt.constructorMethod) {
              this.visitAllStatements(stmt.constructorMethod.body, context);
            }

            stmt.methods.forEach(function (method) {
              return _this56.visitAllStatements(method.body, context);
            });
            return stmt;
          }
        }, {
          key: "visitIfStmt",
          value: function visitIfStmt(stmt, context) {
            stmt.condition.visitExpression(this, context);
            this.visitAllStatements(stmt.trueCase, context);
            this.visitAllStatements(stmt.falseCase, context);
            return stmt;
          }
        }, {
          key: "visitTryCatchStmt",
          value: function visitTryCatchStmt(stmt, context) {
            this.visitAllStatements(stmt.bodyStmts, context);
            this.visitAllStatements(stmt.catchStmts, context);
            return stmt;
          }
        }, {
          key: "visitThrowStmt",
          value: function visitThrowStmt(stmt, context) {
            stmt.error.visitExpression(this, context);
            return stmt;
          }
        }, {
          key: "visitAllStatements",
          value: function visitAllStatements(stmts, context) {
            var _this57 = this;

            stmts.forEach(function (stmt) {
              return stmt.visitStatement(_this57, context);
            });
          }
        }]);

        return RecursiveAstVisitor;
      }();

      function findReadVarNames(stmts) {
        var visitor = new _ReadVarVisitor();
        visitor.visitAllStatements(stmts, null);
        return visitor.varNames;
      }

      var _ReadVarVisitor = /*#__PURE__*/function (_RecursiveAstVisitor) {
        _inherits(_ReadVarVisitor, _RecursiveAstVisitor);

        var _super49 = _createSuper(_ReadVarVisitor);

        function _ReadVarVisitor() {
          var _this58;

          _classCallCheck(this, _ReadVarVisitor);

          _this58 = _super49.apply(this, arguments);
          _this58.varNames = new Set();
          return _this58;
        }

        _createClass2(_ReadVarVisitor, [{
          key: "visitDeclareFunctionStmt",
          value: function visitDeclareFunctionStmt(stmt, context) {
            // Don't descend into nested functions
            return stmt;
          }
        }, {
          key: "visitDeclareClassStmt",
          value: function visitDeclareClassStmt(stmt, context) {
            // Don't descend into nested classes
            return stmt;
          }
        }, {
          key: "visitReadVarExpr",
          value: function visitReadVarExpr(ast, context) {
            if (ast.name) {
              this.varNames.add(ast.name);
            }

            return null;
          }
        }]);

        return _ReadVarVisitor;
      }(RecursiveAstVisitor);

      function collectExternalReferences(stmts) {
        var visitor = new _FindExternalReferencesVisitor();
        visitor.visitAllStatements(stmts, null);
        return visitor.externalReferences;
      }

      var _FindExternalReferencesVisitor = /*#__PURE__*/function (_RecursiveAstVisitor2) {
        _inherits(_FindExternalReferencesVisitor, _RecursiveAstVisitor2);

        var _super50 = _createSuper(_FindExternalReferencesVisitor);

        function _FindExternalReferencesVisitor() {
          var _this59;

          _classCallCheck(this, _FindExternalReferencesVisitor);

          _this59 = _super50.apply(this, arguments);
          _this59.externalReferences = [];
          return _this59;
        }

        _createClass2(_FindExternalReferencesVisitor, [{
          key: "visitExternalExpr",
          value: function visitExternalExpr(e, context) {
            this.externalReferences.push(e.value);
            return _get(_getPrototypeOf(_FindExternalReferencesVisitor.prototype), "visitExternalExpr", this).call(this, e, context);
          }
        }]);

        return _FindExternalReferencesVisitor;
      }(RecursiveAstVisitor);

      function applySourceSpanToStatementIfNeeded(stmt, sourceSpan) {
        if (!sourceSpan) {
          return stmt;
        }

        var transformer = new _ApplySourceSpanTransformer(sourceSpan);
        return stmt.visitStatement(transformer, null);
      }

      function applySourceSpanToExpressionIfNeeded(expr, sourceSpan) {
        if (!sourceSpan) {
          return expr;
        }

        var transformer = new _ApplySourceSpanTransformer(sourceSpan);
        return expr.visitExpression(transformer, null);
      }

      var _ApplySourceSpanTransformer = /*#__PURE__*/function (_AstTransformer) {
        _inherits(_ApplySourceSpanTransformer, _AstTransformer);

        var _super51 = _createSuper(_ApplySourceSpanTransformer);

        function _ApplySourceSpanTransformer(sourceSpan) {
          var _this60;

          _classCallCheck(this, _ApplySourceSpanTransformer);

          _this60 = _super51.call(this);
          _this60.sourceSpan = sourceSpan;
          return _this60;
        }

        _createClass2(_ApplySourceSpanTransformer, [{
          key: "_clone",
          value: function _clone(obj) {
            var clone = Object.create(obj.constructor.prototype);

            for (var _i5 = 0, _Object$keys = Object.keys(obj); _i5 < _Object$keys.length; _i5++) {
              var prop = _Object$keys[_i5];
              clone[prop] = obj[prop];
            }

            return clone;
          }
        }, {
          key: "transformExpr",
          value: function transformExpr(expr, context) {
            if (!expr.sourceSpan) {
              expr = this._clone(expr);
              expr.sourceSpan = this.sourceSpan;
            }

            return expr;
          }
        }, {
          key: "transformStmt",
          value: function transformStmt(stmt, context) {
            if (!stmt.sourceSpan) {
              stmt = this._clone(stmt);
              stmt.sourceSpan = this.sourceSpan;
            }

            return stmt;
          }
        }]);

        return _ApplySourceSpanTransformer;
      }(AstTransformer);

      function leadingComment(text) {
        var multiline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
        var trailingNewline = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
        return new LeadingComment(text, multiline, trailingNewline);
      }

      function jsDocComment() {
        var tags = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
        return new JSDocComment(tags);
      }

      function variable(name, type, sourceSpan) {
        return new ReadVarExpr(name, type, sourceSpan);
      }

      function importExpr(id) {
        var typeParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
        var sourceSpan = arguments.length > 2 ? arguments[2] : undefined;
        return new ExternalExpr(id, null, typeParams, sourceSpan);
      }

      function importType(id, typeParams, typeModifiers) {
        return id != null ? expressionType(importExpr(id, typeParams, null), typeModifiers) : null;
      }

      function expressionType(expr, typeModifiers, typeParams) {
        return new ExpressionType(expr, typeModifiers, typeParams);
      }

      function typeofExpr(expr) {
        return new TypeofExpr(expr);
      }

      function literalArr(values, type, sourceSpan) {
        return new LiteralArrayExpr(values, type, sourceSpan);
      }

      function literalMap(values) {
        var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
        return new LiteralMapExpr(values.map(function (e) {
          return new LiteralMapEntry(e.key, e.value, e.quoted);
        }), type, null);
      }

      function unary(operator, expr, type, sourceSpan) {
        return new UnaryOperatorExpr(operator, expr, type, sourceSpan);
      }

      function not(expr, sourceSpan) {
        return new NotExpr(expr, sourceSpan);
      }

      function assertNotNull(expr, sourceSpan) {
        return new AssertNotNull(expr, sourceSpan);
      }

      function fn(params, body, type, sourceSpan, name) {
        return new FunctionExpr(params, body, type, sourceSpan, name);
      }

      function ifStmt(condition, thenClause, elseClause, sourceSpan, leadingComments) {
        return new IfStmt(condition, thenClause, elseClause, sourceSpan, leadingComments);
      }

      function literal(value, type, sourceSpan) {
        return new LiteralExpr(value, type, sourceSpan);
      }

      function localizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan) {
        return new LocalizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan);
      }

      function isNull(exp) {
        return exp instanceof LiteralExpr && exp.value === null;
      }
      /*
       * Serializes a `Tag` into a string.
       * Returns a string like " @foo {bar} baz" (note the leading whitespace before `@foo`).
       */


      function tagToString(tag) {
        var out = '';

        if (tag.tagName) {
          out += " @".concat(tag.tagName);
        }

        if (tag.text) {
          if (tag.text.match(/\/\*|\*\//)) {
            throw new Error('JSDoc text cannot contain "/*" and "*/"');
          }

          out += ' ' + tag.text.replace(/@/g, '\\@');
        }

        return out;
      }

      function serializeTags(tags) {
        if (tags.length === 0) return '';

        if (tags.length === 1 && tags[0].tagName && !tags[0].text) {
          // The JSDOC comment is a single simple tag: e.g `/** @tagname */`.
          return "*".concat(tagToString(tags[0]), " ");
        }

        var out = '*\n';

        var _iterator = _createForOfIteratorHelper(tags),
            _step;

        try {
          for (_iterator.s(); !(_step = _iterator.n()).done;) {
            var tag = _step.value;
            out += ' *'; // If the tagToString is multi-line, insert " * " prefixes on lines.

            out += tagToString(tag).replace(/\n/g, '\n * ');
            out += '\n';
          }
        } catch (err) {
          _iterator.e(err);
        } finally {
          _iterator.f();
        }

        out += ' ';
        return out;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var DASH_CASE_REGEXP = /-+([a-z0-9])/g;

      function dashCaseToCamelCase(input) {
        return input.replace(DASH_CASE_REGEXP, function () {
          for (var _len3 = arguments.length, m = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
            m[_key3] = arguments[_key3];
          }

          return m[1].toUpperCase();
        });
      }

      function splitAtColon(input, defaultValues) {
        return _splitAt(input, ':', defaultValues);
      }

      function splitAtPeriod(input, defaultValues) {
        return _splitAt(input, '.', defaultValues);
      }

      function _splitAt(input, character, defaultValues) {
        var characterIndex = input.indexOf(character);
        if (characterIndex == -1) return defaultValues;
        return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];
      }

      function visitValue(value, visitor, context) {
        if (Array.isArray(value)) {
          return visitor.visitArray(value, context);
        }

        if (isStrictStringMap(value)) {
          return visitor.visitStringMap(value, context);
        }

        if (value == null || typeof value == 'string' || typeof value == 'number' || typeof value == 'boolean') {
          return visitor.visitPrimitive(value, context);
        }

        return visitor.visitOther(value, context);
      }

      function isDefined(val) {
        return val !== null && val !== undefined;
      }

      function noUndefined(val) {
        return val === undefined ? null : val;
      }

      var ValueTransformer = /*#__PURE__*/function () {
        function ValueTransformer() {
          _classCallCheck(this, ValueTransformer);
        }

        _createClass2(ValueTransformer, [{
          key: "visitArray",
          value: function visitArray(arr, context) {
            var _this61 = this;

            return arr.map(function (value) {
              return visitValue(value, _this61, context);
            });
          }
        }, {
          key: "visitStringMap",
          value: function visitStringMap(map, context) {
            var _this62 = this;

            var result = {};
            Object.keys(map).forEach(function (key) {
              result[key] = visitValue(map[key], _this62, context);
            });
            return result;
          }
        }, {
          key: "visitPrimitive",
          value: function visitPrimitive(value, context) {
            return value;
          }
        }, {
          key: "visitOther",
          value: function visitOther(value, context) {
            return value;
          }
        }]);

        return ValueTransformer;
      }();

      var SyncAsync = {
        assertSync: function assertSync(value) {
          if (isPromise(value)) {
            throw new Error("Illegal state: value cannot be a promise");
          }

          return value;
        },
        then: function then(value, cb) {
          return isPromise(value) ? value.then(cb) : cb(value);
        },
        all: function all(syncAsyncValues) {
          return syncAsyncValues.some(isPromise) ? Promise.all(syncAsyncValues) : syncAsyncValues;
        }
      };

      function error(msg) {
        throw new Error("Internal Error: ".concat(msg));
      }

      function syntaxError(msg, parseErrors) {
        var error = Error(msg);
        error[ERROR_SYNTAX_ERROR] = true;
        if (parseErrors) error[ERROR_PARSE_ERRORS] = parseErrors;
        return error;
      }

      var ERROR_SYNTAX_ERROR = 'ngSyntaxError';
      var ERROR_PARSE_ERRORS = 'ngParseErrors';

      function isSyntaxError(error) {
        return error[ERROR_SYNTAX_ERROR];
      }

      function getParseErrors(error) {
        return error[ERROR_PARSE_ERRORS] || [];
      } // Escape characters that have a special meaning in Regular Expressions


      function escapeRegExp(s) {
        return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
      }

      var STRING_MAP_PROTO = Object.getPrototypeOf({});

      function isStrictStringMap(obj) {
        return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
      }

      function utf8Encode(str) {
        var encoded = [];

        for (var index = 0; index < str.length; index++) {
          var codePoint = str.charCodeAt(index); // decode surrogate
          // see https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae

          if (codePoint >= 0xd800 && codePoint <= 0xdbff && str.length > index + 1) {
            var low = str.charCodeAt(index + 1);

            if (low >= 0xdc00 && low <= 0xdfff) {
              index++;
              codePoint = (codePoint - 0xd800 << 10) + low - 0xdc00 + 0x10000;
            }
          }

          if (codePoint <= 0x7f) {
            encoded.push(codePoint);
          } else if (codePoint <= 0x7ff) {
            encoded.push(codePoint >> 6 & 0x1F | 0xc0, codePoint & 0x3f | 0x80);
          } else if (codePoint <= 0xffff) {
            encoded.push(codePoint >> 12 | 0xe0, codePoint >> 6 & 0x3f | 0x80, codePoint & 0x3f | 0x80);
          } else if (codePoint <= 0x1fffff) {
            encoded.push(codePoint >> 18 & 0x07 | 0xf0, codePoint >> 12 & 0x3f | 0x80, codePoint >> 6 & 0x3f | 0x80, codePoint & 0x3f | 0x80);
          }
        }

        return encoded;
      }

      function stringify(token) {
        if (typeof token === 'string') {
          return token;
        }

        if (Array.isArray(token)) {
          return '[' + token.map(stringify).join(', ') + ']';
        }

        if (token == null) {
          return '' + token;
        }

        if (token.overriddenName) {
          return "".concat(token.overriddenName);
        }

        if (token.name) {
          return "".concat(token.name);
        }

        if (!token.toString) {
          return 'object';
        } // WARNING: do not try to `JSON.stringify(token)` here
        // see https://github.com/angular/angular/issues/23440


        var res = token.toString();

        if (res == null) {
          return '' + res;
        }

        var newLineIndex = res.indexOf('\n');
        return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
      }
      /**
       * Lazily retrieves the reference value from a forwardRef.
       */


      function resolveForwardRef(type) {
        if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__')) {
          return type();
        } else {
          return type;
        }
      }
      /**
       * Determine if the argument is shaped like a Promise
       */


      function isPromise(obj) {
        // allow any Promise/A+ compliant thenable.
        // It's up to the caller to ensure that obj.then conforms to the spec
        return !!obj && typeof obj.then === 'function';
      }

      var Version = function Version(full) {
        _classCallCheck(this, Version);

        this.full = full;
        var splits = full.split('.');
        this.major = splits[0];
        this.minor = splits[1];
        this.patch = splits.slice(2).join('.');
      };

      var __window = typeof window !== 'undefined' && window;

      var __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && self;

      var __global = typeof global !== 'undefined' && global; // Check __global first, because in Node tests both __global and __window may be defined and _global
      // should be __global in that case.


      var _global = __global || __window || __self;

      function newArray(size, value) {
        var list = [];

        for (var i = 0; i < size; i++) {
          list.push(value);
        }

        return list;
      }
      /**
       * Partitions a given array into 2 arrays, based on a boolean value returned by the condition
       * function.
       *
       * @param arr Input array that should be partitioned
       * @param conditionFn Condition function that is called for each item in a given array and returns a
       * boolean value.
       */


      function partitionArray(arr, conditionFn) {
        var truthy = [];
        var falsy = [];

        var _iterator2 = _createForOfIteratorHelper(arr),
            _step2;

        try {
          for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
            var item = _step2.value;
            (conditionFn(item) ? truthy : falsy).push(item);
          }
        } catch (err) {
          _iterator2.e(err);
        } finally {
          _iterator2.f();
        }

        return [truthy, falsy];
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var CONSTANT_PREFIX = '_c';
      /**
       * `ConstantPool` tries to reuse literal factories when two or more literals are identical.
       * We determine whether literals are identical by creating a key out of their AST using the
       * `KeyVisitor`. This constant is used to replace dynamic expressions which can't be safely
       * converted into a key. E.g. given an expression `{foo: bar()}`, since we don't know what
       * the result of `bar` will be, we create a key that looks like `{foo: <unknown>}`. Note
       * that we use a variable, rather than something like `null` in order to avoid collisions.
       */

      var UNKNOWN_VALUE_KEY = variable('<unknown>');
      /**
       * Context to use when producing a key.
       *
       * This ensures we see the constant not the reference variable when producing
       * a key.
       */

      var KEY_CONTEXT = {};
      /**
       * Generally all primitive values are excluded from the `ConstantPool`, but there is an exclusion
       * for strings that reach a certain length threshold. This constant defines the length threshold for
       * strings.
       */

      var POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS = 50;
      /**
       * A node that is a place-holder that allows the node to be replaced when the actual
       * node is known.
       *
       * This allows the constant pool to change an expression from a direct reference to
       * a constant to a shared constant. It returns a fix-up node that is later allowed to
       * change the referenced expression.
       */

      var FixupExpression = /*#__PURE__*/function (_Expression25) {
        _inherits(FixupExpression, _Expression25);

        var _super52 = _createSuper(FixupExpression);

        function FixupExpression(resolved) {
          var _this63;

          _classCallCheck(this, FixupExpression);

          _this63 = _super52.call(this, resolved.type);
          _this63.resolved = resolved;
          _this63.original = resolved;
          return _this63;
        }

        _createClass2(FixupExpression, [{
          key: "visitExpression",
          value: function visitExpression(visitor, context) {
            if (context === KEY_CONTEXT) {
              // When producing a key we want to traverse the constant not the
              // variable used to refer to it.
              return this.original.visitExpression(visitor, context);
            } else {
              return this.resolved.visitExpression(visitor, context);
            }
          }
        }, {
          key: "isEquivalent",
          value: function isEquivalent(e) {
            return e instanceof FixupExpression && this.resolved.isEquivalent(e.resolved);
          }
        }, {
          key: "isConstant",
          value: function isConstant() {
            return true;
          }
        }, {
          key: "fixup",
          value: function fixup(expression) {
            this.resolved = expression;
            this.shared = true;
          }
        }]);

        return FixupExpression;
      }(Expression);
      /**
       * A constant pool allows a code emitter to share constant in an output context.
       *
       * The constant pool also supports sharing access to ivy definitions references.
       */


      var ConstantPool = /*#__PURE__*/function () {
        function ConstantPool() {
          var isClosureCompilerEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;

          _classCallCheck(this, ConstantPool);

          this.isClosureCompilerEnabled = isClosureCompilerEnabled;
          this.statements = [];
          this.literals = new Map();
          this.literalFactories = new Map();
          this.injectorDefinitions = new Map();
          this.directiveDefinitions = new Map();
          this.componentDefinitions = new Map();
          this.pipeDefinitions = new Map();
          this.nextNameIndex = 0;
        }

        _createClass2(ConstantPool, [{
          key: "getConstLiteral",
          value: function getConstLiteral(literal, forceShared) {
            if (literal instanceof LiteralExpr && !isLongStringLiteral(literal) || literal instanceof FixupExpression) {
              // Do no put simple literals into the constant pool or try to produce a constant for a
              // reference to a constant.
              return literal;
            }

            var key = this.keyOf(literal);
            var fixup = this.literals.get(key);
            var newValue = false;

            if (!fixup) {
              fixup = new FixupExpression(literal);
              this.literals.set(key, fixup);
              newValue = true;
            }

            if (!newValue && !fixup.shared || newValue && forceShared) {
              // Replace the expression with a variable
              var name = this.freshName();
              var definition;
              var usage;

              if (this.isClosureCompilerEnabled && isLongStringLiteral(literal)) {
                // For string literals, Closure will **always** inline the string at
                // **all** usages, duplicating it each time. For large strings, this
                // unnecessarily bloats bundle size. To work around this restriction, we
                // wrap the string in a function, and call that function for each usage.
                // This tricks Closure into using inline logic for functions instead of
                // string literals. Function calls are only inlined if the body is small
                // enough to be worth it. By doing this, very large strings will be
                // shared across multiple usages, rather than duplicating the string at
                // each usage site.
                //
                // const myStr = function() { return "very very very long string"; };
                // const usage1 = myStr();
                // const usage2 = myStr();
                definition = variable(name).set(new FunctionExpr([], // Params.
                [// Statements.
                new ReturnStatement(literal)]));
                usage = variable(name).callFn([]);
              } else {
                // Just declare and use the variable directly, without a function call
                // indirection. This saves a few bytes and avoids an unncessary call.
                definition = variable(name).set(literal);
                usage = variable(name);
              }

              this.statements.push(definition.toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));
              fixup.fixup(usage);
            }

            return fixup;
          }
        }, {
          key: "getDefinition",
          value: function getDefinition(type, kind, ctx) {
            var forceShared = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
            var definitions = this.definitionsOf(kind);
            var fixup = definitions.get(type);
            var newValue = false;

            if (!fixup) {
              var property = this.propertyNameOf(kind);
              fixup = new FixupExpression(ctx.importExpr(type).prop(property));
              definitions.set(type, fixup);
              newValue = true;
            }

            if (!newValue && !fixup.shared || newValue && forceShared) {
              var name = this.freshName();
              this.statements.push(variable(name).set(fixup.resolved).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));
              fixup.fixup(variable(name));
            }

            return fixup;
          }
        }, {
          key: "getLiteralFactory",
          value: function getLiteralFactory(literal) {
            // Create a pure function that builds an array of a mix of constant and variable expressions
            if (literal instanceof LiteralArrayExpr) {
              var argumentsForKey = literal.entries.map(function (e) {
                return e.isConstant() ? e : UNKNOWN_VALUE_KEY;
              });
              var key = this.keyOf(literalArr(argumentsForKey));
              return this._getLiteralFactory(key, literal.entries, function (entries) {
                return literalArr(entries);
              });
            } else {
              var expressionForKey = literalMap(literal.entries.map(function (e) {
                return {
                  key: e.key,
                  value: e.value.isConstant() ? e.value : UNKNOWN_VALUE_KEY,
                  quoted: e.quoted
                };
              }));

              var _key4 = this.keyOf(expressionForKey);

              return this._getLiteralFactory(_key4, literal.entries.map(function (e) {
                return e.value;
              }), function (entries) {
                return literalMap(entries.map(function (value, index) {
                  return {
                    key: literal.entries[index].key,
                    value: value,
                    quoted: literal.entries[index].quoted
                  };
                }));
              });
            }
          }
        }, {
          key: "_getLiteralFactory",
          value: function _getLiteralFactory(key, values, resultMap) {
            var _this64 = this;

            var literalFactory = this.literalFactories.get(key);
            var literalFactoryArguments = values.filter(function (e) {
              return !e.isConstant();
            });

            if (!literalFactory) {
              var resultExpressions = values.map(function (e, index) {
                return e.isConstant() ? _this64.getConstLiteral(e, true) : variable("a".concat(index));
              });
              var parameters = resultExpressions.filter(isVariable).map(function (e) {
                return new FnParam(e.name, DYNAMIC_TYPE);
              });
              var pureFunctionDeclaration = fn(parameters, [new ReturnStatement(resultMap(resultExpressions))], INFERRED_TYPE);
              var name = this.freshName();
              this.statements.push(variable(name).set(pureFunctionDeclaration).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));
              literalFactory = variable(name);
              this.literalFactories.set(key, literalFactory);
            }

            return {
              literalFactory: literalFactory,
              literalFactoryArguments: literalFactoryArguments
            };
          }
          /**
           * Produce a unique name.
           *
           * The name might be unique among different prefixes if any of the prefixes end in
           * a digit so the prefix should be a constant string (not based on user input) and
           * must not end in a digit.
           */

        }, {
          key: "uniqueName",
          value: function uniqueName(prefix) {
            return "".concat(prefix).concat(this.nextNameIndex++);
          }
        }, {
          key: "definitionsOf",
          value: function definitionsOf(kind) {
            switch (kind) {
              case 2
              /* Component */
              :
                return this.componentDefinitions;

              case 1
              /* Directive */
              :
                return this.directiveDefinitions;

              case 0
              /* Injector */
              :
                return this.injectorDefinitions;

              case 3
              /* Pipe */
              :
                return this.pipeDefinitions;
            }

            error("Unknown definition kind ".concat(kind));
            return this.componentDefinitions;
          }
        }, {
          key: "propertyNameOf",
          value: function propertyNameOf(kind) {
            switch (kind) {
              case 2
              /* Component */
              :
                return 'ɵcmp';

              case 1
              /* Directive */
              :
                return 'ɵdir';

              case 0
              /* Injector */
              :
                return 'ɵinj';

              case 3
              /* Pipe */
              :
                return 'ɵpipe';
            }

            error("Unknown definition kind ".concat(kind));
            return '<unknown>';
          }
        }, {
          key: "freshName",
          value: function freshName() {
            return this.uniqueName(CONSTANT_PREFIX);
          }
        }, {
          key: "keyOf",
          value: function keyOf(expression) {
            return expression.visitExpression(new KeyVisitor(), KEY_CONTEXT);
          }
        }]);

        return ConstantPool;
      }();
      /**
       * Visitor used to determine if 2 expressions are equivalent and can be shared in the
       * `ConstantPool`.
       *
       * When the id (string) generated by the visitor is equal, expressions are considered equivalent.
       */


      var KeyVisitor = /*#__PURE__*/function () {
        function KeyVisitor() {
          _classCallCheck(this, KeyVisitor);

          this.visitWrappedNodeExpr = invalid;
          this.visitWriteVarExpr = invalid;
          this.visitWriteKeyExpr = invalid;
          this.visitWritePropExpr = invalid;
          this.visitInvokeMethodExpr = invalid;
          this.visitInvokeFunctionExpr = invalid;
          this.visitInstantiateExpr = invalid;
          this.visitConditionalExpr = invalid;
          this.visitNotExpr = invalid;
          this.visitAssertNotNullExpr = invalid;
          this.visitCastExpr = invalid;
          this.visitFunctionExpr = invalid;
          this.visitUnaryOperatorExpr = invalid;
          this.visitBinaryOperatorExpr = invalid;
          this.visitReadPropExpr = invalid;
          this.visitReadKeyExpr = invalid;
          this.visitCommaExpr = invalid;
          this.visitLocalizedString = invalid;
        }

        _createClass2(KeyVisitor, [{
          key: "visitLiteralExpr",
          value: function visitLiteralExpr(ast) {
            return "".concat(typeof ast.value === 'string' ? '"' + ast.value + '"' : ast.value);
          }
        }, {
          key: "visitLiteralArrayExpr",
          value: function visitLiteralArrayExpr(ast, context) {
            var _this65 = this;

            return "[".concat(ast.entries.map(function (entry) {
              return entry.visitExpression(_this65, context);
            }).join(','), "]");
          }
        }, {
          key: "visitLiteralMapExpr",
          value: function visitLiteralMapExpr(ast, context) {
            var _this66 = this;

            var mapKey = function mapKey(entry) {
              var quote = entry.quoted ? '"' : '';
              return "".concat(quote).concat(entry.key).concat(quote);
            };

            var mapEntry = function mapEntry(entry) {
              return "".concat(mapKey(entry), ":").concat(entry.value.visitExpression(_this66, context));
            };

            return "{".concat(ast.entries.map(mapEntry).join(','));
          }
        }, {
          key: "visitExternalExpr",
          value: function visitExternalExpr(ast) {
            return ast.value.moduleName ? "EX:".concat(ast.value.moduleName, ":").concat(ast.value.name) : "EX:".concat(ast.value.runtime.name);
          }
        }, {
          key: "visitReadVarExpr",
          value: function visitReadVarExpr(node) {
            return "VAR:".concat(node.name);
          }
        }, {
          key: "visitTypeofExpr",
          value: function visitTypeofExpr(node, context) {
            return "TYPEOF:".concat(node.expr.visitExpression(this, context));
          }
        }]);

        return KeyVisitor;
      }();

      function invalid(arg) {
        throw new Error("Invalid state: Visitor ".concat(this.constructor.name, " doesn't handle ").concat(arg.constructor.name));
      }

      function isVariable(e) {
        return e instanceof ReadVarExpr;
      }

      function isLongStringLiteral(expr) {
        return expr instanceof LiteralExpr && typeof expr.value === 'string' && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var CORE = '@angular/core';

      var Identifiers = function Identifiers() {
        _classCallCheck(this, Identifiers);
      };

      Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS = {
        name: 'ANALYZE_FOR_ENTRY_COMPONENTS',
        moduleName: CORE
      };
      Identifiers.ElementRef = {
        name: 'ElementRef',
        moduleName: CORE
      };
      Identifiers.NgModuleRef = {
        name: 'NgModuleRef',
        moduleName: CORE
      };
      Identifiers.ViewContainerRef = {
        name: 'ViewContainerRef',
        moduleName: CORE
      };
      Identifiers.ChangeDetectorRef = {
        name: 'ChangeDetectorRef',
        moduleName: CORE
      };
      Identifiers.QueryList = {
        name: 'QueryList',
        moduleName: CORE
      };
      Identifiers.TemplateRef = {
        name: 'TemplateRef',
        moduleName: CORE
      };
      Identifiers.Renderer2 = {
        name: 'Renderer2',
        moduleName: CORE
      };
      Identifiers.CodegenComponentFactoryResolver = {
        name: 'ɵCodegenComponentFactoryResolver',
        moduleName: CORE
      };
      Identifiers.ComponentFactoryResolver = {
        name: 'ComponentFactoryResolver',
        moduleName: CORE
      };
      Identifiers.ComponentFactory = {
        name: 'ComponentFactory',
        moduleName: CORE
      };
      Identifiers.ComponentRef = {
        name: 'ComponentRef',
        moduleName: CORE
      };
      Identifiers.NgModuleFactory = {
        name: 'NgModuleFactory',
        moduleName: CORE
      };
      Identifiers.createModuleFactory = {
        name: 'ɵcmf',
        moduleName: CORE
      };
      Identifiers.moduleDef = {
        name: 'ɵmod',
        moduleName: CORE
      };
      Identifiers.moduleProviderDef = {
        name: 'ɵmpd',
        moduleName: CORE
      };
      Identifiers.RegisterModuleFactoryFn = {
        name: 'ɵregisterModuleFactory',
        moduleName: CORE
      };
      Identifiers.inject = {
        name: 'ɵɵinject',
        moduleName: CORE
      };
      Identifiers.directiveInject = {
        name: 'ɵɵdirectiveInject',
        moduleName: CORE
      };
      Identifiers.INJECTOR = {
        name: 'INJECTOR',
        moduleName: CORE
      };
      Identifiers.Injector = {
        name: 'Injector',
        moduleName: CORE
      };
      Identifiers.ɵɵdefineInjectable = {
        name: 'ɵɵdefineInjectable',
        moduleName: CORE
      };
      Identifiers.InjectableDef = {
        name: 'ɵɵInjectableDef',
        moduleName: CORE
      };
      Identifiers.ViewEncapsulation = {
        name: 'ViewEncapsulation',
        moduleName: CORE
      };
      Identifiers.ChangeDetectionStrategy = {
        name: 'ChangeDetectionStrategy',
        moduleName: CORE
      };
      Identifiers.SecurityContext = {
        name: 'SecurityContext',
        moduleName: CORE
      };
      Identifiers.LOCALE_ID = {
        name: 'LOCALE_ID',
        moduleName: CORE
      };
      Identifiers.TRANSLATIONS_FORMAT = {
        name: 'TRANSLATIONS_FORMAT',
        moduleName: CORE
      };
      Identifiers.inlineInterpolate = {
        name: 'ɵinlineInterpolate',
        moduleName: CORE
      };
      Identifiers.interpolate = {
        name: 'ɵinterpolate',
        moduleName: CORE
      };
      Identifiers.EMPTY_ARRAY = {
        name: 'ɵEMPTY_ARRAY',
        moduleName: CORE
      };
      Identifiers.EMPTY_MAP = {
        name: 'ɵEMPTY_MAP',
        moduleName: CORE
      };
      Identifiers.Renderer = {
        name: 'Renderer',
        moduleName: CORE
      };
      Identifiers.viewDef = {
        name: 'ɵvid',
        moduleName: CORE
      };
      Identifiers.elementDef = {
        name: 'ɵeld',
        moduleName: CORE
      };
      Identifiers.anchorDef = {
        name: 'ɵand',
        moduleName: CORE
      };
      Identifiers.textDef = {
        name: 'ɵted',
        moduleName: CORE
      };
      Identifiers.directiveDef = {
        name: 'ɵdid',
        moduleName: CORE
      };
      Identifiers.providerDef = {
        name: 'ɵprd',
        moduleName: CORE
      };
      Identifiers.queryDef = {
        name: 'ɵqud',
        moduleName: CORE
      };
      Identifiers.pureArrayDef = {
        name: 'ɵpad',
        moduleName: CORE
      };
      Identifiers.pureObjectDef = {
        name: 'ɵpod',
        moduleName: CORE
      };
      Identifiers.purePipeDef = {
        name: 'ɵppd',
        moduleName: CORE
      };
      Identifiers.pipeDef = {
        name: 'ɵpid',
        moduleName: CORE
      };
      Identifiers.nodeValue = {
        name: 'ɵnov',
        moduleName: CORE
      };
      Identifiers.ngContentDef = {
        name: 'ɵncd',
        moduleName: CORE
      };
      Identifiers.unwrapValue = {
        name: 'ɵunv',
        moduleName: CORE
      };
      Identifiers.createRendererType2 = {
        name: 'ɵcrt',
        moduleName: CORE
      }; // type only

      Identifiers.RendererType2 = {
        name: 'RendererType2',
        moduleName: CORE
      }; // type only

      Identifiers.ViewDefinition = {
        name: 'ɵViewDefinition',
        moduleName: CORE
      };
      Identifiers.createComponentFactory = {
        name: 'ɵccf',
        moduleName: CORE
      };
      Identifiers.setClassMetadata = {
        name: 'ɵsetClassMetadata',
        moduleName: CORE
      };

      function createTokenForReference(reference) {
        return {
          identifier: {
            reference: reference
          }
        };
      }

      function createTokenForExternalReference(reflector, reference) {
        return createTokenForReference(reflector.resolveExternalReference(reference));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A token representing the a reference to a static type.
       *
       * This token is unique for a filePath and name and can be used as a hash table key.
       */


      var StaticSymbol = /*#__PURE__*/function () {
        function StaticSymbol(filePath, name, members) {
          _classCallCheck(this, StaticSymbol);

          this.filePath = filePath;
          this.name = name;
          this.members = members;
        }

        _createClass2(StaticSymbol, [{
          key: "assertNoMembers",
          value: function assertNoMembers() {
            if (this.members.length) {
              throw new Error("Illegal state: symbol without members expected, but got ".concat(JSON.stringify(this), "."));
            }
          }
        }]);

        return StaticSymbol;
      }();
      /**
       * A cache of static symbol used by the StaticReflector to return the same symbol for the
       * same symbol values.
       */


      var StaticSymbolCache = /*#__PURE__*/function () {
        function StaticSymbolCache() {
          _classCallCheck(this, StaticSymbolCache);

          this.cache = new Map();
        }

        _createClass2(StaticSymbolCache, [{
          key: "get",
          value: function get(declarationFile, name, members) {
            members = members || [];
            var memberSuffix = members.length ? ".".concat(members.join('.')) : '';
            var key = "\"".concat(declarationFile, "\".").concat(name).concat(memberSuffix);
            var result = this.cache.get(key);

            if (!result) {
              result = new StaticSymbol(declarationFile, name, members);
              this.cache.set(key, result);
            }

            return result;
          }
        }]);

        return StaticSymbolCache;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // group 0: "[prop] or (event) or @trigger"
      // group 1: "prop" from "[prop]"
      // group 2: "event" from "(event)"
      // group 3: "@trigger" from "@trigger"


      var HOST_REG_EXP = /^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;

      function sanitizeIdentifier(name) {
        return name.replace(/\W/g, '_');
      }

      var _anonymousTypeIndex = 0;

      function identifierName(compileIdentifier) {
        if (!compileIdentifier || !compileIdentifier.reference) {
          return null;
        }

        var ref = compileIdentifier.reference;

        if (ref instanceof StaticSymbol) {
          return ref.name;
        }

        if (ref['__anonymousType']) {
          return ref['__anonymousType'];
        }

        var identifier = stringify(ref);

        if (identifier.indexOf('(') >= 0) {
          // case: anonymous functions!
          identifier = "anonymous_".concat(_anonymousTypeIndex++);
          ref['__anonymousType'] = identifier;
        } else {
          identifier = sanitizeIdentifier(identifier);
        }

        return identifier;
      }

      function identifierModuleUrl(compileIdentifier) {
        var ref = compileIdentifier.reference;

        if (ref instanceof StaticSymbol) {
          return ref.filePath;
        } // Runtime type


        return "./".concat(stringify(ref));
      }

      function viewClassName(compType, embeddedTemplateIndex) {
        return "View_".concat(identifierName({
          reference: compType
        }), "_").concat(embeddedTemplateIndex);
      }

      function rendererTypeName(compType) {
        return "RenderType_".concat(identifierName({
          reference: compType
        }));
      }

      function hostViewClassName(compType) {
        return "HostView_".concat(identifierName({
          reference: compType
        }));
      }

      function componentFactoryName(compType) {
        return "".concat(identifierName({
          reference: compType
        }), "NgFactory");
      }

      var CompileSummaryKind;

      (function (CompileSummaryKind) {
        CompileSummaryKind[CompileSummaryKind["Pipe"] = 0] = "Pipe";
        CompileSummaryKind[CompileSummaryKind["Directive"] = 1] = "Directive";
        CompileSummaryKind[CompileSummaryKind["NgModule"] = 2] = "NgModule";
        CompileSummaryKind[CompileSummaryKind["Injectable"] = 3] = "Injectable";
      })(CompileSummaryKind || (CompileSummaryKind = {}));

      function tokenName(token) {
        return token.value != null ? sanitizeIdentifier(token.value) : identifierName(token.identifier);
      }

      function tokenReference(token) {
        if (token.identifier != null) {
          return token.identifier.reference;
        } else {
          return token.value;
        }
      }
      /**
       * Metadata about a stylesheet
       */


      var CompileStylesheetMetadata = function CompileStylesheetMetadata() {
        var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
            moduleUrl = _ref3.moduleUrl,
            styles = _ref3.styles,
            styleUrls = _ref3.styleUrls;

        _classCallCheck(this, CompileStylesheetMetadata);

        this.moduleUrl = moduleUrl || null;
        this.styles = _normalizeArray(styles);
        this.styleUrls = _normalizeArray(styleUrls);
      };
      /**
       * Metadata regarding compilation of a template.
       */


      var CompileTemplateMetadata = /*#__PURE__*/function () {
        function CompileTemplateMetadata(_ref4) {
          var encapsulation = _ref4.encapsulation,
              template = _ref4.template,
              templateUrl = _ref4.templateUrl,
              htmlAst = _ref4.htmlAst,
              styles = _ref4.styles,
              styleUrls = _ref4.styleUrls,
              externalStylesheets = _ref4.externalStylesheets,
              animations = _ref4.animations,
              ngContentSelectors = _ref4.ngContentSelectors,
              interpolation = _ref4.interpolation,
              isInline = _ref4.isInline,
              preserveWhitespaces = _ref4.preserveWhitespaces;

          _classCallCheck(this, CompileTemplateMetadata);

          this.encapsulation = encapsulation;
          this.template = template;
          this.templateUrl = templateUrl;
          this.htmlAst = htmlAst;
          this.styles = _normalizeArray(styles);
          this.styleUrls = _normalizeArray(styleUrls);
          this.externalStylesheets = _normalizeArray(externalStylesheets);
          this.animations = animations ? flatten(animations) : [];
          this.ngContentSelectors = ngContentSelectors || [];

          if (interpolation && interpolation.length != 2) {
            throw new Error("'interpolation' should have a start and an end symbol.");
          }

          this.interpolation = interpolation;
          this.isInline = isInline;
          this.preserveWhitespaces = preserveWhitespaces;
        }

        _createClass2(CompileTemplateMetadata, [{
          key: "toSummary",
          value: function toSummary() {
            return {
              ngContentSelectors: this.ngContentSelectors,
              encapsulation: this.encapsulation,
              styles: this.styles,
              animations: this.animations
            };
          }
        }]);

        return CompileTemplateMetadata;
      }();
      /**
       * Metadata regarding compilation of a directive.
       */


      var CompileDirectiveMetadata = /*#__PURE__*/function () {
        function CompileDirectiveMetadata(_ref5) {
          var isHost = _ref5.isHost,
              type = _ref5.type,
              isComponent = _ref5.isComponent,
              selector = _ref5.selector,
              exportAs = _ref5.exportAs,
              changeDetection = _ref5.changeDetection,
              inputs = _ref5.inputs,
              outputs = _ref5.outputs,
              hostListeners = _ref5.hostListeners,
              hostProperties = _ref5.hostProperties,
              hostAttributes = _ref5.hostAttributes,
              providers = _ref5.providers,
              viewProviders = _ref5.viewProviders,
              queries = _ref5.queries,
              guards = _ref5.guards,
              viewQueries = _ref5.viewQueries,
              entryComponents = _ref5.entryComponents,
              template = _ref5.template,
              componentViewType = _ref5.componentViewType,
              rendererType = _ref5.rendererType,
              componentFactory = _ref5.componentFactory;

          _classCallCheck(this, CompileDirectiveMetadata);

          this.isHost = !!isHost;
          this.type = type;
          this.isComponent = isComponent;
          this.selector = selector;
          this.exportAs = exportAs;
          this.changeDetection = changeDetection;
          this.inputs = inputs;
          this.outputs = outputs;
          this.hostListeners = hostListeners;
          this.hostProperties = hostProperties;
          this.hostAttributes = hostAttributes;
          this.providers = _normalizeArray(providers);
          this.viewProviders = _normalizeArray(viewProviders);
          this.queries = _normalizeArray(queries);
          this.guards = guards;
          this.viewQueries = _normalizeArray(viewQueries);
          this.entryComponents = _normalizeArray(entryComponents);
          this.template = template;
          this.componentViewType = componentViewType;
          this.rendererType = rendererType;
          this.componentFactory = componentFactory;
        }

        _createClass2(CompileDirectiveMetadata, [{
          key: "toSummary",
          value: function toSummary() {
            return {
              summaryKind: CompileSummaryKind.Directive,
              type: this.type,
              isComponent: this.isComponent,
              selector: this.selector,
              exportAs: this.exportAs,
              inputs: this.inputs,
              outputs: this.outputs,
              hostListeners: this.hostListeners,
              hostProperties: this.hostProperties,
              hostAttributes: this.hostAttributes,
              providers: this.providers,
              viewProviders: this.viewProviders,
              queries: this.queries,
              guards: this.guards,
              viewQueries: this.viewQueries,
              entryComponents: this.entryComponents,
              changeDetection: this.changeDetection,
              template: this.template && this.template.toSummary(),
              componentViewType: this.componentViewType,
              rendererType: this.rendererType,
              componentFactory: this.componentFactory
            };
          }
        }], [{
          key: "create",
          value: function create(_ref6) {
            var isHost = _ref6.isHost,
                type = _ref6.type,
                isComponent = _ref6.isComponent,
                selector = _ref6.selector,
                exportAs = _ref6.exportAs,
                changeDetection = _ref6.changeDetection,
                inputs = _ref6.inputs,
                outputs = _ref6.outputs,
                host = _ref6.host,
                providers = _ref6.providers,
                viewProviders = _ref6.viewProviders,
                queries = _ref6.queries,
                guards = _ref6.guards,
                viewQueries = _ref6.viewQueries,
                entryComponents = _ref6.entryComponents,
                template = _ref6.template,
                componentViewType = _ref6.componentViewType,
                rendererType = _ref6.rendererType,
                componentFactory = _ref6.componentFactory;
            var hostListeners = {};
            var hostProperties = {};
            var hostAttributes = {};

            if (host != null) {
              Object.keys(host).forEach(function (key) {
                var value = host[key];
                var matches = key.match(HOST_REG_EXP);

                if (matches === null) {
                  hostAttributes[key] = value;
                } else if (matches[1] != null) {
                  hostProperties[matches[1]] = value;
                } else if (matches[2] != null) {
                  hostListeners[matches[2]] = value;
                }
              });
            }

            var inputsMap = {};

            if (inputs != null) {
              inputs.forEach(function (bindConfig) {
                // canonical syntax: `dirProp: elProp`
                // if there is no `:`, use dirProp = elProp
                var parts = splitAtColon(bindConfig, [bindConfig, bindConfig]);
                inputsMap[parts[0]] = parts[1];
              });
            }

            var outputsMap = {};

            if (outputs != null) {
              outputs.forEach(function (bindConfig) {
                // canonical syntax: `dirProp: elProp`
                // if there is no `:`, use dirProp = elProp
                var parts = splitAtColon(bindConfig, [bindConfig, bindConfig]);
                outputsMap[parts[0]] = parts[1];
              });
            }

            return new CompileDirectiveMetadata({
              isHost: isHost,
              type: type,
              isComponent: !!isComponent,
              selector: selector,
              exportAs: exportAs,
              changeDetection: changeDetection,
              inputs: inputsMap,
              outputs: outputsMap,
              hostListeners: hostListeners,
              hostProperties: hostProperties,
              hostAttributes: hostAttributes,
              providers: providers,
              viewProviders: viewProviders,
              queries: queries,
              guards: guards,
              viewQueries: viewQueries,
              entryComponents: entryComponents,
              template: template,
              componentViewType: componentViewType,
              rendererType: rendererType,
              componentFactory: componentFactory
            });
          }
        }]);

        return CompileDirectiveMetadata;
      }();

      var CompilePipeMetadata = /*#__PURE__*/function () {
        function CompilePipeMetadata(_ref7) {
          var type = _ref7.type,
              name = _ref7.name,
              pure = _ref7.pure;

          _classCallCheck(this, CompilePipeMetadata);

          this.type = type;
          this.name = name;
          this.pure = !!pure;
        }

        _createClass2(CompilePipeMetadata, [{
          key: "toSummary",
          value: function toSummary() {
            return {
              summaryKind: CompileSummaryKind.Pipe,
              type: this.type,
              name: this.name,
              pure: this.pure
            };
          }
        }]);

        return CompilePipeMetadata;
      }();

      var CompileShallowModuleMetadata = function CompileShallowModuleMetadata() {
        _classCallCheck(this, CompileShallowModuleMetadata);
      };
      /**
       * Metadata regarding compilation of a module.
       */


      var CompileNgModuleMetadata = /*#__PURE__*/function () {
        function CompileNgModuleMetadata(_ref8) {
          var type = _ref8.type,
              providers = _ref8.providers,
              declaredDirectives = _ref8.declaredDirectives,
              exportedDirectives = _ref8.exportedDirectives,
              declaredPipes = _ref8.declaredPipes,
              exportedPipes = _ref8.exportedPipes,
              entryComponents = _ref8.entryComponents,
              bootstrapComponents = _ref8.bootstrapComponents,
              importedModules = _ref8.importedModules,
              exportedModules = _ref8.exportedModules,
              schemas = _ref8.schemas,
              transitiveModule = _ref8.transitiveModule,
              id = _ref8.id;

          _classCallCheck(this, CompileNgModuleMetadata);

          this.type = type || null;
          this.declaredDirectives = _normalizeArray(declaredDirectives);
          this.exportedDirectives = _normalizeArray(exportedDirectives);
          this.declaredPipes = _normalizeArray(declaredPipes);
          this.exportedPipes = _normalizeArray(exportedPipes);
          this.providers = _normalizeArray(providers);
          this.entryComponents = _normalizeArray(entryComponents);
          this.bootstrapComponents = _normalizeArray(bootstrapComponents);
          this.importedModules = _normalizeArray(importedModules);
          this.exportedModules = _normalizeArray(exportedModules);
          this.schemas = _normalizeArray(schemas);
          this.id = id || null;
          this.transitiveModule = transitiveModule || null;
        }

        _createClass2(CompileNgModuleMetadata, [{
          key: "toSummary",
          value: function toSummary() {
            var module = this.transitiveModule;
            return {
              summaryKind: CompileSummaryKind.NgModule,
              type: this.type,
              entryComponents: module.entryComponents,
              providers: module.providers,
              modules: module.modules,
              exportedDirectives: module.exportedDirectives,
              exportedPipes: module.exportedPipes
            };
          }
        }]);

        return CompileNgModuleMetadata;
      }();

      var TransitiveCompileNgModuleMetadata = /*#__PURE__*/function () {
        function TransitiveCompileNgModuleMetadata() {
          _classCallCheck(this, TransitiveCompileNgModuleMetadata);

          this.directivesSet = new Set();
          this.directives = [];
          this.exportedDirectivesSet = new Set();
          this.exportedDirectives = [];
          this.pipesSet = new Set();
          this.pipes = [];
          this.exportedPipesSet = new Set();
          this.exportedPipes = [];
          this.modulesSet = new Set();
          this.modules = [];
          this.entryComponentsSet = new Set();
          this.entryComponents = [];
          this.providers = [];
        }

        _createClass2(TransitiveCompileNgModuleMetadata, [{
          key: "addProvider",
          value: function addProvider(provider, module) {
            this.providers.push({
              provider: provider,
              module: module
            });
          }
        }, {
          key: "addDirective",
          value: function addDirective(id) {
            if (!this.directivesSet.has(id.reference)) {
              this.directivesSet.add(id.reference);
              this.directives.push(id);
            }
          }
        }, {
          key: "addExportedDirective",
          value: function addExportedDirective(id) {
            if (!this.exportedDirectivesSet.has(id.reference)) {
              this.exportedDirectivesSet.add(id.reference);
              this.exportedDirectives.push(id);
            }
          }
        }, {
          key: "addPipe",
          value: function addPipe(id) {
            if (!this.pipesSet.has(id.reference)) {
              this.pipesSet.add(id.reference);
              this.pipes.push(id);
            }
          }
        }, {
          key: "addExportedPipe",
          value: function addExportedPipe(id) {
            if (!this.exportedPipesSet.has(id.reference)) {
              this.exportedPipesSet.add(id.reference);
              this.exportedPipes.push(id);
            }
          }
        }, {
          key: "addModule",
          value: function addModule(id) {
            if (!this.modulesSet.has(id.reference)) {
              this.modulesSet.add(id.reference);
              this.modules.push(id);
            }
          }
        }, {
          key: "addEntryComponent",
          value: function addEntryComponent(ec) {
            if (!this.entryComponentsSet.has(ec.componentType)) {
              this.entryComponentsSet.add(ec.componentType);
              this.entryComponents.push(ec);
            }
          }
        }]);

        return TransitiveCompileNgModuleMetadata;
      }();

      function _normalizeArray(obj) {
        return obj || [];
      }

      var ProviderMeta = function ProviderMeta(token, _ref9) {
        var useClass = _ref9.useClass,
            useValue = _ref9.useValue,
            useExisting = _ref9.useExisting,
            useFactory = _ref9.useFactory,
            deps = _ref9.deps,
            multi = _ref9.multi;

        _classCallCheck(this, ProviderMeta);

        this.token = token;
        this.useClass = useClass || null;
        this.useValue = useValue;
        this.useExisting = useExisting;
        this.useFactory = useFactory || null;
        this.dependencies = deps || null;
        this.multi = !!multi;
      };

      function flatten(list) {
        return list.reduce(function (flat, item) {
          var flatItem = Array.isArray(item) ? flatten(item) : item;
          return flat.concat(flatItem);
        }, []);
      }

      function jitSourceUrl(url) {
        // Note: We need 3 "/" so that ng shows up as a separate domain
        // in the chrome dev tools.
        return url.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/, 'ng:///');
      }

      function templateSourceUrl(ngModuleType, compMeta, templateMeta) {
        var url;

        if (templateMeta.isInline) {
          if (compMeta.type.reference instanceof StaticSymbol) {
            // Note: a .ts file might contain multiple components with inline templates,
            // so we need to give them unique urls, as these will be used for sourcemaps.
            url = "".concat(compMeta.type.reference.filePath, ".").concat(compMeta.type.reference.name, ".html");
          } else {
            url = "".concat(identifierName(ngModuleType), "/").concat(identifierName(compMeta.type), ".html");
          }
        } else {
          url = templateMeta.templateUrl;
        }

        return compMeta.type.reference instanceof StaticSymbol ? url : jitSourceUrl(url);
      }

      function sharedStylesheetJitUrl(meta, id) {
        var pathParts = meta.moduleUrl.split(/\/\\/g);
        var baseName = pathParts[pathParts.length - 1];
        return jitSourceUrl("css/".concat(id).concat(baseName, ".ngstyle.js"));
      }

      function ngModuleJitUrl(moduleMeta) {
        return jitSourceUrl("".concat(identifierName(moduleMeta.type), "/module.ngfactory.js"));
      }

      function templateJitUrl(ngModuleType, compMeta) {
        return jitSourceUrl("".concat(identifierName(ngModuleType), "/").concat(identifierName(compMeta.type), ".ngfactory.js"));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var CORE$1 = '@angular/core';

      var Identifiers$1 = function Identifiers$1() {
        _classCallCheck(this, Identifiers$1);
      };
      /* Methods */


      Identifiers$1.NEW_METHOD = 'factory';
      Identifiers$1.TRANSFORM_METHOD = 'transform';
      Identifiers$1.PATCH_DEPS = 'patchedDeps';
      /* Instructions */

      Identifiers$1.namespaceHTML = {
        name: 'ɵɵnamespaceHTML',
        moduleName: CORE$1
      };
      Identifiers$1.namespaceMathML = {
        name: 'ɵɵnamespaceMathML',
        moduleName: CORE$1
      };
      Identifiers$1.namespaceSVG = {
        name: 'ɵɵnamespaceSVG',
        moduleName: CORE$1
      };
      Identifiers$1.element = {
        name: 'ɵɵelement',
        moduleName: CORE$1
      };
      Identifiers$1.elementStart = {
        name: 'ɵɵelementStart',
        moduleName: CORE$1
      };
      Identifiers$1.elementEnd = {
        name: 'ɵɵelementEnd',
        moduleName: CORE$1
      };
      Identifiers$1.advance = {
        name: 'ɵɵadvance',
        moduleName: CORE$1
      };
      Identifiers$1.syntheticHostProperty = {
        name: 'ɵɵsyntheticHostProperty',
        moduleName: CORE$1
      };
      Identifiers$1.syntheticHostListener = {
        name: 'ɵɵsyntheticHostListener',
        moduleName: CORE$1
      };
      Identifiers$1.attribute = {
        name: 'ɵɵattribute',
        moduleName: CORE$1
      };
      Identifiers$1.attributeInterpolate1 = {
        name: 'ɵɵattributeInterpolate1',
        moduleName: CORE$1
      };
      Identifiers$1.attributeInterpolate2 = {
        name: 'ɵɵattributeInterpolate2',
        moduleName: CORE$1
      };
      Identifiers$1.attributeInterpolate3 = {
        name: 'ɵɵattributeInterpolate3',
        moduleName: CORE$1
      };
      Identifiers$1.attributeInterpolate4 = {
        name: 'ɵɵattributeInterpolate4',
        moduleName: CORE$1
      };
      Identifiers$1.attributeInterpolate5 = {
        name: 'ɵɵattributeInterpolate5',
        moduleName: CORE$1
      };
      Identifiers$1.attributeInterpolate6 = {
        name: 'ɵɵattributeInterpolate6',
        moduleName: CORE$1
      };
      Identifiers$1.attributeInterpolate7 = {
        name: 'ɵɵattributeInterpolate7',
        moduleName: CORE$1
      };
      Identifiers$1.attributeInterpolate8 = {
        name: 'ɵɵattributeInterpolate8',
        moduleName: CORE$1
      };
      Identifiers$1.attributeInterpolateV = {
        name: 'ɵɵattributeInterpolateV',
        moduleName: CORE$1
      };
      Identifiers$1.classProp = {
        name: 'ɵɵclassProp',
        moduleName: CORE$1
      };
      Identifiers$1.elementContainerStart = {
        name: 'ɵɵelementContainerStart',
        moduleName: CORE$1
      };
      Identifiers$1.elementContainerEnd = {
        name: 'ɵɵelementContainerEnd',
        moduleName: CORE$1
      };
      Identifiers$1.elementContainer = {
        name: 'ɵɵelementContainer',
        moduleName: CORE$1
      };
      Identifiers$1.styleMap = {
        name: 'ɵɵstyleMap',
        moduleName: CORE$1
      };
      Identifiers$1.styleMapInterpolate1 = {
        name: 'ɵɵstyleMapInterpolate1',
        moduleName: CORE$1
      };
      Identifiers$1.styleMapInterpolate2 = {
        name: 'ɵɵstyleMapInterpolate2',
        moduleName: CORE$1
      };
      Identifiers$1.styleMapInterpolate3 = {
        name: 'ɵɵstyleMapInterpolate3',
        moduleName: CORE$1
      };
      Identifiers$1.styleMapInterpolate4 = {
        name: 'ɵɵstyleMapInterpolate4',
        moduleName: CORE$1
      };
      Identifiers$1.styleMapInterpolate5 = {
        name: 'ɵɵstyleMapInterpolate5',
        moduleName: CORE$1
      };
      Identifiers$1.styleMapInterpolate6 = {
        name: 'ɵɵstyleMapInterpolate6',
        moduleName: CORE$1
      };
      Identifiers$1.styleMapInterpolate7 = {
        name: 'ɵɵstyleMapInterpolate7',
        moduleName: CORE$1
      };
      Identifiers$1.styleMapInterpolate8 = {
        name: 'ɵɵstyleMapInterpolate8',
        moduleName: CORE$1
      };
      Identifiers$1.styleMapInterpolateV = {
        name: 'ɵɵstyleMapInterpolateV',
        moduleName: CORE$1
      };
      Identifiers$1.classMap = {
        name: 'ɵɵclassMap',
        moduleName: CORE$1
      };
      Identifiers$1.classMapInterpolate1 = {
        name: 'ɵɵclassMapInterpolate1',
        moduleName: CORE$1
      };
      Identifiers$1.classMapInterpolate2 = {
        name: 'ɵɵclassMapInterpolate2',
        moduleName: CORE$1
      };
      Identifiers$1.classMapInterpolate3 = {
        name: 'ɵɵclassMapInterpolate3',
        moduleName: CORE$1
      };
      Identifiers$1.classMapInterpolate4 = {
        name: 'ɵɵclassMapInterpolate4',
        moduleName: CORE$1
      };
      Identifiers$1.classMapInterpolate5 = {
        name: 'ɵɵclassMapInterpolate5',
        moduleName: CORE$1
      };
      Identifiers$1.classMapInterpolate6 = {
        name: 'ɵɵclassMapInterpolate6',
        moduleName: CORE$1
      };
      Identifiers$1.classMapInterpolate7 = {
        name: 'ɵɵclassMapInterpolate7',
        moduleName: CORE$1
      };
      Identifiers$1.classMapInterpolate8 = {
        name: 'ɵɵclassMapInterpolate8',
        moduleName: CORE$1
      };
      Identifiers$1.classMapInterpolateV = {
        name: 'ɵɵclassMapInterpolateV',
        moduleName: CORE$1
      };
      Identifiers$1.styleProp = {
        name: 'ɵɵstyleProp',
        moduleName: CORE$1
      };
      Identifiers$1.stylePropInterpolate1 = {
        name: 'ɵɵstylePropInterpolate1',
        moduleName: CORE$1
      };
      Identifiers$1.stylePropInterpolate2 = {
        name: 'ɵɵstylePropInterpolate2',
        moduleName: CORE$1
      };
      Identifiers$1.stylePropInterpolate3 = {
        name: 'ɵɵstylePropInterpolate3',
        moduleName: CORE$1
      };
      Identifiers$1.stylePropInterpolate4 = {
        name: 'ɵɵstylePropInterpolate4',
        moduleName: CORE$1
      };
      Identifiers$1.stylePropInterpolate5 = {
        name: 'ɵɵstylePropInterpolate5',
        moduleName: CORE$1
      };
      Identifiers$1.stylePropInterpolate6 = {
        name: 'ɵɵstylePropInterpolate6',
        moduleName: CORE$1
      };
      Identifiers$1.stylePropInterpolate7 = {
        name: 'ɵɵstylePropInterpolate7',
        moduleName: CORE$1
      };
      Identifiers$1.stylePropInterpolate8 = {
        name: 'ɵɵstylePropInterpolate8',
        moduleName: CORE$1
      };
      Identifiers$1.stylePropInterpolateV = {
        name: 'ɵɵstylePropInterpolateV',
        moduleName: CORE$1
      };
      Identifiers$1.nextContext = {
        name: 'ɵɵnextContext',
        moduleName: CORE$1
      };
      Identifiers$1.templateCreate = {
        name: 'ɵɵtemplate',
        moduleName: CORE$1
      };
      Identifiers$1.text = {
        name: 'ɵɵtext',
        moduleName: CORE$1
      };
      Identifiers$1.enableBindings = {
        name: 'ɵɵenableBindings',
        moduleName: CORE$1
      };
      Identifiers$1.disableBindings = {
        name: 'ɵɵdisableBindings',
        moduleName: CORE$1
      };
      Identifiers$1.getCurrentView = {
        name: 'ɵɵgetCurrentView',
        moduleName: CORE$1
      };
      Identifiers$1.textInterpolate = {
        name: 'ɵɵtextInterpolate',
        moduleName: CORE$1
      };
      Identifiers$1.textInterpolate1 = {
        name: 'ɵɵtextInterpolate1',
        moduleName: CORE$1
      };
      Identifiers$1.textInterpolate2 = {
        name: 'ɵɵtextInterpolate2',
        moduleName: CORE$1
      };
      Identifiers$1.textInterpolate3 = {
        name: 'ɵɵtextInterpolate3',
        moduleName: CORE$1
      };
      Identifiers$1.textInterpolate4 = {
        name: 'ɵɵtextInterpolate4',
        moduleName: CORE$1
      };
      Identifiers$1.textInterpolate5 = {
        name: 'ɵɵtextInterpolate5',
        moduleName: CORE$1
      };
      Identifiers$1.textInterpolate6 = {
        name: 'ɵɵtextInterpolate6',
        moduleName: CORE$1
      };
      Identifiers$1.textInterpolate7 = {
        name: 'ɵɵtextInterpolate7',
        moduleName: CORE$1
      };
      Identifiers$1.textInterpolate8 = {
        name: 'ɵɵtextInterpolate8',
        moduleName: CORE$1
      };
      Identifiers$1.textInterpolateV = {
        name: 'ɵɵtextInterpolateV',
        moduleName: CORE$1
      };
      Identifiers$1.restoreView = {
        name: 'ɵɵrestoreView',
        moduleName: CORE$1
      };
      Identifiers$1.pureFunction0 = {
        name: 'ɵɵpureFunction0',
        moduleName: CORE$1
      };
      Identifiers$1.pureFunction1 = {
        name: 'ɵɵpureFunction1',
        moduleName: CORE$1
      };
      Identifiers$1.pureFunction2 = {
        name: 'ɵɵpureFunction2',
        moduleName: CORE$1
      };
      Identifiers$1.pureFunction3 = {
        name: 'ɵɵpureFunction3',
        moduleName: CORE$1
      };
      Identifiers$1.pureFunction4 = {
        name: 'ɵɵpureFunction4',
        moduleName: CORE$1
      };
      Identifiers$1.pureFunction5 = {
        name: 'ɵɵpureFunction5',
        moduleName: CORE$1
      };
      Identifiers$1.pureFunction6 = {
        name: 'ɵɵpureFunction6',
        moduleName: CORE$1
      };
      Identifiers$1.pureFunction7 = {
        name: 'ɵɵpureFunction7',
        moduleName: CORE$1
      };
      Identifiers$1.pureFunction8 = {
        name: 'ɵɵpureFunction8',
        moduleName: CORE$1
      };
      Identifiers$1.pureFunctionV = {
        name: 'ɵɵpureFunctionV',
        moduleName: CORE$1
      };
      Identifiers$1.pipeBind1 = {
        name: 'ɵɵpipeBind1',
        moduleName: CORE$1
      };
      Identifiers$1.pipeBind2 = {
        name: 'ɵɵpipeBind2',
        moduleName: CORE$1
      };
      Identifiers$1.pipeBind3 = {
        name: 'ɵɵpipeBind3',
        moduleName: CORE$1
      };
      Identifiers$1.pipeBind4 = {
        name: 'ɵɵpipeBind4',
        moduleName: CORE$1
      };
      Identifiers$1.pipeBindV = {
        name: 'ɵɵpipeBindV',
        moduleName: CORE$1
      };
      Identifiers$1.hostProperty = {
        name: 'ɵɵhostProperty',
        moduleName: CORE$1
      };
      Identifiers$1.property = {
        name: 'ɵɵproperty',
        moduleName: CORE$1
      };
      Identifiers$1.propertyInterpolate = {
        name: 'ɵɵpropertyInterpolate',
        moduleName: CORE$1
      };
      Identifiers$1.propertyInterpolate1 = {
        name: 'ɵɵpropertyInterpolate1',
        moduleName: CORE$1
      };
      Identifiers$1.propertyInterpolate2 = {
        name: 'ɵɵpropertyInterpolate2',
        moduleName: CORE$1
      };
      Identifiers$1.propertyInterpolate3 = {
        name: 'ɵɵpropertyInterpolate3',
        moduleName: CORE$1
      };
      Identifiers$1.propertyInterpolate4 = {
        name: 'ɵɵpropertyInterpolate4',
        moduleName: CORE$1
      };
      Identifiers$1.propertyInterpolate5 = {
        name: 'ɵɵpropertyInterpolate5',
        moduleName: CORE$1
      };
      Identifiers$1.propertyInterpolate6 = {
        name: 'ɵɵpropertyInterpolate6',
        moduleName: CORE$1
      };
      Identifiers$1.propertyInterpolate7 = {
        name: 'ɵɵpropertyInterpolate7',
        moduleName: CORE$1
      };
      Identifiers$1.propertyInterpolate8 = {
        name: 'ɵɵpropertyInterpolate8',
        moduleName: CORE$1
      };
      Identifiers$1.propertyInterpolateV = {
        name: 'ɵɵpropertyInterpolateV',
        moduleName: CORE$1
      };
      Identifiers$1.i18n = {
        name: 'ɵɵi18n',
        moduleName: CORE$1
      };
      Identifiers$1.i18nAttributes = {
        name: 'ɵɵi18nAttributes',
        moduleName: CORE$1
      };
      Identifiers$1.i18nExp = {
        name: 'ɵɵi18nExp',
        moduleName: CORE$1
      };
      Identifiers$1.i18nStart = {
        name: 'ɵɵi18nStart',
        moduleName: CORE$1
      };
      Identifiers$1.i18nEnd = {
        name: 'ɵɵi18nEnd',
        moduleName: CORE$1
      };
      Identifiers$1.i18nApply = {
        name: 'ɵɵi18nApply',
        moduleName: CORE$1
      };
      Identifiers$1.i18nPostprocess = {
        name: 'ɵɵi18nPostprocess',
        moduleName: CORE$1
      };
      Identifiers$1.pipe = {
        name: 'ɵɵpipe',
        moduleName: CORE$1
      };
      Identifiers$1.projection = {
        name: 'ɵɵprojection',
        moduleName: CORE$1
      };
      Identifiers$1.projectionDef = {
        name: 'ɵɵprojectionDef',
        moduleName: CORE$1
      };
      Identifiers$1.reference = {
        name: 'ɵɵreference',
        moduleName: CORE$1
      };
      Identifiers$1.inject = {
        name: 'ɵɵinject',
        moduleName: CORE$1
      };
      Identifiers$1.injectAttribute = {
        name: 'ɵɵinjectAttribute',
        moduleName: CORE$1
      };
      Identifiers$1.injectPipeChangeDetectorRef = {
        name: 'ɵɵinjectPipeChangeDetectorRef',
        moduleName: CORE$1
      };
      Identifiers$1.directiveInject = {
        name: 'ɵɵdirectiveInject',
        moduleName: CORE$1
      };
      Identifiers$1.invalidFactory = {
        name: 'ɵɵinvalidFactory',
        moduleName: CORE$1
      };
      Identifiers$1.invalidFactoryDep = {
        name: 'ɵɵinvalidFactoryDep',
        moduleName: CORE$1
      };
      Identifiers$1.templateRefExtractor = {
        name: 'ɵɵtemplateRefExtractor',
        moduleName: CORE$1
      };
      Identifiers$1.resolveWindow = {
        name: 'ɵɵresolveWindow',
        moduleName: CORE$1
      };
      Identifiers$1.resolveDocument = {
        name: 'ɵɵresolveDocument',
        moduleName: CORE$1
      };
      Identifiers$1.resolveBody = {
        name: 'ɵɵresolveBody',
        moduleName: CORE$1
      };
      Identifiers$1.defineComponent = {
        name: 'ɵɵdefineComponent',
        moduleName: CORE$1
      };
      Identifiers$1.setComponentScope = {
        name: 'ɵɵsetComponentScope',
        moduleName: CORE$1
      };
      Identifiers$1.ComponentDefWithMeta = {
        name: 'ɵɵComponentDefWithMeta',
        moduleName: CORE$1
      };
      Identifiers$1.FactoryDef = {
        name: 'ɵɵFactoryDef',
        moduleName: CORE$1
      };
      Identifiers$1.defineDirective = {
        name: 'ɵɵdefineDirective',
        moduleName: CORE$1
      };
      Identifiers$1.DirectiveDefWithMeta = {
        name: 'ɵɵDirectiveDefWithMeta',
        moduleName: CORE$1
      };
      Identifiers$1.InjectorDef = {
        name: 'ɵɵInjectorDef',
        moduleName: CORE$1
      };
      Identifiers$1.defineInjector = {
        name: 'ɵɵdefineInjector',
        moduleName: CORE$1
      };
      Identifiers$1.NgModuleDefWithMeta = {
        name: 'ɵɵNgModuleDefWithMeta',
        moduleName: CORE$1
      };
      Identifiers$1.ModuleWithProviders = {
        name: 'ModuleWithProviders',
        moduleName: CORE$1
      };
      Identifiers$1.defineNgModule = {
        name: 'ɵɵdefineNgModule',
        moduleName: CORE$1
      };
      Identifiers$1.setNgModuleScope = {
        name: 'ɵɵsetNgModuleScope',
        moduleName: CORE$1
      };
      Identifiers$1.PipeDefWithMeta = {
        name: 'ɵɵPipeDefWithMeta',
        moduleName: CORE$1
      };
      Identifiers$1.definePipe = {
        name: 'ɵɵdefinePipe',
        moduleName: CORE$1
      };
      Identifiers$1.queryRefresh = {
        name: 'ɵɵqueryRefresh',
        moduleName: CORE$1
      };
      Identifiers$1.viewQuery = {
        name: 'ɵɵviewQuery',
        moduleName: CORE$1
      };
      Identifiers$1.staticViewQuery = {
        name: 'ɵɵstaticViewQuery',
        moduleName: CORE$1
      };
      Identifiers$1.staticContentQuery = {
        name: 'ɵɵstaticContentQuery',
        moduleName: CORE$1
      };
      Identifiers$1.loadQuery = {
        name: 'ɵɵloadQuery',
        moduleName: CORE$1
      };
      Identifiers$1.contentQuery = {
        name: 'ɵɵcontentQuery',
        moduleName: CORE$1
      };
      Identifiers$1.NgOnChangesFeature = {
        name: 'ɵɵNgOnChangesFeature',
        moduleName: CORE$1
      };
      Identifiers$1.InheritDefinitionFeature = {
        name: 'ɵɵInheritDefinitionFeature',
        moduleName: CORE$1
      };
      Identifiers$1.CopyDefinitionFeature = {
        name: 'ɵɵCopyDefinitionFeature',
        moduleName: CORE$1
      };
      Identifiers$1.ProvidersFeature = {
        name: 'ɵɵProvidersFeature',
        moduleName: CORE$1
      };
      Identifiers$1.listener = {
        name: 'ɵɵlistener',
        moduleName: CORE$1
      };
      Identifiers$1.getFactoryOf = {
        name: 'ɵɵgetFactoryOf',
        moduleName: CORE$1
      };
      Identifiers$1.getInheritedFactory = {
        name: 'ɵɵgetInheritedFactory',
        moduleName: CORE$1
      }; // sanitization-related functions

      Identifiers$1.sanitizeHtml = {
        name: 'ɵɵsanitizeHtml',
        moduleName: CORE$1
      };
      Identifiers$1.sanitizeStyle = {
        name: 'ɵɵsanitizeStyle',
        moduleName: CORE$1
      };
      Identifiers$1.sanitizeResourceUrl = {
        name: 'ɵɵsanitizeResourceUrl',
        moduleName: CORE$1
      };
      Identifiers$1.sanitizeScript = {
        name: 'ɵɵsanitizeScript',
        moduleName: CORE$1
      };
      Identifiers$1.sanitizeUrl = {
        name: 'ɵɵsanitizeUrl',
        moduleName: CORE$1
      };
      Identifiers$1.sanitizeUrlOrResourceUrl = {
        name: 'ɵɵsanitizeUrlOrResourceUrl',
        moduleName: CORE$1
      };
      Identifiers$1.trustConstantHtml = {
        name: 'ɵɵtrustConstantHtml',
        moduleName: CORE$1
      };
      Identifiers$1.trustConstantScript = {
        name: 'ɵɵtrustConstantScript',
        moduleName: CORE$1
      };
      Identifiers$1.trustConstantResourceUrl = {
        name: 'ɵɵtrustConstantResourceUrl',
        moduleName: CORE$1
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Convert an object map with `Expression` values into a `LiteralMapExpr`.
       */

      function mapToMapExpression(map) {
        var result = Object.keys(map).map(function (key) {
          return {
            key: key,
            // The assertion here is because really TypeScript doesn't allow us to express that if the
            // key is present, it will have a value, but this is true in reality.
            value: map[key],
            quoted: false
          };
        });
        return literalMap(result);
      }
      /**
       * Convert metadata into an `Expression` in the given `OutputContext`.
       *
       * This operation will handle arrays, references to symbols, or literal `null` or `undefined`.
       */


      function convertMetaToOutput(meta, ctx) {
        if (Array.isArray(meta)) {
          return literalArr(meta.map(function (entry) {
            return convertMetaToOutput(entry, ctx);
          }));
        }

        if (meta instanceof StaticSymbol) {
          return ctx.importExpr(meta);
        }

        if (meta == null) {
          return literal(meta);
        }

        throw new Error("Internal error: Unsupported or unknown metadata: ".concat(meta));
      }

      function typeWithParameters(type, numParams) {
        if (numParams === 0) {
          return expressionType(type);
        }

        var params = [];

        for (var i = 0; i < numParams; i++) {
          params.push(DYNAMIC_TYPE);
        }

        return expressionType(type, undefined, params);
      }

      var ANIMATE_SYMBOL_PREFIX = '@';

      function prepareSyntheticPropertyName(name) {
        return "".concat(ANIMATE_SYMBOL_PREFIX).concat(name);
      }

      function prepareSyntheticListenerName(name, phase) {
        return "".concat(ANIMATE_SYMBOL_PREFIX).concat(name, ".").concat(phase);
      }

      function isSyntheticPropertyOrListener(name) {
        return name.charAt(0) == ANIMATE_SYMBOL_PREFIX;
      }

      function getSyntheticPropertyName(name) {
        // this will strip out listener phase values...
        // @foo.start => @foo
        var i = name.indexOf('.');
        name = i > 0 ? name.substring(0, i) : name;

        if (name.charAt(0) !== ANIMATE_SYMBOL_PREFIX) {
          name = ANIMATE_SYMBOL_PREFIX + name;
        }

        return name;
      }

      function prepareSyntheticListenerFunctionName(name, phase) {
        return "animation_".concat(name, "_").concat(phase);
      }

      function jitOnlyGuardedExpression(expr) {
        var ngJitMode = new ExternalExpr({
          name: 'ngJitMode',
          moduleName: null
        });
        var jitFlagNotDefined = new BinaryOperatorExpr(BinaryOperator.Identical, new TypeofExpr(ngJitMode), literal('undefined'));
        var jitFlagUndefinedOrTrue = new BinaryOperatorExpr(BinaryOperator.Or, jitFlagNotDefined, ngJitMode,
        /* type */
        undefined,
        /* sourceSpan */
        undefined, true);
        return new BinaryOperatorExpr(BinaryOperator.And, jitFlagUndefinedOrTrue, expr);
      }

      function wrapReference(value) {
        var wrapped = new WrappedNodeExpr(value);
        return {
          value: wrapped,
          type: wrapped
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var Text = /*#__PURE__*/function () {
        function Text(value, sourceSpan) {
          _classCallCheck(this, Text);

          this.value = value;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(Text, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitText(this);
          }
        }]);

        return Text;
      }();

      var BoundText = /*#__PURE__*/function () {
        function BoundText(value, sourceSpan, i18n) {
          _classCallCheck(this, BoundText);

          this.value = value;
          this.sourceSpan = sourceSpan;
          this.i18n = i18n;
        }

        _createClass2(BoundText, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitBoundText(this);
          }
        }]);

        return BoundText;
      }();

      var TextAttribute = /*#__PURE__*/function () {
        function TextAttribute(name, value, sourceSpan, valueSpan, i18n) {
          _classCallCheck(this, TextAttribute);

          this.name = name;
          this.value = value;
          this.sourceSpan = sourceSpan;
          this.valueSpan = valueSpan;
          this.i18n = i18n;
        }

        _createClass2(TextAttribute, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitTextAttribute(this);
          }
        }]);

        return TextAttribute;
      }();

      var BoundAttribute = /*#__PURE__*/function () {
        function BoundAttribute(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan, i18n) {
          _classCallCheck(this, BoundAttribute);

          this.name = name;
          this.type = type;
          this.securityContext = securityContext;
          this.value = value;
          this.unit = unit;
          this.sourceSpan = sourceSpan;
          this.keySpan = keySpan;
          this.valueSpan = valueSpan;
          this.i18n = i18n;
        }

        _createClass2(BoundAttribute, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitBoundAttribute(this);
          }
        }], [{
          key: "fromBoundElementProperty",
          value: function fromBoundElementProperty(prop, i18n) {
            if (prop.keySpan === undefined) {
              throw new Error("Unexpected state: keySpan must be defined for bound attributes but was not for ".concat(prop.name, ": ").concat(prop.sourceSpan));
            }

            return new BoundAttribute(prop.name, prop.type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan, prop.keySpan, prop.valueSpan, i18n);
          }
        }]);

        return BoundAttribute;
      }();

      var BoundEvent = /*#__PURE__*/function () {
        function BoundEvent(name, type, handler, target, phase, sourceSpan, handlerSpan) {
          _classCallCheck(this, BoundEvent);

          this.name = name;
          this.type = type;
          this.handler = handler;
          this.target = target;
          this.phase = phase;
          this.sourceSpan = sourceSpan;
          this.handlerSpan = handlerSpan;
        }

        _createClass2(BoundEvent, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitBoundEvent(this);
          }
        }], [{
          key: "fromParsedEvent",
          value: function fromParsedEvent(event) {
            var target = event.type === 0
            /* Regular */
            ? event.targetOrPhase : null;
            var phase = event.type === 1
            /* Animation */
            ? event.targetOrPhase : null;
            return new BoundEvent(event.name, event.type, event.handler, target, phase, event.sourceSpan, event.handlerSpan);
          }
        }]);

        return BoundEvent;
      }();

      var Element = /*#__PURE__*/function () {
        function Element(name, attributes, inputs, outputs, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n) {
          _classCallCheck(this, Element);

          this.name = name;
          this.attributes = attributes;
          this.inputs = inputs;
          this.outputs = outputs;
          this.children = children;
          this.references = references;
          this.sourceSpan = sourceSpan;
          this.startSourceSpan = startSourceSpan;
          this.endSourceSpan = endSourceSpan;
          this.i18n = i18n;
        }

        _createClass2(Element, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitElement(this);
          }
        }]);

        return Element;
      }();

      var Template = /*#__PURE__*/function () {
        function Template(tagName, attributes, inputs, outputs, templateAttrs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n) {
          _classCallCheck(this, Template);

          this.tagName = tagName;
          this.attributes = attributes;
          this.inputs = inputs;
          this.outputs = outputs;
          this.templateAttrs = templateAttrs;
          this.children = children;
          this.references = references;
          this.variables = variables;
          this.sourceSpan = sourceSpan;
          this.startSourceSpan = startSourceSpan;
          this.endSourceSpan = endSourceSpan;
          this.i18n = i18n;
        }

        _createClass2(Template, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitTemplate(this);
          }
        }]);

        return Template;
      }();

      var Content = /*#__PURE__*/function () {
        function Content(selector, attributes, sourceSpan, i18n) {
          _classCallCheck(this, Content);

          this.selector = selector;
          this.attributes = attributes;
          this.sourceSpan = sourceSpan;
          this.i18n = i18n;
          this.name = 'ng-content';
        }

        _createClass2(Content, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitContent(this);
          }
        }]);

        return Content;
      }();

      var Variable = /*#__PURE__*/function () {
        function Variable(name, value, sourceSpan, keySpan, valueSpan) {
          _classCallCheck(this, Variable);

          this.name = name;
          this.value = value;
          this.sourceSpan = sourceSpan;
          this.keySpan = keySpan;
          this.valueSpan = valueSpan;
        }

        _createClass2(Variable, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitVariable(this);
          }
        }]);

        return Variable;
      }();

      var Reference = /*#__PURE__*/function () {
        function Reference(name, value, sourceSpan, valueSpan) {
          _classCallCheck(this, Reference);

          this.name = name;
          this.value = value;
          this.sourceSpan = sourceSpan;
          this.valueSpan = valueSpan;
        }

        _createClass2(Reference, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitReference(this);
          }
        }]);

        return Reference;
      }();

      var Icu = /*#__PURE__*/function () {
        function Icu(vars, placeholders, sourceSpan, i18n) {
          _classCallCheck(this, Icu);

          this.vars = vars;
          this.placeholders = placeholders;
          this.sourceSpan = sourceSpan;
          this.i18n = i18n;
        }

        _createClass2(Icu, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitIcu(this);
          }
        }]);

        return Icu;
      }();

      var NullVisitor = /*#__PURE__*/function () {
        function NullVisitor() {
          _classCallCheck(this, NullVisitor);
        }

        _createClass2(NullVisitor, [{
          key: "visitElement",
          value: function visitElement(element) {}
        }, {
          key: "visitTemplate",
          value: function visitTemplate(template) {}
        }, {
          key: "visitContent",
          value: function visitContent(content) {}
        }, {
          key: "visitVariable",
          value: function visitVariable(variable) {}
        }, {
          key: "visitReference",
          value: function visitReference(reference) {}
        }, {
          key: "visitTextAttribute",
          value: function visitTextAttribute(attribute) {}
        }, {
          key: "visitBoundAttribute",
          value: function visitBoundAttribute(attribute) {}
        }, {
          key: "visitBoundEvent",
          value: function visitBoundEvent(attribute) {}
        }, {
          key: "visitText",
          value: function visitText(text) {}
        }, {
          key: "visitBoundText",
          value: function visitBoundText(text) {}
        }, {
          key: "visitIcu",
          value: function visitIcu(icu) {}
        }]);

        return NullVisitor;
      }();

      var RecursiveVisitor = /*#__PURE__*/function () {
        function RecursiveVisitor() {
          _classCallCheck(this, RecursiveVisitor);
        }

        _createClass2(RecursiveVisitor, [{
          key: "visitElement",
          value: function visitElement(element) {
            visitAll(this, element.attributes);
            visitAll(this, element.children);
            visitAll(this, element.references);
          }
        }, {
          key: "visitTemplate",
          value: function visitTemplate(template) {
            visitAll(this, template.attributes);
            visitAll(this, template.children);
            visitAll(this, template.references);
            visitAll(this, template.variables);
          }
        }, {
          key: "visitContent",
          value: function visitContent(content) {}
        }, {
          key: "visitVariable",
          value: function visitVariable(variable) {}
        }, {
          key: "visitReference",
          value: function visitReference(reference) {}
        }, {
          key: "visitTextAttribute",
          value: function visitTextAttribute(attribute) {}
        }, {
          key: "visitBoundAttribute",
          value: function visitBoundAttribute(attribute) {}
        }, {
          key: "visitBoundEvent",
          value: function visitBoundEvent(attribute) {}
        }, {
          key: "visitText",
          value: function visitText(text) {}
        }, {
          key: "visitBoundText",
          value: function visitBoundText(text) {}
        }, {
          key: "visitIcu",
          value: function visitIcu(icu) {}
        }]);

        return RecursiveVisitor;
      }();

      var TransformVisitor = /*#__PURE__*/function () {
        function TransformVisitor() {
          _classCallCheck(this, TransformVisitor);
        }

        _createClass2(TransformVisitor, [{
          key: "visitElement",
          value: function visitElement(element) {
            var newAttributes = transformAll(this, element.attributes);
            var newInputs = transformAll(this, element.inputs);
            var newOutputs = transformAll(this, element.outputs);
            var newChildren = transformAll(this, element.children);
            var newReferences = transformAll(this, element.references);

            if (newAttributes != element.attributes || newInputs != element.inputs || newOutputs != element.outputs || newChildren != element.children || newReferences != element.references) {
              return new Element(element.name, newAttributes, newInputs, newOutputs, newChildren, newReferences, element.sourceSpan, element.startSourceSpan, element.endSourceSpan);
            }

            return element;
          }
        }, {
          key: "visitTemplate",
          value: function visitTemplate(template) {
            var newAttributes = transformAll(this, template.attributes);
            var newInputs = transformAll(this, template.inputs);
            var newOutputs = transformAll(this, template.outputs);
            var newTemplateAttrs = transformAll(this, template.templateAttrs);
            var newChildren = transformAll(this, template.children);
            var newReferences = transformAll(this, template.references);
            var newVariables = transformAll(this, template.variables);

            if (newAttributes != template.attributes || newInputs != template.inputs || newOutputs != template.outputs || newTemplateAttrs != template.templateAttrs || newChildren != template.children || newReferences != template.references || newVariables != template.variables) {
              return new Template(template.tagName, newAttributes, newInputs, newOutputs, newTemplateAttrs, newChildren, newReferences, newVariables, template.sourceSpan, template.startSourceSpan, template.endSourceSpan);
            }

            return template;
          }
        }, {
          key: "visitContent",
          value: function visitContent(content) {
            return content;
          }
        }, {
          key: "visitVariable",
          value: function visitVariable(variable) {
            return variable;
          }
        }, {
          key: "visitReference",
          value: function visitReference(reference) {
            return reference;
          }
        }, {
          key: "visitTextAttribute",
          value: function visitTextAttribute(attribute) {
            return attribute;
          }
        }, {
          key: "visitBoundAttribute",
          value: function visitBoundAttribute(attribute) {
            return attribute;
          }
        }, {
          key: "visitBoundEvent",
          value: function visitBoundEvent(attribute) {
            return attribute;
          }
        }, {
          key: "visitText",
          value: function visitText(text) {
            return text;
          }
        }, {
          key: "visitBoundText",
          value: function visitBoundText(text) {
            return text;
          }
        }, {
          key: "visitIcu",
          value: function visitIcu(icu) {
            return icu;
          }
        }]);

        return TransformVisitor;
      }();

      function visitAll(visitor, nodes) {
        var result = [];

        if (visitor.visit) {
          var _iterator3 = _createForOfIteratorHelper(nodes),
              _step3;

          try {
            for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
              var node = _step3.value;
              var newNode = visitor.visit(node) || node.visit(visitor);
            }
          } catch (err) {
            _iterator3.e(err);
          } finally {
            _iterator3.f();
          }
        } else {
          var _iterator4 = _createForOfIteratorHelper(nodes),
              _step4;

          try {
            for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
              var _node = _step4.value;

              var _newNode = _node.visit(visitor);

              if (_newNode) {
                result.push(_newNode);
              }
            }
          } catch (err) {
            _iterator4.e(err);
          } finally {
            _iterator4.f();
          }
        }

        return result;
      }

      function transformAll(visitor, nodes) {
        var result = [];
        var changed = false;

        var _iterator5 = _createForOfIteratorHelper(nodes),
            _step5;

        try {
          for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
            var node = _step5.value;
            var newNode = node.visit(visitor);

            if (newNode) {
              result.push(newNode);
            }

            changed = changed || newNode != node;
          }
        } catch (err) {
          _iterator5.e(err);
        } finally {
          _iterator5.f();
        }

        return changed ? result : nodes;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var Message =
      /**
       * @param nodes message AST
       * @param placeholders maps placeholder names to static content and their source spans
       * @param placeholderToMessage maps placeholder names to messages (used for nested ICU messages)
       * @param meaning
       * @param description
       * @param customId
       */
      function Message(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
        _classCallCheck(this, Message);

        this.nodes = nodes;
        this.placeholders = placeholders;
        this.placeholderToMessage = placeholderToMessage;
        this.meaning = meaning;
        this.description = description;
        this.customId = customId;
        this.id = this.customId;
        /** The ids to use if there are no custom id and if `i18nLegacyMessageIdFormat` is not empty */

        this.legacyIds = [];

        if (nodes.length) {
          this.sources = [{
            filePath: nodes[0].sourceSpan.start.file.url,
            startLine: nodes[0].sourceSpan.start.line + 1,
            startCol: nodes[0].sourceSpan.start.col + 1,
            endLine: nodes[nodes.length - 1].sourceSpan.end.line + 1,
            endCol: nodes[0].sourceSpan.start.col + 1
          }];
        } else {
          this.sources = [];
        }
      };

      var Text$1 = /*#__PURE__*/function () {
        function Text$1(value, sourceSpan) {
          _classCallCheck(this, Text$1);

          this.value = value;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(Text$1, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitText(this, context);
          }
        }]);

        return Text$1;
      }(); // TODO(vicb): do we really need this node (vs an array) ?


      var Container = /*#__PURE__*/function () {
        function Container(children, sourceSpan) {
          _classCallCheck(this, Container);

          this.children = children;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(Container, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitContainer(this, context);
          }
        }]);

        return Container;
      }();

      var Icu$1 = /*#__PURE__*/function () {
        function Icu$1(expression, type, cases, sourceSpan) {
          _classCallCheck(this, Icu$1);

          this.expression = expression;
          this.type = type;
          this.cases = cases;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(Icu$1, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitIcu(this, context);
          }
        }]);

        return Icu$1;
      }();

      var TagPlaceholder = /*#__PURE__*/function () {
        function TagPlaceholder(tag, attrs, startName, closeName, children, isVoid, // TODO sourceSpan should cover all (we need a startSourceSpan and endSourceSpan)
        sourceSpan, startSourceSpan, endSourceSpan) {
          _classCallCheck(this, TagPlaceholder);

          this.tag = tag;
          this.attrs = attrs;
          this.startName = startName;
          this.closeName = closeName;
          this.children = children;
          this.isVoid = isVoid;
          this.sourceSpan = sourceSpan;
          this.startSourceSpan = startSourceSpan;
          this.endSourceSpan = endSourceSpan;
        }

        _createClass2(TagPlaceholder, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitTagPlaceholder(this, context);
          }
        }]);

        return TagPlaceholder;
      }();

      var Placeholder = /*#__PURE__*/function () {
        function Placeholder(value, name, sourceSpan) {
          _classCallCheck(this, Placeholder);

          this.value = value;
          this.name = name;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(Placeholder, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitPlaceholder(this, context);
          }
        }]);

        return Placeholder;
      }();

      var IcuPlaceholder = /*#__PURE__*/function () {
        function IcuPlaceholder(value, name, sourceSpan) {
          _classCallCheck(this, IcuPlaceholder);

          this.value = value;
          this.name = name;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(IcuPlaceholder, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitIcuPlaceholder(this, context);
          }
        }]);

        return IcuPlaceholder;
      }(); // Clone the AST


      var CloneVisitor = /*#__PURE__*/function () {
        function CloneVisitor() {
          _classCallCheck(this, CloneVisitor);
        }

        _createClass2(CloneVisitor, [{
          key: "visitText",
          value: function visitText(text, context) {
            return new Text$1(text.value, text.sourceSpan);
          }
        }, {
          key: "visitContainer",
          value: function visitContainer(container, context) {
            var _this67 = this;

            var children = container.children.map(function (n) {
              return n.visit(_this67, context);
            });
            return new Container(children, container.sourceSpan);
          }
        }, {
          key: "visitIcu",
          value: function visitIcu(icu, context) {
            var _this68 = this;

            var cases = {};
            Object.keys(icu.cases).forEach(function (key) {
              return cases[key] = icu.cases[key].visit(_this68, context);
            });
            var msg = new Icu$1(icu.expression, icu.type, cases, icu.sourceSpan);
            msg.expressionPlaceholder = icu.expressionPlaceholder;
            return msg;
          }
        }, {
          key: "visitTagPlaceholder",
          value: function visitTagPlaceholder(ph, context) {
            var _this69 = this;

            var children = ph.children.map(function (n) {
              return n.visit(_this69, context);
            });
            return new TagPlaceholder(ph.tag, ph.attrs, ph.startName, ph.closeName, children, ph.isVoid, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan);
          }
        }, {
          key: "visitPlaceholder",
          value: function visitPlaceholder(ph, context) {
            return new Placeholder(ph.value, ph.name, ph.sourceSpan);
          }
        }, {
          key: "visitIcuPlaceholder",
          value: function visitIcuPlaceholder(ph, context) {
            return new IcuPlaceholder(ph.value, ph.name, ph.sourceSpan);
          }
        }]);

        return CloneVisitor;
      }(); // Visit all the nodes recursively


      var RecurseVisitor = /*#__PURE__*/function () {
        function RecurseVisitor() {
          _classCallCheck(this, RecurseVisitor);
        }

        _createClass2(RecurseVisitor, [{
          key: "visitText",
          value: function visitText(text, context) {}
        }, {
          key: "visitContainer",
          value: function visitContainer(container, context) {
            var _this70 = this;

            container.children.forEach(function (child) {
              return child.visit(_this70);
            });
          }
        }, {
          key: "visitIcu",
          value: function visitIcu(icu, context) {
            var _this71 = this;

            Object.keys(icu.cases).forEach(function (k) {
              icu.cases[k].visit(_this71);
            });
          }
        }, {
          key: "visitTagPlaceholder",
          value: function visitTagPlaceholder(ph, context) {
            var _this72 = this;

            ph.children.forEach(function (child) {
              return child.visit(_this72);
            });
          }
        }, {
          key: "visitPlaceholder",
          value: function visitPlaceholder(ph, context) {}
        }, {
          key: "visitIcuPlaceholder",
          value: function visitIcuPlaceholder(ph, context) {}
        }]);

        return RecurseVisitor;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Represents a big integer using a buffer of its individual digits, with the least significant
       * digit stored at the beginning of the array (little endian).
       *
       * For performance reasons, each instance is mutable. The addition operation can be done in-place
       * to reduce memory pressure of allocation for the digits array.
       */


      var BigInteger = /*#__PURE__*/function () {
        /**
         * Creates a big integer using its individual digits in little endian storage.
         */
        function BigInteger(digits) {
          _classCallCheck(this, BigInteger);

          this.digits = digits;
        }

        _createClass2(BigInteger, [{
          key: "clone",
          value:
          /**
           * Creates a clone of this instance.
           */
          function clone() {
            return new BigInteger(this.digits.slice());
          }
          /**
           * Returns a new big integer with the sum of `this` and `other` as its value. This does not mutate
           * `this` but instead returns a new instance, unlike `addToSelf`.
           */

        }, {
          key: "add",
          value: function add(other) {
            var result = this.clone();
            result.addToSelf(other);
            return result;
          }
          /**
           * Adds `other` to the instance itself, thereby mutating its value.
           */

        }, {
          key: "addToSelf",
          value: function addToSelf(other) {
            var maxNrOfDigits = Math.max(this.digits.length, other.digits.length);
            var carry = 0;

            for (var i = 0; i < maxNrOfDigits; i++) {
              var digitSum = carry;

              if (i < this.digits.length) {
                digitSum += this.digits[i];
              }

              if (i < other.digits.length) {
                digitSum += other.digits[i];
              }

              if (digitSum >= 10) {
                this.digits[i] = digitSum - 10;
                carry = 1;
              } else {
                this.digits[i] = digitSum;
                carry = 0;
              }
            } // Apply a remaining carry if needed.


            if (carry > 0) {
              this.digits[maxNrOfDigits] = 1;
            }
          }
          /**
           * Builds the decimal string representation of the big integer. As this is stored in
           * little endian, the digits are concatenated in reverse order.
           */

        }, {
          key: "toString",
          value: function toString() {
            var res = '';

            for (var i = this.digits.length - 1; i >= 0; i--) {
              res += this.digits[i];
            }

            return res;
          }
        }], [{
          key: "zero",
          value: function zero() {
            return new BigInteger([0]);
          }
        }, {
          key: "one",
          value: function one() {
            return new BigInteger([1]);
          }
        }]);

        return BigInteger;
      }();
      /**
       * Represents a big integer which is optimized for multiplication operations, as its power-of-twos
       * are memoized. See `multiplyBy()` for details on the multiplication algorithm.
       */


      var BigIntForMultiplication = /*#__PURE__*/function () {
        function BigIntForMultiplication(value) {
          _classCallCheck(this, BigIntForMultiplication);

          this.powerOfTwos = [value];
        }
        /**
         * Returns the big integer itself.
         */


        _createClass2(BigIntForMultiplication, [{
          key: "getValue",
          value: function getValue() {
            return this.powerOfTwos[0];
          }
          /**
           * Computes the value for `num * b`, where `num` is a JS number and `b` is a big integer. The
           * value for `b` is represented by a storage model that is optimized for this computation.
           *
           * This operation is implemented in N(log2(num)) by continuous halving of the number, where the
           * least-significant bit (LSB) is tested in each iteration. If the bit is set, the bit's index is
           * used as exponent into the power-of-two multiplication of `b`.
           *
           * As an example, consider the multiplication num=42, b=1337. In binary 42 is 0b00101010 and the
           * algorithm unrolls into the following iterations:
           *
           *  Iteration | num        | LSB  | b * 2^iter | Add? | product
           * -----------|------------|------|------------|------|--------
           *  0         | 0b00101010 | 0    | 1337       | No   | 0
           *  1         | 0b00010101 | 1    | 2674       | Yes  | 2674
           *  2         | 0b00001010 | 0    | 5348       | No   | 2674
           *  3         | 0b00000101 | 1    | 10696      | Yes  | 13370
           *  4         | 0b00000010 | 0    | 21392      | No   | 13370
           *  5         | 0b00000001 | 1    | 42784      | Yes  | 56154
           *  6         | 0b00000000 | 0    | 85568      | No   | 56154
           *
           * The computed product of 56154 is indeed the correct result.
           *
           * The `BigIntForMultiplication` representation for a big integer provides memoized access to the
           * power-of-two values to reduce the workload in computing those values.
           */

        }, {
          key: "multiplyBy",
          value: function multiplyBy(num) {
            var product = BigInteger.zero();
            this.multiplyByAndAddTo(num, product);
            return product;
          }
          /**
           * See `multiplyBy()` for details. This function allows for the computed product to be added
           * directly to the provided result big integer.
           */

        }, {
          key: "multiplyByAndAddTo",
          value: function multiplyByAndAddTo(num, result) {
            for (var exponent = 0; num !== 0; num = num >>> 1, exponent++) {
              if (num & 1) {
                var value = this.getMultipliedByPowerOfTwo(exponent);
                result.addToSelf(value);
              }
            }
          }
          /**
           * Computes and memoizes the big integer value for `this.number * 2^exponent`.
           */

        }, {
          key: "getMultipliedByPowerOfTwo",
          value: function getMultipliedByPowerOfTwo(exponent) {
            // Compute the powers up until the requested exponent, where each value is computed from its
            // predecessor. This is simple as `this.number * 2^(exponent - 1)` only has to be doubled (i.e.
            // added to itself) to reach `this.number * 2^exponent`.
            for (var i = this.powerOfTwos.length; i <= exponent; i++) {
              var previousPower = this.powerOfTwos[i - 1];
              this.powerOfTwos[i] = previousPower.add(previousPower);
            }

            return this.powerOfTwos[exponent];
          }
        }]);

        return BigIntForMultiplication;
      }();
      /**
       * Represents an exponentiation operation for the provided base, of which exponents are computed and
       * memoized. The results are represented by a `BigIntForMultiplication` which is tailored for
       * multiplication operations by memoizing the power-of-twos. This effectively results in a matrix
       * representation that is lazily computed upon request.
       */


      var BigIntExponentiation = /*#__PURE__*/function () {
        function BigIntExponentiation(base) {
          _classCallCheck(this, BigIntExponentiation);

          this.base = base;
          this.exponents = [new BigIntForMultiplication(BigInteger.one())];
        }
        /**
         * Compute the value for `this.base^exponent`, resulting in a big integer that is optimized for
         * further multiplication operations.
         */


        _createClass2(BigIntExponentiation, [{
          key: "toThePowerOf",
          value: function toThePowerOf(exponent) {
            // Compute the results up until the requested exponent, where every value is computed from its
            // predecessor. This is because `this.base^(exponent - 1)` only has to be multiplied by `base`
            // to reach `this.base^exponent`.
            for (var i = this.exponents.length; i <= exponent; i++) {
              var value = this.exponents[i - 1].multiplyBy(this.base);
              this.exponents[i] = new BigIntForMultiplication(value);
            }

            return this.exponents[exponent];
          }
        }]);

        return BigIntExponentiation;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Return the message id or compute it using the XLIFF1 digest.
       */


      function _digest2(message) {
        return message.id || computeDigest(message);
      }
      /**
       * Compute the message id using the XLIFF1 digest.
       */


      function computeDigest(message) {
        return sha1(serializeNodes(message.nodes).join('') + "[".concat(message.meaning, "]"));
      }
      /**
       * Return the message id or compute it using the XLIFF2/XMB/$localize digest.
       */


      function decimalDigest(message) {
        return message.id || computeDecimalDigest(message);
      }
      /**
       * Compute the message id using the XLIFF2/XMB/$localize digest.
       */


      function computeDecimalDigest(message) {
        var visitor = new _SerializerIgnoreIcuExpVisitor();
        var parts = message.nodes.map(function (a) {
          return a.visit(visitor, null);
        });
        return computeMsgId(parts.join(''), message.meaning);
      }
      /**
       * Serialize the i18n ast to something xml-like in order to generate an UID.
       *
       * The visitor is also used in the i18n parser tests
       *
       * @internal
       */


      var _SerializerVisitor = /*#__PURE__*/function () {
        function _SerializerVisitor() {
          _classCallCheck(this, _SerializerVisitor);
        }

        _createClass2(_SerializerVisitor, [{
          key: "visitText",
          value: function visitText(text, context) {
            return text.value;
          }
        }, {
          key: "visitContainer",
          value: function visitContainer(container, context) {
            var _this73 = this;

            return "[".concat(container.children.map(function (child) {
              return child.visit(_this73);
            }).join(', '), "]");
          }
        }, {
          key: "visitIcu",
          value: function visitIcu(icu, context) {
            var _this74 = this;

            var strCases = Object.keys(icu.cases).map(function (k) {
              return "".concat(k, " {").concat(icu.cases[k].visit(_this74), "}");
            });
            return "{".concat(icu.expression, ", ").concat(icu.type, ", ").concat(strCases.join(', '), "}");
          }
        }, {
          key: "visitTagPlaceholder",
          value: function visitTagPlaceholder(ph, context) {
            var _this75 = this;

            return ph.isVoid ? "<ph tag name=\"".concat(ph.startName, "\"/>") : "<ph tag name=\"".concat(ph.startName, "\">").concat(ph.children.map(function (child) {
              return child.visit(_this75);
            }).join(', '), "</ph name=\"").concat(ph.closeName, "\">");
          }
        }, {
          key: "visitPlaceholder",
          value: function visitPlaceholder(ph, context) {
            return ph.value ? "<ph name=\"".concat(ph.name, "\">").concat(ph.value, "</ph>") : "<ph name=\"".concat(ph.name, "\"/>");
          }
        }, {
          key: "visitIcuPlaceholder",
          value: function visitIcuPlaceholder(ph, context) {
            return "<ph icu name=\"".concat(ph.name, "\">").concat(ph.value.visit(this), "</ph>");
          }
        }]);

        return _SerializerVisitor;
      }();

      var serializerVisitor = new _SerializerVisitor();

      function serializeNodes(nodes) {
        return nodes.map(function (a) {
          return a.visit(serializerVisitor, null);
        });
      }
      /**
       * Serialize the i18n ast to something xml-like in order to generate an UID.
       *
       * Ignore the ICU expressions so that message IDs stays identical if only the expression changes.
       *
       * @internal
       */


      var _SerializerIgnoreIcuExpVisitor = /*#__PURE__*/function (_SerializerVisitor2) {
        _inherits(_SerializerIgnoreIcuExpVisitor, _SerializerVisitor2);

        var _super53 = _createSuper(_SerializerIgnoreIcuExpVisitor);

        function _SerializerIgnoreIcuExpVisitor() {
          _classCallCheck(this, _SerializerIgnoreIcuExpVisitor);

          return _super53.apply(this, arguments);
        }

        _createClass2(_SerializerIgnoreIcuExpVisitor, [{
          key: "visitIcu",
          value: function visitIcu(icu, context) {
            var _this76 = this;

            var strCases = Object.keys(icu.cases).map(function (k) {
              return "".concat(k, " {").concat(icu.cases[k].visit(_this76), "}");
            }); // Do not take the expression into account

            return "{".concat(icu.type, ", ").concat(strCases.join(', '), "}");
          }
        }]);

        return _SerializerIgnoreIcuExpVisitor;
      }(_SerializerVisitor);
      /**
       * Compute the SHA1 of the given string
       *
       * see https://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf
       *
       * WARNING: this function has not been designed not tested with security in mind.
       *          DO NOT USE IT IN A SECURITY SENSITIVE CONTEXT.
       */


      function sha1(str) {
        var utf8 = utf8Encode(str);
        var words32 = bytesToWords32(utf8, Endian.Big);
        var len = utf8.length * 8;
        var w = newArray(80);
        var a = 0x67452301,
            b = 0xefcdab89,
            c = 0x98badcfe,
            d = 0x10325476,
            e = 0xc3d2e1f0;
        words32[len >> 5] |= 0x80 << 24 - len % 32;
        words32[(len + 64 >> 9 << 4) + 15] = len;

        for (var i = 0; i < words32.length; i += 16) {
          var h0 = a,
              h1 = b,
              h2 = c,
              h3 = d,
              h4 = e;

          for (var j = 0; j < 80; j++) {
            if (j < 16) {
              w[j] = words32[i + j];
            } else {
              w[j] = rol32(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
            }

            var fkVal = fk(j, b, c, d);
            var f = fkVal[0];
            var k = fkVal[1];
            var temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32);
            e = d;
            d = c;
            c = rol32(b, 30);
            b = a;
            a = temp;
          }

          a = add32(a, h0);
          b = add32(b, h1);
          c = add32(c, h2);
          d = add32(d, h3);
          e = add32(e, h4);
        }

        return bytesToHexString(words32ToByteString([a, b, c, d, e]));
      }

      function fk(index, b, c, d) {
        if (index < 20) {
          return [b & c | ~b & d, 0x5a827999];
        }

        if (index < 40) {
          return [b ^ c ^ d, 0x6ed9eba1];
        }

        if (index < 60) {
          return [b & c | b & d | c & d, 0x8f1bbcdc];
        }

        return [b ^ c ^ d, 0xca62c1d6];
      }
      /**
       * Compute the fingerprint of the given string
       *
       * The output is 64 bit number encoded as a decimal string
       *
       * based on:
       * https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/GoogleJsMessageIdGenerator.java
       */


      function fingerprint(str) {
        var utf8 = utf8Encode(str);
        var hi = hash32(utf8, 0);
        var lo = hash32(utf8, 102072);

        if (hi == 0 && (lo == 0 || lo == 1)) {
          hi = hi ^ 0x130f9bef;
          lo = lo ^ -0x6b5f56d8;
        }

        return [hi, lo];
      }

      function computeMsgId(msg) {
        var meaning = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
        var msgFingerprint = fingerprint(msg);

        if (meaning) {
          var meaningFingerprint = fingerprint(meaning);
          msgFingerprint = add64(rol64(msgFingerprint, 1), meaningFingerprint);
        }

        var hi = msgFingerprint[0];
        var lo = msgFingerprint[1];
        return wordsToDecimalString(hi & 0x7fffffff, lo);
      }

      function hash32(bytes, c) {
        var a = 0x9e3779b9,
            b = 0x9e3779b9;
        var i;
        var len = bytes.length;

        for (i = 0; i + 12 <= len; i += 12) {
          a = add32(a, wordAt(bytes, i, Endian.Little));
          b = add32(b, wordAt(bytes, i + 4, Endian.Little));
          c = add32(c, wordAt(bytes, i + 8, Endian.Little));
          var res = mix(a, b, c);
          a = res[0], b = res[1], c = res[2];
        }

        a = add32(a, wordAt(bytes, i, Endian.Little));
        b = add32(b, wordAt(bytes, i + 4, Endian.Little)); // the first byte of c is reserved for the length

        c = add32(c, len);
        c = add32(c, wordAt(bytes, i + 8, Endian.Little) << 8);
        return mix(a, b, c)[2];
      } // clang-format off


      function mix(a, b, c) {
        a = sub32(a, b);
        a = sub32(a, c);
        a ^= c >>> 13;
        b = sub32(b, c);
        b = sub32(b, a);
        b ^= a << 8;
        c = sub32(c, a);
        c = sub32(c, b);
        c ^= b >>> 13;
        a = sub32(a, b);
        a = sub32(a, c);
        a ^= c >>> 12;
        b = sub32(b, c);
        b = sub32(b, a);
        b ^= a << 16;
        c = sub32(c, a);
        c = sub32(c, b);
        c ^= b >>> 5;
        a = sub32(a, b);
        a = sub32(a, c);
        a ^= c >>> 3;
        b = sub32(b, c);
        b = sub32(b, a);
        b ^= a << 10;
        c = sub32(c, a);
        c = sub32(c, b);
        c ^= b >>> 15;
        return [a, b, c];
      } // clang-format on
      // Utils


      var Endian;

      (function (Endian) {
        Endian[Endian["Little"] = 0] = "Little";
        Endian[Endian["Big"] = 1] = "Big";
      })(Endian || (Endian = {}));

      function add32(a, b) {
        return add32to64(a, b)[1];
      }

      function add32to64(a, b) {
        var low = (a & 0xffff) + (b & 0xffff);
        var high = (a >>> 16) + (b >>> 16) + (low >>> 16);
        return [high >>> 16, high << 16 | low & 0xffff];
      }

      function add64(a, b) {
        var ah = a[0],
            al = a[1];
        var bh = b[0],
            bl = b[1];
        var result = add32to64(al, bl);
        var carry = result[0];
        var l = result[1];
        var h = add32(add32(ah, bh), carry);
        return [h, l];
      }

      function sub32(a, b) {
        var low = (a & 0xffff) - (b & 0xffff);
        var high = (a >> 16) - (b >> 16) + (low >> 16);
        return high << 16 | low & 0xffff;
      } // Rotate a 32b number left `count` position


      function rol32(a, count) {
        return a << count | a >>> 32 - count;
      } // Rotate a 64b number left `count` position


      function rol64(num, count) {
        var hi = num[0],
            lo = num[1];
        var h = hi << count | lo >>> 32 - count;
        var l = lo << count | hi >>> 32 - count;
        return [h, l];
      }

      function bytesToWords32(bytes, endian) {
        var size = bytes.length + 3 >>> 2;
        var words32 = [];

        for (var i = 0; i < size; i++) {
          words32[i] = wordAt(bytes, i * 4, endian);
        }

        return words32;
      }

      function byteAt(bytes, index) {
        return index >= bytes.length ? 0 : bytes[index];
      }

      function wordAt(bytes, index, endian) {
        var word = 0;

        if (endian === Endian.Big) {
          for (var i = 0; i < 4; i++) {
            word += byteAt(bytes, index + i) << 24 - 8 * i;
          }
        } else {
          for (var _i6 = 0; _i6 < 4; _i6++) {
            word += byteAt(bytes, index + _i6) << 8 * _i6;
          }
        }

        return word;
      }

      function words32ToByteString(words32) {
        return words32.reduce(function (bytes, word) {
          return bytes.concat(word32ToByteString(word));
        }, []);
      }

      function word32ToByteString(word) {
        var bytes = [];

        for (var i = 0; i < 4; i++) {
          bytes.push(word >>> 8 * (3 - i) & 0xff);
        }

        return bytes;
      }

      function bytesToHexString(bytes) {
        var hex = '';

        for (var i = 0; i < bytes.length; i++) {
          var b = byteAt(bytes, i);
          hex += (b >>> 4).toString(16) + (b & 0x0f).toString(16);
        }

        return hex.toLowerCase();
      }
      /**
       * Create a shared exponentiation pool for base-256 computations. This shared pool provides memoized
       * power-of-256 results with memoized power-of-two computations for efficient multiplication.
       *
       * For our purposes, this can be safely stored as a global without memory concerns. The reason is
       * that we encode two words, so only need the 0th (for the low word) and 4th (for the high word)
       * exponent.
       */


      var base256 = new BigIntExponentiation(256);
      /**
       * Represents two 32-bit words as a single decimal number. This requires a big integer storage
       * model as JS numbers are not accurate enough to represent the 64-bit number.
       *
       * Based on https://www.danvk.org/hex2dec.html
       */

      function wordsToDecimalString(hi, lo) {
        // Encode the four bytes in lo in the lower digits of the decimal number.
        // Note: the multiplication results in lo itself but represented by a big integer using its
        // decimal digits.
        var decimal = base256.toThePowerOf(0).multiplyBy(lo); // Encode the four bytes in hi above the four lo bytes. lo is a maximum of (2^8)^4, which is why
        // this multiplication factor is applied.

        base256.toThePowerOf(4).multiplyByAndAddTo(hi, decimal);
        return decimal.toString();
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var Serializer = /*#__PURE__*/function () {
        function Serializer() {
          _classCallCheck(this, Serializer);
        }

        _createClass2(Serializer, [{
          key: "createNameMapper",
          value: // Creates a name mapper, see `PlaceholderMapper`
          // Returning `null` means that no name mapping is used.
          function createNameMapper(message) {
            return null;
          }
        }]);

        return Serializer;
      }();
      /**
       * A simple mapper that take a function to transform an internal name to a public name
       */


      var SimplePlaceholderMapper = /*#__PURE__*/function (_RecurseVisitor) {
        _inherits(SimplePlaceholderMapper, _RecurseVisitor);

        var _super54 = _createSuper(SimplePlaceholderMapper);

        // create a mapping from the message
        function SimplePlaceholderMapper(message, mapName) {
          var _this77;

          _classCallCheck(this, SimplePlaceholderMapper);

          _this77 = _super54.call(this);
          _this77.mapName = mapName;
          _this77.internalToPublic = {};
          _this77.publicToNextId = {};
          _this77.publicToInternal = {};
          message.nodes.forEach(function (node) {
            return node.visit(_assertThisInitialized(_this77));
          });
          return _this77;
        }

        _createClass2(SimplePlaceholderMapper, [{
          key: "toPublicName",
          value: function toPublicName(internalName) {
            return this.internalToPublic.hasOwnProperty(internalName) ? this.internalToPublic[internalName] : null;
          }
        }, {
          key: "toInternalName",
          value: function toInternalName(publicName) {
            return this.publicToInternal.hasOwnProperty(publicName) ? this.publicToInternal[publicName] : null;
          }
        }, {
          key: "visitText",
          value: function visitText(text, context) {
            return null;
          }
        }, {
          key: "visitTagPlaceholder",
          value: function visitTagPlaceholder(ph, context) {
            this.visitPlaceholderName(ph.startName);

            _get(_getPrototypeOf(SimplePlaceholderMapper.prototype), "visitTagPlaceholder", this).call(this, ph, context);

            this.visitPlaceholderName(ph.closeName);
          }
        }, {
          key: "visitPlaceholder",
          value: function visitPlaceholder(ph, context) {
            this.visitPlaceholderName(ph.name);
          }
        }, {
          key: "visitIcuPlaceholder",
          value: function visitIcuPlaceholder(ph, context) {
            this.visitPlaceholderName(ph.name);
          } // XMB placeholders could only contains A-Z, 0-9 and _

        }, {
          key: "visitPlaceholderName",
          value: function visitPlaceholderName(internalName) {
            if (!internalName || this.internalToPublic.hasOwnProperty(internalName)) {
              return;
            }

            var publicName = this.mapName(internalName);

            if (this.publicToInternal.hasOwnProperty(publicName)) {
              // Create a new XMB when it has already been used
              var nextId = this.publicToNextId[publicName];
              this.publicToNextId[publicName] = nextId + 1;
              publicName = "".concat(publicName, "_").concat(nextId);
            } else {
              this.publicToNextId[publicName] = 1;
            }

            this.internalToPublic[internalName] = publicName;
            this.publicToInternal[publicName] = internalName;
          }
        }]);

        return SimplePlaceholderMapper;
      }(RecurseVisitor);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _Visitor = /*#__PURE__*/function () {
        function _Visitor() {
          _classCallCheck(this, _Visitor);
        }

        _createClass2(_Visitor, [{
          key: "visitTag",
          value: function visitTag(tag) {
            var _this78 = this;

            var strAttrs = this._serializeAttributes(tag.attrs);

            if (tag.children.length == 0) {
              return "<".concat(tag.name).concat(strAttrs, "/>");
            }

            var strChildren = tag.children.map(function (node) {
              return node.visit(_this78);
            });
            return "<".concat(tag.name).concat(strAttrs, ">").concat(strChildren.join(''), "</").concat(tag.name, ">");
          }
        }, {
          key: "visitText",
          value: function visitText(text) {
            return text.value;
          }
        }, {
          key: "visitDeclaration",
          value: function visitDeclaration(decl) {
            return "<?xml".concat(this._serializeAttributes(decl.attrs), " ?>");
          }
        }, {
          key: "_serializeAttributes",
          value: function _serializeAttributes(attrs) {
            var strAttrs = Object.keys(attrs).map(function (name) {
              return "".concat(name, "=\"").concat(attrs[name], "\"");
            }).join(' ');
            return strAttrs.length > 0 ? ' ' + strAttrs : '';
          }
        }, {
          key: "visitDoctype",
          value: function visitDoctype(doctype) {
            return "<!DOCTYPE ".concat(doctype.rootTag, " [\n").concat(doctype.dtd, "\n]>");
          }
        }]);

        return _Visitor;
      }();

      var _visitor = new _Visitor();

      function serialize(nodes) {
        return nodes.map(function (node) {
          return node.visit(_visitor);
        }).join('');
      }

      var Declaration = /*#__PURE__*/function () {
        function Declaration(unescapedAttrs) {
          var _this79 = this;

          _classCallCheck(this, Declaration);

          this.attrs = {};
          Object.keys(unescapedAttrs).forEach(function (k) {
            _this79.attrs[k] = escapeXml(unescapedAttrs[k]);
          });
        }

        _createClass2(Declaration, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitDeclaration(this);
          }
        }]);

        return Declaration;
      }();

      var Doctype = /*#__PURE__*/function () {
        function Doctype(rootTag, dtd) {
          _classCallCheck(this, Doctype);

          this.rootTag = rootTag;
          this.dtd = dtd;
        }

        _createClass2(Doctype, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitDoctype(this);
          }
        }]);

        return Doctype;
      }();

      var Tag = /*#__PURE__*/function () {
        function Tag(name) {
          var _this80 = this;

          var unescapedAttrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
          var children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];

          _classCallCheck(this, Tag);

          this.name = name;
          this.children = children;
          this.attrs = {};
          Object.keys(unescapedAttrs).forEach(function (k) {
            _this80.attrs[k] = escapeXml(unescapedAttrs[k]);
          });
        }

        _createClass2(Tag, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitTag(this);
          }
        }]);

        return Tag;
      }();

      var Text$2 = /*#__PURE__*/function () {
        function Text$2(unescapedValue) {
          _classCallCheck(this, Text$2);

          this.value = escapeXml(unescapedValue);
        }

        _createClass2(Text$2, [{
          key: "visit",
          value: function visit(visitor) {
            return visitor.visitText(this);
          }
        }]);

        return Text$2;
      }();

      var CR = /*#__PURE__*/function (_Text$) {
        _inherits(CR, _Text$);

        var _super55 = _createSuper(CR);

        function CR() {
          var ws = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;

          _classCallCheck(this, CR);

          return _super55.call(this, "\n".concat(new Array(ws + 1).join(' ')));
        }

        return CR;
      }(Text$2);

      var _ESCAPED_CHARS = [[/&/g, '&amp;'], [/"/g, '&quot;'], [/'/g, '&apos;'], [/</g, '&lt;'], [/>/g, '&gt;']]; // Escape `_ESCAPED_CHARS` characters in the given text with encoded entities

      function escapeXml(text) {
        return _ESCAPED_CHARS.reduce(function (text, entry) {
          return text.replace(entry[0], entry[1]);
        }, text);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _MESSAGES_TAG = 'messagebundle';
      var _MESSAGE_TAG = 'msg';
      var _PLACEHOLDER_TAG = 'ph';
      var _EXAMPLE_TAG = 'ex';
      var _SOURCE_TAG = 'source';
      var _DOCTYPE = "<!ELEMENT messagebundle (msg)*>\n<!ATTLIST messagebundle class CDATA #IMPLIED>\n\n<!ELEMENT msg (#PCDATA|ph|source)*>\n<!ATTLIST msg id CDATA #IMPLIED>\n<!ATTLIST msg seq CDATA #IMPLIED>\n<!ATTLIST msg name CDATA #IMPLIED>\n<!ATTLIST msg desc CDATA #IMPLIED>\n<!ATTLIST msg meaning CDATA #IMPLIED>\n<!ATTLIST msg obsolete (obsolete) #IMPLIED>\n<!ATTLIST msg xml:space (default|preserve) \"default\">\n<!ATTLIST msg is_hidden CDATA #IMPLIED>\n\n<!ELEMENT source (#PCDATA)>\n\n<!ELEMENT ph (#PCDATA|ex)*>\n<!ATTLIST ph name CDATA #REQUIRED>\n\n<!ELEMENT ex (#PCDATA)>";

      var Xmb = /*#__PURE__*/function (_Serializer) {
        _inherits(Xmb, _Serializer);

        var _super56 = _createSuper(Xmb);

        function Xmb() {
          _classCallCheck(this, Xmb);

          return _super56.apply(this, arguments);
        }

        _createClass2(Xmb, [{
          key: "write",
          value: function write(messages, locale) {
            var exampleVisitor = new ExampleVisitor();
            var visitor = new _Visitor$1();
            var rootNode = new Tag(_MESSAGES_TAG);
            messages.forEach(function (message) {
              var attrs = {
                id: message.id
              };

              if (message.description) {
                attrs['desc'] = message.description;
              }

              if (message.meaning) {
                attrs['meaning'] = message.meaning;
              }

              var sourceTags = [];
              message.sources.forEach(function (source) {
                sourceTags.push(new Tag(_SOURCE_TAG, {}, [new Text$2("".concat(source.filePath, ":").concat(source.startLine).concat(source.endLine !== source.startLine ? ',' + source.endLine : ''))]));
              });
              rootNode.children.push(new CR(2), new Tag(_MESSAGE_TAG, attrs, [].concat(sourceTags, _toConsumableArray(visitor.serialize(message.nodes)))));
            });
            rootNode.children.push(new CR());
            return serialize([new Declaration({
              version: '1.0',
              encoding: 'UTF-8'
            }), new CR(), new Doctype(_MESSAGES_TAG, _DOCTYPE), new CR(), exampleVisitor.addDefaultExamples(rootNode), new CR()]);
          }
        }, {
          key: "load",
          value: function load(content, url) {
            throw new Error('Unsupported');
          }
        }, {
          key: "digest",
          value: function digest(message) {
            return digest$1(message);
          }
        }, {
          key: "createNameMapper",
          value: function createNameMapper(message) {
            return new SimplePlaceholderMapper(message, toPublicName);
          }
        }]);

        return Xmb;
      }(Serializer);

      var _Visitor$1 = /*#__PURE__*/function () {
        function _Visitor$1() {
          _classCallCheck(this, _Visitor$1);
        }

        _createClass2(_Visitor$1, [{
          key: "visitText",
          value: function visitText(text, context) {
            return [new Text$2(text.value)];
          }
        }, {
          key: "visitContainer",
          value: function visitContainer(container, context) {
            var _this81 = this;

            var nodes = [];
            container.children.forEach(function (node) {
              return nodes.push.apply(nodes, _toConsumableArray(node.visit(_this81)));
            });
            return nodes;
          }
        }, {
          key: "visitIcu",
          value: function visitIcu(icu, context) {
            var _this82 = this;

            var nodes = [new Text$2("{".concat(icu.expressionPlaceholder, ", ").concat(icu.type, ", "))];
            Object.keys(icu.cases).forEach(function (c) {
              nodes.push.apply(nodes, [new Text$2("".concat(c, " {"))].concat(_toConsumableArray(icu.cases[c].visit(_this82)), [new Text$2("} ")]));
            });
            nodes.push(new Text$2("}"));
            return nodes;
          }
        }, {
          key: "visitTagPlaceholder",
          value: function visitTagPlaceholder(ph, context) {
            var startTagAsText = new Text$2("<".concat(ph.tag, ">"));
            var startEx = new Tag(_EXAMPLE_TAG, {}, [startTagAsText]); // TC requires PH to have a non empty EX, and uses the text node to show the "original" value.

            var startTagPh = new Tag(_PLACEHOLDER_TAG, {
              name: ph.startName
            }, [startEx, startTagAsText]);

            if (ph.isVoid) {
              // void tags have no children nor closing tags
              return [startTagPh];
            }

            var closeTagAsText = new Text$2("</".concat(ph.tag, ">"));
            var closeEx = new Tag(_EXAMPLE_TAG, {}, [closeTagAsText]); // TC requires PH to have a non empty EX, and uses the text node to show the "original" value.

            var closeTagPh = new Tag(_PLACEHOLDER_TAG, {
              name: ph.closeName
            }, [closeEx, closeTagAsText]);
            return [startTagPh].concat(_toConsumableArray(this.serialize(ph.children)), [closeTagPh]);
          }
        }, {
          key: "visitPlaceholder",
          value: function visitPlaceholder(ph, context) {
            var interpolationAsText = new Text$2("{{".concat(ph.value, "}}")); // Example tag needs to be not-empty for TC.

            var exTag = new Tag(_EXAMPLE_TAG, {}, [interpolationAsText]);
            return [// TC requires PH to have a non empty EX, and uses the text node to show the "original" value.
            new Tag(_PLACEHOLDER_TAG, {
              name: ph.name
            }, [exTag, interpolationAsText])];
          }
        }, {
          key: "visitIcuPlaceholder",
          value: function visitIcuPlaceholder(ph, context) {
            var icuExpression = ph.value.expression;
            var icuType = ph.value.type;
            var icuCases = Object.keys(ph.value.cases).map(function (value) {
              return value + ' {...}';
            }).join(' ');
            var icuAsText = new Text$2("{".concat(icuExpression, ", ").concat(icuType, ", ").concat(icuCases, "}"));
            var exTag = new Tag(_EXAMPLE_TAG, {}, [icuAsText]);
            return [// TC requires PH to have a non empty EX, and uses the text node to show the "original" value.
            new Tag(_PLACEHOLDER_TAG, {
              name: ph.name
            }, [exTag, icuAsText])];
          }
        }, {
          key: "serialize",
          value: function serialize(nodes) {
            var _ref10,
                _this83 = this;

            return (_ref10 = []).concat.apply(_ref10, _toConsumableArray(nodes.map(function (node) {
              return node.visit(_this83);
            })));
          }
        }]);

        return _Visitor$1;
      }();

      function digest$1(message) {
        return decimalDigest(message);
      } // TC requires at least one non-empty example on placeholders


      var ExampleVisitor = /*#__PURE__*/function () {
        function ExampleVisitor() {
          _classCallCheck(this, ExampleVisitor);
        }

        _createClass2(ExampleVisitor, [{
          key: "addDefaultExamples",
          value: function addDefaultExamples(node) {
            node.visit(this);
            return node;
          }
        }, {
          key: "visitTag",
          value: function visitTag(tag) {
            var _this84 = this;

            if (tag.name === _PLACEHOLDER_TAG) {
              if (!tag.children || tag.children.length == 0) {
                var exText = new Text$2(tag.attrs['name'] || '...');
                tag.children = [new Tag(_EXAMPLE_TAG, {}, [exText])];
              }
            } else if (tag.children) {
              tag.children.forEach(function (node) {
                return node.visit(_this84);
              });
            }
          }
        }, {
          key: "visitText",
          value: function visitText(text) {}
        }, {
          key: "visitDeclaration",
          value: function visitDeclaration(decl) {}
        }, {
          key: "visitDoctype",
          value: function visitDoctype(doctype) {}
        }]);

        return ExampleVisitor;
      }(); // XMB/XTB placeholders can only contain A-Z, 0-9 and _


      function toPublicName(internalName) {
        return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, '_');
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /* Closure variables holding messages must be named `MSG_[A-Z0-9]+` */


      var CLOSURE_TRANSLATION_VAR_PREFIX = 'MSG_';
      /**
       * Prefix for non-`goog.getMsg` i18n-related vars.
       * Note: the prefix uses lowercase characters intentionally due to a Closure behavior that
       * considers variables like `I18N_0` as constants and throws an error when their value changes.
       */

      var TRANSLATION_VAR_PREFIX = 'i18n_';
      /** Name of the i18n attributes **/

      var I18N_ATTR = 'i18n';
      var I18N_ATTR_PREFIX = 'i18n-';
      /** Prefix of var expressions used in ICUs */

      var I18N_ICU_VAR_PREFIX = 'VAR_';
      /** Prefix of ICU expressions for post processing */

      var I18N_ICU_MAPPING_PREFIX = 'I18N_EXP_';
      /** Placeholder wrapper for i18n expressions **/

      var I18N_PLACEHOLDER_SYMBOL = '�';

      function isI18nAttribute(name) {
        return name === I18N_ATTR || name.startsWith(I18N_ATTR_PREFIX);
      }

      function isI18nRootNode(meta) {
        return meta instanceof Message;
      }

      function isSingleI18nIcu(meta) {
        return isI18nRootNode(meta) && meta.nodes.length === 1 && meta.nodes[0] instanceof Icu$1;
      }

      function hasI18nMeta(node) {
        return !!node.i18n;
      }

      function hasI18nAttrs(element) {
        return element.attrs.some(function (attr) {
          return isI18nAttribute(attr.name);
        });
      }

      function icuFromI18nMessage(message) {
        return message.nodes[0];
      }

      function wrapI18nPlaceholder(content) {
        var contextId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
        var blockId = contextId > 0 ? ":".concat(contextId) : '';
        return "".concat(I18N_PLACEHOLDER_SYMBOL).concat(content).concat(blockId).concat(I18N_PLACEHOLDER_SYMBOL);
      }

      function assembleI18nBoundString(strings) {
        var bindingStartIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
        var contextId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
        if (!strings.length) return '';
        var acc = '';
        var lastIdx = strings.length - 1;

        for (var i = 0; i < lastIdx; i++) {
          acc += "".concat(strings[i]).concat(wrapI18nPlaceholder(bindingStartIndex + i, contextId));
        }

        acc += strings[lastIdx];
        return acc;
      }

      function getSeqNumberGenerator() {
        var startsAt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
        var current = startsAt;
        return function () {
          return current++;
        };
      }

      function placeholdersToParams(placeholders) {
        var params = {};
        placeholders.forEach(function (values, key) {
          params[key] = literal(values.length > 1 ? "[".concat(values.join('|'), "]") : values[0]);
        });
        return params;
      }

      function updatePlaceholderMap(map, name) {
        var current = map.get(name) || [];

        for (var _len4 = arguments.length, values = new Array(_len4 > 2 ? _len4 - 2 : 0), _key5 = 2; _key5 < _len4; _key5++) {
          values[_key5 - 2] = arguments[_key5];
        }

        current.push.apply(current, values);
        map.set(name, current);
      }

      function assembleBoundTextPlaceholders(meta) {
        var bindingStartIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
        var contextId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
        var startIdx = bindingStartIndex;
        var placeholders = new Map();
        var node = meta instanceof Message ? meta.nodes.find(function (node) {
          return node instanceof Container;
        }) : meta;

        if (node) {
          node.children.filter(function (child) {
            return child instanceof Placeholder;
          }).forEach(function (child, idx) {
            var content = wrapI18nPlaceholder(startIdx + idx, contextId);
            updatePlaceholderMap(placeholders, child.name, content);
          });
        }

        return placeholders;
      }
      /**
       * Format the placeholder names in a map of placeholders to expressions.
       *
       * The placeholder names are converted from "internal" format (e.g. `START_TAG_DIV_1`) to "external"
       * format (e.g. `startTagDiv_1`).
       *
       * @param params A map of placeholder names to expressions.
       * @param useCamelCase whether to camelCase the placeholder name when formatting.
       * @returns A new map of formatted placeholder names to expressions.
       */


      function i18nFormatPlaceholderNames() {
        var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
        var useCamelCase = arguments.length > 1 ? arguments[1] : undefined;
        var _params = {};

        if (params && Object.keys(params).length) {
          Object.keys(params).forEach(function (key) {
            return _params[formatI18nPlaceholderName(key, useCamelCase)] = params[key];
          });
        }

        return _params;
      }
      /**
       * Converts internal placeholder names to public-facing format
       * (for example to use in goog.getMsg call).
       * Example: `START_TAG_DIV_1` is converted to `startTagDiv_1`.
       *
       * @param name The placeholder name that should be formatted
       * @returns Formatted placeholder name
       */


      function formatI18nPlaceholderName(name) {
        var useCamelCase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
        var publicName = toPublicName(name);

        if (!useCamelCase) {
          return publicName;
        }

        var chunks = publicName.split('_');

        if (chunks.length === 1) {
          // if no "_" found - just lowercase the value
          return name.toLowerCase();
        }

        var postfix; // eject last element if it's a number

        if (/^\d+$/.test(chunks[chunks.length - 1])) {
          postfix = chunks.pop();
        }

        var raw = chunks.shift().toLowerCase();

        if (chunks.length) {
          raw += chunks.map(function (c) {
            return c.charAt(0).toUpperCase() + c.slice(1).toLowerCase();
          }).join('');
        }

        return postfix ? "".concat(raw, "_").concat(postfix) : raw;
      }
      /**
       * Generates a prefix for translation const name.
       *
       * @param extra Additional local prefix that should be injected into translation var name
       * @returns Complete translation const prefix
       */


      function getTranslationConstPrefix(extra) {
        return "".concat(CLOSURE_TRANSLATION_VAR_PREFIX).concat(extra).toUpperCase();
      }
      /**
       * Generate AST to declare a variable. E.g. `var I18N_1;`.
       * @param variable the name of the variable to declare.
       */


      function declareI18nVariable(variable) {
        return new DeclareVarStmt(variable.name, undefined, INFERRED_TYPE, undefined, variable.sourceSpan);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Checks whether an object key contains potentially unsafe chars, thus the key should be wrapped in
       * quotes. Note: we do not wrap all keys into quotes, as it may have impact on minification and may
       * bot work in some cases when object keys are mangled by minifier.
       *
       * TODO(FW-1136): this is a temporary solution, we need to come up with a better way of working with
       * inputs that contain potentially unsafe chars.
       */


      var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
      /** Name of the temporary to use during data binding */

      var TEMPORARY_NAME = '_t';
      /** Name of the context parameter passed into a template function */

      var CONTEXT_NAME = 'ctx';
      /** Name of the RenderFlag passed into a template function */

      var RENDER_FLAGS = 'rf';
      /** The prefix reference variables */

      var REFERENCE_PREFIX = '_r';
      /** The name of the implicit context reference */

      var IMPLICIT_REFERENCE = '$implicit';
      /** Non bindable attribute name **/

      var NON_BINDABLE_ATTR = 'ngNonBindable';
      /**
       * Creates an allocator for a temporary variable.
       *
       * A variable declaration is added to the statements the first time the allocator is invoked.
       */

      function temporaryAllocator(statements, name) {
        var temp = null;
        return function () {
          if (!temp) {
            statements.push(new DeclareVarStmt(TEMPORARY_NAME, undefined, DYNAMIC_TYPE));
            temp = variable(name);
          }

          return temp;
        };
      }

      function unsupported(feature) {
        if (this) {
          throw new Error("Builder ".concat(this.constructor.name, " doesn't support ").concat(feature, " yet"));
        }

        throw new Error("Feature ".concat(feature, " is not supported yet"));
      }

      function invalid$1(arg) {
        throw new Error("Invalid state: Visitor ".concat(this.constructor.name, " doesn't handle ").concat(arg.constructor.name));
      }

      function asLiteral(value) {
        if (Array.isArray(value)) {
          return literalArr(value.map(asLiteral));
        }

        return literal(value, INFERRED_TYPE);
      }

      function conditionallyCreateMapObjectLiteral(keys, keepDeclared) {
        if (Object.getOwnPropertyNames(keys).length > 0) {
          return mapToExpression(keys, keepDeclared);
        }

        return null;
      }

      function mapToExpression(map, keepDeclared) {
        return literalMap(Object.getOwnPropertyNames(map).map(function (key) {
          // canonical syntax: `dirProp: publicProp`
          // if there is no `:`, use dirProp = elProp
          var value = map[key];
          var declaredName;
          var publicName;
          var minifiedName;

          if (Array.isArray(value)) {
            var _value2 = _slicedToArray(value, 2);

            publicName = _value2[0];
            declaredName = _value2[1];
          } else {
            var _splitAtColon = splitAtColon(key, [key, value]);

            var _splitAtColon2 = _slicedToArray(_splitAtColon, 2);

            declaredName = _splitAtColon2[0];
            publicName = _splitAtColon2[1];
          }

          minifiedName = declaredName;
          return {
            key: minifiedName,
            // put quotes around keys that contain potentially unsafe characters
            quoted: UNSAFE_OBJECT_KEY_NAME_REGEXP.test(minifiedName),
            value: keepDeclared && publicName !== declaredName ? literalArr([asLiteral(publicName), asLiteral(declaredName)]) : asLiteral(publicName)
          };
        }));
      }
      /**
       *  Remove trailing null nodes as they are implied.
       */


      function trimTrailingNulls(parameters) {
        while (isNull(parameters[parameters.length - 1])) {
          parameters.pop();
        }

        return parameters;
      }

      function getQueryPredicate(query, constantPool) {
        if (Array.isArray(query.predicate)) {
          var predicate = [];
          query.predicate.forEach(function (selector) {
            // Each item in predicates array may contain strings with comma-separated refs
            // (for ex. 'ref, ref1, ..., refN'), thus we extract individual refs and store them
            // as separate array entities
            var selectors = selector.split(',').map(function (token) {
              return literal(token.trim());
            });
            predicate.push.apply(predicate, _toConsumableArray(selectors));
          });
          return constantPool.getConstLiteral(literalArr(predicate), true);
        } else {
          return query.predicate;
        }
      }

      var DefinitionMap = /*#__PURE__*/function () {
        function DefinitionMap() {
          _classCallCheck(this, DefinitionMap);

          this.values = [];
        }

        _createClass2(DefinitionMap, [{
          key: "set",
          value: function set(key, value) {
            if (value) {
              this.values.push({
                key: key,
                value: value,
                quoted: false
              });
            }
          }
        }, {
          key: "toLiteralMap",
          value: function toLiteralMap() {
            return literalMap(this.values);
          }
        }]);

        return DefinitionMap;
      }();
      /**
       * Extract a map of properties to values for a given element or template node, which can be used
       * by the directive matching machinery.
       *
       * @param elOrTpl the element or template in question
       * @return an object set up for directive matching. For attributes on the element/template, this
       * object maps a property name to its (static) value. For any bindings, this map simply maps the
       * property name to an empty string.
       */


      function getAttrsForDirectiveMatching(elOrTpl) {
        var attributesMap = {};

        if (elOrTpl instanceof Template && elOrTpl.tagName !== 'ng-template') {
          elOrTpl.templateAttrs.forEach(function (a) {
            return attributesMap[a.name] = '';
          });
        } else {
          elOrTpl.attributes.forEach(function (a) {
            if (!isI18nAttribute(a.name)) {
              attributesMap[a.name] = a.value;
            }
          });
          elOrTpl.inputs.forEach(function (i) {
            attributesMap[i.name] = '';
          });
          elOrTpl.outputs.forEach(function (o) {
            attributesMap[o.name] = '';
          });
        }

        return attributesMap;
      }
      /** Returns a call expression to a chained instruction, e.g. `property(params[0])(params[1])`. */


      function chainedInstruction(reference, calls, span) {
        var expression = importExpr(reference, null, span);

        if (calls.length > 0) {
          for (var i = 0; i < calls.length; i++) {
            expression = expression.callFn(calls[i], span);
          }
        } else {
          // Add a blank invocation, in case the `calls` array is empty.
          expression = expression.callFn([], span);
        }

        return expression;
      }
      /**
       * Gets the number of arguments expected to be passed to a generated instruction in the case of
       * interpolation instructions.
       * @param interpolation An interpolation ast
       */


      function getInterpolationArgsLength(interpolation) {
        var expressions = interpolation.expressions,
            strings = interpolation.strings;

        if (expressions.length === 1 && strings.length === 2 && strings[0] === '' && strings[1] === '') {
          // If the interpolation has one interpolated value, but the prefix and suffix are both empty
          // strings, we only pass one argument, to a special instruction like `propertyInterpolate` or
          // `textInterpolate`.
          return 1;
        } else {
          return expressions.length + strings.length;
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var R3FactoryDelegateType;

      (function (R3FactoryDelegateType) {
        R3FactoryDelegateType[R3FactoryDelegateType["Class"] = 0] = "Class";
        R3FactoryDelegateType[R3FactoryDelegateType["Function"] = 1] = "Function";
        R3FactoryDelegateType[R3FactoryDelegateType["Factory"] = 2] = "Factory";
      })(R3FactoryDelegateType || (R3FactoryDelegateType = {}));

      var R3FactoryTarget;

      (function (R3FactoryTarget) {
        R3FactoryTarget[R3FactoryTarget["Directive"] = 0] = "Directive";
        R3FactoryTarget[R3FactoryTarget["Component"] = 1] = "Component";
        R3FactoryTarget[R3FactoryTarget["Injectable"] = 2] = "Injectable";
        R3FactoryTarget[R3FactoryTarget["Pipe"] = 3] = "Pipe";
        R3FactoryTarget[R3FactoryTarget["NgModule"] = 4] = "NgModule";
      })(R3FactoryTarget || (R3FactoryTarget = {}));
      /**
       * Resolved type of a dependency.
       *
       * Occasionally, dependencies will have special significance which is known statically. In that
       * case the `R3ResolvedDependencyType` informs the factory generator that a particular dependency
       * should be generated specially (usually by calling a special injection function instead of the
       * standard one).
       */


      var R3ResolvedDependencyType;

      (function (R3ResolvedDependencyType) {
        /**
         * A normal token dependency.
         */
        R3ResolvedDependencyType[R3ResolvedDependencyType["Token"] = 0] = "Token";
        /**
         * The dependency is for an attribute.
         *
         * The token expression is a string representing the attribute name.
         */

        R3ResolvedDependencyType[R3ResolvedDependencyType["Attribute"] = 1] = "Attribute";
        /**
         * Injecting the `ChangeDetectorRef` token. Needs special handling when injected into a pipe.
         */

        R3ResolvedDependencyType[R3ResolvedDependencyType["ChangeDetectorRef"] = 2] = "ChangeDetectorRef";
        /**
         * An invalid dependency (no token could be determined). An error should be thrown at runtime.
         */

        R3ResolvedDependencyType[R3ResolvedDependencyType["Invalid"] = 3] = "Invalid";
      })(R3ResolvedDependencyType || (R3ResolvedDependencyType = {}));
      /**
       * Construct a factory function expression for the given `R3FactoryMetadata`.
       */


      function compileFactoryFunction(meta) {
        var t = variable('t');
        var statements = [];
        var ctorDepsType = NONE_TYPE; // The type to instantiate via constructor invocation. If there is no delegated factory, meaning
        // this type is always created by constructor invocation, then this is the type-to-create
        // parameter provided by the user (t) if specified, or the current type if not. If there is a
        // delegated factory (which is used to create the current type) then this is only the type-to-
        // create parameter (t).

        var typeForCtor = !isDelegatedMetadata(meta) ? new BinaryOperatorExpr(BinaryOperator.Or, t, meta.internalType) : t;
        var ctorExpr = null;

        if (meta.deps !== null) {
          // There is a constructor (either explicitly or implicitly defined).
          if (meta.deps !== 'invalid') {
            ctorExpr = new InstantiateExpr(typeForCtor, injectDependencies(meta.deps, meta.injectFn, meta.target === R3FactoryTarget.Pipe));
            ctorDepsType = createCtorDepsType(meta.deps);
          }
        } else {
          var baseFactory = variable("\u0275".concat(meta.name, "_BaseFactory"));
          var getInheritedFactory = importExpr(Identifiers$1.getInheritedFactory);
          var baseFactoryStmt = baseFactory.set(getInheritedFactory.callFn([meta.internalType],
          /* sourceSpan */
          undefined,
          /* pure */
          true)).toDeclStmt(INFERRED_TYPE, [StmtModifier.Exported, StmtModifier.Final]);
          statements.push(baseFactoryStmt); // There is no constructor, use the base class' factory to construct typeForCtor.

          ctorExpr = baseFactory.callFn([typeForCtor]);
        }

        var ctorExprFinal = ctorExpr;
        var body = [];
        var retExpr = null;

        function makeConditionalFactory(nonCtorExpr) {
          var r = variable('r');
          body.push(r.set(NULL_EXPR).toDeclStmt());
          var ctorStmt = null;

          if (ctorExprFinal !== null) {
            ctorStmt = r.set(ctorExprFinal).toStmt();
          } else {
            ctorStmt = importExpr(Identifiers$1.invalidFactory).callFn([]).toStmt();
          }

          body.push(ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()]));
          return r;
        }

        if (isDelegatedMetadata(meta) && meta.delegateType === R3FactoryDelegateType.Factory) {
          var delegateFactory = variable("\u0275".concat(meta.name, "_BaseFactory"));
          var getFactoryOf = importExpr(Identifiers$1.getFactoryOf);

          if (meta.delegate.isEquivalent(meta.internalType)) {
            throw new Error("Illegal state: compiling factory that delegates to itself");
          }

          var delegateFactoryStmt = delegateFactory.set(getFactoryOf.callFn([meta.delegate])).toDeclStmt(INFERRED_TYPE, [StmtModifier.Exported, StmtModifier.Final]);
          statements.push(delegateFactoryStmt);
          retExpr = makeConditionalFactory(delegateFactory.callFn([]));
        } else if (isDelegatedMetadata(meta)) {
          // This type is created with a delegated factory. If a type parameter is not specified, call
          // the factory instead.
          var delegateArgs = injectDependencies(meta.delegateDeps, meta.injectFn, meta.target === R3FactoryTarget.Pipe); // Either call `new delegate(...)` or `delegate(...)` depending on meta.delegateType.

          var factoryExpr = new (meta.delegateType === R3FactoryDelegateType.Class ? InstantiateExpr : InvokeFunctionExpr)(meta.delegate, delegateArgs);
          retExpr = makeConditionalFactory(factoryExpr);
        } else if (isExpressionFactoryMetadata(meta)) {
          // TODO(alxhub): decide whether to lower the value here or in the caller
          retExpr = makeConditionalFactory(meta.expression);
        } else {
          retExpr = ctorExpr;
        }

        if (retExpr !== null) {
          body.push(new ReturnStatement(retExpr));
        } else {
          body.push(importExpr(Identifiers$1.invalidFactory).callFn([]).toStmt());
        }

        return {
          factory: fn([new FnParam('t', DYNAMIC_TYPE)], body, INFERRED_TYPE, undefined, "".concat(meta.name, "_Factory")),
          statements: statements,
          type: expressionType(importExpr(Identifiers$1.FactoryDef, [typeWithParameters(meta.type.type, meta.typeArgumentCount), ctorDepsType]))
        };
      }

      function injectDependencies(deps, injectFn, isPipe) {
        return deps.map(function (dep, index) {
          return compileInjectDependency(dep, injectFn, isPipe, index);
        });
      }

      function compileInjectDependency(dep, injectFn, isPipe, index) {
        // Interpret the dependency according to its resolved type.
        switch (dep.resolved) {
          case R3ResolvedDependencyType.Token:
          case R3ResolvedDependencyType.ChangeDetectorRef:
            // Build up the injection flags according to the metadata.
            var flags = 0
            /* Default */
            | (dep.self ? 2
            /* Self */
            : 0) | (dep.skipSelf ? 4
            /* SkipSelf */
            : 0) | (dep.host ? 1
            /* Host */
            : 0) | (dep.optional ? 8
            /* Optional */
            : 0); // If this dependency is optional or otherwise has non-default flags, then additional
            // parameters describing how to inject the dependency must be passed to the inject function
            // that's being used.

            var flagsParam = flags !== 0
            /* Default */
            || dep.optional ? literal(flags) : null; // We have a separate instruction for injecting ChangeDetectorRef into a pipe.

            if (isPipe && dep.resolved === R3ResolvedDependencyType.ChangeDetectorRef) {
              return importExpr(Identifiers$1.injectPipeChangeDetectorRef).callFn(flagsParam ? [flagsParam] : []);
            } // Build up the arguments to the injectFn call.


            var injectArgs = [dep.token];

            if (flagsParam) {
              injectArgs.push(flagsParam);
            }

            return importExpr(injectFn).callFn(injectArgs);

          case R3ResolvedDependencyType.Attribute:
            // In the case of attributes, the attribute name in question is given as the token.
            return importExpr(Identifiers$1.injectAttribute).callFn([dep.token]);

          case R3ResolvedDependencyType.Invalid:
            return importExpr(Identifiers$1.invalidFactoryDep).callFn([literal(index)]);

          default:
            return unsupported("Unknown R3ResolvedDependencyType: ".concat(R3ResolvedDependencyType[dep.resolved]));
        }
      }

      function createCtorDepsType(deps) {
        var hasTypes = false;
        var attributeTypes = deps.map(function (dep) {
          var type = createCtorDepType(dep);

          if (type !== null) {
            hasTypes = true;
            return type;
          } else {
            return literal(null);
          }
        });

        if (hasTypes) {
          return expressionType(literalArr(attributeTypes));
        } else {
          return NONE_TYPE;
        }
      }

      function createCtorDepType(dep) {
        var entries = [];

        if (dep.resolved === R3ResolvedDependencyType.Attribute) {
          if (dep.attribute !== null) {
            entries.push({
              key: 'attribute',
              value: dep.attribute,
              quoted: false
            });
          }
        }

        if (dep.optional) {
          entries.push({
            key: 'optional',
            value: literal(true),
            quoted: false
          });
        }

        if (dep.host) {
          entries.push({
            key: 'host',
            value: literal(true),
            quoted: false
          });
        }

        if (dep.self) {
          entries.push({
            key: 'self',
            value: literal(true),
            quoted: false
          });
        }

        if (dep.skipSelf) {
          entries.push({
            key: 'skipSelf',
            value: literal(true),
            quoted: false
          });
        }

        return entries.length > 0 ? literalMap(entries) : null;
      }
      /**
       * A helper function useful for extracting `R3DependencyMetadata` from a Render2
       * `CompileTypeMetadata` instance.
       */


      function dependenciesFromGlobalMetadata(type, outputCtx, reflector) {
        // Use the `CompileReflector` to look up references to some well-known Angular types. These will
        // be compared with the token to statically determine whether the token has significance to
        // Angular, and set the correct `R3ResolvedDependencyType` as a result.
        var injectorRef = reflector.resolveExternalReference(Identifiers.Injector); // Iterate through the type's DI dependencies and produce `R3DependencyMetadata` for each of them.

        var deps = [];

        var _iterator6 = _createForOfIteratorHelper(type.diDeps),
            _step6;

        try {
          for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
            var dependency = _step6.value;

            if (dependency.token) {
              var tokenRef = tokenReference(dependency.token);
              var resolved = dependency.isAttribute ? R3ResolvedDependencyType.Attribute : R3ResolvedDependencyType.Token; // In the case of most dependencies, the token will be a reference to a type. Sometimes,
              // however, it can be a string, in the case of older Angular code or @Attribute injection.

              var token = tokenRef instanceof StaticSymbol ? outputCtx.importExpr(tokenRef) : literal(tokenRef); // Construct the dependency.

              deps.push({
                token: token,
                attribute: null,
                resolved: resolved,
                host: !!dependency.isHost,
                optional: !!dependency.isOptional,
                self: !!dependency.isSelf,
                skipSelf: !!dependency.isSkipSelf
              });
            } else {
              unsupported('dependency without a token');
            }
          }
        } catch (err) {
          _iterator6.e(err);
        } finally {
          _iterator6.f();
        }

        return deps;
      }

      function isDelegatedMetadata(meta) {
        return meta.delegateType !== undefined;
      }

      function isExpressionFactoryMetadata(meta) {
        return meta.expression !== undefined;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function _compileInjectable(meta) {
        var result = null;
        var factoryMeta = {
          name: meta.name,
          type: meta.type,
          internalType: meta.internalType,
          typeArgumentCount: meta.typeArgumentCount,
          deps: [],
          injectFn: Identifiers.inject,
          target: R3FactoryTarget.Injectable
        };

        if (meta.useClass !== undefined) {
          // meta.useClass has two modes of operation. Either deps are specified, in which case `new` is
          // used to instantiate the class with dependencies injected, or deps are not specified and
          // the factory of the class is used to instantiate it.
          //
          // A special case exists for useClass: Type where Type is the injectable type itself and no
          // deps are specified, in which case 'useClass' is effectively ignored.
          var useClassOnSelf = meta.useClass.isEquivalent(meta.internalType);
          var deps = undefined;

          if (meta.userDeps !== undefined) {
            deps = meta.userDeps;
          }

          if (deps !== undefined) {
            // factory: () => new meta.useClass(...deps)
            result = compileFactoryFunction(Object.assign(Object.assign({}, factoryMeta), {
              delegate: meta.useClass,
              delegateDeps: deps,
              delegateType: R3FactoryDelegateType.Class
            }));
          } else if (useClassOnSelf) {
            result = compileFactoryFunction(factoryMeta);
          } else {
            result = delegateToFactory(meta.type.value, meta.useClass);
          }
        } else if (meta.useFactory !== undefined) {
          if (meta.userDeps !== undefined) {
            result = compileFactoryFunction(Object.assign(Object.assign({}, factoryMeta), {
              delegate: meta.useFactory,
              delegateDeps: meta.userDeps || [],
              delegateType: R3FactoryDelegateType.Function
            }));
          } else {
            result = {
              statements: [],
              factory: fn([], [new ReturnStatement(meta.useFactory.callFn([]))])
            };
          }
        } else if (meta.useValue !== undefined) {
          // Note: it's safe to use `meta.useValue` instead of the `USE_VALUE in meta` check used for
          // client code because meta.useValue is an Expression which will be defined even if the actual
          // value is undefined.
          result = compileFactoryFunction(Object.assign(Object.assign({}, factoryMeta), {
            expression: meta.useValue
          }));
        } else if (meta.useExisting !== undefined) {
          // useExisting is an `inject` call on the existing token.
          result = compileFactoryFunction(Object.assign(Object.assign({}, factoryMeta), {
            expression: importExpr(Identifiers.inject).callFn([meta.useExisting])
          }));
        } else {
          result = delegateToFactory(meta.type.value, meta.internalType);
        }

        var token = meta.internalType;
        var injectableProps = {
          token: token,
          factory: result.factory
        }; // Only generate providedIn property if it has a non-null value

        if (meta.providedIn.value !== null) {
          injectableProps.providedIn = meta.providedIn;
        }

        var expression = importExpr(Identifiers.ɵɵdefineInjectable).callFn([mapToMapExpression(injectableProps)]);
        var type = new ExpressionType(importExpr(Identifiers.InjectableDef, [typeWithParameters(meta.type.type, meta.typeArgumentCount)]));
        return {
          expression: expression,
          type: type,
          statements: result.statements
        };
      }

      function delegateToFactory(type, internalType) {
        return {
          statements: [],
          // If types are the same, we can generate `factory: type.ɵfac`
          // If types are different, we have to generate a wrapper function to ensure
          // the internal type has been resolved (`factory: function(t) { return type.ɵfac(t); }`)
          factory: type.node === internalType.node ? internalType.prop('ɵfac') : fn([new FnParam('t', DYNAMIC_TYPE)], [new ReturnStatement(internalType.callMethod('ɵfac', [variable('t')]))])
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function assertArrayOfStrings(identifier, value) {
        if (value == null) {
          return;
        }

        if (!Array.isArray(value)) {
          throw new Error("Expected '".concat(identifier, "' to be an array of strings."));
        }

        for (var i = 0; i < value.length; i += 1) {
          if (typeof value[i] !== 'string') {
            throw new Error("Expected '".concat(identifier, "' to be an array of strings."));
          }
        }
      }

      var UNUSABLE_INTERPOLATION_REGEXPS = [/^\s*$/, /[<>]/, /^[{}]$/, /&(#|[a-z])/i, /^\/\//];

      function assertInterpolationSymbols(identifier, value) {
        if (value != null && !(Array.isArray(value) && value.length == 2)) {
          throw new Error("Expected '".concat(identifier, "' to be an array, [start, end]."));
        } else if (value != null) {
          var start = value[0];
          var end = value[1]; // Check for unusable interpolation symbols

          UNUSABLE_INTERPOLATION_REGEXPS.forEach(function (regexp) {
            if (regexp.test(start) || regexp.test(end)) {
              throw new Error("['".concat(start, "', '").concat(end, "'] contains unusable interpolation symbol."));
            }
          });
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var InterpolationConfig = /*#__PURE__*/function () {
        function InterpolationConfig(start, end) {
          _classCallCheck(this, InterpolationConfig);

          this.start = start;
          this.end = end;
        }

        _createClass2(InterpolationConfig, null, [{
          key: "fromArray",
          value: function fromArray(markers) {
            if (!markers) {
              return DEFAULT_INTERPOLATION_CONFIG;
            }

            assertInterpolationSymbols('interpolation', markers);
            return new InterpolationConfig(markers[0], markers[1]);
          }
        }]);

        return InterpolationConfig;
      }();

      var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}');
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit

      var VERSION = 3;
      var JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,';

      var SourceMapGenerator = /*#__PURE__*/function () {
        function SourceMapGenerator() {
          var file = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;

          _classCallCheck(this, SourceMapGenerator);

          this.file = file;
          this.sourcesContent = new Map();
          this.lines = [];
          this.lastCol0 = 0;
          this.hasMappings = false;
        } // The content is `null` when the content is expected to be loaded using the URL


        _createClass2(SourceMapGenerator, [{
          key: "addSource",
          value: function addSource(url) {
            var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

            if (!this.sourcesContent.has(url)) {
              this.sourcesContent.set(url, content);
            }

            return this;
          }
        }, {
          key: "addLine",
          value: function addLine() {
            this.lines.push([]);
            this.lastCol0 = 0;
            return this;
          }
        }, {
          key: "addMapping",
          value: function addMapping(col0, sourceUrl, sourceLine0, sourceCol0) {
            if (!this.currentLine) {
              throw new Error("A line must be added before mappings can be added");
            }

            if (sourceUrl != null && !this.sourcesContent.has(sourceUrl)) {
              throw new Error("Unknown source file \"".concat(sourceUrl, "\""));
            }

            if (col0 == null) {
              throw new Error("The column in the generated code must be provided");
            }

            if (col0 < this.lastCol0) {
              throw new Error("Mapping should be added in output order");
            }

            if (sourceUrl && (sourceLine0 == null || sourceCol0 == null)) {
              throw new Error("The source location must be provided when a source url is provided");
            }

            this.hasMappings = true;
            this.lastCol0 = col0;
            this.currentLine.push({
              col0: col0,
              sourceUrl: sourceUrl,
              sourceLine0: sourceLine0,
              sourceCol0: sourceCol0
            });
            return this;
          }
          /**
           * @internal strip this from published d.ts files due to
           * https://github.com/microsoft/TypeScript/issues/36216
           */

        }, {
          key: "currentLine",
          get: function get() {
            return this.lines.slice(-1)[0];
          }
        }, {
          key: "toJSON",
          value: function toJSON() {
            var _this85 = this;

            if (!this.hasMappings) {
              return null;
            }

            var sourcesIndex = new Map();
            var sources = [];
            var sourcesContent = [];
            Array.from(this.sourcesContent.keys()).forEach(function (url, i) {
              sourcesIndex.set(url, i);
              sources.push(url);
              sourcesContent.push(_this85.sourcesContent.get(url) || null);
            });
            var mappings = '';
            var lastCol0 = 0;
            var lastSourceIndex = 0;
            var lastSourceLine0 = 0;
            var lastSourceCol0 = 0;
            this.lines.forEach(function (segments) {
              lastCol0 = 0;
              mappings += segments.map(function (segment) {
                // zero-based starting column of the line in the generated code
                var segAsStr = toBase64VLQ(segment.col0 - lastCol0);
                lastCol0 = segment.col0;

                if (segment.sourceUrl != null) {
                  // zero-based index into the “sources” list
                  segAsStr += toBase64VLQ(sourcesIndex.get(segment.sourceUrl) - lastSourceIndex);
                  lastSourceIndex = sourcesIndex.get(segment.sourceUrl); // the zero-based starting line in the original source

                  segAsStr += toBase64VLQ(segment.sourceLine0 - lastSourceLine0);
                  lastSourceLine0 = segment.sourceLine0; // the zero-based starting column in the original source

                  segAsStr += toBase64VLQ(segment.sourceCol0 - lastSourceCol0);
                  lastSourceCol0 = segment.sourceCol0;
                }

                return segAsStr;
              }).join(',');
              mappings += ';';
            });
            mappings = mappings.slice(0, -1);
            return {
              'file': this.file || '',
              'version': VERSION,
              'sourceRoot': '',
              'sources': sources,
              'sourcesContent': sourcesContent,
              'mappings': mappings
            };
          }
        }, {
          key: "toJsComment",
          value: function toJsComment() {
            return this.hasMappings ? '//' + JS_B64_PREFIX + toBase64String(JSON.stringify(this, null, 0)) : '';
          }
        }]);

        return SourceMapGenerator;
      }();

      function toBase64String(value) {
        var b64 = '';
        var encoded = utf8Encode(value);

        for (var i = 0; i < encoded.length;) {
          var i1 = encoded[i++];
          var i2 = i < encoded.length ? encoded[i++] : null;
          var i3 = i < encoded.length ? encoded[i++] : null;
          b64 += toBase64Digit(i1 >> 2);
          b64 += toBase64Digit((i1 & 3) << 4 | (i2 === null ? 0 : i2 >> 4));
          b64 += i2 === null ? '=' : toBase64Digit((i2 & 15) << 2 | (i3 === null ? 0 : i3 >> 6));
          b64 += i2 === null || i3 === null ? '=' : toBase64Digit(i3 & 63);
        }

        return b64;
      }

      function toBase64VLQ(value) {
        value = value < 0 ? (-value << 1) + 1 : value << 1;
        var out = '';

        do {
          var digit = value & 31;
          value = value >> 5;

          if (value > 0) {
            digit = digit | 32;
          }

          out += toBase64Digit(digit);
        } while (value > 0);

        return out;
      }

      var B64_DIGITS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';

      function toBase64Digit(value) {
        if (value < 0 || value >= 64) {
          throw new Error("Can only encode value in the range [0, 63]");
        }

        return B64_DIGITS[value];
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
      var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
      var _INDENT_WITH = '  ';
      var CATCH_ERROR_VAR$1 = variable('error', null, null);
      var CATCH_STACK_VAR$1 = variable('stack', null, null);

      var _EmittedLine = function _EmittedLine(indent) {
        _classCallCheck(this, _EmittedLine);

        this.indent = indent;
        this.partsLength = 0;
        this.parts = [];
        this.srcSpans = [];
      };

      var EmitterVisitorContext = /*#__PURE__*/function () {
        function EmitterVisitorContext(_indent) {
          _classCallCheck(this, EmitterVisitorContext);

          this._indent = _indent;
          this._classes = [];
          this._preambleLineCount = 0;
          this._lines = [new _EmittedLine(_indent)];
        }

        _createClass2(EmitterVisitorContext, [{
          key: "_currentLine",
          get:
          /**
           * @internal strip this from published d.ts files due to
           * https://github.com/microsoft/TypeScript/issues/36216
           */
          function get() {
            return this._lines[this._lines.length - 1];
          }
        }, {
          key: "println",
          value: function println(from) {
            var lastPart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
            this.print(from || null, lastPart, true);
          }
        }, {
          key: "lineIsEmpty",
          value: function lineIsEmpty() {
            return this._currentLine.parts.length === 0;
          }
        }, {
          key: "lineLength",
          value: function lineLength() {
            return this._currentLine.indent * _INDENT_WITH.length + this._currentLine.partsLength;
          }
        }, {
          key: "print",
          value: function print(from, part) {
            var newLine = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

            if (part.length > 0) {
              this._currentLine.parts.push(part);

              this._currentLine.partsLength += part.length;

              this._currentLine.srcSpans.push(from && from.sourceSpan || null);
            }

            if (newLine) {
              this._lines.push(new _EmittedLine(this._indent));
            }
          }
        }, {
          key: "removeEmptyLastLine",
          value: function removeEmptyLastLine() {
            if (this.lineIsEmpty()) {
              this._lines.pop();
            }
          }
        }, {
          key: "incIndent",
          value: function incIndent() {
            this._indent++;

            if (this.lineIsEmpty()) {
              this._currentLine.indent = this._indent;
            }
          }
        }, {
          key: "decIndent",
          value: function decIndent() {
            this._indent--;

            if (this.lineIsEmpty()) {
              this._currentLine.indent = this._indent;
            }
          }
        }, {
          key: "pushClass",
          value: function pushClass(clazz) {
            this._classes.push(clazz);
          }
        }, {
          key: "popClass",
          value: function popClass() {
            return this._classes.pop();
          }
        }, {
          key: "currentClass",
          get: function get() {
            return this._classes.length > 0 ? this._classes[this._classes.length - 1] : null;
          }
        }, {
          key: "toSource",
          value: function toSource() {
            return this.sourceLines.map(function (l) {
              return l.parts.length > 0 ? _createIndent(l.indent) + l.parts.join('') : '';
            }).join('\n');
          }
        }, {
          key: "toSourceMapGenerator",
          value: function toSourceMapGenerator(genFilePath) {
            var startsAtLine = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
            var map = new SourceMapGenerator(genFilePath);
            var firstOffsetMapped = false;

            var mapFirstOffsetIfNeeded = function mapFirstOffsetIfNeeded() {
              if (!firstOffsetMapped) {
                // Add a single space so that tools won't try to load the file from disk.
                // Note: We are using virtual urls like `ng:///`, so we have to
                // provide a content here.
                map.addSource(genFilePath, ' ').addMapping(0, genFilePath, 0, 0);
                firstOffsetMapped = true;
              }
            };

            for (var i = 0; i < startsAtLine; i++) {
              map.addLine();
              mapFirstOffsetIfNeeded();
            }

            this.sourceLines.forEach(function (line, lineIdx) {
              map.addLine();
              var spans = line.srcSpans;
              var parts = line.parts;
              var col0 = line.indent * _INDENT_WITH.length;
              var spanIdx = 0; // skip leading parts without source spans

              while (spanIdx < spans.length && !spans[spanIdx]) {
                col0 += parts[spanIdx].length;
                spanIdx++;
              }

              if (spanIdx < spans.length && lineIdx === 0 && col0 === 0) {
                firstOffsetMapped = true;
              } else {
                mapFirstOffsetIfNeeded();
              }

              while (spanIdx < spans.length) {
                var span = spans[spanIdx];
                var source = span.start.file;
                var sourceLine = span.start.line;
                var sourceCol = span.start.col;
                map.addSource(source.url, source.content).addMapping(col0, source.url, sourceLine, sourceCol);
                col0 += parts[spanIdx].length;
                spanIdx++; // assign parts without span or the same span to the previous segment

                while (spanIdx < spans.length && (span === spans[spanIdx] || !spans[spanIdx])) {
                  col0 += parts[spanIdx].length;
                  spanIdx++;
                }
              }
            });
            return map;
          }
        }, {
          key: "setPreambleLineCount",
          value: function setPreambleLineCount(count) {
            return this._preambleLineCount = count;
          }
        }, {
          key: "spanOf",
          value: function spanOf(line, column) {
            var emittedLine = this._lines[line - this._preambleLineCount];

            if (emittedLine) {
              var columnsLeft = column - _createIndent(emittedLine.indent).length;

              for (var partIndex = 0; partIndex < emittedLine.parts.length; partIndex++) {
                var part = emittedLine.parts[partIndex];

                if (part.length > columnsLeft) {
                  return emittedLine.srcSpans[partIndex];
                }

                columnsLeft -= part.length;
              }
            }

            return null;
          }
          /**
           * @internal strip this from published d.ts files due to
           * https://github.com/microsoft/TypeScript/issues/36216
           */

        }, {
          key: "sourceLines",
          get: function get() {
            if (this._lines.length && this._lines[this._lines.length - 1].parts.length === 0) {
              return this._lines.slice(0, -1);
            }

            return this._lines;
          }
        }], [{
          key: "createRoot",
          value: function createRoot() {
            return new EmitterVisitorContext(0);
          }
        }]);

        return EmitterVisitorContext;
      }();

      var AbstractEmitterVisitor = /*#__PURE__*/function () {
        function AbstractEmitterVisitor(_escapeDollarInStrings) {
          _classCallCheck(this, AbstractEmitterVisitor);

          this._escapeDollarInStrings = _escapeDollarInStrings;
        }

        _createClass2(AbstractEmitterVisitor, [{
          key: "printLeadingComments",
          value: function printLeadingComments(stmt, ctx) {
            if (stmt.leadingComments === undefined) {
              return;
            }

            var _iterator7 = _createForOfIteratorHelper(stmt.leadingComments),
                _step7;

            try {
              for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
                var comment = _step7.value;

                if (comment instanceof JSDocComment) {
                  ctx.print(stmt, "/*".concat(comment.toString(), "*/"), comment.trailingNewline);
                } else {
                  if (comment.multiline) {
                    ctx.print(stmt, "/* ".concat(comment.text, " */"), comment.trailingNewline);
                  } else {
                    comment.text.split('\n').forEach(function (line) {
                      ctx.println(stmt, "// ".concat(line));
                    });
                  }
                }
              }
            } catch (err) {
              _iterator7.e(err);
            } finally {
              _iterator7.f();
            }
          }
        }, {
          key: "visitExpressionStmt",
          value: function visitExpressionStmt(stmt, ctx) {
            this.printLeadingComments(stmt, ctx);
            stmt.expr.visitExpression(this, ctx);
            ctx.println(stmt, ';');
            return null;
          }
        }, {
          key: "visitReturnStmt",
          value: function visitReturnStmt(stmt, ctx) {
            this.printLeadingComments(stmt, ctx);
            ctx.print(stmt, "return ");
            stmt.value.visitExpression(this, ctx);
            ctx.println(stmt, ';');
            return null;
          }
        }, {
          key: "visitIfStmt",
          value: function visitIfStmt(stmt, ctx) {
            this.printLeadingComments(stmt, ctx);
            ctx.print(stmt, "if (");
            stmt.condition.visitExpression(this, ctx);
            ctx.print(stmt, ") {");
            var hasElseCase = stmt.falseCase != null && stmt.falseCase.length > 0;

            if (stmt.trueCase.length <= 1 && !hasElseCase) {
              ctx.print(stmt, " ");
              this.visitAllStatements(stmt.trueCase, ctx);
              ctx.removeEmptyLastLine();
              ctx.print(stmt, " ");
            } else {
              ctx.println();
              ctx.incIndent();
              this.visitAllStatements(stmt.trueCase, ctx);
              ctx.decIndent();

              if (hasElseCase) {
                ctx.println(stmt, "} else {");
                ctx.incIndent();
                this.visitAllStatements(stmt.falseCase, ctx);
                ctx.decIndent();
              }
            }

            ctx.println(stmt, "}");
            return null;
          }
        }, {
          key: "visitThrowStmt",
          value: function visitThrowStmt(stmt, ctx) {
            this.printLeadingComments(stmt, ctx);
            ctx.print(stmt, "throw ");
            stmt.error.visitExpression(this, ctx);
            ctx.println(stmt, ";");
            return null;
          }
        }, {
          key: "visitWriteVarExpr",
          value: function visitWriteVarExpr(expr, ctx) {
            var lineWasEmpty = ctx.lineIsEmpty();

            if (!lineWasEmpty) {
              ctx.print(expr, '(');
            }

            ctx.print(expr, "".concat(expr.name, " = "));
            expr.value.visitExpression(this, ctx);

            if (!lineWasEmpty) {
              ctx.print(expr, ')');
            }

            return null;
          }
        }, {
          key: "visitWriteKeyExpr",
          value: function visitWriteKeyExpr(expr, ctx) {
            var lineWasEmpty = ctx.lineIsEmpty();

            if (!lineWasEmpty) {
              ctx.print(expr, '(');
            }

            expr.receiver.visitExpression(this, ctx);
            ctx.print(expr, "[");
            expr.index.visitExpression(this, ctx);
            ctx.print(expr, "] = ");
            expr.value.visitExpression(this, ctx);

            if (!lineWasEmpty) {
              ctx.print(expr, ')');
            }

            return null;
          }
        }, {
          key: "visitWritePropExpr",
          value: function visitWritePropExpr(expr, ctx) {
            var lineWasEmpty = ctx.lineIsEmpty();

            if (!lineWasEmpty) {
              ctx.print(expr, '(');
            }

            expr.receiver.visitExpression(this, ctx);
            ctx.print(expr, ".".concat(expr.name, " = "));
            expr.value.visitExpression(this, ctx);

            if (!lineWasEmpty) {
              ctx.print(expr, ')');
            }

            return null;
          }
        }, {
          key: "visitInvokeMethodExpr",
          value: function visitInvokeMethodExpr(expr, ctx) {
            expr.receiver.visitExpression(this, ctx);
            var name = expr.name;

            if (expr.builtin != null) {
              name = this.getBuiltinMethodName(expr.builtin);

              if (name == null) {
                // some builtins just mean to skip the call.
                return null;
              }
            }

            ctx.print(expr, ".".concat(name, "("));
            this.visitAllExpressions(expr.args, ctx, ",");
            ctx.print(expr, ")");
            return null;
          }
        }, {
          key: "visitInvokeFunctionExpr",
          value: function visitInvokeFunctionExpr(expr, ctx) {
            expr.fn.visitExpression(this, ctx);
            ctx.print(expr, "(");
            this.visitAllExpressions(expr.args, ctx, ',');
            ctx.print(expr, ")");
            return null;
          }
        }, {
          key: "visitWrappedNodeExpr",
          value: function visitWrappedNodeExpr(ast, ctx) {
            throw new Error('Abstract emitter cannot visit WrappedNodeExpr.');
          }
        }, {
          key: "visitTypeofExpr",
          value: function visitTypeofExpr(expr, ctx) {
            ctx.print(expr, 'typeof ');
            expr.expr.visitExpression(this, ctx);
          }
        }, {
          key: "visitReadVarExpr",
          value: function visitReadVarExpr(ast, ctx) {
            var varName = ast.name;

            if (ast.builtin != null) {
              switch (ast.builtin) {
                case BuiltinVar.Super:
                  varName = 'super';
                  break;

                case BuiltinVar.This:
                  varName = 'this';
                  break;

                case BuiltinVar.CatchError:
                  varName = CATCH_ERROR_VAR$1.name;
                  break;

                case BuiltinVar.CatchStack:
                  varName = CATCH_STACK_VAR$1.name;
                  break;

                default:
                  throw new Error("Unknown builtin variable ".concat(ast.builtin));
              }
            }

            ctx.print(ast, varName);
            return null;
          }
        }, {
          key: "visitInstantiateExpr",
          value: function visitInstantiateExpr(ast, ctx) {
            ctx.print(ast, "new ");
            ast.classExpr.visitExpression(this, ctx);
            ctx.print(ast, "(");
            this.visitAllExpressions(ast.args, ctx, ',');
            ctx.print(ast, ")");
            return null;
          }
        }, {
          key: "visitLiteralExpr",
          value: function visitLiteralExpr(ast, ctx) {
            var value = ast.value;

            if (typeof value === 'string') {
              ctx.print(ast, escapeIdentifier(value, this._escapeDollarInStrings));
            } else {
              ctx.print(ast, "".concat(value));
            }

            return null;
          }
        }, {
          key: "visitLocalizedString",
          value: function visitLocalizedString(ast, ctx) {
            var head = ast.serializeI18nHead();
            ctx.print(ast, '$localize `' + head.raw);

            for (var i = 1; i < ast.messageParts.length; i++) {
              ctx.print(ast, '${');
              ast.expressions[i - 1].visitExpression(this, ctx);
              ctx.print(ast, "}".concat(ast.serializeI18nTemplatePart(i).raw));
            }

            ctx.print(ast, '`');
            return null;
          }
        }, {
          key: "visitConditionalExpr",
          value: function visitConditionalExpr(ast, ctx) {
            ctx.print(ast, "(");
            ast.condition.visitExpression(this, ctx);
            ctx.print(ast, '? ');
            ast.trueCase.visitExpression(this, ctx);
            ctx.print(ast, ': ');
            ast.falseCase.visitExpression(this, ctx);
            ctx.print(ast, ")");
            return null;
          }
        }, {
          key: "visitNotExpr",
          value: function visitNotExpr(ast, ctx) {
            ctx.print(ast, '!');
            ast.condition.visitExpression(this, ctx);
            return null;
          }
        }, {
          key: "visitAssertNotNullExpr",
          value: function visitAssertNotNullExpr(ast, ctx) {
            ast.condition.visitExpression(this, ctx);
            return null;
          }
        }, {
          key: "visitUnaryOperatorExpr",
          value: function visitUnaryOperatorExpr(ast, ctx) {
            var opStr;

            switch (ast.operator) {
              case UnaryOperator.Plus:
                opStr = '+';
                break;

              case UnaryOperator.Minus:
                opStr = '-';
                break;

              default:
                throw new Error("Unknown operator ".concat(ast.operator));
            }

            if (ast.parens) ctx.print(ast, "(");
            ctx.print(ast, opStr);
            ast.expr.visitExpression(this, ctx);
            if (ast.parens) ctx.print(ast, ")");
            return null;
          }
        }, {
          key: "visitBinaryOperatorExpr",
          value: function visitBinaryOperatorExpr(ast, ctx) {
            var opStr;

            switch (ast.operator) {
              case BinaryOperator.Equals:
                opStr = '==';
                break;

              case BinaryOperator.Identical:
                opStr = '===';
                break;

              case BinaryOperator.NotEquals:
                opStr = '!=';
                break;

              case BinaryOperator.NotIdentical:
                opStr = '!==';
                break;

              case BinaryOperator.And:
                opStr = '&&';
                break;

              case BinaryOperator.BitwiseAnd:
                opStr = '&';
                break;

              case BinaryOperator.Or:
                opStr = '||';
                break;

              case BinaryOperator.Plus:
                opStr = '+';
                break;

              case BinaryOperator.Minus:
                opStr = '-';
                break;

              case BinaryOperator.Divide:
                opStr = '/';
                break;

              case BinaryOperator.Multiply:
                opStr = '*';
                break;

              case BinaryOperator.Modulo:
                opStr = '%';
                break;

              case BinaryOperator.Lower:
                opStr = '<';
                break;

              case BinaryOperator.LowerEquals:
                opStr = '<=';
                break;

              case BinaryOperator.Bigger:
                opStr = '>';
                break;

              case BinaryOperator.BiggerEquals:
                opStr = '>=';
                break;

              default:
                throw new Error("Unknown operator ".concat(ast.operator));
            }

            if (ast.parens) ctx.print(ast, "(");
            ast.lhs.visitExpression(this, ctx);
            ctx.print(ast, " ".concat(opStr, " "));
            ast.rhs.visitExpression(this, ctx);
            if (ast.parens) ctx.print(ast, ")");
            return null;
          }
        }, {
          key: "visitReadPropExpr",
          value: function visitReadPropExpr(ast, ctx) {
            ast.receiver.visitExpression(this, ctx);
            ctx.print(ast, ".");
            ctx.print(ast, ast.name);
            return null;
          }
        }, {
          key: "visitReadKeyExpr",
          value: function visitReadKeyExpr(ast, ctx) {
            ast.receiver.visitExpression(this, ctx);
            ctx.print(ast, "[");
            ast.index.visitExpression(this, ctx);
            ctx.print(ast, "]");
            return null;
          }
        }, {
          key: "visitLiteralArrayExpr",
          value: function visitLiteralArrayExpr(ast, ctx) {
            ctx.print(ast, "[");
            this.visitAllExpressions(ast.entries, ctx, ',');
            ctx.print(ast, "]");
            return null;
          }
        }, {
          key: "visitLiteralMapExpr",
          value: function visitLiteralMapExpr(ast, ctx) {
            var _this86 = this;

            ctx.print(ast, "{");
            this.visitAllObjects(function (entry) {
              ctx.print(ast, "".concat(escapeIdentifier(entry.key, _this86._escapeDollarInStrings, entry.quoted), ":"));
              entry.value.visitExpression(_this86, ctx);
            }, ast.entries, ctx, ',');
            ctx.print(ast, "}");
            return null;
          }
        }, {
          key: "visitCommaExpr",
          value: function visitCommaExpr(ast, ctx) {
            ctx.print(ast, '(');
            this.visitAllExpressions(ast.parts, ctx, ',');
            ctx.print(ast, ')');
            return null;
          }
        }, {
          key: "visitAllExpressions",
          value: function visitAllExpressions(expressions, ctx, separator) {
            var _this87 = this;

            this.visitAllObjects(function (expr) {
              return expr.visitExpression(_this87, ctx);
            }, expressions, ctx, separator);
          }
        }, {
          key: "visitAllObjects",
          value: function visitAllObjects(handler, expressions, ctx, separator) {
            var incrementedIndent = false;

            for (var i = 0; i < expressions.length; i++) {
              if (i > 0) {
                if (ctx.lineLength() > 80) {
                  ctx.print(null, separator, true);

                  if (!incrementedIndent) {
                    // continuation are marked with double indent.
                    ctx.incIndent();
                    ctx.incIndent();
                    incrementedIndent = true;
                  }
                } else {
                  ctx.print(null, separator, false);
                }
              }

              handler(expressions[i]);
            }

            if (incrementedIndent) {
              // continuation are marked with double indent.
              ctx.decIndent();
              ctx.decIndent();
            }
          }
        }, {
          key: "visitAllStatements",
          value: function visitAllStatements(statements, ctx) {
            var _this88 = this;

            statements.forEach(function (stmt) {
              return stmt.visitStatement(_this88, ctx);
            });
          }
        }]);

        return AbstractEmitterVisitor;
      }();

      function escapeIdentifier(input, escapeDollar) {
        var alwaysQuote = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;

        if (input == null) {
          return null;
        }

        var body = input.replace(_SINGLE_QUOTE_ESCAPE_STRING_RE, function () {
          if ((arguments.length <= 0 ? undefined : arguments[0]) == '$') {
            return escapeDollar ? '\\$' : '$';
          } else if ((arguments.length <= 0 ? undefined : arguments[0]) == '\n') {
            return '\\n';
          } else if ((arguments.length <= 0 ? undefined : arguments[0]) == '\r') {
            return '\\r';
          } else {
            return "\\".concat(arguments.length <= 0 ? undefined : arguments[0]);
          }
        });
        var requiresQuotes = alwaysQuote || !_LEGAL_IDENTIFIER_RE.test(body);
        return requiresQuotes ? "'".concat(body, "'") : body;
      }

      function _createIndent(count) {
        var res = '';

        for (var i = 0; i < count; i++) {
          res += _INDENT_WITH;
        }

        return res;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var AbstractJsEmitterVisitor = /*#__PURE__*/function (_AbstractEmitterVisit) {
        _inherits(AbstractJsEmitterVisitor, _AbstractEmitterVisit);

        var _super57 = _createSuper(AbstractJsEmitterVisitor);

        function AbstractJsEmitterVisitor() {
          _classCallCheck(this, AbstractJsEmitterVisitor);

          return _super57.call(this, false);
        }

        _createClass2(AbstractJsEmitterVisitor, [{
          key: "visitDeclareClassStmt",
          value: function visitDeclareClassStmt(stmt, ctx) {
            var _this89 = this;

            ctx.pushClass(stmt);

            this._visitClassConstructor(stmt, ctx);

            if (stmt.parent != null) {
              ctx.print(stmt, "".concat(stmt.name, ".prototype = Object.create("));
              stmt.parent.visitExpression(this, ctx);
              ctx.println(stmt, ".prototype);");
            }

            stmt.getters.forEach(function (getter) {
              return _this89._visitClassGetter(stmt, getter, ctx);
            });
            stmt.methods.forEach(function (method) {
              return _this89._visitClassMethod(stmt, method, ctx);
            });
            ctx.popClass();
            return null;
          }
        }, {
          key: "_visitClassConstructor",
          value: function _visitClassConstructor(stmt, ctx) {
            ctx.print(stmt, "function ".concat(stmt.name, "("));

            if (stmt.constructorMethod != null) {
              this._visitParams(stmt.constructorMethod.params, ctx);
            }

            ctx.println(stmt, ") {");
            ctx.incIndent();

            if (stmt.constructorMethod != null) {
              if (stmt.constructorMethod.body.length > 0) {
                ctx.println(stmt, "var self = this;");
                this.visitAllStatements(stmt.constructorMethod.body, ctx);
              }
            }

            ctx.decIndent();
            ctx.println(stmt, "}");
          }
        }, {
          key: "_visitClassGetter",
          value: function _visitClassGetter(stmt, getter, ctx) {
            ctx.println(stmt, "Object.defineProperty(".concat(stmt.name, ".prototype, '").concat(getter.name, "', { get: function() {"));
            ctx.incIndent();

            if (getter.body.length > 0) {
              ctx.println(stmt, "var self = this;");
              this.visitAllStatements(getter.body, ctx);
            }

            ctx.decIndent();
            ctx.println(stmt, "}});");
          }
        }, {
          key: "_visitClassMethod",
          value: function _visitClassMethod(stmt, method, ctx) {
            ctx.print(stmt, "".concat(stmt.name, ".prototype.").concat(method.name, " = function("));

            this._visitParams(method.params, ctx);

            ctx.println(stmt, ") {");
            ctx.incIndent();

            if (method.body.length > 0) {
              ctx.println(stmt, "var self = this;");
              this.visitAllStatements(method.body, ctx);
            }

            ctx.decIndent();
            ctx.println(stmt, "};");
          }
        }, {
          key: "visitWrappedNodeExpr",
          value: function visitWrappedNodeExpr(ast, ctx) {
            throw new Error('Cannot emit a WrappedNodeExpr in Javascript.');
          }
        }, {
          key: "visitReadVarExpr",
          value: function visitReadVarExpr(ast, ctx) {
            if (ast.builtin === BuiltinVar.This) {
              ctx.print(ast, 'self');
            } else if (ast.builtin === BuiltinVar.Super) {
              throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");
            } else {
              _get(_getPrototypeOf(AbstractJsEmitterVisitor.prototype), "visitReadVarExpr", this).call(this, ast, ctx);
            }

            return null;
          }
        }, {
          key: "visitDeclareVarStmt",
          value: function visitDeclareVarStmt(stmt, ctx) {
            ctx.print(stmt, "var ".concat(stmt.name));

            if (stmt.value) {
              ctx.print(stmt, ' = ');
              stmt.value.visitExpression(this, ctx);
            }

            ctx.println(stmt, ";");
            return null;
          }
        }, {
          key: "visitCastExpr",
          value: function visitCastExpr(ast, ctx) {
            ast.value.visitExpression(this, ctx);
            return null;
          }
        }, {
          key: "visitInvokeFunctionExpr",
          value: function visitInvokeFunctionExpr(expr, ctx) {
            var fnExpr = expr.fn;

            if (fnExpr instanceof ReadVarExpr && fnExpr.builtin === BuiltinVar.Super) {
              ctx.currentClass.parent.visitExpression(this, ctx);
              ctx.print(expr, ".call(this");

              if (expr.args.length > 0) {
                ctx.print(expr, ", ");
                this.visitAllExpressions(expr.args, ctx, ',');
              }

              ctx.print(expr, ")");
            } else {
              _get(_getPrototypeOf(AbstractJsEmitterVisitor.prototype), "visitInvokeFunctionExpr", this).call(this, expr, ctx);
            }

            return null;
          }
        }, {
          key: "visitFunctionExpr",
          value: function visitFunctionExpr(ast, ctx) {
            ctx.print(ast, "function".concat(ast.name ? ' ' + ast.name : '', "("));

            this._visitParams(ast.params, ctx);

            ctx.println(ast, ") {");
            ctx.incIndent();
            this.visitAllStatements(ast.statements, ctx);
            ctx.decIndent();
            ctx.print(ast, "}");
            return null;
          }
        }, {
          key: "visitDeclareFunctionStmt",
          value: function visitDeclareFunctionStmt(stmt, ctx) {
            ctx.print(stmt, "function ".concat(stmt.name, "("));

            this._visitParams(stmt.params, ctx);

            ctx.println(stmt, ") {");
            ctx.incIndent();
            this.visitAllStatements(stmt.statements, ctx);
            ctx.decIndent();
            ctx.println(stmt, "}");
            return null;
          }
        }, {
          key: "visitTryCatchStmt",
          value: function visitTryCatchStmt(stmt, ctx) {
            ctx.println(stmt, "try {");
            ctx.incIndent();
            this.visitAllStatements(stmt.bodyStmts, ctx);
            ctx.decIndent();
            ctx.println(stmt, "} catch (".concat(CATCH_ERROR_VAR$1.name, ") {"));
            ctx.incIndent();
            var catchStmts = [CATCH_STACK_VAR$1.set(CATCH_ERROR_VAR$1.prop('stack')).toDeclStmt(null, [StmtModifier.Final])].concat(stmt.catchStmts);
            this.visitAllStatements(catchStmts, ctx);
            ctx.decIndent();
            ctx.println(stmt, "}");
            return null;
          }
        }, {
          key: "visitLocalizedString",
          value: function visitLocalizedString(ast, ctx) {
            var _this90 = this;

            // The following convoluted piece of code is effectively the downlevelled equivalent of
            // ```
            // $localize `...`
            // ```
            // which is effectively like:
            // ```
            // $localize(__makeTemplateObject(cooked, raw), expression1, expression2, ...);
            // ```
            //
            // The `$localize` function expects a "template object", which is an array of "cooked" strings
            // plus a `raw` property that contains an array of "raw" strings.
            //
            // In some environments a helper function called `__makeTemplateObject(cooked, raw)` might be
            // available, in which case we use that. Otherwise we must create our own helper function
            // inline.
            //
            // In the inline function, if `Object.defineProperty` is available we use that to attach the
            // `raw` array.
            ctx.print(ast, '$localize((this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})(');
            var parts = [ast.serializeI18nHead()];

            for (var i = 1; i < ast.messageParts.length; i++) {
              parts.push(ast.serializeI18nTemplatePart(i));
            }

            ctx.print(ast, "[".concat(parts.map(function (part) {
              return escapeIdentifier(part.cooked, false);
            }).join(', '), "], "));
            ctx.print(ast, "[".concat(parts.map(function (part) {
              return escapeIdentifier(part.raw, false);
            }).join(', '), "])"));
            ast.expressions.forEach(function (expression) {
              ctx.print(ast, ', ');
              expression.visitExpression(_this90, ctx);
            });
            ctx.print(ast, ')');
            return null;
          }
        }, {
          key: "_visitParams",
          value: function _visitParams(params, ctx) {
            this.visitAllObjects(function (param) {
              return ctx.print(null, param.name);
            }, params, ctx, ',');
          }
        }, {
          key: "getBuiltinMethodName",
          value: function getBuiltinMethodName(method) {
            var name;

            switch (method) {
              case BuiltinMethod.ConcatArray:
                name = 'concat';
                break;

              case BuiltinMethod.SubscribeObservable:
                name = 'subscribe';
                break;

              case BuiltinMethod.Bind:
                name = 'bind';
                break;

              default:
                throw new Error("Unknown builtin method: ".concat(method));
            }

            return name;
          }
        }]);

        return AbstractJsEmitterVisitor;
      }(AbstractEmitterVisitor);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A helper class to manage the evaluation of JIT generated code.
       */


      var JitEvaluator = /*#__PURE__*/function () {
        function JitEvaluator() {
          _classCallCheck(this, JitEvaluator);
        }

        _createClass2(JitEvaluator, [{
          key: "evaluateStatements",
          value:
          /**
           *
           * @param sourceUrl The URL of the generated code.
           * @param statements An array of Angular statement AST nodes to be evaluated.
           * @param reflector A helper used when converting the statements to executable code.
           * @param createSourceMaps If true then create a source-map for the generated code and include it
           * inline as a source-map comment.
           * @returns A map of all the variables in the generated code.
           */
          function evaluateStatements(sourceUrl, statements, reflector, createSourceMaps) {
            var converter = new JitEmitterVisitor(reflector);
            var ctx = EmitterVisitorContext.createRoot(); // Ensure generated code is in strict mode

            if (statements.length > 0 && !isUseStrictStatement(statements[0])) {
              statements = [literal('use strict').toStmt()].concat(_toConsumableArray(statements));
            }

            converter.visitAllStatements(statements, ctx);
            converter.createReturnStmt(ctx);
            return this.evaluateCode(sourceUrl, ctx, converter.getArgs(), createSourceMaps);
          }
          /**
           * Evaluate a piece of JIT generated code.
           * @param sourceUrl The URL of this generated code.
           * @param ctx A context object that contains an AST of the code to be evaluated.
           * @param vars A map containing the names and values of variables that the evaluated code might
           * reference.
           * @param createSourceMap If true then create a source-map for the generated code and include it
           * inline as a source-map comment.
           * @returns The result of evaluating the code.
           */

        }, {
          key: "evaluateCode",
          value: function evaluateCode(sourceUrl, ctx, vars, createSourceMap) {
            var fnBody = "\"use strict\";".concat(ctx.toSource(), "\n//# sourceURL=").concat(sourceUrl);
            var fnArgNames = [];
            var fnArgValues = [];

            for (var argName in vars) {
              fnArgValues.push(vars[argName]);
              fnArgNames.push(argName);
            }

            if (createSourceMap) {
              // using `new Function(...)` generates a header, 1 line of no arguments, 2 lines otherwise
              // E.g. ```
              // function anonymous(a,b,c
              // /**/) { ... }```
              // We don't want to hard code this fact, so we auto detect it via an empty function first.
              var emptyFn = _construct(Function, _toConsumableArray(fnArgNames.concat('return null;'))).toString();

              var headerLines = emptyFn.slice(0, emptyFn.indexOf('return null;')).split('\n').length - 1;
              fnBody += "\n".concat(ctx.toSourceMapGenerator(sourceUrl, headerLines).toJsComment());
            }

            var fn = _construct(Function, _toConsumableArray(fnArgNames.concat(fnBody)));

            return this.executeFunction(fn, fnArgValues);
          }
          /**
           * Execute a JIT generated function by calling it.
           *
           * This method can be overridden in tests to capture the functions that are generated
           * by this `JitEvaluator` class.
           *
           * @param fn A function to execute.
           * @param args The arguments to pass to the function being executed.
           * @returns The return value of the executed function.
           */

        }, {
          key: "executeFunction",
          value: function executeFunction(fn, args) {
            return fn.apply(void 0, _toConsumableArray(args));
          }
        }]);

        return JitEvaluator;
      }();
      /**
       * An Angular AST visitor that converts AST nodes into executable JavaScript code.
       */


      var JitEmitterVisitor = /*#__PURE__*/function (_AbstractJsEmitterVis) {
        _inherits(JitEmitterVisitor, _AbstractJsEmitterVis);

        var _super58 = _createSuper(JitEmitterVisitor);

        function JitEmitterVisitor(reflector) {
          var _this91;

          _classCallCheck(this, JitEmitterVisitor);

          _this91 = _super58.call(this);
          _this91.reflector = reflector;
          _this91._evalArgNames = [];
          _this91._evalArgValues = [];
          _this91._evalExportedVars = [];
          return _this91;
        }

        _createClass2(JitEmitterVisitor, [{
          key: "createReturnStmt",
          value: function createReturnStmt(ctx) {
            var stmt = new ReturnStatement(new LiteralMapExpr(this._evalExportedVars.map(function (resultVar) {
              return new LiteralMapEntry(resultVar, variable(resultVar), false);
            })));
            stmt.visitStatement(this, ctx);
          }
        }, {
          key: "getArgs",
          value: function getArgs() {
            var result = {};

            for (var i = 0; i < this._evalArgNames.length; i++) {
              result[this._evalArgNames[i]] = this._evalArgValues[i];
            }

            return result;
          }
        }, {
          key: "visitExternalExpr",
          value: function visitExternalExpr(ast, ctx) {
            this._emitReferenceToExternal(ast, this.reflector.resolveExternalReference(ast.value), ctx);

            return null;
          }
        }, {
          key: "visitWrappedNodeExpr",
          value: function visitWrappedNodeExpr(ast, ctx) {
            this._emitReferenceToExternal(ast, ast.node, ctx);

            return null;
          }
        }, {
          key: "visitDeclareVarStmt",
          value: function visitDeclareVarStmt(stmt, ctx) {
            if (stmt.hasModifier(StmtModifier.Exported)) {
              this._evalExportedVars.push(stmt.name);
            }

            return _get(_getPrototypeOf(JitEmitterVisitor.prototype), "visitDeclareVarStmt", this).call(this, stmt, ctx);
          }
        }, {
          key: "visitDeclareFunctionStmt",
          value: function visitDeclareFunctionStmt(stmt, ctx) {
            if (stmt.hasModifier(StmtModifier.Exported)) {
              this._evalExportedVars.push(stmt.name);
            }

            return _get(_getPrototypeOf(JitEmitterVisitor.prototype), "visitDeclareFunctionStmt", this).call(this, stmt, ctx);
          }
        }, {
          key: "visitDeclareClassStmt",
          value: function visitDeclareClassStmt(stmt, ctx) {
            if (stmt.hasModifier(StmtModifier.Exported)) {
              this._evalExportedVars.push(stmt.name);
            }

            return _get(_getPrototypeOf(JitEmitterVisitor.prototype), "visitDeclareClassStmt", this).call(this, stmt, ctx);
          }
        }, {
          key: "_emitReferenceToExternal",
          value: function _emitReferenceToExternal(ast, value, ctx) {
            var id = this._evalArgValues.indexOf(value);

            if (id === -1) {
              id = this._evalArgValues.length;

              this._evalArgValues.push(value);

              var name = identifierName({
                reference: value
              }) || 'val';

              this._evalArgNames.push("jit_".concat(name, "_").concat(id));
            }

            ctx.print(ast, this._evalArgNames[id]);
          }
        }]);

        return JitEmitterVisitor;
      }(AbstractJsEmitterVisitor);

      function isUseStrictStatement(statement) {
        return statement.isEquivalent(literal('use strict').toStmt());
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var $EOF = 0;
      var $BSPACE = 8;
      var $TAB = 9;
      var $LF = 10;
      var $VTAB = 11;
      var $FF = 12;
      var $CR = 13;
      var $SPACE = 32;
      var $BANG = 33;
      var $DQ = 34;
      var $HASH = 35;
      var $$ = 36;
      var $PERCENT = 37;
      var $AMPERSAND = 38;
      var $SQ = 39;
      var $LPAREN = 40;
      var $RPAREN = 41;
      var $STAR = 42;
      var $PLUS = 43;
      var $COMMA = 44;
      var $MINUS = 45;
      var $PERIOD = 46;
      var $SLASH = 47;
      var $COLON = 58;
      var $SEMICOLON = 59;
      var $LT = 60;
      var $EQ = 61;
      var $GT = 62;
      var $QUESTION = 63;
      var $0 = 48;
      var $7 = 55;
      var $9 = 57;
      var $A = 65;
      var $E = 69;
      var $F = 70;
      var $X = 88;
      var $Z = 90;
      var $LBRACKET = 91;
      var $BACKSLASH = 92;
      var $RBRACKET = 93;
      var $CARET = 94;
      var $_ = 95;
      var $a = 97;
      var $b = 98;
      var $e = 101;
      var $f = 102;
      var $n = 110;
      var $r = 114;
      var $t = 116;
      var $u = 117;
      var $v = 118;
      var $x = 120;
      var $z = 122;
      var $LBRACE = 123;
      var $BAR = 124;
      var $RBRACE = 125;
      var $NBSP = 160;
      var $PIPE = 124;
      var $TILDA = 126;
      var $AT = 64;
      var $BT = 96;

      function isWhitespace(code) {
        return code >= $TAB && code <= $SPACE || code == $NBSP;
      }

      function isDigit(code) {
        return $0 <= code && code <= $9;
      }

      function isAsciiLetter(code) {
        return code >= $a && code <= $z || code >= $A && code <= $Z;
      }

      function isAsciiHexDigit(code) {
        return code >= $a && code <= $f || code >= $A && code <= $F || isDigit(code);
      }

      function isNewLine(code) {
        return code === $LF || code === $CR;
      }

      function isOctalDigit(code) {
        return $0 <= code && code <= $7;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ParseLocation = /*#__PURE__*/function () {
        function ParseLocation(file, offset, line, col) {
          _classCallCheck(this, ParseLocation);

          this.file = file;
          this.offset = offset;
          this.line = line;
          this.col = col;
        }

        _createClass2(ParseLocation, [{
          key: "toString",
          value: function toString() {
            return this.offset != null ? "".concat(this.file.url, "@").concat(this.line, ":").concat(this.col) : this.file.url;
          }
        }, {
          key: "moveBy",
          value: function moveBy(delta) {
            var source = this.file.content;
            var len = source.length;
            var offset = this.offset;
            var line = this.line;
            var col = this.col;

            while (offset > 0 && delta < 0) {
              offset--;
              delta++;
              var ch = source.charCodeAt(offset);

              if (ch == $LF) {
                line--;
                var priorLine = source.substr(0, offset - 1).lastIndexOf(String.fromCharCode($LF));
                col = priorLine > 0 ? offset - priorLine : offset;
              } else {
                col--;
              }
            }

            while (offset < len && delta > 0) {
              var _ch = source.charCodeAt(offset);

              offset++;
              delta--;

              if (_ch == $LF) {
                line++;
                col = 0;
              } else {
                col++;
              }
            }

            return new ParseLocation(this.file, offset, line, col);
          } // Return the source around the location
          // Up to `maxChars` or `maxLines` on each side of the location

        }, {
          key: "getContext",
          value: function getContext(maxChars, maxLines) {
            var content = this.file.content;
            var startOffset = this.offset;

            if (startOffset != null) {
              if (startOffset > content.length - 1) {
                startOffset = content.length - 1;
              }

              var endOffset = startOffset;
              var ctxChars = 0;
              var ctxLines = 0;

              while (ctxChars < maxChars && startOffset > 0) {
                startOffset--;
                ctxChars++;

                if (content[startOffset] == '\n') {
                  if (++ctxLines == maxLines) {
                    break;
                  }
                }
              }

              ctxChars = 0;
              ctxLines = 0;

              while (ctxChars < maxChars && endOffset < content.length - 1) {
                endOffset++;
                ctxChars++;

                if (content[endOffset] == '\n') {
                  if (++ctxLines == maxLines) {
                    break;
                  }
                }
              }

              return {
                before: content.substring(startOffset, this.offset),
                after: content.substring(this.offset, endOffset + 1)
              };
            }

            return null;
          }
        }]);

        return ParseLocation;
      }();

      var ParseSourceFile = function ParseSourceFile(content, url) {
        _classCallCheck(this, ParseSourceFile);

        this.content = content;
        this.url = url;
      };

      var ParseSourceSpan = /*#__PURE__*/function () {
        /**
         * Create an object that holds information about spans of tokens/nodes captured during
         * lexing/parsing of text.
         *
         * @param start
         * The location of the start of the span (having skipped leading trivia).
         * Skipping leading trivia makes source-spans more "user friendly", since things like HTML
         * elements will appear to begin at the start of the opening tag, rather than at the start of any
         * leading trivia, which could include newlines.
         *
         * @param end
         * The location of the end of the span.
         *
         * @param fullStart
         * The start of the token without skipping the leading trivia.
         * This is used by tooling that splits tokens further, such as extracting Angular interpolations
         * from text tokens. Such tooling creates new source-spans relative to the original token's
         * source-span. If leading trivia characters have been skipped then the new source-spans may be
         * incorrectly offset.
         *
         * @param details
         * Additional information (such as identifier names) that should be associated with the span.
         */
        function ParseSourceSpan(start, end) {
          var fullStart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : start;
          var details = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;

          _classCallCheck(this, ParseSourceSpan);

          this.start = start;
          this.end = end;
          this.fullStart = fullStart;
          this.details = details;
        }

        _createClass2(ParseSourceSpan, [{
          key: "toString",
          value: function toString() {
            return this.start.file.content.substring(this.start.offset, this.end.offset);
          }
        }]);

        return ParseSourceSpan;
      }();

      var ParseErrorLevel;

      (function (ParseErrorLevel) {
        ParseErrorLevel[ParseErrorLevel["WARNING"] = 0] = "WARNING";
        ParseErrorLevel[ParseErrorLevel["ERROR"] = 1] = "ERROR";
      })(ParseErrorLevel || (ParseErrorLevel = {}));

      var ParseError = /*#__PURE__*/function () {
        function ParseError(span, msg) {
          var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ParseErrorLevel.ERROR;

          _classCallCheck(this, ParseError);

          this.span = span;
          this.msg = msg;
          this.level = level;
        }

        _createClass2(ParseError, [{
          key: "contextualMessage",
          value: function contextualMessage() {
            var ctx = this.span.start.getContext(100, 3);
            return ctx ? "".concat(this.msg, " (\"").concat(ctx.before, "[").concat(ParseErrorLevel[this.level], " ->]").concat(ctx.after, "\")") : this.msg;
          }
        }, {
          key: "toString",
          value: function toString() {
            var details = this.span.details ? ", ".concat(this.span.details) : '';
            return "".concat(this.contextualMessage(), ": ").concat(this.span.start).concat(details);
          }
        }]);

        return ParseError;
      }();

      function typeSourceSpan(kind, type) {
        var moduleUrl = identifierModuleUrl(type);
        var sourceFileName = moduleUrl != null ? "in ".concat(kind, " ").concat(identifierName(type), " in ").concat(moduleUrl) : "in ".concat(kind, " ").concat(identifierName(type));
        var sourceFile = new ParseSourceFile('', sourceFileName);
        return new ParseSourceSpan(new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1));
      }
      /**
       * Generates Source Span object for a given R3 Type for JIT mode.
       *
       * @param kind Component or Directive.
       * @param typeName name of the Component or Directive.
       * @param sourceUrl reference to Component or Directive source.
       * @returns instance of ParseSourceSpan that represent a given Component or Directive.
       */


      function r3JitTypeSourceSpan(kind, typeName, sourceUrl) {
        var sourceFileName = "in ".concat(kind, " ").concat(typeName, " in ").concat(sourceUrl);
        var sourceFile = new ParseSourceFile('', sourceFileName);
        return new ParseSourceSpan(new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Implementation of `CompileReflector` which resolves references to @angular/core
       * symbols at runtime, according to a consumer-provided mapping.
       *
       * Only supports `resolveExternalReference`, all other methods throw.
       */


      var R3JitReflector = /*#__PURE__*/function () {
        function R3JitReflector(context) {
          _classCallCheck(this, R3JitReflector);

          this.context = context;
        }

        _createClass2(R3JitReflector, [{
          key: "resolveExternalReference",
          value: function resolveExternalReference(ref) {
            // This reflector only handles @angular/core imports.
            if (ref.moduleName !== '@angular/core') {
              throw new Error("Cannot resolve external reference to ".concat(ref.moduleName, ", only references to @angular/core are supported."));
            }

            if (!this.context.hasOwnProperty(ref.name)) {
              throw new Error("No value provided for @angular/core symbol '".concat(ref.name, "'."));
            }

            return this.context[ref.name];
          }
        }, {
          key: "parameters",
          value: function parameters(typeOrFunc) {
            throw new Error('Not implemented.');
          }
        }, {
          key: "annotations",
          value: function annotations(typeOrFunc) {
            throw new Error('Not implemented.');
          }
        }, {
          key: "shallowAnnotations",
          value: function shallowAnnotations(typeOrFunc) {
            throw new Error('Not implemented.');
          }
        }, {
          key: "tryAnnotations",
          value: function tryAnnotations(typeOrFunc) {
            throw new Error('Not implemented.');
          }
        }, {
          key: "propMetadata",
          value: function propMetadata(typeOrFunc) {
            throw new Error('Not implemented.');
          }
        }, {
          key: "hasLifecycleHook",
          value: function hasLifecycleHook(type, lcProperty) {
            throw new Error('Not implemented.');
          }
        }, {
          key: "guards",
          value: function guards(typeOrFunc) {
            throw new Error('Not implemented.');
          }
        }, {
          key: "componentModuleUrl",
          value: function componentModuleUrl(type, cmpMetadata) {
            throw new Error('Not implemented.');
          }
        }]);

        return R3JitReflector;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function mapEntry(key, value) {
        return {
          key: key,
          value: value,
          quoted: false
        };
      }

      function mapLiteral(obj) {
        var quoted = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
        return literalMap(Object.keys(obj).map(function (key) {
          return {
            key: key,
            quoted: quoted,
            value: obj[key]
          };
        }));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Construct an `R3NgModuleDef` for the given `R3NgModuleMetadata`.
       */


      function _compileNgModule(meta) {
        var internalType = meta.internalType,
            moduleType = meta.type,
            bootstrap = meta.bootstrap,
            declarations = meta.declarations,
            imports = meta.imports,
            exports = meta.exports,
            schemas = meta.schemas,
            containsForwardDecls = meta.containsForwardDecls,
            emitInline = meta.emitInline,
            id = meta.id;
        var additionalStatements = [];
        var definitionMap = {
          type: internalType
        }; // Only generate the keys in the metadata if the arrays have values.

        if (bootstrap.length) {
          definitionMap.bootstrap = refsToArray(bootstrap, containsForwardDecls);
        } // If requested to emit scope information inline, pass the declarations, imports and exports to
        // the `ɵɵdefineNgModule` call. The JIT compilation uses this.


        if (emitInline) {
          if (declarations.length) {
            definitionMap.declarations = refsToArray(declarations, containsForwardDecls);
          }

          if (imports.length) {
            definitionMap.imports = refsToArray(imports, containsForwardDecls);
          }

          if (exports.length) {
            definitionMap.exports = refsToArray(exports, containsForwardDecls);
          }
        } // If not emitting inline, the scope information is not passed into `ɵɵdefineNgModule` as it would
        // prevent tree-shaking of the declarations, imports and exports references.
        else {
          var setNgModuleScopeCall = generateSetNgModuleScopeCall(meta);

          if (setNgModuleScopeCall !== null) {
            additionalStatements.push(setNgModuleScopeCall);
          }
        }

        if (schemas && schemas.length) {
          definitionMap.schemas = literalArr(schemas.map(function (ref) {
            return ref.value;
          }));
        }

        if (id) {
          definitionMap.id = id;
        }

        var expression = importExpr(Identifiers$1.defineNgModule).callFn([mapToMapExpression(definitionMap)]);
        var type = new ExpressionType(importExpr(Identifiers$1.NgModuleDefWithMeta, [new ExpressionType(moduleType.type), tupleTypeOf(declarations), tupleTypeOf(imports), tupleTypeOf(exports)]));
        return {
          expression: expression,
          type: type,
          additionalStatements: additionalStatements
        };
      }
      /**
       * Generates a function call to `ɵɵsetNgModuleScope` with all necessary information so that the
       * transitive module scope can be computed during runtime in JIT mode. This call is marked pure
       * such that the references to declarations, imports and exports may be elided causing these
       * symbols to become tree-shakeable.
       */


      function generateSetNgModuleScopeCall(meta) {
        var moduleType = meta.adjacentType,
            declarations = meta.declarations,
            imports = meta.imports,
            exports = meta.exports,
            containsForwardDecls = meta.containsForwardDecls;
        var scopeMap = {};

        if (declarations.length) {
          scopeMap.declarations = refsToArray(declarations, containsForwardDecls);
        }

        if (imports.length) {
          scopeMap.imports = refsToArray(imports, containsForwardDecls);
        }

        if (exports.length) {
          scopeMap.exports = refsToArray(exports, containsForwardDecls);
        }

        if (Object.keys(scopeMap).length === 0) {
          return null;
        } // setNgModuleScope(...)


        var fnCall = new InvokeFunctionExpr(
        /* fn */
        importExpr(Identifiers$1.setNgModuleScope),
        /* args */
        [moduleType, mapToMapExpression(scopeMap)]); // (ngJitMode guard) && setNgModuleScope(...)

        var guardedCall = jitOnlyGuardedExpression(fnCall); // function() { (ngJitMode guard) && setNgModuleScope(...); }

        var iife = new FunctionExpr(
        /* params */
        [],
        /* statements */
        [guardedCall.toStmt()]); // (function() { (ngJitMode guard) && setNgModuleScope(...); })()

        var iifeCall = new InvokeFunctionExpr(
        /* fn */
        iife,
        /* args */
        []);
        return iifeCall.toStmt();
      }

      function _compileInjector(meta) {
        var result = compileFactoryFunction({
          name: meta.name,
          type: meta.type,
          internalType: meta.internalType,
          typeArgumentCount: 0,
          deps: meta.deps,
          injectFn: Identifiers$1.inject,
          target: R3FactoryTarget.NgModule
        });
        var definitionMap = {
          factory: result.factory
        };

        if (meta.providers !== null) {
          definitionMap.providers = meta.providers;
        }

        if (meta.imports.length > 0) {
          definitionMap.imports = literalArr(meta.imports);
        }

        var expression = importExpr(Identifiers$1.defineInjector).callFn([mapToMapExpression(definitionMap)]);
        var type = new ExpressionType(importExpr(Identifiers$1.InjectorDef, [new ExpressionType(meta.type.type)]));
        return {
          expression: expression,
          type: type,
          statements: result.statements
        };
      } // TODO(alxhub): integrate this with `compileNgModule`. Currently the two are separate operations.


      function compileNgModuleFromRender2(ctx, ngModule, injectableCompiler) {
        var className = identifierName(ngModule.type);
        var rawImports = ngModule.rawImports ? [ngModule.rawImports] : [];
        var rawExports = ngModule.rawExports ? [ngModule.rawExports] : [];
        var injectorDefArg = mapLiteral({
          'factory': injectableCompiler.factoryFor({
            type: ngModule.type,
            symbol: ngModule.type.reference
          }, ctx),
          'providers': convertMetaToOutput(ngModule.rawProviders, ctx),
          'imports': convertMetaToOutput([].concat(rawImports, rawExports), ctx)
        });
        var injectorDef = importExpr(Identifiers$1.defineInjector).callFn([injectorDefArg]);
        ctx.statements.push(new ClassStmt(
        /* name */
        className,
        /* parent */
        null,
        /* fields */
        [new ClassField(
        /* name */
        'ɵinj',
        /* type */
        INFERRED_TYPE,
        /* modifiers */
        [StmtModifier.Static],
        /* initializer */
        injectorDef)],
        /* getters */
        [],
        /* constructorMethod */
        new ClassMethod(null, [], []),
        /* methods */
        []));
      }

      function accessExportScope(module) {
        var selectorScope = new ReadPropExpr(module, 'ɵmod');
        return new ReadPropExpr(selectorScope, 'exported');
      }

      function tupleTypeOf(exp) {
        var types = exp.map(function (ref) {
          return typeofExpr(ref.type);
        });
        return exp.length > 0 ? expressionType(literalArr(types)) : NONE_TYPE;
      }

      function refsToArray(refs, shouldForwardDeclare) {
        var values = literalArr(refs.map(function (ref) {
          return ref.value;
        }));
        return shouldForwardDeclare ? fn([], [new ReturnStatement(values)]) : values;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function compilePipeFromMetadata(metadata) {
        var definitionMapValues = []; // e.g. `name: 'myPipe'`

        definitionMapValues.push({
          key: 'name',
          value: literal(metadata.pipeName),
          quoted: false
        }); // e.g. `type: MyPipe`

        definitionMapValues.push({
          key: 'type',
          value: metadata.type.value,
          quoted: false
        }); // e.g. `pure: true`

        definitionMapValues.push({
          key: 'pure',
          value: literal(metadata.pure),
          quoted: false
        });
        var expression = importExpr(Identifiers$1.definePipe).callFn([literalMap(definitionMapValues)]);
        var type = new ExpressionType(importExpr(Identifiers$1.PipeDefWithMeta, [typeWithParameters(metadata.type.type, metadata.typeArgumentCount), new ExpressionType(new LiteralExpr(metadata.pipeName))]));
        return {
          expression: expression,
          type: type
        };
      }
      /**
       * Write a pipe definition to the output context.
       */


      function compilePipeFromRender2(outputCtx, pipe, reflector) {
        var name = identifierName(pipe.type);

        if (!name) {
          return error("Cannot resolve the name of ".concat(pipe.type));
        }

        var type = outputCtx.importExpr(pipe.type.reference);
        var metadata = {
          name: name,
          type: wrapReference(type),
          internalType: type,
          pipeName: pipe.name,
          typeArgumentCount: 0,
          deps: dependenciesFromGlobalMetadata(pipe.type, outputCtx, reflector),
          pure: pipe.pure
        };
        var res = compilePipeFromMetadata(metadata);
        var factoryRes = compileFactoryFunction(Object.assign(Object.assign({}, metadata), {
          injectFn: Identifiers$1.directiveInject,
          target: R3FactoryTarget.Pipe
        }));
        var definitionField = outputCtx.constantPool.propertyNameOf(3
        /* Pipe */
        );
        var ngFactoryDefStatement = new ClassStmt(
        /* name */
        name,
        /* parent */
        null,
        /* fields */
        [new ClassField(
        /* name */
        'ɵfac',
        /* type */
        INFERRED_TYPE,
        /* modifiers */
        [StmtModifier.Static],
        /* initializer */
        factoryRes.factory)],
        /* getters */
        [],
        /* constructorMethod */
        new ClassMethod(null, [], []),
        /* methods */
        []);
        var pipeDefStatement = new ClassStmt(
        /* name */
        name,
        /* parent */
        null,
        /* fields */
        [new ClassField(
        /* name */
        definitionField,
        /* type */
        INFERRED_TYPE,
        /* modifiers */
        [StmtModifier.Static],
        /* initializer */
        res.expression)],
        /* getters */
        [],
        /* constructorMethod */
        new ClassMethod(null, [], []),
        /* methods */
        []);
        outputCtx.statements.push(ngFactoryDefStatement, pipeDefStatement);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ParserError = function ParserError(message, input, errLocation, ctxLocation) {
        _classCallCheck(this, ParserError);

        this.input = input;
        this.errLocation = errLocation;
        this.ctxLocation = ctxLocation;
        this.message = "Parser Error: ".concat(message, " ").concat(errLocation, " [").concat(input, "] in ").concat(ctxLocation);
      };

      var ParseSpan = /*#__PURE__*/function () {
        function ParseSpan(start, end) {
          _classCallCheck(this, ParseSpan);

          this.start = start;
          this.end = end;
        }

        _createClass2(ParseSpan, [{
          key: "toAbsolute",
          value: function toAbsolute(absoluteOffset) {
            return new AbsoluteSourceSpan(absoluteOffset + this.start, absoluteOffset + this.end);
          }
        }]);

        return ParseSpan;
      }();

      var AST = /*#__PURE__*/function () {
        function AST(span,
        /**
         * Absolute location of the expression AST in a source code file.
         */
        sourceSpan) {
          _classCallCheck(this, AST);

          this.span = span;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(AST, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return null;
          }
        }, {
          key: "toString",
          value: function toString() {
            return 'AST';
          }
        }]);

        return AST;
      }();

      var ASTWithName = /*#__PURE__*/function (_AST) {
        _inherits(ASTWithName, _AST);

        var _super59 = _createSuper(ASTWithName);

        function ASTWithName(span, sourceSpan, nameSpan) {
          var _this92;

          _classCallCheck(this, ASTWithName);

          _this92 = _super59.call(this, span, sourceSpan);
          _this92.nameSpan = nameSpan;
          return _this92;
        }

        return ASTWithName;
      }(AST);
      /**
       * Represents a quoted expression of the form:
       *
       * quote = prefix `:` uninterpretedExpression
       * prefix = identifier
       * uninterpretedExpression = arbitrary string
       *
       * A quoted expression is meant to be pre-processed by an AST transformer that
       * converts it into another AST that no longer contains quoted expressions.
       * It is meant to allow third-party developers to extend Angular template
       * expression language. The `uninterpretedExpression` part of the quote is
       * therefore not interpreted by the Angular's own expression parser.
       */


      var Quote = /*#__PURE__*/function (_AST2) {
        _inherits(Quote, _AST2);

        var _super60 = _createSuper(Quote);

        function Quote(span, sourceSpan, prefix, uninterpretedExpression, location) {
          var _this93;

          _classCallCheck(this, Quote);

          _this93 = _super60.call(this, span, sourceSpan);
          _this93.prefix = prefix;
          _this93.uninterpretedExpression = uninterpretedExpression;
          _this93.location = location;
          return _this93;
        }

        _createClass2(Quote, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitQuote(this, context);
          }
        }, {
          key: "toString",
          value: function toString() {
            return 'Quote';
          }
        }]);

        return Quote;
      }(AST);

      var EmptyExpr = /*#__PURE__*/function (_AST3) {
        _inherits(EmptyExpr, _AST3);

        var _super61 = _createSuper(EmptyExpr);

        function EmptyExpr() {
          _classCallCheck(this, EmptyExpr);

          return _super61.apply(this, arguments);
        }

        _createClass2(EmptyExpr, [{
          key: "visit",
          value: function visit(visitor) {// do nothing

            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
          }
        }]);

        return EmptyExpr;
      }(AST);

      var ImplicitReceiver = /*#__PURE__*/function (_AST4) {
        _inherits(ImplicitReceiver, _AST4);

        var _super62 = _createSuper(ImplicitReceiver);

        function ImplicitReceiver() {
          _classCallCheck(this, ImplicitReceiver);

          return _super62.apply(this, arguments);
        }

        _createClass2(ImplicitReceiver, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitImplicitReceiver(this, context);
          }
        }]);

        return ImplicitReceiver;
      }(AST);
      /**
       * Receiver when something is accessed through `this` (e.g. `this.foo`). Note that this class
       * inherits from `ImplicitReceiver`, because accessing something through `this` is treated the
       * same as accessing it implicitly inside of an Angular template (e.g. `[attr.title]="this.title"`
       * is the same as `[attr.title]="title"`.). Inheriting allows for the `this` accesses to be treated
       * the same as implicit ones, except for a couple of exceptions like `$event` and `$any`.
       * TODO: we should find a way for this class not to extend from `ImplicitReceiver` in the future.
       */


      var ThisReceiver = /*#__PURE__*/function (_ImplicitReceiver) {
        _inherits(ThisReceiver, _ImplicitReceiver);

        var _super63 = _createSuper(ThisReceiver);

        function ThisReceiver() {
          _classCallCheck(this, ThisReceiver);

          return _super63.apply(this, arguments);
        }

        _createClass2(ThisReceiver, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

            var _a;

            return (_a = visitor.visitThisReceiver) === null || _a === void 0 ? void 0 : _a.call(visitor, this, context);
          }
        }]);

        return ThisReceiver;
      }(ImplicitReceiver);
      /**
       * Multiple expressions separated by a semicolon.
       */


      var Chain = /*#__PURE__*/function (_AST5) {
        _inherits(Chain, _AST5);

        var _super64 = _createSuper(Chain);

        function Chain(span, sourceSpan, expressions) {
          var _this94;

          _classCallCheck(this, Chain);

          _this94 = _super64.call(this, span, sourceSpan);
          _this94.expressions = expressions;
          return _this94;
        }

        _createClass2(Chain, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitChain(this, context);
          }
        }]);

        return Chain;
      }(AST);

      var Conditional = /*#__PURE__*/function (_AST6) {
        _inherits(Conditional, _AST6);

        var _super65 = _createSuper(Conditional);

        function Conditional(span, sourceSpan, condition, trueExp, falseExp) {
          var _this95;

          _classCallCheck(this, Conditional);

          _this95 = _super65.call(this, span, sourceSpan);
          _this95.condition = condition;
          _this95.trueExp = trueExp;
          _this95.falseExp = falseExp;
          return _this95;
        }

        _createClass2(Conditional, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitConditional(this, context);
          }
        }]);

        return Conditional;
      }(AST);

      var PropertyRead = /*#__PURE__*/function (_ASTWithName) {
        _inherits(PropertyRead, _ASTWithName);

        var _super66 = _createSuper(PropertyRead);

        function PropertyRead(span, sourceSpan, nameSpan, receiver, name) {
          var _this96;

          _classCallCheck(this, PropertyRead);

          _this96 = _super66.call(this, span, sourceSpan, nameSpan);
          _this96.receiver = receiver;
          _this96.name = name;
          return _this96;
        }

        _createClass2(PropertyRead, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitPropertyRead(this, context);
          }
        }]);

        return PropertyRead;
      }(ASTWithName);

      var PropertyWrite = /*#__PURE__*/function (_ASTWithName2) {
        _inherits(PropertyWrite, _ASTWithName2);

        var _super67 = _createSuper(PropertyWrite);

        function PropertyWrite(span, sourceSpan, nameSpan, receiver, name, value) {
          var _this97;

          _classCallCheck(this, PropertyWrite);

          _this97 = _super67.call(this, span, sourceSpan, nameSpan);
          _this97.receiver = receiver;
          _this97.name = name;
          _this97.value = value;
          return _this97;
        }

        _createClass2(PropertyWrite, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitPropertyWrite(this, context);
          }
        }]);

        return PropertyWrite;
      }(ASTWithName);

      var SafePropertyRead = /*#__PURE__*/function (_ASTWithName3) {
        _inherits(SafePropertyRead, _ASTWithName3);

        var _super68 = _createSuper(SafePropertyRead);

        function SafePropertyRead(span, sourceSpan, nameSpan, receiver, name) {
          var _this98;

          _classCallCheck(this, SafePropertyRead);

          _this98 = _super68.call(this, span, sourceSpan, nameSpan);
          _this98.receiver = receiver;
          _this98.name = name;
          return _this98;
        }

        _createClass2(SafePropertyRead, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitSafePropertyRead(this, context);
          }
        }]);

        return SafePropertyRead;
      }(ASTWithName);

      var KeyedRead = /*#__PURE__*/function (_AST7) {
        _inherits(KeyedRead, _AST7);

        var _super69 = _createSuper(KeyedRead);

        function KeyedRead(span, sourceSpan, obj, key) {
          var _this99;

          _classCallCheck(this, KeyedRead);

          _this99 = _super69.call(this, span, sourceSpan);
          _this99.obj = obj;
          _this99.key = key;
          return _this99;
        }

        _createClass2(KeyedRead, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitKeyedRead(this, context);
          }
        }]);

        return KeyedRead;
      }(AST);

      var KeyedWrite = /*#__PURE__*/function (_AST8) {
        _inherits(KeyedWrite, _AST8);

        var _super70 = _createSuper(KeyedWrite);

        function KeyedWrite(span, sourceSpan, obj, key, value) {
          var _this100;

          _classCallCheck(this, KeyedWrite);

          _this100 = _super70.call(this, span, sourceSpan);
          _this100.obj = obj;
          _this100.key = key;
          _this100.value = value;
          return _this100;
        }

        _createClass2(KeyedWrite, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitKeyedWrite(this, context);
          }
        }]);

        return KeyedWrite;
      }(AST);

      var BindingPipe = /*#__PURE__*/function (_ASTWithName4) {
        _inherits(BindingPipe, _ASTWithName4);

        var _super71 = _createSuper(BindingPipe);

        function BindingPipe(span, sourceSpan, exp, name, args, nameSpan) {
          var _this101;

          _classCallCheck(this, BindingPipe);

          _this101 = _super71.call(this, span, sourceSpan, nameSpan);
          _this101.exp = exp;
          _this101.name = name;
          _this101.args = args;
          return _this101;
        }

        _createClass2(BindingPipe, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitPipe(this, context);
          }
        }]);

        return BindingPipe;
      }(ASTWithName);

      var LiteralPrimitive = /*#__PURE__*/function (_AST9) {
        _inherits(LiteralPrimitive, _AST9);

        var _super72 = _createSuper(LiteralPrimitive);

        function LiteralPrimitive(span, sourceSpan, value) {
          var _this102;

          _classCallCheck(this, LiteralPrimitive);

          _this102 = _super72.call(this, span, sourceSpan);
          _this102.value = value;
          return _this102;
        }

        _createClass2(LiteralPrimitive, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitLiteralPrimitive(this, context);
          }
        }]);

        return LiteralPrimitive;
      }(AST);

      var LiteralArray = /*#__PURE__*/function (_AST10) {
        _inherits(LiteralArray, _AST10);

        var _super73 = _createSuper(LiteralArray);

        function LiteralArray(span, sourceSpan, expressions) {
          var _this103;

          _classCallCheck(this, LiteralArray);

          _this103 = _super73.call(this, span, sourceSpan);
          _this103.expressions = expressions;
          return _this103;
        }

        _createClass2(LiteralArray, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitLiteralArray(this, context);
          }
        }]);

        return LiteralArray;
      }(AST);

      var LiteralMap = /*#__PURE__*/function (_AST11) {
        _inherits(LiteralMap, _AST11);

        var _super74 = _createSuper(LiteralMap);

        function LiteralMap(span, sourceSpan, keys, values) {
          var _this104;

          _classCallCheck(this, LiteralMap);

          _this104 = _super74.call(this, span, sourceSpan);
          _this104.keys = keys;
          _this104.values = values;
          return _this104;
        }

        _createClass2(LiteralMap, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitLiteralMap(this, context);
          }
        }]);

        return LiteralMap;
      }(AST);

      var Interpolation = /*#__PURE__*/function (_AST12) {
        _inherits(Interpolation, _AST12);

        var _super75 = _createSuper(Interpolation);

        function Interpolation(span, sourceSpan, strings, expressions) {
          var _this105;

          _classCallCheck(this, Interpolation);

          _this105 = _super75.call(this, span, sourceSpan);
          _this105.strings = strings;
          _this105.expressions = expressions;
          return _this105;
        }

        _createClass2(Interpolation, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitInterpolation(this, context);
          }
        }]);

        return Interpolation;
      }(AST);

      var Binary = /*#__PURE__*/function (_AST13) {
        _inherits(Binary, _AST13);

        var _super76 = _createSuper(Binary);

        function Binary(span, sourceSpan, operation, left, right) {
          var _this106;

          _classCallCheck(this, Binary);

          _this106 = _super76.call(this, span, sourceSpan);
          _this106.operation = operation;
          _this106.left = left;
          _this106.right = right;
          return _this106;
        }

        _createClass2(Binary, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitBinary(this, context);
          }
        }]);

        return Binary;
      }(AST);
      /**
       * For backwards compatibility reasons, `Unary` inherits from `Binary` and mimics the binary AST
       * node that was originally used. This inheritance relation can be deleted in some future major,
       * after consumers have been given a chance to fully support Unary.
       */


      var Unary = /*#__PURE__*/function (_Binary) {
        _inherits(Unary, _Binary);

        var _super77 = _createSuper(Unary);

        /**
         * During the deprecation period this constructor is private, to avoid consumers from creating
         * a `Unary` with the fallback properties for `Binary`.
         */
        function Unary(span, sourceSpan, operator, expr, binaryOp, binaryLeft, binaryRight) {
          var _this107;

          _classCallCheck(this, Unary);

          _this107 = _super77.call(this, span, sourceSpan, binaryOp, binaryLeft, binaryRight);
          _this107.operator = operator;
          _this107.expr = expr;
          return _this107;
        }
        /**
         * Creates a unary minus expression "-x", represented as `Binary` using "0 - x".
         */


        _createClass2(Unary, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

            if (visitor.visitUnary !== undefined) {
              return visitor.visitUnary(this, context);
            }

            return visitor.visitBinary(this, context);
          }
        }], [{
          key: "createMinus",
          value: function createMinus(span, sourceSpan, expr) {
            return new Unary(span, sourceSpan, '-', expr, '-', new LiteralPrimitive(span, sourceSpan, 0), expr);
          }
          /**
           * Creates a unary plus expression "+x", represented as `Binary` using "x - 0".
           */

        }, {
          key: "createPlus",
          value: function createPlus(span, sourceSpan, expr) {
            return new Unary(span, sourceSpan, '+', expr, '-', expr, new LiteralPrimitive(span, sourceSpan, 0));
          }
        }]);

        return Unary;
      }(Binary);

      var PrefixNot = /*#__PURE__*/function (_AST14) {
        _inherits(PrefixNot, _AST14);

        var _super78 = _createSuper(PrefixNot);

        function PrefixNot(span, sourceSpan, expression) {
          var _this108;

          _classCallCheck(this, PrefixNot);

          _this108 = _super78.call(this, span, sourceSpan);
          _this108.expression = expression;
          return _this108;
        }

        _createClass2(PrefixNot, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitPrefixNot(this, context);
          }
        }]);

        return PrefixNot;
      }(AST);

      var NonNullAssert = /*#__PURE__*/function (_AST15) {
        _inherits(NonNullAssert, _AST15);

        var _super79 = _createSuper(NonNullAssert);

        function NonNullAssert(span, sourceSpan, expression) {
          var _this109;

          _classCallCheck(this, NonNullAssert);

          _this109 = _super79.call(this, span, sourceSpan);
          _this109.expression = expression;
          return _this109;
        }

        _createClass2(NonNullAssert, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitNonNullAssert(this, context);
          }
        }]);

        return NonNullAssert;
      }(AST);

      var MethodCall = /*#__PURE__*/function (_ASTWithName5) {
        _inherits(MethodCall, _ASTWithName5);

        var _super80 = _createSuper(MethodCall);

        function MethodCall(span, sourceSpan, nameSpan, receiver, name, args) {
          var _this110;

          _classCallCheck(this, MethodCall);

          _this110 = _super80.call(this, span, sourceSpan, nameSpan);
          _this110.receiver = receiver;
          _this110.name = name;
          _this110.args = args;
          return _this110;
        }

        _createClass2(MethodCall, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitMethodCall(this, context);
          }
        }]);

        return MethodCall;
      }(ASTWithName);

      var SafeMethodCall = /*#__PURE__*/function (_ASTWithName6) {
        _inherits(SafeMethodCall, _ASTWithName6);

        var _super81 = _createSuper(SafeMethodCall);

        function SafeMethodCall(span, sourceSpan, nameSpan, receiver, name, args) {
          var _this111;

          _classCallCheck(this, SafeMethodCall);

          _this111 = _super81.call(this, span, sourceSpan, nameSpan);
          _this111.receiver = receiver;
          _this111.name = name;
          _this111.args = args;
          return _this111;
        }

        _createClass2(SafeMethodCall, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitSafeMethodCall(this, context);
          }
        }]);

        return SafeMethodCall;
      }(ASTWithName);

      var FunctionCall = /*#__PURE__*/function (_AST16) {
        _inherits(FunctionCall, _AST16);

        var _super82 = _createSuper(FunctionCall);

        function FunctionCall(span, sourceSpan, target, args) {
          var _this112;

          _classCallCheck(this, FunctionCall);

          _this112 = _super82.call(this, span, sourceSpan);
          _this112.target = target;
          _this112.args = args;
          return _this112;
        }

        _createClass2(FunctionCall, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            return visitor.visitFunctionCall(this, context);
          }
        }]);

        return FunctionCall;
      }(AST);
      /**
       * Records the absolute position of a text span in a source file, where `start` and `end` are the
       * starting and ending byte offsets, respectively, of the text span in a source file.
       */


      var AbsoluteSourceSpan = function AbsoluteSourceSpan(start, end) {
        _classCallCheck(this, AbsoluteSourceSpan);

        this.start = start;
        this.end = end;
      };

      var ASTWithSource = /*#__PURE__*/function (_AST17) {
        _inherits(ASTWithSource, _AST17);

        var _super83 = _createSuper(ASTWithSource);

        function ASTWithSource(ast, source, location, absoluteOffset, errors) {
          var _this113;

          _classCallCheck(this, ASTWithSource);

          _this113 = _super83.call(this, new ParseSpan(0, source === null ? 0 : source.length), new AbsoluteSourceSpan(absoluteOffset, source === null ? absoluteOffset : absoluteOffset + source.length));
          _this113.ast = ast;
          _this113.source = source;
          _this113.location = location;
          _this113.errors = errors;
          return _this113;
        }

        _createClass2(ASTWithSource, [{
          key: "visit",
          value: function visit(visitor) {
            var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

            if (visitor.visitASTWithSource) {
              return visitor.visitASTWithSource(this, context);
            }

            return this.ast.visit(visitor, context);
          }
        }, {
          key: "toString",
          value: function toString() {
            return "".concat(this.source, " in ").concat(this.location);
          }
        }]);

        return ASTWithSource;
      }(AST);

      var VariableBinding =
      /**
       * @param sourceSpan entire span of the binding.
       * @param key name of the LHS along with its span.
       * @param value optional value for the RHS along with its span.
       */
      function VariableBinding(sourceSpan, key, value) {
        _classCallCheck(this, VariableBinding);

        this.sourceSpan = sourceSpan;
        this.key = key;
        this.value = value;
      };

      var ExpressionBinding =
      /**
       * @param sourceSpan entire span of the binding.
       * @param key binding name, like ngForOf, ngForTrackBy, ngIf, along with its
       * span. Note that the length of the span may not be the same as
       * `key.source.length`. For example,
       * 1. key.source = ngFor, key.span is for "ngFor"
       * 2. key.source = ngForOf, key.span is for "of"
       * 3. key.source = ngForTrackBy, key.span is for "trackBy"
       * @param value optional expression for the RHS.
       */
      function ExpressionBinding(sourceSpan, key, value) {
        _classCallCheck(this, ExpressionBinding);

        this.sourceSpan = sourceSpan;
        this.key = key;
        this.value = value;
      };

      var RecursiveAstVisitor$1 = /*#__PURE__*/function () {
        function RecursiveAstVisitor$1() {
          _classCallCheck(this, RecursiveAstVisitor$1);
        }

        _createClass2(RecursiveAstVisitor$1, [{
          key: "visit",
          value: function visit(ast, context) {
            // The default implementation just visits every node.
            // Classes that extend RecursiveAstVisitor should override this function
            // to selectively visit the specified node.
            ast.visit(this, context);
          }
        }, {
          key: "visitUnary",
          value: function visitUnary(ast, context) {
            this.visit(ast.expr, context);
          }
        }, {
          key: "visitBinary",
          value: function visitBinary(ast, context) {
            this.visit(ast.left, context);
            this.visit(ast.right, context);
          }
        }, {
          key: "visitChain",
          value: function visitChain(ast, context) {
            this.visitAll(ast.expressions, context);
          }
        }, {
          key: "visitConditional",
          value: function visitConditional(ast, context) {
            this.visit(ast.condition, context);
            this.visit(ast.trueExp, context);
            this.visit(ast.falseExp, context);
          }
        }, {
          key: "visitPipe",
          value: function visitPipe(ast, context) {
            this.visit(ast.exp, context);
            this.visitAll(ast.args, context);
          }
        }, {
          key: "visitFunctionCall",
          value: function visitFunctionCall(ast, context) {
            if (ast.target) {
              this.visit(ast.target, context);
            }

            this.visitAll(ast.args, context);
          }
        }, {
          key: "visitImplicitReceiver",
          value: function visitImplicitReceiver(ast, context) {}
        }, {
          key: "visitThisReceiver",
          value: function visitThisReceiver(ast, context) {}
        }, {
          key: "visitInterpolation",
          value: function visitInterpolation(ast, context) {
            this.visitAll(ast.expressions, context);
          }
        }, {
          key: "visitKeyedRead",
          value: function visitKeyedRead(ast, context) {
            this.visit(ast.obj, context);
            this.visit(ast.key, context);
          }
        }, {
          key: "visitKeyedWrite",
          value: function visitKeyedWrite(ast, context) {
            this.visit(ast.obj, context);
            this.visit(ast.key, context);
            this.visit(ast.value, context);
          }
        }, {
          key: "visitLiteralArray",
          value: function visitLiteralArray(ast, context) {
            this.visitAll(ast.expressions, context);
          }
        }, {
          key: "visitLiteralMap",
          value: function visitLiteralMap(ast, context) {
            this.visitAll(ast.values, context);
          }
        }, {
          key: "visitLiteralPrimitive",
          value: function visitLiteralPrimitive(ast, context) {}
        }, {
          key: "visitMethodCall",
          value: function visitMethodCall(ast, context) {
            this.visit(ast.receiver, context);
            this.visitAll(ast.args, context);
          }
        }, {
          key: "visitPrefixNot",
          value: function visitPrefixNot(ast, context) {
            this.visit(ast.expression, context);
          }
        }, {
          key: "visitNonNullAssert",
          value: function visitNonNullAssert(ast, context) {
            this.visit(ast.expression, context);
          }
        }, {
          key: "visitPropertyRead",
          value: function visitPropertyRead(ast, context) {
            this.visit(ast.receiver, context);
          }
        }, {
          key: "visitPropertyWrite",
          value: function visitPropertyWrite(ast, context) {
            this.visit(ast.receiver, context);
            this.visit(ast.value, context);
          }
        }, {
          key: "visitSafePropertyRead",
          value: function visitSafePropertyRead(ast, context) {
            this.visit(ast.receiver, context);
          }
        }, {
          key: "visitSafeMethodCall",
          value: function visitSafeMethodCall(ast, context) {
            this.visit(ast.receiver, context);
            this.visitAll(ast.args, context);
          }
        }, {
          key: "visitQuote",
          value: function visitQuote(ast, context) {} // This is not part of the AstVisitor interface, just a helper method

        }, {
          key: "visitAll",
          value: function visitAll(asts, context) {
            var _iterator8 = _createForOfIteratorHelper(asts),
                _step8;

            try {
              for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
                var ast = _step8.value;
                this.visit(ast, context);
              }
            } catch (err) {
              _iterator8.e(err);
            } finally {
              _iterator8.f();
            }
          }
        }]);

        return RecursiveAstVisitor$1;
      }();

      var AstTransformer$1 = /*#__PURE__*/function () {
        function AstTransformer$1() {
          _classCallCheck(this, AstTransformer$1);
        }

        _createClass2(AstTransformer$1, [{
          key: "visitImplicitReceiver",
          value: function visitImplicitReceiver(ast, context) {
            return ast;
          }
        }, {
          key: "visitThisReceiver",
          value: function visitThisReceiver(ast, context) {
            return ast;
          }
        }, {
          key: "visitInterpolation",
          value: function visitInterpolation(ast, context) {
            return new Interpolation(ast.span, ast.sourceSpan, ast.strings, this.visitAll(ast.expressions));
          }
        }, {
          key: "visitLiteralPrimitive",
          value: function visitLiteralPrimitive(ast, context) {
            return new LiteralPrimitive(ast.span, ast.sourceSpan, ast.value);
          }
        }, {
          key: "visitPropertyRead",
          value: function visitPropertyRead(ast, context) {
            return new PropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name);
          }
        }, {
          key: "visitPropertyWrite",
          value: function visitPropertyWrite(ast, context) {
            return new PropertyWrite(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name, ast.value.visit(this));
          }
        }, {
          key: "visitSafePropertyRead",
          value: function visitSafePropertyRead(ast, context) {
            return new SafePropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name);
          }
        }, {
          key: "visitMethodCall",
          value: function visitMethodCall(ast, context) {
            return new MethodCall(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name, this.visitAll(ast.args));
          }
        }, {
          key: "visitSafeMethodCall",
          value: function visitSafeMethodCall(ast, context) {
            return new SafeMethodCall(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name, this.visitAll(ast.args));
          }
        }, {
          key: "visitFunctionCall",
          value: function visitFunctionCall(ast, context) {
            return new FunctionCall(ast.span, ast.sourceSpan, ast.target.visit(this), this.visitAll(ast.args));
          }
        }, {
          key: "visitLiteralArray",
          value: function visitLiteralArray(ast, context) {
            return new LiteralArray(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));
          }
        }, {
          key: "visitLiteralMap",
          value: function visitLiteralMap(ast, context) {
            return new LiteralMap(ast.span, ast.sourceSpan, ast.keys, this.visitAll(ast.values));
          }
        }, {
          key: "visitUnary",
          value: function visitUnary(ast, context) {
            switch (ast.operator) {
              case '+':
                return Unary.createPlus(ast.span, ast.sourceSpan, ast.expr.visit(this));

              case '-':
                return Unary.createMinus(ast.span, ast.sourceSpan, ast.expr.visit(this));

              default:
                throw new Error("Unknown unary operator ".concat(ast.operator));
            }
          }
        }, {
          key: "visitBinary",
          value: function visitBinary(ast, context) {
            return new Binary(ast.span, ast.sourceSpan, ast.operation, ast.left.visit(this), ast.right.visit(this));
          }
        }, {
          key: "visitPrefixNot",
          value: function visitPrefixNot(ast, context) {
            return new PrefixNot(ast.span, ast.sourceSpan, ast.expression.visit(this));
          }
        }, {
          key: "visitNonNullAssert",
          value: function visitNonNullAssert(ast, context) {
            return new NonNullAssert(ast.span, ast.sourceSpan, ast.expression.visit(this));
          }
        }, {
          key: "visitConditional",
          value: function visitConditional(ast, context) {
            return new Conditional(ast.span, ast.sourceSpan, ast.condition.visit(this), ast.trueExp.visit(this), ast.falseExp.visit(this));
          }
        }, {
          key: "visitPipe",
          value: function visitPipe(ast, context) {
            return new BindingPipe(ast.span, ast.sourceSpan, ast.exp.visit(this), ast.name, this.visitAll(ast.args), ast.nameSpan);
          }
        }, {
          key: "visitKeyedRead",
          value: function visitKeyedRead(ast, context) {
            return new KeyedRead(ast.span, ast.sourceSpan, ast.obj.visit(this), ast.key.visit(this));
          }
        }, {
          key: "visitKeyedWrite",
          value: function visitKeyedWrite(ast, context) {
            return new KeyedWrite(ast.span, ast.sourceSpan, ast.obj.visit(this), ast.key.visit(this), ast.value.visit(this));
          }
        }, {
          key: "visitAll",
          value: function visitAll(asts) {
            var res = [];

            for (var i = 0; i < asts.length; ++i) {
              res[i] = asts[i].visit(this);
            }

            return res;
          }
        }, {
          key: "visitChain",
          value: function visitChain(ast, context) {
            return new Chain(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));
          }
        }, {
          key: "visitQuote",
          value: function visitQuote(ast, context) {
            return new Quote(ast.span, ast.sourceSpan, ast.prefix, ast.uninterpretedExpression, ast.location);
          }
        }]);

        return AstTransformer$1;
      }(); // A transformer that only creates new nodes if the transformer makes a change or
      // a change is made a child node.


      var AstMemoryEfficientTransformer = /*#__PURE__*/function () {
        function AstMemoryEfficientTransformer() {
          _classCallCheck(this, AstMemoryEfficientTransformer);
        }

        _createClass2(AstMemoryEfficientTransformer, [{
          key: "visitImplicitReceiver",
          value: function visitImplicitReceiver(ast, context) {
            return ast;
          }
        }, {
          key: "visitThisReceiver",
          value: function visitThisReceiver(ast, context) {
            return ast;
          }
        }, {
          key: "visitInterpolation",
          value: function visitInterpolation(ast, context) {
            var expressions = this.visitAll(ast.expressions);
            if (expressions !== ast.expressions) return new Interpolation(ast.span, ast.sourceSpan, ast.strings, expressions);
            return ast;
          }
        }, {
          key: "visitLiteralPrimitive",
          value: function visitLiteralPrimitive(ast, context) {
            return ast;
          }
        }, {
          key: "visitPropertyRead",
          value: function visitPropertyRead(ast, context) {
            var receiver = ast.receiver.visit(this);

            if (receiver !== ast.receiver) {
              return new PropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name);
            }

            return ast;
          }
        }, {
          key: "visitPropertyWrite",
          value: function visitPropertyWrite(ast, context) {
            var receiver = ast.receiver.visit(this);
            var value = ast.value.visit(this);

            if (receiver !== ast.receiver || value !== ast.value) {
              return new PropertyWrite(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name, value);
            }

            return ast;
          }
        }, {
          key: "visitSafePropertyRead",
          value: function visitSafePropertyRead(ast, context) {
            var receiver = ast.receiver.visit(this);

            if (receiver !== ast.receiver) {
              return new SafePropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name);
            }

            return ast;
          }
        }, {
          key: "visitMethodCall",
          value: function visitMethodCall(ast, context) {
            var receiver = ast.receiver.visit(this);
            var args = this.visitAll(ast.args);

            if (receiver !== ast.receiver || args !== ast.args) {
              return new MethodCall(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name, args);
            }

            return ast;
          }
        }, {
          key: "visitSafeMethodCall",
          value: function visitSafeMethodCall(ast, context) {
            var receiver = ast.receiver.visit(this);
            var args = this.visitAll(ast.args);

            if (receiver !== ast.receiver || args !== ast.args) {
              return new SafeMethodCall(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name, args);
            }

            return ast;
          }
        }, {
          key: "visitFunctionCall",
          value: function visitFunctionCall(ast, context) {
            var target = ast.target && ast.target.visit(this);
            var args = this.visitAll(ast.args);

            if (target !== ast.target || args !== ast.args) {
              return new FunctionCall(ast.span, ast.sourceSpan, target, args);
            }

            return ast;
          }
        }, {
          key: "visitLiteralArray",
          value: function visitLiteralArray(ast, context) {
            var expressions = this.visitAll(ast.expressions);

            if (expressions !== ast.expressions) {
              return new LiteralArray(ast.span, ast.sourceSpan, expressions);
            }

            return ast;
          }
        }, {
          key: "visitLiteralMap",
          value: function visitLiteralMap(ast, context) {
            var values = this.visitAll(ast.values);

            if (values !== ast.values) {
              return new LiteralMap(ast.span, ast.sourceSpan, ast.keys, values);
            }

            return ast;
          }
        }, {
          key: "visitUnary",
          value: function visitUnary(ast, context) {
            var expr = ast.expr.visit(this);

            if (expr !== ast.expr) {
              switch (ast.operator) {
                case '+':
                  return Unary.createPlus(ast.span, ast.sourceSpan, expr);

                case '-':
                  return Unary.createMinus(ast.span, ast.sourceSpan, expr);

                default:
                  throw new Error("Unknown unary operator ".concat(ast.operator));
              }
            }

            return ast;
          }
        }, {
          key: "visitBinary",
          value: function visitBinary(ast, context) {
            var left = ast.left.visit(this);
            var right = ast.right.visit(this);

            if (left !== ast.left || right !== ast.right) {
              return new Binary(ast.span, ast.sourceSpan, ast.operation, left, right);
            }

            return ast;
          }
        }, {
          key: "visitPrefixNot",
          value: function visitPrefixNot(ast, context) {
            var expression = ast.expression.visit(this);

            if (expression !== ast.expression) {
              return new PrefixNot(ast.span, ast.sourceSpan, expression);
            }

            return ast;
          }
        }, {
          key: "visitNonNullAssert",
          value: function visitNonNullAssert(ast, context) {
            var expression = ast.expression.visit(this);

            if (expression !== ast.expression) {
              return new NonNullAssert(ast.span, ast.sourceSpan, expression);
            }

            return ast;
          }
        }, {
          key: "visitConditional",
          value: function visitConditional(ast, context) {
            var condition = ast.condition.visit(this);
            var trueExp = ast.trueExp.visit(this);
            var falseExp = ast.falseExp.visit(this);

            if (condition !== ast.condition || trueExp !== ast.trueExp || falseExp !== ast.falseExp) {
              return new Conditional(ast.span, ast.sourceSpan, condition, trueExp, falseExp);
            }

            return ast;
          }
        }, {
          key: "visitPipe",
          value: function visitPipe(ast, context) {
            var exp = ast.exp.visit(this);
            var args = this.visitAll(ast.args);

            if (exp !== ast.exp || args !== ast.args) {
              return new BindingPipe(ast.span, ast.sourceSpan, exp, ast.name, args, ast.nameSpan);
            }

            return ast;
          }
        }, {
          key: "visitKeyedRead",
          value: function visitKeyedRead(ast, context) {
            var obj = ast.obj.visit(this);
            var key = ast.key.visit(this);

            if (obj !== ast.obj || key !== ast.key) {
              return new KeyedRead(ast.span, ast.sourceSpan, obj, key);
            }

            return ast;
          }
        }, {
          key: "visitKeyedWrite",
          value: function visitKeyedWrite(ast, context) {
            var obj = ast.obj.visit(this);
            var key = ast.key.visit(this);
            var value = ast.value.visit(this);

            if (obj !== ast.obj || key !== ast.key || value !== ast.value) {
              return new KeyedWrite(ast.span, ast.sourceSpan, obj, key, value);
            }

            return ast;
          }
        }, {
          key: "visitAll",
          value: function visitAll(asts) {
            var res = [];
            var modified = false;

            for (var i = 0; i < asts.length; ++i) {
              var original = asts[i];
              var value = original.visit(this);
              res[i] = value;
              modified = modified || value !== original;
            }

            return modified ? res : asts;
          }
        }, {
          key: "visitChain",
          value: function visitChain(ast, context) {
            var expressions = this.visitAll(ast.expressions);

            if (expressions !== ast.expressions) {
              return new Chain(ast.span, ast.sourceSpan, expressions);
            }

            return ast;
          }
        }, {
          key: "visitQuote",
          value: function visitQuote(ast, context) {
            return ast;
          }
        }]);

        return AstMemoryEfficientTransformer;
      }(); // Bindings


      var ParsedProperty = function ParsedProperty(name, expression, type, // TODO(atscott): `keySpan` should really be required but allows `undefined` so VE does
      // not need to be updated. Make `keySpan` required when VE is removed.
      sourceSpan, keySpan, valueSpan) {
        _classCallCheck(this, ParsedProperty);

        this.name = name;
        this.expression = expression;
        this.type = type;
        this.sourceSpan = sourceSpan;
        this.keySpan = keySpan;
        this.valueSpan = valueSpan;
        this.isLiteral = this.type === ParsedPropertyType.LITERAL_ATTR;
        this.isAnimation = this.type === ParsedPropertyType.ANIMATION;
      };

      var ParsedPropertyType;

      (function (ParsedPropertyType) {
        ParsedPropertyType[ParsedPropertyType["DEFAULT"] = 0] = "DEFAULT";
        ParsedPropertyType[ParsedPropertyType["LITERAL_ATTR"] = 1] = "LITERAL_ATTR";
        ParsedPropertyType[ParsedPropertyType["ANIMATION"] = 2] = "ANIMATION";
      })(ParsedPropertyType || (ParsedPropertyType = {}));

      var ParsedEvent = // Regular events have a target
      // Animation events have a phase
      function ParsedEvent(name, targetOrPhase, type, handler, sourceSpan, handlerSpan) {
        _classCallCheck(this, ParsedEvent);

        this.name = name;
        this.targetOrPhase = targetOrPhase;
        this.type = type;
        this.handler = handler;
        this.sourceSpan = sourceSpan;
        this.handlerSpan = handlerSpan;
      };
      /**
       * ParsedVariable represents a variable declaration in a microsyntax expression.
       */


      var ParsedVariable = function ParsedVariable(name, value, sourceSpan, keySpan, valueSpan) {
        _classCallCheck(this, ParsedVariable);

        this.name = name;
        this.value = value;
        this.sourceSpan = sourceSpan;
        this.keySpan = keySpan;
        this.valueSpan = valueSpan;
      };

      var BoundElementProperty = function BoundElementProperty(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan) {
        _classCallCheck(this, BoundElementProperty);

        this.name = name;
        this.type = type;
        this.securityContext = securityContext;
        this.value = value;
        this.unit = unit;
        this.sourceSpan = sourceSpan;
        this.keySpan = keySpan;
        this.valueSpan = valueSpan;
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var EventHandlerVars = function EventHandlerVars() {
        _classCallCheck(this, EventHandlerVars);
      };

      EventHandlerVars.event = variable('$event');

      var ConvertActionBindingResult = function ConvertActionBindingResult(
      /**
       * Render2 compatible statements,
       */
      stmts,
      /**
       * Variable name used with render2 compatible statements.
       */
      allowDefault) {
        _classCallCheck(this, ConvertActionBindingResult);

        this.stmts = stmts;
        this.allowDefault = allowDefault;
        /**
         * This is bit of a hack. It converts statements which render2 expects to statements which are
         * expected by render3.
         *
         * Example: `<div click="doSomething($event)">` will generate:
         *
         * Render3:
         * ```
         * const pd_b:any = ((<any>ctx.doSomething($event)) !== false);
         * return pd_b;
         * ```
         *
         * but render2 expects:
         * ```
         * return ctx.doSomething($event);
         * ```
         */
        // TODO(misko): remove this hack once we no longer support ViewEngine.

        this.render3Stmts = stmts.map(function (statement) {
          if (statement instanceof DeclareVarStmt && statement.name == allowDefault.name && statement.value instanceof BinaryOperatorExpr) {
            var lhs = statement.value.lhs;
            return new ReturnStatement(lhs.value);
          }

          return statement;
        });
      };
      /**
       * Converts the given expression AST into an executable output AST, assuming the expression is
       * used in an action binding (e.g. an event handler).
       */


      function convertActionBinding(localResolver, implicitReceiver, action, bindingId, interpolationFunction, baseSourceSpan, implicitReceiverAccesses, globals) {
        if (!localResolver) {
          localResolver = new DefaultLocalResolver(globals);
        }

        var actionWithoutBuiltins = convertPropertyBindingBuiltins({
          createLiteralArrayConverter: function createLiteralArrayConverter(argCount) {
            // Note: no caching for literal arrays in actions.
            return function (args) {
              return literalArr(args);
            };
          },
          createLiteralMapConverter: function createLiteralMapConverter(keys) {
            // Note: no caching for literal maps in actions.
            return function (values) {
              var entries = keys.map(function (k, i) {
                return {
                  key: k.key,
                  value: values[i],
                  quoted: k.quoted
                };
              });
              return literalMap(entries);
            };
          },
          createPipeConverter: function createPipeConverter(name) {
            throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: ".concat(name));
          }
        }, action);
        var visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, interpolationFunction, baseSourceSpan, implicitReceiverAccesses);
        var actionStmts = [];
        flattenStatements(actionWithoutBuiltins.visit(visitor, _Mode.Statement), actionStmts);
        prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);

        if (visitor.usesImplicitReceiver) {
          localResolver.notifyImplicitReceiverUse();
        }

        var lastIndex = actionStmts.length - 1;
        var preventDefaultVar = null;

        if (lastIndex >= 0) {
          var lastStatement = actionStmts[lastIndex];
          var returnExpr = convertStmtIntoExpression(lastStatement);

          if (returnExpr) {
            // Note: We need to cast the result of the method call to dynamic,
            // as it might be a void method!
            preventDefaultVar = createPreventDefaultVar(bindingId);
            actionStmts[lastIndex] = preventDefaultVar.set(returnExpr.cast(DYNAMIC_TYPE).notIdentical(literal(false))).toDeclStmt(null, [StmtModifier.Final]);
          }
        }

        return new ConvertActionBindingResult(actionStmts, preventDefaultVar);
      }

      function convertPropertyBindingBuiltins(converterFactory, ast) {
        return convertBuiltins(converterFactory, ast);
      }

      var ConvertPropertyBindingResult = function ConvertPropertyBindingResult(stmts, currValExpr) {
        _classCallCheck(this, ConvertPropertyBindingResult);

        this.stmts = stmts;
        this.currValExpr = currValExpr;
      };

      var BindingForm;

      (function (BindingForm) {
        // The general form of binding expression, supports all expressions.
        BindingForm[BindingForm["General"] = 0] = "General"; // Try to generate a simple binding (no temporaries or statements)
        // otherwise generate a general binding

        BindingForm[BindingForm["TrySimple"] = 1] = "TrySimple"; // Inlines assignment of temporaries into the generated expression. The result may still
        // have statements attached for declarations of temporary variables.
        // This is the only relevant form for Ivy, the other forms are only used in ViewEngine.

        BindingForm[BindingForm["Expression"] = 2] = "Expression";
      })(BindingForm || (BindingForm = {}));
      /**
       * Converts the given expression AST into an executable output AST, assuming the expression
       * is used in property binding. The expression has to be preprocessed via
       * `convertPropertyBindingBuiltins`.
       */


      function _convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId, form, interpolationFunction) {
        if (!localResolver) {
          localResolver = new DefaultLocalResolver();
        }

        var visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, interpolationFunction);
        var outputExpr = expressionWithoutBuiltins.visit(visitor, _Mode.Expression);
        var stmts = getStatementsFromVisitor(visitor, bindingId);

        if (visitor.usesImplicitReceiver) {
          localResolver.notifyImplicitReceiverUse();
        }

        if (visitor.temporaryCount === 0 && form == BindingForm.TrySimple) {
          return new ConvertPropertyBindingResult([], outputExpr);
        } else if (form === BindingForm.Expression) {
          return new ConvertPropertyBindingResult(stmts, outputExpr);
        }

        var currValExpr = createCurrValueExpr(bindingId);
        stmts.push(currValExpr.set(outputExpr).toDeclStmt(DYNAMIC_TYPE, [StmtModifier.Final]));
        return new ConvertPropertyBindingResult(stmts, currValExpr);
      }
      /**
       * Given some expression, such as a binding or interpolation expression, and a context expression to
       * look values up on, visit each facet of the given expression resolving values from the context
       * expression such that a list of arguments can be derived from the found values that can be used as
       * arguments to an external update instruction.
       *
       * @param localResolver The resolver to use to look up expressions by name appropriately
       * @param contextVariableExpression The expression representing the context variable used to create
       * the final argument expressions
       * @param expressionWithArgumentsToExtract The expression to visit to figure out what values need to
       * be resolved and what arguments list to build.
       * @param bindingId A name prefix used to create temporary variable names if they're needed for the
       * arguments generated
       * @returns An array of expressions that can be passed as arguments to instruction expressions like
       * `o.importExpr(R3.propertyInterpolate).callFn(result)`
       */


      function convertUpdateArguments(localResolver, contextVariableExpression, expressionWithArgumentsToExtract, bindingId) {
        var visitor = new _AstToIrVisitor(localResolver, contextVariableExpression, bindingId, undefined);
        var outputExpr = expressionWithArgumentsToExtract.visit(visitor, _Mode.Expression);

        if (visitor.usesImplicitReceiver) {
          localResolver.notifyImplicitReceiverUse();
        }

        var stmts = getStatementsFromVisitor(visitor, bindingId); // Removing the first argument, because it was a length for ViewEngine, not Ivy.

        var args = outputExpr.args.slice(1);

        if (expressionWithArgumentsToExtract instanceof Interpolation) {
          // If we're dealing with an interpolation of 1 value with an empty prefix and suffix, reduce the
          // args returned to just the value, because we're going to pass it to a special instruction.
          var strings = expressionWithArgumentsToExtract.strings;

          if (args.length === 3 && strings[0] === '' && strings[1] === '') {
            // Single argument interpolate instructions.
            args = [args[1]];
          } else if (args.length >= 19) {
            // 19 or more arguments must be passed to the `interpolateV`-style instructions, which accept
            // an array of arguments
            args = [literalArr(args)];
          }
        }

        return {
          stmts: stmts,
          args: args
        };
      }

      function getStatementsFromVisitor(visitor, bindingId) {
        var stmts = [];

        for (var i = 0; i < visitor.temporaryCount; i++) {
          stmts.push(temporaryDeclaration(bindingId, i));
        }

        return stmts;
      }

      function convertBuiltins(converterFactory, ast) {
        var visitor = new _BuiltinAstConverter(converterFactory);
        return ast.visit(visitor);
      }

      function temporaryName(bindingId, temporaryNumber) {
        return "tmp_".concat(bindingId, "_").concat(temporaryNumber);
      }

      function temporaryDeclaration(bindingId, temporaryNumber) {
        return new DeclareVarStmt(temporaryName(bindingId, temporaryNumber), NULL_EXPR);
      }

      function prependTemporaryDecls(temporaryCount, bindingId, statements) {
        for (var i = temporaryCount - 1; i >= 0; i--) {
          statements.unshift(temporaryDeclaration(bindingId, i));
        }
      }

      var _Mode;

      (function (_Mode) {
        _Mode[_Mode["Statement"] = 0] = "Statement";
        _Mode[_Mode["Expression"] = 1] = "Expression";
      })(_Mode || (_Mode = {}));

      function ensureStatementMode(mode, ast) {
        if (mode !== _Mode.Statement) {
          throw new Error("Expected a statement, but saw ".concat(ast));
        }
      }

      function ensureExpressionMode(mode, ast) {
        if (mode !== _Mode.Expression) {
          throw new Error("Expected an expression, but saw ".concat(ast));
        }
      }

      function convertToStatementIfNeeded(mode, expr) {
        if (mode === _Mode.Statement) {
          return expr.toStmt();
        } else {
          return expr;
        }
      }

      var _BuiltinAstConverter = /*#__PURE__*/function (_AstTransformer$) {
        _inherits(_BuiltinAstConverter, _AstTransformer$);

        var _super84 = _createSuper(_BuiltinAstConverter);

        function _BuiltinAstConverter(_converterFactory) {
          var _this114;

          _classCallCheck(this, _BuiltinAstConverter);

          _this114 = _super84.call(this);
          _this114._converterFactory = _converterFactory;
          return _this114;
        }

        _createClass2(_BuiltinAstConverter, [{
          key: "visitPipe",
          value: function visitPipe(ast, context) {
            var _this115 = this;

            var args = [ast.exp].concat(_toConsumableArray(ast.args)).map(function (ast) {
              return ast.visit(_this115, context);
            });
            return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createPipeConverter(ast.name, args.length));
          }
        }, {
          key: "visitLiteralArray",
          value: function visitLiteralArray(ast, context) {
            var _this116 = this;

            var args = ast.expressions.map(function (ast) {
              return ast.visit(_this116, context);
            });
            return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createLiteralArrayConverter(ast.expressions.length));
          }
        }, {
          key: "visitLiteralMap",
          value: function visitLiteralMap(ast, context) {
            var _this117 = this;

            var args = ast.values.map(function (ast) {
              return ast.visit(_this117, context);
            });
            return new BuiltinFunctionCall(ast.span, ast.sourceSpan, args, this._converterFactory.createLiteralMapConverter(ast.keys));
          }
        }]);

        return _BuiltinAstConverter;
      }(AstTransformer$1);

      var _AstToIrVisitor = /*#__PURE__*/function () {
        function _AstToIrVisitor(_localResolver, _implicitReceiver, bindingId, interpolationFunction, baseSourceSpan, implicitReceiverAccesses) {
          _classCallCheck(this, _AstToIrVisitor);

          this._localResolver = _localResolver;
          this._implicitReceiver = _implicitReceiver;
          this.bindingId = bindingId;
          this.interpolationFunction = interpolationFunction;
          this.baseSourceSpan = baseSourceSpan;
          this.implicitReceiverAccesses = implicitReceiverAccesses;
          this._nodeMap = new Map();
          this._resultMap = new Map();
          this._currentTemporary = 0;
          this.temporaryCount = 0;
          this.usesImplicitReceiver = false;
        }

        _createClass2(_AstToIrVisitor, [{
          key: "visitUnary",
          value: function visitUnary(ast, mode) {
            var op;

            switch (ast.operator) {
              case '+':
                op = UnaryOperator.Plus;
                break;

              case '-':
                op = UnaryOperator.Minus;
                break;

              default:
                throw new Error("Unsupported operator ".concat(ast.operator));
            }

            return convertToStatementIfNeeded(mode, new UnaryOperatorExpr(op, this._visit(ast.expr, _Mode.Expression), undefined, this.convertSourceSpan(ast.span)));
          }
        }, {
          key: "visitBinary",
          value: function visitBinary(ast, mode) {
            var op;

            switch (ast.operation) {
              case '+':
                op = BinaryOperator.Plus;
                break;

              case '-':
                op = BinaryOperator.Minus;
                break;

              case '*':
                op = BinaryOperator.Multiply;
                break;

              case '/':
                op = BinaryOperator.Divide;
                break;

              case '%':
                op = BinaryOperator.Modulo;
                break;

              case '&&':
                op = BinaryOperator.And;
                break;

              case '||':
                op = BinaryOperator.Or;
                break;

              case '==':
                op = BinaryOperator.Equals;
                break;

              case '!=':
                op = BinaryOperator.NotEquals;
                break;

              case '===':
                op = BinaryOperator.Identical;
                break;

              case '!==':
                op = BinaryOperator.NotIdentical;
                break;

              case '<':
                op = BinaryOperator.Lower;
                break;

              case '>':
                op = BinaryOperator.Bigger;
                break;

              case '<=':
                op = BinaryOperator.LowerEquals;
                break;

              case '>=':
                op = BinaryOperator.BiggerEquals;
                break;

              default:
                throw new Error("Unsupported operation ".concat(ast.operation));
            }

            return convertToStatementIfNeeded(mode, new BinaryOperatorExpr(op, this._visit(ast.left, _Mode.Expression), this._visit(ast.right, _Mode.Expression), undefined, this.convertSourceSpan(ast.span)));
          }
        }, {
          key: "visitChain",
          value: function visitChain(ast, mode) {
            ensureStatementMode(mode, ast);
            return this.visitAll(ast.expressions, mode);
          }
        }, {
          key: "visitConditional",
          value: function visitConditional(ast, mode) {
            var value = this._visit(ast.condition, _Mode.Expression);

            return convertToStatementIfNeeded(mode, value.conditional(this._visit(ast.trueExp, _Mode.Expression), this._visit(ast.falseExp, _Mode.Expression), this.convertSourceSpan(ast.span)));
          }
        }, {
          key: "visitPipe",
          value: function visitPipe(ast, mode) {
            throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: ".concat(ast.name));
          }
        }, {
          key: "visitFunctionCall",
          value: function visitFunctionCall(ast, mode) {
            var convertedArgs = this.visitAll(ast.args, _Mode.Expression);
            var fnResult;

            if (ast instanceof BuiltinFunctionCall) {
              fnResult = ast.converter(convertedArgs);
            } else {
              fnResult = this._visit(ast.target, _Mode.Expression).callFn(convertedArgs, this.convertSourceSpan(ast.span));
            }

            return convertToStatementIfNeeded(mode, fnResult);
          }
        }, {
          key: "visitImplicitReceiver",
          value: function visitImplicitReceiver(ast, mode) {
            ensureExpressionMode(mode, ast);
            this.usesImplicitReceiver = true;
            return this._implicitReceiver;
          }
        }, {
          key: "visitThisReceiver",
          value: function visitThisReceiver(ast, mode) {
            return this.visitImplicitReceiver(ast, mode);
          }
        }, {
          key: "visitInterpolation",
          value: function visitInterpolation(ast, mode) {
            ensureExpressionMode(mode, ast);
            var args = [literal(ast.expressions.length)];

            for (var i = 0; i < ast.strings.length - 1; i++) {
              args.push(literal(ast.strings[i]));
              args.push(this._visit(ast.expressions[i], _Mode.Expression));
            }

            args.push(literal(ast.strings[ast.strings.length - 1]));

            if (this.interpolationFunction) {
              return this.interpolationFunction(args);
            }

            return ast.expressions.length <= 9 ? importExpr(Identifiers.inlineInterpolate).callFn(args) : importExpr(Identifiers.interpolate).callFn([args[0], literalArr(args.slice(1), undefined, this.convertSourceSpan(ast.span))]);
          }
        }, {
          key: "visitKeyedRead",
          value: function visitKeyedRead(ast, mode) {
            var leftMostSafe = this.leftMostSafeNode(ast);

            if (leftMostSafe) {
              return this.convertSafeAccess(ast, leftMostSafe, mode);
            } else {
              return convertToStatementIfNeeded(mode, this._visit(ast.obj, _Mode.Expression).key(this._visit(ast.key, _Mode.Expression)));
            }
          }
        }, {
          key: "visitKeyedWrite",
          value: function visitKeyedWrite(ast, mode) {
            var obj = this._visit(ast.obj, _Mode.Expression);

            var key = this._visit(ast.key, _Mode.Expression);

            var value = this._visit(ast.value, _Mode.Expression);

            return convertToStatementIfNeeded(mode, obj.key(key).set(value));
          }
        }, {
          key: "visitLiteralArray",
          value: function visitLiteralArray(ast, mode) {
            throw new Error("Illegal State: literal arrays should have been converted into functions");
          }
        }, {
          key: "visitLiteralMap",
          value: function visitLiteralMap(ast, mode) {
            throw new Error("Illegal State: literal maps should have been converted into functions");
          }
        }, {
          key: "visitLiteralPrimitive",
          value: function visitLiteralPrimitive(ast, mode) {
            // For literal values of null, undefined, true, or false allow type interference
            // to infer the type.
            var type = ast.value === null || ast.value === undefined || ast.value === true || ast.value === true ? INFERRED_TYPE : undefined;
            return convertToStatementIfNeeded(mode, literal(ast.value, type, this.convertSourceSpan(ast.span)));
          }
        }, {
          key: "_getLocal",
          value: function _getLocal(name, receiver) {
            var _a;

            if (((_a = this._localResolver.globals) === null || _a === void 0 ? void 0 : _a.has(name)) && receiver instanceof ThisReceiver) {
              return null;
            }

            return this._localResolver.getLocal(name);
          }
        }, {
          key: "visitMethodCall",
          value: function visitMethodCall(ast, mode) {
            if (ast.receiver instanceof ImplicitReceiver && !(ast.receiver instanceof ThisReceiver) && ast.name === '$any') {
              var args = this.visitAll(ast.args, _Mode.Expression);

              if (args.length != 1) {
                throw new Error("Invalid call to $any, expected 1 argument but received ".concat(args.length || 'none'));
              }

              return args[0].cast(DYNAMIC_TYPE, this.convertSourceSpan(ast.span));
            }

            var leftMostSafe = this.leftMostSafeNode(ast);

            if (leftMostSafe) {
              return this.convertSafeAccess(ast, leftMostSafe, mode);
            } else {
              var _args = this.visitAll(ast.args, _Mode.Expression);

              var prevUsesImplicitReceiver = this.usesImplicitReceiver;
              var result = null;

              var receiver = this._visit(ast.receiver, _Mode.Expression);

              if (receiver === this._implicitReceiver) {
                var varExpr = this._getLocal(ast.name, ast.receiver);

                if (varExpr) {
                  // Restore the previous "usesImplicitReceiver" state since the implicit
                  // receiver has been replaced with a resolved local expression.
                  this.usesImplicitReceiver = prevUsesImplicitReceiver;
                  result = varExpr.callFn(_args);
                  this.addImplicitReceiverAccess(ast.name);
                }
              }

              if (result == null) {
                result = receiver.callMethod(ast.name, _args, this.convertSourceSpan(ast.span));
              }

              return convertToStatementIfNeeded(mode, result);
            }
          }
        }, {
          key: "visitPrefixNot",
          value: function visitPrefixNot(ast, mode) {
            return convertToStatementIfNeeded(mode, not(this._visit(ast.expression, _Mode.Expression)));
          }
        }, {
          key: "visitNonNullAssert",
          value: function visitNonNullAssert(ast, mode) {
            return convertToStatementIfNeeded(mode, assertNotNull(this._visit(ast.expression, _Mode.Expression)));
          }
        }, {
          key: "visitPropertyRead",
          value: function visitPropertyRead(ast, mode) {
            var leftMostSafe = this.leftMostSafeNode(ast);

            if (leftMostSafe) {
              return this.convertSafeAccess(ast, leftMostSafe, mode);
            } else {
              var result = null;
              var prevUsesImplicitReceiver = this.usesImplicitReceiver;

              var receiver = this._visit(ast.receiver, _Mode.Expression);

              if (receiver === this._implicitReceiver) {
                result = this._getLocal(ast.name, ast.receiver);

                if (result) {
                  // Restore the previous "usesImplicitReceiver" state since the implicit
                  // receiver has been replaced with a resolved local expression.
                  this.usesImplicitReceiver = prevUsesImplicitReceiver;
                  this.addImplicitReceiverAccess(ast.name);
                }
              }

              if (result == null) {
                result = receiver.prop(ast.name);
              }

              return convertToStatementIfNeeded(mode, result);
            }
          }
        }, {
          key: "visitPropertyWrite",
          value: function visitPropertyWrite(ast, mode) {
            var receiver = this._visit(ast.receiver, _Mode.Expression);

            var prevUsesImplicitReceiver = this.usesImplicitReceiver;
            var varExpr = null;

            if (receiver === this._implicitReceiver) {
              var localExpr = this._getLocal(ast.name, ast.receiver);

              if (localExpr) {
                if (localExpr instanceof ReadPropExpr) {
                  // If the local variable is a property read expression, it's a reference
                  // to a 'context.property' value and will be used as the target of the
                  // write expression.
                  varExpr = localExpr; // Restore the previous "usesImplicitReceiver" state since the implicit
                  // receiver has been replaced with a resolved local expression.

                  this.usesImplicitReceiver = prevUsesImplicitReceiver;
                  this.addImplicitReceiverAccess(ast.name);
                } else {
                  // Otherwise it's an error.
                  var _receiver = ast.name;
                  var value = ast.value instanceof PropertyRead ? ast.value.name : undefined;
                  throw new Error("Cannot assign value \"".concat(value, "\" to template variable \"").concat(_receiver, "\". Template variables are read-only."));
                }
              }
            } // If no local expression could be produced, use the original receiver's
            // property as the target.


            if (varExpr === null) {
              varExpr = receiver.prop(ast.name);
            }

            return convertToStatementIfNeeded(mode, varExpr.set(this._visit(ast.value, _Mode.Expression)));
          }
        }, {
          key: "visitSafePropertyRead",
          value: function visitSafePropertyRead(ast, mode) {
            return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);
          }
        }, {
          key: "visitSafeMethodCall",
          value: function visitSafeMethodCall(ast, mode) {
            return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);
          }
        }, {
          key: "visitAll",
          value: function visitAll(asts, mode) {
            var _this118 = this;

            return asts.map(function (ast) {
              return _this118._visit(ast, mode);
            });
          }
        }, {
          key: "visitQuote",
          value: function visitQuote(ast, mode) {
            throw new Error("Quotes are not supported for evaluation!\n        Statement: ".concat(ast.uninterpretedExpression, " located at ").concat(ast.location));
          }
        }, {
          key: "_visit",
          value: function _visit(ast, mode) {
            var result = this._resultMap.get(ast);

            if (result) return result;
            return (this._nodeMap.get(ast) || ast).visit(this, mode);
          }
        }, {
          key: "convertSafeAccess",
          value: function convertSafeAccess(ast, leftMostSafe, mode) {
            // If the expression contains a safe access node on the left it needs to be converted to
            // an expression that guards the access to the member by checking the receiver for blank. As
            // execution proceeds from left to right, the left most part of the expression must be guarded
            // first but, because member access is left associative, the right side of the expression is at
            // the top of the AST. The desired result requires lifting a copy of the left part of the
            // expression up to test it for blank before generating the unguarded version.
            // Consider, for example the following expression: a?.b.c?.d.e
            // This results in the ast:
            //         .
            //        / \
            //       ?.   e
            //      /  \
            //     .    d
            //    / \
            //   ?.  c
            //  /  \
            // a    b
            // The following tree should be generated:
            //
            //        /---- ? ----\
            //       /      |      \
            //     a   /--- ? ---\  null
            //        /     |     \
            //       .      .     null
            //      / \    / \
            //     .  c   .   e
            //    / \    / \
            //   a   b  .   d
            //         / \
            //        .   c
            //       / \
            //      a   b
            //
            // Notice that the first guard condition is the left hand of the left most safe access node
            // which comes in as leftMostSafe to this routine.
            var guardedExpression = this._visit(leftMostSafe.receiver, _Mode.Expression);

            var temporary = undefined;

            if (this.needsTemporary(leftMostSafe.receiver)) {
              // If the expression has method calls or pipes then we need to save the result into a
              // temporary variable to avoid calling stateful or impure code more than once.
              temporary = this.allocateTemporary(); // Preserve the result in the temporary variable

              guardedExpression = temporary.set(guardedExpression); // Ensure all further references to the guarded expression refer to the temporary instead.

              this._resultMap.set(leftMostSafe.receiver, temporary);
            }

            var condition = guardedExpression.isBlank(); // Convert the ast to an unguarded access to the receiver's member. The map will substitute
            // leftMostNode with its unguarded version in the call to `this.visit()`.

            if (leftMostSafe instanceof SafeMethodCall) {
              this._nodeMap.set(leftMostSafe, new MethodCall(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.nameSpan, leftMostSafe.receiver, leftMostSafe.name, leftMostSafe.args));
            } else {
              this._nodeMap.set(leftMostSafe, new PropertyRead(leftMostSafe.span, leftMostSafe.sourceSpan, leftMostSafe.nameSpan, leftMostSafe.receiver, leftMostSafe.name));
            } // Recursively convert the node now without the guarded member access.


            var access = this._visit(ast, _Mode.Expression); // Remove the mapping. This is not strictly required as the converter only traverses each node
            // once but is safer if the conversion is changed to traverse the nodes more than once.


            this._nodeMap["delete"](leftMostSafe); // If we allocated a temporary, release it.


            if (temporary) {
              this.releaseTemporary(temporary);
            } // Produce the conditional


            return convertToStatementIfNeeded(mode, condition.conditional(literal(null), access));
          } // Given an expression of the form a?.b.c?.d.e then the left most safe node is
          // the (a?.b). The . and ?. are left associative thus can be rewritten as:
          // ((((a?.c).b).c)?.d).e. This returns the most deeply nested safe read or
          // safe method call as this needs to be transformed initially to:
          //   a == null ? null : a.c.b.c?.d.e
          // then to:
          //   a == null ? null : a.b.c == null ? null : a.b.c.d.e

        }, {
          key: "leftMostSafeNode",
          value: function leftMostSafeNode(ast) {
            var _this119 = this;

            var visit = function visit(visitor, ast) {
              return (_this119._nodeMap.get(ast) || ast).visit(visitor);
            };

            return ast.visit({
              visitUnary: function visitUnary(ast) {
                return null;
              },
              visitBinary: function visitBinary(ast) {
                return null;
              },
              visitChain: function visitChain(ast) {
                return null;
              },
              visitConditional: function visitConditional(ast) {
                return null;
              },
              visitFunctionCall: function visitFunctionCall(ast) {
                return null;
              },
              visitImplicitReceiver: function visitImplicitReceiver(ast) {
                return null;
              },
              visitThisReceiver: function visitThisReceiver(ast) {
                return null;
              },
              visitInterpolation: function visitInterpolation(ast) {
                return null;
              },
              visitKeyedRead: function visitKeyedRead(ast) {
                return visit(this, ast.obj);
              },
              visitKeyedWrite: function visitKeyedWrite(ast) {
                return null;
              },
              visitLiteralArray: function visitLiteralArray(ast) {
                return null;
              },
              visitLiteralMap: function visitLiteralMap(ast) {
                return null;
              },
              visitLiteralPrimitive: function visitLiteralPrimitive(ast) {
                return null;
              },
              visitMethodCall: function visitMethodCall(ast) {
                return visit(this, ast.receiver);
              },
              visitPipe: function visitPipe(ast) {
                return null;
              },
              visitPrefixNot: function visitPrefixNot(ast) {
                return null;
              },
              visitNonNullAssert: function visitNonNullAssert(ast) {
                return null;
              },
              visitPropertyRead: function visitPropertyRead(ast) {
                return visit(this, ast.receiver);
              },
              visitPropertyWrite: function visitPropertyWrite(ast) {
                return null;
              },
              visitQuote: function visitQuote(ast) {
                return null;
              },
              visitSafeMethodCall: function visitSafeMethodCall(ast) {
                return visit(this, ast.receiver) || ast;
              },
              visitSafePropertyRead: function visitSafePropertyRead(ast) {
                return visit(this, ast.receiver) || ast;
              }
            });
          } // Returns true of the AST includes a method or a pipe indicating that, if the
          // expression is used as the target of a safe property or method access then
          // the expression should be stored into a temporary variable.

        }, {
          key: "needsTemporary",
          value: function needsTemporary(ast) {
            var _this120 = this;

            var visit = function visit(visitor, ast) {
              return ast && (_this120._nodeMap.get(ast) || ast).visit(visitor);
            };

            var visitSome = function visitSome(visitor, ast) {
              return ast.some(function (ast) {
                return visit(visitor, ast);
              });
            };

            return ast.visit({
              visitUnary: function visitUnary(ast) {
                return visit(this, ast.expr);
              },
              visitBinary: function visitBinary(ast) {
                return visit(this, ast.left) || visit(this, ast.right);
              },
              visitChain: function visitChain(ast) {
                return false;
              },
              visitConditional: function visitConditional(ast) {
                return visit(this, ast.condition) || visit(this, ast.trueExp) || visit(this, ast.falseExp);
              },
              visitFunctionCall: function visitFunctionCall(ast) {
                return true;
              },
              visitImplicitReceiver: function visitImplicitReceiver(ast) {
                return false;
              },
              visitThisReceiver: function visitThisReceiver(ast) {
                return false;
              },
              visitInterpolation: function visitInterpolation(ast) {
                return visitSome(this, ast.expressions);
              },
              visitKeyedRead: function visitKeyedRead(ast) {
                return false;
              },
              visitKeyedWrite: function visitKeyedWrite(ast) {
                return false;
              },
              visitLiteralArray: function visitLiteralArray(ast) {
                return true;
              },
              visitLiteralMap: function visitLiteralMap(ast) {
                return true;
              },
              visitLiteralPrimitive: function visitLiteralPrimitive(ast) {
                return false;
              },
              visitMethodCall: function visitMethodCall(ast) {
                return true;
              },
              visitPipe: function visitPipe(ast) {
                return true;
              },
              visitPrefixNot: function visitPrefixNot(ast) {
                return visit(this, ast.expression);
              },
              visitNonNullAssert: function visitNonNullAssert(ast) {
                return visit(this, ast.expression);
              },
              visitPropertyRead: function visitPropertyRead(ast) {
                return false;
              },
              visitPropertyWrite: function visitPropertyWrite(ast) {
                return false;
              },
              visitQuote: function visitQuote(ast) {
                return false;
              },
              visitSafeMethodCall: function visitSafeMethodCall(ast) {
                return true;
              },
              visitSafePropertyRead: function visitSafePropertyRead(ast) {
                return false;
              }
            });
          }
        }, {
          key: "allocateTemporary",
          value: function allocateTemporary() {
            var tempNumber = this._currentTemporary++;
            this.temporaryCount = Math.max(this._currentTemporary, this.temporaryCount);
            return new ReadVarExpr(temporaryName(this.bindingId, tempNumber));
          }
        }, {
          key: "releaseTemporary",
          value: function releaseTemporary(temporary) {
            this._currentTemporary--;

            if (temporary.name != temporaryName(this.bindingId, this._currentTemporary)) {
              throw new Error("Temporary ".concat(temporary.name, " released out of order"));
            }
          }
          /**
           * Creates an absolute `ParseSourceSpan` from the relative `ParseSpan`.
           *
           * `ParseSpan` objects are relative to the start of the expression.
           * This method converts these to full `ParseSourceSpan` objects that
           * show where the span is within the overall source file.
           *
           * @param span the relative span to convert.
           * @returns a `ParseSourceSpan` for the given span or null if no
           * `baseSourceSpan` was provided to this class.
           */

        }, {
          key: "convertSourceSpan",
          value: function convertSourceSpan(span) {
            if (this.baseSourceSpan) {
              var _start = this.baseSourceSpan.start.moveBy(span.start);

              var end = this.baseSourceSpan.start.moveBy(span.end);
              var fullStart = this.baseSourceSpan.fullStart.moveBy(span.start);
              return new ParseSourceSpan(_start, end, fullStart);
            } else {
              return null;
            }
          }
          /** Adds the name of an AST to the list of implicit receiver accesses. */

        }, {
          key: "addImplicitReceiverAccess",
          value: function addImplicitReceiverAccess(name) {
            if (this.implicitReceiverAccesses) {
              this.implicitReceiverAccesses.add(name);
            }
          }
        }]);

        return _AstToIrVisitor;
      }();

      function flattenStatements(arg, output) {
        if (Array.isArray(arg)) {
          arg.forEach(function (entry) {
            return flattenStatements(entry, output);
          });
        } else {
          output.push(arg);
        }
      }

      var DefaultLocalResolver = /*#__PURE__*/function () {
        function DefaultLocalResolver(globals) {
          _classCallCheck(this, DefaultLocalResolver);

          this.globals = globals;
        }

        _createClass2(DefaultLocalResolver, [{
          key: "notifyImplicitReceiverUse",
          value: function notifyImplicitReceiverUse() {}
        }, {
          key: "getLocal",
          value: function getLocal(name) {
            if (name === EventHandlerVars.event.name) {
              return EventHandlerVars.event;
            }

            return null;
          }
        }]);

        return DefaultLocalResolver;
      }();

      function createCurrValueExpr(bindingId) {
        return variable("currVal_".concat(bindingId)); // fix syntax highlighting: `
      }

      function createPreventDefaultVar(bindingId) {
        return variable("pd_".concat(bindingId));
      }

      function convertStmtIntoExpression(stmt) {
        if (stmt instanceof ExpressionStatement) {
          return stmt.expr;
        } else if (stmt instanceof ReturnStatement) {
          return stmt.value;
        }

        return null;
      }

      var BuiltinFunctionCall = /*#__PURE__*/function (_FunctionCall) {
        _inherits(BuiltinFunctionCall, _FunctionCall);

        var _super85 = _createSuper(BuiltinFunctionCall);

        function BuiltinFunctionCall(span, sourceSpan, args, converter) {
          var _this121;

          _classCallCheck(this, BuiltinFunctionCall);

          _this121 = _super85.call(this, span, sourceSpan, null, args);
          _this121.args = args;
          _this121.converter = converter;
          return _this121;
        }

        return BuiltinFunctionCall;
      }(FunctionCall);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * This file is a port of shadowCSS from webcomponents.js to TypeScript.
       *
       * Please make sure to keep to edits in sync with the source file.
       *
       * Source:
       * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
       *
       * The original file level comment is reproduced below
       */

      /*
        This is a limited shim for ShadowDOM css styling.
        https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles
      
        The intention here is to support only the styling features which can be
        relatively simply implemented. The goal is to allow users to avoid the
        most obvious pitfalls and do so without compromising performance significantly.
        For ShadowDOM styling that's not covered here, a set of best practices
        can be provided that should allow users to accomplish more complex styling.
      
        The following is a list of specific ShadowDOM styling features and a brief
        discussion of the approach used to shim.
      
        Shimmed features:
      
        * :host, :host-context: ShadowDOM allows styling of the shadowRoot's host
        element using the :host rule. To shim this feature, the :host styles are
        reformatted and prefixed with a given scope name and promoted to a
        document level stylesheet.
        For example, given a scope name of .foo, a rule like this:
      
          :host {
              background: red;
            }
          }
      
        becomes:
      
          .foo {
            background: red;
          }
      
        * encapsulation: Styles defined within ShadowDOM, apply only to
        dom inside the ShadowDOM. Polymer uses one of two techniques to implement
        this feature.
      
        By default, rules are prefixed with the host element tag name
        as a descendant selector. This ensures styling does not leak out of the 'top'
        of the element's ShadowDOM. For example,
      
        div {
            font-weight: bold;
          }
      
        becomes:
      
        x-foo div {
            font-weight: bold;
          }
      
        becomes:
      
      
        Alternatively, if WebComponents.ShadowCSS.strictStyling is set to true then
        selectors are scoped by adding an attribute selector suffix to each
        simple selector that contains the host element tag name. Each element
        in the element's ShadowDOM template is also given the scope attribute.
        Thus, these rules match only elements that have the scope attribute.
        For example, given a scope name of x-foo, a rule like this:
      
          div {
            font-weight: bold;
          }
      
        becomes:
      
          div[x-foo] {
            font-weight: bold;
          }
      
        Note that elements that are dynamically added to a scope must have the scope
        selector added to them manually.
      
        * upper/lower bound encapsulation: Styles which are defined outside a
        shadowRoot should not cross the ShadowDOM boundary and should not apply
        inside a shadowRoot.
      
        This styling behavior is not emulated. Some possible ways to do this that
        were rejected due to complexity and/or performance concerns include: (1) reset
        every possible property for every possible selector for a given scope name;
        (2) re-implement css in javascript.
      
        As an alternative, users should make sure to use selectors
        specific to the scope in which they are working.
      
        * ::distributed: This behavior is not emulated. It's often not necessary
        to style the contents of a specific insertion point and instead, descendants
        of the host element can be styled selectively. Users can also create an
        extra node around an insertion point and style that node's contents
        via descendent selectors. For example, with a shadowRoot like this:
      
          <style>
            ::content(div) {
              background: red;
            }
          </style>
          <content></content>
      
        could become:
      
          <style>
            / *@polyfill .content-container div * /
            ::content(div) {
              background: red;
            }
          </style>
          <div class="content-container">
            <content></content>
          </div>
      
        Note the use of @polyfill in the comment above a ShadowDOM specific style
        declaration. This is a directive to the styling shim to use the selector
        in comments in lieu of the next selector when running under polyfill.
      */


      var ShadowCss = /*#__PURE__*/function () {
        function ShadowCss() {
          _classCallCheck(this, ShadowCss);

          this.strictStyling = true;
        }
        /*
         * Shim some cssText with the given selector. Returns cssText that can
         * be included in the document via WebComponents.ShadowCSS.addCssToDocument(css).
         *
         * When strictStyling is true:
         * - selector is the attribute added to all elements inside the host,
         * - hostSelector is the attribute added to the host itself.
         */


        _createClass2(ShadowCss, [{
          key: "shimCssText",
          value: function shimCssText(cssText, selector) {
            var hostSelector = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
            var commentsWithHash = extractCommentsWithHash(cssText);
            cssText = stripComments(cssText);
            cssText = this._insertDirectives(cssText);

            var scopedCssText = this._scopeCssText(cssText, selector, hostSelector);

            return [scopedCssText].concat(_toConsumableArray(commentsWithHash)).join('\n');
          }
        }, {
          key: "_insertDirectives",
          value: function _insertDirectives(cssText) {
            cssText = this._insertPolyfillDirectivesInCssText(cssText);
            return this._insertPolyfillRulesInCssText(cssText);
          }
          /*
           * Process styles to convert native ShadowDOM rules that will trip
           * up the css parser; we rely on decorating the stylesheet with inert rules.
           *
           * For example, we convert this rule:
           *
           * polyfill-next-selector { content: ':host menu-item'; }
           * ::content menu-item {
           *
           * to this:
           *
           * scopeName menu-item {
           *
           **/

        }, {
          key: "_insertPolyfillDirectivesInCssText",
          value: function _insertPolyfillDirectivesInCssText(cssText) {
            // Difference with webcomponents.js: does not handle comments
            return cssText.replace(_cssContentNextSelectorRe, function () {
              return (arguments.length <= 2 ? undefined : arguments[2]) + '{';
            });
          }
          /*
           * Process styles to add rules which will only apply under the polyfill
           *
           * For example, we convert this rule:
           *
           * polyfill-rule {
           *   content: ':host menu-item';
           * ...
           * }
           *
           * to this:
           *
           * scopeName menu-item {...}
           *
           **/

        }, {
          key: "_insertPolyfillRulesInCssText",
          value: function _insertPolyfillRulesInCssText(cssText) {
            // Difference with webcomponents.js: does not handle comments
            return cssText.replace(_cssContentRuleRe, function () {
              for (var _len5 = arguments.length, m = new Array(_len5), _key6 = 0; _key6 < _len5; _key6++) {
                m[_key6] = arguments[_key6];
              }

              var rule = m[0].replace(m[1], '').replace(m[2], '');
              return m[4] + rule;
            });
          }
          /* Ensure styles are scoped. Pseudo-scoping takes a rule like:
           *
           *  .foo {... }
           *
           *  and converts this to
           *
           *  scopeName .foo { ... }
           */

        }, {
          key: "_scopeCssText",
          value: function _scopeCssText(cssText, scopeSelector, hostSelector) {
            var unscopedRules = this._extractUnscopedRulesFromCssText(cssText); // replace :host and :host-context -shadowcsshost and -shadowcsshost respectively


            cssText = this._insertPolyfillHostInCssText(cssText);
            cssText = this._convertColonHost(cssText);
            cssText = this._convertColonHostContext(cssText);
            cssText = this._convertShadowDOMSelectors(cssText);

            if (scopeSelector) {
              cssText = this._scopeSelectors(cssText, scopeSelector, hostSelector);
            }

            cssText = cssText + '\n' + unscopedRules;
            return cssText.trim();
          }
          /*
           * Process styles to add rules which will only apply under the polyfill
           * and do not process via CSSOM. (CSSOM is destructive to rules on rare
           * occasions, e.g. -webkit-calc on Safari.)
           * For example, we convert this rule:
           *
           * @polyfill-unscoped-rule {
           *   content: 'menu-item';
           * ... }
           *
           * to this:
           *
           * menu-item {...}
           *
           **/

        }, {
          key: "_extractUnscopedRulesFromCssText",
          value: function _extractUnscopedRulesFromCssText(cssText) {
            // Difference with webcomponents.js: does not handle comments
            var r = '';
            var m;
            _cssContentUnscopedRuleRe.lastIndex = 0;

            while ((m = _cssContentUnscopedRuleRe.exec(cssText)) !== null) {
              var rule = m[0].replace(m[2], '').replace(m[1], m[4]);
              r += rule + '\n\n';
            }

            return r;
          }
          /*
           * convert a rule like :host(.foo) > .bar { }
           *
           * to
           *
           * .foo<scopeName> > .bar
           */

        }, {
          key: "_convertColonHost",
          value: function _convertColonHost(cssText) {
            return this._convertColonRule(cssText, _cssColonHostRe, this._colonHostPartReplacer);
          }
          /*
           * convert a rule like :host-context(.foo) > .bar { }
           *
           * to
           *
           * .foo<scopeName> > .bar, .foo scopeName > .bar { }
           *
           * and
           *
           * :host-context(.foo:host) .bar { ... }
           *
           * to
           *
           * .foo<scopeName> .bar { ... }
           */

        }, {
          key: "_convertColonHostContext",
          value: function _convertColonHostContext(cssText) {
            return this._convertColonRule(cssText, _cssColonHostContextRe, this._colonHostContextPartReplacer);
          }
        }, {
          key: "_convertColonRule",
          value: function _convertColonRule(cssText, regExp, partReplacer) {
            // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule
            return cssText.replace(regExp, function () {
              for (var _len6 = arguments.length, m = new Array(_len6), _key7 = 0; _key7 < _len6; _key7++) {
                m[_key7] = arguments[_key7];
              }

              if (m[2]) {
                var parts = m[2].split(',');
                var r = [];

                for (var i = 0; i < parts.length; i++) {
                  var p = parts[i].trim();
                  if (!p) break;
                  r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
                }

                return r.join(',');
              } else {
                return _polyfillHostNoCombinator + m[3];
              }
            });
          }
        }, {
          key: "_colonHostContextPartReplacer",
          value: function _colonHostContextPartReplacer(host, part, suffix) {
            if (part.indexOf(_polyfillHost) > -1) {
              return this._colonHostPartReplacer(host, part, suffix);
            } else {
              return host + part + suffix + ', ' + part + ' ' + host + suffix;
            }
          }
        }, {
          key: "_colonHostPartReplacer",
          value: function _colonHostPartReplacer(host, part, suffix) {
            return host + part.replace(_polyfillHost, '') + suffix;
          }
          /*
           * Convert combinators like ::shadow and pseudo-elements like ::content
           * by replacing with space.
           */

        }, {
          key: "_convertShadowDOMSelectors",
          value: function _convertShadowDOMSelectors(cssText) {
            return _shadowDOMSelectorsRe.reduce(function (result, pattern) {
              return result.replace(pattern, ' ');
            }, cssText);
          } // change a selector like 'div' to 'name div'

        }, {
          key: "_scopeSelectors",
          value: function _scopeSelectors(cssText, scopeSelector, hostSelector) {
            var _this122 = this;

            return processRules(cssText, function (rule) {
              var selector = rule.selector;
              var content = rule.content;

              if (rule.selector[0] != '@') {
                selector = _this122._scopeSelector(rule.selector, scopeSelector, hostSelector, _this122.strictStyling);
              } else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') || rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {
                content = _this122._scopeSelectors(rule.content, scopeSelector, hostSelector);
              }

              return new CssRule(selector, content);
            });
          }
        }, {
          key: "_scopeSelector",
          value: function _scopeSelector(selector, scopeSelector, hostSelector, strict) {
            var _this123 = this;

            return selector.split(',').map(function (part) {
              return part.trim().split(_shadowDeepSelectors);
            }).map(function (deepParts) {
              var _deepParts = _toArray(deepParts),
                  shallowPart = _deepParts[0],
                  otherParts = _deepParts.slice(1);

              var applyScope = function applyScope(shallowPart) {
                if (_this123._selectorNeedsScoping(shallowPart, scopeSelector)) {
                  return strict ? _this123._applyStrictSelectorScope(shallowPart, scopeSelector, hostSelector) : _this123._applySelectorScope(shallowPart, scopeSelector, hostSelector);
                } else {
                  return shallowPart;
                }
              };

              return [applyScope(shallowPart)].concat(_toConsumableArray(otherParts)).join(' ');
            }).join(', ');
          }
        }, {
          key: "_selectorNeedsScoping",
          value: function _selectorNeedsScoping(selector, scopeSelector) {
            var re = this._makeScopeMatcher(scopeSelector);

            return !re.test(selector);
          }
        }, {
          key: "_makeScopeMatcher",
          value: function _makeScopeMatcher(scopeSelector) {
            var lre = /\[/g;
            var rre = /\]/g;
            scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]');
            return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');
          }
        }, {
          key: "_applySelectorScope",
          value: function _applySelectorScope(selector, scopeSelector, hostSelector) {
            // Difference from webcomponents.js: scopeSelector could not be an array
            return this._applySimpleSelectorScope(selector, scopeSelector, hostSelector);
          } // scope via name and [is=name]

        }, {
          key: "_applySimpleSelectorScope",
          value: function _applySimpleSelectorScope(selector, scopeSelector, hostSelector) {
            // In Android browser, the lastIndex is not reset when the regex is used in String.replace()
            _polyfillHostRe.lastIndex = 0;

            if (_polyfillHostRe.test(selector)) {
              var replaceBy = this.strictStyling ? "[".concat(hostSelector, "]") : scopeSelector;
              return selector.replace(_polyfillHostNoCombinatorRe, function (hnc, selector) {
                return selector.replace(/([^:]*)(:*)(.*)/, function (_, before, colon, after) {
                  return before + replaceBy + colon + after;
                });
              }).replace(_polyfillHostRe, replaceBy + ' ');
            }

            return scopeSelector + ' ' + selector;
          } // return a selector with [name] suffix on each simple selector
          // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name]  /** @internal */

        }, {
          key: "_applyStrictSelectorScope",
          value: function _applyStrictSelectorScope(selector, scopeSelector, hostSelector) {
            var _this124 = this;

            var isRe = /\[is=([^\]]*)\]/g;
            scopeSelector = scopeSelector.replace(isRe, function (_) {
              return arguments.length <= 1 ? undefined : arguments[1];
            });
            var attrName = '[' + scopeSelector + ']';

            var _scopeSelectorPart = function _scopeSelectorPart(p) {
              var scopedP = p.trim();

              if (!scopedP) {
                return '';
              }

              if (p.indexOf(_polyfillHostNoCombinator) > -1) {
                scopedP = _this124._applySimpleSelectorScope(p, scopeSelector, hostSelector);
              } else {
                // remove :host since it should be unnecessary
                var t = p.replace(_polyfillHostRe, '');

                if (t.length > 0) {
                  var matches = t.match(/([^:]*)(:*)(.*)/);

                  if (matches) {
                    scopedP = matches[1] + attrName + matches[2] + matches[3];
                  }
                }
              }

              return scopedP;
            };

            var safeContent = new SafeSelector(selector);
            selector = safeContent.content();
            var scopedSelector = '';
            var startIndex = 0;
            var res;
            var sep = /( |>|\+|~(?!=))\s*/g; // If a selector appears before :host it should not be shimmed as it
            // matches on ancestor elements and not on elements in the host's shadow
            // `:host-context(div)` is transformed to
            // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`
            // the `div` is not part of the component in the 2nd selectors and should not be scoped.
            // Historically `component-tag:host` was matching the component so we also want to preserve
            // this behavior to avoid breaking legacy apps (it should not match).
            // The behavior should be:
            // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)
            // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a
            //   `:host-context(tag)`)

            var hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1; // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present

            var shouldScope = !hasHost;

            while ((res = sep.exec(selector)) !== null) {
              var separator = res[1];

              var _part = selector.slice(startIndex, res.index).trim();

              shouldScope = shouldScope || _part.indexOf(_polyfillHostNoCombinator) > -1;
              var scopedPart = shouldScope ? _scopeSelectorPart(_part) : _part;
              scopedSelector += "".concat(scopedPart, " ").concat(separator, " ");
              startIndex = sep.lastIndex;
            }

            var part = selector.substring(startIndex);
            shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
            scopedSelector += shouldScope ? _scopeSelectorPart(part) : part; // replace the placeholders with their original values

            return safeContent.restore(scopedSelector);
          }
        }, {
          key: "_insertPolyfillHostInCssText",
          value: function _insertPolyfillHostInCssText(selector) {
            return selector.replace(_colonHostContextRe, _polyfillHostContext).replace(_colonHostRe, _polyfillHost);
          }
        }]);

        return ShadowCss;
      }();

      var SafeSelector = /*#__PURE__*/function () {
        function SafeSelector(selector) {
          var _this125 = this;

          _classCallCheck(this, SafeSelector);

          this.placeholders = [];
          this.index = 0; // Replaces attribute selectors with placeholders.
          // The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.

          selector = this._escapeRegexMatches(selector, /(\[[^\]]*\])/g); // CSS allows for certain special characters to be used in selectors if they're escaped.
          // E.g. `.foo:blue` won't match a class called `foo:blue`, because the colon denotes a
          // pseudo-class, but writing `.foo\:blue` will match, because the colon was escaped.
          // Replace all escape sequences (`\` followed by a character) with a placeholder so
          // that our handling of pseudo-selectors doesn't mess with them.

          selector = this._escapeRegexMatches(selector, /(\\.)/g); // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.
          // WS and "+" would otherwise be interpreted as selector separators.

          this._content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, function (_, pseudo, exp) {
            var replaceBy = "__ph-".concat(_this125.index, "__");

            _this125.placeholders.push(exp);

            _this125.index++;
            return pseudo + replaceBy;
          });
        }

        _createClass2(SafeSelector, [{
          key: "restore",
          value: function restore(content) {
            var _this126 = this;

            return content.replace(/__ph-(\d+)__/g, function (_ph, index) {
              return _this126.placeholders[+index];
            });
          }
        }, {
          key: "content",
          value: function content() {
            return this._content;
          }
          /**
           * Replaces all of the substrings that match a regex within a
           * special string (e.g. `__ph-0__`, `__ph-1__`, etc).
           */

        }, {
          key: "_escapeRegexMatches",
          value: function _escapeRegexMatches(content, pattern) {
            var _this127 = this;

            return content.replace(pattern, function (_, keep) {
              var replaceBy = "__ph-".concat(_this127.index, "__");

              _this127.placeholders.push(keep);

              _this127.index++;
              return replaceBy;
            });
          }
        }]);

        return SafeSelector;
      }();

      var _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim;
      var _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
      var _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
      var _polyfillHost = '-shadowcsshost'; // note: :host-context pre-processed to -shadowcsshostcontext.

      var _polyfillHostContext = '-shadowcsscontext';

      var _parenSuffix = ')(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))?([^,{]*)';

      var _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');

      var _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');

      var _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';

      var _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
      var _shadowDOMSelectorsRe = [/::shadow/g, /::content/g, // Deprecated selectors
      /\/shadow-deep\//g, /\/shadow\//g]; // The deep combinator is deprecated in the CSS spec
      // Support for `>>>`, `deep`, `::ng-deep` is then also deprecated and will be removed in the future.
      // see https://github.com/angular/angular/pull/17677

      var _shadowDeepSelectors = /(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g;
      var _selectorReSuffix = '([>\\s~+\[.,{:][\\s\\S]*)?$';
      var _polyfillHostRe = /-shadowcsshost/gim;
      var _colonHostRe = /:host/gim;
      var _colonHostContextRe = /:host-context/gim;
      var _commentRe = /\/\*\s*[\s\S]*?\*\//g;

      function stripComments(input) {
        return input.replace(_commentRe, '');
      }

      var _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;

      function extractCommentsWithHash(input) {
        return input.match(_commentWithHashRe) || [];
      }

      var BLOCK_PLACEHOLDER = '%BLOCK%';
      var QUOTE_PLACEHOLDER = '%QUOTED%';
      var _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
      var _quotedRe = /%QUOTED%/g;
      var CONTENT_PAIRS = new Map([['{', '}']]);
      var QUOTE_PAIRS = new Map([["\"", "\""], ["'", "'"]]);

      var CssRule = function CssRule(selector, content) {
        _classCallCheck(this, CssRule);

        this.selector = selector;
        this.content = content;
      };

      function processRules(input, ruleCallback) {
        var inputWithEscapedQuotes = escapeBlocks(input, QUOTE_PAIRS, QUOTE_PLACEHOLDER);
        var inputWithEscapedBlocks = escapeBlocks(inputWithEscapedQuotes.escapedString, CONTENT_PAIRS, BLOCK_PLACEHOLDER);
        var nextBlockIndex = 0;
        var nextQuoteIndex = 0;
        return inputWithEscapedBlocks.escapedString.replace(_ruleRe, function () {
          var selector = arguments.length <= 2 ? undefined : arguments[2];
          var content = '';
          var suffix = arguments.length <= 4 ? undefined : arguments[4];
          var contentPrefix = '';

          if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {
            content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
            suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
            contentPrefix = '{';
          }

          var rule = ruleCallback(new CssRule(selector, content));
          return "".concat(arguments.length <= 1 ? undefined : arguments[1]).concat(rule.selector).concat(arguments.length <= 3 ? undefined : arguments[3]).concat(contentPrefix).concat(rule.content).concat(suffix);
        }).replace(_quotedRe, function () {
          return inputWithEscapedQuotes.blocks[nextQuoteIndex++];
        });
      }

      var StringWithEscapedBlocks = function StringWithEscapedBlocks(escapedString, blocks) {
        _classCallCheck(this, StringWithEscapedBlocks);

        this.escapedString = escapedString;
        this.blocks = blocks;
      };

      function escapeBlocks(input, charPairs, placeholder) {
        var resultParts = [];
        var escapedBlocks = [];
        var openCharCount = 0;
        var nonBlockStartIndex = 0;
        var blockStartIndex = -1;
        var openChar;
        var closeChar;

        for (var i = 0; i < input.length; i++) {
          var _char = input[i];

          if (_char === '\\') {
            i++;
          } else if (_char === closeChar) {
            openCharCount--;

            if (openCharCount === 0) {
              escapedBlocks.push(input.substring(blockStartIndex, i));
              resultParts.push(placeholder);
              nonBlockStartIndex = i;
              blockStartIndex = -1;
              openChar = closeChar = undefined;
            }
          } else if (_char === openChar) {
            openCharCount++;
          } else if (openCharCount === 0 && charPairs.has(_char)) {
            openChar = _char;
            closeChar = charPairs.get(_char);
            openCharCount = 1;
            blockStartIndex = i + 1;
            resultParts.push(input.substring(nonBlockStartIndex, blockStartIndex));
          }
        }

        if (blockStartIndex !== -1) {
          escapedBlocks.push(input.substring(blockStartIndex));
          resultParts.push(placeholder);
        } else {
          resultParts.push(input.substring(nonBlockStartIndex));
        }

        return new StringWithEscapedBlocks(resultParts.join(''), escapedBlocks);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var COMPONENT_VARIABLE = '%COMP%';
      var HOST_ATTR = "_nghost-".concat(COMPONENT_VARIABLE);
      var CONTENT_ATTR = "_ngcontent-".concat(COMPONENT_VARIABLE);

      var StylesCompileDependency = function StylesCompileDependency(name, moduleUrl, setValue) {
        _classCallCheck(this, StylesCompileDependency);

        this.name = name;
        this.moduleUrl = moduleUrl;
        this.setValue = setValue;
      };

      var CompiledStylesheet = function CompiledStylesheet(outputCtx, stylesVar, dependencies, isShimmed, meta) {
        _classCallCheck(this, CompiledStylesheet);

        this.outputCtx = outputCtx;
        this.stylesVar = stylesVar;
        this.dependencies = dependencies;
        this.isShimmed = isShimmed;
        this.meta = meta;
      };

      var StyleCompiler = /*#__PURE__*/function () {
        function StyleCompiler(_urlResolver) {
          _classCallCheck(this, StyleCompiler);

          this._urlResolver = _urlResolver;
          this._shadowCss = new ShadowCss();
        }

        _createClass2(StyleCompiler, [{
          key: "compileComponent",
          value: function compileComponent(outputCtx, comp) {
            var template = comp.template;
            return this._compileStyles(outputCtx, comp, new CompileStylesheetMetadata({
              styles: template.styles,
              styleUrls: template.styleUrls,
              moduleUrl: identifierModuleUrl(comp.type)
            }), this.needsStyleShim(comp), true);
          }
        }, {
          key: "compileStyles",
          value: function compileStyles(outputCtx, comp, stylesheet) {
            var shim = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.needsStyleShim(comp);
            return this._compileStyles(outputCtx, comp, stylesheet, shim, false);
          }
        }, {
          key: "needsStyleShim",
          value: function needsStyleShim(comp) {
            return comp.template.encapsulation === ViewEncapsulation.Emulated;
          }
        }, {
          key: "_compileStyles",
          value: function _compileStyles(outputCtx, comp, stylesheet, shim, isComponentStylesheet) {
            var _this128 = this;

            var styleExpressions = stylesheet.styles.map(function (plainStyle) {
              return literal(_this128._shimIfNeeded(plainStyle, shim));
            });
            var dependencies = [];
            stylesheet.styleUrls.forEach(function (styleUrl) {
              var exprIndex = styleExpressions.length; // Note: This placeholder will be filled later.

              styleExpressions.push(null);
              dependencies.push(new StylesCompileDependency(getStylesVarName(null), styleUrl, function (value) {
                return styleExpressions[exprIndex] = outputCtx.importExpr(value);
              }));
            }); // styles variable contains plain strings and arrays of other styles arrays (recursive),
            // so we set its type to dynamic.

            var stylesVar = getStylesVarName(isComponentStylesheet ? comp : null);
            var stmt = variable(stylesVar).set(literalArr(styleExpressions, new ArrayType(DYNAMIC_TYPE, [TypeModifier.Const]))).toDeclStmt(null, isComponentStylesheet ? [StmtModifier.Final] : [StmtModifier.Final, StmtModifier.Exported]);
            outputCtx.statements.push(stmt);
            return new CompiledStylesheet(outputCtx, stylesVar, dependencies, shim, stylesheet);
          }
        }, {
          key: "_shimIfNeeded",
          value: function _shimIfNeeded(style, shim) {
            return shim ? this._shadowCss.shimCssText(style, CONTENT_ATTR, HOST_ATTR) : style;
          }
        }]);

        return StyleCompiler;
      }();

      function getStylesVarName(component) {
        var result = "styles";

        if (component) {
          result += "_".concat(identifierName(component.type));
        }

        return result;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A path is an ordered set of elements. Typically a path is to  a
       * particular offset in a source file. The head of the list is the top
       * most node. The tail is the node that contains the offset directly.
       *
       * For example, the expression `a + b + c` might have an ast that looks
       * like:
       *     +
       *    / \
       *   a   +
       *      / \
       *     b   c
       *
       * The path to the node at offset 9 would be `['+' at 1-10, '+' at 7-10,
       * 'c' at 9-10]` and the path the node at offset 1 would be
       * `['+' at 1-10, 'a' at 1-2]`.
       */


      var AstPath = /*#__PURE__*/function () {
        function AstPath(path) {
          var position = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;

          _classCallCheck(this, AstPath);

          this.path = path;
          this.position = position;
        }

        _createClass2(AstPath, [{
          key: "empty",
          get: function get() {
            return !this.path || !this.path.length;
          }
        }, {
          key: "head",
          get: function get() {
            return this.path[0];
          }
        }, {
          key: "tail",
          get: function get() {
            return this.path[this.path.length - 1];
          }
        }, {
          key: "parentOf",
          value: function parentOf(node) {
            return node && this.path[this.path.indexOf(node) - 1];
          }
        }, {
          key: "childOf",
          value: function childOf(node) {
            return this.path[this.path.indexOf(node) + 1];
          }
        }, {
          key: "first",
          value: function first(ctor) {
            for (var i = this.path.length - 1; i >= 0; i--) {
              var item = this.path[i];
              if (item instanceof ctor) return item;
            }
          }
        }, {
          key: "push",
          value: function push(node) {
            this.path.push(node);
          }
        }, {
          key: "pop",
          value: function pop() {
            return this.path.pop();
          }
        }]);

        return AstPath;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var NodeWithI18n = function NodeWithI18n(sourceSpan, i18n) {
        _classCallCheck(this, NodeWithI18n);

        this.sourceSpan = sourceSpan;
        this.i18n = i18n;
      };

      var Text$3 = /*#__PURE__*/function (_NodeWithI18n) {
        _inherits(Text$3, _NodeWithI18n);

        var _super86 = _createSuper(Text$3);

        function Text$3(value, sourceSpan, i18n) {
          var _this129;

          _classCallCheck(this, Text$3);

          _this129 = _super86.call(this, sourceSpan, i18n);
          _this129.value = value;
          return _this129;
        }

        _createClass2(Text$3, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitText(this, context);
          }
        }]);

        return Text$3;
      }(NodeWithI18n);

      var Expansion = /*#__PURE__*/function (_NodeWithI18n2) {
        _inherits(Expansion, _NodeWithI18n2);

        var _super87 = _createSuper(Expansion);

        function Expansion(switchValue, type, cases, sourceSpan, switchValueSourceSpan, i18n) {
          var _this130;

          _classCallCheck(this, Expansion);

          _this130 = _super87.call(this, sourceSpan, i18n);
          _this130.switchValue = switchValue;
          _this130.type = type;
          _this130.cases = cases;
          _this130.switchValueSourceSpan = switchValueSourceSpan;
          return _this130;
        }

        _createClass2(Expansion, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitExpansion(this, context);
          }
        }]);

        return Expansion;
      }(NodeWithI18n);

      var ExpansionCase = /*#__PURE__*/function () {
        function ExpansionCase(value, expression, sourceSpan, valueSourceSpan, expSourceSpan) {
          _classCallCheck(this, ExpansionCase);

          this.value = value;
          this.expression = expression;
          this.sourceSpan = sourceSpan;
          this.valueSourceSpan = valueSourceSpan;
          this.expSourceSpan = expSourceSpan;
        }

        _createClass2(ExpansionCase, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitExpansionCase(this, context);
          }
        }]);

        return ExpansionCase;
      }();

      var Attribute = /*#__PURE__*/function (_NodeWithI18n3) {
        _inherits(Attribute, _NodeWithI18n3);

        var _super88 = _createSuper(Attribute);

        function Attribute(name, value, sourceSpan, valueSpan, i18n) {
          var _this131;

          _classCallCheck(this, Attribute);

          _this131 = _super88.call(this, sourceSpan, i18n);
          _this131.name = name;
          _this131.value = value;
          _this131.valueSpan = valueSpan;
          return _this131;
        }

        _createClass2(Attribute, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitAttribute(this, context);
          }
        }]);

        return Attribute;
      }(NodeWithI18n);

      var Element$1 = /*#__PURE__*/function (_NodeWithI18n4) {
        _inherits(Element$1, _NodeWithI18n4);

        var _super89 = _createSuper(Element$1);

        function Element$1(name, attrs, children, sourceSpan, startSourceSpan) {
          var _this132;

          var endSourceSpan = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
          var i18n = arguments.length > 6 ? arguments[6] : undefined;

          _classCallCheck(this, Element$1);

          _this132 = _super89.call(this, sourceSpan, i18n);
          _this132.name = name;
          _this132.attrs = attrs;
          _this132.children = children;
          _this132.startSourceSpan = startSourceSpan;
          _this132.endSourceSpan = endSourceSpan;
          return _this132;
        }

        _createClass2(Element$1, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitElement(this, context);
          }
        }]);

        return Element$1;
      }(NodeWithI18n);

      var Comment = /*#__PURE__*/function () {
        function Comment(value, sourceSpan) {
          _classCallCheck(this, Comment);

          this.value = value;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(Comment, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitComment(this, context);
          }
        }]);

        return Comment;
      }();

      function visitAll$1(visitor, nodes) {
        var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
        var result = [];
        var visit = visitor.visit ? function (ast) {
          return visitor.visit(ast, context) || ast.visit(visitor, context);
        } : function (ast) {
          return ast.visit(visitor, context);
        };
        nodes.forEach(function (ast) {
          var astResult = visit(ast);

          if (astResult) {
            result.push(astResult);
          }
        });
        return result;
      }

      var RecursiveVisitor$1 = /*#__PURE__*/function () {
        function RecursiveVisitor$1() {
          _classCallCheck(this, RecursiveVisitor$1);
        }

        _createClass2(RecursiveVisitor$1, [{
          key: "visitElement",
          value: function visitElement(ast, context) {
            this.visitChildren(context, function (visit) {
              visit(ast.attrs);
              visit(ast.children);
            });
          }
        }, {
          key: "visitAttribute",
          value: function visitAttribute(ast, context) {}
        }, {
          key: "visitText",
          value: function visitText(ast, context) {}
        }, {
          key: "visitComment",
          value: function visitComment(ast, context) {}
        }, {
          key: "visitExpansion",
          value: function visitExpansion(ast, context) {
            return this.visitChildren(context, function (visit) {
              visit(ast.cases);
            });
          }
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(ast, context) {}
        }, {
          key: "visitChildren",
          value: function visitChildren(context, cb) {
            var results = [];
            var t = this;

            function visit(children) {
              if (children) results.push(visitAll$1(t, children, context));
            }

            cb(visit);
            return Array.prototype.concat.apply([], results);
          }
        }]);

        return RecursiveVisitor$1;
      }();

      function spanOf(ast) {
        var start = ast.sourceSpan.start.offset;
        var end = ast.sourceSpan.end.offset;

        if (ast instanceof Element$1) {
          if (ast.endSourceSpan) {
            end = ast.endSourceSpan.end.offset;
          } else if (ast.children && ast.children.length) {
            end = spanOf(ast.children[ast.children.length - 1]).end;
          }
        }

        return {
          start: start,
          end: end
        };
      }

      function findNode(nodes, position) {
        var path = [];
        var visitor = new ( /*#__PURE__*/function (_RecursiveVisitor$) {
          _inherits(_class, _RecursiveVisitor$);

          var _super90 = _createSuper(_class);

          function _class() {
            _classCallCheck(this, _class);

            return _super90.apply(this, arguments);
          }

          _createClass2(_class, [{
            key: "visit",
            value: function visit(ast, context) {
              var span = spanOf(ast);

              if (span.start <= position && position < span.end) {
                path.push(ast);
              } else {
                // Returning a value here will result in the children being skipped.
                return true;
              }
            }
          }]);

          return _class;
        }(RecursiveVisitor$1))();
        visitAll$1(visitor, nodes);
        return new AstPath(path, position);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var TokenType;

      (function (TokenType) {
        TokenType[TokenType["TAG_OPEN_START"] = 0] = "TAG_OPEN_START";
        TokenType[TokenType["TAG_OPEN_END"] = 1] = "TAG_OPEN_END";
        TokenType[TokenType["TAG_OPEN_END_VOID"] = 2] = "TAG_OPEN_END_VOID";
        TokenType[TokenType["TAG_CLOSE"] = 3] = "TAG_CLOSE";
        TokenType[TokenType["INCOMPLETE_TAG_OPEN"] = 4] = "INCOMPLETE_TAG_OPEN";
        TokenType[TokenType["TEXT"] = 5] = "TEXT";
        TokenType[TokenType["ESCAPABLE_RAW_TEXT"] = 6] = "ESCAPABLE_RAW_TEXT";
        TokenType[TokenType["RAW_TEXT"] = 7] = "RAW_TEXT";
        TokenType[TokenType["COMMENT_START"] = 8] = "COMMENT_START";
        TokenType[TokenType["COMMENT_END"] = 9] = "COMMENT_END";
        TokenType[TokenType["CDATA_START"] = 10] = "CDATA_START";
        TokenType[TokenType["CDATA_END"] = 11] = "CDATA_END";
        TokenType[TokenType["ATTR_NAME"] = 12] = "ATTR_NAME";
        TokenType[TokenType["ATTR_QUOTE"] = 13] = "ATTR_QUOTE";
        TokenType[TokenType["ATTR_VALUE"] = 14] = "ATTR_VALUE";
        TokenType[TokenType["DOC_TYPE"] = 15] = "DOC_TYPE";
        TokenType[TokenType["EXPANSION_FORM_START"] = 16] = "EXPANSION_FORM_START";
        TokenType[TokenType["EXPANSION_CASE_VALUE"] = 17] = "EXPANSION_CASE_VALUE";
        TokenType[TokenType["EXPANSION_CASE_EXP_START"] = 18] = "EXPANSION_CASE_EXP_START";
        TokenType[TokenType["EXPANSION_CASE_EXP_END"] = 19] = "EXPANSION_CASE_EXP_END";
        TokenType[TokenType["EXPANSION_FORM_END"] = 20] = "EXPANSION_FORM_END";
        TokenType[TokenType["EOF"] = 21] = "EOF";
      })(TokenType || (TokenType = {}));

      var Token = function Token(type, parts, sourceSpan) {
        _classCallCheck(this, Token);

        this.type = type;
        this.parts = parts;
        this.sourceSpan = sourceSpan;
      };

      var TokenError = /*#__PURE__*/function (_ParseError) {
        _inherits(TokenError, _ParseError);

        var _super91 = _createSuper(TokenError);

        function TokenError(errorMsg, tokenType, span) {
          var _this133;

          _classCallCheck(this, TokenError);

          _this133 = _super91.call(this, span, errorMsg);
          _this133.tokenType = tokenType;
          return _this133;
        }

        return TokenError;
      }(ParseError);

      var TokenizeResult = function TokenizeResult(tokens, errors, nonNormalizedIcuExpressions) {
        _classCallCheck(this, TokenizeResult);

        this.tokens = tokens;
        this.errors = errors;
        this.nonNormalizedIcuExpressions = nonNormalizedIcuExpressions;
      };

      function tokenize(source, url, getTagDefinition) {
        var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
        var tokenizer = new _Tokenizer(new ParseSourceFile(source, url), getTagDefinition, options);
        tokenizer.tokenize();
        return new TokenizeResult(mergeTextTokens(tokenizer.tokens), tokenizer.errors, tokenizer.nonNormalizedIcuExpressions);
      }

      var _CR_OR_CRLF_REGEXP = /\r\n?/g;

      function _unexpectedCharacterErrorMsg(charCode) {
        var _char2 = charCode === $EOF ? 'EOF' : String.fromCharCode(charCode);

        return "Unexpected character \"".concat(_char2, "\"");
      }

      function _unknownEntityErrorMsg(entitySrc) {
        return "Unknown entity \"".concat(entitySrc, "\" - use the \"&#<decimal>;\" or  \"&#x<hex>;\" syntax");
      }

      function _unparsableEntityErrorMsg(type, entityStr) {
        return "Unable to parse entity \"".concat(entityStr, "\" - ").concat(type, " character reference entities must end with \";\"");
      }

      var CharacterReferenceType;

      (function (CharacterReferenceType) {
        CharacterReferenceType["HEX"] = "hexadecimal";
        CharacterReferenceType["DEC"] = "decimal";
      })(CharacterReferenceType || (CharacterReferenceType = {}));

      var _ControlFlowError = function _ControlFlowError(error) {
        _classCallCheck(this, _ControlFlowError);

        this.error = error;
      }; // See https://www.w3.org/TR/html51/syntax.html#writing-html-documents


      var _Tokenizer = /*#__PURE__*/function () {
        /**
         * @param _file The html source file being tokenized.
         * @param _getTagDefinition A function that will retrieve a tag definition for a given tag name.
         * @param options Configuration of the tokenization.
         */
        function _Tokenizer(_file, _getTagDefinition, options) {
          _classCallCheck(this, _Tokenizer);

          this._getTagDefinition = _getTagDefinition;
          this._currentTokenStart = null;
          this._currentTokenType = null;
          this._expansionCaseStack = [];
          this._inInterpolation = false;
          this.tokens = [];
          this.errors = [];
          this.nonNormalizedIcuExpressions = [];
          this._tokenizeIcu = options.tokenizeExpansionForms || false;
          this._interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;
          this._leadingTriviaCodePoints = options.leadingTriviaChars && options.leadingTriviaChars.map(function (c) {
            return c.codePointAt(0) || 0;
          });
          var range = options.range || {
            endPos: _file.content.length,
            startPos: 0,
            startLine: 0,
            startCol: 0
          };
          this._cursor = options.escapedString ? new EscapedCharacterCursor(_file, range) : new PlainCharacterCursor(_file, range);
          this._preserveLineEndings = options.preserveLineEndings || false;
          this._escapedString = options.escapedString || false;
          this._i18nNormalizeLineEndingsInICUs = options.i18nNormalizeLineEndingsInICUs || false;

          try {
            this._cursor.init();
          } catch (e) {
            this.handleError(e);
          }
        }

        _createClass2(_Tokenizer, [{
          key: "_processCarriageReturns",
          value: function _processCarriageReturns(content) {
            if (this._preserveLineEndings) {
              return content;
            } // https://www.w3.org/TR/html51/syntax.html#preprocessing-the-input-stream
            // In order to keep the original position in the source, we can not
            // pre-process it.
            // Instead CRs are processed right before instantiating the tokens.


            return content.replace(_CR_OR_CRLF_REGEXP, '\n');
          }
        }, {
          key: "tokenize",
          value: function tokenize() {
            while (this._cursor.peek() !== $EOF) {
              var _start2 = this._cursor.clone();

              try {
                if (this._attemptCharCode($LT)) {
                  if (this._attemptCharCode($BANG)) {
                    if (this._attemptCharCode($LBRACKET)) {
                      this._consumeCdata(_start2);
                    } else if (this._attemptCharCode($MINUS)) {
                      this._consumeComment(_start2);
                    } else {
                      this._consumeDocType(_start2);
                    }
                  } else if (this._attemptCharCode($SLASH)) {
                    this._consumeTagClose(_start2);
                  } else {
                    this._consumeTagOpen(_start2);
                  }
                } else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {
                  this._consumeText();
                }
              } catch (e) {
                this.handleError(e);
              }
            }

            this._beginToken(TokenType.EOF);

            this._endToken([]);
          }
          /**
           * @returns whether an ICU token has been created
           * @internal
           */

        }, {
          key: "_tokenizeExpansionForm",
          value: function _tokenizeExpansionForm() {
            if (this.isExpansionFormStart()) {
              this._consumeExpansionFormStart();

              return true;
            }

            if (isExpansionCaseStart(this._cursor.peek()) && this._isInExpansionForm()) {
              this._consumeExpansionCaseStart();

              return true;
            }

            if (this._cursor.peek() === $RBRACE) {
              if (this._isInExpansionCase()) {
                this._consumeExpansionCaseEnd();

                return true;
              }

              if (this._isInExpansionForm()) {
                this._consumeExpansionFormEnd();

                return true;
              }
            }

            return false;
          }
        }, {
          key: "_beginToken",
          value: function _beginToken(type) {
            var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._cursor.clone();
            this._currentTokenStart = start;
            this._currentTokenType = type;
          }
        }, {
          key: "_endToken",
          value: function _endToken(parts, end) {
            if (this._currentTokenStart === null) {
              throw new TokenError('Programming error - attempted to end a token when there was no start to the token', this._currentTokenType, this._cursor.getSpan(end));
            }

            if (this._currentTokenType === null) {
              throw new TokenError('Programming error - attempted to end a token which has no token type', null, this._cursor.getSpan(this._currentTokenStart));
            }

            var token = new Token(this._currentTokenType, parts, this._cursor.getSpan(this._currentTokenStart, this._leadingTriviaCodePoints));
            this.tokens.push(token);
            this._currentTokenStart = null;
            this._currentTokenType = null;
            return token;
          }
        }, {
          key: "_createError",
          value: function _createError(msg, span) {
            if (this._isInExpansionForm()) {
              msg += " (Do you have an unescaped \"{\" in your template? Use \"{{ '{' }}\") to escape it.)";
            }

            var error = new TokenError(msg, this._currentTokenType, span);
            this._currentTokenStart = null;
            this._currentTokenType = null;
            return new _ControlFlowError(error);
          }
        }, {
          key: "handleError",
          value: function handleError(e) {
            if (e instanceof CursorError) {
              e = this._createError(e.msg, this._cursor.getSpan(e.cursor));
            }

            if (e instanceof _ControlFlowError) {
              this.errors.push(e.error);
            } else {
              throw e;
            }
          }
        }, {
          key: "_attemptCharCode",
          value: function _attemptCharCode(charCode) {
            if (this._cursor.peek() === charCode) {
              this._cursor.advance();

              return true;
            }

            return false;
          }
        }, {
          key: "_attemptCharCodeCaseInsensitive",
          value: function _attemptCharCodeCaseInsensitive(charCode) {
            if (compareCharCodeCaseInsensitive(this._cursor.peek(), charCode)) {
              this._cursor.advance();

              return true;
            }

            return false;
          }
        }, {
          key: "_requireCharCode",
          value: function _requireCharCode(charCode) {
            var location = this._cursor.clone();

            if (!this._attemptCharCode(charCode)) {
              throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location));
            }
          }
        }, {
          key: "_attemptStr",
          value: function _attemptStr(chars) {
            var len = chars.length;

            if (this._cursor.charsLeft() < len) {
              return false;
            }

            var initialPosition = this._cursor.clone();

            for (var i = 0; i < len; i++) {
              if (!this._attemptCharCode(chars.charCodeAt(i))) {
                // If attempting to parse the string fails, we want to reset the parser
                // to where it was before the attempt
                this._cursor = initialPosition;
                return false;
              }
            }

            return true;
          }
        }, {
          key: "_attemptStrCaseInsensitive",
          value: function _attemptStrCaseInsensitive(chars) {
            for (var i = 0; i < chars.length; i++) {
              if (!this._attemptCharCodeCaseInsensitive(chars.charCodeAt(i))) {
                return false;
              }
            }

            return true;
          }
        }, {
          key: "_requireStr",
          value: function _requireStr(chars) {
            var location = this._cursor.clone();

            if (!this._attemptStr(chars)) {
              throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location));
            }
          }
        }, {
          key: "_attemptCharCodeUntilFn",
          value: function _attemptCharCodeUntilFn(predicate) {
            while (!predicate(this._cursor.peek())) {
              this._cursor.advance();
            }
          }
        }, {
          key: "_requireCharCodeUntilFn",
          value: function _requireCharCodeUntilFn(predicate, len) {
            var start = this._cursor.clone();

            this._attemptCharCodeUntilFn(predicate);

            if (this._cursor.diff(start) < len) {
              throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));
            }
          }
        }, {
          key: "_attemptUntilChar",
          value: function _attemptUntilChar(_char3) {
            while (this._cursor.peek() !== _char3) {
              this._cursor.advance();
            }
          }
        }, {
          key: "_readChar",
          value: function _readChar(decodeEntities) {
            if (decodeEntities && this._cursor.peek() === $AMPERSAND) {
              return this._decodeEntity();
            } else {
              // Don't rely upon reading directly from `_input` as the actual char value
              // may have been generated from an escape sequence.
              var _char4 = String.fromCodePoint(this._cursor.peek());

              this._cursor.advance();

              return _char4;
            }
          }
        }, {
          key: "_decodeEntity",
          value: function _decodeEntity() {
            var start = this._cursor.clone();

            this._cursor.advance();

            if (this._attemptCharCode($HASH)) {
              var isHex = this._attemptCharCode($x) || this._attemptCharCode($X);

              var codeStart = this._cursor.clone();

              this._attemptCharCodeUntilFn(isDigitEntityEnd);

              if (this._cursor.peek() != $SEMICOLON) {
                // Advance cursor to include the peeked character in the string provided to the error
                // message.
                this._cursor.advance();

                var entityType = isHex ? CharacterReferenceType.HEX : CharacterReferenceType.DEC;
                throw this._createError(_unparsableEntityErrorMsg(entityType, this._cursor.getChars(start)), this._cursor.getSpan());
              }

              var strNum = this._cursor.getChars(codeStart);

              this._cursor.advance();

              try {
                var charCode = parseInt(strNum, isHex ? 16 : 10);
                return String.fromCharCode(charCode);
              } catch (_a) {
                throw this._createError(_unknownEntityErrorMsg(this._cursor.getChars(start)), this._cursor.getSpan());
              }
            } else {
              var nameStart = this._cursor.clone();

              this._attemptCharCodeUntilFn(isNamedEntityEnd);

              if (this._cursor.peek() != $SEMICOLON) {
                this._cursor = nameStart;
                return '&';
              }

              var name = this._cursor.getChars(nameStart);

              this._cursor.advance();

              var _char5 = NAMED_ENTITIES[name];

              if (!_char5) {
                throw this._createError(_unknownEntityErrorMsg(name), this._cursor.getSpan(start));
              }

              return _char5;
            }
          }
        }, {
          key: "_consumeRawText",
          value: function _consumeRawText(decodeEntities, endMarkerPredicate) {
            this._beginToken(decodeEntities ? TokenType.ESCAPABLE_RAW_TEXT : TokenType.RAW_TEXT);

            var parts = [];

            while (true) {
              var tagCloseStart = this._cursor.clone();

              var foundEndMarker = endMarkerPredicate();
              this._cursor = tagCloseStart;

              if (foundEndMarker) {
                break;
              }

              parts.push(this._readChar(decodeEntities));
            }

            return this._endToken([this._processCarriageReturns(parts.join(''))]);
          }
        }, {
          key: "_consumeComment",
          value: function _consumeComment(start) {
            var _this134 = this;

            this._beginToken(TokenType.COMMENT_START, start);

            this._requireCharCode($MINUS);

            this._endToken([]);

            this._consumeRawText(false, function () {
              return _this134._attemptStr('-->');
            });

            this._beginToken(TokenType.COMMENT_END);

            this._requireStr('-->');

            this._endToken([]);
          }
        }, {
          key: "_consumeCdata",
          value: function _consumeCdata(start) {
            var _this135 = this;

            this._beginToken(TokenType.CDATA_START, start);

            this._requireStr('CDATA[');

            this._endToken([]);

            this._consumeRawText(false, function () {
              return _this135._attemptStr(']]>');
            });

            this._beginToken(TokenType.CDATA_END);

            this._requireStr(']]>');

            this._endToken([]);
          }
        }, {
          key: "_consumeDocType",
          value: function _consumeDocType(start) {
            this._beginToken(TokenType.DOC_TYPE, start);

            var contentStart = this._cursor.clone();

            this._attemptUntilChar($GT);

            var content = this._cursor.getChars(contentStart);

            this._cursor.advance();

            this._endToken([content]);
          }
        }, {
          key: "_consumePrefixAndName",
          value: function _consumePrefixAndName() {
            var nameOrPrefixStart = this._cursor.clone();

            var prefix = '';

            while (this._cursor.peek() !== $COLON && !isPrefixEnd(this._cursor.peek())) {
              this._cursor.advance();
            }

            var nameStart;

            if (this._cursor.peek() === $COLON) {
              prefix = this._cursor.getChars(nameOrPrefixStart);

              this._cursor.advance();

              nameStart = this._cursor.clone();
            } else {
              nameStart = nameOrPrefixStart;
            }

            this._requireCharCodeUntilFn(isNameEnd, prefix === '' ? 0 : 1);

            var name = this._cursor.getChars(nameStart);

            return [prefix, name];
          }
        }, {
          key: "_consumeTagOpen",
          value: function _consumeTagOpen(start) {
            var tagName;
            var prefix;
            var openTagToken;

            try {
              if (!isAsciiLetter(this._cursor.peek())) {
                throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));
              }

              openTagToken = this._consumeTagOpenStart(start);
              prefix = openTagToken.parts[0];
              tagName = openTagToken.parts[1];

              this._attemptCharCodeUntilFn(isNotWhitespace);

              while (this._cursor.peek() !== $SLASH && this._cursor.peek() !== $GT && this._cursor.peek() !== $LT) {
                this._consumeAttributeName();

                this._attemptCharCodeUntilFn(isNotWhitespace);

                if (this._attemptCharCode($EQ)) {
                  this._attemptCharCodeUntilFn(isNotWhitespace);

                  this._consumeAttributeValue();
                }

                this._attemptCharCodeUntilFn(isNotWhitespace);
              }

              this._consumeTagOpenEnd();
            } catch (e) {
              if (e instanceof _ControlFlowError) {
                if (openTagToken) {
                  // We errored before we could close the opening tag, so it is incomplete.
                  openTagToken.type = TokenType.INCOMPLETE_TAG_OPEN;
                } else {
                  // When the start tag is invalid, assume we want a "<" as text.
                  // Back to back text tokens are merged at the end.
                  this._beginToken(TokenType.TEXT, start);

                  this._endToken(['<']);
                }

                return;
              }

              throw e;
            }

            var contentTokenType = this._getTagDefinition(tagName).getContentType(prefix);

            if (contentTokenType === TagContentType.RAW_TEXT) {
              this._consumeRawTextWithTagClose(prefix, tagName, false);
            } else if (contentTokenType === TagContentType.ESCAPABLE_RAW_TEXT) {
              this._consumeRawTextWithTagClose(prefix, tagName, true);
            }
          }
        }, {
          key: "_consumeRawTextWithTagClose",
          value: function _consumeRawTextWithTagClose(prefix, tagName, decodeEntities) {
            var _this136 = this;

            this._consumeRawText(decodeEntities, function () {
              if (!_this136._attemptCharCode($LT)) return false;
              if (!_this136._attemptCharCode($SLASH)) return false;

              _this136._attemptCharCodeUntilFn(isNotWhitespace);

              if (!_this136._attemptStrCaseInsensitive(tagName)) return false;

              _this136._attemptCharCodeUntilFn(isNotWhitespace);

              return _this136._attemptCharCode($GT);
            });

            this._beginToken(TokenType.TAG_CLOSE);

            this._requireCharCodeUntilFn(function (code) {
              return code === $GT;
            }, 3);

            this._cursor.advance(); // Consume the `>`


            this._endToken([prefix, tagName]);
          }
        }, {
          key: "_consumeTagOpenStart",
          value: function _consumeTagOpenStart(start) {
            this._beginToken(TokenType.TAG_OPEN_START, start);

            var parts = this._consumePrefixAndName();

            return this._endToken(parts);
          }
        }, {
          key: "_consumeAttributeName",
          value: function _consumeAttributeName() {
            var attrNameStart = this._cursor.peek();

            if (attrNameStart === $SQ || attrNameStart === $DQ) {
              throw this._createError(_unexpectedCharacterErrorMsg(attrNameStart), this._cursor.getSpan());
            }

            this._beginToken(TokenType.ATTR_NAME);

            var prefixAndName = this._consumePrefixAndName();

            this._endToken(prefixAndName);
          }
        }, {
          key: "_consumeAttributeValue",
          value: function _consumeAttributeValue() {
            var value;

            if (this._cursor.peek() === $SQ || this._cursor.peek() === $DQ) {
              this._beginToken(TokenType.ATTR_QUOTE);

              var quoteChar = this._cursor.peek();

              this._cursor.advance();

              this._endToken([String.fromCodePoint(quoteChar)]);

              this._beginToken(TokenType.ATTR_VALUE);

              var parts = [];

              while (this._cursor.peek() !== quoteChar) {
                parts.push(this._readChar(true));
              }

              value = parts.join('');

              this._endToken([this._processCarriageReturns(value)]);

              this._beginToken(TokenType.ATTR_QUOTE);

              this._cursor.advance();

              this._endToken([String.fromCodePoint(quoteChar)]);
            } else {
              this._beginToken(TokenType.ATTR_VALUE);

              var valueStart = this._cursor.clone();

              this._requireCharCodeUntilFn(isNameEnd, 1);

              value = this._cursor.getChars(valueStart);

              this._endToken([this._processCarriageReturns(value)]);
            }
          }
        }, {
          key: "_consumeTagOpenEnd",
          value: function _consumeTagOpenEnd() {
            var tokenType = this._attemptCharCode($SLASH) ? TokenType.TAG_OPEN_END_VOID : TokenType.TAG_OPEN_END;

            this._beginToken(tokenType);

            this._requireCharCode($GT);

            this._endToken([]);
          }
        }, {
          key: "_consumeTagClose",
          value: function _consumeTagClose(start) {
            this._beginToken(TokenType.TAG_CLOSE, start);

            this._attemptCharCodeUntilFn(isNotWhitespace);

            var prefixAndName = this._consumePrefixAndName();

            this._attemptCharCodeUntilFn(isNotWhitespace);

            this._requireCharCode($GT);

            this._endToken(prefixAndName);
          }
        }, {
          key: "_consumeExpansionFormStart",
          value: function _consumeExpansionFormStart() {
            this._beginToken(TokenType.EXPANSION_FORM_START);

            this._requireCharCode($LBRACE);

            this._endToken([]);

            this._expansionCaseStack.push(TokenType.EXPANSION_FORM_START);

            this._beginToken(TokenType.RAW_TEXT);

            var condition = this._readUntil($COMMA);

            var normalizedCondition = this._processCarriageReturns(condition);

            if (this._i18nNormalizeLineEndingsInICUs) {
              // We explicitly want to normalize line endings for this text.
              this._endToken([normalizedCondition]);
            } else {
              // We are not normalizing line endings.
              var conditionToken = this._endToken([condition]);

              if (normalizedCondition !== condition) {
                this.nonNormalizedIcuExpressions.push(conditionToken);
              }
            }

            this._requireCharCode($COMMA);

            this._attemptCharCodeUntilFn(isNotWhitespace);

            this._beginToken(TokenType.RAW_TEXT);

            var type = this._readUntil($COMMA);

            this._endToken([type]);

            this._requireCharCode($COMMA);

            this._attemptCharCodeUntilFn(isNotWhitespace);
          }
        }, {
          key: "_consumeExpansionCaseStart",
          value: function _consumeExpansionCaseStart() {
            this._beginToken(TokenType.EXPANSION_CASE_VALUE);

            var value = this._readUntil($LBRACE).trim();

            this._endToken([value]);

            this._attemptCharCodeUntilFn(isNotWhitespace);

            this._beginToken(TokenType.EXPANSION_CASE_EXP_START);

            this._requireCharCode($LBRACE);

            this._endToken([]);

            this._attemptCharCodeUntilFn(isNotWhitespace);

            this._expansionCaseStack.push(TokenType.EXPANSION_CASE_EXP_START);
          }
        }, {
          key: "_consumeExpansionCaseEnd",
          value: function _consumeExpansionCaseEnd() {
            this._beginToken(TokenType.EXPANSION_CASE_EXP_END);

            this._requireCharCode($RBRACE);

            this._endToken([]);

            this._attemptCharCodeUntilFn(isNotWhitespace);

            this._expansionCaseStack.pop();
          }
        }, {
          key: "_consumeExpansionFormEnd",
          value: function _consumeExpansionFormEnd() {
            this._beginToken(TokenType.EXPANSION_FORM_END);

            this._requireCharCode($RBRACE);

            this._endToken([]);

            this._expansionCaseStack.pop();
          }
        }, {
          key: "_consumeText",
          value: function _consumeText() {
            var start = this._cursor.clone();

            this._beginToken(TokenType.TEXT, start);

            var parts = [];

            do {
              if (this._interpolationConfig && this._attemptStr(this._interpolationConfig.start)) {
                parts.push(this._interpolationConfig.start);
                this._inInterpolation = true;
              } else if (this._interpolationConfig && this._inInterpolation && this._attemptStr(this._interpolationConfig.end)) {
                parts.push(this._interpolationConfig.end);
                this._inInterpolation = false;
              } else {
                parts.push(this._readChar(true));
              }
            } while (!this._isTextEnd());

            this._endToken([this._processCarriageReturns(parts.join(''))]);
          }
        }, {
          key: "_isTextEnd",
          value: function _isTextEnd() {
            if (this._cursor.peek() === $LT || this._cursor.peek() === $EOF) {
              return true;
            }

            if (this._tokenizeIcu && !this._inInterpolation) {
              if (this.isExpansionFormStart()) {
                // start of an expansion form
                return true;
              }

              if (this._cursor.peek() === $RBRACE && this._isInExpansionCase()) {
                // end of and expansion case
                return true;
              }
            }

            return false;
          }
        }, {
          key: "_readUntil",
          value: function _readUntil(_char6) {
            var start = this._cursor.clone();

            this._attemptUntilChar(_char6);

            return this._cursor.getChars(start);
          }
        }, {
          key: "_isInExpansionCase",
          value: function _isInExpansionCase() {
            return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === TokenType.EXPANSION_CASE_EXP_START;
          }
        }, {
          key: "_isInExpansionForm",
          value: function _isInExpansionForm() {
            return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === TokenType.EXPANSION_FORM_START;
          }
        }, {
          key: "isExpansionFormStart",
          value: function isExpansionFormStart() {
            if (this._cursor.peek() !== $LBRACE) {
              return false;
            }

            if (this._interpolationConfig) {
              var _start3 = this._cursor.clone();

              var isInterpolation = this._attemptStr(this._interpolationConfig.start);

              this._cursor = _start3;
              return !isInterpolation;
            }

            return true;
          }
        }]);

        return _Tokenizer;
      }();

      function isNotWhitespace(code) {
        return !isWhitespace(code) || code === $EOF;
      }

      function isNameEnd(code) {
        return isWhitespace(code) || code === $GT || code === $LT || code === $SLASH || code === $SQ || code === $DQ || code === $EQ;
      }

      function isPrefixEnd(code) {
        return (code < $a || $z < code) && (code < $A || $Z < code) && (code < $0 || code > $9);
      }

      function isDigitEntityEnd(code) {
        return code == $SEMICOLON || code == $EOF || !isAsciiHexDigit(code);
      }

      function isNamedEntityEnd(code) {
        return code == $SEMICOLON || code == $EOF || !isAsciiLetter(code);
      }

      function isExpansionCaseStart(peek) {
        return peek !== $RBRACE;
      }

      function compareCharCodeCaseInsensitive(code1, code2) {
        return toUpperCaseCharCode(code1) == toUpperCaseCharCode(code2);
      }

      function toUpperCaseCharCode(code) {
        return code >= $a && code <= $z ? code - $a + $A : code;
      }

      function mergeTextTokens(srcTokens) {
        var dstTokens = [];
        var lastDstToken = undefined;

        for (var i = 0; i < srcTokens.length; i++) {
          var token = srcTokens[i];

          if (lastDstToken && lastDstToken.type == TokenType.TEXT && token.type == TokenType.TEXT) {
            lastDstToken.parts[0] += token.parts[0];
            lastDstToken.sourceSpan.end = token.sourceSpan.end;
          } else {
            lastDstToken = token;
            dstTokens.push(lastDstToken);
          }
        }

        return dstTokens;
      }

      var PlainCharacterCursor = /*#__PURE__*/function () {
        function PlainCharacterCursor(fileOrCursor, range) {
          _classCallCheck(this, PlainCharacterCursor);

          if (fileOrCursor instanceof PlainCharacterCursor) {
            this.file = fileOrCursor.file;
            this.input = fileOrCursor.input;
            this.end = fileOrCursor.end;
            var state = fileOrCursor.state; // Note: avoid using `{...fileOrCursor.state}` here as that has a severe performance penalty.
            // In ES5 bundles the object spread operator is translated into the `__assign` helper, which
            // is not optimized by VMs as efficiently as a raw object literal. Since this constructor is
            // called in tight loops, this difference matters.

            this.state = {
              peek: state.peek,
              offset: state.offset,
              line: state.line,
              column: state.column
            };
          } else {
            if (!range) {
              throw new Error('Programming error: the range argument must be provided with a file argument.');
            }

            this.file = fileOrCursor;
            this.input = fileOrCursor.content;
            this.end = range.endPos;
            this.state = {
              peek: -1,
              offset: range.startPos,
              line: range.startLine,
              column: range.startCol
            };
          }
        }

        _createClass2(PlainCharacterCursor, [{
          key: "clone",
          value: function clone() {
            return new PlainCharacterCursor(this);
          }
        }, {
          key: "peek",
          value: function peek() {
            return this.state.peek;
          }
        }, {
          key: "charsLeft",
          value: function charsLeft() {
            return this.end - this.state.offset;
          }
        }, {
          key: "diff",
          value: function diff(other) {
            return this.state.offset - other.state.offset;
          }
        }, {
          key: "advance",
          value: function advance() {
            this.advanceState(this.state);
          }
        }, {
          key: "init",
          value: function init() {
            this.updatePeek(this.state);
          }
        }, {
          key: "getSpan",
          value: function getSpan(start, leadingTriviaCodePoints) {
            start = start || this;
            var fullStart = start;

            if (leadingTriviaCodePoints) {
              while (this.diff(start) > 0 && leadingTriviaCodePoints.indexOf(start.peek()) !== -1) {
                if (fullStart === start) {
                  start = start.clone();
                }

                start.advance();
              }
            }

            var startLocation = this.locationFromCursor(start);
            var endLocation = this.locationFromCursor(this);
            var fullStartLocation = fullStart !== start ? this.locationFromCursor(fullStart) : startLocation;
            return new ParseSourceSpan(startLocation, endLocation, fullStartLocation);
          }
        }, {
          key: "getChars",
          value: function getChars(start) {
            return this.input.substring(start.state.offset, this.state.offset);
          }
        }, {
          key: "charAt",
          value: function charAt(pos) {
            return this.input.charCodeAt(pos);
          }
        }, {
          key: "advanceState",
          value: function advanceState(state) {
            if (state.offset >= this.end) {
              this.state = state;
              throw new CursorError('Unexpected character "EOF"', this);
            }

            var currentChar = this.charAt(state.offset);

            if (currentChar === $LF) {
              state.line++;
              state.column = 0;
            } else if (!isNewLine(currentChar)) {
              state.column++;
            }

            state.offset++;
            this.updatePeek(state);
          }
        }, {
          key: "updatePeek",
          value: function updatePeek(state) {
            state.peek = state.offset >= this.end ? $EOF : this.charAt(state.offset);
          }
        }, {
          key: "locationFromCursor",
          value: function locationFromCursor(cursor) {
            return new ParseLocation(cursor.file, cursor.state.offset, cursor.state.line, cursor.state.column);
          }
        }]);

        return PlainCharacterCursor;
      }();

      var EscapedCharacterCursor = /*#__PURE__*/function (_PlainCharacterCursor) {
        _inherits(EscapedCharacterCursor, _PlainCharacterCursor);

        var _super92 = _createSuper(EscapedCharacterCursor);

        function EscapedCharacterCursor(fileOrCursor, range) {
          var _this137;

          _classCallCheck(this, EscapedCharacterCursor);

          if (fileOrCursor instanceof EscapedCharacterCursor) {
            _this137 = _super92.call(this, fileOrCursor);
            _this137.internalState = Object.assign({}, fileOrCursor.internalState);
          } else {
            _this137 = _super92.call(this, fileOrCursor, range);
            _this137.internalState = _this137.state;
          }

          return _possibleConstructorReturn(_this137);
        }

        _createClass2(EscapedCharacterCursor, [{
          key: "advance",
          value: function advance() {
            this.state = this.internalState;

            _get(_getPrototypeOf(EscapedCharacterCursor.prototype), "advance", this).call(this);

            this.processEscapeSequence();
          }
        }, {
          key: "init",
          value: function init() {
            _get(_getPrototypeOf(EscapedCharacterCursor.prototype), "init", this).call(this);

            this.processEscapeSequence();
          }
        }, {
          key: "clone",
          value: function clone() {
            return new EscapedCharacterCursor(this);
          }
        }, {
          key: "getChars",
          value: function getChars(start) {
            var cursor = start.clone();
            var chars = '';

            while (cursor.internalState.offset < this.internalState.offset) {
              chars += String.fromCodePoint(cursor.peek());
              cursor.advance();
            }

            return chars;
          }
          /**
           * Process the escape sequence that starts at the current position in the text.
           *
           * This method is called to ensure that `peek` has the unescaped value of escape sequences.
           */

        }, {
          key: "processEscapeSequence",
          value: function processEscapeSequence() {
            var _this138 = this;

            var peek = function peek() {
              return _this138.internalState.peek;
            };

            if (peek() === $BACKSLASH) {
              // We have hit an escape sequence so we need the internal state to become independent
              // of the external state.
              this.internalState = Object.assign({}, this.state); // Move past the backslash

              this.advanceState(this.internalState); // First check for standard control char sequences

              if (peek() === $n) {
                this.state.peek = $LF;
              } else if (peek() === $r) {
                this.state.peek = $CR;
              } else if (peek() === $v) {
                this.state.peek = $VTAB;
              } else if (peek() === $t) {
                this.state.peek = $TAB;
              } else if (peek() === $b) {
                this.state.peek = $BSPACE;
              } else if (peek() === $f) {
                this.state.peek = $FF;
              } // Now consider more complex sequences
              else if (peek() === $u) {
                // Unicode code-point sequence
                this.advanceState(this.internalState); // advance past the `u` char

                if (peek() === $LBRACE) {
                  // Variable length Unicode, e.g. `\x{123}`
                  this.advanceState(this.internalState); // advance past the `{` char
                  // Advance past the variable number of hex digits until we hit a `}` char

                  var digitStart = this.clone();
                  var length = 0;

                  while (peek() !== $RBRACE) {
                    this.advanceState(this.internalState);
                    length++;
                  }

                  this.state.peek = this.decodeHexDigits(digitStart, length);
                } else {
                  // Fixed length Unicode, e.g. `\u1234`
                  var _digitStart = this.clone();

                  this.advanceState(this.internalState);
                  this.advanceState(this.internalState);
                  this.advanceState(this.internalState);
                  this.state.peek = this.decodeHexDigits(_digitStart, 4);
                }
              } else if (peek() === $x) {
                // Hex char code, e.g. `\x2F`
                this.advanceState(this.internalState); // advance past the `x` char

                var _digitStart2 = this.clone();

                this.advanceState(this.internalState);
                this.state.peek = this.decodeHexDigits(_digitStart2, 2);
              } else if (isOctalDigit(peek())) {
                // Octal char code, e.g. `\012`,
                var octal = '';
                var _length = 0;
                var previous = this.clone();

                while (isOctalDigit(peek()) && _length < 3) {
                  previous = this.clone();
                  octal += String.fromCodePoint(peek());
                  this.advanceState(this.internalState);
                  _length++;
                }

                this.state.peek = parseInt(octal, 8); // Backup one char

                this.internalState = previous.internalState;
              } else if (isNewLine(this.internalState.peek)) {
                // Line continuation `\` followed by a new line
                this.advanceState(this.internalState); // advance over the newline

                this.state = this.internalState;
              } else {
                // If none of the `if` blocks were executed then we just have an escaped normal character.
                // In that case we just, effectively, skip the backslash from the character.
                this.state.peek = this.internalState.peek;
              }
            }
          }
        }, {
          key: "decodeHexDigits",
          value: function decodeHexDigits(start, length) {
            var hex = this.input.substr(start.internalState.offset, length);
            var charCode = parseInt(hex, 16);

            if (!isNaN(charCode)) {
              return charCode;
            } else {
              start.state = start.internalState;
              throw new CursorError('Invalid hexadecimal escape sequence', start);
            }
          }
        }]);

        return EscapedCharacterCursor;
      }(PlainCharacterCursor);

      var CursorError = function CursorError(msg, cursor) {
        _classCallCheck(this, CursorError);

        this.msg = msg;
        this.cursor = cursor;
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var TreeError = /*#__PURE__*/function (_ParseError2) {
        _inherits(TreeError, _ParseError2);

        var _super93 = _createSuper(TreeError);

        function TreeError(elementName, span, msg) {
          var _this139;

          _classCallCheck(this, TreeError);

          _this139 = _super93.call(this, span, msg);
          _this139.elementName = elementName;
          return _this139;
        }

        _createClass2(TreeError, null, [{
          key: "create",
          value: function create(elementName, span, msg) {
            return new TreeError(elementName, span, msg);
          }
        }]);

        return TreeError;
      }(ParseError);

      var ParseTreeResult = function ParseTreeResult(rootNodes, errors) {
        _classCallCheck(this, ParseTreeResult);

        this.rootNodes = rootNodes;
        this.errors = errors;
      };

      var Parser = /*#__PURE__*/function () {
        function Parser(getTagDefinition) {
          _classCallCheck(this, Parser);

          this.getTagDefinition = getTagDefinition;
        }

        _createClass2(Parser, [{
          key: "parse",
          value: function parse(source, url, options) {
            var tokenizeResult = tokenize(source, url, this.getTagDefinition, options);
            var parser = new _TreeBuilder(tokenizeResult.tokens, this.getTagDefinition);
            parser.build();
            return new ParseTreeResult(parser.rootNodes, tokenizeResult.errors.concat(parser.errors));
          }
        }]);

        return Parser;
      }();

      var _TreeBuilder = /*#__PURE__*/function () {
        function _TreeBuilder(tokens, getTagDefinition) {
          _classCallCheck(this, _TreeBuilder);

          this.tokens = tokens;
          this.getTagDefinition = getTagDefinition;
          this._index = -1;
          this._elementStack = [];
          this.rootNodes = [];
          this.errors = [];

          this._advance();
        }

        _createClass2(_TreeBuilder, [{
          key: "build",
          value: function build() {
            while (this._peek.type !== TokenType.EOF) {
              if (this._peek.type === TokenType.TAG_OPEN_START || this._peek.type === TokenType.INCOMPLETE_TAG_OPEN) {
                this._consumeStartTag(this._advance());
              } else if (this._peek.type === TokenType.TAG_CLOSE) {
                this._consumeEndTag(this._advance());
              } else if (this._peek.type === TokenType.CDATA_START) {
                this._closeVoidElement();

                this._consumeCdata(this._advance());
              } else if (this._peek.type === TokenType.COMMENT_START) {
                this._closeVoidElement();

                this._consumeComment(this._advance());
              } else if (this._peek.type === TokenType.TEXT || this._peek.type === TokenType.RAW_TEXT || this._peek.type === TokenType.ESCAPABLE_RAW_TEXT) {
                this._closeVoidElement();

                this._consumeText(this._advance());
              } else if (this._peek.type === TokenType.EXPANSION_FORM_START) {
                this._consumeExpansion(this._advance());
              } else {
                // Skip all other tokens...
                this._advance();
              }
            }
          }
        }, {
          key: "_advance",
          value: function _advance() {
            var prev = this._peek;

            if (this._index < this.tokens.length - 1) {
              // Note: there is always an EOF token at the end
              this._index++;
            }

            this._peek = this.tokens[this._index];
            return prev;
          }
        }, {
          key: "_advanceIf",
          value: function _advanceIf(type) {
            if (this._peek.type === type) {
              return this._advance();
            }

            return null;
          }
        }, {
          key: "_consumeCdata",
          value: function _consumeCdata(_startToken) {
            this._consumeText(this._advance());

            this._advanceIf(TokenType.CDATA_END);
          }
        }, {
          key: "_consumeComment",
          value: function _consumeComment(token) {
            var text = this._advanceIf(TokenType.RAW_TEXT);

            this._advanceIf(TokenType.COMMENT_END);

            var value = text != null ? text.parts[0].trim() : null;

            this._addToParent(new Comment(value, token.sourceSpan));
          }
        }, {
          key: "_consumeExpansion",
          value: function _consumeExpansion(token) {
            var switchValue = this._advance();

            var type = this._advance();

            var cases = []; // read =

            while (this._peek.type === TokenType.EXPANSION_CASE_VALUE) {
              var expCase = this._parseExpansionCase();

              if (!expCase) return; // error

              cases.push(expCase);
            } // read the final }


            if (this._peek.type !== TokenType.EXPANSION_FORM_END) {
              this.errors.push(TreeError.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '}'."));
              return;
            }

            var sourceSpan = new ParseSourceSpan(token.sourceSpan.start, this._peek.sourceSpan.end, token.sourceSpan.fullStart);

            this._addToParent(new Expansion(switchValue.parts[0], type.parts[0], cases, sourceSpan, switchValue.sourceSpan));

            this._advance();
          }
        }, {
          key: "_parseExpansionCase",
          value: function _parseExpansionCase() {
            var value = this._advance(); // read {


            if (this._peek.type !== TokenType.EXPANSION_CASE_EXP_START) {
              this.errors.push(TreeError.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '{'."));
              return null;
            } // read until }


            var start = this._advance();

            var exp = this._collectExpansionExpTokens(start);

            if (!exp) return null;

            var end = this._advance();

            exp.push(new Token(TokenType.EOF, [], end.sourceSpan)); // parse everything in between { and }

            var expansionCaseParser = new _TreeBuilder(exp, this.getTagDefinition);
            expansionCaseParser.build();

            if (expansionCaseParser.errors.length > 0) {
              this.errors = this.errors.concat(expansionCaseParser.errors);
              return null;
            }

            var sourceSpan = new ParseSourceSpan(value.sourceSpan.start, end.sourceSpan.end, value.sourceSpan.fullStart);
            var expSourceSpan = new ParseSourceSpan(start.sourceSpan.start, end.sourceSpan.end, start.sourceSpan.fullStart);
            return new ExpansionCase(value.parts[0], expansionCaseParser.rootNodes, sourceSpan, value.sourceSpan, expSourceSpan);
          }
        }, {
          key: "_collectExpansionExpTokens",
          value: function _collectExpansionExpTokens(start) {
            var exp = [];
            var expansionFormStack = [TokenType.EXPANSION_CASE_EXP_START];

            while (true) {
              if (this._peek.type === TokenType.EXPANSION_FORM_START || this._peek.type === TokenType.EXPANSION_CASE_EXP_START) {
                expansionFormStack.push(this._peek.type);
              }

              if (this._peek.type === TokenType.EXPANSION_CASE_EXP_END) {
                if (lastOnStack(expansionFormStack, TokenType.EXPANSION_CASE_EXP_START)) {
                  expansionFormStack.pop();
                  if (expansionFormStack.length == 0) return exp;
                } else {
                  this.errors.push(TreeError.create(null, start.sourceSpan, "Invalid ICU message. Missing '}'."));
                  return null;
                }
              }

              if (this._peek.type === TokenType.EXPANSION_FORM_END) {
                if (lastOnStack(expansionFormStack, TokenType.EXPANSION_FORM_START)) {
                  expansionFormStack.pop();
                } else {
                  this.errors.push(TreeError.create(null, start.sourceSpan, "Invalid ICU message. Missing '}'."));
                  return null;
                }
              }

              if (this._peek.type === TokenType.EOF) {
                this.errors.push(TreeError.create(null, start.sourceSpan, "Invalid ICU message. Missing '}'."));
                return null;
              }

              exp.push(this._advance());
            }
          }
        }, {
          key: "_consumeText",
          value: function _consumeText(token) {
            var text = token.parts[0];

            if (text.length > 0 && text[0] == '\n') {
              var parent = this._getParentElement();

              if (parent != null && parent.children.length == 0 && this.getTagDefinition(parent.name).ignoreFirstLf) {
                text = text.substring(1);
              }
            }

            if (text.length > 0) {
              this._addToParent(new Text$3(text, token.sourceSpan));
            }
          }
        }, {
          key: "_closeVoidElement",
          value: function _closeVoidElement() {
            var el = this._getParentElement();

            if (el && this.getTagDefinition(el.name).isVoid) {
              this._elementStack.pop();
            }
          }
        }, {
          key: "_consumeStartTag",
          value: function _consumeStartTag(startTagToken) {
            var _startTagToken$parts = _slicedToArray(startTagToken.parts, 2),
                prefix = _startTagToken$parts[0],
                name = _startTagToken$parts[1];

            var attrs = [];

            while (this._peek.type === TokenType.ATTR_NAME) {
              attrs.push(this._consumeAttr(this._advance()));
            }

            var fullName = this._getElementFullName(prefix, name, this._getParentElement());

            var selfClosing = false; // Note: There could have been a tokenizer error
            // so that we don't get a token for the end tag...

            if (this._peek.type === TokenType.TAG_OPEN_END_VOID) {
              this._advance();

              selfClosing = true;
              var tagDef = this.getTagDefinition(fullName);

              if (!(tagDef.canSelfClose || getNsPrefix(fullName) !== null || tagDef.isVoid)) {
                this.errors.push(TreeError.create(fullName, startTagToken.sourceSpan, "Only void and foreign elements can be self closed \"".concat(startTagToken.parts[1], "\"")));
              }
            } else if (this._peek.type === TokenType.TAG_OPEN_END) {
              this._advance();

              selfClosing = false;
            }

            var end = this._peek.sourceSpan.start;
            var span = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart); // Create a separate `startSpan` because `span` will be modified when there is an `end` span.

            var startSpan = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);
            var el = new Element$1(fullName, attrs, [], span, startSpan, undefined);

            this._pushElement(el);

            if (selfClosing) {
              // Elements that are self-closed have their `endSourceSpan` set to the full span, as the
              // element start tag also represents the end tag.
              this._popElement(fullName, span);
            } else if (startTagToken.type === TokenType.INCOMPLETE_TAG_OPEN) {
              // We already know the opening tag is not complete, so it is unlikely it has a corresponding
              // close tag. Let's optimistically parse it as a full element and emit an error.
              this._popElement(fullName, null);

              this.errors.push(TreeError.create(fullName, span, "Opening tag \"".concat(fullName, "\" not terminated.")));
            }
          }
        }, {
          key: "_pushElement",
          value: function _pushElement(el) {
            var parentEl = this._getParentElement();

            if (parentEl && this.getTagDefinition(parentEl.name).isClosedByChild(el.name)) {
              this._elementStack.pop();
            }

            this._addToParent(el);

            this._elementStack.push(el);
          }
        }, {
          key: "_consumeEndTag",
          value: function _consumeEndTag(endTagToken) {
            var fullName = this._getElementFullName(endTagToken.parts[0], endTagToken.parts[1], this._getParentElement());

            if (this.getTagDefinition(fullName).isVoid) {
              this.errors.push(TreeError.create(fullName, endTagToken.sourceSpan, "Void elements do not have end tags \"".concat(endTagToken.parts[1], "\"")));
            } else if (!this._popElement(fullName, endTagToken.sourceSpan)) {
              var errMsg = "Unexpected closing tag \"".concat(fullName, "\". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags");
              this.errors.push(TreeError.create(fullName, endTagToken.sourceSpan, errMsg));
            }
          }
          /**
           * Closes the nearest element with the tag name `fullName` in the parse tree.
           * `endSourceSpan` is the span of the closing tag, or null if the element does
           * not have a closing tag (for example, this happens when an incomplete
           * opening tag is recovered).
           */

        }, {
          key: "_popElement",
          value: function _popElement(fullName, endSourceSpan) {
            for (var stackIndex = this._elementStack.length - 1; stackIndex >= 0; stackIndex--) {
              var el = this._elementStack[stackIndex];

              if (el.name == fullName) {
                // Record the parse span with the element that is being closed. Any elements that are
                // removed from the element stack at this point are closed implicitly, so they won't get
                // an end source span (as there is no explicit closing element).
                el.endSourceSpan = endSourceSpan;
                el.sourceSpan.end = endSourceSpan !== null ? endSourceSpan.end : el.sourceSpan.end;

                this._elementStack.splice(stackIndex, this._elementStack.length - stackIndex);

                return true;
              }

              if (!this.getTagDefinition(el.name).closedByParent) {
                return false;
              }
            }

            return false;
          }
        }, {
          key: "_consumeAttr",
          value: function _consumeAttr(attrName) {
            var fullName = mergeNsAndName(attrName.parts[0], attrName.parts[1]);
            var end = attrName.sourceSpan.end;
            var value = '';
            var valueSpan = undefined;

            if (this._peek.type === TokenType.ATTR_QUOTE) {
              this._advance();
            }

            if (this._peek.type === TokenType.ATTR_VALUE) {
              var valueToken = this._advance();

              value = valueToken.parts[0];
              end = valueToken.sourceSpan.end;
              valueSpan = valueToken.sourceSpan;
            }

            if (this._peek.type === TokenType.ATTR_QUOTE) {
              var quoteToken = this._advance();

              end = quoteToken.sourceSpan.end;
            }

            return new Attribute(fullName, value, new ParseSourceSpan(attrName.sourceSpan.start, end, attrName.sourceSpan.fullStart), valueSpan);
          }
        }, {
          key: "_getParentElement",
          value: function _getParentElement() {
            return this._elementStack.length > 0 ? this._elementStack[this._elementStack.length - 1] : null;
          }
        }, {
          key: "_addToParent",
          value: function _addToParent(node) {
            var parent = this._getParentElement();

            if (parent != null) {
              parent.children.push(node);
            } else {
              this.rootNodes.push(node);
            }
          }
        }, {
          key: "_getElementFullName",
          value: function _getElementFullName(prefix, localName, parentElement) {
            if (prefix === '') {
              prefix = this.getTagDefinition(localName).implicitNamespacePrefix || '';

              if (prefix === '' && parentElement != null) {
                var parentTagName = splitNsName(parentElement.name)[1];
                var parentTagDefinition = this.getTagDefinition(parentTagName);

                if (!parentTagDefinition.preventNamespaceInheritance) {
                  prefix = getNsPrefix(parentElement.name);
                }
              }
            }

            return mergeNsAndName(prefix, localName);
          }
        }]);

        return _TreeBuilder;
      }();

      function lastOnStack(stack, element) {
        return stack.length > 0 && stack[stack.length - 1] === element;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var HtmlParser = /*#__PURE__*/function (_Parser) {
        _inherits(HtmlParser, _Parser);

        var _super94 = _createSuper(HtmlParser);

        function HtmlParser() {
          _classCallCheck(this, HtmlParser);

          return _super94.call(this, getHtmlTagDefinition);
        }

        _createClass2(HtmlParser, [{
          key: "parse",
          value: function parse(source, url, options) {
            return _get(_getPrototypeOf(HtmlParser.prototype), "parse", this).call(this, source, url, options);
          }
        }]);

        return HtmlParser;
      }(Parser);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var PRESERVE_WS_ATTR_NAME = 'ngPreserveWhitespaces';
      var SKIP_WS_TRIM_TAGS = new Set(['pre', 'template', 'textarea', 'script', 'style']); // Equivalent to \s with \u00a0 (non-breaking space) excluded.
      // Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp

      var WS_CHARS = " \f\n\r\t\x0B\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
      var NO_WS_REGEXP = new RegExp("[^".concat(WS_CHARS, "]"));
      var WS_REPLACE_REGEXP = new RegExp("[".concat(WS_CHARS, "]{2,}"), 'g');

      function hasPreserveWhitespacesAttr(attrs) {
        return attrs.some(function (attr) {
          return attr.name === PRESERVE_WS_ATTR_NAME;
        });
      }
      /**
       * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:
       * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32
       * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character
       * and later on replaced by a space. We are re-implementing the same idea here.
       */


      function replaceNgsp(value) {
        // lexer is replacing the &ngsp; pseudo-entity with NGSP_UNICODE
        return value.replace(new RegExp(NGSP_UNICODE, 'g'), ' ');
      }
      /**
       * This visitor can walk HTML parse tree and remove / trim text nodes using the following rules:
       * - consider spaces, tabs and new lines as whitespace characters;
       * - drop text nodes consisting of whitespace characters only;
       * - for all other text nodes replace consecutive whitespace characters with one space;
       * - convert &ngsp; pseudo-entity to a single space;
       *
       * Removal and trimming of whitespaces have positive performance impact (less code to generate
       * while compiling templates, faster view creation). At the same time it can be "destructive"
       * in some cases (whitespaces can influence layout). Because of the potential of breaking layout
       * this visitor is not activated by default in Angular 5 and people need to explicitly opt-in for
       * whitespace removal. The default option for whitespace removal will be revisited in Angular 6
       * and might be changed to "on" by default.
       */


      var WhitespaceVisitor = /*#__PURE__*/function () {
        function WhitespaceVisitor() {
          _classCallCheck(this, WhitespaceVisitor);
        }

        _createClass2(WhitespaceVisitor, [{
          key: "visitElement",
          value: function visitElement(element, context) {
            if (SKIP_WS_TRIM_TAGS.has(element.name) || hasPreserveWhitespacesAttr(element.attrs)) {
              // don't descent into elements where we need to preserve whitespaces
              // but still visit all attributes to eliminate one used as a market to preserve WS
              return new Element$1(element.name, visitAll$1(this, element.attrs), element.children, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);
            }

            return new Element$1(element.name, element.attrs, visitAllWithSiblings(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);
          }
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute, context) {
            return attribute.name !== PRESERVE_WS_ATTR_NAME ? attribute : null;
          }
        }, {
          key: "visitText",
          value: function visitText(text, context) {
            var isNotBlank = text.value.match(NO_WS_REGEXP);
            var hasExpansionSibling = context && (context.prev instanceof Expansion || context.next instanceof Expansion);

            if (isNotBlank || hasExpansionSibling) {
              return new Text$3(replaceNgsp(text.value).replace(WS_REPLACE_REGEXP, ' '), text.sourceSpan, text.i18n);
            }

            return null;
          }
        }, {
          key: "visitComment",
          value: function visitComment(comment, context) {
            return comment;
          }
        }, {
          key: "visitExpansion",
          value: function visitExpansion(expansion, context) {
            return expansion;
          }
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(expansionCase, context) {
            return expansionCase;
          }
        }]);

        return WhitespaceVisitor;
      }();

      function removeWhitespaces(htmlAstWithErrors) {
        return new ParseTreeResult(visitAll$1(new WhitespaceVisitor(), htmlAstWithErrors.rootNodes), htmlAstWithErrors.errors);
      }

      function visitAllWithSiblings(visitor, nodes) {
        var result = [];
        nodes.forEach(function (ast, i) {
          var context = {
            prev: nodes[i - 1],
            next: nodes[i + 1]
          };
          var astResult = ast.visit(visitor, context);

          if (astResult) {
            result.push(astResult);
          }
        });
        return result;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // http://cldr.unicode.org/index/cldr-spec/plural-rules


      var PLURAL_CASES = ['zero', 'one', 'two', 'few', 'many', 'other'];
      /**
       * Expands special forms into elements.
       *
       * For example,
       *
       * ```
       * { messages.length, plural,
       *   =0 {zero}
       *   =1 {one}
       *   other {more than one}
       * }
       * ```
       *
       * will be expanded into
       *
       * ```
       * <ng-container [ngPlural]="messages.length">
       *   <ng-template ngPluralCase="=0">zero</ng-template>
       *   <ng-template ngPluralCase="=1">one</ng-template>
       *   <ng-template ngPluralCase="other">more than one</ng-template>
       * </ng-container>
       * ```
       */

      function expandNodes(nodes) {
        var expander = new _Expander();
        return new ExpansionResult(visitAll$1(expander, nodes), expander.isExpanded, expander.errors);
      }

      var ExpansionResult = function ExpansionResult(nodes, expanded, errors) {
        _classCallCheck(this, ExpansionResult);

        this.nodes = nodes;
        this.expanded = expanded;
        this.errors = errors;
      };

      var ExpansionError = /*#__PURE__*/function (_ParseError3) {
        _inherits(ExpansionError, _ParseError3);

        var _super95 = _createSuper(ExpansionError);

        function ExpansionError(span, errorMsg) {
          _classCallCheck(this, ExpansionError);

          return _super95.call(this, span, errorMsg);
        }

        return ExpansionError;
      }(ParseError);
      /**
       * Expand expansion forms (plural, select) to directives
       *
       * @internal
       */


      var _Expander = /*#__PURE__*/function () {
        function _Expander() {
          _classCallCheck(this, _Expander);

          this.isExpanded = false;
          this.errors = [];
        }

        _createClass2(_Expander, [{
          key: "visitElement",
          value: function visitElement(element, context) {
            return new Element$1(element.name, element.attrs, visitAll$1(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan);
          }
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute, context) {
            return attribute;
          }
        }, {
          key: "visitText",
          value: function visitText(text, context) {
            return text;
          }
        }, {
          key: "visitComment",
          value: function visitComment(comment, context) {
            return comment;
          }
        }, {
          key: "visitExpansion",
          value: function visitExpansion(icu, context) {
            this.isExpanded = true;
            return icu.type == 'plural' ? _expandPluralForm(icu, this.errors) : _expandDefaultForm(icu, this.errors);
          }
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(icuCase, context) {
            throw new Error('Should not be reached');
          }
        }]);

        return _Expander;
      }(); // Plural forms are expanded to `NgPlural` and `NgPluralCase`s


      function _expandPluralForm(ast, errors) {
        var children = ast.cases.map(function (c) {
          if (PLURAL_CASES.indexOf(c.value) == -1 && !c.value.match(/^=\d+$/)) {
            errors.push(new ExpansionError(c.valueSourceSpan, "Plural cases should be \"=<number>\" or one of ".concat(PLURAL_CASES.join(', '))));
          }

          var expansionResult = expandNodes(c.expression);
          errors.push.apply(errors, _toConsumableArray(expansionResult.errors));
          return new Element$1("ng-template", [new Attribute('ngPluralCase', "".concat(c.value), c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);
        });
        var switchAttr = new Attribute('[ngPlural]', ast.switchValue, ast.switchValueSourceSpan);
        return new Element$1('ng-container', [switchAttr], children, ast.sourceSpan, ast.sourceSpan, ast.sourceSpan);
      } // ICU messages (excluding plural form) are expanded to `NgSwitch`  and `NgSwitchCase`s


      function _expandDefaultForm(ast, errors) {
        var children = ast.cases.map(function (c) {
          var expansionResult = expandNodes(c.expression);
          errors.push.apply(errors, _toConsumableArray(expansionResult.errors));

          if (c.value === 'other') {
            // other is the default case when no values match
            return new Element$1("ng-template", [new Attribute('ngSwitchDefault', '', c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);
          }

          return new Element$1("ng-template", [new Attribute('ngSwitchCase', "".concat(c.value), c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);
        });
        var switchAttr = new Attribute('[ngSwitch]', ast.switchValue, ast.switchValueSourceSpan);
        return new Element$1('ng-container', [switchAttr], children, ast.sourceSpan, ast.sourceSpan, ast.sourceSpan);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A segment of text within the template.
       */


      var TextAst = /*#__PURE__*/function () {
        function TextAst(value, ngContentIndex, sourceSpan) {
          _classCallCheck(this, TextAst);

          this.value = value;
          this.ngContentIndex = ngContentIndex;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(TextAst, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitText(this, context);
          }
        }]);

        return TextAst;
      }();
      /**
       * A bound expression within the text of a template.
       */


      var BoundTextAst = /*#__PURE__*/function () {
        function BoundTextAst(value, ngContentIndex, sourceSpan) {
          _classCallCheck(this, BoundTextAst);

          this.value = value;
          this.ngContentIndex = ngContentIndex;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(BoundTextAst, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitBoundText(this, context);
          }
        }]);

        return BoundTextAst;
      }();
      /**
       * A plain attribute on an element.
       */


      var AttrAst = /*#__PURE__*/function () {
        function AttrAst(name, value, sourceSpan) {
          _classCallCheck(this, AttrAst);

          this.name = name;
          this.value = value;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(AttrAst, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitAttr(this, context);
          }
        }]);

        return AttrAst;
      }();

      var BoundPropertyMapping = (_BoundPropertyMapping = {}, _defineProperty(_BoundPropertyMapping, 4
      /* Animation */
      , 4), _defineProperty(_BoundPropertyMapping, 1
      /* Attribute */
      , 1), _defineProperty(_BoundPropertyMapping, 2
      /* Class */
      , 2), _defineProperty(_BoundPropertyMapping, 0
      /* Property */
      , 0), _defineProperty(_BoundPropertyMapping, 3
      /* Style */
      , 3), _BoundPropertyMapping);
      /**
       * A binding for an element property (e.g. `[property]="expression"`) or an animation trigger (e.g.
       * `[@trigger]="stateExp"`)
       */

      var BoundElementPropertyAst = /*#__PURE__*/function () {
        function BoundElementPropertyAst(name, type, securityContext, value, unit, sourceSpan) {
          _classCallCheck(this, BoundElementPropertyAst);

          this.name = name;
          this.type = type;
          this.securityContext = securityContext;
          this.value = value;
          this.unit = unit;
          this.sourceSpan = sourceSpan;
          this.isAnimation = this.type === 4
          /* Animation */
          ;
        }

        _createClass2(BoundElementPropertyAst, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitElementProperty(this, context);
          }
        }], [{
          key: "fromBoundProperty",
          value: function fromBoundProperty(prop) {
            var type = BoundPropertyMapping[prop.type];
            return new BoundElementPropertyAst(prop.name, type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan);
          }
        }]);

        return BoundElementPropertyAst;
      }();
      /**
       * A binding for an element event (e.g. `(event)="handler()"`) or an animation trigger event (e.g.
       * `(@trigger.phase)="callback($event)"`).
       */


      var BoundEventAst = /*#__PURE__*/function () {
        function BoundEventAst(name, target, phase, handler, sourceSpan, handlerSpan) {
          _classCallCheck(this, BoundEventAst);

          this.name = name;
          this.target = target;
          this.phase = phase;
          this.handler = handler;
          this.sourceSpan = sourceSpan;
          this.handlerSpan = handlerSpan;
          this.fullName = BoundEventAst.calcFullName(this.name, this.target, this.phase);
          this.isAnimation = !!this.phase;
        }

        _createClass2(BoundEventAst, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitEvent(this, context);
          }
        }], [{
          key: "calcFullName",
          value: function calcFullName(name, target, phase) {
            if (target) {
              return "".concat(target, ":").concat(name);
            }

            if (phase) {
              return "@".concat(name, ".").concat(phase);
            }

            return name;
          }
        }, {
          key: "fromParsedEvent",
          value: function fromParsedEvent(event) {
            var target = event.type === 0
            /* Regular */
            ? event.targetOrPhase : null;
            var phase = event.type === 1
            /* Animation */
            ? event.targetOrPhase : null;
            return new BoundEventAst(event.name, target, phase, event.handler, event.sourceSpan, event.handlerSpan);
          }
        }]);

        return BoundEventAst;
      }();
      /**
       * A reference declaration on an element (e.g. `let someName="expression"`).
       */


      var ReferenceAst = /*#__PURE__*/function () {
        function ReferenceAst(name, value, originalValue, sourceSpan) {
          _classCallCheck(this, ReferenceAst);

          this.name = name;
          this.value = value;
          this.originalValue = originalValue;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(ReferenceAst, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitReference(this, context);
          }
        }]);

        return ReferenceAst;
      }();
      /**
       * A variable declaration on a <ng-template> (e.g. `var-someName="someLocalName"`).
       */


      var VariableAst = /*#__PURE__*/function () {
        function VariableAst(name, value, sourceSpan, valueSpan) {
          _classCallCheck(this, VariableAst);

          this.name = name;
          this.value = value;
          this.sourceSpan = sourceSpan;
          this.valueSpan = valueSpan;
        }

        _createClass2(VariableAst, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitVariable(this, context);
          }
        }], [{
          key: "fromParsedVariable",
          value: function fromParsedVariable(v) {
            return new VariableAst(v.name, v.value, v.sourceSpan, v.valueSpan);
          }
        }]);

        return VariableAst;
      }();
      /**
       * An element declaration in a template.
       */


      var ElementAst = /*#__PURE__*/function () {
        function ElementAst(name, attrs, inputs, outputs, references, directives, providers, hasViewContainer, queryMatches, children, ngContentIndex, sourceSpan, endSourceSpan) {
          _classCallCheck(this, ElementAst);

          this.name = name;
          this.attrs = attrs;
          this.inputs = inputs;
          this.outputs = outputs;
          this.references = references;
          this.directives = directives;
          this.providers = providers;
          this.hasViewContainer = hasViewContainer;
          this.queryMatches = queryMatches;
          this.children = children;
          this.ngContentIndex = ngContentIndex;
          this.sourceSpan = sourceSpan;
          this.endSourceSpan = endSourceSpan;
        }

        _createClass2(ElementAst, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitElement(this, context);
          }
        }]);

        return ElementAst;
      }();
      /**
       * A `<ng-template>` element included in an Angular template.
       */


      var EmbeddedTemplateAst = /*#__PURE__*/function () {
        function EmbeddedTemplateAst(attrs, outputs, references, variables, directives, providers, hasViewContainer, queryMatches, children, ngContentIndex, sourceSpan) {
          _classCallCheck(this, EmbeddedTemplateAst);

          this.attrs = attrs;
          this.outputs = outputs;
          this.references = references;
          this.variables = variables;
          this.directives = directives;
          this.providers = providers;
          this.hasViewContainer = hasViewContainer;
          this.queryMatches = queryMatches;
          this.children = children;
          this.ngContentIndex = ngContentIndex;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(EmbeddedTemplateAst, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitEmbeddedTemplate(this, context);
          }
        }]);

        return EmbeddedTemplateAst;
      }();
      /**
       * A directive property with a bound value (e.g. `*ngIf="condition").
       */


      var BoundDirectivePropertyAst = /*#__PURE__*/function () {
        function BoundDirectivePropertyAst(directiveName, templateName, value, sourceSpan) {
          _classCallCheck(this, BoundDirectivePropertyAst);

          this.directiveName = directiveName;
          this.templateName = templateName;
          this.value = value;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(BoundDirectivePropertyAst, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitDirectiveProperty(this, context);
          }
        }]);

        return BoundDirectivePropertyAst;
      }();
      /**
       * A directive declared on an element.
       */


      var DirectiveAst = /*#__PURE__*/function () {
        function DirectiveAst(directive, inputs, hostProperties, hostEvents, contentQueryStartId, sourceSpan) {
          _classCallCheck(this, DirectiveAst);

          this.directive = directive;
          this.inputs = inputs;
          this.hostProperties = hostProperties;
          this.hostEvents = hostEvents;
          this.contentQueryStartId = contentQueryStartId;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(DirectiveAst, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitDirective(this, context);
          }
        }]);

        return DirectiveAst;
      }();
      /**
       * A provider declared on an element
       */


      var ProviderAst = /*#__PURE__*/function () {
        function ProviderAst(token, multiProvider, eager, providers, providerType, lifecycleHooks, sourceSpan, isModule) {
          _classCallCheck(this, ProviderAst);

          this.token = token;
          this.multiProvider = multiProvider;
          this.eager = eager;
          this.providers = providers;
          this.providerType = providerType;
          this.lifecycleHooks = lifecycleHooks;
          this.sourceSpan = sourceSpan;
          this.isModule = isModule;
        }

        _createClass2(ProviderAst, [{
          key: "visit",
          value: function visit(visitor, context) {
            // No visit method in the visitor for now...
            return null;
          }
        }]);

        return ProviderAst;
      }();

      var ProviderAstType;

      (function (ProviderAstType) {
        ProviderAstType[ProviderAstType["PublicService"] = 0] = "PublicService";
        ProviderAstType[ProviderAstType["PrivateService"] = 1] = "PrivateService";
        ProviderAstType[ProviderAstType["Component"] = 2] = "Component";
        ProviderAstType[ProviderAstType["Directive"] = 3] = "Directive";
        ProviderAstType[ProviderAstType["Builtin"] = 4] = "Builtin";
      })(ProviderAstType || (ProviderAstType = {}));
      /**
       * Position where content is to be projected (instance of `<ng-content>` in a template).
       */


      var NgContentAst = /*#__PURE__*/function () {
        function NgContentAst(index, ngContentIndex, sourceSpan) {
          _classCallCheck(this, NgContentAst);

          this.index = index;
          this.ngContentIndex = ngContentIndex;
          this.sourceSpan = sourceSpan;
        }

        _createClass2(NgContentAst, [{
          key: "visit",
          value: function visit(visitor, context) {
            return visitor.visitNgContent(this, context);
          }
        }]);

        return NgContentAst;
      }();
      /**
       * A visitor that accepts each node but doesn't do anything. It is intended to be used
       * as the base class for a visitor that is only interested in a subset of the node types.
       */


      var NullTemplateVisitor = /*#__PURE__*/function () {
        function NullTemplateVisitor() {
          _classCallCheck(this, NullTemplateVisitor);
        }

        _createClass2(NullTemplateVisitor, [{
          key: "visitNgContent",
          value: function visitNgContent(ast, context) {}
        }, {
          key: "visitEmbeddedTemplate",
          value: function visitEmbeddedTemplate(ast, context) {}
        }, {
          key: "visitElement",
          value: function visitElement(ast, context) {}
        }, {
          key: "visitReference",
          value: function visitReference(ast, context) {}
        }, {
          key: "visitVariable",
          value: function visitVariable(ast, context) {}
        }, {
          key: "visitEvent",
          value: function visitEvent(ast, context) {}
        }, {
          key: "visitElementProperty",
          value: function visitElementProperty(ast, context) {}
        }, {
          key: "visitAttr",
          value: function visitAttr(ast, context) {}
        }, {
          key: "visitBoundText",
          value: function visitBoundText(ast, context) {}
        }, {
          key: "visitText",
          value: function visitText(ast, context) {}
        }, {
          key: "visitDirective",
          value: function visitDirective(ast, context) {}
        }, {
          key: "visitDirectiveProperty",
          value: function visitDirectiveProperty(ast, context) {}
        }]);

        return NullTemplateVisitor;
      }();
      /**
       * Base class that can be used to build a visitor that visits each node
       * in an template ast recursively.
       */


      var RecursiveTemplateAstVisitor = /*#__PURE__*/function (_NullTemplateVisitor) {
        _inherits(RecursiveTemplateAstVisitor, _NullTemplateVisitor);

        var _super96 = _createSuper(RecursiveTemplateAstVisitor);

        function RecursiveTemplateAstVisitor() {
          _classCallCheck(this, RecursiveTemplateAstVisitor);

          return _super96.call(this);
        } // Nodes with children


        _createClass2(RecursiveTemplateAstVisitor, [{
          key: "visitEmbeddedTemplate",
          value: function visitEmbeddedTemplate(ast, context) {
            return this.visitChildren(context, function (visit) {
              visit(ast.attrs);
              visit(ast.references);
              visit(ast.variables);
              visit(ast.directives);
              visit(ast.providers);
              visit(ast.children);
            });
          }
        }, {
          key: "visitElement",
          value: function visitElement(ast, context) {
            return this.visitChildren(context, function (visit) {
              visit(ast.attrs);
              visit(ast.inputs);
              visit(ast.outputs);
              visit(ast.references);
              visit(ast.directives);
              visit(ast.providers);
              visit(ast.children);
            });
          }
        }, {
          key: "visitDirective",
          value: function visitDirective(ast, context) {
            return this.visitChildren(context, function (visit) {
              visit(ast.inputs);
              visit(ast.hostProperties);
              visit(ast.hostEvents);
            });
          }
        }, {
          key: "visitChildren",
          value: function visitChildren(context, cb) {
            var results = [];
            var t = this;

            function visit(children) {
              if (children && children.length) results.push(templateVisitAll(t, children, context));
            }

            cb(visit);
            return Array.prototype.concat.apply([], results);
          }
        }]);

        return RecursiveTemplateAstVisitor;
      }(NullTemplateVisitor);
      /**
       * Visit every node in a list of {@link TemplateAst}s with the given {@link TemplateAstVisitor}.
       */


      function templateVisitAll(visitor, asts) {
        var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
        var result = [];
        var visit = visitor.visit ? function (ast) {
          return visitor.visit(ast, context) || ast.visit(visitor, context);
        } : function (ast) {
          return ast.visit(visitor, context);
        };
        asts.forEach(function (ast) {
          var astResult = visit(ast);

          if (astResult) {
            result.push(astResult);
          }
        });
        return result;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ProviderError = /*#__PURE__*/function (_ParseError4) {
        _inherits(ProviderError, _ParseError4);

        var _super97 = _createSuper(ProviderError);

        function ProviderError(message, span) {
          _classCallCheck(this, ProviderError);

          return _super97.call(this, span, message);
        }

        return ProviderError;
      }(ParseError);

      var ProviderViewContext = function ProviderViewContext(reflector, component) {
        var _this140 = this;

        _classCallCheck(this, ProviderViewContext);

        this.reflector = reflector;
        this.component = component;
        this.errors = [];
        this.viewQueries = _getViewQueries(component);
        this.viewProviders = new Map();
        component.viewProviders.forEach(function (provider) {
          if (_this140.viewProviders.get(tokenReference(provider.token)) == null) {
            _this140.viewProviders.set(tokenReference(provider.token), true);
          }
        });
      };

      var ProviderElementContext = /*#__PURE__*/function () {
        function ProviderElementContext(viewContext, _parent, _isViewRoot, _directiveAsts, attrs, refs, isTemplate, contentQueryStartId, _sourceSpan) {
          var _this141 = this;

          _classCallCheck(this, ProviderElementContext);

          this.viewContext = viewContext;
          this._parent = _parent;
          this._isViewRoot = _isViewRoot;
          this._directiveAsts = _directiveAsts;
          this._sourceSpan = _sourceSpan;
          this._transformedProviders = new Map();
          this._seenProviders = new Map();
          this._queriedTokens = new Map();
          this.transformedHasViewContainer = false;
          this._attrs = {};
          attrs.forEach(function (attrAst) {
            return _this141._attrs[attrAst.name] = attrAst.value;
          });

          var directivesMeta = _directiveAsts.map(function (directiveAst) {
            return directiveAst.directive;
          });

          this._allProviders = _resolveProvidersFromDirectives(directivesMeta, _sourceSpan, viewContext.errors);
          this._contentQueries = _getContentQueries(contentQueryStartId, directivesMeta);
          Array.from(this._allProviders.values()).forEach(function (provider) {
            _this141._addQueryReadsTo(provider.token, provider.token, _this141._queriedTokens);
          });

          if (isTemplate) {
            var templateRefId = createTokenForExternalReference(this.viewContext.reflector, Identifiers.TemplateRef);

            this._addQueryReadsTo(templateRefId, templateRefId, this._queriedTokens);
          }

          refs.forEach(function (refAst) {
            var defaultQueryValue = refAst.value || createTokenForExternalReference(_this141.viewContext.reflector, Identifiers.ElementRef);

            _this141._addQueryReadsTo({
              value: refAst.name
            }, defaultQueryValue, _this141._queriedTokens);
          });

          if (this._queriedTokens.get(this.viewContext.reflector.resolveExternalReference(Identifiers.ViewContainerRef))) {
            this.transformedHasViewContainer = true;
          } // create the providers that we know are eager first


          Array.from(this._allProviders.values()).forEach(function (provider) {
            var eager = provider.eager || _this141._queriedTokens.get(tokenReference(provider.token));

            if (eager) {
              _this141._getOrCreateLocalProvider(provider.providerType, provider.token, true);
            }
          });
        }

        _createClass2(ProviderElementContext, [{
          key: "afterElement",
          value: function afterElement() {
            var _this142 = this;

            // collect lazy providers
            Array.from(this._allProviders.values()).forEach(function (provider) {
              _this142._getOrCreateLocalProvider(provider.providerType, provider.token, false);
            });
          }
        }, {
          key: "transformProviders",
          get: function get() {
            // Note: Maps keep their insertion order.
            var lazyProviders = [];
            var eagerProviders = [];

            this._transformedProviders.forEach(function (provider) {
              if (provider.eager) {
                eagerProviders.push(provider);
              } else {
                lazyProviders.push(provider);
              }
            });

            return lazyProviders.concat(eagerProviders);
          }
        }, {
          key: "transformedDirectiveAsts",
          get: function get() {
            var sortedProviderTypes = this.transformProviders.map(function (provider) {
              return provider.token.identifier;
            });

            var sortedDirectives = this._directiveAsts.slice();

            sortedDirectives.sort(function (dir1, dir2) {
              return sortedProviderTypes.indexOf(dir1.directive.type) - sortedProviderTypes.indexOf(dir2.directive.type);
            });
            return sortedDirectives;
          }
        }, {
          key: "queryMatches",
          get: function get() {
            var allMatches = [];

            this._queriedTokens.forEach(function (matches) {
              allMatches.push.apply(allMatches, _toConsumableArray(matches));
            });

            return allMatches;
          }
        }, {
          key: "_addQueryReadsTo",
          value: function _addQueryReadsTo(token, defaultValue, queryReadTokens) {
            this._getQueriesFor(token).forEach(function (query) {
              var queryValue = query.meta.read || defaultValue;
              var tokenRef = tokenReference(queryValue);
              var queryMatches = queryReadTokens.get(tokenRef);

              if (!queryMatches) {
                queryMatches = [];
                queryReadTokens.set(tokenRef, queryMatches);
              }

              queryMatches.push({
                queryId: query.queryId,
                value: queryValue
              });
            });
          }
        }, {
          key: "_getQueriesFor",
          value: function _getQueriesFor(token) {
            var result = [];
            var currentEl = this;
            var distance = 0;
            var queries;

            while (currentEl !== null) {
              queries = currentEl._contentQueries.get(tokenReference(token));

              if (queries) {
                result.push.apply(result, _toConsumableArray(queries.filter(function (query) {
                  return query.meta.descendants || distance <= 1;
                })));
              }

              if (currentEl._directiveAsts.length > 0) {
                distance++;
              }

              currentEl = currentEl._parent;
            }

            queries = this.viewContext.viewQueries.get(tokenReference(token));

            if (queries) {
              result.push.apply(result, _toConsumableArray(queries));
            }

            return result;
          }
        }, {
          key: "_getOrCreateLocalProvider",
          value: function _getOrCreateLocalProvider(requestingProviderType, token, eager) {
            var _this143 = this;

            var resolvedProvider = this._allProviders.get(tokenReference(token));

            if (!resolvedProvider || (requestingProviderType === ProviderAstType.Directive || requestingProviderType === ProviderAstType.PublicService) && resolvedProvider.providerType === ProviderAstType.PrivateService || (requestingProviderType === ProviderAstType.PrivateService || requestingProviderType === ProviderAstType.PublicService) && resolvedProvider.providerType === ProviderAstType.Builtin) {
              return null;
            }

            var transformedProviderAst = this._transformedProviders.get(tokenReference(token));

            if (transformedProviderAst) {
              return transformedProviderAst;
            }

            if (this._seenProviders.get(tokenReference(token)) != null) {
              this.viewContext.errors.push(new ProviderError("Cannot instantiate cyclic dependency! ".concat(tokenName(token)), this._sourceSpan));
              return null;
            }

            this._seenProviders.set(tokenReference(token), true);

            var transformedProviders = resolvedProvider.providers.map(function (provider) {
              var transformedUseValue = provider.useValue;
              var transformedUseExisting = provider.useExisting;
              var transformedDeps = undefined;

              if (provider.useExisting != null) {
                var existingDiDep = _this143._getDependency(resolvedProvider.providerType, {
                  token: provider.useExisting
                }, eager);

                if (existingDiDep.token != null) {
                  transformedUseExisting = existingDiDep.token;
                } else {
                  transformedUseExisting = null;
                  transformedUseValue = existingDiDep.value;
                }
              } else if (provider.useFactory) {
                var deps = provider.deps || provider.useFactory.diDeps;
                transformedDeps = deps.map(function (dep) {
                  return _this143._getDependency(resolvedProvider.providerType, dep, eager);
                });
              } else if (provider.useClass) {
                var _deps = provider.deps || provider.useClass.diDeps;

                transformedDeps = _deps.map(function (dep) {
                  return _this143._getDependency(resolvedProvider.providerType, dep, eager);
                });
              }

              return _transformProvider(provider, {
                useExisting: transformedUseExisting,
                useValue: transformedUseValue,
                deps: transformedDeps
              });
            });
            transformedProviderAst = _transformProviderAst(resolvedProvider, {
              eager: eager,
              providers: transformedProviders
            });

            this._transformedProviders.set(tokenReference(token), transformedProviderAst);

            return transformedProviderAst;
          }
        }, {
          key: "_getLocalDependency",
          value: function _getLocalDependency(requestingProviderType, dep) {
            var eager = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

            if (dep.isAttribute) {
              var attrValue = this._attrs[dep.token.value];
              return {
                isValue: true,
                value: attrValue == null ? null : attrValue
              };
            }

            if (dep.token != null) {
              // access builtints
              if (requestingProviderType === ProviderAstType.Directive || requestingProviderType === ProviderAstType.Component) {
                if (tokenReference(dep.token) === this.viewContext.reflector.resolveExternalReference(Identifiers.Renderer) || tokenReference(dep.token) === this.viewContext.reflector.resolveExternalReference(Identifiers.ElementRef) || tokenReference(dep.token) === this.viewContext.reflector.resolveExternalReference(Identifiers.ChangeDetectorRef) || tokenReference(dep.token) === this.viewContext.reflector.resolveExternalReference(Identifiers.TemplateRef)) {
                  return dep;
                }

                if (tokenReference(dep.token) === this.viewContext.reflector.resolveExternalReference(Identifiers.ViewContainerRef)) {
                  this.transformedHasViewContainer = true;
                }
              } // access the injector


              if (tokenReference(dep.token) === this.viewContext.reflector.resolveExternalReference(Identifiers.Injector)) {
                return dep;
              } // access providers


              if (this._getOrCreateLocalProvider(requestingProviderType, dep.token, eager) != null) {
                return dep;
              }
            }

            return null;
          }
        }, {
          key: "_getDependency",
          value: function _getDependency(requestingProviderType, dep) {
            var eager = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
            var currElement = this;
            var currEager = eager;
            var result = null;

            if (!dep.isSkipSelf) {
              result = this._getLocalDependency(requestingProviderType, dep, eager);
            }

            if (dep.isSelf) {
              if (!result && dep.isOptional) {
                result = {
                  isValue: true,
                  value: null
                };
              }
            } else {
              // check parent elements
              while (!result && currElement._parent) {
                var prevElement = currElement;
                currElement = currElement._parent;

                if (prevElement._isViewRoot) {
                  currEager = false;
                }

                result = currElement._getLocalDependency(ProviderAstType.PublicService, dep, currEager);
              } // check @Host restriction


              if (!result) {
                if (!dep.isHost || this.viewContext.component.isHost || this.viewContext.component.type.reference === tokenReference(dep.token) || this.viewContext.viewProviders.get(tokenReference(dep.token)) != null) {
                  result = dep;
                } else {
                  result = dep.isOptional ? {
                    isValue: true,
                    value: null
                  } : null;
                }
              }
            }

            if (!result) {
              this.viewContext.errors.push(new ProviderError("No provider for ".concat(tokenName(dep.token)), this._sourceSpan));
            }

            return result;
          }
        }]);

        return ProviderElementContext;
      }();

      var NgModuleProviderAnalyzer = /*#__PURE__*/function () {
        function NgModuleProviderAnalyzer(reflector, ngModule, extraProviders, sourceSpan) {
          var _this144 = this;

          _classCallCheck(this, NgModuleProviderAnalyzer);

          this.reflector = reflector;
          this._transformedProviders = new Map();
          this._seenProviders = new Map();
          this._errors = [];
          this._allProviders = new Map();
          ngModule.transitiveModule.modules.forEach(function (ngModuleType) {
            var ngModuleProvider = {
              token: {
                identifier: ngModuleType
              },
              useClass: ngModuleType
            };

            _resolveProviders([ngModuleProvider], ProviderAstType.PublicService, true, sourceSpan, _this144._errors, _this144._allProviders,
            /* isModule */
            true);
          });

          _resolveProviders(ngModule.transitiveModule.providers.map(function (entry) {
            return entry.provider;
          }).concat(extraProviders), ProviderAstType.PublicService, false, sourceSpan, this._errors, this._allProviders,
          /* isModule */
          false);
        }

        _createClass2(NgModuleProviderAnalyzer, [{
          key: "parse",
          value: function parse() {
            var _this145 = this;

            Array.from(this._allProviders.values()).forEach(function (provider) {
              _this145._getOrCreateLocalProvider(provider.token, provider.eager);
            });

            if (this._errors.length > 0) {
              var errorString = this._errors.join('\n');

              throw new Error("Provider parse errors:\n".concat(errorString));
            } // Note: Maps keep their insertion order.


            var lazyProviders = [];
            var eagerProviders = [];

            this._transformedProviders.forEach(function (provider) {
              if (provider.eager) {
                eagerProviders.push(provider);
              } else {
                lazyProviders.push(provider);
              }
            });

            return lazyProviders.concat(eagerProviders);
          }
        }, {
          key: "_getOrCreateLocalProvider",
          value: function _getOrCreateLocalProvider(token, eager) {
            var _this146 = this;

            var resolvedProvider = this._allProviders.get(tokenReference(token));

            if (!resolvedProvider) {
              return null;
            }

            var transformedProviderAst = this._transformedProviders.get(tokenReference(token));

            if (transformedProviderAst) {
              return transformedProviderAst;
            }

            if (this._seenProviders.get(tokenReference(token)) != null) {
              this._errors.push(new ProviderError("Cannot instantiate cyclic dependency! ".concat(tokenName(token)), resolvedProvider.sourceSpan));

              return null;
            }

            this._seenProviders.set(tokenReference(token), true);

            var transformedProviders = resolvedProvider.providers.map(function (provider) {
              var transformedUseValue = provider.useValue;
              var transformedUseExisting = provider.useExisting;
              var transformedDeps = undefined;

              if (provider.useExisting != null) {
                var existingDiDep = _this146._getDependency({
                  token: provider.useExisting
                }, eager, resolvedProvider.sourceSpan);

                if (existingDiDep.token != null) {
                  transformedUseExisting = existingDiDep.token;
                } else {
                  transformedUseExisting = null;
                  transformedUseValue = existingDiDep.value;
                }
              } else if (provider.useFactory) {
                var deps = provider.deps || provider.useFactory.diDeps;
                transformedDeps = deps.map(function (dep) {
                  return _this146._getDependency(dep, eager, resolvedProvider.sourceSpan);
                });
              } else if (provider.useClass) {
                var _deps2 = provider.deps || provider.useClass.diDeps;

                transformedDeps = _deps2.map(function (dep) {
                  return _this146._getDependency(dep, eager, resolvedProvider.sourceSpan);
                });
              }

              return _transformProvider(provider, {
                useExisting: transformedUseExisting,
                useValue: transformedUseValue,
                deps: transformedDeps
              });
            });
            transformedProviderAst = _transformProviderAst(resolvedProvider, {
              eager: eager,
              providers: transformedProviders
            });

            this._transformedProviders.set(tokenReference(token), transformedProviderAst);

            return transformedProviderAst;
          }
        }, {
          key: "_getDependency",
          value: function _getDependency(dep) {
            var eager = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
            var requestorSourceSpan = arguments.length > 2 ? arguments[2] : undefined;
            var foundLocal = false;

            if (!dep.isSkipSelf && dep.token != null) {
              // access the injector
              if (tokenReference(dep.token) === this.reflector.resolveExternalReference(Identifiers.Injector) || tokenReference(dep.token) === this.reflector.resolveExternalReference(Identifiers.ComponentFactoryResolver)) {
                foundLocal = true; // access providers
              } else if (this._getOrCreateLocalProvider(dep.token, eager) != null) {
                foundLocal = true;
              }
            }

            return dep;
          }
        }]);

        return NgModuleProviderAnalyzer;
      }();

      function _transformProvider(provider, _ref11) {
        var useExisting = _ref11.useExisting,
            useValue = _ref11.useValue,
            deps = _ref11.deps;
        return {
          token: provider.token,
          useClass: provider.useClass,
          useExisting: useExisting,
          useFactory: provider.useFactory,
          useValue: useValue,
          deps: deps,
          multi: provider.multi
        };
      }

      function _transformProviderAst(provider, _ref12) {
        var eager = _ref12.eager,
            providers = _ref12.providers;
        return new ProviderAst(provider.token, provider.multiProvider, provider.eager || eager, providers, provider.providerType, provider.lifecycleHooks, provider.sourceSpan, provider.isModule);
      }

      function _resolveProvidersFromDirectives(directives, sourceSpan, targetErrors) {
        var providersByToken = new Map();
        directives.forEach(function (directive) {
          var dirProvider = {
            token: {
              identifier: directive.type
            },
            useClass: directive.type
          };

          _resolveProviders([dirProvider], directive.isComponent ? ProviderAstType.Component : ProviderAstType.Directive, true, sourceSpan, targetErrors, providersByToken,
          /* isModule */
          false);
        }); // Note: directives need to be able to overwrite providers of a component!

        var directivesWithComponentFirst = directives.filter(function (dir) {
          return dir.isComponent;
        }).concat(directives.filter(function (dir) {
          return !dir.isComponent;
        }));
        directivesWithComponentFirst.forEach(function (directive) {
          _resolveProviders(directive.providers, ProviderAstType.PublicService, false, sourceSpan, targetErrors, providersByToken,
          /* isModule */
          false);

          _resolveProviders(directive.viewProviders, ProviderAstType.PrivateService, false, sourceSpan, targetErrors, providersByToken,
          /* isModule */
          false);
        });
        return providersByToken;
      }

      function _resolveProviders(providers, providerType, eager, sourceSpan, targetErrors, targetProvidersByToken, isModule) {
        providers.forEach(function (provider) {
          var resolvedProvider = targetProvidersByToken.get(tokenReference(provider.token));

          if (resolvedProvider != null && !!resolvedProvider.multiProvider !== !!provider.multi) {
            targetErrors.push(new ProviderError("Mixing multi and non multi provider is not possible for token ".concat(tokenName(resolvedProvider.token)), sourceSpan));
          }

          if (!resolvedProvider) {
            var lifecycleHooks = provider.token.identifier && provider.token.identifier.lifecycleHooks ? provider.token.identifier.lifecycleHooks : [];
            var isUseValue = !(provider.useClass || provider.useExisting || provider.useFactory);
            resolvedProvider = new ProviderAst(provider.token, !!provider.multi, eager || isUseValue, [provider], providerType, lifecycleHooks, sourceSpan, isModule);
            targetProvidersByToken.set(tokenReference(provider.token), resolvedProvider);
          } else {
            if (!provider.multi) {
              resolvedProvider.providers.length = 0;
            }

            resolvedProvider.providers.push(provider);
          }
        });
      }

      function _getViewQueries(component) {
        // Note: queries start with id 1 so we can use the number in a Bloom filter!
        var viewQueryId = 1;
        var viewQueries = new Map();

        if (component.viewQueries) {
          component.viewQueries.forEach(function (query) {
            return _addQueryToTokenMap(viewQueries, {
              meta: query,
              queryId: viewQueryId++
            });
          });
        }

        return viewQueries;
      }

      function _getContentQueries(contentQueryStartId, directives) {
        var contentQueryId = contentQueryStartId;
        var contentQueries = new Map();
        directives.forEach(function (directive, directiveIndex) {
          if (directive.queries) {
            directive.queries.forEach(function (query) {
              return _addQueryToTokenMap(contentQueries, {
                meta: query,
                queryId: contentQueryId++
              });
            });
          }
        });
        return contentQueries;
      }

      function _addQueryToTokenMap(map, query) {
        query.meta.selectors.forEach(function (token) {
          var entry = map.get(tokenReference(token));

          if (!entry) {
            entry = [];
            map.set(tokenReference(token), entry);
          }

          entry.push(query);
        });
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var StyleWithImports = function StyleWithImports(style, styleUrls) {
        _classCallCheck(this, StyleWithImports);

        this.style = style;
        this.styleUrls = styleUrls;
      };

      function isStyleUrlResolvable(url) {
        if (url == null || url.length === 0 || url[0] == '/') return false;
        var schemeMatch = url.match(URL_WITH_SCHEMA_REGEXP);
        return schemeMatch === null || schemeMatch[1] == 'package' || schemeMatch[1] == 'asset';
      }
      /**
       * Rewrites stylesheets by resolving and removing the @import urls that
       * are either relative or don't have a `package:` scheme
       */


      function extractStyleUrls(resolver, baseUrl, cssText) {
        var foundUrls = [];
        var modifiedCssText = cssText.replace(CSS_STRIPPABLE_COMMENT_REGEXP, '').replace(CSS_IMPORT_REGEXP, function () {
          var url = (arguments.length <= 1 ? undefined : arguments[1]) || (arguments.length <= 2 ? undefined : arguments[2]);

          if (!isStyleUrlResolvable(url)) {
            // Do not attempt to resolve non-package absolute URLs with URI
            // scheme
            return arguments.length <= 0 ? undefined : arguments[0];
          }

          foundUrls.push(resolver.resolve(baseUrl, url));
          return '';
        });
        return new StyleWithImports(modifiedCssText, foundUrls);
      }

      var CSS_IMPORT_REGEXP = /@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g;
      var CSS_STRIPPABLE_COMMENT_REGEXP = /\/\*(?!#\s*(?:sourceURL|sourceMappingURL)=)[\s\S]+?\*\//g;
      var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var PROPERTY_PARTS_SEPARATOR = '.';
      var ATTRIBUTE_PREFIX = 'attr';
      var CLASS_PREFIX = 'class';
      var STYLE_PREFIX = 'style';
      var TEMPLATE_ATTR_PREFIX = '*';
      var ANIMATE_PROP_PREFIX = 'animate-';
      /**
       * Parses bindings in templates and in the directive host area.
       */

      var BindingParser = /*#__PURE__*/function () {
        function BindingParser(_exprParser, _interpolationConfig, _schemaRegistry, pipes, errors) {
          _classCallCheck(this, BindingParser);

          this._exprParser = _exprParser;
          this._interpolationConfig = _interpolationConfig;
          this._schemaRegistry = _schemaRegistry;
          this.errors = errors;
          this.pipesByName = null;
          this._usedPipes = new Map(); // When the `pipes` parameter is `null`, do not check for used pipes
          // This is used in IVY when we might not know the available pipes at compile time

          if (pipes) {
            var pipesByName = new Map();
            pipes.forEach(function (pipe) {
              return pipesByName.set(pipe.name, pipe);
            });
            this.pipesByName = pipesByName;
          }
        }

        _createClass2(BindingParser, [{
          key: "interpolationConfig",
          get: function get() {
            return this._interpolationConfig;
          }
        }, {
          key: "getUsedPipes",
          value: function getUsedPipes() {
            return Array.from(this._usedPipes.values());
          }
        }, {
          key: "createBoundHostProperties",
          value: function createBoundHostProperties(dirMeta, sourceSpan) {
            var _this147 = this;

            if (dirMeta.hostProperties) {
              var boundProps = [];
              Object.keys(dirMeta.hostProperties).forEach(function (propName) {
                var expression = dirMeta.hostProperties[propName];

                if (typeof expression === 'string') {
                  _this147.parsePropertyBinding(propName, expression, true, sourceSpan, sourceSpan.start.offset, undefined, [], // Use the `sourceSpan` for  `keySpan`. This isn't really accurate, but neither is the
                  // sourceSpan, as it represents the sourceSpan of the host itself rather than the
                  // source of the host binding (which doesn't exist in the template). Regardless,
                  // neither of these values are used in Ivy but are only here to satisfy the function
                  // signature. This should likely be refactored in the future so that `sourceSpan`
                  // isn't being used inaccurately.
                  boundProps, sourceSpan);
                } else {
                  _this147._reportError("Value of the host property binding \"".concat(propName, "\" needs to be a string representing an expression but got \"").concat(expression, "\" (").concat(typeof expression, ")"), sourceSpan);
                }
              });
              return boundProps;
            }

            return null;
          }
        }, {
          key: "createDirectiveHostPropertyAsts",
          value: function createDirectiveHostPropertyAsts(dirMeta, elementSelector, sourceSpan) {
            var _this148 = this;

            var boundProps = this.createBoundHostProperties(dirMeta, sourceSpan);
            return boundProps && boundProps.map(function (prop) {
              return _this148.createBoundElementProperty(elementSelector, prop);
            });
          }
        }, {
          key: "createDirectiveHostEventAsts",
          value: function createDirectiveHostEventAsts(dirMeta, sourceSpan) {
            var _this149 = this;

            if (dirMeta.hostListeners) {
              var targetEvents = [];
              Object.keys(dirMeta.hostListeners).forEach(function (propName) {
                var expression = dirMeta.hostListeners[propName];

                if (typeof expression === 'string') {
                  // TODO: pass a more accurate handlerSpan for this event.
                  _this149.parseEvent(propName, expression, sourceSpan, sourceSpan, [], targetEvents);
                } else {
                  _this149._reportError("Value of the host listener \"".concat(propName, "\" needs to be a string representing an expression but got \"").concat(expression, "\" (").concat(typeof expression, ")"), sourceSpan);
                }
              });
              return targetEvents;
            }

            return null;
          }
        }, {
          key: "parseInterpolation",
          value: function parseInterpolation(value, sourceSpan) {
            var sourceInfo = sourceSpan.start.toString();

            try {
              var ast = this._exprParser.parseInterpolation(value, sourceInfo, sourceSpan.start.offset, this._interpolationConfig);

              if (ast) this._reportExpressionParserErrors(ast.errors, sourceSpan);

              this._checkPipes(ast, sourceSpan);

              return ast;
            } catch (e) {
              this._reportError("".concat(e), sourceSpan);

              return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, sourceSpan.start.offset);
            }
          }
          /**
           * Similar to `parseInterpolation`, but treats the provided string as a single expression
           * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).
           * This is used for parsing the switch expression in ICUs.
           */

        }, {
          key: "parseInterpolationExpression",
          value: function parseInterpolationExpression(expression, sourceSpan) {
            var sourceInfo = sourceSpan.start.toString();

            try {
              var ast = this._exprParser.parseInterpolationExpression(expression, sourceInfo, sourceSpan.start.offset);

              if (ast) this._reportExpressionParserErrors(ast.errors, sourceSpan);

              this._checkPipes(ast, sourceSpan);

              return ast;
            } catch (e) {
              this._reportError("".concat(e), sourceSpan);

              return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, sourceSpan.start.offset);
            }
          }
          /**
           * Parses the bindings in a microsyntax expression, and converts them to
           * `ParsedProperty` or `ParsedVariable`.
           *
           * @param tplKey template binding name
           * @param tplValue template binding value
           * @param sourceSpan span of template binding relative to entire the template
           * @param absoluteValueOffset start of the tplValue relative to the entire template
           * @param targetMatchableAttrs potential attributes to match in the template
           * @param targetProps target property bindings in the template
           * @param targetVars target variables in the template
           */

        }, {
          key: "parseInlineTemplateBinding",
          value: function parseInlineTemplateBinding(tplKey, tplValue, sourceSpan, absoluteValueOffset, targetMatchableAttrs, targetProps, targetVars, isIvyAst) {
            var absoluteKeyOffset = sourceSpan.start.offset + TEMPLATE_ATTR_PREFIX.length;

            var bindings = this._parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset);

            var _iterator9 = _createForOfIteratorHelper(bindings),
                _step9;

            try {
              for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
                var binding = _step9.value;
                // sourceSpan is for the entire HTML attribute. bindingSpan is for a particular
                // binding within the microsyntax expression so it's more narrow than sourceSpan.
                var bindingSpan = moveParseSourceSpan(sourceSpan, binding.sourceSpan);
                var key = binding.key.source;
                var keySpan = moveParseSourceSpan(sourceSpan, binding.key.span);

                if (binding instanceof VariableBinding) {
                  var value = binding.value ? binding.value.source : '$implicit';
                  var valueSpan = binding.value ? moveParseSourceSpan(sourceSpan, binding.value.span) : undefined;
                  targetVars.push(new ParsedVariable(key, value, bindingSpan, keySpan, valueSpan));
                } else if (binding.value) {
                  var srcSpan = isIvyAst ? bindingSpan : sourceSpan;

                  var _valueSpan = moveParseSourceSpan(sourceSpan, binding.value.ast.sourceSpan);

                  this._parsePropertyAst(key, binding.value, srcSpan, keySpan, _valueSpan, targetMatchableAttrs, targetProps);
                } else {
                  targetMatchableAttrs.push([key, ''
                  /* value */
                  ]); // Since this is a literal attribute with no RHS, source span should be
                  // just the key span.

                  this.parseLiteralAttr(key, null
                  /* value */
                  , keySpan, absoluteValueOffset, undefined
                  /* valueSpan */
                  , targetMatchableAttrs, targetProps, keySpan);
                }
              }
            } catch (err) {
              _iterator9.e(err);
            } finally {
              _iterator9.f();
            }
          }
          /**
           * Parses the bindings in a microsyntax expression, e.g.
           * ```
           *    <tag *tplKey="let value1 = prop; let value2 = localVar">
           * ```
           *
           * @param tplKey template binding name
           * @param tplValue template binding value
           * @param sourceSpan span of template binding relative to entire the template
           * @param absoluteKeyOffset start of the `tplKey`
           * @param absoluteValueOffset start of the `tplValue`
           */

        }, {
          key: "_parseTemplateBindings",
          value: function _parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset) {
            var _this150 = this;

            var sourceInfo = sourceSpan.start.toString();

            try {
              var bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, sourceInfo, absoluteKeyOffset, absoluteValueOffset);

              this._reportExpressionParserErrors(bindingsResult.errors, sourceSpan);

              bindingsResult.templateBindings.forEach(function (binding) {
                if (binding.value instanceof ASTWithSource) {
                  _this150._checkPipes(binding.value, sourceSpan);
                }
              });
              bindingsResult.warnings.forEach(function (warning) {
                _this150._reportError(warning, sourceSpan, ParseErrorLevel.WARNING);
              });
              return bindingsResult.templateBindings;
            } catch (e) {
              this._reportError("".concat(e), sourceSpan);

              return [];
            }
          }
        }, {
          key: "parseLiteralAttr",
          value: function parseLiteralAttr(name, value, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, // TODO(atscott): keySpan is only optional here so VE template parser implementation does not
          // have to change This should be required when VE is removed.
          targetProps, keySpan) {
            if (isAnimationLabel(name)) {
              name = name.substring(1);

              if (value) {
                this._reportError("Assigning animation triggers via @prop=\"exp\" attributes with an expression is invalid." + " Use property bindings (e.g. [@prop]=\"exp\") or use an attribute without a value (e.g. @prop) instead.", sourceSpan, ParseErrorLevel.ERROR);
              }

              this._parseAnimation(name, value, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
            } else {
              targetProps.push(new ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, '', absoluteOffset), ParsedPropertyType.LITERAL_ATTR, sourceSpan, keySpan, valueSpan));
            }
          }
        }, {
          key: "parsePropertyBinding",
          value: function parsePropertyBinding(name, expression, isHost, sourceSpan, absoluteOffset, valueSpan, // TODO(atscott): keySpan is only optional here so VE template parser implementation does not
          // have to change This should be required when VE is removed.
          targetMatchableAttrs, targetProps, keySpan) {
            if (name.length === 0) {
              this._reportError("Property name is missing in binding", sourceSpan);
            }

            var isAnimationProp = false;

            if (name.startsWith(ANIMATE_PROP_PREFIX)) {
              isAnimationProp = true;
              name = name.substring(ANIMATE_PROP_PREFIX.length);
            } else if (isAnimationLabel(name)) {
              isAnimationProp = true;
              name = name.substring(1);
            }

            if (isAnimationProp) {
              this._parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
            } else {
              this._parsePropertyAst(name, this._parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
            }
          }
        }, {
          key: "parsePropertyInterpolation",
          value: function parsePropertyInterpolation(name, value, sourceSpan, valueSpan, targetMatchableAttrs, // TODO(atscott): keySpan is only optional here so VE template parser implementation does not
          // have to change This should be required when VE is removed.
          targetProps, keySpan) {
            var expr = this.parseInterpolation(value, valueSpan || sourceSpan);

            if (expr) {
              this._parsePropertyAst(name, expr, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);

              return true;
            }

            return false;
          }
        }, {
          key: "_parsePropertyAst",
          value: function _parsePropertyAst(name, ast, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
            targetMatchableAttrs.push([name, ast.source]);
            targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.DEFAULT, sourceSpan, keySpan, valueSpan));
          }
        }, {
          key: "_parseAnimation",
          value: function _parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
            if (name.length === 0) {
              this._reportError('Animation trigger is missing', sourceSpan);
            } // This will occur when a @trigger is not paired with an expression.
            // For animations it is valid to not have an expression since */void
            // states will be applied by angular when the element is attached/detached


            var ast = this._parseBinding(expression || 'undefined', false, valueSpan || sourceSpan, absoluteOffset);

            targetMatchableAttrs.push([name, ast.source]);
            targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.ANIMATION, sourceSpan, keySpan, valueSpan));
          }
        }, {
          key: "_parseBinding",
          value: function _parseBinding(value, isHostBinding, sourceSpan, absoluteOffset) {
            var sourceInfo = (sourceSpan && sourceSpan.start || '(unknown)').toString();

            try {
              var ast = isHostBinding ? this._exprParser.parseSimpleBinding(value, sourceInfo, absoluteOffset, this._interpolationConfig) : this._exprParser.parseBinding(value, sourceInfo, absoluteOffset, this._interpolationConfig);
              if (ast) this._reportExpressionParserErrors(ast.errors, sourceSpan);

              this._checkPipes(ast, sourceSpan);

              return ast;
            } catch (e) {
              this._reportError("".concat(e), sourceSpan);

              return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);
            }
          }
        }, {
          key: "createBoundElementProperty",
          value: function createBoundElementProperty(elementSelector, boundProp) {
            var skipValidation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
            var mapPropertyName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;

            if (boundProp.isAnimation) {
              return new BoundElementProperty(boundProp.name, 4
              /* Animation */
              , SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
            }

            var unit = null;
            var bindingType = undefined;
            var boundPropertyName = null;
            var parts = boundProp.name.split(PROPERTY_PARTS_SEPARATOR);
            var securityContexts = undefined; // Check for special cases (prefix style, attr, class)

            if (parts.length > 1) {
              if (parts[0] == ATTRIBUTE_PREFIX) {
                boundPropertyName = parts.slice(1).join(PROPERTY_PARTS_SEPARATOR);

                if (!skipValidation) {
                  this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, true);
                }

                securityContexts = _calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, boundPropertyName, true);
                var nsSeparatorIdx = boundPropertyName.indexOf(':');

                if (nsSeparatorIdx > -1) {
                  var ns = boundPropertyName.substring(0, nsSeparatorIdx);
                  var name = boundPropertyName.substring(nsSeparatorIdx + 1);
                  boundPropertyName = mergeNsAndName(ns, name);
                }

                bindingType = 1
                /* Attribute */
                ;
              } else if (parts[0] == CLASS_PREFIX) {
                boundPropertyName = parts[1];
                bindingType = 2
                /* Class */
                ;
                securityContexts = [SecurityContext.NONE];
              } else if (parts[0] == STYLE_PREFIX) {
                unit = parts.length > 2 ? parts[2] : null;
                boundPropertyName = parts[1];
                bindingType = 3
                /* Style */
                ;
                securityContexts = [SecurityContext.STYLE];
              }
            } // If not a special case, use the full property name


            if (boundPropertyName === null) {
              var mappedPropName = this._schemaRegistry.getMappedPropName(boundProp.name);

              boundPropertyName = mapPropertyName ? mappedPropName : boundProp.name;
              securityContexts = _calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, mappedPropName, false);
              bindingType = 0
              /* Property */
              ;

              if (!skipValidation) {
                this._validatePropertyOrAttributeName(mappedPropName, boundProp.sourceSpan, false);
              }
            }

            return new BoundElementProperty(boundPropertyName, bindingType, securityContexts[0], boundProp.expression, unit, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
          }
        }, {
          key: "parseEvent",
          value: function parseEvent(name, expression, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents) {
            if (name.length === 0) {
              this._reportError("Event name is missing in binding", sourceSpan);
            }

            if (isAnimationLabel(name)) {
              name = name.substr(1);

              this._parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents);
            } else {
              this._parseRegularEvent(name, expression, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents);
            }
          }
        }, {
          key: "calcPossibleSecurityContexts",
          value: function calcPossibleSecurityContexts(selector, propName, isAttribute) {
            var prop = this._schemaRegistry.getMappedPropName(propName);

            return _calcPossibleSecurityContexts(this._schemaRegistry, selector, prop, isAttribute);
          }
        }, {
          key: "_parseAnimationEvent",
          value: function _parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents) {
            var matches = splitAtPeriod(name, [name, '']);
            var eventName = matches[0];
            var phase = matches[1].toLowerCase();

            if (phase) {
              switch (phase) {
                case 'start':
                case 'done':
                  var ast = this._parseAction(expression, handlerSpan);

                  targetEvents.push(new ParsedEvent(eventName, phase, 1
                  /* Animation */
                  , ast, sourceSpan, handlerSpan));
                  break;

                default:
                  this._reportError("The provided animation output phase value \"".concat(phase, "\" for \"@").concat(eventName, "\" is not supported (use start or done)"), sourceSpan);

                  break;
              }
            } else {
              this._reportError("The animation trigger output event (@".concat(eventName, ") is missing its phase value name (start or done are currently supported)"), sourceSpan);
            }
          }
        }, {
          key: "_parseRegularEvent",
          value: function _parseRegularEvent(name, expression, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents) {
            // long format: 'target: eventName'
            var _splitAtColon3 = splitAtColon(name, [null, name]),
                _splitAtColon4 = _slicedToArray(_splitAtColon3, 2),
                target = _splitAtColon4[0],
                eventName = _splitAtColon4[1];

            var ast = this._parseAction(expression, handlerSpan);

            targetMatchableAttrs.push([name, ast.source]);
            targetEvents.push(new ParsedEvent(eventName, target, 0
            /* Regular */
            , ast, sourceSpan, handlerSpan)); // Don't detect directives for event names for now,
            // so don't add the event name to the matchableAttrs
          }
        }, {
          key: "_parseAction",
          value: function _parseAction(value, sourceSpan) {
            var sourceInfo = (sourceSpan && sourceSpan.start || '(unknown').toString();
            var absoluteOffset = sourceSpan && sourceSpan.start ? sourceSpan.start.offset : 0;

            try {
              var ast = this._exprParser.parseAction(value, sourceInfo, absoluteOffset, this._interpolationConfig);

              if (ast) {
                this._reportExpressionParserErrors(ast.errors, sourceSpan);
              }

              if (!ast || ast.ast instanceof EmptyExpr) {
                this._reportError("Empty expressions are not allowed", sourceSpan);

                return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);
              }

              this._checkPipes(ast, sourceSpan);

              return ast;
            } catch (e) {
              this._reportError("".concat(e), sourceSpan);

              return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);
            }
          }
        }, {
          key: "_reportError",
          value: function _reportError(message, sourceSpan) {
            var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ParseErrorLevel.ERROR;
            this.errors.push(new ParseError(sourceSpan, message, level));
          }
        }, {
          key: "_reportExpressionParserErrors",
          value: function _reportExpressionParserErrors(errors, sourceSpan) {
            var _iterator10 = _createForOfIteratorHelper(errors),
                _step10;

            try {
              for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
                var _error = _step10.value;

                this._reportError(_error.message, sourceSpan);
              }
            } catch (err) {
              _iterator10.e(err);
            } finally {
              _iterator10.f();
            }
          } // Make sure all the used pipes are known in `this.pipesByName`

        }, {
          key: "_checkPipes",
          value: function _checkPipes(ast, sourceSpan) {
            var _this151 = this;

            if (ast && this.pipesByName) {
              var collector = new PipeCollector();
              ast.visit(collector);
              collector.pipes.forEach(function (ast, pipeName) {
                var pipeMeta = _this151.pipesByName.get(pipeName);

                if (!pipeMeta) {
                  _this151._reportError("The pipe '".concat(pipeName, "' could not be found"), new ParseSourceSpan(sourceSpan.start.moveBy(ast.span.start), sourceSpan.start.moveBy(ast.span.end)));
                } else {
                  _this151._usedPipes.set(pipeName, pipeMeta);
                }
              });
            }
          }
          /**
           * @param propName the name of the property / attribute
           * @param sourceSpan
           * @param isAttr true when binding to an attribute
           */

        }, {
          key: "_validatePropertyOrAttributeName",
          value: function _validatePropertyOrAttributeName(propName, sourceSpan, isAttr) {
            var report = isAttr ? this._schemaRegistry.validateAttribute(propName) : this._schemaRegistry.validateProperty(propName);

            if (report.error) {
              this._reportError(report.msg, sourceSpan, ParseErrorLevel.ERROR);
            }
          }
        }]);

        return BindingParser;
      }();

      var PipeCollector = /*#__PURE__*/function (_RecursiveAstVisitor$) {
        _inherits(PipeCollector, _RecursiveAstVisitor$);

        var _super98 = _createSuper(PipeCollector);

        function PipeCollector() {
          var _this152;

          _classCallCheck(this, PipeCollector);

          _this152 = _super98.apply(this, arguments);
          _this152.pipes = new Map();
          return _this152;
        }

        _createClass2(PipeCollector, [{
          key: "visitPipe",
          value: function visitPipe(ast, context) {
            this.pipes.set(ast.name, ast);
            ast.exp.visit(this);
            this.visitAll(ast.args, context);
            return null;
          }
        }]);

        return PipeCollector;
      }(RecursiveAstVisitor$1);

      function isAnimationLabel(name) {
        return name[0] == '@';
      }

      function _calcPossibleSecurityContexts(registry, selector, propName, isAttribute) {
        var ctxs = [];
        CssSelector.parse(selector).forEach(function (selector) {
          var elementNames = selector.element ? [selector.element] : registry.allKnownElementNames();
          var notElementNames = new Set(selector.notSelectors.filter(function (selector) {
            return selector.isElementSelector();
          }).map(function (selector) {
            return selector.element;
          }));
          var possibleElementNames = elementNames.filter(function (elementName) {
            return !notElementNames.has(elementName);
          });
          ctxs.push.apply(ctxs, _toConsumableArray(possibleElementNames.map(function (elementName) {
            return registry.securityContext(elementName, propName, isAttribute);
          })));
        });
        return ctxs.length === 0 ? [SecurityContext.NONE] : Array.from(new Set(ctxs)).sort();
      }
      /**
       * Compute a new ParseSourceSpan based off an original `sourceSpan` by using
       * absolute offsets from the specified `absoluteSpan`.
       *
       * @param sourceSpan original source span
       * @param absoluteSpan absolute source span to move to
       */


      function moveParseSourceSpan(sourceSpan, absoluteSpan) {
        // The difference of two absolute offsets provide the relative offset
        var startDiff = absoluteSpan.start - sourceSpan.start.offset;
        var endDiff = absoluteSpan.end - sourceSpan.end.offset;
        return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var NG_CONTENT_SELECT_ATTR = 'select';
      var LINK_ELEMENT = 'link';
      var LINK_STYLE_REL_ATTR = 'rel';
      var LINK_STYLE_HREF_ATTR = 'href';
      var LINK_STYLE_REL_VALUE = 'stylesheet';
      var STYLE_ELEMENT = 'style';
      var SCRIPT_ELEMENT = 'script';
      var NG_NON_BINDABLE_ATTR = 'ngNonBindable';
      var NG_PROJECT_AS = 'ngProjectAs';

      function preparseElement(ast) {
        var selectAttr = null;
        var hrefAttr = null;
        var relAttr = null;
        var nonBindable = false;
        var projectAs = '';
        ast.attrs.forEach(function (attr) {
          var lcAttrName = attr.name.toLowerCase();

          if (lcAttrName == NG_CONTENT_SELECT_ATTR) {
            selectAttr = attr.value;
          } else if (lcAttrName == LINK_STYLE_HREF_ATTR) {
            hrefAttr = attr.value;
          } else if (lcAttrName == LINK_STYLE_REL_ATTR) {
            relAttr = attr.value;
          } else if (attr.name == NG_NON_BINDABLE_ATTR) {
            nonBindable = true;
          } else if (attr.name == NG_PROJECT_AS) {
            if (attr.value.length > 0) {
              projectAs = attr.value;
            }
          }
        });
        selectAttr = normalizeNgContentSelect(selectAttr);
        var nodeName = ast.name.toLowerCase();
        var type = PreparsedElementType.OTHER;

        if (isNgContent(nodeName)) {
          type = PreparsedElementType.NG_CONTENT;
        } else if (nodeName == STYLE_ELEMENT) {
          type = PreparsedElementType.STYLE;
        } else if (nodeName == SCRIPT_ELEMENT) {
          type = PreparsedElementType.SCRIPT;
        } else if (nodeName == LINK_ELEMENT && relAttr == LINK_STYLE_REL_VALUE) {
          type = PreparsedElementType.STYLESHEET;
        }

        return new PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs);
      }

      var PreparsedElementType;

      (function (PreparsedElementType) {
        PreparsedElementType[PreparsedElementType["NG_CONTENT"] = 0] = "NG_CONTENT";
        PreparsedElementType[PreparsedElementType["STYLE"] = 1] = "STYLE";
        PreparsedElementType[PreparsedElementType["STYLESHEET"] = 2] = "STYLESHEET";
        PreparsedElementType[PreparsedElementType["SCRIPT"] = 3] = "SCRIPT";
        PreparsedElementType[PreparsedElementType["OTHER"] = 4] = "OTHER";
      })(PreparsedElementType || (PreparsedElementType = {}));

      var PreparsedElement = function PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs) {
        _classCallCheck(this, PreparsedElement);

        this.type = type;
        this.selectAttr = selectAttr;
        this.hrefAttr = hrefAttr;
        this.nonBindable = nonBindable;
        this.projectAs = projectAs;
      };

      function normalizeNgContentSelect(selectAttr) {
        if (selectAttr === null || selectAttr.length === 0) {
          return '*';
        }

        return selectAttr;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var BIND_NAME_REGEXP = /^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/; // Group 1 = "bind-"

      var KW_BIND_IDX = 1; // Group 2 = "let-"

      var KW_LET_IDX = 2; // Group 3 = "ref-/#"

      var KW_REF_IDX = 3; // Group 4 = "on-"

      var KW_ON_IDX = 4; // Group 5 = "bindon-"

      var KW_BINDON_IDX = 5; // Group 6 = "@"

      var KW_AT_IDX = 6; // Group 7 = the identifier after "bind-", "let-", "ref-/#", "on-", "bindon-" or "@"

      var IDENT_KW_IDX = 7; // Group 8 = identifier inside [()]

      var IDENT_BANANA_BOX_IDX = 8; // Group 9 = identifier inside []

      var IDENT_PROPERTY_IDX = 9; // Group 10 = identifier inside ()

      var IDENT_EVENT_IDX = 10;
      var TEMPLATE_ATTR_PREFIX$1 = '*';
      var CLASS_ATTR = 'class';

      var _TEXT_CSS_SELECTOR;

      function TEXT_CSS_SELECTOR() {
        if (!_TEXT_CSS_SELECTOR) {
          _TEXT_CSS_SELECTOR = CssSelector.parse('*')[0];
        }

        return _TEXT_CSS_SELECTOR;
      }

      var TemplateParseError = /*#__PURE__*/function (_ParseError5) {
        _inherits(TemplateParseError, _ParseError5);

        var _super99 = _createSuper(TemplateParseError);

        function TemplateParseError(message, span, level) {
          _classCallCheck(this, TemplateParseError);

          return _super99.call(this, span, message, level);
        }

        return TemplateParseError;
      }(ParseError);

      var TemplateParseResult = function TemplateParseResult(templateAst, usedPipes, errors) {
        _classCallCheck(this, TemplateParseResult);

        this.templateAst = templateAst;
        this.usedPipes = usedPipes;
        this.errors = errors;
      };

      var TemplateParser = /*#__PURE__*/function () {
        function TemplateParser(_config, _reflector, _exprParser, _schemaRegistry, _htmlParser, _console, transforms) {
          _classCallCheck(this, TemplateParser);

          this._config = _config;
          this._reflector = _reflector;
          this._exprParser = _exprParser;
          this._schemaRegistry = _schemaRegistry;
          this._htmlParser = _htmlParser;
          this._console = _console;
          this.transforms = transforms;
        }

        _createClass2(TemplateParser, [{
          key: "expressionParser",
          get: function get() {
            return this._exprParser;
          }
        }, {
          key: "parse",
          value: function parse(component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces) {
            var _a;

            var result = this.tryParse(component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces);
            var warnings = result.errors.filter(function (error) {
              return error.level === ParseErrorLevel.WARNING;
            });
            var errors = result.errors.filter(function (error) {
              return error.level === ParseErrorLevel.ERROR;
            });

            if (warnings.length > 0) {
              (_a = this._console) === null || _a === void 0 ? void 0 : _a.warn("Template parse warnings:\n".concat(warnings.join('\n')));
            }

            if (errors.length > 0) {
              var errorString = errors.join('\n');
              throw syntaxError("Template parse errors:\n".concat(errorString), errors);
            }

            return {
              template: result.templateAst,
              pipes: result.usedPipes
            };
          }
        }, {
          key: "tryParse",
          value: function tryParse(component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces) {
            var htmlParseResult = typeof template === 'string' ? this._htmlParser.parse(template, templateUrl, {
              tokenizeExpansionForms: true,
              interpolationConfig: this.getInterpolationConfig(component)
            }) : template;

            if (!preserveWhitespaces) {
              htmlParseResult = removeWhitespaces(htmlParseResult);
            }

            return this.tryParseHtml(this.expandHtml(htmlParseResult), component, directives, pipes, schemas);
          }
        }, {
          key: "tryParseHtml",
          value: function tryParseHtml(htmlAstWithErrors, component, directives, pipes, schemas) {
            var result;
            var errors = htmlAstWithErrors.errors;
            var usedPipes = [];

            if (htmlAstWithErrors.rootNodes.length > 0) {
              var uniqDirectives = removeSummaryDuplicates(directives);
              var uniqPipes = removeSummaryDuplicates(pipes);
              var providerViewContext = new ProviderViewContext(this._reflector, component);
              var interpolationConfig = undefined;

              if (component.template && component.template.interpolation) {
                interpolationConfig = {
                  start: component.template.interpolation[0],
                  end: component.template.interpolation[1]
                };
              }

              var bindingParser = new BindingParser(this._exprParser, interpolationConfig, this._schemaRegistry, uniqPipes, errors);
              var parseVisitor = new TemplateParseVisitor(this._reflector, this._config, providerViewContext, uniqDirectives, bindingParser, this._schemaRegistry, schemas, errors);
              result = visitAll$1(parseVisitor, htmlAstWithErrors.rootNodes, EMPTY_ELEMENT_CONTEXT);
              errors.push.apply(errors, _toConsumableArray(providerViewContext.errors));
              usedPipes.push.apply(usedPipes, _toConsumableArray(bindingParser.getUsedPipes()));
            } else {
              result = [];
            }

            this._assertNoReferenceDuplicationOnTemplate(result, errors);

            if (errors.length > 0) {
              return new TemplateParseResult(result, usedPipes, errors);
            }

            if (this.transforms) {
              this.transforms.forEach(function (transform) {
                result = templateVisitAll(transform, result);
              });
            }

            return new TemplateParseResult(result, usedPipes, errors);
          }
        }, {
          key: "expandHtml",
          value: function expandHtml(htmlAstWithErrors) {
            var forced = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
            var errors = htmlAstWithErrors.errors;

            if (errors.length == 0 || forced) {
              // Transform ICU messages to angular directives
              var expandedHtmlAst = expandNodes(htmlAstWithErrors.rootNodes);
              errors.push.apply(errors, _toConsumableArray(expandedHtmlAst.errors));
              htmlAstWithErrors = new ParseTreeResult(expandedHtmlAst.nodes, errors);
            }

            return htmlAstWithErrors;
          }
        }, {
          key: "getInterpolationConfig",
          value: function getInterpolationConfig(component) {
            if (component.template) {
              return InterpolationConfig.fromArray(component.template.interpolation);
            }

            return undefined;
          }
          /** @internal */

        }, {
          key: "_assertNoReferenceDuplicationOnTemplate",
          value: function _assertNoReferenceDuplicationOnTemplate(result, errors) {
            var existingReferences = [];
            result.filter(function (element) {
              return !!element.references;
            }).forEach(function (element) {
              return element.references.forEach(function (reference) {
                var name = reference.name;

                if (existingReferences.indexOf(name) < 0) {
                  existingReferences.push(name);
                } else {
                  var _error2 = new TemplateParseError("Reference \"#".concat(name, "\" is defined several times"), reference.sourceSpan, ParseErrorLevel.ERROR);

                  errors.push(_error2);
                }
              });
            });
          }
        }]);

        return TemplateParser;
      }();

      var TemplateParseVisitor = /*#__PURE__*/function () {
        function TemplateParseVisitor(reflector, config, providerViewContext, directives, _bindingParser, _schemaRegistry, _schemas, _targetErrors) {
          var _this153 = this;

          _classCallCheck(this, TemplateParseVisitor);

          this.reflector = reflector;
          this.config = config;
          this.providerViewContext = providerViewContext;
          this._bindingParser = _bindingParser;
          this._schemaRegistry = _schemaRegistry;
          this._schemas = _schemas;
          this._targetErrors = _targetErrors;
          this.selectorMatcher = new SelectorMatcher();
          this.directivesIndex = new Map();
          this.ngContentCount = 0; // Note: queries start with id 1 so we can use the number in a Bloom filter!

          this.contentQueryStartId = providerViewContext.component.viewQueries.length + 1;
          directives.forEach(function (directive, index) {
            var selector = CssSelector.parse(directive.selector);

            _this153.selectorMatcher.addSelectables(selector, directive);

            _this153.directivesIndex.set(directive, index);
          });
        }

        _createClass2(TemplateParseVisitor, [{
          key: "visitExpansion",
          value: function visitExpansion(expansion, context) {
            return null;
          }
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(expansionCase, context) {
            return null;
          }
        }, {
          key: "visitText",
          value: function visitText(text, parent) {
            var ngContentIndex = parent.findNgContentIndex(TEXT_CSS_SELECTOR());
            var valueNoNgsp = replaceNgsp(text.value);

            var expr = this._bindingParser.parseInterpolation(valueNoNgsp, text.sourceSpan);

            return expr ? new BoundTextAst(expr, ngContentIndex, text.sourceSpan) : new TextAst(valueNoNgsp, ngContentIndex, text.sourceSpan);
          }
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute, context) {
            return new AttrAst(attribute.name, attribute.value, attribute.sourceSpan);
          }
        }, {
          key: "visitComment",
          value: function visitComment(comment, context) {
            return null;
          }
        }, {
          key: "visitElement",
          value: function visitElement(element, parent) {
            var _this154 = this;

            var queryStartIndex = this.contentQueryStartId;
            var elName = element.name;
            var preparsedElement = preparseElement(element);

            if (preparsedElement.type === PreparsedElementType.SCRIPT || preparsedElement.type === PreparsedElementType.STYLE) {
              // Skipping <script> for security reasons
              // Skipping <style> as we already processed them
              // in the StyleCompiler
              return null;
            }

            if (preparsedElement.type === PreparsedElementType.STYLESHEET && isStyleUrlResolvable(preparsedElement.hrefAttr)) {
              // Skipping stylesheets with either relative urls or package scheme as we already processed
              // them in the StyleCompiler
              return null;
            }

            var matchableAttrs = [];
            var elementOrDirectiveProps = [];
            var elementOrDirectiveRefs = [];
            var elementVars = [];
            var events = [];
            var templateElementOrDirectiveProps = [];
            var templateMatchableAttrs = [];
            var templateElementVars = [];
            var hasInlineTemplates = false;
            var attrs = [];
            var isTemplateElement = isNgTemplate(element.name);
            element.attrs.forEach(function (attr) {
              var parsedVariables = [];

              var hasBinding = _this154._parseAttr(isTemplateElement, attr, matchableAttrs, elementOrDirectiveProps, events, elementOrDirectiveRefs, elementVars);

              elementVars.push.apply(elementVars, _toConsumableArray(parsedVariables.map(function (v) {
                return VariableAst.fromParsedVariable(v);
              })));
              var templateValue;
              var templateKey;

              var normalizedName = _this154._normalizeAttributeName(attr.name);

              if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX$1)) {
                templateValue = attr.value;
                templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX$1.length);
              }

              var hasTemplateBinding = templateValue != null;

              if (hasTemplateBinding) {
                if (hasInlineTemplates) {
                  _this154._reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *", attr.sourceSpan);
                }

                hasInlineTemplates = true;
                var _parsedVariables = [];
                var absoluteOffset = (attr.valueSpan || attr.sourceSpan).start.offset;

                _this154._bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attr.sourceSpan, absoluteOffset, templateMatchableAttrs, templateElementOrDirectiveProps, _parsedVariables, false
                /* isIvyAst */
                );

                templateElementVars.push.apply(templateElementVars, _toConsumableArray(_parsedVariables.map(function (v) {
                  return VariableAst.fromParsedVariable(v);
                })));
              }

              if (!hasBinding && !hasTemplateBinding) {
                // don't include the bindings as attributes as well in the AST
                attrs.push(_this154.visitAttribute(attr, null));
                matchableAttrs.push([attr.name, attr.value]);
              }
            });
            var elementCssSelector = createElementCssSelector(elName, matchableAttrs);

            var _this$_parseDirective = this._parseDirectives(this.selectorMatcher, elementCssSelector),
                directiveMetas = _this$_parseDirective.directives,
                matchElement = _this$_parseDirective.matchElement;

            var references = [];
            var boundDirectivePropNames = new Set();

            var directiveAsts = this._createDirectiveAsts(isTemplateElement, element.name, directiveMetas, elementOrDirectiveProps, elementOrDirectiveRefs, element.sourceSpan, references, boundDirectivePropNames);

            var elementProps = this._createElementPropertyAsts(element.name, elementOrDirectiveProps, boundDirectivePropNames);

            var isViewRoot = parent.isTemplateElement || hasInlineTemplates;
            var providerContext = new ProviderElementContext(this.providerViewContext, parent.providerContext, isViewRoot, directiveAsts, attrs, references, isTemplateElement, queryStartIndex, element.sourceSpan);
            var children = visitAll$1(preparsedElement.nonBindable ? NON_BINDABLE_VISITOR : this, element.children, ElementContext.create(isTemplateElement, directiveAsts, isTemplateElement ? parent.providerContext : providerContext));
            providerContext.afterElement(); // Override the actual selector when the `ngProjectAs` attribute is provided

            var projectionSelector = preparsedElement.projectAs != '' ? CssSelector.parse(preparsedElement.projectAs)[0] : elementCssSelector;
            var ngContentIndex = parent.findNgContentIndex(projectionSelector);
            var parsedElement;

            if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {
              // `<ng-content>` element
              if (element.children && !element.children.every(_isEmptyTextNode)) {
                this._reportError("<ng-content> element cannot have content.", element.sourceSpan);
              }

              parsedElement = new NgContentAst(this.ngContentCount++, hasInlineTemplates ? null : ngContentIndex, element.sourceSpan);
            } else if (isTemplateElement) {
              // `<ng-template>` element
              this._assertAllEventsPublishedByDirectives(directiveAsts, events);

              this._assertNoComponentsNorElementBindingsOnTemplate(directiveAsts, elementProps, element.sourceSpan);

              parsedElement = new EmbeddedTemplateAst(attrs, events, references, elementVars, providerContext.transformedDirectiveAsts, providerContext.transformProviders, providerContext.transformedHasViewContainer, providerContext.queryMatches, children, hasInlineTemplates ? null : ngContentIndex, element.sourceSpan);
            } else {
              // element other than `<ng-content>` and `<ng-template>`
              this._assertElementExists(matchElement, element);

              this._assertOnlyOneComponent(directiveAsts, element.sourceSpan);

              var _ngContentIndex = hasInlineTemplates ? null : parent.findNgContentIndex(projectionSelector);

              parsedElement = new ElementAst(elName, attrs, elementProps, events, references, providerContext.transformedDirectiveAsts, providerContext.transformProviders, providerContext.transformedHasViewContainer, providerContext.queryMatches, children, hasInlineTemplates ? null : _ngContentIndex, element.sourceSpan, element.endSourceSpan || null);
            }

            if (hasInlineTemplates) {
              // The element as a *-attribute
              var templateQueryStartIndex = this.contentQueryStartId;
              var templateSelector = createElementCssSelector('ng-template', templateMatchableAttrs);

              var _this$_parseDirective2 = this._parseDirectives(this.selectorMatcher, templateSelector),
                  directives = _this$_parseDirective2.directives;

              var templateBoundDirectivePropNames = new Set();

              var templateDirectiveAsts = this._createDirectiveAsts(true, elName, directives, templateElementOrDirectiveProps, [], element.sourceSpan, [], templateBoundDirectivePropNames);

              var templateElementProps = this._createElementPropertyAsts(elName, templateElementOrDirectiveProps, templateBoundDirectivePropNames);

              this._assertNoComponentsNorElementBindingsOnTemplate(templateDirectiveAsts, templateElementProps, element.sourceSpan);

              var templateProviderContext = new ProviderElementContext(this.providerViewContext, parent.providerContext, parent.isTemplateElement, templateDirectiveAsts, [], [], true, templateQueryStartIndex, element.sourceSpan);
              templateProviderContext.afterElement();
              parsedElement = new EmbeddedTemplateAst([], [], [], templateElementVars, templateProviderContext.transformedDirectiveAsts, templateProviderContext.transformProviders, templateProviderContext.transformedHasViewContainer, templateProviderContext.queryMatches, [parsedElement], ngContentIndex, element.sourceSpan);
            }

            return parsedElement;
          }
        }, {
          key: "_parseAttr",
          value: function _parseAttr(isTemplateElement, attr, targetMatchableAttrs, targetProps, targetEvents, targetRefs, targetVars) {
            var name = this._normalizeAttributeName(attr.name);

            var value = attr.value;
            var srcSpan = attr.sourceSpan;
            var absoluteOffset = attr.valueSpan ? attr.valueSpan.start.offset : srcSpan.start.offset;
            var boundEvents = [];
            var bindParts = name.match(BIND_NAME_REGEXP);
            var hasBinding = false;

            if (bindParts !== null) {
              hasBinding = true;

              if (bindParts[KW_BIND_IDX] != null) {
                this._bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX], value, false, srcSpan, absoluteOffset, attr.valueSpan, targetMatchableAttrs, targetProps);
              } else if (bindParts[KW_LET_IDX]) {
                if (isTemplateElement) {
                  var identifier = bindParts[IDENT_KW_IDX];

                  this._parseVariable(identifier, value, srcSpan, targetVars);
                } else {
                  this._reportError("\"let-\" is only supported on ng-template elements.", srcSpan);
                }
              } else if (bindParts[KW_REF_IDX]) {
                var _identifier = bindParts[IDENT_KW_IDX];

                this._parseReference(_identifier, value, srcSpan, targetRefs);
              } else if (bindParts[KW_ON_IDX]) {
                this._bindingParser.parseEvent(bindParts[IDENT_KW_IDX], value, srcSpan, attr.valueSpan || srcSpan, targetMatchableAttrs, boundEvents);
              } else if (bindParts[KW_BINDON_IDX]) {
                this._bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX], value, false, srcSpan, absoluteOffset, attr.valueSpan, targetMatchableAttrs, targetProps);

                this._parseAssignmentEvent(bindParts[IDENT_KW_IDX], value, srcSpan, attr.valueSpan || srcSpan, targetMatchableAttrs, boundEvents);
              } else if (bindParts[KW_AT_IDX]) {
                this._bindingParser.parseLiteralAttr(name, value, srcSpan, absoluteOffset, attr.valueSpan, targetMatchableAttrs, targetProps);
              } else if (bindParts[IDENT_BANANA_BOX_IDX]) {
                this._bindingParser.parsePropertyBinding(bindParts[IDENT_BANANA_BOX_IDX], value, false, srcSpan, absoluteOffset, attr.valueSpan, targetMatchableAttrs, targetProps);

                this._parseAssignmentEvent(bindParts[IDENT_BANANA_BOX_IDX], value, srcSpan, attr.valueSpan || srcSpan, targetMatchableAttrs, boundEvents);
              } else if (bindParts[IDENT_PROPERTY_IDX]) {
                this._bindingParser.parsePropertyBinding(bindParts[IDENT_PROPERTY_IDX], value, false, srcSpan, absoluteOffset, attr.valueSpan, targetMatchableAttrs, targetProps);
              } else if (bindParts[IDENT_EVENT_IDX]) {
                this._bindingParser.parseEvent(bindParts[IDENT_EVENT_IDX], value, srcSpan, attr.valueSpan || srcSpan, targetMatchableAttrs, boundEvents);
              }
            } else {
              hasBinding = this._bindingParser.parsePropertyInterpolation(name, value, srcSpan, attr.valueSpan, targetMatchableAttrs, targetProps);
            }

            if (!hasBinding) {
              this._bindingParser.parseLiteralAttr(name, value, srcSpan, absoluteOffset, attr.valueSpan, targetMatchableAttrs, targetProps);
            }

            targetEvents.push.apply(targetEvents, _toConsumableArray(boundEvents.map(function (e) {
              return BoundEventAst.fromParsedEvent(e);
            })));
            return hasBinding;
          }
        }, {
          key: "_normalizeAttributeName",
          value: function _normalizeAttributeName(attrName) {
            return /^data-/i.test(attrName) ? attrName.substring(5) : attrName;
          }
        }, {
          key: "_parseVariable",
          value: function _parseVariable(identifier, value, sourceSpan, targetVars) {
            if (identifier.indexOf('-') > -1) {
              this._reportError("\"-\" is not allowed in variable names", sourceSpan);
            } else if (identifier.length === 0) {
              this._reportError("Variable does not have a name", sourceSpan);
            }

            targetVars.push(new VariableAst(identifier, value, sourceSpan));
          }
        }, {
          key: "_parseReference",
          value: function _parseReference(identifier, value, sourceSpan, targetRefs) {
            if (identifier.indexOf('-') > -1) {
              this._reportError("\"-\" is not allowed in reference names", sourceSpan);
            } else if (identifier.length === 0) {
              this._reportError("Reference does not have a name", sourceSpan);
            }

            targetRefs.push(new ElementOrDirectiveRef(identifier, value, sourceSpan));
          }
        }, {
          key: "_parseAssignmentEvent",
          value: function _parseAssignmentEvent(name, expression, sourceSpan, valueSpan, targetMatchableAttrs, targetEvents) {
            this._bindingParser.parseEvent("".concat(name, "Change"), "".concat(expression, "=$event"), sourceSpan, valueSpan, targetMatchableAttrs, targetEvents);
          }
        }, {
          key: "_parseDirectives",
          value: function _parseDirectives(selectorMatcher, elementCssSelector) {
            var _this155 = this;

            // Need to sort the directives so that we get consistent results throughout,
            // as selectorMatcher uses Maps inside.
            // Also deduplicate directives as they might match more than one time!
            var directives = newArray(this.directivesIndex.size); // Whether any directive selector matches on the element name

            var matchElement = false;
            selectorMatcher.match(elementCssSelector, function (selector, directive) {
              directives[_this155.directivesIndex.get(directive)] = directive;
              matchElement = matchElement || selector.hasElementSelector();
            });
            return {
              directives: directives.filter(function (dir) {
                return !!dir;
              }),
              matchElement: matchElement
            };
          }
        }, {
          key: "_createDirectiveAsts",
          value: function _createDirectiveAsts(isTemplateElement, elementName, directives, props, elementOrDirectiveRefs, elementSourceSpan, targetReferences, targetBoundDirectivePropNames) {
            var _this156 = this;

            var matchedReferences = new Set();
            var component = null;
            var directiveAsts = directives.map(function (directive) {
              var sourceSpan = new ParseSourceSpan(elementSourceSpan.start, elementSourceSpan.end, elementSourceSpan.fullStart, "Directive ".concat(identifierName(directive.type)));

              if (directive.isComponent) {
                component = directive;
              }

              var directiveProperties = [];

              var boundProperties = _this156._bindingParser.createDirectiveHostPropertyAsts(directive, elementName, sourceSpan);

              var hostProperties = boundProperties.map(function (prop) {
                return BoundElementPropertyAst.fromBoundProperty(prop);
              }); // Note: We need to check the host properties here as well,
              // as we don't know the element name in the DirectiveWrapperCompiler yet.

              hostProperties = _this156._checkPropertiesInSchema(elementName, hostProperties);

              var parsedEvents = _this156._bindingParser.createDirectiveHostEventAsts(directive, sourceSpan);

              _this156._createDirectivePropertyAsts(directive.inputs, props, directiveProperties, targetBoundDirectivePropNames);

              elementOrDirectiveRefs.forEach(function (elOrDirRef) {
                if (elOrDirRef.value.length === 0 && directive.isComponent || elOrDirRef.isReferenceToDirective(directive)) {
                  targetReferences.push(new ReferenceAst(elOrDirRef.name, createTokenForReference(directive.type.reference), elOrDirRef.value, elOrDirRef.sourceSpan));
                  matchedReferences.add(elOrDirRef.name);
                }
              });
              var hostEvents = parsedEvents.map(function (e) {
                return BoundEventAst.fromParsedEvent(e);
              });
              var contentQueryStartId = _this156.contentQueryStartId;
              _this156.contentQueryStartId += directive.queries.length;
              return new DirectiveAst(directive, directiveProperties, hostProperties, hostEvents, contentQueryStartId, sourceSpan);
            });
            elementOrDirectiveRefs.forEach(function (elOrDirRef) {
              if (elOrDirRef.value.length > 0) {
                if (!matchedReferences.has(elOrDirRef.name)) {
                  _this156._reportError("There is no directive with \"exportAs\" set to \"".concat(elOrDirRef.value, "\""), elOrDirRef.sourceSpan);
                }
              } else if (!component) {
                var refToken = null;

                if (isTemplateElement) {
                  refToken = createTokenForExternalReference(_this156.reflector, Identifiers.TemplateRef);
                }

                targetReferences.push(new ReferenceAst(elOrDirRef.name, refToken, elOrDirRef.value, elOrDirRef.sourceSpan));
              }
            });
            return directiveAsts;
          }
        }, {
          key: "_createDirectivePropertyAsts",
          value: function _createDirectivePropertyAsts(directiveProperties, boundProps, targetBoundDirectiveProps, targetBoundDirectivePropNames) {
            if (directiveProperties) {
              var boundPropsByName = new Map();
              boundProps.forEach(function (boundProp) {
                var prevValue = boundPropsByName.get(boundProp.name);

                if (!prevValue || prevValue.isLiteral) {
                  // give [a]="b" a higher precedence than a="b" on the same element
                  boundPropsByName.set(boundProp.name, boundProp);
                }
              });
              Object.keys(directiveProperties).forEach(function (dirProp) {
                var elProp = directiveProperties[dirProp];
                var boundProp = boundPropsByName.get(elProp); // Bindings are optional, so this binding only needs to be set up if an expression is given.

                if (boundProp) {
                  targetBoundDirectivePropNames.add(boundProp.name);

                  if (!isEmptyExpression(boundProp.expression)) {
                    targetBoundDirectiveProps.push(new BoundDirectivePropertyAst(dirProp, boundProp.name, boundProp.expression, boundProp.sourceSpan));
                  }
                }
              });
            }
          }
        }, {
          key: "_createElementPropertyAsts",
          value: function _createElementPropertyAsts(elementName, props, boundDirectivePropNames) {
            var _this157 = this;

            var boundElementProps = [];
            props.forEach(function (prop) {
              if (!prop.isLiteral && !boundDirectivePropNames.has(prop.name)) {
                var boundProp = _this157._bindingParser.createBoundElementProperty(elementName, prop);

                boundElementProps.push(BoundElementPropertyAst.fromBoundProperty(boundProp));
              }
            });
            return this._checkPropertiesInSchema(elementName, boundElementProps);
          }
        }, {
          key: "_findComponentDirectives",
          value: function _findComponentDirectives(directives) {
            return directives.filter(function (directive) {
              return directive.directive.isComponent;
            });
          }
        }, {
          key: "_findComponentDirectiveNames",
          value: function _findComponentDirectiveNames(directives) {
            return this._findComponentDirectives(directives).map(function (directive) {
              return identifierName(directive.directive.type);
            });
          }
        }, {
          key: "_assertOnlyOneComponent",
          value: function _assertOnlyOneComponent(directives, sourceSpan) {
            var componentTypeNames = this._findComponentDirectiveNames(directives);

            if (componentTypeNames.length > 1) {
              this._reportError("More than one component matched on this element.\n" + "Make sure that only one component's selector can match a given element.\n" + "Conflicting components: ".concat(componentTypeNames.join(',')), sourceSpan);
            }
          }
          /**
           * Make sure that non-angular tags conform to the schemas.
           *
           * Note: An element is considered an angular tag when at least one directive selector matches the
           * tag name.
           *
           * @param matchElement Whether any directive has matched on the tag name
           * @param element the html element
           */

        }, {
          key: "_assertElementExists",
          value: function _assertElementExists(matchElement, element) {
            var elName = element.name.replace(/^:xhtml:/, '');

            if (!matchElement && !this._schemaRegistry.hasElement(elName, this._schemas)) {
              var errorMsg = "'".concat(elName, "' is not a known element:\n");
              errorMsg += "1. If '".concat(elName, "' is an Angular component, then verify that it is part of this module.\n");

              if (elName.indexOf('-') > -1) {
                errorMsg += "2. If '".concat(elName, "' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.");
              } else {
                errorMsg += "2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.";
              }

              this._reportError(errorMsg, element.sourceSpan);
            }
          }
        }, {
          key: "_assertNoComponentsNorElementBindingsOnTemplate",
          value: function _assertNoComponentsNorElementBindingsOnTemplate(directives, elementProps, sourceSpan) {
            var _this158 = this;

            var componentTypeNames = this._findComponentDirectiveNames(directives);

            if (componentTypeNames.length > 0) {
              this._reportError("Components on an embedded template: ".concat(componentTypeNames.join(',')), sourceSpan);
            }

            elementProps.forEach(function (prop) {
              _this158._reportError("Property binding ".concat(prop.name, " not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the \"@NgModule.declarations\"."), sourceSpan);
            });
          }
        }, {
          key: "_assertAllEventsPublishedByDirectives",
          value: function _assertAllEventsPublishedByDirectives(directives, events) {
            var _this159 = this;

            var allDirectiveEvents = new Set();
            directives.forEach(function (directive) {
              Object.keys(directive.directive.outputs).forEach(function (k) {
                var eventName = directive.directive.outputs[k];
                allDirectiveEvents.add(eventName);
              });
            });
            events.forEach(function (event) {
              if (event.target != null || !allDirectiveEvents.has(event.name)) {
                _this159._reportError("Event binding ".concat(event.fullName, " not emitted by any directive on an embedded template. Make sure that the event name is spelled correctly and all directives are listed in the \"@NgModule.declarations\"."), event.sourceSpan);
              }
            });
          }
        }, {
          key: "_checkPropertiesInSchema",
          value: function _checkPropertiesInSchema(elementName, boundProps) {
            var _this160 = this;

            // Note: We can't filter out empty expressions before this method,
            // as we still want to validate them!
            return boundProps.filter(function (boundProp) {
              if (boundProp.type === 0
              /* Property */
              && !_this160._schemaRegistry.hasProperty(elementName, boundProp.name, _this160._schemas)) {
                var errorMsg = "Can't bind to '".concat(boundProp.name, "' since it isn't a known property of '").concat(elementName, "'.");

                if (elementName.startsWith('ng-')) {
                  errorMsg += "\n1. If '".concat(boundProp.name, "' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.") + "\n2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.";
                } else if (elementName.indexOf('-') > -1) {
                  errorMsg += "\n1. If '".concat(elementName, "' is an Angular component and it has '").concat(boundProp.name, "' input, then verify that it is part of this module.") + "\n2. If '".concat(elementName, "' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.") + "\n3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.";
                }

                _this160._reportError(errorMsg, boundProp.sourceSpan);
              }

              return !isEmptyExpression(boundProp.value);
            });
          }
        }, {
          key: "_reportError",
          value: function _reportError(message, sourceSpan) {
            var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ParseErrorLevel.ERROR;

            this._targetErrors.push(new ParseError(sourceSpan, message, level));
          }
        }]);

        return TemplateParseVisitor;
      }();

      var NonBindableVisitor = /*#__PURE__*/function () {
        function NonBindableVisitor() {
          _classCallCheck(this, NonBindableVisitor);
        }

        _createClass2(NonBindableVisitor, [{
          key: "visitElement",
          value: function visitElement(ast, parent) {
            var preparsedElement = preparseElement(ast);

            if (preparsedElement.type === PreparsedElementType.SCRIPT || preparsedElement.type === PreparsedElementType.STYLE || preparsedElement.type === PreparsedElementType.STYLESHEET) {
              // Skipping <script> for security reasons
              // Skipping <style> and stylesheets as we already processed them
              // in the StyleCompiler
              return null;
            }

            var attrNameAndValues = ast.attrs.map(function (attr) {
              return [attr.name, attr.value];
            });
            var selector = createElementCssSelector(ast.name, attrNameAndValues);
            var ngContentIndex = parent.findNgContentIndex(selector);
            var children = visitAll$1(this, ast.children, EMPTY_ELEMENT_CONTEXT);
            return new ElementAst(ast.name, visitAll$1(this, ast.attrs), [], [], [], [], [], false, [], children, ngContentIndex, ast.sourceSpan, ast.endSourceSpan);
          }
        }, {
          key: "visitComment",
          value: function visitComment(comment, context) {
            return null;
          }
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute, context) {
            return new AttrAst(attribute.name, attribute.value, attribute.sourceSpan);
          }
        }, {
          key: "visitText",
          value: function visitText(text, parent) {
            var ngContentIndex = parent.findNgContentIndex(TEXT_CSS_SELECTOR());
            return new TextAst(text.value, ngContentIndex, text.sourceSpan);
          }
        }, {
          key: "visitExpansion",
          value: function visitExpansion(expansion, context) {
            return expansion;
          }
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(expansionCase, context) {
            return expansionCase;
          }
        }]);

        return NonBindableVisitor;
      }();
      /**
       * A reference to an element or directive in a template. E.g., the reference in this template:
       *
       * <div #myMenu="coolMenu">
       *
       * would be {name: 'myMenu', value: 'coolMenu', sourceSpan: ...}
       */


      var ElementOrDirectiveRef = /*#__PURE__*/function () {
        function ElementOrDirectiveRef(name, value, sourceSpan) {
          _classCallCheck(this, ElementOrDirectiveRef);

          this.name = name;
          this.value = value;
          this.sourceSpan = sourceSpan;
        }
        /** Gets whether this is a reference to the given directive. */


        _createClass2(ElementOrDirectiveRef, [{
          key: "isReferenceToDirective",
          value: function isReferenceToDirective(directive) {
            return splitExportAs(directive.exportAs).indexOf(this.value) !== -1;
          }
        }]);

        return ElementOrDirectiveRef;
      }();
      /** Splits a raw, potentially comma-delimited `exportAs` value into an array of names. */


      function splitExportAs(exportAs) {
        return exportAs ? exportAs.split(',').map(function (e) {
          return e.trim();
        }) : [];
      }

      function splitClasses(classAttrValue) {
        return classAttrValue.trim().split(/\s+/g);
      }

      var ElementContext = /*#__PURE__*/function () {
        function ElementContext(isTemplateElement, _ngContentIndexMatcher, _wildcardNgContentIndex, providerContext) {
          _classCallCheck(this, ElementContext);

          this.isTemplateElement = isTemplateElement;
          this._ngContentIndexMatcher = _ngContentIndexMatcher;
          this._wildcardNgContentIndex = _wildcardNgContentIndex;
          this.providerContext = providerContext;
        }

        _createClass2(ElementContext, [{
          key: "findNgContentIndex",
          value: function findNgContentIndex(selector) {
            var ngContentIndices = [];

            this._ngContentIndexMatcher.match(selector, function (selector, ngContentIndex) {
              ngContentIndices.push(ngContentIndex);
            });

            ngContentIndices.sort();

            if (this._wildcardNgContentIndex != null) {
              ngContentIndices.push(this._wildcardNgContentIndex);
            }

            return ngContentIndices.length > 0 ? ngContentIndices[0] : null;
          }
        }], [{
          key: "create",
          value: function create(isTemplateElement, directives, providerContext) {
            var matcher = new SelectorMatcher();
            var wildcardNgContentIndex = null;
            var component = directives.find(function (directive) {
              return directive.directive.isComponent;
            });

            if (component) {
              var ngContentSelectors = component.directive.template.ngContentSelectors;

              for (var i = 0; i < ngContentSelectors.length; i++) {
                var selector = ngContentSelectors[i];

                if (selector === '*') {
                  wildcardNgContentIndex = i;
                } else {
                  matcher.addSelectables(CssSelector.parse(ngContentSelectors[i]), i);
                }
              }
            }

            return new ElementContext(isTemplateElement, matcher, wildcardNgContentIndex, providerContext);
          }
        }]);

        return ElementContext;
      }();

      function createElementCssSelector(elementName, attributes) {
        var cssSelector = new CssSelector();
        var elNameNoNs = splitNsName(elementName)[1];
        cssSelector.setElement(elNameNoNs);

        for (var i = 0; i < attributes.length; i++) {
          var attrName = attributes[i][0];
          var attrNameNoNs = splitNsName(attrName)[1];
          var attrValue = attributes[i][1];
          cssSelector.addAttribute(attrNameNoNs, attrValue);

          if (attrName.toLowerCase() == CLASS_ATTR) {
            var classes = splitClasses(attrValue);
            classes.forEach(function (className) {
              return cssSelector.addClassName(className);
            });
          }
        }

        return cssSelector;
      }

      var EMPTY_ELEMENT_CONTEXT = new ElementContext(true, new SelectorMatcher(), null, null);
      var NON_BINDABLE_VISITOR = new NonBindableVisitor();

      function _isEmptyTextNode(node) {
        return node instanceof Text$3 && node.value.trim().length == 0;
      }

      function removeSummaryDuplicates(items) {
        var map = new Map();
        items.forEach(function (item) {
          if (!map.get(item.type.reference)) {
            map.set(item.type.reference, item);
          }
        });
        return Array.from(map.values());
      }

      function isEmptyExpression(ast) {
        if (ast instanceof ASTWithSource) {
          ast = ast.ast;
        }

        return ast instanceof EmptyExpr;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Parses string representation of a style and converts it into object literal.
       *
       * @param value string representation of style as used in the `style` attribute in HTML.
       *   Example: `color: red; height: auto`.
       * @returns An array of style property name and value pairs, e.g. `['color', 'red', 'height',
       * 'auto']`
       */


      function parse(value) {
        // we use a string array here instead of a string map
        // because a string-map is not guaranteed to retain the
        // order of the entries whereas a string array can be
        // constructed in a [key, value, key, value] format.
        var styles = [];
        var i = 0;
        var parenDepth = 0;
        var quote = 0
        /* QuoteNone */
        ;
        var valueStart = 0;
        var propStart = 0;
        var currentProp = null;
        var valueHasQuotes = false;

        while (i < value.length) {
          var token = value.charCodeAt(i++);

          switch (token) {
            case 40
            /* OpenParen */
            :
              parenDepth++;
              break;

            case 41
            /* CloseParen */
            :
              parenDepth--;
              break;

            case 39
            /* QuoteSingle */
            :
              // valueStart needs to be there since prop values don't
              // have quotes in CSS
              valueHasQuotes = valueHasQuotes || valueStart > 0;

              if (quote === 0
              /* QuoteNone */
              ) {
                quote = 39
                /* QuoteSingle */
                ;
              } else if (quote === 39
              /* QuoteSingle */
              && value.charCodeAt(i - 1) !== 92
              /* BackSlash */
              ) {
                quote = 0
                /* QuoteNone */
                ;
              }

              break;

            case 34
            /* QuoteDouble */
            :
              // same logic as above
              valueHasQuotes = valueHasQuotes || valueStart > 0;

              if (quote === 0
              /* QuoteNone */
              ) {
                quote = 34
                /* QuoteDouble */
                ;
              } else if (quote === 34
              /* QuoteDouble */
              && value.charCodeAt(i - 1) !== 92
              /* BackSlash */
              ) {
                quote = 0
                /* QuoteNone */
                ;
              }

              break;

            case 58
            /* Colon */
            :
              if (!currentProp && parenDepth === 0 && quote === 0
              /* QuoteNone */
              ) {
                currentProp = hyphenate(value.substring(propStart, i - 1).trim());
                valueStart = i;
              }

              break;

            case 59
            /* Semicolon */
            :
              if (currentProp && valueStart > 0 && parenDepth === 0 && quote === 0
              /* QuoteNone */
              ) {
                var styleVal = value.substring(valueStart, i - 1).trim();
                styles.push(currentProp, valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal);
                propStart = i;
                valueStart = 0;
                currentProp = null;
                valueHasQuotes = false;
              }

              break;
          }
        }

        if (currentProp && valueStart) {
          var _styleVal = value.substr(valueStart).trim();

          styles.push(currentProp, valueHasQuotes ? stripUnnecessaryQuotes(_styleVal) : _styleVal);
        }

        return styles;
      }

      function stripUnnecessaryQuotes(value) {
        var qS = value.charCodeAt(0);
        var qE = value.charCodeAt(value.length - 1);

        if (qS == qE && (qS == 39
        /* QuoteSingle */
        || qS == 34
        /* QuoteDouble */
        )) {
          var tempValue = value.substring(1, value.length - 1); // special case to avoid using a multi-quoted string that was just chomped
          // (e.g. `font-family: "Verdana", "sans-serif"`)

          if (tempValue.indexOf('\'') == -1 && tempValue.indexOf('"') == -1) {
            value = tempValue;
          }
        }

        return value;
      }

      function hyphenate(value) {
        return value.replace(/[a-z][A-Z]/g, function (v) {
          return v.charAt(0) + '-' + v.charAt(1);
        }).toLowerCase();
      }

      var IMPORTANT_FLAG = '!important';
      /**
       * Minimum amount of binding slots required in the runtime for style/class bindings.
       *
       * Styling in Angular uses up two slots in the runtime LView/TData data structures to
       * record binding data, property information and metadata.
       *
       * When a binding is registered it will place the following information in the `LView`:
       *
       * slot 1) binding value
       * slot 2) cached value (all other values collected before it in string form)
       *
       * When a binding is registered it will place the following information in the `TData`:
       *
       * slot 1) prop name
       * slot 2) binding index that points to the previous style/class binding (and some extra config
       * values)
       *
       * Let's imagine we have a binding that looks like so:
       *
       * ```
       * <div [style.width]="x" [style.height]="y">
       * ```
       *
       * Our `LView` and `TData` data-structures look like so:
       *
       * ```typescript
       * LView = [
       *   // ...
       *   x, // value of x
       *   "width: x",
       *
       *   y, // value of y
       *   "width: x; height: y",
       *   // ...
       * ];
       *
       * TData = [
       *   // ...
       *   "width", // binding slot 20
       *   0,
       *
       *   "height",
       *   20,
       *   // ...
       * ];
       * ```
       *
       * */

      var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
      /**
       * Produces creation/update instructions for all styling bindings (class and style)
       *
       * It also produces the creation instruction to register all initial styling values
       * (which are all the static class="..." and style="..." attribute values that exist
       * on an element within a template).
       *
       * The builder class below handles producing instructions for the following cases:
       *
       * - Static style/class attributes (style="..." and class="...")
       * - Dynamic style/class map bindings ([style]="map" and [class]="map|string")
       * - Dynamic style/class property bindings ([style.prop]="exp" and [class.name]="exp")
       *
       * Due to the complex relationship of all of these cases, the instructions generated
       * for these attributes/properties/bindings must be done so in the correct order. The
       * order which these must be generated is as follows:
       *
       * if (createMode) {
       *   styling(...)
       * }
       * if (updateMode) {
       *   styleMap(...)
       *   classMap(...)
       *   styleProp(...)
       *   classProp(...)
       * }
       *
       * The creation/update methods within the builder class produce these instructions.
       */

      var StylingBuilder = /*#__PURE__*/function () {
        function StylingBuilder(_directiveExpr) {
          _classCallCheck(this, StylingBuilder);

          this._directiveExpr = _directiveExpr;
          /** Whether or not there are any static styling values present */

          this._hasInitialValues = false;
          /**
           *  Whether or not there are any styling bindings present
           *  (i.e. `[style]`, `[class]`, `[style.prop]` or `[class.name]`)
           */

          this.hasBindings = false;
          this.hasBindingsWithPipes = false;
          /** the input for [class] (if it exists) */

          this._classMapInput = null;
          /** the input for [style] (if it exists) */

          this._styleMapInput = null;
          /** an array of each [style.prop] input */

          this._singleStyleInputs = null;
          /** an array of each [class.name] input */

          this._singleClassInputs = null;
          this._lastStylingInput = null;
          this._firstStylingInput = null; // maps are used instead of hash maps because a Map will
          // retain the ordering of the keys

          /**
           * Represents the location of each style binding in the template
           * (e.g. `<div [style.width]="w" [style.height]="h">` implies
           * that `width=0` and `height=1`)
           */

          this._stylesIndex = new Map();
          /**
           * Represents the location of each class binding in the template
           * (e.g. `<div [class.big]="b" [class.hidden]="h">` implies
           * that `big=0` and `hidden=1`)
           */

          this._classesIndex = new Map();
          this._initialStyleValues = [];
          this._initialClassValues = [];
        }
        /**
         * Registers a given input to the styling builder to be later used when producing AOT code.
         *
         * The code below will only accept the input if it is somehow tied to styling (whether it be
         * style/class bindings or static style/class attributes).
         */


        _createClass2(StylingBuilder, [{
          key: "registerBoundInput",
          value: function registerBoundInput(input) {
            // [attr.style] or [attr.class] are skipped in the code below,
            // they should not be treated as styling-based bindings since
            // they are intended to be written directly to the attr and
            // will therefore skip all style/class resolution that is present
            // with style="", [style]="" and [style.prop]="", class="",
            // [class.prop]="". [class]="" assignments
            var binding = null;
            var name = input.name;

            switch (input.type) {
              case 0
              /* Property */
              :
                binding = this.registerInputBasedOnName(name, input.value, input.sourceSpan);
                break;

              case 3
              /* Style */
              :
                binding = this.registerStyleInput(name, false, input.value, input.sourceSpan, input.unit);
                break;

              case 2
              /* Class */
              :
                binding = this.registerClassInput(name, false, input.value, input.sourceSpan);
                break;
            }

            return binding ? true : false;
          }
        }, {
          key: "registerInputBasedOnName",
          value: function registerInputBasedOnName(name, expression, sourceSpan) {
            var binding = null;
            var prefix = name.substring(0, 6);
            var isStyle = name === 'style' || prefix === 'style.' || prefix === 'style!';
            var isClass = !isStyle && (name === 'class' || prefix === 'class.' || prefix === 'class!');

            if (isStyle || isClass) {
              var isMapBased = name.charAt(5) !== '.'; // style.prop or class.prop makes this a no

              var property = name.substr(isMapBased ? 5 : 6); // the dot explains why there's a +1

              if (isStyle) {
                binding = this.registerStyleInput(property, isMapBased, expression, sourceSpan);
              } else {
                binding = this.registerClassInput(property, isMapBased, expression, sourceSpan);
              }
            }

            return binding;
          }
        }, {
          key: "registerStyleInput",
          value: function registerStyleInput(name, isMapBased, value, sourceSpan, suffix) {
            if (isEmptyExpression(value)) {
              return null;
            }

            name = normalizePropName(name);

            var _parseProperty = parseProperty(name),
                property = _parseProperty.property,
                hasOverrideFlag = _parseProperty.hasOverrideFlag,
                bindingSuffix = _parseProperty.suffix;

            suffix = typeof suffix === 'string' && suffix.length !== 0 ? suffix : bindingSuffix;
            var entry = {
              name: property,
              suffix: suffix,
              value: value,
              sourceSpan: sourceSpan,
              hasOverrideFlag: hasOverrideFlag
            };

            if (isMapBased) {
              this._styleMapInput = entry;
            } else {
              (this._singleStyleInputs = this._singleStyleInputs || []).push(entry);
              registerIntoMap(this._stylesIndex, property);
            }

            this._lastStylingInput = entry;
            this._firstStylingInput = this._firstStylingInput || entry;

            this._checkForPipes(value);

            this.hasBindings = true;
            return entry;
          }
        }, {
          key: "registerClassInput",
          value: function registerClassInput(name, isMapBased, value, sourceSpan) {
            if (isEmptyExpression(value)) {
              return null;
            }

            var _parseProperty2 = parseProperty(name),
                property = _parseProperty2.property,
                hasOverrideFlag = _parseProperty2.hasOverrideFlag;

            var entry = {
              name: property,
              value: value,
              sourceSpan: sourceSpan,
              hasOverrideFlag: hasOverrideFlag,
              suffix: null
            };

            if (isMapBased) {
              if (this._classMapInput) {
                throw new Error('[class] and [className] bindings cannot be used on the same element simultaneously');
              }

              this._classMapInput = entry;
            } else {
              (this._singleClassInputs = this._singleClassInputs || []).push(entry);
              registerIntoMap(this._classesIndex, property);
            }

            this._lastStylingInput = entry;
            this._firstStylingInput = this._firstStylingInput || entry;

            this._checkForPipes(value);

            this.hasBindings = true;
            return entry;
          }
        }, {
          key: "_checkForPipes",
          value: function _checkForPipes(value) {
            if (value instanceof ASTWithSource && value.ast instanceof BindingPipe) {
              this.hasBindingsWithPipes = true;
            }
          }
          /**
           * Registers the element's static style string value to the builder.
           *
           * @param value the style string (e.g. `width:100px; height:200px;`)
           */

        }, {
          key: "registerStyleAttr",
          value: function registerStyleAttr(value) {
            this._initialStyleValues = parse(value);
            this._hasInitialValues = true;
          }
          /**
           * Registers the element's static class string value to the builder.
           *
           * @param value the className string (e.g. `disabled gold zoom`)
           */

        }, {
          key: "registerClassAttr",
          value: function registerClassAttr(value) {
            this._initialClassValues = value.trim().split(/\s+/g);
            this._hasInitialValues = true;
          }
          /**
           * Appends all styling-related expressions to the provided attrs array.
           *
           * @param attrs an existing array where each of the styling expressions
           * will be inserted into.
           */

        }, {
          key: "populateInitialStylingAttrs",
          value: function populateInitialStylingAttrs(attrs) {
            // [CLASS_MARKER, 'foo', 'bar', 'baz' ...]
            if (this._initialClassValues.length) {
              attrs.push(literal(1
              /* Classes */
              ));

              for (var i = 0; i < this._initialClassValues.length; i++) {
                attrs.push(literal(this._initialClassValues[i]));
              }
            } // [STYLE_MARKER, 'width', '200px', 'height', '100px', ...]


            if (this._initialStyleValues.length) {
              attrs.push(literal(2
              /* Styles */
              ));

              for (var _i7 = 0; _i7 < this._initialStyleValues.length; _i7 += 2) {
                attrs.push(literal(this._initialStyleValues[_i7]), literal(this._initialStyleValues[_i7 + 1]));
              }
            }
          }
          /**
           * Builds an instruction with all the expressions and parameters for `elementHostAttrs`.
           *
           * The instruction generation code below is used for producing the AOT statement code which is
           * responsible for registering initial styles (within a directive hostBindings' creation block),
           * as well as any of the provided attribute values, to the directive host element.
           */

        }, {
          key: "assignHostAttrs",
          value: function assignHostAttrs(attrs, definitionMap) {
            if (this._directiveExpr && (attrs.length || this._hasInitialValues)) {
              this.populateInitialStylingAttrs(attrs);
              definitionMap.set('hostAttrs', literalArr(attrs));
            }
          }
          /**
           * Builds an instruction with all the expressions and parameters for `classMap`.
           *
           * The instruction data will contain all expressions for `classMap` to function
           * which includes the `[class]` expression params.
           */

        }, {
          key: "buildClassMapInstruction",
          value: function buildClassMapInstruction(valueConverter) {
            if (this._classMapInput) {
              return this._buildMapBasedInstruction(valueConverter, true, this._classMapInput);
            }

            return null;
          }
          /**
           * Builds an instruction with all the expressions and parameters for `styleMap`.
           *
           * The instruction data will contain all expressions for `styleMap` to function
           * which includes the `[style]` expression params.
           */

        }, {
          key: "buildStyleMapInstruction",
          value: function buildStyleMapInstruction(valueConverter) {
            if (this._styleMapInput) {
              return this._buildMapBasedInstruction(valueConverter, false, this._styleMapInput);
            }

            return null;
          }
        }, {
          key: "_buildMapBasedInstruction",
          value: function _buildMapBasedInstruction(valueConverter, isClassBased, stylingInput) {
            // each styling binding value is stored in the LView
            // map-based bindings allocate two slots: one for the
            // previous binding value and another for the previous
            // className or style attribute value.
            var totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED; // these values must be outside of the update block so that they can
            // be evaluated (the AST visit call) during creation time so that any
            // pipes can be picked up in time before the template is built

            var mapValue = stylingInput.value.visit(valueConverter);
            var reference;

            if (mapValue instanceof Interpolation) {
              totalBindingSlotsRequired += mapValue.expressions.length;
              reference = isClassBased ? getClassMapInterpolationExpression(mapValue) : getStyleMapInterpolationExpression(mapValue);
            } else {
              reference = isClassBased ? Identifiers$1.classMap : Identifiers$1.styleMap;
            }

            return {
              reference: reference,
              calls: [{
                supportsInterpolation: true,
                sourceSpan: stylingInput.sourceSpan,
                allocateBindingSlots: totalBindingSlotsRequired,
                params: function params(convertFn) {
                  var convertResult = convertFn(mapValue);
                  var params = Array.isArray(convertResult) ? convertResult : [convertResult];
                  return params;
                }
              }]
            };
          }
        }, {
          key: "_buildSingleInputs",
          value: function _buildSingleInputs(reference, inputs, valueConverter, getInterpolationExpressionFn, isClassBased) {
            var instructions = [];
            inputs.forEach(function (input) {
              var previousInstruction = instructions[instructions.length - 1];
              var value = input.value.visit(valueConverter);
              var referenceForCall = reference; // each styling binding value is stored in the LView
              // but there are two values stored for each binding:
              //   1) the value itself
              //   2) an intermediate value (concatenation of style up to this point).
              //      We need to store the intermediate value so that we don't allocate
              //      the strings on each CD.

              var totalBindingSlotsRequired = MIN_STYLING_BINDING_SLOTS_REQUIRED;

              if (value instanceof Interpolation) {
                totalBindingSlotsRequired += value.expressions.length;

                if (getInterpolationExpressionFn) {
                  referenceForCall = getInterpolationExpressionFn(value);
                }
              }

              var call = {
                sourceSpan: input.sourceSpan,
                allocateBindingSlots: totalBindingSlotsRequired,
                supportsInterpolation: !!getInterpolationExpressionFn,
                params: function params(convertFn) {
                  // params => stylingProp(propName, value, suffix)
                  var params = [];
                  params.push(literal(input.name));
                  var convertResult = convertFn(value);

                  if (Array.isArray(convertResult)) {
                    params.push.apply(params, _toConsumableArray(convertResult));
                  } else {
                    params.push(convertResult);
                  } // [style.prop] bindings may use suffix values (e.g. px, em, etc...), therefore,
                  // if that is detected then we need to pass that in as an optional param.


                  if (!isClassBased && input.suffix !== null) {
                    params.push(literal(input.suffix));
                  }

                  return params;
                }
              }; // If we ended up generating a call to the same instruction as the previous styling property
              // we can chain the calls together safely to save some bytes, otherwise we have to generate
              // a separate instruction call. This is primarily a concern with interpolation instructions
              // where we may start off with one `reference`, but end up using another based on the
              // number of interpolations.

              if (previousInstruction && previousInstruction.reference === referenceForCall) {
                previousInstruction.calls.push(call);
              } else {
                instructions.push({
                  reference: referenceForCall,
                  calls: [call]
                });
              }
            });
            return instructions;
          }
        }, {
          key: "_buildClassInputs",
          value: function _buildClassInputs(valueConverter) {
            if (this._singleClassInputs) {
              return this._buildSingleInputs(Identifiers$1.classProp, this._singleClassInputs, valueConverter, null, true);
            }

            return [];
          }
        }, {
          key: "_buildStyleInputs",
          value: function _buildStyleInputs(valueConverter) {
            if (this._singleStyleInputs) {
              return this._buildSingleInputs(Identifiers$1.styleProp, this._singleStyleInputs, valueConverter, getStylePropInterpolationExpression, false);
            }

            return [];
          }
          /**
           * Constructs all instructions which contain the expressions that will be placed
           * into the update block of a template function or a directive hostBindings function.
           */

        }, {
          key: "buildUpdateLevelInstructions",
          value: function buildUpdateLevelInstructions(valueConverter) {
            var instructions = [];

            if (this.hasBindings) {
              var styleMapInstruction = this.buildStyleMapInstruction(valueConverter);

              if (styleMapInstruction) {
                instructions.push(styleMapInstruction);
              }

              var classMapInstruction = this.buildClassMapInstruction(valueConverter);

              if (classMapInstruction) {
                instructions.push(classMapInstruction);
              }

              instructions.push.apply(instructions, _toConsumableArray(this._buildStyleInputs(valueConverter)));
              instructions.push.apply(instructions, _toConsumableArray(this._buildClassInputs(valueConverter)));
            }

            return instructions;
          }
        }]);

        return StylingBuilder;
      }();

      function registerIntoMap(map, key) {
        if (!map.has(key)) {
          map.set(key, map.size);
        }
      }

      function parseProperty(name) {
        var hasOverrideFlag = false;
        var overrideIndex = name.indexOf(IMPORTANT_FLAG);

        if (overrideIndex !== -1) {
          name = overrideIndex > 0 ? name.substring(0, overrideIndex) : '';
          hasOverrideFlag = true;
        }

        var suffix = null;
        var property = name;
        var unitIndex = name.lastIndexOf('.');

        if (unitIndex > 0) {
          suffix = name.substr(unitIndex + 1);
          property = name.substring(0, unitIndex);
        }

        return {
          property: property,
          suffix: suffix,
          hasOverrideFlag: hasOverrideFlag
        };
      }
      /**
       * Gets the instruction to generate for an interpolated class map.
       * @param interpolation An Interpolation AST
       */


      function getClassMapInterpolationExpression(interpolation) {
        switch (getInterpolationArgsLength(interpolation)) {
          case 1:
            return Identifiers$1.classMap;

          case 3:
            return Identifiers$1.classMapInterpolate1;

          case 5:
            return Identifiers$1.classMapInterpolate2;

          case 7:
            return Identifiers$1.classMapInterpolate3;

          case 9:
            return Identifiers$1.classMapInterpolate4;

          case 11:
            return Identifiers$1.classMapInterpolate5;

          case 13:
            return Identifiers$1.classMapInterpolate6;

          case 15:
            return Identifiers$1.classMapInterpolate7;

          case 17:
            return Identifiers$1.classMapInterpolate8;

          default:
            return Identifiers$1.classMapInterpolateV;
        }
      }
      /**
       * Gets the instruction to generate for an interpolated style map.
       * @param interpolation An Interpolation AST
       */


      function getStyleMapInterpolationExpression(interpolation) {
        switch (getInterpolationArgsLength(interpolation)) {
          case 1:
            return Identifiers$1.styleMap;

          case 3:
            return Identifiers$1.styleMapInterpolate1;

          case 5:
            return Identifiers$1.styleMapInterpolate2;

          case 7:
            return Identifiers$1.styleMapInterpolate3;

          case 9:
            return Identifiers$1.styleMapInterpolate4;

          case 11:
            return Identifiers$1.styleMapInterpolate5;

          case 13:
            return Identifiers$1.styleMapInterpolate6;

          case 15:
            return Identifiers$1.styleMapInterpolate7;

          case 17:
            return Identifiers$1.styleMapInterpolate8;

          default:
            return Identifiers$1.styleMapInterpolateV;
        }
      }
      /**
       * Gets the instruction to generate for an interpolated style prop.
       * @param interpolation An Interpolation AST
       */


      function getStylePropInterpolationExpression(interpolation) {
        switch (getInterpolationArgsLength(interpolation)) {
          case 1:
            return Identifiers$1.styleProp;

          case 3:
            return Identifiers$1.stylePropInterpolate1;

          case 5:
            return Identifiers$1.stylePropInterpolate2;

          case 7:
            return Identifiers$1.stylePropInterpolate3;

          case 9:
            return Identifiers$1.stylePropInterpolate4;

          case 11:
            return Identifiers$1.stylePropInterpolate5;

          case 13:
            return Identifiers$1.stylePropInterpolate6;

          case 15:
            return Identifiers$1.stylePropInterpolate7;

          case 17:
            return Identifiers$1.stylePropInterpolate8;

          default:
            return Identifiers$1.stylePropInterpolateV;
        }
      }

      function normalizePropName(prop) {
        return hyphenate(prop);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var TokenType$1;

      (function (TokenType) {
        TokenType[TokenType["Character"] = 0] = "Character";
        TokenType[TokenType["Identifier"] = 1] = "Identifier";
        TokenType[TokenType["Keyword"] = 2] = "Keyword";
        TokenType[TokenType["String"] = 3] = "String";
        TokenType[TokenType["Operator"] = 4] = "Operator";
        TokenType[TokenType["Number"] = 5] = "Number";
        TokenType[TokenType["Error"] = 6] = "Error";
      })(TokenType$1 || (TokenType$1 = {}));

      var KEYWORDS = ['var', 'let', 'as', 'null', 'undefined', 'true', 'false', 'if', 'else', 'this'];

      var Lexer = /*#__PURE__*/function () {
        function Lexer() {
          _classCallCheck(this, Lexer);
        }

        _createClass2(Lexer, [{
          key: "tokenize",
          value: function tokenize(text) {
            var scanner = new _Scanner(text);
            var tokens = [];
            var token = scanner.scanToken();

            while (token != null) {
              tokens.push(token);
              token = scanner.scanToken();
            }

            return tokens;
          }
        }]);

        return Lexer;
      }();

      var Token$1 = /*#__PURE__*/function () {
        function Token$1(index, end, type, numValue, strValue) {
          _classCallCheck(this, Token$1);

          this.index = index;
          this.end = end;
          this.type = type;
          this.numValue = numValue;
          this.strValue = strValue;
        }

        _createClass2(Token$1, [{
          key: "isCharacter",
          value: function isCharacter(code) {
            return this.type == TokenType$1.Character && this.numValue == code;
          }
        }, {
          key: "isNumber",
          value: function isNumber() {
            return this.type == TokenType$1.Number;
          }
        }, {
          key: "isString",
          value: function isString() {
            return this.type == TokenType$1.String;
          }
        }, {
          key: "isOperator",
          value: function isOperator(operator) {
            return this.type == TokenType$1.Operator && this.strValue == operator;
          }
        }, {
          key: "isIdentifier",
          value: function isIdentifier() {
            return this.type == TokenType$1.Identifier;
          }
        }, {
          key: "isKeyword",
          value: function isKeyword() {
            return this.type == TokenType$1.Keyword;
          }
        }, {
          key: "isKeywordLet",
          value: function isKeywordLet() {
            return this.type == TokenType$1.Keyword && this.strValue == 'let';
          }
        }, {
          key: "isKeywordAs",
          value: function isKeywordAs() {
            return this.type == TokenType$1.Keyword && this.strValue == 'as';
          }
        }, {
          key: "isKeywordNull",
          value: function isKeywordNull() {
            return this.type == TokenType$1.Keyword && this.strValue == 'null';
          }
        }, {
          key: "isKeywordUndefined",
          value: function isKeywordUndefined() {
            return this.type == TokenType$1.Keyword && this.strValue == 'undefined';
          }
        }, {
          key: "isKeywordTrue",
          value: function isKeywordTrue() {
            return this.type == TokenType$1.Keyword && this.strValue == 'true';
          }
        }, {
          key: "isKeywordFalse",
          value: function isKeywordFalse() {
            return this.type == TokenType$1.Keyword && this.strValue == 'false';
          }
        }, {
          key: "isKeywordThis",
          value: function isKeywordThis() {
            return this.type == TokenType$1.Keyword && this.strValue == 'this';
          }
        }, {
          key: "isError",
          value: function isError() {
            return this.type == TokenType$1.Error;
          }
        }, {
          key: "toNumber",
          value: function toNumber() {
            return this.type == TokenType$1.Number ? this.numValue : -1;
          }
        }, {
          key: "toString",
          value: function toString() {
            switch (this.type) {
              case TokenType$1.Character:
              case TokenType$1.Identifier:
              case TokenType$1.Keyword:
              case TokenType$1.Operator:
              case TokenType$1.String:
              case TokenType$1.Error:
                return this.strValue;

              case TokenType$1.Number:
                return this.numValue.toString();

              default:
                return null;
            }
          }
        }]);

        return Token$1;
      }();

      function newCharacterToken(index, end, code) {
        return new Token$1(index, end, TokenType$1.Character, code, String.fromCharCode(code));
      }

      function newIdentifierToken(index, end, text) {
        return new Token$1(index, end, TokenType$1.Identifier, 0, text);
      }

      function newKeywordToken(index, end, text) {
        return new Token$1(index, end, TokenType$1.Keyword, 0, text);
      }

      function newOperatorToken(index, end, text) {
        return new Token$1(index, end, TokenType$1.Operator, 0, text);
      }

      function newStringToken(index, end, text) {
        return new Token$1(index, end, TokenType$1.String, 0, text);
      }

      function newNumberToken(index, end, n) {
        return new Token$1(index, end, TokenType$1.Number, n, '');
      }

      function newErrorToken(index, end, message) {
        return new Token$1(index, end, TokenType$1.Error, 0, message);
      }

      var EOF = new Token$1(-1, -1, TokenType$1.Character, 0, '');

      var _Scanner = /*#__PURE__*/function () {
        function _Scanner(input) {
          _classCallCheck(this, _Scanner);

          this.input = input;
          this.peek = 0;
          this.index = -1;
          this.length = input.length;
          this.advance();
        }

        _createClass2(_Scanner, [{
          key: "advance",
          value: function advance() {
            this.peek = ++this.index >= this.length ? $EOF : this.input.charCodeAt(this.index);
          }
        }, {
          key: "scanToken",
          value: function scanToken() {
            var input = this.input,
                length = this.length;
            var peek = this.peek,
                index = this.index; // Skip whitespace.

            while (peek <= $SPACE) {
              if (++index >= length) {
                peek = $EOF;
                break;
              } else {
                peek = input.charCodeAt(index);
              }
            }

            this.peek = peek;
            this.index = index;

            if (index >= length) {
              return null;
            } // Handle identifiers and numbers.


            if (isIdentifierStart(peek)) return this.scanIdentifier();
            if (isDigit(peek)) return this.scanNumber(index);
            var start = index;

            switch (peek) {
              case $PERIOD:
                this.advance();
                return isDigit(this.peek) ? this.scanNumber(start) : newCharacterToken(start, this.index, $PERIOD);

              case $LPAREN:
              case $RPAREN:
              case $LBRACE:
              case $RBRACE:
              case $LBRACKET:
              case $RBRACKET:
              case $COMMA:
              case $COLON:
              case $SEMICOLON:
                return this.scanCharacter(start, peek);

              case $SQ:
              case $DQ:
                return this.scanString();

              case $HASH:
              case $PLUS:
              case $MINUS:
              case $STAR:
              case $SLASH:
              case $PERCENT:
              case $CARET:
                return this.scanOperator(start, String.fromCharCode(peek));

              case $QUESTION:
                return this.scanComplexOperator(start, '?', $PERIOD, '.');

              case $LT:
              case $GT:
                return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=');

              case $BANG:
              case $EQ:
                return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=', $EQ, '=');

              case $AMPERSAND:
                return this.scanComplexOperator(start, '&', $AMPERSAND, '&');

              case $BAR:
                return this.scanComplexOperator(start, '|', $BAR, '|');

              case $NBSP:
                while (isWhitespace(this.peek)) {
                  this.advance();
                }

                return this.scanToken();
            }

            this.advance();
            return this.error("Unexpected character [".concat(String.fromCharCode(peek), "]"), 0);
          }
        }, {
          key: "scanCharacter",
          value: function scanCharacter(start, code) {
            this.advance();
            return newCharacterToken(start, this.index, code);
          }
        }, {
          key: "scanOperator",
          value: function scanOperator(start, str) {
            this.advance();
            return newOperatorToken(start, this.index, str);
          }
          /**
           * Tokenize a 2/3 char long operator
           *
           * @param start start index in the expression
           * @param one first symbol (always part of the operator)
           * @param twoCode code point for the second symbol
           * @param two second symbol (part of the operator when the second code point matches)
           * @param threeCode code point for the third symbol
           * @param three third symbol (part of the operator when provided and matches source expression)
           */

        }, {
          key: "scanComplexOperator",
          value: function scanComplexOperator(start, one, twoCode, two, threeCode, three) {
            this.advance();
            var str = one;

            if (this.peek == twoCode) {
              this.advance();
              str += two;
            }

            if (threeCode != null && this.peek == threeCode) {
              this.advance();
              str += three;
            }

            return newOperatorToken(start, this.index, str);
          }
        }, {
          key: "scanIdentifier",
          value: function scanIdentifier() {
            var start = this.index;
            this.advance();

            while (isIdentifierPart(this.peek)) {
              this.advance();
            }

            var str = this.input.substring(start, this.index);
            return KEYWORDS.indexOf(str) > -1 ? newKeywordToken(start, this.index, str) : newIdentifierToken(start, this.index, str);
          }
        }, {
          key: "scanNumber",
          value: function scanNumber(start) {
            var simple = this.index === start;
            this.advance(); // Skip initial digit.

            while (true) {
              if (isDigit(this.peek)) {// Do nothing.
              } else if (this.peek == $PERIOD) {
                simple = false;
              } else if (isExponentStart(this.peek)) {
                this.advance();
                if (isExponentSign(this.peek)) this.advance();
                if (!isDigit(this.peek)) return this.error('Invalid exponent', -1);
                simple = false;
              } else {
                break;
              }

              this.advance();
            }

            var str = this.input.substring(start, this.index);
            var value = simple ? parseIntAutoRadix(str) : parseFloat(str);
            return newNumberToken(start, this.index, value);
          }
        }, {
          key: "scanString",
          value: function scanString() {
            var start = this.index;
            var quote = this.peek;
            this.advance(); // Skip initial quote.

            var buffer = '';
            var marker = this.index;
            var input = this.input;

            while (this.peek != quote) {
              if (this.peek == $BACKSLASH) {
                buffer += input.substring(marker, this.index);
                this.advance();
                var unescapedCode = void 0; // Workaround for TS2.1-introduced type strictness

                this.peek = this.peek;

                if (this.peek == $u) {
                  // 4 character hex code for unicode character.
                  var hex = input.substring(this.index + 1, this.index + 5);

                  if (/^[0-9a-f]+$/i.test(hex)) {
                    unescapedCode = parseInt(hex, 16);
                  } else {
                    return this.error("Invalid unicode escape [\\u".concat(hex, "]"), 0);
                  }

                  for (var i = 0; i < 5; i++) {
                    this.advance();
                  }
                } else {
                  unescapedCode = unescape(this.peek);
                  this.advance();
                }

                buffer += String.fromCharCode(unescapedCode);
                marker = this.index;
              } else if (this.peek == $EOF) {
                return this.error('Unterminated quote', 0);
              } else {
                this.advance();
              }
            }

            var last = input.substring(marker, this.index);
            this.advance(); // Skip terminating quote.

            return newStringToken(start, this.index, buffer + last);
          }
        }, {
          key: "error",
          value: function error(message, offset) {
            var position = this.index + offset;
            return newErrorToken(position, this.index, "Lexer Error: ".concat(message, " at column ").concat(position, " in expression [").concat(this.input, "]"));
          }
        }]);

        return _Scanner;
      }();

      function isIdentifierStart(code) {
        return $a <= code && code <= $z || $A <= code && code <= $Z || code == $_ || code == $$;
      }

      function isIdentifier(input) {
        if (input.length == 0) return false;
        var scanner = new _Scanner(input);
        if (!isIdentifierStart(scanner.peek)) return false;
        scanner.advance();

        while (scanner.peek !== $EOF) {
          if (!isIdentifierPart(scanner.peek)) return false;
          scanner.advance();
        }

        return true;
      }

      function isIdentifierPart(code) {
        return isAsciiLetter(code) || isDigit(code) || code == $_ || code == $$;
      }

      function isExponentStart(code) {
        return code == $e || code == $E;
      }

      function isExponentSign(code) {
        return code == $MINUS || code == $PLUS;
      }

      function isQuote(code) {
        return code === $SQ || code === $DQ || code === $BT;
      }

      function unescape(code) {
        switch (code) {
          case $n:
            return $LF;

          case $f:
            return $FF;

          case $r:
            return $CR;

          case $t:
            return $TAB;

          case $v:
            return $VTAB;

          default:
            return code;
        }
      }

      function parseIntAutoRadix(text) {
        var result = parseInt(text);

        if (isNaN(result)) {
          throw new Error('Invalid integer literal when parsing ' + text);
        }

        return result;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var SplitInterpolation = function SplitInterpolation(strings, expressions, offsets) {
        _classCallCheck(this, SplitInterpolation);

        this.strings = strings;
        this.expressions = expressions;
        this.offsets = offsets;
      };

      var TemplateBindingParseResult = function TemplateBindingParseResult(templateBindings, warnings, errors) {
        _classCallCheck(this, TemplateBindingParseResult);

        this.templateBindings = templateBindings;
        this.warnings = warnings;
        this.errors = errors;
      };

      var Parser$1 = /*#__PURE__*/function () {
        function Parser$1(_lexer) {
          _classCallCheck(this, Parser$1);

          this._lexer = _lexer;
          this.errors = [];
          this.simpleExpressionChecker = SimpleExpressionChecker;
        }

        _createClass2(Parser$1, [{
          key: "parseAction",
          value: function parseAction(input, location, absoluteOffset) {
            var interpolationConfig = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_INTERPOLATION_CONFIG;

            this._checkNoInterpolation(input, location, interpolationConfig);

            var sourceToLex = this._stripComments(input);

            var tokens = this._lexer.tokenize(this._stripComments(input));

            var ast = new _ParseAST(input, location, absoluteOffset, tokens, sourceToLex.length, true, this.errors, input.length - sourceToLex.length).parseChain();
            return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
          }
        }, {
          key: "parseBinding",
          value: function parseBinding(input, location, absoluteOffset) {
            var interpolationConfig = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_INTERPOLATION_CONFIG;

            var ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);

            return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
          }
        }, {
          key: "checkSimpleExpression",
          value: function checkSimpleExpression(ast) {
            var checker = new this.simpleExpressionChecker();
            ast.visit(checker);
            return checker.errors;
          }
        }, {
          key: "parseSimpleBinding",
          value: function parseSimpleBinding(input, location, absoluteOffset) {
            var interpolationConfig = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_INTERPOLATION_CONFIG;

            var ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);

            var errors = this.checkSimpleExpression(ast);

            if (errors.length > 0) {
              this._reportError("Host binding expression cannot contain ".concat(errors.join(' ')), input, location);
            }

            return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
          }
        }, {
          key: "_reportError",
          value: function _reportError(message, input, errLocation, ctxLocation) {
            this.errors.push(new ParserError(message, input, errLocation, ctxLocation));
          }
        }, {
          key: "_parseBindingAst",
          value: function _parseBindingAst(input, location, absoluteOffset, interpolationConfig) {
            // Quotes expressions use 3rd-party expression language. We don't want to use
            // our lexer or parser for that, so we check for that ahead of time.
            var quote = this._parseQuote(input, location, absoluteOffset);

            if (quote != null) {
              return quote;
            }

            this._checkNoInterpolation(input, location, interpolationConfig);

            var sourceToLex = this._stripComments(input);

            var tokens = this._lexer.tokenize(sourceToLex);

            return new _ParseAST(input, location, absoluteOffset, tokens, sourceToLex.length, false, this.errors, input.length - sourceToLex.length).parseChain();
          }
        }, {
          key: "_parseQuote",
          value: function _parseQuote(input, location, absoluteOffset) {
            if (input == null) return null;
            var prefixSeparatorIndex = input.indexOf(':');
            if (prefixSeparatorIndex == -1) return null;
            var prefix = input.substring(0, prefixSeparatorIndex).trim();
            if (!isIdentifier(prefix)) return null;
            var uninterpretedExpression = input.substring(prefixSeparatorIndex + 1);
            var span = new ParseSpan(0, input.length);
            return new Quote(span, span.toAbsolute(absoluteOffset), prefix, uninterpretedExpression, location);
          }
          /**
           * Parse microsyntax template expression and return a list of bindings or
           * parsing errors in case the given expression is invalid.
           *
           * For example,
           * ```
           *   <div *ngFor="let item of items">
           *         ^      ^ absoluteValueOffset for `templateValue`
           *         absoluteKeyOffset for `templateKey`
           * ```
           * contains three bindings:
           * 1. ngFor -> null
           * 2. item -> NgForOfContext.$implicit
           * 3. ngForOf -> items
           *
           * This is apparent from the de-sugared template:
           * ```
           *   <ng-template ngFor let-item [ngForOf]="items">
           * ```
           *
           * @param templateKey name of directive, without the * prefix. For example: ngIf, ngFor
           * @param templateValue RHS of the microsyntax attribute
           * @param templateUrl template filename if it's external, component filename if it's inline
           * @param absoluteKeyOffset start of the `templateKey`
           * @param absoluteValueOffset start of the `templateValue`
           */

        }, {
          key: "parseTemplateBindings",
          value: function parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) {
            var tokens = this._lexer.tokenize(templateValue);

            var parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, templateValue.length, false
            /* parseAction */
            , this.errors, 0
            /* relative offset */
            );
            return parser.parseTemplateBindings({
              source: templateKey,
              span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length)
            });
          }
        }, {
          key: "parseInterpolation",
          value: function parseInterpolation(input, location, absoluteOffset) {
            var interpolationConfig = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_INTERPOLATION_CONFIG;

            var _this$splitInterpolat = this.splitInterpolation(input, location, interpolationConfig),
                strings = _this$splitInterpolat.strings,
                expressions = _this$splitInterpolat.expressions,
                offsets = _this$splitInterpolat.offsets;

            if (expressions.length === 0) return null;
            var expressionNodes = [];

            for (var i = 0; i < expressions.length; ++i) {
              var expressionText = expressions[i].text;

              var sourceToLex = this._stripComments(expressionText);

              var tokens = this._lexer.tokenize(sourceToLex);

              var ast = new _ParseAST(input, location, absoluteOffset, tokens, sourceToLex.length, false, this.errors, offsets[i] + (expressionText.length - sourceToLex.length)).parseChain();
              expressionNodes.push(ast);
            }

            return this.createInterpolationAst(strings.map(function (s) {
              return s.text;
            }), expressionNodes, input, location, absoluteOffset);
          }
          /**
           * Similar to `parseInterpolation`, but treats the provided string as a single expression
           * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).
           * This is used for parsing the switch expression in ICUs.
           */

        }, {
          key: "parseInterpolationExpression",
          value: function parseInterpolationExpression(expression, location, absoluteOffset) {
            var sourceToLex = this._stripComments(expression);

            var tokens = this._lexer.tokenize(sourceToLex);

            var ast = new _ParseAST(expression, location, absoluteOffset, tokens, sourceToLex.length,
            /* parseAction */
            false, this.errors, 0).parseChain();
            var strings = ['', '']; // The prefix and suffix strings are both empty

            return this.createInterpolationAst(strings, [ast], expression, location, absoluteOffset);
          }
        }, {
          key: "createInterpolationAst",
          value: function createInterpolationAst(strings, expressions, input, location, absoluteOffset) {
            var span = new ParseSpan(0, input.length);
            var interpolation = new Interpolation(span, span.toAbsolute(absoluteOffset), strings, expressions);
            return new ASTWithSource(interpolation, input, location, absoluteOffset, this.errors);
          }
          /**
           * Splits a string of text into "raw" text segments and expressions present in interpolations in
           * the string.
           * Returns `null` if there are no interpolations, otherwise a
           * `SplitInterpolation` with splits that look like
           *   <raw text> <expression> <raw text> ... <raw text> <expression> <raw text>
           */

        }, {
          key: "splitInterpolation",
          value: function splitInterpolation(input, location) {
            var interpolationConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_INTERPOLATION_CONFIG;
            var strings = [];
            var expressions = [];
            var offsets = [];
            var i = 0;
            var atInterpolation = false;
            var extendLastString = false;
            var interpStart = interpolationConfig.start,
                interpEnd = interpolationConfig.end;

            while (i < input.length) {
              if (!atInterpolation) {
                // parse until starting {{
                var _start4 = i;
                i = input.indexOf(interpStart, i);

                if (i === -1) {
                  i = input.length;
                }

                var text = input.substring(_start4, i);
                strings.push({
                  text: text,
                  start: _start4,
                  end: i
                });
                atInterpolation = true;
              } else {
                // parse from starting {{ to ending }} while ignoring content inside quotes.
                var fullStart = i;
                var exprStart = fullStart + interpStart.length;

                var exprEnd = this._getInterpolationEndIndex(input, interpEnd, exprStart);

                if (exprEnd === -1) {
                  // Could not find the end of the interpolation; do not parse an expression.
                  // Instead we should extend the content on the last raw string.
                  atInterpolation = false;
                  extendLastString = true;
                  break;
                }

                var fullEnd = exprEnd + interpEnd.length;

                var _text = input.substring(exprStart, exprEnd);

                if (_text.trim().length > 0) {
                  expressions.push({
                    text: _text,
                    start: fullStart,
                    end: fullEnd
                  });
                } else {
                  this._reportError('Blank expressions are not allowed in interpolated strings', input, "at column ".concat(i, " in"), location);

                  expressions.push({
                    text: '$implicit',
                    start: fullStart,
                    end: fullEnd
                  });
                }

                offsets.push(exprStart);
                i = fullEnd;
                atInterpolation = false;
              }
            }

            if (!atInterpolation) {
              // If we are now at a text section, add the remaining content as a raw string.
              if (extendLastString) {
                var piece = strings[strings.length - 1];
                piece.text += input.substring(i);
                piece.end = input.length;
              } else {
                strings.push({
                  text: input.substring(i),
                  start: i,
                  end: input.length
                });
              }
            }

            return new SplitInterpolation(strings, expressions, offsets);
          }
        }, {
          key: "wrapLiteralPrimitive",
          value: function wrapLiteralPrimitive(input, location, absoluteOffset) {
            var span = new ParseSpan(0, input == null ? 0 : input.length);
            return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input, location, absoluteOffset, this.errors);
          }
        }, {
          key: "_stripComments",
          value: function _stripComments(input) {
            var i = this._commentStart(input);

            return i != null ? input.substring(0, i).trim() : input;
          }
        }, {
          key: "_commentStart",
          value: function _commentStart(input) {
            var outerQuote = null;

            for (var i = 0; i < input.length - 1; i++) {
              var _char7 = input.charCodeAt(i);

              var nextChar = input.charCodeAt(i + 1);
              if (_char7 === $SLASH && nextChar == $SLASH && outerQuote == null) return i;

              if (outerQuote === _char7) {
                outerQuote = null;
              } else if (outerQuote == null && isQuote(_char7)) {
                outerQuote = _char7;
              }
            }

            return null;
          }
        }, {
          key: "_checkNoInterpolation",
          value: function _checkNoInterpolation(input, location, _ref13) {
            var start = _ref13.start,
                end = _ref13.end;
            var startIndex = -1;
            var endIndex = -1;

            var _iterator11 = _createForOfIteratorHelper(this._forEachUnquotedChar(input, 0)),
                _step11;

            try {
              for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
                var charIndex = _step11.value;

                if (startIndex === -1) {
                  if (input.startsWith(start)) {
                    startIndex = charIndex;
                  }
                } else {
                  endIndex = this._getInterpolationEndIndex(input, end, charIndex);

                  if (endIndex > -1) {
                    break;
                  }
                }
              }
            } catch (err) {
              _iterator11.e(err);
            } finally {
              _iterator11.f();
            }

            if (startIndex > -1 && endIndex > -1) {
              this._reportError("Got interpolation (".concat(start).concat(end, ") where expression was expected"), input, "at column ".concat(startIndex, " in"), location);
            }
          }
          /**
           * Finds the index of the end of an interpolation expression
           * while ignoring comments and quoted content.
           */

        }, {
          key: "_getInterpolationEndIndex",
          value: function _getInterpolationEndIndex(input, expressionEnd, start) {
            var _iterator12 = _createForOfIteratorHelper(this._forEachUnquotedChar(input, start)),
                _step12;

            try {
              for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
                var charIndex = _step12.value;

                if (input.startsWith(expressionEnd, charIndex)) {
                  return charIndex;
                } // Nothing else in the expression matters after we've
                // hit a comment so look directly for the end token.


                if (input.startsWith('//', charIndex)) {
                  return input.indexOf(expressionEnd, charIndex);
                }
              }
            } catch (err) {
              _iterator12.e(err);
            } finally {
              _iterator12.f();
            }

            return -1;
          }
          /**
           * Generator used to iterate over the character indexes of a string that are outside of quotes.
           * @param input String to loop through.
           * @param start Index within the string at which to start.
           */

        }, {
          key: "_forEachUnquotedChar",
          value:
          /*#__PURE__*/
          regeneratorRuntime.mark(function _forEachUnquotedChar(input, start) {
            var currentQuote, escapeCount, i, _char8;

            return regeneratorRuntime.wrap(function _forEachUnquotedChar$(_context2) {
              while (1) {
                switch (_context2.prev = _context2.next) {
                  case 0:
                    currentQuote = null;
                    escapeCount = 0;
                    i = start;

                  case 3:
                    if (!(i < input.length)) {
                      _context2.next = 16;
                      break;
                    }

                    _char8 = input[i]; // Skip the characters inside quotes. Note that we only care about the outer-most
                    // quotes matching up and we need to account for escape characters.

                    if (!(isQuote(input.charCodeAt(i)) && (currentQuote === null || currentQuote === _char8) && escapeCount % 2 === 0)) {
                      _context2.next = 9;
                      break;
                    }

                    currentQuote = currentQuote === null ? _char8 : null;
                    _context2.next = 12;
                    break;

                  case 9:
                    if (!(currentQuote === null)) {
                      _context2.next = 12;
                      break;
                    }

                    _context2.next = 12;
                    return i;

                  case 12:
                    escapeCount = _char8 === '\\' ? escapeCount + 1 : 0;

                  case 13:
                    i++;
                    _context2.next = 3;
                    break;

                  case 16:
                  case "end":
                    return _context2.stop();
                }
              }
            }, _forEachUnquotedChar);
          })
        }]);

        return Parser$1;
      }();

      var IvyParser = /*#__PURE__*/function (_Parser$) {
        _inherits(IvyParser, _Parser$);

        var _super100 = _createSuper(IvyParser);

        function IvyParser() {
          var _this161;

          _classCallCheck(this, IvyParser);

          _this161 = _super100.apply(this, arguments);
          _this161.simpleExpressionChecker = IvySimpleExpressionChecker;
          return _this161;
        }

        return IvyParser;
      }(Parser$1);
      /** Describes a stateful context an expression parser is in. */


      var ParseContextFlags;

      (function (ParseContextFlags) {
        ParseContextFlags[ParseContextFlags["None"] = 0] = "None";
        /**
         * A Writable context is one in which a value may be written to an lvalue.
         * For example, after we see a property access, we may expect a write to the
         * property via the "=" operator.
         *   prop
         *        ^ possible "=" after
         */

        ParseContextFlags[ParseContextFlags["Writable"] = 1] = "Writable";
      })(ParseContextFlags || (ParseContextFlags = {}));

      var _ParseAST = /*#__PURE__*/function () {
        function _ParseAST(input, location, absoluteOffset, tokens, inputLength, parseAction, errors, offset) {
          _classCallCheck(this, _ParseAST);

          this.input = input;
          this.location = location;
          this.absoluteOffset = absoluteOffset;
          this.tokens = tokens;
          this.inputLength = inputLength;
          this.parseAction = parseAction;
          this.errors = errors;
          this.offset = offset;
          this.rparensExpected = 0;
          this.rbracketsExpected = 0;
          this.rbracesExpected = 0;
          this.context = ParseContextFlags.None; // Cache of expression start and input indeces to the absolute source span they map to, used to
          // prevent creating superfluous source spans in `sourceSpan`.
          // A serial of the expression start and input index is used for mapping because both are stateful
          // and may change for subsequent expressions visited by the parser.

          this.sourceSpanCache = new Map();
          this.index = 0;
        }

        _createClass2(_ParseAST, [{
          key: "peek",
          value: function peek(offset) {
            var i = this.index + offset;
            return i < this.tokens.length ? this.tokens[i] : EOF;
          }
        }, {
          key: "next",
          get: function get() {
            return this.peek(0);
          }
          /** Whether all the parser input has been processed. */

        }, {
          key: "atEOF",
          get: function get() {
            return this.index >= this.tokens.length;
          }
          /**
           * Index of the next token to be processed, or the end of the last token if all have been
           * processed.
           */

        }, {
          key: "inputIndex",
          get: function get() {
            return this.atEOF ? this.currentEndIndex : this.next.index + this.offset;
          }
          /**
           * End index of the last processed token, or the start of the first token if none have been
           * processed.
           */

        }, {
          key: "currentEndIndex",
          get: function get() {
            if (this.index > 0) {
              var curToken = this.peek(-1);
              return curToken.end + this.offset;
            } // No tokens have been processed yet; return the next token's start or the length of the input
            // if there is no token.


            if (this.tokens.length === 0) {
              return this.inputLength + this.offset;
            }

            return this.next.index + this.offset;
          }
          /**
           * Returns the absolute offset of the start of the current token.
           */

        }, {
          key: "currentAbsoluteOffset",
          get: function get() {
            return this.absoluteOffset + this.inputIndex;
          }
        }, {
          key: "span",
          value: function span(start) {
            return new ParseSpan(start, this.currentEndIndex);
          }
        }, {
          key: "sourceSpan",
          value: function sourceSpan(start) {
            var serial = "".concat(start, "@").concat(this.inputIndex);

            if (!this.sourceSpanCache.has(serial)) {
              this.sourceSpanCache.set(serial, this.span(start).toAbsolute(this.absoluteOffset));
            }

            return this.sourceSpanCache.get(serial);
          }
        }, {
          key: "advance",
          value: function advance() {
            this.index++;
          }
          /**
           * Executes a callback in the provided context.
           */

        }, {
          key: "withContext",
          value: function withContext(context, cb) {
            this.context |= context;
            var ret = cb();
            this.context ^= context;
            return ret;
          }
        }, {
          key: "consumeOptionalCharacter",
          value: function consumeOptionalCharacter(code) {
            if (this.next.isCharacter(code)) {
              this.advance();
              return true;
            } else {
              return false;
            }
          }
        }, {
          key: "peekKeywordLet",
          value: function peekKeywordLet() {
            return this.next.isKeywordLet();
          }
        }, {
          key: "peekKeywordAs",
          value: function peekKeywordAs() {
            return this.next.isKeywordAs();
          }
          /**
           * Consumes an expected character, otherwise emits an error about the missing expected character
           * and skips over the token stream until reaching a recoverable point.
           *
           * See `this.error` and `this.skip` for more details.
           */

        }, {
          key: "expectCharacter",
          value: function expectCharacter(code) {
            if (this.consumeOptionalCharacter(code)) return;
            this.error("Missing expected ".concat(String.fromCharCode(code)));
          }
        }, {
          key: "consumeOptionalOperator",
          value: function consumeOptionalOperator(op) {
            if (this.next.isOperator(op)) {
              this.advance();
              return true;
            } else {
              return false;
            }
          }
        }, {
          key: "expectOperator",
          value: function expectOperator(operator) {
            if (this.consumeOptionalOperator(operator)) return;
            this.error("Missing expected operator ".concat(operator));
          }
        }, {
          key: "prettyPrintToken",
          value: function prettyPrintToken(tok) {
            return tok === EOF ? 'end of input' : "token ".concat(tok);
          }
        }, {
          key: "expectIdentifierOrKeyword",
          value: function expectIdentifierOrKeyword() {
            var n = this.next;

            if (!n.isIdentifier() && !n.isKeyword()) {
              this.error("Unexpected ".concat(this.prettyPrintToken(n), ", expected identifier or keyword"));
              return '';
            }

            this.advance();
            return n.toString();
          }
        }, {
          key: "expectIdentifierOrKeywordOrString",
          value: function expectIdentifierOrKeywordOrString() {
            var n = this.next;

            if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {
              this.error("Unexpected ".concat(this.prettyPrintToken(n), ", expected identifier, keyword, or string"));
              return '';
            }

            this.advance();
            return n.toString();
          }
        }, {
          key: "parseChain",
          value: function parseChain() {
            var exprs = [];
            var start = this.inputIndex;

            while (this.index < this.tokens.length) {
              var expr = this.parsePipe();
              exprs.push(expr);

              if (this.consumeOptionalCharacter($SEMICOLON)) {
                if (!this.parseAction) {
                  this.error('Binding expression cannot contain chained expression');
                }

                while (this.consumeOptionalCharacter($SEMICOLON)) {} // read all semicolons

              } else if (this.index < this.tokens.length) {
                this.error("Unexpected token '".concat(this.next, "'"));
              }
            }

            if (exprs.length == 0) return new EmptyExpr(this.span(start), this.sourceSpan(start));
            if (exprs.length == 1) return exprs[0];
            return new Chain(this.span(start), this.sourceSpan(start), exprs);
          }
        }, {
          key: "parsePipe",
          value: function parsePipe() {
            var result = this.parseExpression();

            if (this.consumeOptionalOperator('|')) {
              if (this.parseAction) {
                this.error('Cannot have a pipe in an action expression');
              }

              do {
                var nameStart = this.inputIndex;
                var name = this.expectIdentifierOrKeyword();
                var nameSpan = this.sourceSpan(nameStart);
                var args = [];

                while (this.consumeOptionalCharacter($COLON)) {
                  args.push(this.parseExpression());
                }

                var _start5 = result.span.start;
                result = new BindingPipe(this.span(_start5), this.sourceSpan(_start5), result, name, args, nameSpan);
              } while (this.consumeOptionalOperator('|'));
            }

            return result;
          }
        }, {
          key: "parseExpression",
          value: function parseExpression() {
            return this.parseConditional();
          }
        }, {
          key: "parseConditional",
          value: function parseConditional() {
            var start = this.inputIndex;
            var result = this.parseLogicalOr();

            if (this.consumeOptionalOperator('?')) {
              var yes = this.parsePipe();
              var no;

              if (!this.consumeOptionalCharacter($COLON)) {
                var end = this.inputIndex;
                var expression = this.input.substring(start, end);
                this.error("Conditional expression ".concat(expression, " requires all 3 expressions"));
                no = new EmptyExpr(this.span(start), this.sourceSpan(start));
              } else {
                no = this.parsePipe();
              }

              return new Conditional(this.span(start), this.sourceSpan(start), result, yes, no);
            } else {
              return result;
            }
          }
        }, {
          key: "parseLogicalOr",
          value: function parseLogicalOr() {
            // '||'
            var result = this.parseLogicalAnd();

            while (this.consumeOptionalOperator('||')) {
              var right = this.parseLogicalAnd();
              var _start6 = result.span.start;
              result = new Binary(this.span(_start6), this.sourceSpan(_start6), '||', result, right);
            }

            return result;
          }
        }, {
          key: "parseLogicalAnd",
          value: function parseLogicalAnd() {
            // '&&'
            var result = this.parseEquality();

            while (this.consumeOptionalOperator('&&')) {
              var right = this.parseEquality();
              var _start7 = result.span.start;
              result = new Binary(this.span(_start7), this.sourceSpan(_start7), '&&', result, right);
            }

            return result;
          }
        }, {
          key: "parseEquality",
          value: function parseEquality() {
            // '==','!=','===','!=='
            var result = this.parseRelational();

            while (this.next.type == TokenType$1.Operator) {
              var operator = this.next.strValue;

              switch (operator) {
                case '==':
                case '===':
                case '!=':
                case '!==':
                  this.advance();
                  var right = this.parseRelational();
                  var _start8 = result.span.start;
                  result = new Binary(this.span(_start8), this.sourceSpan(_start8), operator, result, right);
                  continue;
              }

              break;
            }

            return result;
          }
        }, {
          key: "parseRelational",
          value: function parseRelational() {
            // '<', '>', '<=', '>='
            var result = this.parseAdditive();

            while (this.next.type == TokenType$1.Operator) {
              var operator = this.next.strValue;

              switch (operator) {
                case '<':
                case '>':
                case '<=':
                case '>=':
                  this.advance();
                  var right = this.parseAdditive();
                  var _start9 = result.span.start;
                  result = new Binary(this.span(_start9), this.sourceSpan(_start9), operator, result, right);
                  continue;
              }

              break;
            }

            return result;
          }
        }, {
          key: "parseAdditive",
          value: function parseAdditive() {
            // '+', '-'
            var result = this.parseMultiplicative();

            while (this.next.type == TokenType$1.Operator) {
              var operator = this.next.strValue;

              switch (operator) {
                case '+':
                case '-':
                  this.advance();
                  var right = this.parseMultiplicative();
                  var _start10 = result.span.start;
                  result = new Binary(this.span(_start10), this.sourceSpan(_start10), operator, result, right);
                  continue;
              }

              break;
            }

            return result;
          }
        }, {
          key: "parseMultiplicative",
          value: function parseMultiplicative() {
            // '*', '%', '/'
            var result = this.parsePrefix();

            while (this.next.type == TokenType$1.Operator) {
              var operator = this.next.strValue;

              switch (operator) {
                case '*':
                case '%':
                case '/':
                  this.advance();
                  var right = this.parsePrefix();
                  var _start11 = result.span.start;
                  result = new Binary(this.span(_start11), this.sourceSpan(_start11), operator, result, right);
                  continue;
              }

              break;
            }

            return result;
          }
        }, {
          key: "parsePrefix",
          value: function parsePrefix() {
            if (this.next.type == TokenType$1.Operator) {
              var _start12 = this.inputIndex;
              var operator = this.next.strValue;
              var result;

              switch (operator) {
                case '+':
                  this.advance();
                  result = this.parsePrefix();
                  return Unary.createPlus(this.span(_start12), this.sourceSpan(_start12), result);

                case '-':
                  this.advance();
                  result = this.parsePrefix();
                  return Unary.createMinus(this.span(_start12), this.sourceSpan(_start12), result);

                case '!':
                  this.advance();
                  result = this.parsePrefix();
                  return new PrefixNot(this.span(_start12), this.sourceSpan(_start12), result);
              }
            }

            return this.parseCallChain();
          }
        }, {
          key: "parseCallChain",
          value: function parseCallChain() {
            var _this162 = this;

            var result = this.parsePrimary();
            var resultStart = result.span.start;

            while (true) {
              if (this.consumeOptionalCharacter($PERIOD)) {
                result = this.parseAccessMemberOrMethodCall(result, false);
              } else if (this.consumeOptionalOperator('?.')) {
                result = this.parseAccessMemberOrMethodCall(result, true);
              } else if (this.consumeOptionalCharacter($LBRACKET)) {
                this.withContext(ParseContextFlags.Writable, function () {
                  _this162.rbracketsExpected++;

                  var key = _this162.parsePipe();

                  if (key instanceof EmptyExpr) {
                    _this162.error("Key access cannot be empty");
                  }

                  _this162.rbracketsExpected--;

                  _this162.expectCharacter($RBRACKET);

                  if (_this162.consumeOptionalOperator('=')) {
                    var value = _this162.parseConditional();

                    result = new KeyedWrite(_this162.span(resultStart), _this162.sourceSpan(resultStart), result, key, value);
                  } else {
                    result = new KeyedRead(_this162.span(resultStart), _this162.sourceSpan(resultStart), result, key);
                  }
                });
              } else if (this.consumeOptionalCharacter($LPAREN)) {
                this.rparensExpected++;
                var args = this.parseCallArguments();
                this.rparensExpected--;
                this.expectCharacter($RPAREN);
                result = new FunctionCall(this.span(resultStart), this.sourceSpan(resultStart), result, args);
              } else if (this.consumeOptionalOperator('!')) {
                result = new NonNullAssert(this.span(resultStart), this.sourceSpan(resultStart), result);
              } else {
                return result;
              }
            }
          }
        }, {
          key: "parsePrimary",
          value: function parsePrimary() {
            var start = this.inputIndex;

            if (this.consumeOptionalCharacter($LPAREN)) {
              this.rparensExpected++;
              var result = this.parsePipe();
              this.rparensExpected--;
              this.expectCharacter($RPAREN);
              return result;
            } else if (this.next.isKeywordNull()) {
              this.advance();
              return new LiteralPrimitive(this.span(start), this.sourceSpan(start), null);
            } else if (this.next.isKeywordUndefined()) {
              this.advance();
              return new LiteralPrimitive(this.span(start), this.sourceSpan(start), void 0);
            } else if (this.next.isKeywordTrue()) {
              this.advance();
              return new LiteralPrimitive(this.span(start), this.sourceSpan(start), true);
            } else if (this.next.isKeywordFalse()) {
              this.advance();
              return new LiteralPrimitive(this.span(start), this.sourceSpan(start), false);
            } else if (this.next.isKeywordThis()) {
              this.advance();
              return new ThisReceiver(this.span(start), this.sourceSpan(start));
            } else if (this.consumeOptionalCharacter($LBRACKET)) {
              this.rbracketsExpected++;
              var elements = this.parseExpressionList($RBRACKET);
              this.rbracketsExpected--;
              this.expectCharacter($RBRACKET);
              return new LiteralArray(this.span(start), this.sourceSpan(start), elements);
            } else if (this.next.isCharacter($LBRACE)) {
              return this.parseLiteralMap();
            } else if (this.next.isIdentifier()) {
              return this.parseAccessMemberOrMethodCall(new ImplicitReceiver(this.span(start), this.sourceSpan(start)), false);
            } else if (this.next.isNumber()) {
              var value = this.next.toNumber();
              this.advance();
              return new LiteralPrimitive(this.span(start), this.sourceSpan(start), value);
            } else if (this.next.isString()) {
              var literalValue = this.next.toString();
              this.advance();
              return new LiteralPrimitive(this.span(start), this.sourceSpan(start), literalValue);
            } else if (this.index >= this.tokens.length) {
              this.error("Unexpected end of expression: ".concat(this.input));
              return new EmptyExpr(this.span(start), this.sourceSpan(start));
            } else {
              this.error("Unexpected token ".concat(this.next));
              return new EmptyExpr(this.span(start), this.sourceSpan(start));
            }
          }
        }, {
          key: "parseExpressionList",
          value: function parseExpressionList(terminator) {
            var result = [];

            if (!this.next.isCharacter(terminator)) {
              do {
                result.push(this.parsePipe());
              } while (this.consumeOptionalCharacter($COMMA));
            }

            return result;
          }
        }, {
          key: "parseLiteralMap",
          value: function parseLiteralMap() {
            var keys = [];
            var values = [];
            var start = this.inputIndex;
            this.expectCharacter($LBRACE);

            if (!this.consumeOptionalCharacter($RBRACE)) {
              this.rbracesExpected++;

              do {
                var quoted = this.next.isString();
                var key = this.expectIdentifierOrKeywordOrString();
                keys.push({
                  key: key,
                  quoted: quoted
                });
                this.expectCharacter($COLON);
                values.push(this.parsePipe());
              } while (this.consumeOptionalCharacter($COMMA));

              this.rbracesExpected--;
              this.expectCharacter($RBRACE);
            }

            return new LiteralMap(this.span(start), this.sourceSpan(start), keys, values);
          }
        }, {
          key: "parseAccessMemberOrMethodCall",
          value: function parseAccessMemberOrMethodCall(receiver) {
            var isSafe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
            var start = receiver.span.start;
            var nameStart = this.inputIndex;
            var id = this.expectIdentifierOrKeyword();
            var nameSpan = this.sourceSpan(nameStart);

            if (this.consumeOptionalCharacter($LPAREN)) {
              this.rparensExpected++;
              var args = this.parseCallArguments();
              this.expectCharacter($RPAREN);
              this.rparensExpected--;
              var span = this.span(start);
              var sourceSpan = this.sourceSpan(start);
              return isSafe ? new SafeMethodCall(span, sourceSpan, nameSpan, receiver, id, args) : new MethodCall(span, sourceSpan, nameSpan, receiver, id, args);
            } else {
              if (isSafe) {
                if (this.consumeOptionalOperator('=')) {
                  this.error('The \'?.\' operator cannot be used in the assignment');
                  return new EmptyExpr(this.span(start), this.sourceSpan(start));
                } else {
                  return new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, receiver, id);
                }
              } else {
                if (this.consumeOptionalOperator('=')) {
                  if (!this.parseAction) {
                    this.error('Bindings cannot contain assignments');
                    return new EmptyExpr(this.span(start), this.sourceSpan(start));
                  }

                  var value = this.parseConditional();
                  return new PropertyWrite(this.span(start), this.sourceSpan(start), nameSpan, receiver, id, value);
                } else {
                  return new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, receiver, id);
                }
              }
            }
          }
        }, {
          key: "parseCallArguments",
          value: function parseCallArguments() {
            if (this.next.isCharacter($RPAREN)) return [];
            var positionals = [];

            do {
              positionals.push(this.parsePipe());
            } while (this.consumeOptionalCharacter($COMMA));

            return positionals;
          }
          /**
           * Parses an identifier, a keyword, a string with an optional `-` in between,
           * and returns the string along with its absolute source span.
           */

        }, {
          key: "expectTemplateBindingKey",
          value: function expectTemplateBindingKey() {
            var result = '';
            var operatorFound = false;
            var start = this.currentAbsoluteOffset;

            do {
              result += this.expectIdentifierOrKeywordOrString();
              operatorFound = this.consumeOptionalOperator('-');

              if (operatorFound) {
                result += '-';
              }
            } while (operatorFound);

            return {
              source: result,
              span: new AbsoluteSourceSpan(start, start + result.length)
            };
          }
          /**
           * Parse microsyntax template expression and return a list of bindings or
           * parsing errors in case the given expression is invalid.
           *
           * For example,
           * ```
           *   <div *ngFor="let item of items; index as i; trackBy: func">
           * ```
           * contains five bindings:
           * 1. ngFor -> null
           * 2. item -> NgForOfContext.$implicit
           * 3. ngForOf -> items
           * 4. i -> NgForOfContext.index
           * 5. ngForTrackBy -> func
           *
           * For a full description of the microsyntax grammar, see
           * https://gist.github.com/mhevery/d3530294cff2e4a1b3fe15ff75d08855
           *
           * @param templateKey name of the microsyntax directive, like ngIf, ngFor,
           * without the *, along with its absolute span.
           */

        }, {
          key: "parseTemplateBindings",
          value: function parseTemplateBindings(templateKey) {
            var bindings = []; // The first binding is for the template key itself
            // In *ngFor="let item of items", key = "ngFor", value = null
            // In *ngIf="cond | pipe", key = "ngIf", value = "cond | pipe"

            bindings.push.apply(bindings, _toConsumableArray(this.parseDirectiveKeywordBindings(templateKey)));

            while (this.index < this.tokens.length) {
              // If it starts with 'let', then this must be variable declaration
              var letBinding = this.parseLetBinding();

              if (letBinding) {
                bindings.push(letBinding);
              } else {
                // Two possible cases here, either `value "as" key` or
                // "directive-keyword expression". We don't know which case, but both
                // "value" and "directive-keyword" are template binding key, so consume
                // the key first.
                var key = this.expectTemplateBindingKey(); // Peek at the next token, if it is "as" then this must be variable
                // declaration.

                var binding = this.parseAsBinding(key);

                if (binding) {
                  bindings.push(binding);
                } else {
                  // Otherwise the key must be a directive keyword, like "of". Transform
                  // the key to actual key. Eg. of -> ngForOf, trackBy -> ngForTrackBy
                  key.source = templateKey.source + key.source.charAt(0).toUpperCase() + key.source.substring(1);
                  bindings.push.apply(bindings, _toConsumableArray(this.parseDirectiveKeywordBindings(key)));
                }
              }

              this.consumeStatementTerminator();
            }

            return new TemplateBindingParseResult(bindings, []
            /* warnings */
            , this.errors);
          }
          /**
           * Parse a directive keyword, followed by a mandatory expression.
           * For example, "of items", "trackBy: func".
           * The bindings are: ngForOf -> items, ngForTrackBy -> func
           * There could be an optional "as" binding that follows the expression.
           * For example,
           * ```
           *   *ngFor="let item of items | slice:0:1 as collection".
           *                    ^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
           *               keyword    bound target   optional 'as' binding
           * ```
           *
           * @param key binding key, for example, ngFor, ngIf, ngForOf, along with its
           * absolute span.
           */

        }, {
          key: "parseDirectiveKeywordBindings",
          value: function parseDirectiveKeywordBindings(key) {
            var bindings = [];
            this.consumeOptionalCharacter($COLON); // trackBy: trackByFunction

            var value = this.getDirectiveBoundTarget();
            var spanEnd = this.currentAbsoluteOffset; // The binding could optionally be followed by "as". For example,
            // *ngIf="cond | pipe as x". In this case, the key in the "as" binding
            // is "x" and the value is the template key itself ("ngIf"). Note that the
            // 'key' in the current context now becomes the "value" in the next binding.

            var asBinding = this.parseAsBinding(key);

            if (!asBinding) {
              this.consumeStatementTerminator();
              spanEnd = this.currentAbsoluteOffset;
            }

            var sourceSpan = new AbsoluteSourceSpan(key.span.start, spanEnd);
            bindings.push(new ExpressionBinding(sourceSpan, key, value));

            if (asBinding) {
              bindings.push(asBinding);
            }

            return bindings;
          }
          /**
           * Return the expression AST for the bound target of a directive keyword
           * binding. For example,
           * ```
           *   *ngIf="condition | pipe"
           *          ^^^^^^^^^^^^^^^^ bound target for "ngIf"
           *   *ngFor="let item of items"
           *                       ^^^^^ bound target for "ngForOf"
           * ```
           */

        }, {
          key: "getDirectiveBoundTarget",
          value: function getDirectiveBoundTarget() {
            if (this.next === EOF || this.peekKeywordAs() || this.peekKeywordLet()) {
              return null;
            }

            var ast = this.parsePipe(); // example: "condition | async"

            var _ast$span = ast.span,
                start = _ast$span.start,
                end = _ast$span.end;
            var value = this.input.substring(start, end);
            return new ASTWithSource(ast, value, this.location, this.absoluteOffset + start, this.errors);
          }
          /**
           * Return the binding for a variable declared using `as`. Note that the order
           * of the key-value pair in this declaration is reversed. For example,
           * ```
           *   *ngFor="let item of items; index as i"
           *                              ^^^^^    ^
           *                              value    key
           * ```
           *
           * @param value name of the value in the declaration, "ngIf" in the example
           * above, along with its absolute span.
           */

        }, {
          key: "parseAsBinding",
          value: function parseAsBinding(value) {
            if (!this.peekKeywordAs()) {
              return null;
            }

            this.advance(); // consume the 'as' keyword

            var key = this.expectTemplateBindingKey();
            this.consumeStatementTerminator();
            var sourceSpan = new AbsoluteSourceSpan(value.span.start, this.currentAbsoluteOffset);
            return new VariableBinding(sourceSpan, key, value);
          }
          /**
           * Return the binding for a variable declared using `let`. For example,
           * ```
           *   *ngFor="let item of items; let i=index;"
           *           ^^^^^^^^           ^^^^^^^^^^^
           * ```
           * In the first binding, `item` is bound to `NgForOfContext.$implicit`.
           * In the second binding, `i` is bound to `NgForOfContext.index`.
           */

        }, {
          key: "parseLetBinding",
          value: function parseLetBinding() {
            if (!this.peekKeywordLet()) {
              return null;
            }

            var spanStart = this.currentAbsoluteOffset;
            this.advance(); // consume the 'let' keyword

            var key = this.expectTemplateBindingKey();
            var value = null;

            if (this.consumeOptionalOperator('=')) {
              value = this.expectTemplateBindingKey();
            }

            this.consumeStatementTerminator();
            var sourceSpan = new AbsoluteSourceSpan(spanStart, this.currentAbsoluteOffset);
            return new VariableBinding(sourceSpan, key, value);
          }
          /**
           * Consume the optional statement terminator: semicolon or comma.
           */

        }, {
          key: "consumeStatementTerminator",
          value: function consumeStatementTerminator() {
            this.consumeOptionalCharacter($SEMICOLON) || this.consumeOptionalCharacter($COMMA);
          }
          /**
           * Records an error and skips over the token stream until reaching a recoverable point. See
           * `this.skip` for more details on token skipping.
           */

        }, {
          key: "error",
          value: function error(message) {
            var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));
            this.skip();
          }
        }, {
          key: "locationText",
          value: function locationText() {
            var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
            if (index == null) index = this.index;
            return index < this.tokens.length ? "at column ".concat(this.tokens[index].index + 1, " in") : "at the end of the expression";
          }
          /**
           * Error recovery should skip tokens until it encounters a recovery point. skip() treats
           * the end of input and a ';' as unconditionally a recovery point. It also treats ')',
           * '}' and ']' as conditional recovery points if one of calling productions is expecting
           * one of these symbols. This allows skip() to recover from errors such as '(a.) + 1' allowing
           * more of the AST to be retained (it doesn't skip any tokens as the ')' is retained because
           * of the '(' begins an '(' <expr> ')' production). The recovery points of grouping symbols
           * must be conditional as they must be skipped if none of the calling productions are not
           * expecting the closing token else we will never make progress in the case of an
           * extraneous group closing symbol (such as a stray ')'). This is not the case for ';' because
           * parseChain() is always the root production and it expects a ';'.
           *
           * Furthermore, the presence of a stateful context can add more recovery points.
           *   - in a `Writable` context, we are able to recover after seeing the `=` operator, which
           *     signals the presence of an independent rvalue expression following the `=` operator.
           *
           * If a production expects one of these token it increments the corresponding nesting count,
           * and then decrements it just prior to checking if the token is in the input.
           */

        }, {
          key: "skip",
          value: function skip() {
            var n = this.next;

            while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) && (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) && (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) && (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET)) && (!(this.context & ParseContextFlags.Writable) || !n.isOperator('='))) {
              if (this.next.isError()) {
                this.errors.push(new ParserError(this.next.toString(), this.input, this.locationText(), this.location));
              }

              this.advance();
              n = this.next;
            }
          }
        }]);

        return _ParseAST;
      }();

      var SimpleExpressionChecker = /*#__PURE__*/function () {
        function SimpleExpressionChecker() {
          _classCallCheck(this, SimpleExpressionChecker);

          this.errors = [];
        }

        _createClass2(SimpleExpressionChecker, [{
          key: "visitImplicitReceiver",
          value: function visitImplicitReceiver(ast, context) {}
        }, {
          key: "visitThisReceiver",
          value: function visitThisReceiver(ast, context) {}
        }, {
          key: "visitInterpolation",
          value: function visitInterpolation(ast, context) {}
        }, {
          key: "visitLiteralPrimitive",
          value: function visitLiteralPrimitive(ast, context) {}
        }, {
          key: "visitPropertyRead",
          value: function visitPropertyRead(ast, context) {}
        }, {
          key: "visitPropertyWrite",
          value: function visitPropertyWrite(ast, context) {}
        }, {
          key: "visitSafePropertyRead",
          value: function visitSafePropertyRead(ast, context) {}
        }, {
          key: "visitMethodCall",
          value: function visitMethodCall(ast, context) {}
        }, {
          key: "visitSafeMethodCall",
          value: function visitSafeMethodCall(ast, context) {}
        }, {
          key: "visitFunctionCall",
          value: function visitFunctionCall(ast, context) {}
        }, {
          key: "visitLiteralArray",
          value: function visitLiteralArray(ast, context) {
            this.visitAll(ast.expressions, context);
          }
        }, {
          key: "visitLiteralMap",
          value: function visitLiteralMap(ast, context) {
            this.visitAll(ast.values, context);
          }
        }, {
          key: "visitUnary",
          value: function visitUnary(ast, context) {}
        }, {
          key: "visitBinary",
          value: function visitBinary(ast, context) {}
        }, {
          key: "visitPrefixNot",
          value: function visitPrefixNot(ast, context) {}
        }, {
          key: "visitNonNullAssert",
          value: function visitNonNullAssert(ast, context) {}
        }, {
          key: "visitConditional",
          value: function visitConditional(ast, context) {}
        }, {
          key: "visitPipe",
          value: function visitPipe(ast, context) {
            this.errors.push('pipes');
          }
        }, {
          key: "visitKeyedRead",
          value: function visitKeyedRead(ast, context) {}
        }, {
          key: "visitKeyedWrite",
          value: function visitKeyedWrite(ast, context) {}
        }, {
          key: "visitAll",
          value: function visitAll(asts, context) {
            var _this163 = this;

            return asts.map(function (node) {
              return node.visit(_this163, context);
            });
          }
        }, {
          key: "visitChain",
          value: function visitChain(ast, context) {}
        }, {
          key: "visitQuote",
          value: function visitQuote(ast, context) {}
        }]);

        return SimpleExpressionChecker;
      }();
      /**
       * This class implements SimpleExpressionChecker used in View Engine and performs more strict checks
       * to make sure host bindings do not contain pipes. In View Engine, having pipes in host bindings is
       * not supported as well, but in some cases (like `!(value | async)`) the error is not triggered at
       * compile time. In order to preserve View Engine behavior, more strict checks are introduced for
       * Ivy mode only.
       */


      var IvySimpleExpressionChecker = /*#__PURE__*/function (_RecursiveAstVisitor$2) {
        _inherits(IvySimpleExpressionChecker, _RecursiveAstVisitor$2);

        var _super101 = _createSuper(IvySimpleExpressionChecker);

        function IvySimpleExpressionChecker() {
          var _this164;

          _classCallCheck(this, IvySimpleExpressionChecker);

          _this164 = _super101.apply(this, arguments);
          _this164.errors = [];
          return _this164;
        }

        _createClass2(IvySimpleExpressionChecker, [{
          key: "visitPipe",
          value: function visitPipe() {
            this.errors.push('pipes');
          }
        }]);

        return IvySimpleExpressionChecker;
      }(RecursiveAstVisitor$1);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // =================================================================================================
      // =================================================================================================
      // =========== S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P  ===========
      // =================================================================================================
      // =================================================================================================
      //
      //        DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!
      //                               Reach out to mprobst for details.
      //
      // =================================================================================================

      /** Map from tagName|propertyName SecurityContext. Properties applying to all tags use '*'. */


      var _SECURITY_SCHEMA;

      function SECURITY_SCHEMA() {
        if (!_SECURITY_SCHEMA) {
          _SECURITY_SCHEMA = {}; // Case is insignificant below, all element and attribute names are lower-cased for lookup.

          registerContext(SecurityContext.HTML, ['iframe|srcdoc', '*|innerHTML', '*|outerHTML']);
          registerContext(SecurityContext.STYLE, ['*|style']); // NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.

          registerContext(SecurityContext.URL, ['*|formAction', 'area|href', 'area|ping', 'audio|src', 'a|href', 'a|ping', 'blockquote|cite', 'body|background', 'del|cite', 'form|action', 'img|src', 'img|srcset', 'input|src', 'ins|cite', 'q|cite', 'source|src', 'source|srcset', 'track|src', 'video|poster', 'video|src']);
          registerContext(SecurityContext.RESOURCE_URL, ['applet|code', 'applet|codebase', 'base|href', 'embed|src', 'frame|src', 'head|profile', 'html|manifest', 'iframe|src', 'link|href', 'media|src', 'object|codebase', 'object|data', 'script|src']);
        }

        return _SECURITY_SCHEMA;
      }

      function registerContext(ctx, specs) {
        var _iterator13 = _createForOfIteratorHelper(specs),
            _step13;

        try {
          for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
            var spec = _step13.value;
            _SECURITY_SCHEMA[spec.toLowerCase()] = ctx;
          }
        } catch (err) {
          _iterator13.e(err);
        } finally {
          _iterator13.f();
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ElementSchemaRegistry = function ElementSchemaRegistry() {
        _classCallCheck(this, ElementSchemaRegistry);
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var BOOLEAN = 'boolean';
      var NUMBER = 'number';
      var STRING = 'string';
      var OBJECT = 'object';
      /**
       * This array represents the DOM schema. It encodes inheritance, properties, and events.
       *
       * ## Overview
       *
       * Each line represents one kind of element. The `element_inheritance` and properties are joined
       * using `element_inheritance|properties` syntax.
       *
       * ## Element Inheritance
       *
       * The `element_inheritance` can be further subdivided as `element1,element2,...^parentElement`.
       * Here the individual elements are separated by `,` (commas). Every element in the list
       * has identical properties.
       *
       * An `element` may inherit additional properties from `parentElement` If no `^parentElement` is
       * specified then `""` (blank) element is assumed.
       *
       * NOTE: The blank element inherits from root `[Element]` element, the super element of all
       * elements.
       *
       * NOTE an element prefix such as `:svg:` has no special meaning to the schema.
       *
       * ## Properties
       *
       * Each element has a set of properties separated by `,` (commas). Each property can be prefixed
       * by a special character designating its type:
       *
       * - (no prefix): property is a string.
       * - `*`: property represents an event.
       * - `!`: property is a boolean.
       * - `#`: property is a number.
       * - `%`: property is an object.
       *
       * ## Query
       *
       * The class creates an internal squas representation which allows to easily answer the query of
       * if a given property exist on a given element.
       *
       * NOTE: We don't yet support querying for types or events.
       * NOTE: This schema is auto extracted from `schema_extractor.ts` located in the test folder,
       *       see dom_element_schema_registry_spec.ts
       */
      // =================================================================================================
      // =================================================================================================
      // =========== S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P  ===========
      // =================================================================================================
      // =================================================================================================
      //
      //                       DO NOT EDIT THIS DOM SCHEMA WITHOUT A SECURITY REVIEW!
      //
      // Newly added properties must be security reviewed and assigned an appropriate SecurityContext in
      // dom_security_schema.ts. Reach out to mprobst & rjamet for details.
      //
      // =================================================================================================

      var SCHEMA = ['[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot' +
      /* added manually to avoid breaking changes */
      ',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored', '[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate', 'abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate', 'media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume', ':svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex', ':svg:graphics^:svg:|', ':svg:animation^:svg:|*begin,*end,*repeat', ':svg:geometry^:svg:|', ':svg:componentTransferFunction^:svg:|', ':svg:gradient^:svg:|', ':svg:textContent^:svg:graphics|', ':svg:textPositioning^:svg:textContent|', 'a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username', 'area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,search,shape,target,username', 'audio^media|', 'br^[HTMLElement]|clear', 'base^[HTMLElement]|href,target', 'body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink', 'button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value', 'canvas^[HTMLElement]|#height,#width', 'content^[HTMLElement]|select', 'dl^[HTMLElement]|!compact', 'datalist^[HTMLElement]|', 'details^[HTMLElement]|!open', 'dialog^[HTMLElement]|!open,returnValue', 'dir^[HTMLElement]|!compact', 'div^[HTMLElement]|align', 'embed^[HTMLElement]|align,height,name,src,type,width', 'fieldset^[HTMLElement]|!disabled,name', 'font^[HTMLElement]|color,face,size', 'form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target', 'frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src', 'frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows', 'hr^[HTMLElement]|align,color,!noShade,size,width', 'head^[HTMLElement]|', 'h1,h2,h3,h4,h5,h6^[HTMLElement]|align', 'html^[HTMLElement]|version', 'iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width', 'img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width', 'input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width', 'li^[HTMLElement]|type,#value', 'label^[HTMLElement]|htmlFor', 'legend^[HTMLElement]|align', 'link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type', 'map^[HTMLElement]|name', 'marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width', 'menu^[HTMLElement]|!compact', 'meta^[HTMLElement]|content,httpEquiv,name,scheme', 'meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value', 'ins,del^[HTMLElement]|cite,dateTime', 'ol^[HTMLElement]|!compact,!reversed,#start,type', 'object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width', 'optgroup^[HTMLElement]|!disabled,label', 'option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value', 'output^[HTMLElement]|defaultValue,%htmlFor,name,value', 'p^[HTMLElement]|align', 'param^[HTMLElement]|name,type,value,valueType', 'picture^[HTMLElement]|', 'pre^[HTMLElement]|#width', 'progress^[HTMLElement]|#max,#value', 'q,blockquote,cite^[HTMLElement]|', 'script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type', 'select^[HTMLElement]|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value', 'shadow^[HTMLElement]|', 'slot^[HTMLElement]|name', 'source^[HTMLElement]|media,sizes,src,srcset,type', 'span^[HTMLElement]|', 'style^[HTMLElement]|!disabled,media,type', 'caption^[HTMLElement]|align', 'th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width', 'col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width', 'table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width', 'tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign', 'tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign', 'template^[HTMLElement]|', 'textarea^[HTMLElement]|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap', 'title^[HTMLElement]|text', 'track^[HTMLElement]|!default,kind,label,src,srclang', 'ul^[HTMLElement]|!compact,type', 'unknown^[HTMLElement]|', 'video^media|#height,poster,#width', ':svg:a^:svg:graphics|', ':svg:animate^:svg:animation|', ':svg:animateMotion^:svg:animation|', ':svg:animateTransform^:svg:animation|', ':svg:circle^:svg:geometry|', ':svg:clipPath^:svg:graphics|', ':svg:defs^:svg:graphics|', ':svg:desc^:svg:|', ':svg:discard^:svg:|', ':svg:ellipse^:svg:geometry|', ':svg:feBlend^:svg:|', ':svg:feColorMatrix^:svg:|', ':svg:feComponentTransfer^:svg:|', ':svg:feComposite^:svg:|', ':svg:feConvolveMatrix^:svg:|', ':svg:feDiffuseLighting^:svg:|', ':svg:feDisplacementMap^:svg:|', ':svg:feDistantLight^:svg:|', ':svg:feDropShadow^:svg:|', ':svg:feFlood^:svg:|', ':svg:feFuncA^:svg:componentTransferFunction|', ':svg:feFuncB^:svg:componentTransferFunction|', ':svg:feFuncG^:svg:componentTransferFunction|', ':svg:feFuncR^:svg:componentTransferFunction|', ':svg:feGaussianBlur^:svg:|', ':svg:feImage^:svg:|', ':svg:feMerge^:svg:|', ':svg:feMergeNode^:svg:|', ':svg:feMorphology^:svg:|', ':svg:feOffset^:svg:|', ':svg:fePointLight^:svg:|', ':svg:feSpecularLighting^:svg:|', ':svg:feSpotLight^:svg:|', ':svg:feTile^:svg:|', ':svg:feTurbulence^:svg:|', ':svg:filter^:svg:|', ':svg:foreignObject^:svg:graphics|', ':svg:g^:svg:graphics|', ':svg:image^:svg:graphics|', ':svg:line^:svg:geometry|', ':svg:linearGradient^:svg:gradient|', ':svg:mpath^:svg:|', ':svg:marker^:svg:|', ':svg:mask^:svg:|', ':svg:metadata^:svg:|', ':svg:path^:svg:geometry|', ':svg:pattern^:svg:|', ':svg:polygon^:svg:geometry|', ':svg:polyline^:svg:geometry|', ':svg:radialGradient^:svg:gradient|', ':svg:rect^:svg:geometry|', ':svg:svg^:svg:graphics|#currentScale,#zoomAndPan', ':svg:script^:svg:|type', ':svg:set^:svg:animation|', ':svg:stop^:svg:|', ':svg:style^:svg:|!disabled,media,title,type', ':svg:switch^:svg:graphics|', ':svg:symbol^:svg:|', ':svg:tspan^:svg:textPositioning|', ':svg:text^:svg:textPositioning|', ':svg:textPath^:svg:textContent|', ':svg:title^:svg:|', ':svg:use^:svg:graphics|', ':svg:view^:svg:|#zoomAndPan', 'data^[HTMLElement]|value', 'keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name', 'menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default', 'summary^[HTMLElement]|', 'time^[HTMLElement]|dateTime', ':svg:cursor^:svg:|'];
      var _ATTR_TO_PROP = {
        'class': 'className',
        'for': 'htmlFor',
        'formaction': 'formAction',
        'innerHtml': 'innerHTML',
        'readonly': 'readOnly',
        'tabindex': 'tabIndex'
      };

      var DomElementSchemaRegistry = /*#__PURE__*/function (_ElementSchemaRegistr) {
        _inherits(DomElementSchemaRegistry, _ElementSchemaRegistr);

        var _super102 = _createSuper(DomElementSchemaRegistry);

        function DomElementSchemaRegistry() {
          var _this165;

          _classCallCheck(this, DomElementSchemaRegistry);

          _this165 = _super102.call(this);
          _this165._schema = {};
          SCHEMA.forEach(function (encodedType) {
            var type = {};

            var _encodedType$split = encodedType.split('|'),
                _encodedType$split2 = _slicedToArray(_encodedType$split, 2),
                strType = _encodedType$split2[0],
                strProperties = _encodedType$split2[1];

            var properties = strProperties.split(',');

            var _strType$split = strType.split('^'),
                _strType$split2 = _slicedToArray(_strType$split, 2),
                typeNames = _strType$split2[0],
                superName = _strType$split2[1];

            typeNames.split(',').forEach(function (tag) {
              return _this165._schema[tag.toLowerCase()] = type;
            });

            var superType = superName && _this165._schema[superName.toLowerCase()];

            if (superType) {
              Object.keys(superType).forEach(function (prop) {
                type[prop] = superType[prop];
              });
            }

            properties.forEach(function (property) {
              if (property.length > 0) {
                switch (property[0]) {
                  case '*':
                    // We don't yet support events.
                    // If ever allowing to bind to events, GO THROUGH A SECURITY REVIEW, allowing events
                    // will
                    // almost certainly introduce bad XSS vulnerabilities.
                    // type[property.substring(1)] = EVENT;
                    break;

                  case '!':
                    type[property.substring(1)] = BOOLEAN;
                    break;

                  case '#':
                    type[property.substring(1)] = NUMBER;
                    break;

                  case '%':
                    type[property.substring(1)] = OBJECT;
                    break;

                  default:
                    type[property] = STRING;
                }
              }
            });
          });
          return _this165;
        }

        _createClass2(DomElementSchemaRegistry, [{
          key: "hasProperty",
          value: function hasProperty(tagName, propName, schemaMetas) {
            if (schemaMetas.some(function (schema) {
              return schema.name === NO_ERRORS_SCHEMA.name;
            })) {
              return true;
            }

            if (tagName.indexOf('-') > -1) {
              if (isNgContainer(tagName) || isNgContent(tagName)) {
                return false;
              }

              if (schemaMetas.some(function (schema) {
                return schema.name === CUSTOM_ELEMENTS_SCHEMA.name;
              })) {
                // Can't tell now as we don't know which properties a custom element will get
                // once it is instantiated
                return true;
              }
            }

            var elementProperties = this._schema[tagName.toLowerCase()] || this._schema['unknown'];

            return !!elementProperties[propName];
          }
        }, {
          key: "hasElement",
          value: function hasElement(tagName, schemaMetas) {
            if (schemaMetas.some(function (schema) {
              return schema.name === NO_ERRORS_SCHEMA.name;
            })) {
              return true;
            }

            if (tagName.indexOf('-') > -1) {
              if (isNgContainer(tagName) || isNgContent(tagName)) {
                return true;
              }

              if (schemaMetas.some(function (schema) {
                return schema.name === CUSTOM_ELEMENTS_SCHEMA.name;
              })) {
                // Allow any custom elements
                return true;
              }
            }

            return !!this._schema[tagName.toLowerCase()];
          }
          /**
           * securityContext returns the security context for the given property on the given DOM tag.
           *
           * Tag and property name are statically known and cannot change at runtime, i.e. it is not
           * possible to bind a value into a changing attribute or tag name.
           *
           * The filtering is based on a list of allowed tags|attributes. All attributes in the schema
           * above are assumed to have the 'NONE' security context, i.e. that they are safe inert
           * string values. Only specific well known attack vectors are assigned their appropriate context.
           */

        }, {
          key: "securityContext",
          value: function securityContext(tagName, propName, isAttribute) {
            if (isAttribute) {
              // NB: For security purposes, use the mapped property name, not the attribute name.
              propName = this.getMappedPropName(propName);
            } // Make sure comparisons are case insensitive, so that case differences between attribute and
            // property names do not have a security impact.


            tagName = tagName.toLowerCase();
            propName = propName.toLowerCase();
            var ctx = SECURITY_SCHEMA()[tagName + '|' + propName];

            if (ctx) {
              return ctx;
            }

            ctx = SECURITY_SCHEMA()['*|' + propName];
            return ctx ? ctx : SecurityContext.NONE;
          }
        }, {
          key: "getMappedPropName",
          value: function getMappedPropName(propName) {
            return _ATTR_TO_PROP[propName] || propName;
          }
        }, {
          key: "getDefaultComponentElementName",
          value: function getDefaultComponentElementName() {
            return 'ng-component';
          }
        }, {
          key: "validateProperty",
          value: function validateProperty(name) {
            if (name.toLowerCase().startsWith('on')) {
              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.";
              return {
                error: true,
                msg: msg
              };
            } else {
              return {
                error: false
              };
            }
          }
        }, {
          key: "validateAttribute",
          value: function validateAttribute(name) {
            if (name.toLowerCase().startsWith('on')) {
              var msg = "Binding to event attribute '".concat(name, "' is disallowed for security reasons, ") + "please use (".concat(name.slice(2), ")=...");
              return {
                error: true,
                msg: msg
              };
            } else {
              return {
                error: false
              };
            }
          }
        }, {
          key: "allKnownElementNames",
          value: function allKnownElementNames() {
            return Object.keys(this._schema);
          }
        }, {
          key: "normalizeAnimationStyleProperty",
          value: function normalizeAnimationStyleProperty(propName) {
            return dashCaseToCamelCase(propName);
          }
        }, {
          key: "normalizeAnimationStyleValue",
          value: function normalizeAnimationStyleValue(camelCaseProp, userProvidedProp, val) {
            var unit = '';
            var strVal = val.toString().trim();
            var errorMsg = null;

            if (_isPixelDimensionStyle(camelCaseProp) && val !== 0 && val !== '0') {
              if (typeof val === 'number') {
                unit = 'px';
              } else {
                var valAndSuffixMatch = val.match(/^[+-]?[\d\.]+([a-z]*)$/);

                if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {
                  errorMsg = "Please provide a CSS unit value for ".concat(userProvidedProp, ":").concat(val);
                }
              }
            }

            return {
              error: errorMsg,
              value: strVal + unit
            };
          }
        }]);

        return DomElementSchemaRegistry;
      }(ElementSchemaRegistry);

      function _isPixelDimensionStyle(prop) {
        switch (prop) {
          case 'width':
          case 'height':
          case 'minWidth':
          case 'minHeight':
          case 'maxWidth':
          case 'maxHeight':
          case 'left':
          case 'top':
          case 'bottom':
          case 'right':
          case 'fontSize':
          case 'outlineWidth':
          case 'outlineOffset':
          case 'paddingTop':
          case 'paddingLeft':
          case 'paddingBottom':
          case 'paddingRight':
          case 'marginTop':
          case 'marginLeft':
          case 'marginBottom':
          case 'marginRight':
          case 'borderRadius':
          case 'borderWidth':
          case 'borderTopWidth':
          case 'borderLeftWidth':
          case 'borderRightWidth':
          case 'borderBottomWidth':
          case 'textIndent':
            return true;

          default:
            return false;
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var BIND_NAME_REGEXP$1 = /^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/; // Group 1 = "bind-"

      var KW_BIND_IDX$1 = 1; // Group 2 = "let-"

      var KW_LET_IDX$1 = 2; // Group 3 = "ref-/#"

      var KW_REF_IDX$1 = 3; // Group 4 = "on-"

      var KW_ON_IDX$1 = 4; // Group 5 = "bindon-"

      var KW_BINDON_IDX$1 = 5; // Group 6 = "@"

      var KW_AT_IDX$1 = 6; // Group 7 = the identifier after "bind-", "let-", "ref-/#", "on-", "bindon-" or "@"

      var IDENT_KW_IDX$1 = 7; // Group 8 = identifier inside [()]

      var IDENT_BANANA_BOX_IDX$1 = 8; // Group 9 = identifier inside []

      var IDENT_PROPERTY_IDX$1 = 9; // Group 10 = identifier inside ()

      var IDENT_EVENT_IDX$1 = 10;
      var TEMPLATE_ATTR_PREFIX$2 = '*';

      function htmlAstToRender3Ast(htmlNodes, bindingParser) {
        var transformer = new HtmlAstToIvyAst(bindingParser);
        var ivyNodes = visitAll$1(transformer, htmlNodes); // Errors might originate in either the binding parser or the html to ivy transformer

        var allErrors = bindingParser.errors.concat(transformer.errors);
        return {
          nodes: ivyNodes,
          errors: allErrors,
          styleUrls: transformer.styleUrls,
          styles: transformer.styles,
          ngContentSelectors: transformer.ngContentSelectors
        };
      }

      var HtmlAstToIvyAst = /*#__PURE__*/function () {
        function HtmlAstToIvyAst(bindingParser) {
          _classCallCheck(this, HtmlAstToIvyAst);

          this.bindingParser = bindingParser;
          this.errors = [];
          this.styles = [];
          this.styleUrls = [];
          this.ngContentSelectors = [];
          this.inI18nBlock = false;
        } // HTML visitor


        _createClass2(HtmlAstToIvyAst, [{
          key: "visitElement",
          value: function visitElement(element) {
            var _this166 = this;

            var isI18nRootElement = isI18nRootNode(element.i18n);

            if (isI18nRootElement) {
              if (this.inI18nBlock) {
                this.reportError('Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.', element.sourceSpan);
              }

              this.inI18nBlock = true;
            }

            var preparsedElement = preparseElement(element);

            if (preparsedElement.type === PreparsedElementType.SCRIPT) {
              return null;
            } else if (preparsedElement.type === PreparsedElementType.STYLE) {
              var contents = textContents(element);

              if (contents !== null) {
                this.styles.push(contents);
              }

              return null;
            } else if (preparsedElement.type === PreparsedElementType.STYLESHEET && isStyleUrlResolvable(preparsedElement.hrefAttr)) {
              this.styleUrls.push(preparsedElement.hrefAttr);
              return null;
            } // Whether the element is a `<ng-template>`


            var isTemplateElement = isNgTemplate(element.name);
            var parsedProperties = [];
            var boundEvents = [];
            var variables = [];
            var references = [];
            var attributes = [];
            var i18nAttrsMeta = {};
            var templateParsedProperties = [];
            var templateVariables = []; // Whether the element has any *-attribute

            var elementHasInlineTemplate = false;

            var _iterator14 = _createForOfIteratorHelper(element.attrs),
                _step14;

            try {
              for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
                var attribute = _step14.value;
                var hasBinding = false;
                var normalizedName = normalizeAttributeName(attribute.name); // `*attr` defines template bindings

                var isTemplateBinding = false;

                if (attribute.i18n) {
                  i18nAttrsMeta[attribute.name] = attribute.i18n;
                }

                if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX$2)) {
                  // *-attributes
                  if (elementHasInlineTemplate) {
                    this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *", attribute.sourceSpan);
                  }

                  isTemplateBinding = true;
                  elementHasInlineTemplate = true;
                  var templateValue = attribute.value;
                  var templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX$2.length);
                  var parsedVariables = [];
                  var absoluteValueOffset = attribute.valueSpan ? attribute.valueSpan.start.offset : // If there is no value span the attribute does not have a value, like `attr` in
                  //`<div attr></div>`. In this case, point to one character beyond the last character of
                  // the attribute name.
                  attribute.sourceSpan.start.offset + attribute.name.length;
                  this.bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attribute.sourceSpan, absoluteValueOffset, [], templateParsedProperties, parsedVariables, true
                  /* isIvyAst */
                  );
                  templateVariables.push.apply(templateVariables, _toConsumableArray(parsedVariables.map(function (v) {
                    return new Variable(v.name, v.value, v.sourceSpan, v.keySpan, v.valueSpan);
                  })));
                } else {
                  // Check for variables, events, property bindings, interpolation
                  hasBinding = this.parseAttribute(isTemplateElement, attribute, [], parsedProperties, boundEvents, variables, references);
                }

                if (!hasBinding && !isTemplateBinding) {
                  // don't include the bindings as attributes as well in the AST
                  attributes.push(this.visitAttribute(attribute));
                }
              }
            } catch (err) {
              _iterator14.e(err);
            } finally {
              _iterator14.f();
            }

            var children = visitAll$1(preparsedElement.nonBindable ? NON_BINDABLE_VISITOR$1 : this, element.children);
            var parsedElement;

            if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {
              // `<ng-content>`
              if (element.children && !element.children.every(function (node) {
                return isEmptyTextNode(node) || isCommentNode(node);
              })) {
                this.reportError("<ng-content> element cannot have content.", element.sourceSpan);
              }

              var selector = preparsedElement.selectAttr;
              var attrs = element.attrs.map(function (attr) {
                return _this166.visitAttribute(attr);
              });
              parsedElement = new Content(selector, attrs, element.sourceSpan, element.i18n);
              this.ngContentSelectors.push(selector);
            } else if (isTemplateElement) {
              // `<ng-template>`
              var _attrs = this.extractAttributes(element.name, parsedProperties, i18nAttrsMeta);

              parsedElement = new Template(element.name, attributes, _attrs.bound, boundEvents, [
                /* no template attributes */
              ], children, references, variables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);
            } else {
              var _attrs2 = this.extractAttributes(element.name, parsedProperties, i18nAttrsMeta);

              parsedElement = new Element(element.name, attributes, _attrs2.bound, boundEvents, children, references, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);
            }

            if (elementHasInlineTemplate) {
              // If this node is an inline-template (e.g. has *ngFor) then we need to create a template
              // node that contains this node.
              // Moreover, if the node is an element, then we need to hoist its attributes to the template
              // node for matching against content projection selectors.
              var _attrs3 = this.extractAttributes('ng-template', templateParsedProperties, i18nAttrsMeta);

              var templateAttrs = [];

              _attrs3.literal.forEach(function (attr) {
                return templateAttrs.push(attr);
              });

              _attrs3.bound.forEach(function (attr) {
                return templateAttrs.push(attr);
              });

              var hoistedAttrs = parsedElement instanceof Element ? {
                attributes: parsedElement.attributes,
                inputs: parsedElement.inputs,
                outputs: parsedElement.outputs
              } : {
                attributes: [],
                inputs: [],
                outputs: []
              }; // For <ng-template>s with structural directives on them, avoid passing i18n information to
              // the wrapping template to prevent unnecessary i18n instructions from being generated. The
              // necessary i18n meta information will be extracted from child elements.

              var i18n = isTemplateElement && isI18nRootElement ? undefined : element.i18n; // TODO(pk): test for this case

              parsedElement = new Template(parsedElement.name, hoistedAttrs.attributes, hoistedAttrs.inputs, hoistedAttrs.outputs, templateAttrs, [parsedElement], [
                /* no references */
              ], templateVariables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, i18n);
            }

            if (isI18nRootElement) {
              this.inI18nBlock = false;
            }

            return parsedElement;
          }
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute) {
            return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan, attribute.valueSpan, attribute.i18n);
          }
        }, {
          key: "visitText",
          value: function visitText(text) {
            return this._visitTextWithInterpolation(text.value, text.sourceSpan, text.i18n);
          }
        }, {
          key: "visitExpansion",
          value: function visitExpansion(expansion) {
            var _this167 = this;

            if (!expansion.i18n) {
              // do not generate Icu in case it was created
              // outside of i18n block in a template
              return null;
            }

            if (!isI18nRootNode(expansion.i18n)) {
              throw new Error("Invalid type \"".concat(expansion.i18n.constructor, "\" for \"i18n\" property of ").concat(expansion.sourceSpan.toString(), ". Expected a \"Message\""));
            }

            var message = expansion.i18n;
            var vars = {};
            var placeholders = {}; // extract VARs from ICUs - we process them separately while
            // assembling resulting message via goog.getMsg function, since
            // we need to pass them to top-level goog.getMsg call

            Object.keys(message.placeholders).forEach(function (key) {
              var value = message.placeholders[key];

              if (key.startsWith(I18N_ICU_VAR_PREFIX)) {
                // Currently when the `plural` or `select` keywords in an ICU contain trailing spaces (e.g.
                // `{count, select , ...}`), these spaces are also included into the key names in ICU vars
                // (e.g. "VAR_SELECT "). These trailing spaces are not desirable, since they will later be
                // converted into `_` symbols while normalizing placeholder names, which might lead to
                // mismatches at runtime (i.e. placeholder will not be replaced with the correct value).
                var formattedKey = key.trim();

                var ast = _this167.bindingParser.parseInterpolationExpression(value.text, value.sourceSpan);

                vars[formattedKey] = new BoundText(ast, value.sourceSpan);
              } else {
                placeholders[key] = _this167._visitTextWithInterpolation(value.text, value.sourceSpan);
              }
            });
            return new Icu(vars, placeholders, expansion.sourceSpan, message);
          }
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(expansionCase) {
            return null;
          }
        }, {
          key: "visitComment",
          value: function visitComment(comment) {
            return null;
          } // convert view engine `ParsedProperty` to a format suitable for IVY

        }, {
          key: "extractAttributes",
          value: function extractAttributes(elementName, properties, i18nPropsMeta) {
            var _this168 = this;

            var bound = [];
            var literal = [];
            properties.forEach(function (prop) {
              var i18n = i18nPropsMeta[prop.name];

              if (prop.isLiteral) {
                literal.push(new TextAttribute(prop.name, prop.expression.source || '', prop.sourceSpan, undefined, i18n));
              } else {
                // Note that validation is skipped and property mapping is disabled
                // due to the fact that we need to make sure a given prop is not an
                // input of a directive and directive matching happens at runtime.
                var bep = _this168.bindingParser.createBoundElementProperty(elementName, prop,
                /* skipValidation */
                true,
                /* mapPropertyName */
                false);

                bound.push(BoundAttribute.fromBoundElementProperty(bep, i18n));
              }
            });
            return {
              bound: bound,
              literal: literal
            };
          }
        }, {
          key: "parseAttribute",
          value: function parseAttribute(isTemplateElement, attribute, matchableAttributes, parsedProperties, boundEvents, variables, references) {
            var name = normalizeAttributeName(attribute.name);
            var value = attribute.value;
            var srcSpan = attribute.sourceSpan;
            var absoluteOffset = attribute.valueSpan ? attribute.valueSpan.start.offset : srcSpan.start.offset;

            function createKeySpan(srcSpan, prefix, identifier) {
              // We need to adjust the start location for the keySpan to account for the removed 'data-'
              // prefix from `normalizeAttributeName`.
              var normalizationAdjustment = attribute.name.length - name.length;
              var keySpanStart = srcSpan.start.moveBy(prefix.length + normalizationAdjustment);
              var keySpanEnd = keySpanStart.moveBy(identifier.length);
              return new ParseSourceSpan(keySpanStart, keySpanEnd, keySpanStart, identifier);
            }

            var bindParts = name.match(BIND_NAME_REGEXP$1);
            var hasBinding = false;

            if (bindParts) {
              hasBinding = true;

              if (bindParts[KW_BIND_IDX$1] != null) {
                var identifier = bindParts[IDENT_KW_IDX$1];
                var keySpan = createKeySpan(srcSpan, bindParts[KW_BIND_IDX$1], identifier);
                this.bindingParser.parsePropertyBinding(identifier, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);
              } else if (bindParts[KW_LET_IDX$1]) {
                if (isTemplateElement) {
                  var _identifier2 = bindParts[IDENT_KW_IDX$1];

                  var _keySpan = createKeySpan(srcSpan, bindParts[KW_LET_IDX$1], _identifier2);

                  this.parseVariable(_identifier2, value, srcSpan, _keySpan, attribute.valueSpan, variables);
                } else {
                  this.reportError("\"let-\" is only supported on ng-template elements.", srcSpan);
                }
              } else if (bindParts[KW_REF_IDX$1]) {
                var _identifier3 = bindParts[IDENT_KW_IDX$1];
                this.parseReference(_identifier3, value, srcSpan, attribute.valueSpan, references);
              } else if (bindParts[KW_ON_IDX$1]) {
                var events = [];
                var _identifier4 = bindParts[IDENT_KW_IDX$1];
                this.bindingParser.parseEvent(_identifier4, value, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, events);
                addEvents(events, boundEvents);
              } else if (bindParts[KW_BINDON_IDX$1]) {
                var _identifier5 = bindParts[IDENT_KW_IDX$1];

                var _keySpan2 = createKeySpan(srcSpan, bindParts[KW_BINDON_IDX$1], _identifier5);

                this.bindingParser.parsePropertyBinding(_identifier5, value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, _keySpan2);
                this.parseAssignmentEvent(_identifier5, value, srcSpan, attribute.valueSpan, matchableAttributes, boundEvents);
              } else if (bindParts[KW_AT_IDX$1]) {
                var _keySpan3 = createKeySpan(srcSpan, '', name);

                this.bindingParser.parseLiteralAttr(name, value, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, _keySpan3);
              } else if (bindParts[IDENT_BANANA_BOX_IDX$1]) {
                var _keySpan4 = createKeySpan(srcSpan, '[(', bindParts[IDENT_BANANA_BOX_IDX$1]);

                this.bindingParser.parsePropertyBinding(bindParts[IDENT_BANANA_BOX_IDX$1], value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, _keySpan4);
                this.parseAssignmentEvent(bindParts[IDENT_BANANA_BOX_IDX$1], value, srcSpan, attribute.valueSpan, matchableAttributes, boundEvents);
              } else if (bindParts[IDENT_PROPERTY_IDX$1]) {
                var _keySpan5 = createKeySpan(srcSpan, '[', bindParts[IDENT_PROPERTY_IDX$1]);

                this.bindingParser.parsePropertyBinding(bindParts[IDENT_PROPERTY_IDX$1], value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties, _keySpan5);
              } else if (bindParts[IDENT_EVENT_IDX$1]) {
                var _events2 = [];
                this.bindingParser.parseEvent(bindParts[IDENT_EVENT_IDX$1], value, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, _events2);
                addEvents(_events2, boundEvents);
              }
            } else {
              var _keySpan6 = createKeySpan(srcSpan, ''
              /* prefix */
              , name);

              hasBinding = this.bindingParser.parsePropertyInterpolation(name, value, srcSpan, attribute.valueSpan, matchableAttributes, parsedProperties, _keySpan6);
            }

            return hasBinding;
          }
        }, {
          key: "_visitTextWithInterpolation",
          value: function _visitTextWithInterpolation(value, sourceSpan, i18n) {
            var valueNoNgsp = replaceNgsp(value);
            var expr = this.bindingParser.parseInterpolation(valueNoNgsp, sourceSpan);
            return expr ? new BoundText(expr, sourceSpan, i18n) : new Text(valueNoNgsp, sourceSpan);
          }
        }, {
          key: "parseVariable",
          value: function parseVariable(identifier, value, sourceSpan, keySpan, valueSpan, variables) {
            if (identifier.indexOf('-') > -1) {
              this.reportError("\"-\" is not allowed in variable names", sourceSpan);
            } else if (identifier.length === 0) {
              this.reportError("Variable does not have a name", sourceSpan);
            }

            variables.push(new Variable(identifier, value, sourceSpan, keySpan, valueSpan));
          }
        }, {
          key: "parseReference",
          value: function parseReference(identifier, value, sourceSpan, valueSpan, references) {
            if (identifier.indexOf('-') > -1) {
              this.reportError("\"-\" is not allowed in reference names", sourceSpan);
            } else if (identifier.length === 0) {
              this.reportError("Reference does not have a name", sourceSpan);
            }

            references.push(new Reference(identifier, value, sourceSpan, valueSpan));
          }
        }, {
          key: "parseAssignmentEvent",
          value: function parseAssignmentEvent(name, expression, sourceSpan, valueSpan, targetMatchableAttrs, boundEvents) {
            var events = [];
            this.bindingParser.parseEvent("".concat(name, "Change"), "".concat(expression, "=$event"), sourceSpan, valueSpan || sourceSpan, targetMatchableAttrs, events);
            addEvents(events, boundEvents);
          }
        }, {
          key: "reportError",
          value: function reportError(message, sourceSpan) {
            var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ParseErrorLevel.ERROR;
            this.errors.push(new ParseError(sourceSpan, message, level));
          }
        }]);

        return HtmlAstToIvyAst;
      }();

      var NonBindableVisitor$1 = /*#__PURE__*/function () {
        function NonBindableVisitor$1() {
          _classCallCheck(this, NonBindableVisitor$1);
        }

        _createClass2(NonBindableVisitor$1, [{
          key: "visitElement",
          value: function visitElement(ast) {
            var preparsedElement = preparseElement(ast);

            if (preparsedElement.type === PreparsedElementType.SCRIPT || preparsedElement.type === PreparsedElementType.STYLE || preparsedElement.type === PreparsedElementType.STYLESHEET) {
              // Skipping <script> for security reasons
              // Skipping <style> and stylesheets as we already processed them
              // in the StyleCompiler
              return null;
            }

            var children = visitAll$1(this, ast.children, null);
            return new Element(ast.name, visitAll$1(this, ast.attrs),
            /* inputs */
            [],
            /* outputs */
            [], children,
            /* references */
            [], ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
          }
        }, {
          key: "visitComment",
          value: function visitComment(comment) {
            return null;
          }
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute) {
            return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan, undefined, attribute.i18n);
          }
        }, {
          key: "visitText",
          value: function visitText(text) {
            return new Text(text.value, text.sourceSpan);
          }
        }, {
          key: "visitExpansion",
          value: function visitExpansion(expansion) {
            return null;
          }
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(expansionCase) {
            return null;
          }
        }]);

        return NonBindableVisitor$1;
      }();

      var NON_BINDABLE_VISITOR$1 = new NonBindableVisitor$1();

      function normalizeAttributeName(attrName) {
        return /^data-/i.test(attrName) ? attrName.substring(5) : attrName;
      }

      function addEvents(events, boundEvents) {
        boundEvents.push.apply(boundEvents, _toConsumableArray(events.map(function (e) {
          return BoundEvent.fromParsedEvent(e);
        })));
      }

      function isEmptyTextNode(node) {
        return node instanceof Text$3 && node.value.trim().length == 0;
      }

      function isCommentNode(node) {
        return node instanceof Comment;
      }

      function textContents(node) {
        if (node.children.length !== 1 || !(node.children[0] instanceof Text$3)) {
          return null;
        } else {
          return node.children[0].value;
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var TagType;

      (function (TagType) {
        TagType[TagType["ELEMENT"] = 0] = "ELEMENT";
        TagType[TagType["TEMPLATE"] = 1] = "TEMPLATE";
      })(TagType || (TagType = {}));
      /**
       * Generates an object that is used as a shared state between parent and all child contexts.
       */


      function setupRegistry() {
        return {
          getUniqueId: getSeqNumberGenerator(),
          icus: new Map()
        };
      }
      /**
       * I18nContext is a helper class which keeps track of all i18n-related aspects
       * (accumulates placeholders, bindings, etc) between i18nStart and i18nEnd instructions.
       *
       * When we enter a nested template, the top-level context is being passed down
       * to the nested component, which uses this context to generate a child instance
       * of I18nContext class (to handle nested template) and at the end, reconciles it back
       * with the parent context.
       *
       * @param index Instruction index of i18nStart, which initiates this context
       * @param ref Reference to a translation const that represents the content if thus context
       * @param level Nestng level defined for child contexts
       * @param templateIndex Instruction index of a template which this context belongs to
       * @param meta Meta information (id, meaning, description, etc) associated with this context
       */


      var I18nContext = /*#__PURE__*/function () {
        function I18nContext(index, ref) {
          var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
          var templateIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
          var meta = arguments.length > 4 ? arguments[4] : undefined;
          var registry = arguments.length > 5 ? arguments[5] : undefined;

          _classCallCheck(this, I18nContext);

          this.index = index;
          this.ref = ref;
          this.level = level;
          this.templateIndex = templateIndex;
          this.meta = meta;
          this.registry = registry;
          this.bindings = new Set();
          this.placeholders = new Map();
          this.isEmitted = false;
          this._unresolvedCtxCount = 0;
          this._registry = registry || setupRegistry();
          this.id = this._registry.getUniqueId();
        }

        _createClass2(I18nContext, [{
          key: "appendTag",
          value: function appendTag(type, node, index, closed) {
            if (node.isVoid && closed) {
              return; // ignore "close" for void tags
            }

            var ph = node.isVoid || !closed ? node.startName : node.closeName;
            var content = {
              type: type,
              index: index,
              ctx: this.id,
              isVoid: node.isVoid,
              closed: closed
            };
            updatePlaceholderMap(this.placeholders, ph, content);
          }
        }, {
          key: "icus",
          get: function get() {
            return this._registry.icus;
          }
        }, {
          key: "isRoot",
          get: function get() {
            return this.level === 0;
          }
        }, {
          key: "isResolved",
          get: function get() {
            return this._unresolvedCtxCount === 0;
          }
        }, {
          key: "getSerializedPlaceholders",
          value: function getSerializedPlaceholders() {
            var result = new Map();
            this.placeholders.forEach(function (values, key) {
              return result.set(key, values.map(serializePlaceholderValue));
            });
            return result;
          } // public API to accumulate i18n-related content

        }, {
          key: "appendBinding",
          value: function appendBinding(binding) {
            this.bindings.add(binding);
          }
        }, {
          key: "appendIcu",
          value: function appendIcu(name, ref) {
            updatePlaceholderMap(this._registry.icus, name, ref);
          }
        }, {
          key: "appendBoundText",
          value: function appendBoundText(node) {
            var _this169 = this;

            var phs = assembleBoundTextPlaceholders(node, this.bindings.size, this.id);
            phs.forEach(function (values, key) {
              return updatePlaceholderMap.apply(void 0, [_this169.placeholders, key].concat(_toConsumableArray(values)));
            });
          }
        }, {
          key: "appendTemplate",
          value: function appendTemplate(node, index) {
            // add open and close tags at the same time,
            // since we process nested templates separately
            this.appendTag(TagType.TEMPLATE, node, index, false);
            this.appendTag(TagType.TEMPLATE, node, index, true);
            this._unresolvedCtxCount++;
          }
        }, {
          key: "appendElement",
          value: function appendElement(node, index, closed) {
            this.appendTag(TagType.ELEMENT, node, index, closed);
          }
        }, {
          key: "appendProjection",
          value: function appendProjection(node, index) {
            // Add open and close tags at the same time, since `<ng-content>` has no content,
            // so when we come across `<ng-content>` we can register both open and close tags.
            // Note: runtime i18n logic doesn't distinguish `<ng-content>` tag placeholders and
            // regular element tag placeholders, so we generate element placeholders for both types.
            this.appendTag(TagType.ELEMENT, node, index, false);
            this.appendTag(TagType.ELEMENT, node, index, true);
          }
          /**
           * Generates an instance of a child context based on the root one,
           * when we enter a nested template within I18n section.
           *
           * @param index Instruction index of corresponding i18nStart, which initiates this context
           * @param templateIndex Instruction index of a template which this context belongs to
           * @param meta Meta information (id, meaning, description, etc) associated with this context
           *
           * @returns I18nContext instance
           */

        }, {
          key: "forkChildContext",
          value: function forkChildContext(index, templateIndex, meta) {
            return new I18nContext(index, this.ref, this.level + 1, templateIndex, meta, this._registry);
          }
          /**
           * Reconciles child context into parent one once the end of the i18n block is reached (i18nEnd).
           *
           * @param context Child I18nContext instance to be reconciled with parent context.
           */

        }, {
          key: "reconcileChildContext",
          value: function reconcileChildContext(context) {
            var _this170 = this;

            // set the right context id for open and close
            // template tags, so we can use it as sub-block ids
            ['start', 'close'].forEach(function (op) {
              var key = context.meta["".concat(op, "Name")];
              var phs = _this170.placeholders.get(key) || [];
              var tag = phs.find(findTemplateFn(_this170.id, context.templateIndex));

              if (tag) {
                tag.ctx = context.id;
              }
            }); // reconcile placeholders

            var childPhs = context.placeholders;
            childPhs.forEach(function (values, key) {
              var phs = _this170.placeholders.get(key);

              if (!phs) {
                _this170.placeholders.set(key, values);

                return;
              } // try to find matching template...


              var tmplIdx = phs.findIndex(findTemplateFn(context.id, context.templateIndex));

              if (tmplIdx >= 0) {
                // ... if found - replace it with nested template content
                var isCloseTag = key.startsWith('CLOSE');
                var isTemplateTag = key.endsWith('NG-TEMPLATE');

                if (isTemplateTag) {
                  // current template's content is placed before or after
                  // parent template tag, depending on the open/close atrribute
                  phs.splice.apply(phs, [tmplIdx + (isCloseTag ? 0 : 1), 0].concat(_toConsumableArray(values)));
                } else {
                  var idx = isCloseTag ? values.length - 1 : 0;
                  values[idx].tmpl = phs[tmplIdx];
                  phs.splice.apply(phs, [tmplIdx, 1].concat(_toConsumableArray(values)));
                }
              } else {
                // ... otherwise just append content to placeholder value
                phs.push.apply(phs, _toConsumableArray(values));
              }

              _this170.placeholders.set(key, phs);
            });
            this._unresolvedCtxCount--;
          }
        }]);

        return I18nContext;
      }(); //
      // Helper methods
      //


      function wrap(symbol, index, contextId, closed) {
        var state = closed ? '/' : '';
        return wrapI18nPlaceholder("".concat(state).concat(symbol).concat(index), contextId);
      }

      function wrapTag(symbol, _ref14, closed) {
        var index = _ref14.index,
            ctx = _ref14.ctx,
            isVoid = _ref14.isVoid;
        return isVoid ? wrap(symbol, index, ctx) + wrap(symbol, index, ctx, true) : wrap(symbol, index, ctx, closed);
      }

      function findTemplateFn(ctx, templateIndex) {
        return function (token) {
          return typeof token === 'object' && token.type === TagType.TEMPLATE && token.index === templateIndex && token.ctx === ctx;
        };
      }

      function serializePlaceholderValue(value) {
        var element = function element(data, closed) {
          return wrapTag('#', data, closed);
        };

        var template = function template(data, closed) {
          return wrapTag('*', data, closed);
        };

        var projection = function projection(data, closed) {
          return wrapTag('!', data, closed);
        };

        switch (value.type) {
          case TagType.ELEMENT:
            // close element tag
            if (value.closed) {
              return element(value, true) + (value.tmpl ? template(value.tmpl, true) : '');
            } // open element tag that also initiates a template


            if (value.tmpl) {
              return template(value.tmpl) + element(value) + (value.isVoid ? template(value.tmpl, true) : '');
            }

            return element(value);

          case TagType.TEMPLATE:
            return template(value, value.closed);

          default:
            return value;
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var IcuSerializerVisitor = /*#__PURE__*/function () {
        function IcuSerializerVisitor() {
          _classCallCheck(this, IcuSerializerVisitor);
        }

        _createClass2(IcuSerializerVisitor, [{
          key: "visitText",
          value: function visitText(text) {
            return text.value;
          }
        }, {
          key: "visitContainer",
          value: function visitContainer(container) {
            var _this171 = this;

            return container.children.map(function (child) {
              return child.visit(_this171);
            }).join('');
          }
        }, {
          key: "visitIcu",
          value: function visitIcu(icu) {
            var _this172 = this;

            var strCases = Object.keys(icu.cases).map(function (k) {
              return "".concat(k, " {").concat(icu.cases[k].visit(_this172), "}");
            });
            var result = "{".concat(icu.expressionPlaceholder, ", ").concat(icu.type, ", ").concat(strCases.join(' '), "}");
            return result;
          }
        }, {
          key: "visitTagPlaceholder",
          value: function visitTagPlaceholder(ph) {
            var _this173 = this;

            return ph.isVoid ? this.formatPh(ph.startName) : "".concat(this.formatPh(ph.startName)).concat(ph.children.map(function (child) {
              return child.visit(_this173);
            }).join('')).concat(this.formatPh(ph.closeName));
          }
        }, {
          key: "visitPlaceholder",
          value: function visitPlaceholder(ph) {
            return this.formatPh(ph.name);
          }
        }, {
          key: "visitIcuPlaceholder",
          value: function visitIcuPlaceholder(ph, context) {
            return this.formatPh(ph.name);
          }
        }, {
          key: "formatPh",
          value: function formatPh(value) {
            return "{".concat(formatI18nPlaceholderName(value,
            /* useCamelCase */
            false), "}");
          }
        }]);

        return IcuSerializerVisitor;
      }();

      var serializer = new IcuSerializerVisitor();

      function serializeIcuNode(icu) {
        return icu.visit(serializer);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var TAG_TO_PLACEHOLDER_NAMES = {
        'A': 'LINK',
        'B': 'BOLD_TEXT',
        'BR': 'LINE_BREAK',
        'EM': 'EMPHASISED_TEXT',
        'H1': 'HEADING_LEVEL1',
        'H2': 'HEADING_LEVEL2',
        'H3': 'HEADING_LEVEL3',
        'H4': 'HEADING_LEVEL4',
        'H5': 'HEADING_LEVEL5',
        'H6': 'HEADING_LEVEL6',
        'HR': 'HORIZONTAL_RULE',
        'I': 'ITALIC_TEXT',
        'LI': 'LIST_ITEM',
        'LINK': 'MEDIA_LINK',
        'OL': 'ORDERED_LIST',
        'P': 'PARAGRAPH',
        'Q': 'QUOTATION',
        'S': 'STRIKETHROUGH_TEXT',
        'SMALL': 'SMALL_TEXT',
        'SUB': 'SUBSTRIPT',
        'SUP': 'SUPERSCRIPT',
        'TBODY': 'TABLE_BODY',
        'TD': 'TABLE_CELL',
        'TFOOT': 'TABLE_FOOTER',
        'TH': 'TABLE_HEADER_CELL',
        'THEAD': 'TABLE_HEADER',
        'TR': 'TABLE_ROW',
        'TT': 'MONOSPACED_TEXT',
        'U': 'UNDERLINED_TEXT',
        'UL': 'UNORDERED_LIST'
      };
      /**
       * Creates unique names for placeholder with different content.
       *
       * Returns the same placeholder name when the content is identical.
       */

      var PlaceholderRegistry = /*#__PURE__*/function () {
        function PlaceholderRegistry() {
          _classCallCheck(this, PlaceholderRegistry);

          // Count the occurrence of the base name top generate a unique name
          this._placeHolderNameCounts = {}; // Maps signature to placeholder names

          this._signatureToName = {};
        }

        _createClass2(PlaceholderRegistry, [{
          key: "getStartTagPlaceholderName",
          value: function getStartTagPlaceholderName(tag, attrs, isVoid) {
            var signature = this._hashTag(tag, attrs, isVoid);

            if (this._signatureToName[signature]) {
              return this._signatureToName[signature];
            }

            var upperTag = tag.toUpperCase();
            var baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || "TAG_".concat(upperTag);

            var name = this._generateUniqueName(isVoid ? baseName : "START_".concat(baseName));

            this._signatureToName[signature] = name;
            return name;
          }
        }, {
          key: "getCloseTagPlaceholderName",
          value: function getCloseTagPlaceholderName(tag) {
            var signature = this._hashClosingTag(tag);

            if (this._signatureToName[signature]) {
              return this._signatureToName[signature];
            }

            var upperTag = tag.toUpperCase();
            var baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || "TAG_".concat(upperTag);

            var name = this._generateUniqueName("CLOSE_".concat(baseName));

            this._signatureToName[signature] = name;
            return name;
          }
        }, {
          key: "getPlaceholderName",
          value: function getPlaceholderName(name, content) {
            var upperName = name.toUpperCase();
            var signature = "PH: ".concat(upperName, "=").concat(content);

            if (this._signatureToName[signature]) {
              return this._signatureToName[signature];
            }

            var uniqueName = this._generateUniqueName(upperName);

            this._signatureToName[signature] = uniqueName;
            return uniqueName;
          }
        }, {
          key: "getUniquePlaceholder",
          value: function getUniquePlaceholder(name) {
            return this._generateUniqueName(name.toUpperCase());
          } // Generate a hash for a tag - does not take attribute order into account

        }, {
          key: "_hashTag",
          value: function _hashTag(tag, attrs, isVoid) {
            var start = "<".concat(tag);
            var strAttrs = Object.keys(attrs).sort().map(function (name) {
              return " ".concat(name, "=").concat(attrs[name]);
            }).join('');
            var end = isVoid ? '/>' : "></".concat(tag, ">");
            return start + strAttrs + end;
          }
        }, {
          key: "_hashClosingTag",
          value: function _hashClosingTag(tag) {
            return this._hashTag("/".concat(tag), {}, false);
          }
        }, {
          key: "_generateUniqueName",
          value: function _generateUniqueName(base) {
            var seen = this._placeHolderNameCounts.hasOwnProperty(base);

            if (!seen) {
              this._placeHolderNameCounts[base] = 1;
              return base;
            }

            var id = this._placeHolderNameCounts[base];
            this._placeHolderNameCounts[base] = id + 1;
            return "".concat(base, "_").concat(id);
          }
        }]);

        return PlaceholderRegistry;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _expParser = new Parser$1(new Lexer());
      /**
       * Returns a function converting html nodes to an i18n Message given an interpolationConfig
       */


      function createI18nMessageFactory(interpolationConfig) {
        var visitor = new _I18nVisitor(_expParser, interpolationConfig);
        return function (nodes, meaning, description, customId, visitNodeFn) {
          return visitor.toI18nMessage(nodes, meaning, description, customId, visitNodeFn);
        };
      }

      function noopVisitNodeFn(_html, i18n) {
        return i18n;
      }

      var _I18nVisitor = /*#__PURE__*/function () {
        function _I18nVisitor(_expressionParser, _interpolationConfig) {
          _classCallCheck(this, _I18nVisitor);

          this._expressionParser = _expressionParser;
          this._interpolationConfig = _interpolationConfig;
        }

        _createClass2(_I18nVisitor, [{
          key: "toI18nMessage",
          value: function toI18nMessage(nodes) {
            var meaning = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
            var description = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
            var customId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
            var visitNodeFn = arguments.length > 4 ? arguments[4] : undefined;
            var context = {
              isIcu: nodes.length == 1 && nodes[0] instanceof Expansion,
              icuDepth: 0,
              placeholderRegistry: new PlaceholderRegistry(),
              placeholderToContent: {},
              placeholderToMessage: {},
              visitNodeFn: visitNodeFn || noopVisitNodeFn
            };
            var i18nodes = visitAll$1(this, nodes, context);
            return new Message(i18nodes, context.placeholderToContent, context.placeholderToMessage, meaning, description, customId);
          }
        }, {
          key: "visitElement",
          value: function visitElement(el, context) {
            var _a;

            var children = visitAll$1(this, el.children, context);
            var attrs = {};
            el.attrs.forEach(function (attr) {
              // Do not visit the attributes, translatable ones are top-level ASTs
              attrs[attr.name] = attr.value;
            });
            var isVoid = getHtmlTagDefinition(el.name).isVoid;
            var startPhName = context.placeholderRegistry.getStartTagPlaceholderName(el.name, attrs, isVoid);
            context.placeholderToContent[startPhName] = {
              text: el.startSourceSpan.toString(),
              sourceSpan: el.startSourceSpan
            };
            var closePhName = '';

            if (!isVoid) {
              closePhName = context.placeholderRegistry.getCloseTagPlaceholderName(el.name);
              context.placeholderToContent[closePhName] = {
                text: "</".concat(el.name, ">"),
                sourceSpan: (_a = el.endSourceSpan) !== null && _a !== void 0 ? _a : el.sourceSpan
              };
            }

            var node = new TagPlaceholder(el.name, attrs, startPhName, closePhName, children, isVoid, el.sourceSpan, el.startSourceSpan, el.endSourceSpan);
            return context.visitNodeFn(el, node);
          }
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute, context) {
            var node = this._visitTextWithInterpolation(attribute.value, attribute.valueSpan || attribute.sourceSpan, context, attribute.i18n);

            return context.visitNodeFn(attribute, node);
          }
        }, {
          key: "visitText",
          value: function visitText(text, context) {
            var node = this._visitTextWithInterpolation(text.value, text.sourceSpan, context, text.i18n);

            return context.visitNodeFn(text, node);
          }
        }, {
          key: "visitComment",
          value: function visitComment(comment, context) {
            return null;
          }
        }, {
          key: "visitExpansion",
          value: function visitExpansion(icu, context) {
            var _this174 = this;

            context.icuDepth++;
            var i18nIcuCases = {};
            var i18nIcu = new Icu$1(icu.switchValue, icu.type, i18nIcuCases, icu.sourceSpan);
            icu.cases.forEach(function (caze) {
              i18nIcuCases[caze.value] = new Container(caze.expression.map(function (node) {
                return node.visit(_this174, context);
              }), caze.expSourceSpan);
            });
            context.icuDepth--;

            if (context.isIcu || context.icuDepth > 0) {
              // Returns an ICU node when:
              // - the message (vs a part of the message) is an ICU message, or
              // - the ICU message is nested.
              var expPh = context.placeholderRegistry.getUniquePlaceholder("VAR_".concat(icu.type));
              i18nIcu.expressionPlaceholder = expPh;
              context.placeholderToContent[expPh] = {
                text: icu.switchValue,
                sourceSpan: icu.switchValueSourceSpan
              };
              return context.visitNodeFn(icu, i18nIcu);
            } // Else returns a placeholder
            // ICU placeholders should not be replaced with their original content but with the their
            // translations.
            // TODO(vicb): add a html.Node -> i18n.Message cache to avoid having to re-create the msg


            var phName = context.placeholderRegistry.getPlaceholderName('ICU', icu.sourceSpan.toString());
            context.placeholderToMessage[phName] = this.toI18nMessage([icu], '', '', '', undefined);
            var node = new IcuPlaceholder(i18nIcu, phName, icu.sourceSpan);
            return context.visitNodeFn(icu, node);
          }
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(_icuCase, _context) {
            throw new Error('Unreachable code');
          }
          /**
           * Split the, potentially interpolated, text up into text and placeholder pieces.
           *
           * @param text The potentially interpolated string to be split.
           * @param sourceSpan The span of the whole of the `text` string.
           * @param context The current context of the visitor, used to compute and store placeholders.
           * @param previousI18n Any i18n metadata associated with this `text` from a previous pass.
           */

        }, {
          key: "_visitTextWithInterpolation",
          value: function _visitTextWithInterpolation(text, sourceSpan, context, previousI18n) {
            var _this$_expressionPars = this._expressionParser.splitInterpolation(text, sourceSpan.start.toString(), this._interpolationConfig),
                strings = _this$_expressionPars.strings,
                expressions = _this$_expressionPars.expressions; // No expressions, return a single text.


            if (expressions.length === 0) {
              return new Text$1(text, sourceSpan);
            } // Return a sequence of `Text` and `Placeholder` nodes grouped in a `Container`.


            var nodes = [];

            for (var i = 0; i < strings.length - 1; i++) {
              this._addText(nodes, strings[i], sourceSpan);

              this._addPlaceholder(nodes, context, expressions[i], sourceSpan);
            } // The last index contains no expression


            this._addText(nodes, strings[strings.length - 1], sourceSpan); // Whitespace removal may have invalidated the interpolation source-spans.


            reusePreviousSourceSpans(nodes, previousI18n);
            return new Container(nodes, sourceSpan);
          }
          /**
           * Create a new `Text` node from the `textPiece` and add it to the `nodes` collection.
           *
           * @param nodes The nodes to which the created `Text` node should be added.
           * @param textPiece The text and relative span information for this `Text` node.
           * @param interpolationSpan The span of the whole interpolated text.
           */

        }, {
          key: "_addText",
          value: function _addText(nodes, textPiece, interpolationSpan) {
            if (textPiece.text.length > 0) {
              // No need to add empty strings
              var stringSpan = getOffsetSourceSpan(interpolationSpan, textPiece);
              nodes.push(new Text$1(textPiece.text, stringSpan));
            }
          }
          /**
           * Create a new `Placeholder` node from the `expression` and add it to the `nodes` collection.
           *
           * @param nodes The nodes to which the created `Text` node should be added.
           * @param context The current context of the visitor, used to compute and store placeholders.
           * @param expression The expression text and relative span information for this `Placeholder`
           *     node.
           * @param interpolationSpan The span of the whole interpolated text.
           */

        }, {
          key: "_addPlaceholder",
          value: function _addPlaceholder(nodes, context, expression, interpolationSpan) {
            var sourceSpan = getOffsetSourceSpan(interpolationSpan, expression);
            var baseName = extractPlaceholderName(expression.text) || 'INTERPOLATION';
            var phName = context.placeholderRegistry.getPlaceholderName(baseName, expression.text);
            var text = this._interpolationConfig.start + expression.text + this._interpolationConfig.end;
            context.placeholderToContent[phName] = {
              text: text,
              sourceSpan: sourceSpan
            };
            nodes.push(new Placeholder(expression.text, phName, sourceSpan));
          }
        }]);

        return _I18nVisitor;
      }();
      /**
       * Re-use the source-spans from `previousI18n` metadata for the `nodes`.
       *
       * Whitespace removal can invalidate the source-spans of interpolation nodes, so we
       * reuse the source-span stored from a previous pass before the whitespace was removed.
       *
       * @param nodes The `Text` and `Placeholder` nodes to be processed.
       * @param previousI18n Any i18n metadata for these `nodes` stored from a previous pass.
       */


      function reusePreviousSourceSpans(nodes, previousI18n) {
        if (previousI18n instanceof Message) {
          // The `previousI18n` is an i18n `Message`, so we are processing an `Attribute` with i18n
          // metadata. The `Message` should consist only of a single `Container` that contains the
          // parts (`Text` and `Placeholder`) to process.
          assertSingleContainerMessage(previousI18n);
          previousI18n = previousI18n.nodes[0];
        }

        if (previousI18n instanceof Container) {
          // The `previousI18n` is a `Container`, which means that this is a second i18n extraction pass
          // after whitespace has been removed from the AST ndoes.
          assertEquivalentNodes(previousI18n.children, nodes); // Reuse the source-spans from the first pass.

          for (var i = 0; i < nodes.length; i++) {
            nodes[i].sourceSpan = previousI18n.children[i].sourceSpan;
          }
        }
      }
      /**
       * Asserts that the `message` contains exactly one `Container` node.
       */


      function assertSingleContainerMessage(message) {
        var nodes = message.nodes;

        if (nodes.length !== 1 || !(nodes[0] instanceof Container)) {
          throw new Error('Unexpected previous i18n message - expected it to consist of only a single `Container` node.');
        }
      }
      /**
       * Asserts that the `previousNodes` and `node` collections have the same number of elements and
       * corresponding elements have the same node type.
       */


      function assertEquivalentNodes(previousNodes, nodes) {
        if (previousNodes.length !== nodes.length) {
          throw new Error('The number of i18n message children changed between first and second pass.');
        }

        if (previousNodes.some(function (node, i) {
          return nodes[i].constructor !== node.constructor;
        })) {
          throw new Error('The types of the i18n message children changed between first and second pass.');
        }
      }
      /**
       * Create a new `ParseSourceSpan` from the `sourceSpan`, offset by the `start` and `end` values.
       */


      function getOffsetSourceSpan(sourceSpan, _ref15) {
        var start = _ref15.start,
            end = _ref15.end;
        return new ParseSourceSpan(sourceSpan.fullStart.moveBy(start), sourceSpan.fullStart.moveBy(end));
      }

      var _CUSTOM_PH_EXP = /\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g;

      function extractPlaceholderName(input) {
        return input.split(_CUSTOM_PH_EXP)[2];
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var setI18nRefs = function setI18nRefs(htmlNode, i18nNode) {
        if (htmlNode instanceof NodeWithI18n) {
          if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
            // This html node represents an ICU but this is a second processing pass, and the legacy id
            // was computed in the previous pass and stored in the `i18n` property as a message.
            // We are about to wipe out that property so capture the previous message to be reused when
            // generating the message for this ICU later. See `_generateI18nMessage()`.
            i18nNode.previousMessage = htmlNode.i18n;
          }

          htmlNode.i18n = i18nNode;
        }

        return i18nNode;
      };
      /**
       * This visitor walks over HTML parse tree and converts information stored in
       * i18n-related attributes ("i18n" and "i18n-*") into i18n meta object that is
       * stored with other element's and attribute's information.
       */


      var I18nMetaVisitor = /*#__PURE__*/function () {
        function I18nMetaVisitor() {
          var interpolationConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_INTERPOLATION_CONFIG;
          var keepI18nAttrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
          var enableI18nLegacyMessageIdFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

          _classCallCheck(this, I18nMetaVisitor);

          this.interpolationConfig = interpolationConfig;
          this.keepI18nAttrs = keepI18nAttrs;
          this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat; // whether visited nodes contain i18n information

          this.hasI18nMeta = false; // i18n message generation factory

          this._createI18nMessage = createI18nMessageFactory(this.interpolationConfig);
        }

        _createClass2(I18nMetaVisitor, [{
          key: "_generateI18nMessage",
          value: function _generateI18nMessage(nodes) {
            var meta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
            var visitNodeFn = arguments.length > 2 ? arguments[2] : undefined;

            var _this$_parseMetadata = this._parseMetadata(meta),
                meaning = _this$_parseMetadata.meaning,
                description = _this$_parseMetadata.description,
                customId = _this$_parseMetadata.customId;

            var message = this._createI18nMessage(nodes, meaning, description, customId, visitNodeFn);

            this._setMessageId(message, meta);

            this._setLegacyIds(message, meta);

            return message;
          }
        }, {
          key: "visitElement",
          value: function visitElement(element) {
            if (hasI18nAttrs(element)) {
              this.hasI18nMeta = true;
              var attrs = [];
              var attrsMeta = {};

              var _iterator15 = _createForOfIteratorHelper(element.attrs),
                  _step15;

              try {
                for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
                  var _attr = _step15.value;

                  if (_attr.name === I18N_ATTR) {
                    // root 'i18n' node attribute
                    var i18n = element.i18n || _attr.value;

                    var message = this._generateI18nMessage(element.children, i18n, setI18nRefs); // do not assign empty i18n meta


                    if (message.nodes.length) {
                      element.i18n = message;
                    }
                  } else if (_attr.name.startsWith(I18N_ATTR_PREFIX)) {
                    // 'i18n-*' attributes
                    var key = _attr.name.slice(I18N_ATTR_PREFIX.length);

                    attrsMeta[key] = _attr.value;
                  } else {
                    // non-i18n attributes
                    attrs.push(_attr);
                  }
                } // set i18n meta for attributes

              } catch (err) {
                _iterator15.e(err);
              } finally {
                _iterator15.f();
              }

              if (Object.keys(attrsMeta).length) {
                var _iterator16 = _createForOfIteratorHelper(attrs),
                    _step16;

                try {
                  for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
                    var attr = _step16.value;
                    var meta = attrsMeta[attr.name]; // do not create translation for empty attributes

                    if (meta !== undefined && attr.value) {
                      attr.i18n = this._generateI18nMessage([attr], attr.i18n || meta);
                    }
                  }
                } catch (err) {
                  _iterator16.e(err);
                } finally {
                  _iterator16.f();
                }
              }

              if (!this.keepI18nAttrs) {
                // update element's attributes,
                // keeping only non-i18n related ones
                element.attrs = attrs;
              }
            }

            visitAll$1(this, element.children, element.i18n);
            return element;
          }
        }, {
          key: "visitExpansion",
          value: function visitExpansion(expansion, currentMessage) {
            var message;
            var meta = expansion.i18n;
            this.hasI18nMeta = true;

            if (meta instanceof IcuPlaceholder) {
              // set ICU placeholder name (e.g. "ICU_1"),
              // generated while processing root element contents,
              // so we can reference it when we output translation
              var name = meta.name;
              message = this._generateI18nMessage([expansion], meta);
              var icu = icuFromI18nMessage(message);
              icu.name = name;
            } else {
              // ICU is a top level message, try to use metadata from container element if provided via
              // `context` argument. Note: context may not be available for standalone ICUs (without
              // wrapping element), so fallback to ICU metadata in this case.
              message = this._generateI18nMessage([expansion], currentMessage || meta);
            }

            expansion.i18n = message;
            return expansion;
          }
        }, {
          key: "visitText",
          value: function visitText(text) {
            return text;
          }
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute) {
            return attribute;
          }
        }, {
          key: "visitComment",
          value: function visitComment(comment) {
            return comment;
          }
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(expansionCase) {
            return expansionCase;
          }
          /**
           * Parse the general form `meta` passed into extract the explicit metadata needed to create a
           * `Message`.
           *
           * There are three possibilities for the `meta` variable
           * 1) a string from an `i18n` template attribute: parse it to extract the metadata values.
           * 2) a `Message` from a previous processing pass: reuse the metadata values in the message.
           * 4) other: ignore this and just process the message metadata as normal
           *
           * @param meta the bucket that holds information about the message
           * @returns the parsed metadata.
           */

        }, {
          key: "_parseMetadata",
          value: function _parseMetadata(meta) {
            return typeof meta === 'string' ? parseI18nMeta(meta) : meta instanceof Message ? meta : {};
          }
          /**
           * Generate (or restore) message id if not specified already.
           */

        }, {
          key: "_setMessageId",
          value: function _setMessageId(message, meta) {
            if (!message.id) {
              message.id = meta instanceof Message && meta.id || decimalDigest(message);
            }
          }
          /**
           * Update the `message` with a `legacyId` if necessary.
           *
           * @param message the message whose legacy id should be set
           * @param meta information about the message being processed
           */

        }, {
          key: "_setLegacyIds",
          value: function _setLegacyIds(message, meta) {
            if (this.enableI18nLegacyMessageIdFormat) {
              message.legacyIds = [computeDigest(message), computeDecimalDigest(message)];
            } else if (typeof meta !== 'string') {
              // This occurs if we are doing the 2nd pass after whitespace removal (see `parseTemplate()` in
              // `packages/compiler/src/render3/view/template.ts`).
              // In that case we want to reuse the legacy message generated in the 1st pass (see
              // `setI18nRefs()`).
              var previousMessage = meta instanceof Message ? meta : meta instanceof IcuPlaceholder ? meta.previousMessage : undefined;
              message.legacyIds = previousMessage ? previousMessage.legacyIds : [];
            }
          }
        }]);

        return I18nMetaVisitor;
      }();
      /** I18n separators for metadata **/


      var I18N_MEANING_SEPARATOR = '|';
      var I18N_ID_SEPARATOR = '@@';
      /**
       * Parses i18n metas like:
       *  - "@@id",
       *  - "description[@@id]",
       *  - "meaning|description[@@id]"
       * and returns an object with parsed output.
       *
       * @param meta String that represents i18n meta
       * @returns Object with id, meaning and description fields
       */

      function parseI18nMeta() {
        var meta = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
        var customId;
        var meaning;
        var description;
        meta = meta.trim();

        if (meta) {
          var idIndex = meta.indexOf(I18N_ID_SEPARATOR);
          var descIndex = meta.indexOf(I18N_MEANING_SEPARATOR);
          var meaningAndDesc;

          var _ref16 = idIndex > -1 ? [meta.slice(0, idIndex), meta.slice(idIndex + 2)] : [meta, ''];

          var _ref17 = _slicedToArray(_ref16, 2);

          meaningAndDesc = _ref17[0];
          customId = _ref17[1];

          var _ref18 = descIndex > -1 ? [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] : ['', meaningAndDesc];

          var _ref19 = _slicedToArray(_ref18, 2);

          meaning = _ref19[0];
          description = _ref19[1];
        }

        return {
          customId: customId,
          meaning: meaning,
          description: description
        };
      } // Converts i18n meta information for a message (id, description, meaning)
      // to a JsDoc statement formatted as expected by the Closure compiler.


      function i18nMetaToJSDoc(meta) {
        var tags = [];

        if (meta.description) {
          tags.push({
            tagName: "desc"
            /* Desc */
            ,
            text: meta.description
          });
        }

        if (meta.meaning) {
          tags.push({
            tagName: "meaning"
            /* Meaning */
            ,
            text: meta.meaning
          });
        }

        return tags.length == 0 ? null : jsDocComment(tags);
      }
      /** Closure uses `goog.getMsg(message)` to lookup translations */


      var GOOG_GET_MSG = 'goog.getMsg';

      function createGoogleGetMsgStatements(variable$1, message, closureVar, params) {
        var messageString = serializeI18nMessageForGetMsg(message);
        var args = [literal(messageString)];

        if (Object.keys(params).length) {
          args.push(mapLiteral(params, true));
        } // /**
        //  * @desc description of message
        //  * @meaning meaning of message
        //  */
        // const MSG_... = goog.getMsg(..);
        // I18N_X = MSG_...;


        var googGetMsgStmt = closureVar.set(variable(GOOG_GET_MSG).callFn(args)).toConstDecl();
        var metaComment = i18nMetaToJSDoc(message);

        if (metaComment !== null) {
          googGetMsgStmt.addLeadingComment(metaComment);
        }

        var i18nAssignmentStmt = new ExpressionStatement(variable$1.set(closureVar));
        return [googGetMsgStmt, i18nAssignmentStmt];
      }
      /**
       * This visitor walks over i18n tree and generates its string representation, including ICUs and
       * placeholders in `{$placeholder}` (for plain messages) or `{PLACEHOLDER}` (inside ICUs) format.
       */


      var GetMsgSerializerVisitor = /*#__PURE__*/function () {
        function GetMsgSerializerVisitor() {
          _classCallCheck(this, GetMsgSerializerVisitor);
        }

        _createClass2(GetMsgSerializerVisitor, [{
          key: "formatPh",
          value: function formatPh(value) {
            return "{$".concat(formatI18nPlaceholderName(value), "}");
          }
        }, {
          key: "visitText",
          value: function visitText(text) {
            return text.value;
          }
        }, {
          key: "visitContainer",
          value: function visitContainer(container) {
            var _this175 = this;

            return container.children.map(function (child) {
              return child.visit(_this175);
            }).join('');
          }
        }, {
          key: "visitIcu",
          value: function visitIcu(icu) {
            return serializeIcuNode(icu);
          }
        }, {
          key: "visitTagPlaceholder",
          value: function visitTagPlaceholder(ph) {
            var _this176 = this;

            return ph.isVoid ? this.formatPh(ph.startName) : "".concat(this.formatPh(ph.startName)).concat(ph.children.map(function (child) {
              return child.visit(_this176);
            }).join('')).concat(this.formatPh(ph.closeName));
          }
        }, {
          key: "visitPlaceholder",
          value: function visitPlaceholder(ph) {
            return this.formatPh(ph.name);
          }
        }, {
          key: "visitIcuPlaceholder",
          value: function visitIcuPlaceholder(ph, context) {
            return this.formatPh(ph.name);
          }
        }]);

        return GetMsgSerializerVisitor;
      }();

      var serializerVisitor$1 = new GetMsgSerializerVisitor();

      function serializeI18nMessageForGetMsg(message) {
        return message.nodes.map(function (node) {
          return node.visit(serializerVisitor$1, null);
        }).join('');
      }

      function createLocalizeStatements(variable, message, params) {
        var _serializeI18nMessage = serializeI18nMessageForLocalize(message),
            messageParts = _serializeI18nMessage.messageParts,
            placeHolders = _serializeI18nMessage.placeHolders;

        var sourceSpan = getSourceSpan(message);
        var expressions = placeHolders.map(function (ph) {
          return params[ph.text];
        });
        var localizedString$1 = localizedString(message, messageParts, placeHolders, expressions, sourceSpan);
        var variableInitialization = variable.set(localizedString$1);
        return [new ExpressionStatement(variableInitialization)];
      }
      /**
       * This visitor walks over an i18n tree, capturing literal strings and placeholders.
       *
       * The result can be used for generating the `$localize` tagged template literals.
       */


      var LocalizeSerializerVisitor = /*#__PURE__*/function () {
        function LocalizeSerializerVisitor() {
          _classCallCheck(this, LocalizeSerializerVisitor);
        }

        _createClass2(LocalizeSerializerVisitor, [{
          key: "visitText",
          value: function visitText(text, context) {
            if (context[context.length - 1] instanceof LiteralPiece) {
              // Two literal pieces in a row means that there was some comment node in-between.
              context[context.length - 1].text += text.value;
            } else {
              context.push(new LiteralPiece(text.value, text.sourceSpan));
            }
          }
        }, {
          key: "visitContainer",
          value: function visitContainer(container, context) {
            var _this177 = this;

            container.children.forEach(function (child) {
              return child.visit(_this177, context);
            });
          }
        }, {
          key: "visitIcu",
          value: function visitIcu(icu, context) {
            context.push(new LiteralPiece(serializeIcuNode(icu), icu.sourceSpan));
          }
        }, {
          key: "visitTagPlaceholder",
          value: function visitTagPlaceholder(ph, context) {
            var _this178 = this;

            var _a, _b;

            context.push(this.createPlaceholderPiece(ph.startName, (_a = ph.startSourceSpan) !== null && _a !== void 0 ? _a : ph.sourceSpan));

            if (!ph.isVoid) {
              ph.children.forEach(function (child) {
                return child.visit(_this178, context);
              });
              context.push(this.createPlaceholderPiece(ph.closeName, (_b = ph.endSourceSpan) !== null && _b !== void 0 ? _b : ph.sourceSpan));
            }
          }
        }, {
          key: "visitPlaceholder",
          value: function visitPlaceholder(ph, context) {
            context.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan));
          }
        }, {
          key: "visitIcuPlaceholder",
          value: function visitIcuPlaceholder(ph, context) {
            context.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan));
          }
        }, {
          key: "createPlaceholderPiece",
          value: function createPlaceholderPiece(name, sourceSpan) {
            return new PlaceholderPiece(formatI18nPlaceholderName(name,
            /* useCamelCase */
            false), sourceSpan);
          }
        }]);

        return LocalizeSerializerVisitor;
      }();

      var serializerVisitor$2 = new LocalizeSerializerVisitor();
      /**
       * Serialize an i18n message into two arrays: messageParts and placeholders.
       *
       * These arrays will be used to generate `$localize` tagged template literals.
       *
       * @param message The message to be serialized.
       * @returns an object containing the messageParts and placeholders.
       */

      function serializeI18nMessageForLocalize(message) {
        var pieces = [];
        message.nodes.forEach(function (node) {
          return node.visit(serializerVisitor$2, pieces);
        });
        return processMessagePieces(pieces);
      }

      function getSourceSpan(message) {
        var startNode = message.nodes[0];
        var endNode = message.nodes[message.nodes.length - 1];
        return new ParseSourceSpan(startNode.sourceSpan.start, endNode.sourceSpan.end, startNode.sourceSpan.fullStart, startNode.sourceSpan.details);
      }
      /**
       * Convert the list of serialized MessagePieces into two arrays.
       *
       * One contains the literal string pieces and the other the placeholders that will be replaced by
       * expressions when rendering `$localize` tagged template literals.
       *
       * @param pieces The pieces to process.
       * @returns an object containing the messageParts and placeholders.
       */


      function processMessagePieces(pieces) {
        var messageParts = [];
        var placeHolders = [];

        if (pieces[0] instanceof PlaceholderPiece) {
          // The first piece was a placeholder so we need to add an initial empty message part.
          messageParts.push(createEmptyMessagePart(pieces[0].sourceSpan.start));
        }

        for (var i = 0; i < pieces.length; i++) {
          var part = pieces[i];

          if (part instanceof LiteralPiece) {
            messageParts.push(part);
          } else {
            placeHolders.push(part);

            if (pieces[i - 1] instanceof PlaceholderPiece) {
              // There were two placeholders in a row, so we need to add an empty message part.
              messageParts.push(createEmptyMessagePart(pieces[i - 1].sourceSpan.end));
            }
          }
        }

        if (pieces[pieces.length - 1] instanceof PlaceholderPiece) {
          // The last piece was a placeholder so we need to add a final empty message part.
          messageParts.push(createEmptyMessagePart(pieces[pieces.length - 1].sourceSpan.end));
        }

        return {
          messageParts: messageParts,
          placeHolders: placeHolders
        };
      }

      function createEmptyMessagePart(location) {
        return new LiteralPiece('', new ParseSourceSpan(location, location));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // Selector attribute name of `<ng-content>`


      var NG_CONTENT_SELECT_ATTR$1 = 'select'; // Attribute name of `ngProjectAs`.

      var NG_PROJECT_AS_ATTR_NAME = 'ngProjectAs'; // Global symbols available only inside event bindings.

      var EVENT_BINDING_SCOPE_GLOBALS = new Set(['$event']); // List of supported global targets for event listeners

      var GLOBAL_TARGET_RESOLVERS = new Map([['window', Identifiers$1.resolveWindow], ['document', Identifiers$1.resolveDocument], ['body', Identifiers$1.resolveBody]]);
      var LEADING_TRIVIA_CHARS = [' ', '\n', '\r', '\t']; //  if (rf & flags) { .. }

      function renderFlagCheckIfStmt(flags, statements) {
        return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);
      }

      function prepareEventListenerParameters(eventAst) {
        var handlerName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
        var scope = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
        var type = eventAst.type,
            name = eventAst.name,
            target = eventAst.target,
            phase = eventAst.phase,
            handler = eventAst.handler;

        if (target && !GLOBAL_TARGET_RESOLVERS.has(target)) {
          throw new Error("Unexpected global target '".concat(target, "' defined for '").concat(name, "' event.\n        Supported list of global targets: ").concat(Array.from(GLOBAL_TARGET_RESOLVERS.keys()), "."));
        }

        var eventArgumentName = '$event';
        var implicitReceiverAccesses = new Set();
        var implicitReceiverExpr = scope === null || scope.bindingLevel === 0 ? variable(CONTEXT_NAME) : scope.getOrCreateSharedContextVar(0);
        var bindingExpr = convertActionBinding(scope, implicitReceiverExpr, handler, 'b', function () {
          return error('Unexpected interpolation');
        }, eventAst.handlerSpan, implicitReceiverAccesses, EVENT_BINDING_SCOPE_GLOBALS);
        var statements = [];

        if (scope) {
          statements.push.apply(statements, _toConsumableArray(scope.restoreViewStatement()));
          statements.push.apply(statements, _toConsumableArray(scope.variableDeclarations()));
        }

        statements.push.apply(statements, _toConsumableArray(bindingExpr.render3Stmts));
        var eventName = type === 1
        /* Animation */
        ? prepareSyntheticListenerName(name, phase) : name;
        var fnName = handlerName && sanitizeIdentifier(handlerName);
        var fnArgs = [];

        if (implicitReceiverAccesses.has(eventArgumentName)) {
          fnArgs.push(new FnParam(eventArgumentName, DYNAMIC_TYPE));
        }

        var handlerFn = fn(fnArgs, statements, INFERRED_TYPE, null, fnName);
        var params = [literal(eventName), handlerFn];

        if (target) {
          params.push(literal(false), // `useCapture` flag, defaults to `false`
          importExpr(GLOBAL_TARGET_RESOLVERS.get(target)));
        }

        return params;
      }

      function createComponentDefConsts() {
        return {
          prepareStatements: [],
          constExpressions: []
        };
      }

      var TemplateDefinitionBuilder = /*#__PURE__*/function () {
        function TemplateDefinitionBuilder(constantPool, parentBindingScope) {
          var _this179 = this;

          var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
          var contextName = arguments.length > 3 ? arguments[3] : undefined;
          var i18nContext = arguments.length > 4 ? arguments[4] : undefined;
          var templateIndex = arguments.length > 5 ? arguments[5] : undefined;
          var templateName = arguments.length > 6 ? arguments[6] : undefined;
          var directiveMatcher = arguments.length > 7 ? arguments[7] : undefined;
          var directives = arguments.length > 8 ? arguments[8] : undefined;
          var pipeTypeByName = arguments.length > 9 ? arguments[9] : undefined;
          var pipes = arguments.length > 10 ? arguments[10] : undefined;

          var _namespace = arguments.length > 11 ? arguments[11] : undefined;

          var relativeContextFilePath = arguments.length > 12 ? arguments[12] : undefined;
          var i18nUseExternalIds = arguments.length > 13 ? arguments[13] : undefined;

          var _constants = arguments.length > 14 && arguments[14] !== undefined ? arguments[14] : createComponentDefConsts();

          _classCallCheck(this, TemplateDefinitionBuilder);

          this.constantPool = constantPool;
          this.level = level;
          this.contextName = contextName;
          this.i18nContext = i18nContext;
          this.templateIndex = templateIndex;
          this.templateName = templateName;
          this.directiveMatcher = directiveMatcher;
          this.directives = directives;
          this.pipeTypeByName = pipeTypeByName;
          this.pipes = pipes;
          this._namespace = _namespace;
          this.i18nUseExternalIds = i18nUseExternalIds;
          this._constants = _constants;
          this._dataIndex = 0;
          this._bindingContext = 0;
          this._prefixCode = [];
          /**
           * List of callbacks to generate creation mode instructions. We store them here as we process
           * the template so bindings in listeners are resolved only once all nodes have been visited.
           * This ensures all local refs and context variables are available for matching.
           */

          this._creationCodeFns = [];
          /**
           * List of callbacks to generate update mode instructions. We store them here as we process
           * the template so bindings are resolved only once all nodes have been visited. This ensures
           * all local refs and context variables are available for matching.
           */

          this._updateCodeFns = [];
          /** Index of the currently-selected node. */

          this._currentIndex = 0;
          /** Temporary variable declarations generated from visiting pipes, literals, etc. */

          this._tempVariables = [];
          /**
           * List of callbacks to build nested templates. Nested templates must not be visited until
           * after the parent template has finished visiting all of its nodes. This ensures that all
           * local ref bindings in nested templates are able to find local ref values if the refs
           * are defined after the template declaration.
           */

          this._nestedTemplateFns = [];
          this._unsupported = unsupported; // i18n context local to this template

          this.i18n = null; // Number of slots to reserve for pureFunctions

          this._pureFunctionSlots = 0; // Number of binding slots

          this._bindingSlots = 0; // Projection slots found in the template. Projection slots can distribute projected
          // nodes based on a selector, or can just use the wildcard selector to match
          // all nodes which aren't matching any selector.

          this._ngContentReservedSlots = []; // Number of non-default selectors found in all parent templates of this template. We need to
          // track it to properly adjust projection slot index in the `projection` instruction.

          this._ngContentSelectorsOffset = 0; // Expression that should be used as implicit receiver when converting template
          // expressions to output AST.

          this._implicitReceiverExpr = null; // These should be handled in the template or element directly.

          this.visitReference = invalid$1;
          this.visitVariable = invalid$1;
          this.visitTextAttribute = invalid$1;
          this.visitBoundAttribute = invalid$1;
          this.visitBoundEvent = invalid$1;
          this._bindingScope = parentBindingScope.nestedScope(level); // Turn the relative context file path into an identifier by replacing non-alphanumeric
          // characters with underscores.

          this.fileBasedI18nSuffix = relativeContextFilePath.replace(/[^A-Za-z0-9]/g, '_') + '_';
          this._valueConverter = new ValueConverter(constantPool, function () {
            return _this179.allocateDataSlot();
          }, function (numSlots) {
            return _this179.allocatePureFunctionSlots(numSlots);
          }, function (name, localName, slot, value) {
            var pipeType = pipeTypeByName.get(name);

            if (pipeType) {
              _this179.pipes.add(pipeType);
            }

            _this179._bindingScope.set(_this179.level, localName, value);

            _this179.creationInstruction(null, Identifiers$1.pipe, [literal(slot), literal(name)]);
          });
        }

        _createClass2(TemplateDefinitionBuilder, [{
          key: "buildTemplateFunction",
          value: function buildTemplateFunction(nodes, variables) {
            var _this180 = this;

            var ngContentSelectorsOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
            var i18n = arguments.length > 3 ? arguments[3] : undefined;
            this._ngContentSelectorsOffset = ngContentSelectorsOffset;

            if (this._namespace !== Identifiers$1.namespaceHTML) {
              this.creationInstruction(null, this._namespace);
            } // Create variable bindings


            variables.forEach(function (v) {
              return _this180.registerContextVariables(v);
            }); // Initiate i18n context in case:
            // - this template has parent i18n context
            // - or the template has i18n meta associated with it,
            //   but it's not initiated by the Element (e.g. <ng-template i18n>)

            var initI18nContext = this.i18nContext || isI18nRootNode(i18n) && !isSingleI18nIcu(i18n) && !(isSingleElementTemplate(nodes) && nodes[0].i18n === i18n);
            var selfClosingI18nInstruction = hasTextChildrenOnly(nodes);

            if (initI18nContext) {
              this.i18nStart(null, i18n, selfClosingI18nInstruction);
            } // This is the initial pass through the nodes of this template. In this pass, we
            // queue all creation mode and update mode instructions for generation in the second
            // pass. It's necessary to separate the passes to ensure local refs are defined before
            // resolving bindings. We also count bindings in this pass as we walk bound expressions.


            visitAll(this, nodes); // Add total binding count to pure function count so pure function instructions are
            // generated with the correct slot offset when update instructions are processed.

            this._pureFunctionSlots += this._bindingSlots; // Pipes are walked in the first pass (to enqueue `pipe()` creation instructions and
            // `pipeBind` update instructions), so we have to update the slot offsets manually
            // to account for bindings.

            this._valueConverter.updatePipeSlotOffsets(this._bindingSlots); // Nested templates must be processed before creation instructions so template()
            // instructions can be generated with the correct internal const count.


            this._nestedTemplateFns.forEach(function (buildTemplateFn) {
              return buildTemplateFn();
            }); // Output the `projectionDef` instruction when some `<ng-content>` tags are present.
            // The `projectionDef` instruction is only emitted for the component template and
            // is skipped for nested templates (<ng-template> tags).


            if (this.level === 0 && this._ngContentReservedSlots.length) {
              var parameters = []; // By default the `projectionDef` instructions creates one slot for the wildcard
              // selector if no parameters are passed. Therefore we only want to allocate a new
              // array for the projection slots if the default projection slot is not sufficient.

              if (this._ngContentReservedSlots.length > 1 || this._ngContentReservedSlots[0] !== '*') {
                var r3ReservedSlots = this._ngContentReservedSlots.map(function (s) {
                  return s !== '*' ? parseSelectorToR3Selector(s) : s;
                });

                parameters.push(this.constantPool.getConstLiteral(asLiteral(r3ReservedSlots), true));
              } // Since we accumulate ngContent selectors while processing template elements,
              // we *prepend* `projectionDef` to creation instructions block, to put it before
              // any `projection` instructions


              this.creationInstruction(null, Identifiers$1.projectionDef, parameters,
              /* prepend */
              true);
            }

            if (initI18nContext) {
              this.i18nEnd(null, selfClosingI18nInstruction);
            } // Generate all the creation mode instructions (e.g. resolve bindings in listeners)


            var creationStatements = this._creationCodeFns.map(function (fn) {
              return fn();
            }); // Generate all the update mode instructions (e.g. resolve property or text bindings)


            var updateStatements = this._updateCodeFns.map(function (fn) {
              return fn();
            }); //  Variable declaration must occur after binding resolution so we can generate context
            //  instructions that build on each other.
            // e.g. const b = nextContext().$implicit(); const b = nextContext();


            var creationVariables = this._bindingScope.viewSnapshotStatements();

            var updateVariables = this._bindingScope.variableDeclarations().concat(this._tempVariables);

            var creationBlock = creationStatements.length > 0 ? [renderFlagCheckIfStmt(1
            /* Create */
            , creationVariables.concat(creationStatements))] : [];
            var updateBlock = updateStatements.length > 0 ? [renderFlagCheckIfStmt(2
            /* Update */
            , updateVariables.concat(updateStatements))] : [];
            return fn( // i.e. (rf: RenderFlags, ctx: any)
            [new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [].concat(_toConsumableArray(this._prefixCode), creationBlock, updateBlock), INFERRED_TYPE, null, this.templateName);
          } // LocalResolver

        }, {
          key: "getLocal",
          value: function getLocal(name) {
            return this._bindingScope.get(name);
          } // LocalResolver

        }, {
          key: "notifyImplicitReceiverUse",
          value: function notifyImplicitReceiverUse() {
            this._bindingScope.notifyImplicitReceiverUse();
          }
        }, {
          key: "i18nTranslate",
          value: function i18nTranslate(message) {
            var _this$_constants$prep;

            var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
            var ref = arguments.length > 2 ? arguments[2] : undefined;
            var transformFn = arguments.length > 3 ? arguments[3] : undefined;

            var _ref = ref || this.i18nGenerateMainBlockVar(); // Closure Compiler requires const names to start with `MSG_` but disallows any other const to
            // start with `MSG_`. We define a variable starting with `MSG_` just for the `goog.getMsg` call


            var closureVar = this.i18nGenerateClosureVar(message.id);
            var statements = getTranslationDeclStmts(message, _ref, closureVar, params, transformFn);

            (_this$_constants$prep = this._constants.prepareStatements).push.apply(_this$_constants$prep, _toConsumableArray(statements));

            return _ref;
          }
        }, {
          key: "registerContextVariables",
          value: function registerContextVariables(variable$1) {
            var scopedName = this._bindingScope.freshReferenceName();

            var retrievalLevel = this.level;
            var lhs = variable(variable$1.name + scopedName);

            this._bindingScope.set(retrievalLevel, variable$1.name, lhs, 1
            /* CONTEXT */
            , function (scope, relativeLevel) {
              var rhs;

              if (scope.bindingLevel === retrievalLevel) {
                // e.g. ctx
                rhs = variable(CONTEXT_NAME);
              } else {
                var sharedCtxVar = scope.getSharedContextName(retrievalLevel); // e.g. ctx_r0   OR  x(2);

                rhs = sharedCtxVar ? sharedCtxVar : generateNextContextExpr(relativeLevel);
              } // e.g. const $item$ = x(2).$implicit;


              return [lhs.set(rhs.prop(variable$1.value || IMPLICIT_REFERENCE)).toConstDecl()];
            });
          }
        }, {
          key: "i18nAppendBindings",
          value: function i18nAppendBindings(expressions) {
            var _this181 = this;

            if (expressions.length > 0) {
              expressions.forEach(function (expression) {
                return _this181.i18n.appendBinding(expression);
              });
            }
          }
        }, {
          key: "i18nBindProps",
          value: function i18nBindProps(props) {
            var _this182 = this;

            var bound = {};
            Object.keys(props).forEach(function (key) {
              var prop = props[key];

              if (prop instanceof Text) {
                bound[key] = literal(prop.value);
              } else {
                var value = prop.value.visit(_this182._valueConverter);

                _this182.allocateBindingSlots(value);

                if (value instanceof Interpolation) {
                  var strings = value.strings,
                      expressions = value.expressions;
                  var _this182$i18n = _this182.i18n,
                      id = _this182$i18n.id,
                      bindings = _this182$i18n.bindings;
                  var label = assembleI18nBoundString(strings, bindings.size, id);

                  _this182.i18nAppendBindings(expressions);

                  bound[key] = literal(label);
                }
              }
            });
            return bound;
          } // Generates top level vars for i18n blocks (i.e. `i18n_N`).

        }, {
          key: "i18nGenerateMainBlockVar",
          value: function i18nGenerateMainBlockVar() {
            return variable(this.constantPool.uniqueName(TRANSLATION_VAR_PREFIX));
          } // Generates vars with Closure-specific names for i18n blocks (i.e. `MSG_XXX`).

        }, {
          key: "i18nGenerateClosureVar",
          value: function i18nGenerateClosureVar(messageId) {
            var name;
            var suffix = this.fileBasedI18nSuffix.toUpperCase();

            if (this.i18nUseExternalIds) {
              var prefix = getTranslationConstPrefix("EXTERNAL_");
              var uniqueSuffix = this.constantPool.uniqueName(suffix);
              name = "".concat(prefix).concat(sanitizeIdentifier(messageId), "$$").concat(uniqueSuffix);
            } else {
              var _prefix = getTranslationConstPrefix(suffix);

              name = this.constantPool.uniqueName(_prefix);
            }

            return variable(name);
          }
        }, {
          key: "i18nUpdateRef",
          value: function i18nUpdateRef(context) {
            var icus = context.icus,
                meta = context.meta,
                isRoot = context.isRoot,
                isResolved = context.isResolved,
                isEmitted = context.isEmitted;

            if (isRoot && isResolved && !isEmitted && !isSingleI18nIcu(meta)) {
              context.isEmitted = true;
              var placeholders = context.getSerializedPlaceholders();
              var icuMapping = {};
              var params = placeholders.size ? placeholdersToParams(placeholders) : {};

              if (icus.size) {
                icus.forEach(function (refs, key) {
                  if (refs.length === 1) {
                    // if we have one ICU defined for a given
                    // placeholder - just output its reference
                    params[key] = refs[0];
                  } else {
                    // ... otherwise we need to activate post-processing
                    // to replace ICU placeholders with proper values
                    var placeholder = wrapI18nPlaceholder("".concat(I18N_ICU_MAPPING_PREFIX).concat(key));
                    params[key] = literal(placeholder);
                    icuMapping[key] = literalArr(refs);
                  }
                });
              } // translation requires post processing in 2 cases:
              // - if we have placeholders with multiple values (ex. `START_DIV`: [�#1�, �#2�, ...])
              // - if we have multiple ICUs that refer to the same placeholder name


              var needsPostprocessing = Array.from(placeholders.values()).some(function (value) {
                return value.length > 1;
              }) || Object.keys(icuMapping).length;
              var transformFn;

              if (needsPostprocessing) {
                transformFn = function transformFn(raw) {
                  var args = [raw];

                  if (Object.keys(icuMapping).length) {
                    args.push(mapLiteral(icuMapping, true));
                  }

                  return instruction(null, Identifiers$1.i18nPostprocess, args);
                };
              }

              this.i18nTranslate(meta, params, context.ref, transformFn);
            }
          }
        }, {
          key: "i18nStart",
          value: function i18nStart() {
            var span = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
            var meta = arguments.length > 1 ? arguments[1] : undefined;
            var selfClosing = arguments.length > 2 ? arguments[2] : undefined;
            var index = this.allocateDataSlot();
            this.i18n = this.i18nContext ? this.i18nContext.forkChildContext(index, this.templateIndex, meta) : new I18nContext(index, this.i18nGenerateMainBlockVar(), 0, this.templateIndex, meta); // generate i18nStart instruction

            var _this$i18n = this.i18n,
                id = _this$i18n.id,
                ref = _this$i18n.ref;
            var params = [literal(index), this.addToConsts(ref)];

            if (id > 0) {
              // do not push 3rd argument (sub-block id)
              // into i18nStart call for top level i18n context
              params.push(literal(id));
            }

            this.creationInstruction(span, selfClosing ? Identifiers$1.i18n : Identifiers$1.i18nStart, params);
          }
        }, {
          key: "i18nEnd",
          value: function i18nEnd() {
            var _this183 = this;

            var span = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
            var selfClosing = arguments.length > 1 ? arguments[1] : undefined;

            if (!this.i18n) {
              throw new Error('i18nEnd is executed with no i18n context present');
            }

            if (this.i18nContext) {
              this.i18nContext.reconcileChildContext(this.i18n);
              this.i18nUpdateRef(this.i18nContext);
            } else {
              this.i18nUpdateRef(this.i18n);
            } // setup accumulated bindings


            var _this$i18n2 = this.i18n,
                index = _this$i18n2.index,
                bindings = _this$i18n2.bindings;

            if (bindings.size) {
              var chainBindings = [];
              bindings.forEach(function (binding) {
                chainBindings.push({
                  sourceSpan: span,
                  value: function value() {
                    return _this183.convertPropertyBinding(binding);
                  }
                });
              }); // for i18n block, advance to the most recent element index (by taking the current number of
              // elements and subtracting one) before invoking `i18nExp` instructions, to make sure the
              // necessary lifecycle hooks of components/directives are properly flushed.

              this.updateInstructionChainWithAdvance(this.getConstCount() - 1, Identifiers$1.i18nExp, chainBindings);
              this.updateInstruction(span, Identifiers$1.i18nApply, [literal(index)]);
            }

            if (!selfClosing) {
              this.creationInstruction(span, Identifiers$1.i18nEnd);
            }

            this.i18n = null; // reset local i18n context
          }
        }, {
          key: "i18nAttributesInstruction",
          value: function i18nAttributesInstruction(nodeIndex, attrs, sourceSpan) {
            var _this184 = this;

            var hasBindings = false;
            var i18nAttrArgs = [];
            var bindings = [];
            attrs.forEach(function (attr) {
              var message = attr.i18n;
              var converted = attr.value.visit(_this184._valueConverter);

              _this184.allocateBindingSlots(converted);

              if (converted instanceof Interpolation) {
                var placeholders = assembleBoundTextPlaceholders(message);
                var params = placeholdersToParams(placeholders);
                i18nAttrArgs.push(literal(attr.name), _this184.i18nTranslate(message, params));
                converted.expressions.forEach(function (expression) {
                  hasBindings = true;
                  bindings.push({
                    sourceSpan: sourceSpan,
                    value: function value() {
                      return _this184.convertPropertyBinding(expression);
                    }
                  });
                });
              }
            });

            if (bindings.length > 0) {
              this.updateInstructionChainWithAdvance(nodeIndex, Identifiers$1.i18nExp, bindings);
            }

            if (i18nAttrArgs.length > 0) {
              var index = literal(this.allocateDataSlot());
              var constIndex = this.addToConsts(literalArr(i18nAttrArgs));
              this.creationInstruction(sourceSpan, Identifiers$1.i18nAttributes, [index, constIndex]);

              if (hasBindings) {
                this.updateInstruction(sourceSpan, Identifiers$1.i18nApply, [index]);
              }
            }
          }
        }, {
          key: "getNamespaceInstruction",
          value: function getNamespaceInstruction(namespaceKey) {
            switch (namespaceKey) {
              case 'math':
                return Identifiers$1.namespaceMathML;

              case 'svg':
                return Identifiers$1.namespaceSVG;

              default:
                return Identifiers$1.namespaceHTML;
            }
          }
        }, {
          key: "addNamespaceInstruction",
          value: function addNamespaceInstruction(nsInstruction, element) {
            this._namespace = nsInstruction;
            this.creationInstruction(element.startSourceSpan, nsInstruction);
          }
          /**
           * Adds an update instruction for an interpolated property or attribute, such as
           * `prop="{{value}}"` or `attr.title="{{value}}"`
           */

        }, {
          key: "interpolatedUpdateInstruction",
          value: function interpolatedUpdateInstruction(instruction, elementIndex, attrName, input, value, params) {
            var _this185 = this;

            this.updateInstructionWithAdvance(elementIndex, input.sourceSpan, instruction, function () {
              return [literal(attrName)].concat(_toConsumableArray(_this185.getUpdateInstructionArguments(value)), _toConsumableArray(params));
            });
          }
        }, {
          key: "visitContent",
          value: function visitContent(ngContent) {
            var slot = this.allocateDataSlot();
            var projectionSlotIdx = this._ngContentSelectorsOffset + this._ngContentReservedSlots.length;
            var parameters = [literal(slot)];

            this._ngContentReservedSlots.push(ngContent.selector);

            var nonContentSelectAttributes = ngContent.attributes.filter(function (attr) {
              return attr.name.toLowerCase() !== NG_CONTENT_SELECT_ATTR$1;
            });
            var attributes = this.getAttributeExpressions(ngContent.name, nonContentSelectAttributes, [], []);

            if (attributes.length > 0) {
              parameters.push(literal(projectionSlotIdx), literalArr(attributes));
            } else if (projectionSlotIdx !== 0) {
              parameters.push(literal(projectionSlotIdx));
            }

            this.creationInstruction(ngContent.sourceSpan, Identifiers$1.projection, parameters);

            if (this.i18n) {
              this.i18n.appendProjection(ngContent.i18n, slot);
            }
          }
        }, {
          key: "visitElement",
          value: function visitElement(element) {
            var _this186 = this;

            var _a, _b;

            var elementIndex = this.allocateDataSlot();
            var stylingBuilder = new StylingBuilder(null);
            var isNonBindableMode = false;
            var isI18nRootElement = isI18nRootNode(element.i18n) && !isSingleI18nIcu(element.i18n);
            var outputAttrs = [];

            var _splitNsName = splitNsName(element.name),
                _splitNsName2 = _slicedToArray(_splitNsName, 2),
                namespaceKey = _splitNsName2[0],
                elementName = _splitNsName2[1];

            var isNgContainer$1 = isNgContainer(element.name); // Handle styling, i18n, ngNonBindable attributes

            var _iterator17 = _createForOfIteratorHelper(element.attributes),
                _step17;

            try {
              for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
                var attr = _step17.value;
                var name = attr.name,
                    value = attr.value;

                if (name === NON_BINDABLE_ATTR) {
                  isNonBindableMode = true;
                } else if (name === 'style') {
                  stylingBuilder.registerStyleAttr(value);
                } else if (name === 'class') {
                  stylingBuilder.registerClassAttr(value);
                } else {
                  outputAttrs.push(attr);
                }
              } // Match directives on non i18n attributes

            } catch (err) {
              _iterator17.e(err);
            } finally {
              _iterator17.f();
            }

            this.matchDirectives(element.name, element); // Regular element or ng-container creation mode

            var parameters = [literal(elementIndex)];

            if (!isNgContainer$1) {
              parameters.push(literal(elementName));
            } // Add the attributes


            var allOtherInputs = [];
            var boundI18nAttrs = [];
            element.inputs.forEach(function (input) {
              var stylingInputWasSet = stylingBuilder.registerBoundInput(input);

              if (!stylingInputWasSet) {
                if (input.type === 0
                /* Property */
                && input.i18n) {
                  boundI18nAttrs.push(input);
                } else {
                  allOtherInputs.push(input);
                }
              }
            }); // add attributes for directive and projection matching purposes

            var attributes = this.getAttributeExpressions(element.name, outputAttrs, allOtherInputs, element.outputs, stylingBuilder, [], boundI18nAttrs);
            parameters.push(this.addAttrsToConsts(attributes)); // local refs (ex.: <div #foo #bar="baz">)

            var refs = this.prepareRefsArray(element.references);
            parameters.push(this.addToConsts(refs));
            var wasInNamespace = this._namespace;
            var currentNamespace = this.getNamespaceInstruction(namespaceKey); // If the namespace is changing now, include an instruction to change it
            // during element creation.

            if (currentNamespace !== wasInNamespace) {
              this.addNamespaceInstruction(currentNamespace, element);
            }

            if (this.i18n) {
              this.i18n.appendElement(element.i18n, elementIndex);
            } // Note that we do not append text node instructions and ICUs inside i18n section,
            // so we exclude them while calculating whether current element has children


            var hasChildren = !isI18nRootElement && this.i18n ? !hasTextChildrenOnly(element.children) : element.children.length > 0;
            var createSelfClosingInstruction = !stylingBuilder.hasBindingsWithPipes && element.outputs.length === 0 && boundI18nAttrs.length === 0 && !hasChildren;
            var createSelfClosingI18nInstruction = !createSelfClosingInstruction && hasTextChildrenOnly(element.children);

            if (createSelfClosingInstruction) {
              this.creationInstruction(element.sourceSpan, isNgContainer$1 ? Identifiers$1.elementContainer : Identifiers$1.element, trimTrailingNulls(parameters));
            } else {
              this.creationInstruction(element.startSourceSpan, isNgContainer$1 ? Identifiers$1.elementContainerStart : Identifiers$1.elementStart, trimTrailingNulls(parameters));

              if (isNonBindableMode) {
                this.creationInstruction(element.startSourceSpan, Identifiers$1.disableBindings);
              }

              if (boundI18nAttrs.length > 0) {
                this.i18nAttributesInstruction(elementIndex, boundI18nAttrs, (_a = element.startSourceSpan) !== null && _a !== void 0 ? _a : element.sourceSpan);
              } // Generate Listeners (outputs)


              if (element.outputs.length > 0) {
                var listeners = element.outputs.map(function (outputAst) {
                  return {
                    sourceSpan: outputAst.sourceSpan,
                    params: _this186.prepareListenerParameter(element.name, outputAst, elementIndex)
                  };
                });
                this.creationInstructionChain(Identifiers$1.listener, listeners);
              } // Note: it's important to keep i18n/i18nStart instructions after i18nAttributes and
              // listeners, to make sure i18nAttributes instruction targets current element at runtime.


              if (isI18nRootElement) {
                this.i18nStart(element.startSourceSpan, element.i18n, createSelfClosingI18nInstruction);
              }
            } // the code here will collect all update-level styling instructions and add them to the
            // update block of the template function AOT code. Instructions like `styleProp`,
            // `styleMap`, `classMap`, `classProp`
            // are all generated and assigned in the code below.


            var stylingInstructions = stylingBuilder.buildUpdateLevelInstructions(this._valueConverter);
            var limit = stylingInstructions.length - 1;

            for (var i = 0; i <= limit; i++) {
              var _instruction = stylingInstructions[i];
              this._bindingSlots += this.processStylingUpdateInstruction(elementIndex, _instruction);
            } // the reason why `undefined` is used is because the renderer understands this as a
            // special value to symbolize that there is no RHS to this binding
            // TODO (matsko): revisit this once FW-959 is approached


            var emptyValueBindInstruction = literal(undefined);
            var propertyBindings = [];
            var attributeBindings = []; // Generate element input bindings

            allOtherInputs.forEach(function (input) {
              var inputType = input.type;

              if (inputType === 4
              /* Animation */
              ) {
                var _value3 = input.value.visit(_this186._valueConverter); // animation bindings can be presented in the following formats:
                // 1. [@binding]="fooExp"
                // 2. [@binding]="{value:fooExp, params:{...}}"
                // 3. [@binding]
                // 4. @binding
                // All formats will be valid for when a synthetic binding is created.
                // The reasoning for this is because the renderer should get each
                // synthetic binding value in the order of the array that they are
                // defined in...


                var hasValue = _value3 instanceof LiteralPrimitive ? !!_value3.value : true;

                _this186.allocateBindingSlots(_value3);

                propertyBindings.push({
                  name: prepareSyntheticPropertyName(input.name),
                  sourceSpan: input.sourceSpan,
                  value: function value() {
                    return hasValue ? _this186.convertPropertyBinding(_value3) : emptyValueBindInstruction;
                  }
                });
              } else {
                // we must skip attributes with associated i18n context, since these attributes are handled
                // separately and corresponding `i18nExp` and `i18nApply` instructions will be generated
                if (input.i18n) return;

                var _value4 = input.value.visit(_this186._valueConverter);

                if (_value4 !== undefined) {
                  var params = [];

                  var _splitNsName3 = splitNsName(input.name),
                      _splitNsName4 = _slicedToArray(_splitNsName3, 2),
                      attrNamespace = _splitNsName4[0],
                      attrName = _splitNsName4[1];

                  var isAttributeBinding = inputType === 1
                  /* Attribute */
                  ;
                  var sanitizationRef = resolveSanitizationFn(input.securityContext, isAttributeBinding);
                  if (sanitizationRef) params.push(sanitizationRef);

                  if (attrNamespace) {
                    var namespaceLiteral = literal(attrNamespace);

                    if (sanitizationRef) {
                      params.push(namespaceLiteral);
                    } else {
                      // If there wasn't a sanitization ref, we need to add
                      // an extra param so that we can pass in the namespace.
                      params.push(literal(null), namespaceLiteral);
                    }
                  }

                  _this186.allocateBindingSlots(_value4);

                  if (inputType === 0
                  /* Property */
                  ) {
                    if (_value4 instanceof Interpolation) {
                      // prop="{{value}}" and friends
                      _this186.interpolatedUpdateInstruction(getPropertyInterpolationExpression(_value4), elementIndex, attrName, input, _value4, params);
                    } else {
                      // [prop]="value"
                      // Collect all the properties so that we can chain into a single function at the end.
                      propertyBindings.push({
                        name: attrName,
                        sourceSpan: input.sourceSpan,
                        value: function value() {
                          return _this186.convertPropertyBinding(_value4);
                        },
                        params: params
                      });
                    }
                  } else if (inputType === 1
                  /* Attribute */
                  ) {
                    if (_value4 instanceof Interpolation && getInterpolationArgsLength(_value4) > 1) {
                      // attr.name="text{{value}}" and friends
                      _this186.interpolatedUpdateInstruction(getAttributeInterpolationExpression(_value4), elementIndex, attrName, input, _value4, params);
                    } else {
                      var boundValue = _value4 instanceof Interpolation ? _value4.expressions[0] : _value4; // [attr.name]="value" or attr.name="{{value}}"
                      // Collect the attribute bindings so that they can be chained at the end.

                      attributeBindings.push({
                        name: attrName,
                        sourceSpan: input.sourceSpan,
                        value: function value() {
                          return _this186.convertPropertyBinding(boundValue);
                        },
                        params: params
                      });
                    }
                  } else {
                    // class prop
                    _this186.updateInstructionWithAdvance(elementIndex, input.sourceSpan, Identifiers$1.classProp, function () {
                      return [literal(elementIndex), literal(attrName), _this186.convertPropertyBinding(_value4)].concat(params);
                    });
                  }
                }
              }
            });

            if (propertyBindings.length > 0) {
              this.updateInstructionChainWithAdvance(elementIndex, Identifiers$1.property, propertyBindings);
            }

            if (attributeBindings.length > 0) {
              this.updateInstructionChainWithAdvance(elementIndex, Identifiers$1.attribute, attributeBindings);
            } // Traverse element child nodes


            visitAll(this, element.children);

            if (!isI18nRootElement && this.i18n) {
              this.i18n.appendElement(element.i18n, elementIndex, true);
            }

            if (!createSelfClosingInstruction) {
              // Finish element construction mode.
              var span = (_b = element.endSourceSpan) !== null && _b !== void 0 ? _b : element.sourceSpan;

              if (isI18nRootElement) {
                this.i18nEnd(span, createSelfClosingI18nInstruction);
              }

              if (isNonBindableMode) {
                this.creationInstruction(span, Identifiers$1.enableBindings);
              }

              this.creationInstruction(span, isNgContainer$1 ? Identifiers$1.elementContainerEnd : Identifiers$1.elementEnd);
            }
          }
        }, {
          key: "visitTemplate",
          value: function visitTemplate(template) {
            var _this187 = this;

            var _a;

            var NG_TEMPLATE_TAG_NAME = 'ng-template';
            var templateIndex = this.allocateDataSlot();

            if (this.i18n) {
              this.i18n.appendTemplate(template.i18n, templateIndex);
            }

            var tagName = sanitizeIdentifier(template.tagName || '');
            var contextName = "".concat(this.contextName).concat(tagName ? '_' + tagName : '', "_").concat(templateIndex);
            var templateName = "".concat(contextName, "_Template");
            var parameters = [literal(templateIndex), variable(templateName), // We don't care about the tag's namespace here, because we infer
            // it based on the parent nodes inside the template instruction.
            literal(template.tagName ? splitNsName(template.tagName)[1] : template.tagName)]; // find directives matching on a given <ng-template> node

            this.matchDirectives(NG_TEMPLATE_TAG_NAME, template); // prepare attributes parameter (including attributes used for directive matching)

            var attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME, template.attributes, template.inputs, template.outputs, undefined
            /* styles */
            , template.templateAttrs);
            parameters.push(this.addAttrsToConsts(attrsExprs)); // local refs (ex.: <ng-template #foo>)

            if (template.references && template.references.length) {
              var refs = this.prepareRefsArray(template.references);
              parameters.push(this.addToConsts(refs));
              parameters.push(importExpr(Identifiers$1.templateRefExtractor));
            } // Create the template function


            var templateVisitor = new TemplateDefinitionBuilder(this.constantPool, this._bindingScope, this.level + 1, contextName, this.i18n, templateIndex, templateName, this.directiveMatcher, this.directives, this.pipeTypeByName, this.pipes, this._namespace, this.fileBasedI18nSuffix, this.i18nUseExternalIds, this._constants); // Nested templates must not be visited until after their parent templates have completed
            // processing, so they are queued here until after the initial pass. Otherwise, we wouldn't
            // be able to support bindings in nested templates to local refs that occur after the
            // template definition. e.g. <div *ngIf="showing">{{ foo }}</div>  <div #foo></div>

            this._nestedTemplateFns.push(function () {
              var templateFunctionExpr = templateVisitor.buildTemplateFunction(template.children, template.variables, _this187._ngContentReservedSlots.length + _this187._ngContentSelectorsOffset, template.i18n);

              _this187.constantPool.statements.push(templateFunctionExpr.toDeclStmt(templateName));

              if (templateVisitor._ngContentReservedSlots.length) {
                var _this187$_ngContentRe;

                (_this187$_ngContentRe = _this187._ngContentReservedSlots).push.apply(_this187$_ngContentRe, _toConsumableArray(templateVisitor._ngContentReservedSlots));
              }
            }); // e.g. template(1, MyComp_Template_1)


            this.creationInstruction(template.sourceSpan, Identifiers$1.templateCreate, function () {
              parameters.splice(2, 0, literal(templateVisitor.getConstCount()), literal(templateVisitor.getVarCount()));
              return trimTrailingNulls(parameters);
            }); // handle property bindings e.g. ɵɵproperty('ngForOf', ctx.items), et al;

            this.templatePropertyBindings(templateIndex, template.templateAttrs); // Only add normal input/output binding instructions on explicit <ng-template> elements.

            if (template.tagName === NG_TEMPLATE_TAG_NAME) {
              var _partitionArray = partitionArray(template.inputs, hasI18nMeta),
                  _partitionArray2 = _slicedToArray(_partitionArray, 2),
                  i18nInputs = _partitionArray2[0],
                  inputs = _partitionArray2[1]; // Add i18n attributes that may act as inputs to directives. If such attributes are present,
              // generate `i18nAttributes` instruction. Note: we generate it only for explicit <ng-template>
              // elements, in case of inline templates, corresponding instructions will be generated in the
              // nested template function.


              if (i18nInputs.length > 0) {
                this.i18nAttributesInstruction(templateIndex, i18nInputs, (_a = template.startSourceSpan) !== null && _a !== void 0 ? _a : template.sourceSpan);
              } // Add the input bindings


              if (inputs.length > 0) {
                this.templatePropertyBindings(templateIndex, inputs);
              } // Generate listeners for directive output


              if (template.outputs.length > 0) {
                var listeners = template.outputs.map(function (outputAst) {
                  return {
                    sourceSpan: outputAst.sourceSpan,
                    params: _this187.prepareListenerParameter('ng_template', outputAst, templateIndex)
                  };
                });
                this.creationInstructionChain(Identifiers$1.listener, listeners);
              }
            }
          }
        }, {
          key: "visitBoundText",
          value: function visitBoundText(text) {
            var _this188 = this;

            if (this.i18n) {
              var _value5 = text.value.visit(this._valueConverter);

              this.allocateBindingSlots(_value5);

              if (_value5 instanceof Interpolation) {
                this.i18n.appendBoundText(text.i18n);
                this.i18nAppendBindings(_value5.expressions);
              }

              return;
            }

            var nodeIndex = this.allocateDataSlot();
            this.creationInstruction(text.sourceSpan, Identifiers$1.text, [literal(nodeIndex)]);
            var value = text.value.visit(this._valueConverter);
            this.allocateBindingSlots(value);

            if (value instanceof Interpolation) {
              this.updateInstructionWithAdvance(nodeIndex, text.sourceSpan, getTextInterpolationExpression(value), function () {
                return _this188.getUpdateInstructionArguments(value);
              });
            } else {
              error('Text nodes should be interpolated and never bound directly.');
            }
          }
        }, {
          key: "visitText",
          value: function visitText(text) {
            // when a text element is located within a translatable
            // block, we exclude this text element from instructions set,
            // since it will be captured in i18n content and processed at runtime
            if (!this.i18n) {
              this.creationInstruction(text.sourceSpan, Identifiers$1.text, [literal(this.allocateDataSlot()), literal(text.value)]);
            }
          }
        }, {
          key: "visitIcu",
          value: function visitIcu(icu) {
            var initWasInvoked = false; // if an ICU was created outside of i18n block, we still treat
            // it as a translatable entity and invoke i18nStart and i18nEnd
            // to generate i18n context and the necessary instructions

            if (!this.i18n) {
              initWasInvoked = true;
              this.i18nStart(null, icu.i18n, true);
            }

            var i18n = this.i18n;
            var vars = this.i18nBindProps(icu.vars);
            var placeholders = this.i18nBindProps(icu.placeholders); // output ICU directly and keep ICU reference in context

            var message = icu.i18n; // we always need post-processing function for ICUs, to make sure that:
            // - all placeholders in a form of {PLACEHOLDER} are replaced with actual values (note:
            // `goog.getMsg` does not process ICUs and uses the `{PLACEHOLDER}` format for placeholders
            // inside ICUs)
            // - all ICU vars (such as `VAR_SELECT` or `VAR_PLURAL`) are replaced with correct values

            var transformFn = function transformFn(raw) {
              var params = Object.assign(Object.assign({}, vars), placeholders);
              var formatted = i18nFormatPlaceholderNames(params,
              /* useCamelCase */
              false);
              return instruction(null, Identifiers$1.i18nPostprocess, [raw, mapLiteral(formatted, true)]);
            }; // in case the whole i18n message is a single ICU - we do not need to
            // create a separate top-level translation, we can use the root ref instead
            // and make this ICU a top-level translation
            // note: ICU placeholders are replaced with actual values in `i18nPostprocess` function
            // separately, so we do not pass placeholders into `i18nTranslate` function.


            if (isSingleI18nIcu(i18n.meta)) {
              this.i18nTranslate(message,
              /* placeholders */
              {}, i18n.ref, transformFn);
            } else {
              // output ICU directly and keep ICU reference in context
              var ref = this.i18nTranslate(message,
              /* placeholders */
              {},
              /* ref */
              undefined, transformFn);
              i18n.appendIcu(icuFromI18nMessage(message).name, ref);
            }

            if (initWasInvoked) {
              this.i18nEnd(null, true);
            }

            return null;
          }
        }, {
          key: "allocateDataSlot",
          value: function allocateDataSlot() {
            return this._dataIndex++;
          }
        }, {
          key: "getConstCount",
          value: function getConstCount() {
            return this._dataIndex;
          }
        }, {
          key: "getVarCount",
          value: function getVarCount() {
            return this._pureFunctionSlots;
          }
        }, {
          key: "getConsts",
          value: function getConsts() {
            return this._constants;
          }
        }, {
          key: "getNgContentSelectors",
          value: function getNgContentSelectors() {
            return this._ngContentReservedSlots.length ? this.constantPool.getConstLiteral(asLiteral(this._ngContentReservedSlots), true) : null;
          }
        }, {
          key: "bindingContext",
          value: function bindingContext() {
            return "".concat(this._bindingContext++);
          }
        }, {
          key: "templatePropertyBindings",
          value: function templatePropertyBindings(templateIndex, attrs) {
            var _this189 = this;

            var propertyBindings = [];
            attrs.forEach(function (input) {
              if (input instanceof BoundAttribute) {
                var _value6 = input.value.visit(_this189._valueConverter);

                if (_value6 !== undefined) {
                  _this189.allocateBindingSlots(_value6);

                  if (_value6 instanceof Interpolation) {
                    // Params typically contain attribute namespace and value sanitizer, which is applicable
                    // for regular HTML elements, but not applicable for <ng-template> (since props act as
                    // inputs to directives), so keep params array empty.
                    var params = []; // prop="{{value}}" case

                    _this189.interpolatedUpdateInstruction(getPropertyInterpolationExpression(_value6), templateIndex, input.name, input, _value6, params);
                  } else {
                    // [prop]="value" case
                    propertyBindings.push({
                      name: input.name,
                      sourceSpan: input.sourceSpan,
                      value: function value() {
                        return _this189.convertPropertyBinding(_value6);
                      }
                    });
                  }
                }
              }
            });

            if (propertyBindings.length > 0) {
              this.updateInstructionChainWithAdvance(templateIndex, Identifiers$1.property, propertyBindings);
            }
          } // Bindings must only be resolved after all local refs have been visited, so all
          // instructions are queued in callbacks that execute once the initial pass has completed.
          // Otherwise, we wouldn't be able to support local refs that are defined after their
          // bindings. e.g. {{ foo }} <div #foo></div>

        }, {
          key: "instructionFn",
          value: function instructionFn(fns, span, reference, paramsOrFn) {
            var prepend = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
            fns[prepend ? 'unshift' : 'push'](function () {
              var params = Array.isArray(paramsOrFn) ? paramsOrFn : paramsOrFn();
              return instruction(span, reference, params).toStmt();
            });
          }
        }, {
          key: "processStylingUpdateInstruction",
          value: function processStylingUpdateInstruction(elementIndex, instruction) {
            var _this190 = this;

            var allocateBindingSlots = 0;

            if (instruction) {
              var calls = [];
              instruction.calls.forEach(function (call) {
                allocateBindingSlots += call.allocateBindingSlots;
                calls.push({
                  sourceSpan: call.sourceSpan,
                  value: function value() {
                    return call.params(function (value) {
                      return call.supportsInterpolation && value instanceof Interpolation ? _this190.getUpdateInstructionArguments(value) : _this190.convertPropertyBinding(value);
                    });
                  }
                });
              });
              this.updateInstructionChainWithAdvance(elementIndex, instruction.reference, calls);
            }

            return allocateBindingSlots;
          }
        }, {
          key: "creationInstruction",
          value: function creationInstruction(span, reference, paramsOrFn, prepend) {
            this.instructionFn(this._creationCodeFns, span, reference, paramsOrFn || [], prepend);
          }
        }, {
          key: "creationInstructionChain",
          value: function creationInstructionChain(reference, calls) {
            var span = calls.length ? calls[0].sourceSpan : null;

            this._creationCodeFns.push(function () {
              return chainedInstruction(reference, calls.map(function (call) {
                return call.params();
              }), span).toStmt();
            });
          }
        }, {
          key: "updateInstructionWithAdvance",
          value: function updateInstructionWithAdvance(nodeIndex, span, reference, paramsOrFn) {
            this.addAdvanceInstructionIfNecessary(nodeIndex, span);
            this.updateInstruction(span, reference, paramsOrFn);
          }
        }, {
          key: "updateInstruction",
          value: function updateInstruction(span, reference, paramsOrFn) {
            this.instructionFn(this._updateCodeFns, span, reference, paramsOrFn || []);
          }
        }, {
          key: "updateInstructionChain",
          value: function updateInstructionChain(reference, bindings) {
            var span = bindings.length ? bindings[0].sourceSpan : null;

            this._updateCodeFns.push(function () {
              var calls = bindings.map(function (property) {
                var value = property.value();
                var fnParams = Array.isArray(value) ? value : [value];

                if (property.params) {
                  fnParams.push.apply(fnParams, _toConsumableArray(property.params));
                }

                if (property.name) {
                  // We want the property name to always be the first function parameter.
                  fnParams.unshift(literal(property.name));
                }

                return fnParams;
              });
              return chainedInstruction(reference, calls, span).toStmt();
            });
          }
        }, {
          key: "updateInstructionChainWithAdvance",
          value: function updateInstructionChainWithAdvance(nodeIndex, reference, bindings) {
            this.addAdvanceInstructionIfNecessary(nodeIndex, bindings.length ? bindings[0].sourceSpan : null);
            this.updateInstructionChain(reference, bindings);
          }
        }, {
          key: "addAdvanceInstructionIfNecessary",
          value: function addAdvanceInstructionIfNecessary(nodeIndex, span) {
            if (nodeIndex !== this._currentIndex) {
              var delta = nodeIndex - this._currentIndex;

              if (delta < 1) {
                throw new Error('advance instruction can only go forwards');
              }

              this.instructionFn(this._updateCodeFns, span, Identifiers$1.advance, [literal(delta)]);
              this._currentIndex = nodeIndex;
            }
          }
        }, {
          key: "allocatePureFunctionSlots",
          value: function allocatePureFunctionSlots(numSlots) {
            var originalSlots = this._pureFunctionSlots;
            this._pureFunctionSlots += numSlots;
            return originalSlots;
          }
        }, {
          key: "allocateBindingSlots",
          value: function allocateBindingSlots(value) {
            this._bindingSlots += value instanceof Interpolation ? value.expressions.length : 1;
          }
          /**
           * Gets an expression that refers to the implicit receiver. The implicit
           * receiver is always the root level context.
           */

        }, {
          key: "getImplicitReceiverExpr",
          value: function getImplicitReceiverExpr() {
            if (this._implicitReceiverExpr) {
              return this._implicitReceiverExpr;
            }

            return this._implicitReceiverExpr = this.level === 0 ? variable(CONTEXT_NAME) : this._bindingScope.getOrCreateSharedContextVar(0);
          }
        }, {
          key: "convertPropertyBinding",
          value: function convertPropertyBinding(value) {
            var _this$_tempVariables;

            var convertedPropertyBinding = _convertPropertyBinding(this, this.getImplicitReceiverExpr(), value, this.bindingContext(), BindingForm.Expression, function () {
              return error('Unexpected interpolation');
            });

            var valExpr = convertedPropertyBinding.currValExpr;

            (_this$_tempVariables = this._tempVariables).push.apply(_this$_tempVariables, _toConsumableArray(convertedPropertyBinding.stmts));

            return valExpr;
          }
          /**
           * Gets a list of argument expressions to pass to an update instruction expression. Also updates
           * the temp variables state with temp variables that were identified as needing to be created
           * while visiting the arguments.
           * @param value The original expression we will be resolving an arguments list from.
           */

        }, {
          key: "getUpdateInstructionArguments",
          value: function getUpdateInstructionArguments(value) {
            var _this$_tempVariables2;

            var _convertUpdateArgumen = convertUpdateArguments(this, this.getImplicitReceiverExpr(), value, this.bindingContext()),
                args = _convertUpdateArgumen.args,
                stmts = _convertUpdateArgumen.stmts;

            (_this$_tempVariables2 = this._tempVariables).push.apply(_this$_tempVariables2, _toConsumableArray(stmts));

            return args;
          }
        }, {
          key: "matchDirectives",
          value: function matchDirectives(elementName, elOrTpl) {
            var _this191 = this;

            if (this.directiveMatcher) {
              var selector = createCssSelector(elementName, getAttrsForDirectiveMatching(elOrTpl));
              this.directiveMatcher.match(selector, function (cssSelector, staticType) {
                _this191.directives.add(staticType);
              });
            }
          }
          /**
           * Prepares all attribute expression values for the `TAttributes` array.
           *
           * The purpose of this function is to properly construct an attributes array that
           * is passed into the `elementStart` (or just `element`) functions. Because there
           * are many different types of attributes, the array needs to be constructed in a
           * special way so that `elementStart` can properly evaluate them.
           *
           * The format looks like this:
           *
           * ```
           * attrs = [prop, value, prop2, value2,
           *   PROJECT_AS, selector,
           *   CLASSES, class1, class2,
           *   STYLES, style1, value1, style2, value2,
           *   BINDINGS, name1, name2, name3,
           *   TEMPLATE, name4, name5, name6,
           *   I18N, name7, name8, ...]
           * ```
           *
           * Note that this function will fully ignore all synthetic (@foo) attribute values
           * because those values are intended to always be generated as property instructions.
           */

        }, {
          key: "getAttributeExpressions",
          value: function getAttributeExpressions(elementName, renderAttributes, inputs, outputs, styles) {
            var templateAttrs = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];
            var boundI18nAttrs = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [];
            var alreadySeen = new Set();
            var attrExprs = [];
            var ngProjectAsAttr;

            var _iterator18 = _createForOfIteratorHelper(renderAttributes),
                _step18;

            try {
              for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
                var attr = _step18.value;

                if (attr.name === NG_PROJECT_AS_ATTR_NAME) {
                  ngProjectAsAttr = attr;
                } // Note that static i18n attributes aren't in the i18n array,
                // because they're treated in the same way as regular attributes.


                if (attr.i18n) {
                  attrExprs.push(literal(attr.name), this.i18nTranslate(attr.i18n));
                } else {
                  attrExprs.push.apply(attrExprs, _toConsumableArray(getAttributeNameLiterals(attr.name)).concat([trustedConstAttribute(elementName, attr)]));
                }
              } // Keep ngProjectAs next to the other name, value pairs so we can verify that we match
              // ngProjectAs marker in the attribute name slot.

            } catch (err) {
              _iterator18.e(err);
            } finally {
              _iterator18.f();
            }

            if (ngProjectAsAttr) {
              attrExprs.push.apply(attrExprs, _toConsumableArray(getNgProjectAsLiteral(ngProjectAsAttr)));
            }

            function addAttrExpr(key, value) {
              if (typeof key === 'string') {
                if (!alreadySeen.has(key)) {
                  attrExprs.push.apply(attrExprs, _toConsumableArray(getAttributeNameLiterals(key)));
                  value !== undefined && attrExprs.push(value);
                  alreadySeen.add(key);
                }
              } else {
                attrExprs.push(literal(key));
              }
            } // it's important that this occurs before BINDINGS and TEMPLATE because once `elementStart`
            // comes across the BINDINGS or TEMPLATE markers then it will continue reading each value as
            // as single property value cell by cell.


            if (styles) {
              styles.populateInitialStylingAttrs(attrExprs);
            }

            if (inputs.length || outputs.length) {
              var attrsLengthBeforeInputs = attrExprs.length;

              for (var i = 0; i < inputs.length; i++) {
                var input = inputs[i]; // We don't want the animation and attribute bindings in the
                // attributes array since they aren't used for directive matching.

                if (input.type !== 4
                /* Animation */
                && input.type !== 1
                /* Attribute */
                ) {
                  addAttrExpr(input.name);
                }
              }

              for (var _i8 = 0; _i8 < outputs.length; _i8++) {
                var output = outputs[_i8];

                if (output.type !== 1
                /* Animation */
                ) {
                  addAttrExpr(output.name);
                }
              } // this is a cheap way of adding the marker only after all the input/output
              // values have been filtered (by not including the animation ones) and added
              // to the expressions. The marker is important because it tells the runtime
              // code that this is where attributes without values start...


              if (attrExprs.length !== attrsLengthBeforeInputs) {
                attrExprs.splice(attrsLengthBeforeInputs, 0, literal(3
                /* Bindings */
                ));
              }
            }

            if (templateAttrs.length) {
              attrExprs.push(literal(4
              /* Template */
              ));
              templateAttrs.forEach(function (attr) {
                return addAttrExpr(attr.name);
              });
            }

            if (boundI18nAttrs.length) {
              attrExprs.push(literal(6
              /* I18n */
              ));
              boundI18nAttrs.forEach(function (attr) {
                return addAttrExpr(attr.name);
              });
            }

            return attrExprs;
          }
        }, {
          key: "addToConsts",
          value: function addToConsts(expression) {
            if (isNull(expression)) {
              return TYPED_NULL_EXPR;
            }

            var consts = this._constants.constExpressions; // Try to reuse a literal that's already in the array, if possible.

            for (var i = 0; i < consts.length; i++) {
              if (consts[i].isEquivalent(expression)) {
                return literal(i);
              }
            }

            return literal(consts.push(expression) - 1);
          }
        }, {
          key: "addAttrsToConsts",
          value: function addAttrsToConsts(attrs) {
            return attrs.length > 0 ? this.addToConsts(literalArr(attrs)) : TYPED_NULL_EXPR;
          }
        }, {
          key: "prepareRefsArray",
          value: function prepareRefsArray(references) {
            var _this192 = this;

            if (!references || references.length === 0) {
              return TYPED_NULL_EXPR;
            }

            var refsParam = flatten(references.map(function (reference) {
              var slot = _this192.allocateDataSlot(); // Generate the update temporary.


              var variableName = _this192._bindingScope.freshReferenceName();

              var retrievalLevel = _this192.level;
              var lhs = variable(variableName);

              _this192._bindingScope.set(retrievalLevel, reference.name, lhs, 0
              /* DEFAULT */
              , function (scope, relativeLevel) {
                // e.g. nextContext(2);
                var nextContextStmt = relativeLevel > 0 ? [generateNextContextExpr(relativeLevel).toStmt()] : []; // e.g. const $foo$ = reference(1);

                var refExpr = lhs.set(importExpr(Identifiers$1.reference).callFn([literal(slot)]));
                return nextContextStmt.concat(refExpr.toConstDecl());
              }, true);

              return [reference.name, reference.value];
            }));
            return asLiteral(refsParam);
          }
        }, {
          key: "prepareListenerParameter",
          value: function prepareListenerParameter(tagName, outputAst, index) {
            var _this193 = this;

            return function () {
              var eventName = outputAst.name;
              var bindingFnName = outputAst.type === 1
              /* Animation */
              ? // synthetic @listener.foo values are treated the exact same as are standard listeners
              prepareSyntheticListenerFunctionName(eventName, outputAst.phase) : sanitizeIdentifier(eventName);
              var handlerName = "".concat(_this193.templateName, "_").concat(tagName, "_").concat(bindingFnName, "_").concat(index, "_listener");

              var scope = _this193._bindingScope.nestedScope(_this193._bindingScope.bindingLevel, EVENT_BINDING_SCOPE_GLOBALS);

              return prepareEventListenerParameters(outputAst, handlerName, scope);
            };
          }
        }]);

        return TemplateDefinitionBuilder;
      }();

      var ValueConverter = /*#__PURE__*/function (_AstMemoryEfficientTr) {
        _inherits(ValueConverter, _AstMemoryEfficientTr);

        var _super103 = _createSuper(ValueConverter);

        function ValueConverter(constantPool, allocateSlot, allocatePureFunctionSlots, definePipe) {
          var _this194;

          _classCallCheck(this, ValueConverter);

          _this194 = _super103.call(this);
          _this194.constantPool = constantPool;
          _this194.allocateSlot = allocateSlot;
          _this194.allocatePureFunctionSlots = allocatePureFunctionSlots;
          _this194.definePipe = definePipe;
          _this194._pipeBindExprs = [];
          return _this194;
        } // AstMemoryEfficientTransformer


        _createClass2(ValueConverter, [{
          key: "visitPipe",
          value: function visitPipe(pipe, context) {
            // Allocate a slot to create the pipe
            var slot = this.allocateSlot();
            var slotPseudoLocal = "PIPE:".concat(slot); // Allocate one slot for the result plus one slot per pipe argument

            var pureFunctionSlot = this.allocatePureFunctionSlots(2 + pipe.args.length);
            var target = new PropertyRead(pipe.span, pipe.sourceSpan, pipe.nameSpan, new ImplicitReceiver(pipe.span, pipe.sourceSpan), slotPseudoLocal);

            var _pipeBindingCallInfo = pipeBindingCallInfo(pipe.args),
                identifier = _pipeBindingCallInfo.identifier,
                isVarLength = _pipeBindingCallInfo.isVarLength;

            this.definePipe(pipe.name, slotPseudoLocal, slot, importExpr(identifier));
            var args = [pipe.exp].concat(_toConsumableArray(pipe.args));
            var convertedArgs = isVarLength ? this.visitAll([new LiteralArray(pipe.span, pipe.sourceSpan, args)]) : this.visitAll(args);
            var pipeBindExpr = new FunctionCall(pipe.span, pipe.sourceSpan, target, [new LiteralPrimitive(pipe.span, pipe.sourceSpan, slot), new LiteralPrimitive(pipe.span, pipe.sourceSpan, pureFunctionSlot)].concat(_toConsumableArray(convertedArgs)));

            this._pipeBindExprs.push(pipeBindExpr);

            return pipeBindExpr;
          }
        }, {
          key: "updatePipeSlotOffsets",
          value: function updatePipeSlotOffsets(bindingSlots) {
            this._pipeBindExprs.forEach(function (pipe) {
              // update the slot offset arg (index 1) to account for binding slots
              var slotOffset = pipe.args[1];
              slotOffset.value += bindingSlots;
            });
          }
        }, {
          key: "visitLiteralArray",
          value: function visitLiteralArray(array, context) {
            var _this195 = this;

            return new BuiltinFunctionCall(array.span, array.sourceSpan, this.visitAll(array.expressions), function (values) {
              // If the literal has calculated (non-literal) elements transform it into
              // calls to literal factories that compose the literal and will cache intermediate
              // values.
              var literal = literalArr(values);
              return getLiteralFactory(_this195.constantPool, literal, _this195.allocatePureFunctionSlots);
            });
          }
        }, {
          key: "visitLiteralMap",
          value: function visitLiteralMap(map, context) {
            var _this196 = this;

            return new BuiltinFunctionCall(map.span, map.sourceSpan, this.visitAll(map.values), function (values) {
              // If the literal has calculated (non-literal) elements  transform it into
              // calls to literal factories that compose the literal and will cache intermediate
              // values.
              var literal = literalMap(values.map(function (value, index) {
                return {
                  key: map.keys[index].key,
                  value: value,
                  quoted: map.keys[index].quoted
                };
              }));
              return getLiteralFactory(_this196.constantPool, literal, _this196.allocatePureFunctionSlots);
            });
          }
        }]);

        return ValueConverter;
      }(AstMemoryEfficientTransformer); // Pipes always have at least one parameter, the value they operate on


      var pipeBindingIdentifiers = [Identifiers$1.pipeBind1, Identifiers$1.pipeBind2, Identifiers$1.pipeBind3, Identifiers$1.pipeBind4];

      function pipeBindingCallInfo(args) {
        var identifier = pipeBindingIdentifiers[args.length];
        return {
          identifier: identifier || Identifiers$1.pipeBindV,
          isVarLength: !identifier
        };
      }

      var pureFunctionIdentifiers = [Identifiers$1.pureFunction0, Identifiers$1.pureFunction1, Identifiers$1.pureFunction2, Identifiers$1.pureFunction3, Identifiers$1.pureFunction4, Identifiers$1.pureFunction5, Identifiers$1.pureFunction6, Identifiers$1.pureFunction7, Identifiers$1.pureFunction8];

      function pureFunctionCallInfo(args) {
        var identifier = pureFunctionIdentifiers[args.length];
        return {
          identifier: identifier || Identifiers$1.pureFunctionV,
          isVarLength: !identifier
        };
      }

      function instruction(span, reference, params) {
        return importExpr(reference, null, span).callFn(params, span);
      } // e.g. x(2);


      function generateNextContextExpr(relativeLevelDiff) {
        return importExpr(Identifiers$1.nextContext).callFn(relativeLevelDiff > 1 ? [literal(relativeLevelDiff)] : []);
      }

      function getLiteralFactory(constantPool, literal$1, allocateSlots) {
        var _constantPool$getLite = constantPool.getLiteralFactory(literal$1),
            literalFactory = _constantPool$getLite.literalFactory,
            literalFactoryArguments = _constantPool$getLite.literalFactoryArguments; // Allocate 1 slot for the result plus 1 per argument


        var startSlot = allocateSlots(1 + literalFactoryArguments.length);

        var _pureFunctionCallInfo = pureFunctionCallInfo(literalFactoryArguments),
            identifier = _pureFunctionCallInfo.identifier,
            isVarLength = _pureFunctionCallInfo.isVarLength; // Literal factories are pure functions that only need to be re-invoked when the parameters
        // change.


        var args = [literal(startSlot), literalFactory];

        if (isVarLength) {
          args.push(literalArr(literalFactoryArguments));
        } else {
          args.push.apply(args, _toConsumableArray(literalFactoryArguments));
        }

        return importExpr(identifier).callFn(args);
      }
      /**
       * Gets an array of literals that can be added to an expression
       * to represent the name and namespace of an attribute. E.g.
       * `:xlink:href` turns into `[AttributeMarker.NamespaceURI, 'xlink', 'href']`.
       *
       * @param name Name of the attribute, including the namespace.
       */


      function getAttributeNameLiterals(name) {
        var _splitNsName5 = splitNsName(name),
            _splitNsName6 = _slicedToArray(_splitNsName5, 2),
            attributeNamespace = _splitNsName6[0],
            attributeName = _splitNsName6[1];

        var nameLiteral = literal(attributeName);

        if (attributeNamespace) {
          return [literal(0
          /* NamespaceURI */
          ), literal(attributeNamespace), nameLiteral];
        }

        return [nameLiteral];
      }
      /** The prefix used to get a shared context in BindingScope's map. */


      var SHARED_CONTEXT_KEY = '$$shared_ctx$$';

      var BindingScope = /*#__PURE__*/function () {
        function BindingScope() {
          var bindingLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
          var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
          var globals = arguments.length > 2 ? arguments[2] : undefined;

          _classCallCheck(this, BindingScope);

          this.bindingLevel = bindingLevel;
          this.parent = parent;
          this.globals = globals;
          /** Keeps a map from local variables to their BindingData. */

          this.map = new Map();
          this.referenceNameIndex = 0;
          this.restoreViewVariable = null;

          if (globals !== undefined) {
            var _iterator19 = _createForOfIteratorHelper(globals),
                _step19;

            try {
              for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
                var name = _step19.value;
                this.set(0, name, variable(name));
              }
            } catch (err) {
              _iterator19.e(err);
            } finally {
              _iterator19.f();
            }
          }
        }

        _createClass2(BindingScope, [{
          key: "get",
          value: function get(name) {
            var current = this;

            while (current) {
              var value = current.map.get(name);

              if (value != null) {
                if (current !== this) {
                  // make a local copy and reset the `declare` state
                  value = {
                    retrievalLevel: value.retrievalLevel,
                    lhs: value.lhs,
                    declareLocalCallback: value.declareLocalCallback,
                    declare: false,
                    priority: value.priority,
                    localRef: value.localRef
                  }; // Cache the value locally.

                  this.map.set(name, value); // Possibly generate a shared context var

                  this.maybeGenerateSharedContextVar(value);
                  this.maybeRestoreView(value.retrievalLevel, value.localRef);
                }

                if (value.declareLocalCallback && !value.declare) {
                  value.declare = true;
                }

                return value.lhs;
              }

              current = current.parent;
            } // If we get to this point, we are looking for a property on the top level component
            // - If level === 0, we are on the top and don't need to re-declare `ctx`.
            // - If level > 0, we are in an embedded view. We need to retrieve the name of the
            // local var we used to store the component context, e.g. const $comp$ = x();


            return this.bindingLevel === 0 ? null : this.getComponentProperty(name);
          }
          /**
           * Create a local variable for later reference.
           *
           * @param retrievalLevel The level from which this value can be retrieved
           * @param name Name of the variable.
           * @param lhs AST representing the left hand side of the `let lhs = rhs;`.
           * @param priority The sorting priority of this var
           * @param declareLocalCallback The callback to invoke when declaring this local var
           * @param localRef Whether or not this is a local ref
           */

        }, {
          key: "set",
          value: function set(retrievalLevel, name, lhs) {
            var priority = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
            var declareLocalCallback = arguments.length > 4 ? arguments[4] : undefined;
            var localRef = arguments.length > 5 ? arguments[5] : undefined;

            if (this.map.has(name)) {
              if (localRef) {
                // Do not throw an error if it's a local ref and do not update existing value,
                // so the first defined ref is always returned.
                return this;
              }

              error("The name ".concat(name, " is already defined in scope to be ").concat(this.map.get(name)));
            }

            this.map.set(name, {
              retrievalLevel: retrievalLevel,
              lhs: lhs,
              declare: false,
              declareLocalCallback: declareLocalCallback,
              priority: priority,
              localRef: localRef || false
            });
            return this;
          } // Implemented as part of LocalResolver.

        }, {
          key: "getLocal",
          value: function getLocal(name) {
            return this.get(name);
          } // Implemented as part of LocalResolver.

        }, {
          key: "notifyImplicitReceiverUse",
          value: function notifyImplicitReceiverUse() {
            if (this.bindingLevel !== 0) {
              // Since the implicit receiver is accessed in an embedded view, we need to
              // ensure that we declare a shared context variable for the current template
              // in the update variables.
              this.map.get(SHARED_CONTEXT_KEY + 0).declare = true;
            }
          }
        }, {
          key: "nestedScope",
          value: function nestedScope(level, globals) {
            var newScope = new BindingScope(level, this, globals);
            if (level > 0) newScope.generateSharedContextVar(0);
            return newScope;
          }
          /**
           * Gets or creates a shared context variable and returns its expression. Note that
           * this does not mean that the shared variable will be declared. Variables in the
           * binding scope will be only declared if they are used.
           */

        }, {
          key: "getOrCreateSharedContextVar",
          value: function getOrCreateSharedContextVar(retrievalLevel) {
            var bindingKey = SHARED_CONTEXT_KEY + retrievalLevel;

            if (!this.map.has(bindingKey)) {
              this.generateSharedContextVar(retrievalLevel);
            } // Shared context variables are always generated as "ReadVarExpr".


            return this.map.get(bindingKey).lhs;
          }
        }, {
          key: "getSharedContextName",
          value: function getSharedContextName(retrievalLevel) {
            var sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + retrievalLevel); // Shared context variables are always generated as "ReadVarExpr".

            return sharedCtxObj && sharedCtxObj.declare ? sharedCtxObj.lhs : null;
          }
        }, {
          key: "maybeGenerateSharedContextVar",
          value: function maybeGenerateSharedContextVar(value) {
            if (value.priority === 1
            /* CONTEXT */
            && value.retrievalLevel < this.bindingLevel) {
              var sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + value.retrievalLevel);

              if (sharedCtxObj) {
                sharedCtxObj.declare = true;
              } else {
                this.generateSharedContextVar(value.retrievalLevel);
              }
            }
          }
        }, {
          key: "generateSharedContextVar",
          value: function generateSharedContextVar(retrievalLevel) {
            var lhs = variable(CONTEXT_NAME + this.freshReferenceName());
            this.map.set(SHARED_CONTEXT_KEY + retrievalLevel, {
              retrievalLevel: retrievalLevel,
              lhs: lhs,
              declareLocalCallback: function declareLocalCallback(scope, relativeLevel) {
                // const ctx_r0 = nextContext(2);
                return [lhs.set(generateNextContextExpr(relativeLevel)).toConstDecl()];
              },
              declare: false,
              priority: 2
              /* SHARED_CONTEXT */
              ,
              localRef: false
            });
          }
        }, {
          key: "getComponentProperty",
          value: function getComponentProperty(name) {
            var componentValue = this.map.get(SHARED_CONTEXT_KEY + 0);
            componentValue.declare = true;
            this.maybeRestoreView(0, false);
            return componentValue.lhs.prop(name);
          }
        }, {
          key: "maybeRestoreView",
          value: function maybeRestoreView(retrievalLevel, localRefLookup) {
            // We want to restore the current view in listener fns if:
            // 1 - we are accessing a value in a parent view, which requires walking the view tree rather
            // than using the ctx arg. In this case, the retrieval and binding level will be different.
            // 2 - we are looking up a local ref, which requires restoring the view where the local
            // ref is stored
            if (this.isListenerScope() && (retrievalLevel < this.bindingLevel || localRefLookup)) {
              if (!this.parent.restoreViewVariable) {
                // parent saves variable to generate a shared `const $s$ = getCurrentView();` instruction
                this.parent.restoreViewVariable = variable(this.parent.freshReferenceName());
              }

              this.restoreViewVariable = this.parent.restoreViewVariable;
            }
          }
        }, {
          key: "restoreViewStatement",
          value: function restoreViewStatement() {
            // restoreView($state$);
            return this.restoreViewVariable ? [instruction(null, Identifiers$1.restoreView, [this.restoreViewVariable]).toStmt()] : [];
          }
        }, {
          key: "viewSnapshotStatements",
          value: function viewSnapshotStatements() {
            // const $state$ = getCurrentView();
            var getCurrentViewInstruction = instruction(null, Identifiers$1.getCurrentView, []);
            return this.restoreViewVariable ? [this.restoreViewVariable.set(getCurrentViewInstruction).toConstDecl()] : [];
          }
        }, {
          key: "isListenerScope",
          value: function isListenerScope() {
            return this.parent && this.parent.bindingLevel === this.bindingLevel;
          }
        }, {
          key: "variableDeclarations",
          value: function variableDeclarations() {
            var _this197 = this;

            var currentContextLevel = 0;
            return Array.from(this.map.values()).filter(function (value) {
              return value.declare;
            }).sort(function (a, b) {
              return b.retrievalLevel - a.retrievalLevel || b.priority - a.priority;
            }).reduce(function (stmts, value) {
              var levelDiff = _this197.bindingLevel - value.retrievalLevel;
              var currStmts = value.declareLocalCallback(_this197, levelDiff - currentContextLevel);
              currentContextLevel = levelDiff;
              return stmts.concat(currStmts);
            }, []);
          }
        }, {
          key: "freshReferenceName",
          value: function freshReferenceName() {
            var current = this; // Find the top scope as it maintains the global reference count

            while (current.parent) {
              current = current.parent;
            }

            var ref = "".concat(REFERENCE_PREFIX).concat(current.referenceNameIndex++);
            return ref;
          }
        }], [{
          key: "createRootScope",
          value: function createRootScope() {
            return new BindingScope();
          }
        }]);

        return BindingScope;
      }();
      /**
       * Creates a `CssSelector` given a tag name and a map of attributes
       */


      function createCssSelector(elementName, attributes) {
        var cssSelector = new CssSelector();
        var elementNameNoNs = splitNsName(elementName)[1];
        cssSelector.setElement(elementNameNoNs);
        Object.getOwnPropertyNames(attributes).forEach(function (name) {
          var nameNoNs = splitNsName(name)[1];
          var value = attributes[name];
          cssSelector.addAttribute(nameNoNs, value);

          if (name.toLowerCase() === 'class') {
            var classes = value.trim().split(/\s+/);
            classes.forEach(function (className) {
              return cssSelector.addClassName(className);
            });
          }
        });
        return cssSelector;
      }
      /**
       * Creates an array of expressions out of an `ngProjectAs` attributes
       * which can be added to the instruction parameters.
       */


      function getNgProjectAsLiteral(attribute) {
        // Parse the attribute value into a CssSelectorList. Note that we only take the
        // first selector, because we don't support multiple selectors in ngProjectAs.
        var parsedR3Selector = parseSelectorToR3Selector(attribute.value)[0];
        return [literal(5
        /* ProjectAs */
        ), asLiteral(parsedR3Selector)];
      }
      /**
       * Gets the instruction to generate for an interpolated property
       * @param interpolation An Interpolation AST
       */


      function getPropertyInterpolationExpression(interpolation) {
        switch (getInterpolationArgsLength(interpolation)) {
          case 1:
            return Identifiers$1.propertyInterpolate;

          case 3:
            return Identifiers$1.propertyInterpolate1;

          case 5:
            return Identifiers$1.propertyInterpolate2;

          case 7:
            return Identifiers$1.propertyInterpolate3;

          case 9:
            return Identifiers$1.propertyInterpolate4;

          case 11:
            return Identifiers$1.propertyInterpolate5;

          case 13:
            return Identifiers$1.propertyInterpolate6;

          case 15:
            return Identifiers$1.propertyInterpolate7;

          case 17:
            return Identifiers$1.propertyInterpolate8;

          default:
            return Identifiers$1.propertyInterpolateV;
        }
      }
      /**
       * Gets the instruction to generate for an interpolated attribute
       * @param interpolation An Interpolation AST
       */


      function getAttributeInterpolationExpression(interpolation) {
        switch (getInterpolationArgsLength(interpolation)) {
          case 3:
            return Identifiers$1.attributeInterpolate1;

          case 5:
            return Identifiers$1.attributeInterpolate2;

          case 7:
            return Identifiers$1.attributeInterpolate3;

          case 9:
            return Identifiers$1.attributeInterpolate4;

          case 11:
            return Identifiers$1.attributeInterpolate5;

          case 13:
            return Identifiers$1.attributeInterpolate6;

          case 15:
            return Identifiers$1.attributeInterpolate7;

          case 17:
            return Identifiers$1.attributeInterpolate8;

          default:
            return Identifiers$1.attributeInterpolateV;
        }
      }
      /**
       * Gets the instruction to generate for interpolated text.
       * @param interpolation An Interpolation AST
       */


      function getTextInterpolationExpression(interpolation) {
        switch (getInterpolationArgsLength(interpolation)) {
          case 1:
            return Identifiers$1.textInterpolate;

          case 3:
            return Identifiers$1.textInterpolate1;

          case 5:
            return Identifiers$1.textInterpolate2;

          case 7:
            return Identifiers$1.textInterpolate3;

          case 9:
            return Identifiers$1.textInterpolate4;

          case 11:
            return Identifiers$1.textInterpolate5;

          case 13:
            return Identifiers$1.textInterpolate6;

          case 15:
            return Identifiers$1.textInterpolate7;

          case 17:
            return Identifiers$1.textInterpolate8;

          default:
            return Identifiers$1.textInterpolateV;
        }
      }
      /**
       * Parse a template into render3 `Node`s and additional metadata, with no other dependencies.
       *
       * @param template text of the template to parse
       * @param templateUrl URL to use for source mapping of the parsed template
       * @param options options to modify how the template is parsed
       */


      function parseTemplate(template, templateUrl) {
        var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
        var interpolationConfig = options.interpolationConfig,
            preserveWhitespaces = options.preserveWhitespaces,
            enableI18nLegacyMessageIdFormat = options.enableI18nLegacyMessageIdFormat;
        var bindingParser = makeBindingParser(interpolationConfig);
        var htmlParser = new HtmlParser();
        var parseResult = htmlParser.parse(template, templateUrl, Object.assign(Object.assign({
          leadingTriviaChars: LEADING_TRIVIA_CHARS
        }, options), {
          tokenizeExpansionForms: true
        }));

        if (parseResult.errors && parseResult.errors.length > 0) {
          // TODO(ayazhafiz): we may not always want to bail out at this point (e.g. in
          // the context of a language service).
          return {
            interpolationConfig: interpolationConfig,
            preserveWhitespaces: preserveWhitespaces,
            template: template,
            errors: parseResult.errors,
            nodes: [],
            styleUrls: [],
            styles: [],
            ngContentSelectors: []
          };
        }

        var rootNodes = parseResult.rootNodes; // process i18n meta information (scan attributes, generate ids)
        // before we run whitespace removal process, because existing i18n
        // extraction process (ng extract-i18n) relies on a raw content to generate
        // message ids

        var i18nMetaVisitor = new I18nMetaVisitor(interpolationConfig,
        /* keepI18nAttrs */
        !preserveWhitespaces, enableI18nLegacyMessageIdFormat);
        rootNodes = visitAll$1(i18nMetaVisitor, rootNodes);

        if (!preserveWhitespaces) {
          rootNodes = visitAll$1(new WhitespaceVisitor(), rootNodes); // run i18n meta visitor again in case whitespaces are removed (because that might affect
          // generated i18n message content) and first pass indicated that i18n content is present in a
          // template. During this pass i18n IDs generated at the first pass will be preserved, so we can
          // mimic existing extraction process (ng extract-i18n)

          if (i18nMetaVisitor.hasI18nMeta) {
            rootNodes = visitAll$1(new I18nMetaVisitor(interpolationConfig,
            /* keepI18nAttrs */
            false), rootNodes);
          }
        }

        var _htmlAstToRender3Ast = htmlAstToRender3Ast(rootNodes, bindingParser),
            nodes = _htmlAstToRender3Ast.nodes,
            errors = _htmlAstToRender3Ast.errors,
            styleUrls = _htmlAstToRender3Ast.styleUrls,
            styles = _htmlAstToRender3Ast.styles,
            ngContentSelectors = _htmlAstToRender3Ast.ngContentSelectors;

        return {
          interpolationConfig: interpolationConfig,
          preserveWhitespaces: preserveWhitespaces,
          errors: errors.length > 0 ? errors : null,
          template: template,
          nodes: nodes,
          styleUrls: styleUrls,
          styles: styles,
          ngContentSelectors: ngContentSelectors
        };
      }

      var elementRegistry = new DomElementSchemaRegistry();
      /**
       * Construct a `BindingParser` with a default configuration.
       */

      function makeBindingParser() {
        var interpolationConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_INTERPOLATION_CONFIG;
        return new BindingParser(new IvyParser(new Lexer()), interpolationConfig, elementRegistry, null, []);
      }

      function resolveSanitizationFn(context, isAttribute) {
        switch (context) {
          case SecurityContext.HTML:
            return importExpr(Identifiers$1.sanitizeHtml);

          case SecurityContext.SCRIPT:
            return importExpr(Identifiers$1.sanitizeScript);

          case SecurityContext.STYLE:
            // the compiler does not fill in an instruction for [style.prop?] binding
            // values because the style algorithm knows internally what props are subject
            // to sanitization (only [attr.style] values are explicitly sanitized)
            return isAttribute ? importExpr(Identifiers$1.sanitizeStyle) : null;

          case SecurityContext.URL:
            return importExpr(Identifiers$1.sanitizeUrl);

          case SecurityContext.RESOURCE_URL:
            return importExpr(Identifiers$1.sanitizeResourceUrl);

          default:
            return null;
        }
      }

      function trustedConstAttribute(tagName, attr) {
        var value = asLiteral(attr.value);

        switch (elementRegistry.securityContext(tagName, attr.name,
        /* isAttribute */
        true)) {
          case SecurityContext.HTML:
            return importExpr(Identifiers$1.trustConstantHtml).callFn([value], attr.valueSpan);

          case SecurityContext.SCRIPT:
            return importExpr(Identifiers$1.trustConstantScript).callFn([value], attr.valueSpan);

          case SecurityContext.RESOURCE_URL:
            return importExpr(Identifiers$1.trustConstantResourceUrl).callFn([value], attr.valueSpan);

          default:
            return value;
        }
      }

      function isSingleElementTemplate(children) {
        return children.length === 1 && children[0] instanceof Element;
      }

      function isTextNode(node) {
        return node instanceof Text || node instanceof BoundText || node instanceof Icu;
      }

      function hasTextChildrenOnly(children) {
        return children.every(isTextNode);
      }
      /** Name of the global variable that is used to determine if we use Closure translations or not */


      var NG_I18N_CLOSURE_MODE = 'ngI18nClosureMode';
      /**
       * Generate statements that define a given translation message.
       *
       * ```
       * var I18N_1;
       * if (typeof ngI18nClosureMode !== undefined && ngI18nClosureMode) {
       *     var MSG_EXTERNAL_XXX = goog.getMsg(
       *          "Some message with {$interpolation}!",
       *          { "interpolation": "\uFFFD0\uFFFD" }
       *     );
       *     I18N_1 = MSG_EXTERNAL_XXX;
       * }
       * else {
       *     I18N_1 = $localize`Some message with ${'\uFFFD0\uFFFD'}!`;
       * }
       * ```
       *
       * @param message The original i18n AST message node
       * @param variable The variable that will be assigned the translation, e.g. `I18N_1`.
       * @param closureVar The variable for Closure `goog.getMsg` calls, e.g. `MSG_EXTERNAL_XXX`.
       * @param params Object mapping placeholder names to their values (e.g.
       * `{ "interpolation": "\uFFFD0\uFFFD" }`).
       * @param transformFn Optional transformation function that will be applied to the translation (e.g.
       * post-processing).
       * @returns An array of statements that defined a given translation.
       */

      function getTranslationDeclStmts(message, variable, closureVar) {
        var params = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
        var transformFn = arguments.length > 4 ? arguments[4] : undefined;
        var statements = [declareI18nVariable(variable), ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable, message, closureVar, i18nFormatPlaceholderNames(params,
        /* useCamelCase */
        true)), createLocalizeStatements(variable, message, i18nFormatPlaceholderNames(params,
        /* useCamelCase */
        false)))];

        if (transformFn) {
          statements.push(new ExpressionStatement(variable.set(transformFn(variable))));
        }

        return statements;
      }
      /**
       * Create the expression that will be used to guard the closure mode block
       * It is equivalent to:
       *
       * ```
       * typeof ngI18nClosureMode !== undefined && ngI18nClosureMode
       * ```
       */


      function createClosureModeGuard() {
        return typeofExpr(variable(NG_I18N_CLOSURE_MODE)).notIdentical(literal('undefined', STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var EMPTY_ARRAY = []; // This regex matches any binding names that contain the "attr." prefix, e.g. "attr.required"
      // If there is a match, the first matching group will contain the attribute name to bind.

      var ATTR_REGEX = /attr\.([^\]]+)/;

      function baseDirectiveFields(meta, constantPool, bindingParser) {
        var definitionMap = new DefinitionMap();
        var selectors = parseSelectorToR3Selector(meta.selector); // e.g. `type: MyDirective`

        definitionMap.set('type', meta.internalType); // e.g. `selectors: [['', 'someDir', '']]`

        if (selectors.length > 0) {
          definitionMap.set('selectors', asLiteral(selectors));
        }

        if (meta.queries.length > 0) {
          // e.g. `contentQueries: (rf, ctx, dirIndex) => { ... }
          definitionMap.set('contentQueries', createContentQueriesFunction(meta.queries, constantPool, meta.name));
        }

        if (meta.viewQueries.length) {
          definitionMap.set('viewQuery', createViewQueriesFunction(meta.viewQueries, constantPool, meta.name));
        } // e.g. `hostBindings: (rf, ctx) => { ... }


        definitionMap.set('hostBindings', createHostBindingsFunction(meta.host, meta.typeSourceSpan, bindingParser, constantPool, meta.selector || '', meta.name, definitionMap)); // e.g 'inputs: {a: 'a'}`

        definitionMap.set('inputs', conditionallyCreateMapObjectLiteral(meta.inputs, true)); // e.g 'outputs: {a: 'a'}`

        definitionMap.set('outputs', conditionallyCreateMapObjectLiteral(meta.outputs));

        if (meta.exportAs !== null) {
          definitionMap.set('exportAs', literalArr(meta.exportAs.map(function (e) {
            return literal(e);
          })));
        }

        return definitionMap;
      }
      /**
       * Add features to the definition map.
       */


      function addFeatures(definitionMap, meta) {
        // e.g. `features: [NgOnChangesFeature]`
        var features = [];
        var providers = meta.providers;
        var viewProviders = meta.viewProviders;

        if (providers || viewProviders) {
          var args = [providers || new LiteralArrayExpr([])];

          if (viewProviders) {
            args.push(viewProviders);
          }

          features.push(importExpr(Identifiers$1.ProvidersFeature).callFn(args));
        }

        if (meta.usesInheritance) {
          features.push(importExpr(Identifiers$1.InheritDefinitionFeature));
        }

        if (meta.fullInheritance) {
          features.push(importExpr(Identifiers$1.CopyDefinitionFeature));
        }

        if (meta.lifecycle.usesOnChanges) {
          features.push(importExpr(Identifiers$1.NgOnChangesFeature));
        }

        if (features.length) {
          definitionMap.set('features', literalArr(features));
        }
      }
      /**
       * Compile a directive for the render3 runtime as defined by the `R3DirectiveMetadata`.
       */


      function compileDirectiveFromMetadata(meta, constantPool, bindingParser) {
        var definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);
        addFeatures(definitionMap, meta);
        var expression = importExpr(Identifiers$1.defineDirective).callFn([definitionMap.toLiteralMap()]);
        var typeParams = createDirectiveTypeParams(meta);
        var type = expressionType(importExpr(Identifiers$1.DirectiveDefWithMeta, typeParams));
        return {
          expression: expression,
          type: type
        };
      }
      /**
       * Compile a component for the render3 runtime as defined by the `R3ComponentMetadata`.
       */


      function compileComponentFromMetadata(meta, constantPool, bindingParser) {
        var definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);
        addFeatures(definitionMap, meta);
        var selector = meta.selector && CssSelector.parse(meta.selector);
        var firstSelector = selector && selector[0]; // e.g. `attr: ["class", ".my.app"]`
        // This is optional an only included if the first selector of a component specifies attributes.

        if (firstSelector) {
          var selectorAttributes = firstSelector.getAttrs();

          if (selectorAttributes.length) {
            definitionMap.set('attrs', constantPool.getConstLiteral(literalArr(selectorAttributes.map(function (value) {
              return value != null ? literal(value) : literal(undefined);
            })),
            /* forceShared */
            true));
          }
        } // Generate the CSS matcher that recognize directive


        var directiveMatcher = null;

        if (meta.directives.length > 0) {
          var matcher = new SelectorMatcher();

          var _iterator20 = _createForOfIteratorHelper(meta.directives),
              _step20;

          try {
            for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
              var _step20$value = _step20.value,
                  _selector = _step20$value.selector,
                  _expression = _step20$value.expression;
              matcher.addSelectables(CssSelector.parse(_selector), _expression);
            }
          } catch (err) {
            _iterator20.e(err);
          } finally {
            _iterator20.f();
          }

          directiveMatcher = matcher;
        } // e.g. `template: function MyComponent_Template(_ctx, _cm) {...}`


        var templateTypeName = meta.name;
        var templateName = templateTypeName ? "".concat(templateTypeName, "_Template") : null;
        var directivesUsed = new Set();
        var pipesUsed = new Set();
        var changeDetection = meta.changeDetection;
        var template = meta.template;
        var templateBuilder = new TemplateDefinitionBuilder(constantPool, BindingScope.createRootScope(), 0, templateTypeName, null, null, templateName, directiveMatcher, directivesUsed, meta.pipes, pipesUsed, Identifiers$1.namespaceHTML, meta.relativeContextFilePath, meta.i18nUseExternalIds);
        var templateFunctionExpression = templateBuilder.buildTemplateFunction(template.nodes, []); // We need to provide this so that dynamically generated components know what
        // projected content blocks to pass through to the component when it is instantiated.

        var ngContentSelectors = templateBuilder.getNgContentSelectors();

        if (ngContentSelectors) {
          definitionMap.set('ngContentSelectors', ngContentSelectors);
        } // e.g. `decls: 2`


        definitionMap.set('decls', literal(templateBuilder.getConstCount())); // e.g. `vars: 2`

        definitionMap.set('vars', literal(templateBuilder.getVarCount())); // Generate `consts` section of ComponentDef:
        // - either as an array:
        //   `consts: [['one', 'two'], ['three', 'four']]`
        // - or as a factory function in case additional statements are present (to support i18n):
        //   `consts: function() { var i18n_0; if (ngI18nClosureMode) {...} else {...} return [i18n_0]; }`

        var _templateBuilder$getC = templateBuilder.getConsts(),
            constExpressions = _templateBuilder$getC.constExpressions,
            prepareStatements = _templateBuilder$getC.prepareStatements;

        if (constExpressions.length > 0) {
          var constsExpr = literalArr(constExpressions); // Prepare statements are present - turn `consts` into a function.

          if (prepareStatements.length > 0) {
            constsExpr = fn([], [].concat(_toConsumableArray(prepareStatements), [new ReturnStatement(constsExpr)]));
          }

          definitionMap.set('consts', constsExpr);
        }

        definitionMap.set('template', templateFunctionExpression); // e.g. `directives: [MyDirective]`

        if (directivesUsed.size) {
          var directivesExpr = literalArr(Array.from(directivesUsed));

          if (meta.wrapDirectivesAndPipesInClosure) {
            directivesExpr = fn([], [new ReturnStatement(directivesExpr)]);
          }

          definitionMap.set('directives', directivesExpr);
        } // e.g. `pipes: [MyPipe]`


        if (pipesUsed.size) {
          var pipesExpr = literalArr(Array.from(pipesUsed));

          if (meta.wrapDirectivesAndPipesInClosure) {
            pipesExpr = fn([], [new ReturnStatement(pipesExpr)]);
          }

          definitionMap.set('pipes', pipesExpr);
        }

        if (meta.encapsulation === null) {
          meta.encapsulation = ViewEncapsulation.Emulated;
        } // e.g. `styles: [str1, str2]`


        if (meta.styles && meta.styles.length) {
          var styleValues = meta.encapsulation == ViewEncapsulation.Emulated ? compileStyles(meta.styles, CONTENT_ATTR, HOST_ATTR) : meta.styles;
          var strings = styleValues.map(function (str) {
            return constantPool.getConstLiteral(literal(str));
          });
          definitionMap.set('styles', literalArr(strings));
        } else if (meta.encapsulation === ViewEncapsulation.Emulated) {
          // If there is no style, don't generate css selectors on elements
          meta.encapsulation = ViewEncapsulation.None;
        } // Only set view encapsulation if it's not the default value


        if (meta.encapsulation !== ViewEncapsulation.Emulated) {
          definitionMap.set('encapsulation', literal(meta.encapsulation));
        } // e.g. `animation: [trigger('123', [])]`


        if (meta.animations !== null) {
          definitionMap.set('data', literalMap([{
            key: 'animation',
            value: meta.animations,
            quoted: false
          }]));
        } // Only set the change detection flag if it's defined and it's not the default.


        if (changeDetection != null && changeDetection !== ChangeDetectionStrategy.Default) {
          definitionMap.set('changeDetection', literal(changeDetection));
        }

        var expression = importExpr(Identifiers$1.defineComponent).callFn([definitionMap.toLiteralMap()]);
        var typeParams = createDirectiveTypeParams(meta);
        typeParams.push(stringArrayAsType(meta.template.ngContentSelectors));
        var type = expressionType(importExpr(Identifiers$1.ComponentDefWithMeta, typeParams));
        return {
          expression: expression,
          type: type
        };
      }
      /**
       * A wrapper around `compileDirective` which depends on render2 global analysis data as its input
       * instead of the `R3DirectiveMetadata`.
       *
       * `R3DirectiveMetadata` is computed from `CompileDirectiveMetadata` and other statically reflected
       * information.
       */


      function compileDirectiveFromRender2(outputCtx, directive, reflector, bindingParser) {
        var name = identifierName(directive.type);
        name || error("Cannot resolver the name of ".concat(directive.type));
        var definitionField = outputCtx.constantPool.propertyNameOf(1
        /* Directive */
        );
        var meta = directiveMetadataFromGlobalMetadata(directive, outputCtx, reflector);
        var res = compileDirectiveFromMetadata(meta, outputCtx.constantPool, bindingParser);
        var factoryRes = compileFactoryFunction(Object.assign(Object.assign({}, meta), {
          injectFn: Identifiers$1.directiveInject,
          target: R3FactoryTarget.Directive
        }));
        var ngFactoryDefStatement = new ClassStmt(name, null, [new ClassField('ɵfac', INFERRED_TYPE, [StmtModifier.Static], factoryRes.factory)], [], new ClassMethod(null, [], []), []);
        var directiveDefStatement = new ClassStmt(name, null, [new ClassField(definitionField, INFERRED_TYPE, [StmtModifier.Static], res.expression)], [], new ClassMethod(null, [], []), []); // Create the partial class to be merged with the actual class.

        outputCtx.statements.push(ngFactoryDefStatement, directiveDefStatement);
      }
      /**
       * A wrapper around `compileComponent` which depends on render2 global analysis data as its input
       * instead of the `R3DirectiveMetadata`.
       *
       * `R3ComponentMetadata` is computed from `CompileDirectiveMetadata` and other statically reflected
       * information.
       */


      function compileComponentFromRender2(outputCtx, component, render3Ast, reflector, bindingParser, directiveTypeBySel, pipeTypeByName) {
        var name = identifierName(component.type);
        name || error("Cannot resolver the name of ".concat(component.type));
        var definitionField = outputCtx.constantPool.propertyNameOf(2
        /* Component */
        );
        var summary = component.toSummary(); // Compute the R3ComponentMetadata from the CompileDirectiveMetadata

        var meta = Object.assign(Object.assign({}, directiveMetadataFromGlobalMetadata(component, outputCtx, reflector)), {
          selector: component.selector,
          template: {
            nodes: render3Ast.nodes,
            ngContentSelectors: render3Ast.ngContentSelectors
          },
          directives: [],
          pipes: typeMapToExpressionMap(pipeTypeByName, outputCtx),
          viewQueries: queriesFromGlobalMetadata(component.viewQueries, outputCtx),
          wrapDirectivesAndPipesInClosure: false,
          styles: summary.template && summary.template.styles || EMPTY_ARRAY,
          encapsulation: summary.template && summary.template.encapsulation || ViewEncapsulation.Emulated,
          interpolation: DEFAULT_INTERPOLATION_CONFIG,
          animations: null,
          viewProviders: component.viewProviders.length > 0 ? new WrappedNodeExpr(component.viewProviders) : null,
          relativeContextFilePath: '',
          i18nUseExternalIds: true
        });
        var res = compileComponentFromMetadata(meta, outputCtx.constantPool, bindingParser);
        var factoryRes = compileFactoryFunction(Object.assign(Object.assign({}, meta), {
          injectFn: Identifiers$1.directiveInject,
          target: R3FactoryTarget.Directive
        }));
        var ngFactoryDefStatement = new ClassStmt(name, null, [new ClassField('ɵfac', INFERRED_TYPE, [StmtModifier.Static], factoryRes.factory)], [], new ClassMethod(null, [], []), []);
        var componentDefStatement = new ClassStmt(name, null, [new ClassField(definitionField, INFERRED_TYPE, [StmtModifier.Static], res.expression)], [], new ClassMethod(null, [], []), []); // Create the partial class to be merged with the actual class.

        outputCtx.statements.push(ngFactoryDefStatement, componentDefStatement);
      }
      /**
       * Compute `R3DirectiveMetadata` given `CompileDirectiveMetadata` and a `CompileReflector`.
       */


      function directiveMetadataFromGlobalMetadata(directive, outputCtx, reflector) {
        // The global-analysis based Ivy mode in ngc is no longer utilized/supported.
        throw new Error('unsupported');
      }
      /**
       * Convert `CompileQueryMetadata` into `R3QueryMetadata`.
       */


      function queriesFromGlobalMetadata(queries, outputCtx) {
        return queries.map(function (query) {
          var read = null;

          if (query.read && query.read.identifier) {
            read = outputCtx.importExpr(query.read.identifier.reference);
          }

          return {
            propertyName: query.propertyName,
            first: query.first,
            predicate: selectorsFromGlobalMetadata(query.selectors, outputCtx),
            descendants: query.descendants,
            read: read,
            "static": !!query["static"]
          };
        });
      }
      /**
       * Convert `CompileTokenMetadata` for query selectors into either an expression for a predicate
       * type, or a list of string predicates.
       */


      function selectorsFromGlobalMetadata(selectors, outputCtx) {
        if (selectors.length > 1 || selectors.length == 1 && selectors[0].value) {
          var selectorStrings = selectors.map(function (value) {
            return value.value;
          });
          selectorStrings.some(function (value) {
            return !value;
          }) && error('Found a type among the string selectors expected');
          return outputCtx.constantPool.getConstLiteral(literalArr(selectorStrings.map(function (value) {
            return literal(value);
          })));
        }

        if (selectors.length == 1) {
          var first = selectors[0];

          if (first.identifier) {
            return outputCtx.importExpr(first.identifier.reference);
          }
        }

        error('Unexpected query form');
        return NULL_EXPR;
      }

      function prepareQueryParams(query, constantPool) {
        var parameters = [getQueryPredicate(query, constantPool), literal(query.descendants)];

        if (query.read) {
          parameters.push(query.read);
        }

        return parameters;
      }

      function convertAttributesToExpressions(attributes) {
        var values = [];

        var _iterator21 = _createForOfIteratorHelper(Object.getOwnPropertyNames(attributes)),
            _step21;

        try {
          for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
            var key = _step21.value;
            var value = attributes[key];
            values.push(literal(key), value);
          }
        } catch (err) {
          _iterator21.e(err);
        } finally {
          _iterator21.f();
        }

        return values;
      } // Define and update any content queries


      function createContentQueriesFunction(queries, constantPool, name) {
        var createStatements = [];
        var updateStatements = [];
        var tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);

        var _iterator22 = _createForOfIteratorHelper(queries),
            _step22;

        try {
          for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
            var query = _step22.value;
            var queryInstruction = query["static"] ? Identifiers$1.staticContentQuery : Identifiers$1.contentQuery; // creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null);

            createStatements.push(importExpr(queryInstruction).callFn([variable('dirIndex')].concat(_toConsumableArray(prepareQueryParams(query, constantPool)))).toStmt()); // update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));

            var temporary = tempAllocator();
            var getQueryList = importExpr(Identifiers$1.loadQuery).callFn([]);
            var refresh = importExpr(Identifiers$1.queryRefresh).callFn([temporary.set(getQueryList)]);
            var updateDirective = variable(CONTEXT_NAME).prop(query.propertyName).set(query.first ? temporary.prop('first') : temporary);
            updateStatements.push(refresh.and(updateDirective).toStmt());
          }
        } catch (err) {
          _iterator22.e(err);
        } finally {
          _iterator22.f();
        }

        var contentQueriesFnName = name ? "".concat(name, "_ContentQueries") : null;
        return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null), new FnParam('dirIndex', null)], [renderFlagCheckIfStmt(1
        /* Create */
        , createStatements), renderFlagCheckIfStmt(2
        /* Update */
        , updateStatements)], INFERRED_TYPE, null, contentQueriesFnName);
      }

      function stringAsType(str) {
        return expressionType(literal(str));
      }

      function stringMapAsType(map) {
        var mapValues = Object.keys(map).map(function (key) {
          var value = Array.isArray(map[key]) ? map[key][0] : map[key];
          return {
            key: key,
            value: literal(value),
            quoted: true
          };
        });
        return expressionType(literalMap(mapValues));
      }

      function stringArrayAsType(arr) {
        return arr.length > 0 ? expressionType(literalArr(arr.map(function (value) {
          return literal(value);
        }))) : NONE_TYPE;
      }

      function createDirectiveTypeParams(meta) {
        // On the type side, remove newlines from the selector as it will need to fit into a TypeScript
        // string literal, which must be on one line.
        var selectorForType = meta.selector !== null ? meta.selector.replace(/\n/g, '') : null;
        return [typeWithParameters(meta.type.type, meta.typeArgumentCount), selectorForType !== null ? stringAsType(selectorForType) : NONE_TYPE, meta.exportAs !== null ? stringArrayAsType(meta.exportAs) : NONE_TYPE, stringMapAsType(meta.inputs), stringMapAsType(meta.outputs), stringArrayAsType(meta.queries.map(function (q) {
          return q.propertyName;
        }))];
      } // Define and update any view queries


      function createViewQueriesFunction(viewQueries, constantPool, name) {
        var createStatements = [];
        var updateStatements = [];
        var tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);
        viewQueries.forEach(function (query) {
          var queryInstruction = query["static"] ? Identifiers$1.staticViewQuery : Identifiers$1.viewQuery; // creation, e.g. r3.viewQuery(somePredicate, true);

          var queryDefinition = importExpr(queryInstruction).callFn(prepareQueryParams(query, constantPool));
          createStatements.push(queryDefinition.toStmt()); // update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));

          var temporary = tempAllocator();
          var getQueryList = importExpr(Identifiers$1.loadQuery).callFn([]);
          var refresh = importExpr(Identifiers$1.queryRefresh).callFn([temporary.set(getQueryList)]);
          var updateDirective = variable(CONTEXT_NAME).prop(query.propertyName).set(query.first ? temporary.prop('first') : temporary);
          updateStatements.push(refresh.and(updateDirective).toStmt());
        });
        var viewQueryFnName = name ? "".concat(name, "_Query") : null;
        return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [renderFlagCheckIfStmt(1
        /* Create */
        , createStatements), renderFlagCheckIfStmt(2
        /* Update */
        , updateStatements)], INFERRED_TYPE, null, viewQueryFnName);
      } // Return a host binding function or null if one is not necessary.


      function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindingParser, constantPool, selector, name, definitionMap) {
        var bindingContext = variable(CONTEXT_NAME);
        var styleBuilder = new StylingBuilder(bindingContext);
        var _hostBindingsMetadata = hostBindingsMetadata.specialAttributes,
            styleAttr = _hostBindingsMetadata.styleAttr,
            classAttr = _hostBindingsMetadata.classAttr;

        if (styleAttr !== undefined) {
          styleBuilder.registerStyleAttr(styleAttr);
        }

        if (classAttr !== undefined) {
          styleBuilder.registerClassAttr(classAttr);
        }

        var createStatements = [];
        var updateStatements = [];
        var hostBindingSourceSpan = typeSourceSpan;
        var directiveSummary = metadataAsSummary(hostBindingsMetadata); // Calculate host event bindings

        var eventBindings = bindingParser.createDirectiveHostEventAsts(directiveSummary, hostBindingSourceSpan);

        if (eventBindings && eventBindings.length) {
          var listeners = createHostListeners(eventBindings, name);
          createStatements.push.apply(createStatements, _toConsumableArray(listeners));
        } // Calculate the host property bindings


        var bindings = bindingParser.createBoundHostProperties(directiveSummary, hostBindingSourceSpan);
        var allOtherBindings = []; // We need to calculate the total amount of binding slots required by
        // all the instructions together before any value conversions happen.
        // Value conversions may require additional slots for interpolation and
        // bindings with pipes. These calculates happen after this block.

        var totalHostVarsCount = 0;
        bindings && bindings.forEach(function (binding) {
          var stylingInputWasSet = styleBuilder.registerInputBasedOnName(binding.name, binding.expression, hostBindingSourceSpan);

          if (stylingInputWasSet) {
            totalHostVarsCount += MIN_STYLING_BINDING_SLOTS_REQUIRED;
          } else {
            allOtherBindings.push(binding);
            totalHostVarsCount++;
          }
        });
        var valueConverter;

        var getValueConverter = function getValueConverter() {
          if (!valueConverter) {
            var hostVarsCountFn = function hostVarsCountFn(numSlots) {
              var originalVarsCount = totalHostVarsCount;
              totalHostVarsCount += numSlots;
              return originalVarsCount;
            };

            valueConverter = new ValueConverter(constantPool, function () {
              return error('Unexpected node');
            }, // new nodes are illegal here
            hostVarsCountFn, function () {
              return error('Unexpected pipe');
            }); // pipes are illegal here
          }

          return valueConverter;
        };

        var propertyBindings = [];
        var attributeBindings = [];
        var syntheticHostBindings = [];
        allOtherBindings.forEach(function (binding) {
          // resolve literal arrays and literal objects
          var value = binding.expression.visit(getValueConverter());
          var bindingExpr = bindingFn(bindingContext, value);

          var _getBindingNameAndIns = getBindingNameAndInstruction(binding),
              bindingName = _getBindingNameAndIns.bindingName,
              instruction = _getBindingNameAndIns.instruction,
              isAttribute = _getBindingNameAndIns.isAttribute;

          var securityContexts = bindingParser.calcPossibleSecurityContexts(selector, bindingName, isAttribute).filter(function (context) {
            return context !== SecurityContext.NONE;
          });
          var sanitizerFn = null;

          if (securityContexts.length) {
            if (securityContexts.length === 2 && securityContexts.indexOf(SecurityContext.URL) > -1 && securityContexts.indexOf(SecurityContext.RESOURCE_URL) > -1) {
              // Special case for some URL attributes (such as "src" and "href") that may be a part
              // of different security contexts. In this case we use special santitization function and
              // select the actual sanitizer at runtime based on a tag name that is provided while
              // invoking sanitization function.
              sanitizerFn = importExpr(Identifiers$1.sanitizeUrlOrResourceUrl);
            } else {
              sanitizerFn = resolveSanitizationFn(securityContexts[0], isAttribute);
            }
          }

          var instructionParams = [literal(bindingName), bindingExpr.currValExpr];

          if (sanitizerFn) {
            instructionParams.push(sanitizerFn);
          }

          updateStatements.push.apply(updateStatements, _toConsumableArray(bindingExpr.stmts));

          if (instruction === Identifiers$1.hostProperty) {
            propertyBindings.push(instructionParams);
          } else if (instruction === Identifiers$1.attribute) {
            attributeBindings.push(instructionParams);
          } else if (instruction === Identifiers$1.syntheticHostProperty) {
            syntheticHostBindings.push(instructionParams);
          } else {
            updateStatements.push(importExpr(instruction).callFn(instructionParams).toStmt());
          }
        });

        if (propertyBindings.length > 0) {
          updateStatements.push(chainedInstruction(Identifiers$1.hostProperty, propertyBindings).toStmt());
        }

        if (attributeBindings.length > 0) {
          updateStatements.push(chainedInstruction(Identifiers$1.attribute, attributeBindings).toStmt());
        }

        if (syntheticHostBindings.length > 0) {
          updateStatements.push(chainedInstruction(Identifiers$1.syntheticHostProperty, syntheticHostBindings).toStmt());
        } // since we're dealing with directives/components and both have hostBinding
        // functions, we need to generate a special hostAttrs instruction that deals
        // with both the assignment of styling as well as static attributes to the host
        // element. The instruction below will instruct all initial styling (styling
        // that is inside of a host binding within a directive/component) to be attached
        // to the host element alongside any of the provided host attributes that were
        // collected earlier.


        var hostAttrs = convertAttributesToExpressions(hostBindingsMetadata.attributes);
        styleBuilder.assignHostAttrs(hostAttrs, definitionMap);

        if (styleBuilder.hasBindings) {
          // finally each binding that was registered in the statement above will need to be added to
          // the update block of a component/directive templateFn/hostBindingsFn so that the bindings
          // are evaluated and updated for the element.
          styleBuilder.buildUpdateLevelInstructions(getValueConverter()).forEach(function (instruction) {
            if (instruction.calls.length > 0) {
              var calls = [];
              instruction.calls.forEach(function (call) {
                // we subtract a value of `1` here because the binding slot was already allocated
                // at the top of this method when all the input bindings were counted.
                totalHostVarsCount += Math.max(call.allocateBindingSlots - MIN_STYLING_BINDING_SLOTS_REQUIRED, 0);
                calls.push(convertStylingCall(call, bindingContext, bindingFn));
              });
              updateStatements.push(chainedInstruction(instruction.reference, calls).toStmt());
            }
          });
        }

        if (totalHostVarsCount) {
          definitionMap.set('hostVars', literal(totalHostVarsCount));
        }

        if (createStatements.length > 0 || updateStatements.length > 0) {
          var hostBindingsFnName = name ? "".concat(name, "_HostBindings") : null;
          var statements = [];

          if (createStatements.length > 0) {
            statements.push(renderFlagCheckIfStmt(1
            /* Create */
            , createStatements));
          }

          if (updateStatements.length > 0) {
            statements.push(renderFlagCheckIfStmt(2
            /* Update */
            , updateStatements));
          }

          return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], statements, INFERRED_TYPE, null, hostBindingsFnName);
        }

        return null;
      }

      function bindingFn(implicit, value) {
        return _convertPropertyBinding(null, implicit, value, 'b', BindingForm.Expression, function () {
          return error('Unexpected interpolation');
        });
      }

      function convertStylingCall(call, bindingContext, bindingFn) {
        return call.params(function (value) {
          return bindingFn(bindingContext, value).currValExpr;
        });
      }

      function getBindingNameAndInstruction(binding) {
        var bindingName = binding.name;
        var instruction; // Check to see if this is an attr binding or a property binding

        var attrMatches = bindingName.match(ATTR_REGEX);

        if (attrMatches) {
          bindingName = attrMatches[1];
          instruction = Identifiers$1.attribute;
        } else {
          if (binding.isAnimation) {
            bindingName = prepareSyntheticPropertyName(bindingName); // host bindings that have a synthetic property (e.g. @foo) should always be rendered
            // in the context of the component and not the parent. Therefore there is a special
            // compatibility instruction available for this purpose.

            instruction = Identifiers$1.syntheticHostProperty;
          } else {
            instruction = Identifiers$1.hostProperty;
          }
        }

        return {
          bindingName: bindingName,
          instruction: instruction,
          isAttribute: !!attrMatches
        };
      }

      function createHostListeners(eventBindings, name) {
        var listeners = [];
        var syntheticListeners = [];
        var instructions = [];
        eventBindings.forEach(function (binding) {
          var bindingName = binding.name && sanitizeIdentifier(binding.name);
          var bindingFnName = binding.type === 1
          /* Animation */
          ? prepareSyntheticListenerFunctionName(bindingName, binding.targetOrPhase) : bindingName;
          var handlerName = name && bindingName ? "".concat(name, "_").concat(bindingFnName, "_HostBindingHandler") : null;
          var params = prepareEventListenerParameters(BoundEvent.fromParsedEvent(binding), handlerName);

          if (binding.type == 1
          /* Animation */
          ) {
            syntheticListeners.push(params);
          } else {
            listeners.push(params);
          }
        });

        if (syntheticListeners.length > 0) {
          instructions.push(chainedInstruction(Identifiers$1.syntheticHostListener, syntheticListeners).toStmt());
        }

        if (listeners.length > 0) {
          instructions.push(chainedInstruction(Identifiers$1.listener, listeners).toStmt());
        }

        return instructions;
      }

      function metadataAsSummary(meta) {
        // clang-format off
        return {
          // This is used by the BindingParser, which only deals with listeners and properties. There's no
          // need to pass attributes to it.
          hostAttributes: {},
          hostListeners: meta.listeners,
          hostProperties: meta.properties
        }; // clang-format on
      }

      function typeMapToExpressionMap(map, outputCtx) {
        // Convert each map entry into another entry where the value is an expression importing the type.
        var entries = Array.from(map).map(function (_ref20) {
          var _ref21 = _slicedToArray(_ref20, 2),
              key = _ref21[0],
              type = _ref21[1];

          return [key, outputCtx.importExpr(type)];
        });
        return new Map(entries);
      }

      var HOST_REG_EXP$1 = /^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;

      function parseHostBindings(host) {
        var attributes = {};
        var listeners = {};
        var properties = {};
        var specialAttributes = {};

        for (var _i9 = 0, _Object$keys2 = Object.keys(host); _i9 < _Object$keys2.length; _i9++) {
          var key = _Object$keys2[_i9];
          var value = host[key];
          var matches = key.match(HOST_REG_EXP$1);

          if (matches === null) {
            switch (key) {
              case 'class':
                if (typeof value !== 'string') {
                  // TODO(alxhub): make this a diagnostic.
                  throw new Error("Class binding must be string");
                }

                specialAttributes.classAttr = value;
                break;

              case 'style':
                if (typeof value !== 'string') {
                  // TODO(alxhub): make this a diagnostic.
                  throw new Error("Style binding must be string");
                }

                specialAttributes.styleAttr = value;
                break;

              default:
                if (typeof value === 'string') {
                  attributes[key] = literal(value);
                } else {
                  attributes[key] = value;
                }

            }
          } else if (matches[1
          /* Binding */
          ] != null) {
            if (typeof value !== 'string') {
              // TODO(alxhub): make this a diagnostic.
              throw new Error("Property binding must be string");
            } // synthetic properties (the ones that have a `@` as a prefix)
            // are still treated the same as regular properties. Therefore
            // there is no point in storing them in a separate map.


            properties[matches[1
            /* Binding */
            ]] = value;
          } else if (matches[2
          /* Event */
          ] != null) {
            if (typeof value !== 'string') {
              // TODO(alxhub): make this a diagnostic.
              throw new Error("Event binding must be string");
            }

            listeners[matches[2
            /* Event */
            ]] = value;
          }
        }

        return {
          attributes: attributes,
          listeners: listeners,
          properties: properties,
          specialAttributes: specialAttributes
        };
      }
      /**
       * Verifies host bindings and returns the list of errors (if any). Empty array indicates that a
       * given set of host bindings has no errors.
       *
       * @param bindings set of host bindings to verify.
       * @param sourceSpan source span where host bindings were defined.
       * @returns array of errors associated with a given set of host bindings.
       */


      function verifyHostBindings(bindings, sourceSpan) {
        var summary = metadataAsSummary(bindings); // TODO: abstract out host bindings verification logic and use it instead of
        // creating events and properties ASTs to detect errors (FW-996)

        var bindingParser = makeBindingParser();
        bindingParser.createDirectiveHostEventAsts(summary, sourceSpan);
        bindingParser.createBoundHostProperties(summary, sourceSpan);
        return bindingParser.errors;
      }

      function compileStyles(styles, selector, hostSelector) {
        var shadowCss = new ShadowCss();
        return styles.map(function (style) {
          return shadowCss.shimCssText(style, selector, hostSelector);
        });
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * An interface for retrieving documents by URL that the compiler uses
       * to load templates.
       */


      var ResourceLoader = /*#__PURE__*/function () {
        function ResourceLoader() {
          _classCallCheck(this, ResourceLoader);
        }

        _createClass2(ResourceLoader, [{
          key: "get",
          value: function get(url) {
            return '';
          }
        }]);

        return ResourceLoader;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var CompilerFacadeImpl = /*#__PURE__*/function () {
        function CompilerFacadeImpl() {
          var jitEvaluator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new JitEvaluator();

          _classCallCheck(this, CompilerFacadeImpl);

          this.jitEvaluator = jitEvaluator;
          this.R3ResolvedDependencyType = R3ResolvedDependencyType;
          this.R3FactoryTarget = R3FactoryTarget;
          this.ResourceLoader = ResourceLoader;
          this.elementSchemaRegistry = new DomElementSchemaRegistry();
        }

        _createClass2(CompilerFacadeImpl, [{
          key: "compilePipe",
          value: function compilePipe(angularCoreEnv, sourceMapUrl, facade) {
            var metadata = {
              name: facade.name,
              type: wrapReference$1(facade.type),
              internalType: new WrappedNodeExpr(facade.type),
              typeArgumentCount: facade.typeArgumentCount,
              deps: convertR3DependencyMetadataArray(facade.deps),
              pipeName: facade.pipeName,
              pure: facade.pure
            };
            var res = compilePipeFromMetadata(metadata);
            return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);
          }
        }, {
          key: "compileInjectable",
          value: function compileInjectable(angularCoreEnv, sourceMapUrl, facade) {
            var _compileInjectable2 = _compileInjectable({
              name: facade.name,
              type: wrapReference$1(facade.type),
              internalType: new WrappedNodeExpr(facade.type),
              typeArgumentCount: facade.typeArgumentCount,
              providedIn: computeProvidedIn(facade.providedIn),
              useClass: wrapExpression(facade, USE_CLASS),
              useFactory: wrapExpression(facade, USE_FACTORY),
              useValue: wrapExpression(facade, USE_VALUE),
              useExisting: wrapExpression(facade, USE_EXISTING),
              userDeps: convertR3DependencyMetadataArray(facade.userDeps) || undefined
            }),
                expression = _compileInjectable2.expression,
                statements = _compileInjectable2.statements;

            return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, statements);
          }
        }, {
          key: "compileInjector",
          value: function compileInjector(angularCoreEnv, sourceMapUrl, facade) {
            var meta = {
              name: facade.name,
              type: wrapReference$1(facade.type),
              internalType: new WrappedNodeExpr(facade.type),
              deps: convertR3DependencyMetadataArray(facade.deps),
              providers: new WrappedNodeExpr(facade.providers),
              imports: facade.imports.map(function (i) {
                return new WrappedNodeExpr(i);
              })
            };

            var res = _compileInjector(meta);

            return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, res.statements);
          }
        }, {
          key: "compileNgModule",
          value: function compileNgModule(angularCoreEnv, sourceMapUrl, facade) {
            var meta = {
              type: wrapReference$1(facade.type),
              internalType: new WrappedNodeExpr(facade.type),
              adjacentType: new WrappedNodeExpr(facade.type),
              bootstrap: facade.bootstrap.map(wrapReference$1),
              declarations: facade.declarations.map(wrapReference$1),
              imports: facade.imports.map(wrapReference$1),
              exports: facade.exports.map(wrapReference$1),
              emitInline: true,
              containsForwardDecls: false,
              schemas: facade.schemas ? facade.schemas.map(wrapReference$1) : null,
              id: facade.id ? new WrappedNodeExpr(facade.id) : null
            };

            var res = _compileNgModule(meta);

            return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);
          }
        }, {
          key: "compileDirective",
          value: function compileDirective(angularCoreEnv, sourceMapUrl, facade) {
            var constantPool = new ConstantPool();
            var bindingParser = makeBindingParser();
            var meta = convertDirectiveFacadeToMetadata(facade);
            var res = compileDirectiveFromMetadata(meta, constantPool, bindingParser);
            return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, constantPool.statements);
          }
        }, {
          key: "compileComponent",
          value: function compileComponent(angularCoreEnv, sourceMapUrl, facade) {
            // The ConstantPool is a requirement of the JIT'er.
            var constantPool = new ConstantPool();
            var interpolationConfig = facade.interpolation ? InterpolationConfig.fromArray(facade.interpolation) : DEFAULT_INTERPOLATION_CONFIG; // Parse the template and check for errors.

            var template = parseTemplate(facade.template, sourceMapUrl, {
              preserveWhitespaces: facade.preserveWhitespaces,
              interpolationConfig: interpolationConfig
            });

            if (template.errors !== null) {
              var errors = template.errors.map(function (err) {
                return err.toString();
              }).join(', ');
              throw new Error("Errors during JIT compilation of template for ".concat(facade.name, ": ").concat(errors));
            } // Compile the component metadata, including template, into an expression.
            // TODO(alxhub): implement inputs, outputs, queries, etc.


            var metadata = Object.assign(Object.assign(Object.assign({}, facade), convertDirectiveFacadeToMetadata(facade)), {
              selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(),
              template: template,
              wrapDirectivesAndPipesInClosure: false,
              styles: [].concat(_toConsumableArray(facade.styles), _toConsumableArray(template.styles)),
              encapsulation: facade.encapsulation,
              interpolation: interpolationConfig,
              changeDetection: facade.changeDetection,
              animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null,
              viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) : null,
              relativeContextFilePath: '',
              i18nUseExternalIds: true
            });
            var res = compileComponentFromMetadata(metadata, constantPool, makeBindingParser(interpolationConfig));
            var jitExpressionSourceMap = "ng:///".concat(facade.name, ".js");
            return this.jitExpression(res.expression, angularCoreEnv, jitExpressionSourceMap, constantPool.statements);
          }
        }, {
          key: "compileFactory",
          value: function compileFactory(angularCoreEnv, sourceMapUrl, meta) {
            var factoryRes = compileFactoryFunction({
              name: meta.name,
              type: wrapReference$1(meta.type),
              internalType: new WrappedNodeExpr(meta.type),
              typeArgumentCount: meta.typeArgumentCount,
              deps: convertR3DependencyMetadataArray(meta.deps),
              injectFn: meta.injectFn === 'directiveInject' ? Identifiers.directiveInject : Identifiers.inject,
              target: meta.target
            });
            return this.jitExpression(factoryRes.factory, angularCoreEnv, sourceMapUrl, factoryRes.statements);
          }
        }, {
          key: "createParseSourceSpan",
          value: function createParseSourceSpan(kind, typeName, sourceUrl) {
            return r3JitTypeSourceSpan(kind, typeName, sourceUrl);
          }
          /**
           * JIT compiles an expression and returns the result of executing that expression.
           *
           * @param def the definition which will be compiled and executed to get the value to patch
           * @param context an object map of @angular/core symbol names to symbols which will be available
           * in the context of the compiled expression
           * @param sourceUrl a URL to use for the source map of the compiled expression
           * @param preStatements a collection of statements that should be evaluated before the expression.
           */

        }, {
          key: "jitExpression",
          value: function jitExpression(def, context, sourceUrl, preStatements) {
            // The ConstantPool may contain Statements which declare variables used in the final expression.
            // Therefore, its statements need to precede the actual JIT operation. The final statement is a
            // declaration of $def which is set to the expression being compiled.
            var statements = [].concat(_toConsumableArray(preStatements), [new DeclareVarStmt('$def', def, undefined, [StmtModifier.Exported])]);
            var res = this.jitEvaluator.evaluateStatements(sourceUrl, statements, new R3JitReflector(context),
            /* enableSourceMaps */
            true);
            return res['$def'];
          }
        }]);

        return CompilerFacadeImpl;
      }();

      var USE_CLASS = Object.keys({
        useClass: null
      })[0];
      var USE_FACTORY = Object.keys({
        useFactory: null
      })[0];
      var USE_VALUE = Object.keys({
        useValue: null
      })[0];
      var USE_EXISTING = Object.keys({
        useExisting: null
      })[0];

      var wrapReference$1 = function wrapReference$1(value) {
        var wrapped = new WrappedNodeExpr(value);
        return {
          value: wrapped,
          type: wrapped
        };
      };

      function convertToR3QueryMetadata(facade) {
        return Object.assign(Object.assign({}, facade), {
          predicate: Array.isArray(facade.predicate) ? facade.predicate : new WrappedNodeExpr(facade.predicate),
          read: facade.read ? new WrappedNodeExpr(facade.read) : null,
          "static": facade["static"]
        });
      }

      function convertDirectiveFacadeToMetadata(facade) {
        var inputsFromMetadata = parseInputOutputs(facade.inputs || []);
        var outputsFromMetadata = parseInputOutputs(facade.outputs || []);
        var propMetadata = facade.propMetadata;
        var inputsFromType = {};
        var outputsFromType = {};

        var _loop = function _loop(field) {
          if (propMetadata.hasOwnProperty(field)) {
            propMetadata[field].forEach(function (ann) {
              if (isInput(ann)) {
                inputsFromType[field] = ann.bindingPropertyName ? [ann.bindingPropertyName, field] : field;
              } else if (isOutput(ann)) {
                outputsFromType[field] = ann.bindingPropertyName || field;
              }
            });
          }
        };

        for (var field in propMetadata) {
          _loop(field);
        }

        return Object.assign(Object.assign({}, facade), {
          typeSourceSpan: facade.typeSourceSpan,
          type: wrapReference$1(facade.type),
          internalType: new WrappedNodeExpr(facade.type),
          deps: convertR3DependencyMetadataArray(facade.deps),
          host: extractHostBindings(facade.propMetadata, facade.typeSourceSpan, facade.host),
          inputs: Object.assign(Object.assign({}, inputsFromMetadata), inputsFromType),
          outputs: Object.assign(Object.assign({}, outputsFromMetadata), outputsFromType),
          queries: facade.queries.map(convertToR3QueryMetadata),
          providers: facade.providers != null ? new WrappedNodeExpr(facade.providers) : null,
          viewQueries: facade.viewQueries.map(convertToR3QueryMetadata),
          fullInheritance: false
        });
      }

      function wrapExpression(obj, property) {
        if (obj.hasOwnProperty(property)) {
          return new WrappedNodeExpr(obj[property]);
        } else {
          return undefined;
        }
      }

      function computeProvidedIn(providedIn) {
        if (providedIn == null || typeof providedIn === 'string') {
          return new LiteralExpr(providedIn);
        } else {
          return new WrappedNodeExpr(providedIn);
        }
      }

      function convertR3DependencyMetadata(facade) {
        var tokenExpr;

        if (facade.token === null) {
          tokenExpr = new LiteralExpr(null);
        } else if (facade.resolved === R3ResolvedDependencyType.Attribute) {
          tokenExpr = new LiteralExpr(facade.token);
        } else {
          tokenExpr = new WrappedNodeExpr(facade.token);
        }

        return {
          token: tokenExpr,
          attribute: null,
          resolved: facade.resolved,
          host: facade.host,
          optional: facade.optional,
          self: facade.self,
          skipSelf: facade.skipSelf
        };
      }

      function convertR3DependencyMetadataArray(facades) {
        return facades == null ? null : facades.map(convertR3DependencyMetadata);
      }

      function extractHostBindings(propMetadata, sourceSpan, host) {
        // First parse the declarations from the metadata.
        var bindings = parseHostBindings(host || {}); // After that check host bindings for errors

        var errors = verifyHostBindings(bindings, sourceSpan);

        if (errors.length) {
          throw new Error(errors.map(function (error) {
            return error.msg;
          }).join('\n'));
        } // Next, loop over the properties of the object, looking for @HostBinding and @HostListener.


        var _loop2 = function _loop2(field) {
          if (propMetadata.hasOwnProperty(field)) {
            propMetadata[field].forEach(function (ann) {
              if (isHostBinding(ann)) {
                bindings.properties[ann.hostPropertyName || field] = field;
              } else if (isHostListener(ann)) {
                bindings.listeners[ann.eventName || field] = "".concat(field, "(").concat((ann.args || []).join(','), ")");
              }
            });
          }
        };

        for (var field in propMetadata) {
          _loop2(field);
        }

        return bindings;
      }

      function isHostBinding(value) {
        return value.ngMetadataName === 'HostBinding';
      }

      function isHostListener(value) {
        return value.ngMetadataName === 'HostListener';
      }

      function isInput(value) {
        return value.ngMetadataName === 'Input';
      }

      function isOutput(value) {
        return value.ngMetadataName === 'Output';
      }

      function parseInputOutputs(values) {
        return values.reduce(function (map, value) {
          var _value$split$map = value.split(',').map(function (piece) {
            return piece.trim();
          }),
              _value$split$map2 = _slicedToArray(_value$split$map, 2),
              field = _value$split$map2[0],
              property = _value$split$map2[1];

          map[field] = property || field;
          return map;
        }, {});
      }

      function publishFacade(global) {
        var ng = global.ng || (global.ng = {});
        ng.ɵcompilerFacade = new CompilerFacadeImpl();
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var VERSION$1 = new Version('11.0.9');
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var CompilerConfig = function CompilerConfig() {
        var _ref22 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
            _ref22$defaultEncapsu = _ref22.defaultEncapsulation,
            defaultEncapsulation = _ref22$defaultEncapsu === void 0 ? ViewEncapsulation.Emulated : _ref22$defaultEncapsu,
            _ref22$useJit = _ref22.useJit,
            useJit = _ref22$useJit === void 0 ? true : _ref22$useJit,
            _ref22$jitDevMode = _ref22.jitDevMode,
            jitDevMode = _ref22$jitDevMode === void 0 ? false : _ref22$jitDevMode,
            _ref22$missingTransla = _ref22.missingTranslation,
            missingTranslation = _ref22$missingTransla === void 0 ? null : _ref22$missingTransla,
            preserveWhitespaces = _ref22.preserveWhitespaces,
            strictInjectionParameters = _ref22.strictInjectionParameters;

        _classCallCheck(this, CompilerConfig);

        this.defaultEncapsulation = defaultEncapsulation;
        this.useJit = !!useJit;
        this.jitDevMode = !!jitDevMode;
        this.missingTranslation = missingTranslation;
        this.preserveWhitespaces = preserveWhitespacesDefault(noUndefined(preserveWhitespaces));
        this.strictInjectionParameters = strictInjectionParameters === true;
      };

      function preserveWhitespacesDefault(preserveWhitespacesOption) {
        var defaultSetting = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
        return preserveWhitespacesOption === null ? defaultSetting : preserveWhitespacesOption;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var DirectiveNormalizer = /*#__PURE__*/function () {
        function DirectiveNormalizer(_resourceLoader, _urlResolver, _htmlParser, _config) {
          _classCallCheck(this, DirectiveNormalizer);

          this._resourceLoader = _resourceLoader;
          this._urlResolver = _urlResolver;
          this._htmlParser = _htmlParser;
          this._config = _config;
          this._resourceLoaderCache = new Map();
        }

        _createClass2(DirectiveNormalizer, [{
          key: "clearCache",
          value: function clearCache() {
            this._resourceLoaderCache.clear();
          }
        }, {
          key: "clearCacheFor",
          value: function clearCacheFor(normalizedDirective) {
            var _this198 = this;

            if (!normalizedDirective.isComponent) {
              return;
            }

            var template = normalizedDirective.template;

            this._resourceLoaderCache["delete"](template.templateUrl);

            template.externalStylesheets.forEach(function (stylesheet) {
              _this198._resourceLoaderCache["delete"](stylesheet.moduleUrl);
            });
          }
        }, {
          key: "_fetch",
          value: function _fetch(url) {
            var result = this._resourceLoaderCache.get(url);

            if (!result) {
              result = this._resourceLoader.get(url);

              this._resourceLoaderCache.set(url, result);
            }

            return result;
          }
        }, {
          key: "normalizeTemplate",
          value: function normalizeTemplate(prenormData) {
            var _this199 = this;

            if (isDefined(prenormData.template)) {
              if (isDefined(prenormData.templateUrl)) {
                throw syntaxError("'".concat(stringify(prenormData.componentType), "' component cannot define both template and templateUrl"));
              }

              if (typeof prenormData.template !== 'string') {
                throw syntaxError("The template specified for component ".concat(stringify(prenormData.componentType), " is not a string"));
              }
            } else if (isDefined(prenormData.templateUrl)) {
              if (typeof prenormData.templateUrl !== 'string') {
                throw syntaxError("The templateUrl specified for component ".concat(stringify(prenormData.componentType), " is not a string"));
              }
            } else {
              throw syntaxError("No template specified for component ".concat(stringify(prenormData.componentType)));
            }

            if (isDefined(prenormData.preserveWhitespaces) && typeof prenormData.preserveWhitespaces !== 'boolean') {
              throw syntaxError("The preserveWhitespaces option for component ".concat(stringify(prenormData.componentType), " must be a boolean"));
            }

            return SyncAsync.then(this._preParseTemplate(prenormData), function (preparsedTemplate) {
              return _this199._normalizeTemplateMetadata(prenormData, preparsedTemplate);
            });
          }
        }, {
          key: "_preParseTemplate",
          value: function _preParseTemplate(prenomData) {
            var _this200 = this;

            var template;
            var templateUrl;

            if (prenomData.template != null) {
              template = prenomData.template;
              templateUrl = prenomData.moduleUrl;
            } else {
              templateUrl = this._urlResolver.resolve(prenomData.moduleUrl, prenomData.templateUrl);
              template = this._fetch(templateUrl);
            }

            return SyncAsync.then(template, function (template) {
              return _this200._preparseLoadedTemplate(prenomData, template, templateUrl);
            });
          }
        }, {
          key: "_preparseLoadedTemplate",
          value: function _preparseLoadedTemplate(prenormData, template, templateAbsUrl) {
            var isInline = !!prenormData.template;
            var interpolationConfig = InterpolationConfig.fromArray(prenormData.interpolation);
            var templateUrl = templateSourceUrl({
              reference: prenormData.ngModuleType
            }, {
              type: {
                reference: prenormData.componentType
              }
            }, {
              isInline: isInline,
              templateUrl: templateAbsUrl
            });

            var rootNodesAndErrors = this._htmlParser.parse(template, templateUrl, {
              tokenizeExpansionForms: true,
              interpolationConfig: interpolationConfig
            });

            if (rootNodesAndErrors.errors.length > 0) {
              var errorString = rootNodesAndErrors.errors.join('\n');
              throw syntaxError("Template parse errors:\n".concat(errorString));
            }

            var templateMetadataStyles = this._normalizeStylesheet(new CompileStylesheetMetadata({
              styles: prenormData.styles,
              moduleUrl: prenormData.moduleUrl
            }));

            var visitor = new TemplatePreparseVisitor();
            visitAll$1(visitor, rootNodesAndErrors.rootNodes);

            var templateStyles = this._normalizeStylesheet(new CompileStylesheetMetadata({
              styles: visitor.styles,
              styleUrls: visitor.styleUrls,
              moduleUrl: templateAbsUrl
            }));

            var styles = templateMetadataStyles.styles.concat(templateStyles.styles);
            var inlineStyleUrls = templateMetadataStyles.styleUrls.concat(templateStyles.styleUrls);

            var styleUrls = this._normalizeStylesheet(new CompileStylesheetMetadata({
              styleUrls: prenormData.styleUrls,
              moduleUrl: prenormData.moduleUrl
            })).styleUrls;

            return {
              template: template,
              templateUrl: templateAbsUrl,
              isInline: isInline,
              htmlAst: rootNodesAndErrors,
              styles: styles,
              inlineStyleUrls: inlineStyleUrls,
              styleUrls: styleUrls,
              ngContentSelectors: visitor.ngContentSelectors
            };
          }
        }, {
          key: "_normalizeTemplateMetadata",
          value: function _normalizeTemplateMetadata(prenormData, preparsedTemplate) {
            var _this201 = this;

            return SyncAsync.then(this._loadMissingExternalStylesheets(preparsedTemplate.styleUrls.concat(preparsedTemplate.inlineStyleUrls)), function (externalStylesheets) {
              return _this201._normalizeLoadedTemplateMetadata(prenormData, preparsedTemplate, externalStylesheets);
            });
          }
        }, {
          key: "_normalizeLoadedTemplateMetadata",
          value: function _normalizeLoadedTemplateMetadata(prenormData, preparsedTemplate, stylesheets) {
            var _this202 = this;

            // Algorithm:
            // - produce exactly 1 entry per original styleUrl in
            // CompileTemplateMetadata.externalStylesheets with all styles inlined
            // - inline all styles that are referenced by the template into CompileTemplateMetadata.styles.
            // Reason: be able to determine how many stylesheets there are even without loading
            // the template nor the stylesheets, so we can create a stub for TypeScript always synchronously
            // (as resource loading may be async)
            var styles = _toConsumableArray(preparsedTemplate.styles);

            this._inlineStyles(preparsedTemplate.inlineStyleUrls, stylesheets, styles);

            var styleUrls = preparsedTemplate.styleUrls;
            var externalStylesheets = styleUrls.map(function (styleUrl) {
              var stylesheet = stylesheets.get(styleUrl);

              var styles = _toConsumableArray(stylesheet.styles);

              _this202._inlineStyles(stylesheet.styleUrls, stylesheets, styles);

              return new CompileStylesheetMetadata({
                moduleUrl: styleUrl,
                styles: styles
              });
            });
            var encapsulation = prenormData.encapsulation;

            if (encapsulation == null) {
              encapsulation = this._config.defaultEncapsulation;
            }

            if (encapsulation === ViewEncapsulation.Emulated && styles.length === 0 && styleUrls.length === 0) {
              encapsulation = ViewEncapsulation.None;
            }

            return new CompileTemplateMetadata({
              encapsulation: encapsulation,
              template: preparsedTemplate.template,
              templateUrl: preparsedTemplate.templateUrl,
              htmlAst: preparsedTemplate.htmlAst,
              styles: styles,
              styleUrls: styleUrls,
              ngContentSelectors: preparsedTemplate.ngContentSelectors,
              animations: prenormData.animations,
              interpolation: prenormData.interpolation,
              isInline: preparsedTemplate.isInline,
              externalStylesheets: externalStylesheets,
              preserveWhitespaces: preserveWhitespacesDefault(prenormData.preserveWhitespaces, this._config.preserveWhitespaces)
            });
          }
        }, {
          key: "_inlineStyles",
          value: function _inlineStyles(styleUrls, stylesheets, targetStyles) {
            var _this203 = this;

            styleUrls.forEach(function (styleUrl) {
              var stylesheet = stylesheets.get(styleUrl);
              stylesheet.styles.forEach(function (style) {
                return targetStyles.push(style);
              });

              _this203._inlineStyles(stylesheet.styleUrls, stylesheets, targetStyles);
            });
          }
        }, {
          key: "_loadMissingExternalStylesheets",
          value: function _loadMissingExternalStylesheets(styleUrls) {
            var _this204 = this;

            var loadedStylesheets = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Map();
            return SyncAsync.then(SyncAsync.all(styleUrls.filter(function (styleUrl) {
              return !loadedStylesheets.has(styleUrl);
            }).map(function (styleUrl) {
              return SyncAsync.then(_this204._fetch(styleUrl), function (loadedStyle) {
                var stylesheet = _this204._normalizeStylesheet(new CompileStylesheetMetadata({
                  styles: [loadedStyle],
                  moduleUrl: styleUrl
                }));

                loadedStylesheets.set(styleUrl, stylesheet);
                return _this204._loadMissingExternalStylesheets(stylesheet.styleUrls, loadedStylesheets);
              });
            })), function (_) {
              return loadedStylesheets;
            });
          }
        }, {
          key: "_normalizeStylesheet",
          value: function _normalizeStylesheet(stylesheet) {
            var _this205 = this;

            var moduleUrl = stylesheet.moduleUrl;
            var allStyleUrls = stylesheet.styleUrls.filter(isStyleUrlResolvable).map(function (url) {
              return _this205._urlResolver.resolve(moduleUrl, url);
            });
            var allStyles = stylesheet.styles.map(function (style) {
              var styleWithImports = extractStyleUrls(_this205._urlResolver, moduleUrl, style);
              allStyleUrls.push.apply(allStyleUrls, _toConsumableArray(styleWithImports.styleUrls));
              return styleWithImports.style;
            });
            return new CompileStylesheetMetadata({
              styles: allStyles,
              styleUrls: allStyleUrls,
              moduleUrl: moduleUrl
            });
          }
        }]);

        return DirectiveNormalizer;
      }();

      var TemplatePreparseVisitor = /*#__PURE__*/function () {
        function TemplatePreparseVisitor() {
          _classCallCheck(this, TemplatePreparseVisitor);

          this.ngContentSelectors = [];
          this.styles = [];
          this.styleUrls = [];
          this.ngNonBindableStackCount = 0;
        }

        _createClass2(TemplatePreparseVisitor, [{
          key: "visitElement",
          value: function visitElement(ast, context) {
            var preparsedElement = preparseElement(ast);

            switch (preparsedElement.type) {
              case PreparsedElementType.NG_CONTENT:
                if (this.ngNonBindableStackCount === 0) {
                  this.ngContentSelectors.push(preparsedElement.selectAttr);
                }

                break;

              case PreparsedElementType.STYLE:
                var textContent = '';
                ast.children.forEach(function (child) {
                  if (child instanceof Text$3) {
                    textContent += child.value;
                  }
                });
                this.styles.push(textContent);
                break;

              case PreparsedElementType.STYLESHEET:
                this.styleUrls.push(preparsedElement.hrefAttr);
                break;

              default:
                break;
            }

            if (preparsedElement.nonBindable) {
              this.ngNonBindableStackCount++;
            }

            visitAll$1(this, ast.children);

            if (preparsedElement.nonBindable) {
              this.ngNonBindableStackCount--;
            }

            return null;
          }
        }, {
          key: "visitExpansion",
          value: function visitExpansion(ast, context) {
            visitAll$1(this, ast.cases);
          }
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(ast, context) {
            visitAll$1(this, ast.expression);
          }
        }, {
          key: "visitComment",
          value: function visitComment(ast, context) {
            return null;
          }
        }, {
          key: "visitAttribute",
          value: function visitAttribute(ast, context) {
            return null;
          }
        }, {
          key: "visitText",
          value: function visitText(ast, context) {
            return null;
          }
        }]);

        return TemplatePreparseVisitor;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var QUERY_METADATA_IDENTIFIERS = [createViewChild, createViewChildren, createContentChild, createContentChildren];
      /*
       * Resolve a `Type` for {@link Directive}.
       *
       * This interface can be overridden by the application developer to create custom behavior.
       *
       * See {@link Compiler}
       */

      var DirectiveResolver = /*#__PURE__*/function () {
        function DirectiveResolver(_reflector) {
          _classCallCheck(this, DirectiveResolver);

          this._reflector = _reflector;
        }

        _createClass2(DirectiveResolver, [{
          key: "isDirective",
          value: function isDirective(type) {
            var typeMetadata = this._reflector.annotations(resolveForwardRef(type));

            return typeMetadata && typeMetadata.some(isDirectiveMetadata);
          }
        }, {
          key: "resolve",
          value: function resolve(type) {
            var throwIfNotFound = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;

            var typeMetadata = this._reflector.annotations(resolveForwardRef(type));

            if (typeMetadata) {
              var metadata = findLast(typeMetadata, isDirectiveMetadata);

              if (metadata) {
                var propertyMetadata = this._reflector.propMetadata(type);

                var guards = this._reflector.guards(type);

                return this._mergeWithPropertyMetadata(metadata, propertyMetadata, guards, type);
              }
            }

            if (throwIfNotFound) {
              throw new Error("No Directive annotation found on ".concat(stringify(type)));
            }

            return null;
          }
        }, {
          key: "_mergeWithPropertyMetadata",
          value: function _mergeWithPropertyMetadata(dm, propertyMetadata, guards, directiveType) {
            var inputs = [];
            var outputs = [];
            var host = {};
            var queries = {};
            Object.keys(propertyMetadata).forEach(function (propName) {
              var input = findLast(propertyMetadata[propName], function (a) {
                return createInput.isTypeOf(a);
              });

              if (input) {
                if (input.bindingPropertyName) {
                  inputs.push("".concat(propName, ": ").concat(input.bindingPropertyName));
                } else {
                  inputs.push(propName);
                }
              }

              var output = findLast(propertyMetadata[propName], function (a) {
                return createOutput.isTypeOf(a);
              });

              if (output) {
                if (output.bindingPropertyName) {
                  outputs.push("".concat(propName, ": ").concat(output.bindingPropertyName));
                } else {
                  outputs.push(propName);
                }
              }

              var hostBindings = propertyMetadata[propName].filter(function (a) {
                return createHostBinding.isTypeOf(a);
              });
              hostBindings.forEach(function (hostBinding) {
                if (hostBinding.hostPropertyName) {
                  var startWith = hostBinding.hostPropertyName[0];

                  if (startWith === '(') {
                    throw new Error("@HostBinding can not bind to events. Use @HostListener instead.");
                  } else if (startWith === '[') {
                    throw new Error("@HostBinding parameter should be a property name, 'class.<name>', or 'attr.<name>'.");
                  }

                  host["[".concat(hostBinding.hostPropertyName, "]")] = propName;
                } else {
                  host["[".concat(propName, "]")] = propName;
                }
              });
              var hostListeners = propertyMetadata[propName].filter(function (a) {
                return createHostListener.isTypeOf(a);
              });
              hostListeners.forEach(function (hostListener) {
                var args = hostListener.args || [];
                host["(".concat(hostListener.eventName, ")")] = "".concat(propName, "(").concat(args.join(','), ")");
              });
              var query = findLast(propertyMetadata[propName], function (a) {
                return QUERY_METADATA_IDENTIFIERS.some(function (i) {
                  return i.isTypeOf(a);
                });
              });

              if (query) {
                queries[propName] = query;
              }
            });
            return this._merge(dm, inputs, outputs, host, queries, guards, directiveType);
          }
        }, {
          key: "_extractPublicName",
          value: function _extractPublicName(def) {
            return splitAtColon(def, [null, def])[1].trim();
          }
        }, {
          key: "_dedupeBindings",
          value: function _dedupeBindings(bindings) {
            var names = new Set();
            var publicNames = new Set();
            var reversedResult = []; // go last to first to allow later entries to overwrite previous entries

            for (var i = bindings.length - 1; i >= 0; i--) {
              var binding = bindings[i];

              var name = this._extractPublicName(binding);

              publicNames.add(name);

              if (!names.has(name)) {
                names.add(name);
                reversedResult.push(binding);
              }
            }

            return reversedResult.reverse();
          }
        }, {
          key: "_merge",
          value: function _merge(directive, inputs, outputs, host, queries, guards, directiveType) {
            var mergedInputs = this._dedupeBindings(directive.inputs ? directive.inputs.concat(inputs) : inputs);

            var mergedOutputs = this._dedupeBindings(directive.outputs ? directive.outputs.concat(outputs) : outputs);

            var mergedHost = directive.host ? Object.assign(Object.assign({}, directive.host), host) : host;
            var mergedQueries = directive.queries ? Object.assign(Object.assign({}, directive.queries), queries) : queries;

            if (createComponent.isTypeOf(directive)) {
              var comp = directive;
              return createComponent({
                selector: comp.selector,
                inputs: mergedInputs,
                outputs: mergedOutputs,
                host: mergedHost,
                exportAs: comp.exportAs,
                moduleId: comp.moduleId,
                queries: mergedQueries,
                changeDetection: comp.changeDetection,
                providers: comp.providers,
                viewProviders: comp.viewProviders,
                entryComponents: comp.entryComponents,
                template: comp.template,
                templateUrl: comp.templateUrl,
                styles: comp.styles,
                styleUrls: comp.styleUrls,
                encapsulation: comp.encapsulation,
                animations: comp.animations,
                interpolation: comp.interpolation,
                preserveWhitespaces: directive.preserveWhitespaces
              });
            } else {
              return createDirective({
                selector: directive.selector,
                inputs: mergedInputs,
                outputs: mergedOutputs,
                host: mergedHost,
                exportAs: directive.exportAs,
                queries: mergedQueries,
                providers: directive.providers,
                guards: guards
              });
            }
          }
        }]);

        return DirectiveResolver;
      }();

      function isDirectiveMetadata(type) {
        return createDirective.isTypeOf(type) || createComponent.isTypeOf(type);
      }

      function findLast(arr, condition) {
        for (var i = arr.length - 1; i >= 0; i--) {
          if (condition(arr[i])) {
            return arr[i];
          }
        }

        return null;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * An i18n error.
       */


      var I18nError = /*#__PURE__*/function (_ParseError6) {
        _inherits(I18nError, _ParseError6);

        var _super104 = _createSuper(I18nError);

        function I18nError(span, msg) {
          _classCallCheck(this, I18nError);

          return _super104.call(this, span, msg);
        }

        return I18nError;
      }(ParseError);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _I18N_ATTR = 'i18n';
      var _I18N_ATTR_PREFIX = 'i18n-';
      var _I18N_COMMENT_PREFIX_REGEXP = /^i18n:?/;
      var MEANING_SEPARATOR = '|';
      var ID_SEPARATOR = '@@';
      var i18nCommentsWarned = false;
      /**
       * Extract translatable messages from an html AST
       */

      function extractMessages(nodes, interpolationConfig, implicitTags, implicitAttrs) {
        var visitor = new _Visitor$2(implicitTags, implicitAttrs);
        return visitor.extract(nodes, interpolationConfig);
      }

      function mergeTranslations(nodes, translations, interpolationConfig, implicitTags, implicitAttrs) {
        var visitor = new _Visitor$2(implicitTags, implicitAttrs);
        return visitor.merge(nodes, translations, interpolationConfig);
      }

      var ExtractionResult = function ExtractionResult(messages, errors) {
        _classCallCheck(this, ExtractionResult);

        this.messages = messages;
        this.errors = errors;
      };

      var _VisitorMode;

      (function (_VisitorMode) {
        _VisitorMode[_VisitorMode["Extract"] = 0] = "Extract";
        _VisitorMode[_VisitorMode["Merge"] = 1] = "Merge";
      })(_VisitorMode || (_VisitorMode = {}));
      /**
       * This Visitor is used:
       * 1. to extract all the translatable strings from an html AST (see `extract()`),
       * 2. to replace the translatable strings with the actual translations (see `merge()`)
       *
       * @internal
       */


      var _Visitor$2 = /*#__PURE__*/function () {
        function _Visitor$2(_implicitTags, _implicitAttrs) {
          _classCallCheck(this, _Visitor$2);

          this._implicitTags = _implicitTags;
          this._implicitAttrs = _implicitAttrs;
        }
        /**
         * Extracts the messages from the tree
         */


        _createClass2(_Visitor$2, [{
          key: "extract",
          value: function extract(nodes, interpolationConfig) {
            var _this206 = this;

            this._init(_VisitorMode.Extract, interpolationConfig);

            nodes.forEach(function (node) {
              return node.visit(_this206, null);
            });

            if (this._inI18nBlock) {
              this._reportError(nodes[nodes.length - 1], 'Unclosed block');
            }

            return new ExtractionResult(this._messages, this._errors);
          }
          /**
           * Returns a tree where all translatable nodes are translated
           */

        }, {
          key: "merge",
          value: function merge(nodes, translations, interpolationConfig) {
            this._init(_VisitorMode.Merge, interpolationConfig);

            this._translations = translations; // Construct a single fake root element

            var wrapper = new Element$1('wrapper', [], nodes, undefined, undefined, undefined);
            var translatedNode = wrapper.visit(this, null);

            if (this._inI18nBlock) {
              this._reportError(nodes[nodes.length - 1], 'Unclosed block');
            }

            return new ParseTreeResult(translatedNode.children, this._errors);
          }
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(icuCase, context) {
            // Parse cases for translatable html attributes
            var expression = visitAll$1(this, icuCase.expression, context);

            if (this._mode === _VisitorMode.Merge) {
              return new ExpansionCase(icuCase.value, expression, icuCase.sourceSpan, icuCase.valueSourceSpan, icuCase.expSourceSpan);
            }
          }
        }, {
          key: "visitExpansion",
          value: function visitExpansion(icu, context) {
            this._mayBeAddBlockChildren(icu);

            var wasInIcu = this._inIcu;

            if (!this._inIcu) {
              // nested ICU messages should not be extracted but top-level translated as a whole
              if (this._isInTranslatableSection) {
                this._addMessage([icu]);
              }

              this._inIcu = true;
            }

            var cases = visitAll$1(this, icu.cases, context);

            if (this._mode === _VisitorMode.Merge) {
              icu = new Expansion(icu.switchValue, icu.type, cases, icu.sourceSpan, icu.switchValueSourceSpan);
            }

            this._inIcu = wasInIcu;
            return icu;
          }
        }, {
          key: "visitComment",
          value: function visitComment(comment, context) {
            var isOpening = _isOpeningComment(comment);

            if (isOpening && this._isInTranslatableSection) {
              this._reportError(comment, 'Could not start a block inside a translatable section');

              return;
            }

            var isClosing = _isClosingComment(comment);

            if (isClosing && !this._inI18nBlock) {
              this._reportError(comment, 'Trying to close an unopened block');

              return;
            }

            if (!this._inI18nNode && !this._inIcu) {
              if (!this._inI18nBlock) {
                if (isOpening) {
                  // deprecated from v5 you should use <ng-container i18n> instead of i18n comments
                  if (!i18nCommentsWarned && console && console.warn) {
                    i18nCommentsWarned = true;
                    var details = comment.sourceSpan.details ? ", ".concat(comment.sourceSpan.details) : ''; // TODO(ocombe): use a log service once there is a public one available

                    console.warn("I18n comments are deprecated, use an <ng-container> element instead (".concat(comment.sourceSpan.start).concat(details, ")"));
                  }

                  this._inI18nBlock = true;
                  this._blockStartDepth = this._depth;
                  this._blockChildren = [];
                  this._blockMeaningAndDesc = comment.value.replace(_I18N_COMMENT_PREFIX_REGEXP, '').trim();

                  this._openTranslatableSection(comment);
                }
              } else {
                if (isClosing) {
                  if (this._depth == this._blockStartDepth) {
                    this._closeTranslatableSection(comment, this._blockChildren);

                    this._inI18nBlock = false;

                    var message = this._addMessage(this._blockChildren, this._blockMeaningAndDesc); // merge attributes in sections


                    var nodes = this._translateMessage(comment, message);

                    return visitAll$1(this, nodes);
                  } else {
                    this._reportError(comment, 'I18N blocks should not cross element boundaries');

                    return;
                  }
                }
              }
            }
          }
        }, {
          key: "visitText",
          value: function visitText(text, context) {
            if (this._isInTranslatableSection) {
              this._mayBeAddBlockChildren(text);
            }

            return text;
          }
        }, {
          key: "visitElement",
          value: function visitElement(el, context) {
            var _this207 = this;

            this._mayBeAddBlockChildren(el);

            this._depth++;
            var wasInI18nNode = this._inI18nNode;
            var wasInImplicitNode = this._inImplicitNode;
            var childNodes = [];
            var translatedChildNodes = undefined; // Extract:
            // - top level nodes with the (implicit) "i18n" attribute if not already in a section
            // - ICU messages

            var i18nAttr = _getI18nAttr(el);

            var i18nMeta = i18nAttr ? i18nAttr.value : '';
            var isImplicit = this._implicitTags.some(function (tag) {
              return el.name === tag;
            }) && !this._inIcu && !this._isInTranslatableSection;
            var isTopLevelImplicit = !wasInImplicitNode && isImplicit;
            this._inImplicitNode = wasInImplicitNode || isImplicit;

            if (!this._isInTranslatableSection && !this._inIcu) {
              if (i18nAttr || isTopLevelImplicit) {
                this._inI18nNode = true;

                var message = this._addMessage(el.children, i18nMeta);

                translatedChildNodes = this._translateMessage(el, message);
              }

              if (this._mode == _VisitorMode.Extract) {
                var isTranslatable = i18nAttr || isTopLevelImplicit;
                if (isTranslatable) this._openTranslatableSection(el);
                visitAll$1(this, el.children);
                if (isTranslatable) this._closeTranslatableSection(el, el.children);
              }
            } else {
              if (i18nAttr || isTopLevelImplicit) {
                this._reportError(el, 'Could not mark an element as translatable inside a translatable section');
              }

              if (this._mode == _VisitorMode.Extract) {
                // Descend into child nodes for extraction
                visitAll$1(this, el.children);
              }
            }

            if (this._mode === _VisitorMode.Merge) {
              var visitNodes = translatedChildNodes || el.children;
              visitNodes.forEach(function (child) {
                var visited = child.visit(_this207, context);

                if (visited && !_this207._isInTranslatableSection) {
                  // Do not add the children from translatable sections (= i18n blocks here)
                  // They will be added later in this loop when the block closes (i.e. on `<!-- /i18n -->`)
                  childNodes = childNodes.concat(visited);
                }
              });
            }

            this._visitAttributesOf(el);

            this._depth--;
            this._inI18nNode = wasInI18nNode;
            this._inImplicitNode = wasInImplicitNode;

            if (this._mode === _VisitorMode.Merge) {
              var translatedAttrs = this._translateAttributes(el);

              return new Element$1(el.name, translatedAttrs, childNodes, el.sourceSpan, el.startSourceSpan, el.endSourceSpan);
            }

            return null;
          }
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute, context) {
            throw new Error('unreachable code');
          }
        }, {
          key: "_init",
          value: function _init(mode, interpolationConfig) {
            this._mode = mode;
            this._inI18nBlock = false;
            this._inI18nNode = false;
            this._depth = 0;
            this._inIcu = false;
            this._msgCountAtSectionStart = undefined;
            this._errors = [];
            this._messages = [];
            this._inImplicitNode = false;
            this._createI18nMessage = createI18nMessageFactory(interpolationConfig);
          } // looks for translatable attributes

        }, {
          key: "_visitAttributesOf",
          value: function _visitAttributesOf(el) {
            var _this208 = this;

            var explicitAttrNameToValue = {};
            var implicitAttrNames = this._implicitAttrs[el.name] || [];
            el.attrs.filter(function (attr) {
              return attr.name.startsWith(_I18N_ATTR_PREFIX);
            }).forEach(function (attr) {
              return explicitAttrNameToValue[attr.name.slice(_I18N_ATTR_PREFIX.length)] = attr.value;
            });
            el.attrs.forEach(function (attr) {
              if (attr.name in explicitAttrNameToValue) {
                _this208._addMessage([attr], explicitAttrNameToValue[attr.name]);
              } else if (implicitAttrNames.some(function (name) {
                return attr.name === name;
              })) {
                _this208._addMessage([attr]);
              }
            });
          } // add a translatable message

        }, {
          key: "_addMessage",
          value: function _addMessage(ast, msgMeta) {
            if (ast.length == 0 || ast.length == 1 && ast[0] instanceof Attribute && !ast[0].value) {
              // Do not create empty messages
              return null;
            }

            var _parseMessageMeta2 = _parseMessageMeta(msgMeta),
                meaning = _parseMessageMeta2.meaning,
                description = _parseMessageMeta2.description,
                id = _parseMessageMeta2.id;

            var message = this._createI18nMessage(ast, meaning, description, id);

            this._messages.push(message);

            return message;
          } // Translates the given message given the `TranslationBundle`
          // This is used for translating elements / blocks - see `_translateAttributes` for attributes
          // no-op when called in extraction mode (returns [])

        }, {
          key: "_translateMessage",
          value: function _translateMessage(el, message) {
            if (message && this._mode === _VisitorMode.Merge) {
              var nodes = this._translations.get(message);

              if (nodes) {
                return nodes;
              }

              this._reportError(el, "Translation unavailable for message id=\"".concat(this._translations.digest(message), "\""));
            }

            return [];
          } // translate the attributes of an element and remove i18n specific attributes

        }, {
          key: "_translateAttributes",
          value: function _translateAttributes(el) {
            var _this209 = this;

            var attributes = el.attrs;
            var i18nParsedMessageMeta = {};
            attributes.forEach(function (attr) {
              if (attr.name.startsWith(_I18N_ATTR_PREFIX)) {
                i18nParsedMessageMeta[attr.name.slice(_I18N_ATTR_PREFIX.length)] = _parseMessageMeta(attr.value);
              }
            });
            var translatedAttributes = [];
            attributes.forEach(function (attr) {
              if (attr.name === _I18N_ATTR || attr.name.startsWith(_I18N_ATTR_PREFIX)) {
                // strip i18n specific attributes
                return;
              }

              if (attr.value && attr.value != '' && i18nParsedMessageMeta.hasOwnProperty(attr.name)) {
                var _i18nParsedMessageMet = i18nParsedMessageMeta[attr.name],
                    meaning = _i18nParsedMessageMet.meaning,
                    description = _i18nParsedMessageMet.description,
                    id = _i18nParsedMessageMet.id;

                var message = _this209._createI18nMessage([attr], meaning, description, id);

                var nodes = _this209._translations.get(message);

                if (nodes) {
                  if (nodes.length == 0) {
                    translatedAttributes.push(new Attribute(attr.name, '', attr.sourceSpan));
                  } else if (nodes[0] instanceof Text$3) {
                    var value = nodes[0].value;
                    translatedAttributes.push(new Attribute(attr.name, value, attr.sourceSpan));
                  } else {
                    _this209._reportError(el, "Unexpected translation for attribute \"".concat(attr.name, "\" (id=\"").concat(id || _this209._translations.digest(message), "\")"));
                  }
                } else {
                  _this209._reportError(el, "Translation unavailable for attribute \"".concat(attr.name, "\" (id=\"").concat(id || _this209._translations.digest(message), "\")"));
                }
              } else {
                translatedAttributes.push(attr);
              }
            });
            return translatedAttributes;
          }
          /**
           * Add the node as a child of the block when:
           * - we are in a block,
           * - we are not inside a ICU message (those are handled separately),
           * - the node is a "direct child" of the block
           */

        }, {
          key: "_mayBeAddBlockChildren",
          value: function _mayBeAddBlockChildren(node) {
            if (this._inI18nBlock && !this._inIcu && this._depth == this._blockStartDepth) {
              this._blockChildren.push(node);
            }
          }
          /**
           * Marks the start of a section, see `_closeTranslatableSection`
           */

        }, {
          key: "_openTranslatableSection",
          value: function _openTranslatableSection(node) {
            if (this._isInTranslatableSection) {
              this._reportError(node, 'Unexpected section start');
            } else {
              this._msgCountAtSectionStart = this._messages.length;
            }
          }
          /**
           * A translatable section could be:
           * - the content of translatable element,
           * - nodes between `<!-- i18n -->` and `<!-- /i18n -->` comments
           */

        }, {
          key: "_isInTranslatableSection",
          get: function get() {
            return this._msgCountAtSectionStart !== void 0;
          }
          /**
           * Terminates a section.
           *
           * If a section has only one significant children (comments not significant) then we should not
           * keep the message from this children:
           *
           * `<p i18n="meaning|description">{ICU message}</p>` would produce two messages:
           * - one for the <p> content with meaning and description,
           * - another one for the ICU message.
           *
           * In this case the last message is discarded as it contains less information (the AST is
           * otherwise identical).
           *
           * Note that we should still keep messages extracted from attributes inside the section (ie in the
           * ICU message here)
           */

        }, {
          key: "_closeTranslatableSection",
          value: function _closeTranslatableSection(node, directChildren) {
            if (!this._isInTranslatableSection) {
              this._reportError(node, 'Unexpected section end');

              return;
            }

            var startIndex = this._msgCountAtSectionStart;
            var significantChildren = directChildren.reduce(function (count, node) {
              return count + (node instanceof Comment ? 0 : 1);
            }, 0);

            if (significantChildren == 1) {
              for (var i = this._messages.length - 1; i >= startIndex; i--) {
                var ast = this._messages[i].nodes;

                if (!(ast.length == 1 && ast[0] instanceof Text$1)) {
                  this._messages.splice(i, 1);

                  break;
                }
              }
            }

            this._msgCountAtSectionStart = undefined;
          }
        }, {
          key: "_reportError",
          value: function _reportError(node, msg) {
            this._errors.push(new I18nError(node.sourceSpan, msg));
          }
        }]);

        return _Visitor$2;
      }();

      function _isOpeningComment(n) {
        return !!(n instanceof Comment && n.value && n.value.startsWith('i18n'));
      }

      function _isClosingComment(n) {
        return !!(n instanceof Comment && n.value && n.value === '/i18n');
      }

      function _getI18nAttr(p) {
        return p.attrs.find(function (attr) {
          return attr.name === _I18N_ATTR;
        }) || null;
      }

      function _parseMessageMeta(i18n) {
        if (!i18n) return {
          meaning: '',
          description: '',
          id: ''
        };
        var idIndex = i18n.indexOf(ID_SEPARATOR);
        var descIndex = i18n.indexOf(MEANING_SEPARATOR);

        var _ref23 = idIndex > -1 ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] : [i18n, ''],
            _ref24 = _slicedToArray(_ref23, 2),
            meaningAndDesc = _ref24[0],
            id = _ref24[1];

        var _ref25 = descIndex > -1 ? [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] : ['', meaningAndDesc],
            _ref26 = _slicedToArray(_ref25, 2),
            meaning = _ref26[0],
            description = _ref26[1];

        return {
          meaning: meaning,
          description: description,
          id: id.trim()
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var XmlTagDefinition = /*#__PURE__*/function () {
        function XmlTagDefinition() {
          _classCallCheck(this, XmlTagDefinition);

          this.closedByParent = false;
          this.isVoid = false;
          this.ignoreFirstLf = false;
          this.canSelfClose = true;
          this.preventNamespaceInheritance = false;
        }

        _createClass2(XmlTagDefinition, [{
          key: "requireExtraParent",
          value: function requireExtraParent(currentParent) {
            return false;
          }
        }, {
          key: "isClosedByChild",
          value: function isClosedByChild(name) {
            return false;
          }
        }, {
          key: "getContentType",
          value: function getContentType() {
            return TagContentType.PARSABLE_DATA;
          }
        }]);

        return XmlTagDefinition;
      }();

      var _TAG_DEFINITION = new XmlTagDefinition();

      function getXmlTagDefinition(tagName) {
        return _TAG_DEFINITION;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var XmlParser = /*#__PURE__*/function (_Parser2) {
        _inherits(XmlParser, _Parser2);

        var _super105 = _createSuper(XmlParser);

        function XmlParser() {
          _classCallCheck(this, XmlParser);

          return _super105.call(this, getXmlTagDefinition);
        }

        _createClass2(XmlParser, [{
          key: "parse",
          value: function parse(source, url, options) {
            return _get(_getPrototypeOf(XmlParser.prototype), "parse", this).call(this, source, url, options);
          }
        }]);

        return XmlParser;
      }(Parser);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _VERSION = '1.2';
      var _XMLNS = 'urn:oasis:names:tc:xliff:document:1.2'; // TODO(vicb): make this a param (s/_/-/)

      var _DEFAULT_SOURCE_LANG = 'en';
      var _PLACEHOLDER_TAG$1 = 'x';
      var _MARKER_TAG = 'mrk';
      var _FILE_TAG = 'file';
      var _SOURCE_TAG$1 = 'source';
      var _SEGMENT_SOURCE_TAG = 'seg-source';
      var _ALT_TRANS_TAG = 'alt-trans';
      var _TARGET_TAG = 'target';
      var _UNIT_TAG = 'trans-unit';
      var _CONTEXT_GROUP_TAG = 'context-group';
      var _CONTEXT_TAG = 'context'; // https://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html
      // https://docs.oasis-open.org/xliff/v1.2/xliff-profile-html/xliff-profile-html-1.2.html

      var Xliff = /*#__PURE__*/function (_Serializer2) {
        _inherits(Xliff, _Serializer2);

        var _super106 = _createSuper(Xliff);

        function Xliff() {
          _classCallCheck(this, Xliff);

          return _super106.apply(this, arguments);
        }

        _createClass2(Xliff, [{
          key: "write",
          value: function write(messages, locale) {
            var visitor = new _WriteVisitor();
            var transUnits = [];
            messages.forEach(function (message) {
              var _transUnit$children;

              var contextTags = [];
              message.sources.forEach(function (source) {
                var contextGroupTag = new Tag(_CONTEXT_GROUP_TAG, {
                  purpose: 'location'
                });
                contextGroupTag.children.push(new CR(10), new Tag(_CONTEXT_TAG, {
                  'context-type': 'sourcefile'
                }, [new Text$2(source.filePath)]), new CR(10), new Tag(_CONTEXT_TAG, {
                  'context-type': 'linenumber'
                }, [new Text$2("".concat(source.startLine))]), new CR(8));
                contextTags.push(new CR(8), contextGroupTag);
              });
              var transUnit = new Tag(_UNIT_TAG, {
                id: message.id,
                datatype: 'html'
              });

              (_transUnit$children = transUnit.children).push.apply(_transUnit$children, [new CR(8), new Tag(_SOURCE_TAG$1, {}, visitor.serialize(message.nodes))].concat(contextTags));

              if (message.description) {
                transUnit.children.push(new CR(8), new Tag('note', {
                  priority: '1',
                  from: 'description'
                }, [new Text$2(message.description)]));
              }

              if (message.meaning) {
                transUnit.children.push(new CR(8), new Tag('note', {
                  priority: '1',
                  from: 'meaning'
                }, [new Text$2(message.meaning)]));
              }

              transUnit.children.push(new CR(6));
              transUnits.push(new CR(6), transUnit);
            });
            var body = new Tag('body', {}, [].concat(transUnits, [new CR(4)]));
            var file = new Tag('file', {
              'source-language': locale || _DEFAULT_SOURCE_LANG,
              datatype: 'plaintext',
              original: 'ng2.template'
            }, [new CR(4), body, new CR(2)]);
            var xliff = new Tag('xliff', {
              version: _VERSION,
              xmlns: _XMLNS
            }, [new CR(2), file, new CR()]);
            return serialize([new Declaration({
              version: '1.0',
              encoding: 'UTF-8'
            }), new CR(), xliff, new CR()]);
          }
        }, {
          key: "load",
          value: function load(content, url) {
            // xliff to xml nodes
            var xliffParser = new XliffParser();

            var _xliffParser$parse = xliffParser.parse(content, url),
                locale = _xliffParser$parse.locale,
                msgIdToHtml = _xliffParser$parse.msgIdToHtml,
                errors = _xliffParser$parse.errors; // xml nodes to i18n nodes


            var i18nNodesByMsgId = {};
            var converter = new XmlToI18n();
            Object.keys(msgIdToHtml).forEach(function (msgId) {
              var _converter$convert = converter.convert(msgIdToHtml[msgId], url),
                  i18nNodes = _converter$convert.i18nNodes,
                  e = _converter$convert.errors;

              errors.push.apply(errors, _toConsumableArray(e));
              i18nNodesByMsgId[msgId] = i18nNodes;
            });

            if (errors.length) {
              throw new Error("xliff parse errors:\n".concat(errors.join('\n')));
            }

            return {
              locale: locale,
              i18nNodesByMsgId: i18nNodesByMsgId
            };
          }
        }, {
          key: "digest",
          value: function digest(message) {
            return _digest2(message);
          }
        }]);

        return Xliff;
      }(Serializer);

      var _WriteVisitor = /*#__PURE__*/function () {
        function _WriteVisitor() {
          _classCallCheck(this, _WriteVisitor);
        }

        _createClass2(_WriteVisitor, [{
          key: "visitText",
          value: function visitText(text, context) {
            return [new Text$2(text.value)];
          }
        }, {
          key: "visitContainer",
          value: function visitContainer(container, context) {
            var _this210 = this;

            var nodes = [];
            container.children.forEach(function (node) {
              return nodes.push.apply(nodes, _toConsumableArray(node.visit(_this210)));
            });
            return nodes;
          }
        }, {
          key: "visitIcu",
          value: function visitIcu(icu, context) {
            var _this211 = this;

            var nodes = [new Text$2("{".concat(icu.expressionPlaceholder, ", ").concat(icu.type, ", "))];
            Object.keys(icu.cases).forEach(function (c) {
              nodes.push.apply(nodes, [new Text$2("".concat(c, " {"))].concat(_toConsumableArray(icu.cases[c].visit(_this211)), [new Text$2("} ")]));
            });
            nodes.push(new Text$2("}"));
            return nodes;
          }
        }, {
          key: "visitTagPlaceholder",
          value: function visitTagPlaceholder(ph, context) {
            var ctype = getCtypeForTag(ph.tag);

            if (ph.isVoid) {
              // void tags have no children nor closing tags
              return [new Tag(_PLACEHOLDER_TAG$1, {
                id: ph.startName,
                ctype: ctype,
                'equiv-text': "<".concat(ph.tag, "/>")
              })];
            }

            var startTagPh = new Tag(_PLACEHOLDER_TAG$1, {
              id: ph.startName,
              ctype: ctype,
              'equiv-text': "<".concat(ph.tag, ">")
            });
            var closeTagPh = new Tag(_PLACEHOLDER_TAG$1, {
              id: ph.closeName,
              ctype: ctype,
              'equiv-text': "</".concat(ph.tag, ">")
            });
            return [startTagPh].concat(_toConsumableArray(this.serialize(ph.children)), [closeTagPh]);
          }
        }, {
          key: "visitPlaceholder",
          value: function visitPlaceholder(ph, context) {
            return [new Tag(_PLACEHOLDER_TAG$1, {
              id: ph.name,
              'equiv-text': "{{".concat(ph.value, "}}")
            })];
          }
        }, {
          key: "visitIcuPlaceholder",
          value: function visitIcuPlaceholder(ph, context) {
            var equivText = "{".concat(ph.value.expression, ", ").concat(ph.value.type, ", ").concat(Object.keys(ph.value.cases).map(function (value) {
              return value + ' {...}';
            }).join(' '), "}");
            return [new Tag(_PLACEHOLDER_TAG$1, {
              id: ph.name,
              'equiv-text': equivText
            })];
          }
        }, {
          key: "serialize",
          value: function serialize(nodes) {
            var _ref27,
                _this212 = this;

            return (_ref27 = []).concat.apply(_ref27, _toConsumableArray(nodes.map(function (node) {
              return node.visit(_this212);
            })));
          }
        }]);

        return _WriteVisitor;
      }(); // TODO(vicb): add error management (structure)
      // Extract messages as xml nodes from the xliff file


      var XliffParser = /*#__PURE__*/function () {
        function XliffParser() {
          _classCallCheck(this, XliffParser);

          this._locale = null;
        }

        _createClass2(XliffParser, [{
          key: "parse",
          value: function parse(xliff, url) {
            this._unitMlString = null;
            this._msgIdToHtml = {};
            var xml = new XmlParser().parse(xliff, url);
            this._errors = xml.errors;
            visitAll$1(this, xml.rootNodes, null);
            return {
              msgIdToHtml: this._msgIdToHtml,
              errors: this._errors,
              locale: this._locale
            };
          }
        }, {
          key: "visitElement",
          value: function visitElement(element, context) {
            switch (element.name) {
              case _UNIT_TAG:
                this._unitMlString = null;
                var idAttr = element.attrs.find(function (attr) {
                  return attr.name === 'id';
                });

                if (!idAttr) {
                  this._addError(element, "<".concat(_UNIT_TAG, "> misses the \"id\" attribute"));
                } else {
                  var id = idAttr.value;

                  if (this._msgIdToHtml.hasOwnProperty(id)) {
                    this._addError(element, "Duplicated translations for msg ".concat(id));
                  } else {
                    visitAll$1(this, element.children, null);

                    if (typeof this._unitMlString === 'string') {
                      this._msgIdToHtml[id] = this._unitMlString;
                    } else {
                      this._addError(element, "Message ".concat(id, " misses a translation"));
                    }
                  }
                }

                break;
              // ignore those tags

              case _SOURCE_TAG$1:
              case _SEGMENT_SOURCE_TAG:
              case _ALT_TRANS_TAG:
                break;

              case _TARGET_TAG:
                var innerTextStart = element.startSourceSpan.end.offset;
                var innerTextEnd = element.endSourceSpan.start.offset;
                var content = element.startSourceSpan.start.file.content;
                var innerText = content.slice(innerTextStart, innerTextEnd);
                this._unitMlString = innerText;
                break;

              case _FILE_TAG:
                var localeAttr = element.attrs.find(function (attr) {
                  return attr.name === 'target-language';
                });

                if (localeAttr) {
                  this._locale = localeAttr.value;
                }

                visitAll$1(this, element.children, null);
                break;

              default:
                // TODO(vicb): assert file structure, xliff version
                // For now only recurse on unhandled nodes
                visitAll$1(this, element.children, null);
            }
          }
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute, context) {}
        }, {
          key: "visitText",
          value: function visitText(text, context) {}
        }, {
          key: "visitComment",
          value: function visitComment(comment, context) {}
        }, {
          key: "visitExpansion",
          value: function visitExpansion(expansion, context) {}
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(expansionCase, context) {}
        }, {
          key: "_addError",
          value: function _addError(node, message) {
            this._errors.push(new I18nError(node.sourceSpan, message));
          }
        }]);

        return XliffParser;
      }(); // Convert ml nodes (xliff syntax) to i18n nodes


      var XmlToI18n = /*#__PURE__*/function () {
        function XmlToI18n() {
          _classCallCheck(this, XmlToI18n);
        }

        _createClass2(XmlToI18n, [{
          key: "convert",
          value: function convert(message, url) {
            var _ref28;

            var xmlIcu = new XmlParser().parse(message, url, {
              tokenizeExpansionForms: true
            });
            this._errors = xmlIcu.errors;
            var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ? [] : (_ref28 = []).concat.apply(_ref28, _toConsumableArray(visitAll$1(this, xmlIcu.rootNodes)));
            return {
              i18nNodes: i18nNodes,
              errors: this._errors
            };
          }
        }, {
          key: "visitText",
          value: function visitText(text, context) {
            return new Text$1(text.value, text.sourceSpan);
          }
        }, {
          key: "visitElement",
          value: function visitElement(el, context) {
            if (el.name === _PLACEHOLDER_TAG$1) {
              var nameAttr = el.attrs.find(function (attr) {
                return attr.name === 'id';
              });

              if (nameAttr) {
                return new Placeholder('', nameAttr.value, el.sourceSpan);
              }

              this._addError(el, "<".concat(_PLACEHOLDER_TAG$1, "> misses the \"id\" attribute"));

              return null;
            }

            if (el.name === _MARKER_TAG) {
              var _ref29;

              return (_ref29 = []).concat.apply(_ref29, _toConsumableArray(visitAll$1(this, el.children)));
            }

            this._addError(el, "Unexpected tag");

            return null;
          }
        }, {
          key: "visitExpansion",
          value: function visitExpansion(icu, context) {
            var caseMap = {};
            visitAll$1(this, icu.cases).forEach(function (c) {
              caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);
            });
            return new Icu$1(icu.switchValue, icu.type, caseMap, icu.sourceSpan);
          }
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(icuCase, context) {
            return {
              value: icuCase.value,
              nodes: visitAll$1(this, icuCase.expression)
            };
          }
        }, {
          key: "visitComment",
          value: function visitComment(comment, context) {}
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute, context) {}
        }, {
          key: "_addError",
          value: function _addError(node, message) {
            this._errors.push(new I18nError(node.sourceSpan, message));
          }
        }]);

        return XmlToI18n;
      }();

      function getCtypeForTag(tag) {
        switch (tag.toLowerCase()) {
          case 'br':
            return 'lb';

          case 'img':
            return 'image';

          default:
            return "x-".concat(tag);
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _VERSION$1 = '2.0';
      var _XMLNS$1 = 'urn:oasis:names:tc:xliff:document:2.0'; // TODO(vicb): make this a param (s/_/-/)

      var _DEFAULT_SOURCE_LANG$1 = 'en';
      var _PLACEHOLDER_TAG$2 = 'ph';
      var _PLACEHOLDER_SPANNING_TAG = 'pc';
      var _MARKER_TAG$1 = 'mrk';
      var _XLIFF_TAG = 'xliff';
      var _SOURCE_TAG$2 = 'source';
      var _TARGET_TAG$1 = 'target';
      var _UNIT_TAG$1 = 'unit'; // https://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html

      var Xliff2 = /*#__PURE__*/function (_Serializer3) {
        _inherits(Xliff2, _Serializer3);

        var _super107 = _createSuper(Xliff2);

        function Xliff2() {
          _classCallCheck(this, Xliff2);

          return _super107.apply(this, arguments);
        }

        _createClass2(Xliff2, [{
          key: "write",
          value: function write(messages, locale) {
            var visitor = new _WriteVisitor$1();
            var units = [];
            messages.forEach(function (message) {
              var unit = new Tag(_UNIT_TAG$1, {
                id: message.id
              });
              var notes = new Tag('notes');

              if (message.description || message.meaning) {
                if (message.description) {
                  notes.children.push(new CR(8), new Tag('note', {
                    category: 'description'
                  }, [new Text$2(message.description)]));
                }

                if (message.meaning) {
                  notes.children.push(new CR(8), new Tag('note', {
                    category: 'meaning'
                  }, [new Text$2(message.meaning)]));
                }
              }

              message.sources.forEach(function (source) {
                notes.children.push(new CR(8), new Tag('note', {
                  category: 'location'
                }, [new Text$2("".concat(source.filePath, ":").concat(source.startLine).concat(source.endLine !== source.startLine ? ',' + source.endLine : ''))]));
              });
              notes.children.push(new CR(6));
              unit.children.push(new CR(6), notes);
              var segment = new Tag('segment');
              segment.children.push(new CR(8), new Tag(_SOURCE_TAG$2, {}, visitor.serialize(message.nodes)), new CR(6));
              unit.children.push(new CR(6), segment, new CR(4));
              units.push(new CR(4), unit);
            });
            var file = new Tag('file', {
              'original': 'ng.template',
              id: 'ngi18n'
            }, [].concat(units, [new CR(2)]));
            var xliff = new Tag(_XLIFF_TAG, {
              version: _VERSION$1,
              xmlns: _XMLNS$1,
              srcLang: locale || _DEFAULT_SOURCE_LANG$1
            }, [new CR(2), file, new CR()]);
            return serialize([new Declaration({
              version: '1.0',
              encoding: 'UTF-8'
            }), new CR(), xliff, new CR()]);
          }
        }, {
          key: "load",
          value: function load(content, url) {
            // xliff to xml nodes
            var xliff2Parser = new Xliff2Parser();

            var _xliff2Parser$parse = xliff2Parser.parse(content, url),
                locale = _xliff2Parser$parse.locale,
                msgIdToHtml = _xliff2Parser$parse.msgIdToHtml,
                errors = _xliff2Parser$parse.errors; // xml nodes to i18n nodes


            var i18nNodesByMsgId = {};
            var converter = new XmlToI18n$1();
            Object.keys(msgIdToHtml).forEach(function (msgId) {
              var _converter$convert2 = converter.convert(msgIdToHtml[msgId], url),
                  i18nNodes = _converter$convert2.i18nNodes,
                  e = _converter$convert2.errors;

              errors.push.apply(errors, _toConsumableArray(e));
              i18nNodesByMsgId[msgId] = i18nNodes;
            });

            if (errors.length) {
              throw new Error("xliff2 parse errors:\n".concat(errors.join('\n')));
            }

            return {
              locale: locale,
              i18nNodesByMsgId: i18nNodesByMsgId
            };
          }
        }, {
          key: "digest",
          value: function digest(message) {
            return decimalDigest(message);
          }
        }]);

        return Xliff2;
      }(Serializer);

      var _WriteVisitor$1 = /*#__PURE__*/function () {
        function _WriteVisitor$1() {
          _classCallCheck(this, _WriteVisitor$1);
        }

        _createClass2(_WriteVisitor$1, [{
          key: "visitText",
          value: function visitText(text, context) {
            return [new Text$2(text.value)];
          }
        }, {
          key: "visitContainer",
          value: function visitContainer(container, context) {
            var _this213 = this;

            var nodes = [];
            container.children.forEach(function (node) {
              return nodes.push.apply(nodes, _toConsumableArray(node.visit(_this213)));
            });
            return nodes;
          }
        }, {
          key: "visitIcu",
          value: function visitIcu(icu, context) {
            var _this214 = this;

            var nodes = [new Text$2("{".concat(icu.expressionPlaceholder, ", ").concat(icu.type, ", "))];
            Object.keys(icu.cases).forEach(function (c) {
              nodes.push.apply(nodes, [new Text$2("".concat(c, " {"))].concat(_toConsumableArray(icu.cases[c].visit(_this214)), [new Text$2("} ")]));
            });
            nodes.push(new Text$2("}"));
            return nodes;
          }
        }, {
          key: "visitTagPlaceholder",
          value: function visitTagPlaceholder(ph, context) {
            var _ref30,
                _this215 = this;

            var type = getTypeForTag(ph.tag);

            if (ph.isVoid) {
              var tagPh = new Tag(_PLACEHOLDER_TAG$2, {
                id: (this._nextPlaceholderId++).toString(),
                equiv: ph.startName,
                type: type,
                disp: "<".concat(ph.tag, "/>")
              });
              return [tagPh];
            }

            var tagPc = new Tag(_PLACEHOLDER_SPANNING_TAG, {
              id: (this._nextPlaceholderId++).toString(),
              equivStart: ph.startName,
              equivEnd: ph.closeName,
              type: type,
              dispStart: "<".concat(ph.tag, ">"),
              dispEnd: "</".concat(ph.tag, ">")
            });

            var nodes = (_ref30 = []).concat.apply(_ref30, _toConsumableArray(ph.children.map(function (node) {
              return node.visit(_this215);
            })));

            if (nodes.length) {
              nodes.forEach(function (node) {
                return tagPc.children.push(node);
              });
            } else {
              tagPc.children.push(new Text$2(''));
            }

            return [tagPc];
          }
        }, {
          key: "visitPlaceholder",
          value: function visitPlaceholder(ph, context) {
            var idStr = (this._nextPlaceholderId++).toString();
            return [new Tag(_PLACEHOLDER_TAG$2, {
              id: idStr,
              equiv: ph.name,
              disp: "{{".concat(ph.value, "}}")
            })];
          }
        }, {
          key: "visitIcuPlaceholder",
          value: function visitIcuPlaceholder(ph, context) {
            var cases = Object.keys(ph.value.cases).map(function (value) {
              return value + ' {...}';
            }).join(' ');
            var idStr = (this._nextPlaceholderId++).toString();
            return [new Tag(_PLACEHOLDER_TAG$2, {
              id: idStr,
              equiv: ph.name,
              disp: "{".concat(ph.value.expression, ", ").concat(ph.value.type, ", ").concat(cases, "}")
            })];
          }
        }, {
          key: "serialize",
          value: function serialize(nodes) {
            var _ref31,
                _this216 = this;

            this._nextPlaceholderId = 0;
            return (_ref31 = []).concat.apply(_ref31, _toConsumableArray(nodes.map(function (node) {
              return node.visit(_this216);
            })));
          }
        }]);

        return _WriteVisitor$1;
      }(); // Extract messages as xml nodes from the xliff file


      var Xliff2Parser = /*#__PURE__*/function () {
        function Xliff2Parser() {
          _classCallCheck(this, Xliff2Parser);

          this._locale = null;
        }

        _createClass2(Xliff2Parser, [{
          key: "parse",
          value: function parse(xliff, url) {
            this._unitMlString = null;
            this._msgIdToHtml = {};
            var xml = new XmlParser().parse(xliff, url);
            this._errors = xml.errors;
            visitAll$1(this, xml.rootNodes, null);
            return {
              msgIdToHtml: this._msgIdToHtml,
              errors: this._errors,
              locale: this._locale
            };
          }
        }, {
          key: "visitElement",
          value: function visitElement(element, context) {
            switch (element.name) {
              case _UNIT_TAG$1:
                this._unitMlString = null;
                var idAttr = element.attrs.find(function (attr) {
                  return attr.name === 'id';
                });

                if (!idAttr) {
                  this._addError(element, "<".concat(_UNIT_TAG$1, "> misses the \"id\" attribute"));
                } else {
                  var id = idAttr.value;

                  if (this._msgIdToHtml.hasOwnProperty(id)) {
                    this._addError(element, "Duplicated translations for msg ".concat(id));
                  } else {
                    visitAll$1(this, element.children, null);

                    if (typeof this._unitMlString === 'string') {
                      this._msgIdToHtml[id] = this._unitMlString;
                    } else {
                      this._addError(element, "Message ".concat(id, " misses a translation"));
                    }
                  }
                }

                break;

              case _SOURCE_TAG$2:
                // ignore source message
                break;

              case _TARGET_TAG$1:
                var innerTextStart = element.startSourceSpan.end.offset;
                var innerTextEnd = element.endSourceSpan.start.offset;
                var content = element.startSourceSpan.start.file.content;
                var innerText = content.slice(innerTextStart, innerTextEnd);
                this._unitMlString = innerText;
                break;

              case _XLIFF_TAG:
                var localeAttr = element.attrs.find(function (attr) {
                  return attr.name === 'trgLang';
                });

                if (localeAttr) {
                  this._locale = localeAttr.value;
                }

                var versionAttr = element.attrs.find(function (attr) {
                  return attr.name === 'version';
                });

                if (versionAttr) {
                  var version = versionAttr.value;

                  if (version !== '2.0') {
                    this._addError(element, "The XLIFF file version ".concat(version, " is not compatible with XLIFF 2.0 serializer"));
                  } else {
                    visitAll$1(this, element.children, null);
                  }
                }

                break;

              default:
                visitAll$1(this, element.children, null);
            }
          }
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute, context) {}
        }, {
          key: "visitText",
          value: function visitText(text, context) {}
        }, {
          key: "visitComment",
          value: function visitComment(comment, context) {}
        }, {
          key: "visitExpansion",
          value: function visitExpansion(expansion, context) {}
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(expansionCase, context) {}
        }, {
          key: "_addError",
          value: function _addError(node, message) {
            this._errors.push(new I18nError(node.sourceSpan, message));
          }
        }]);

        return Xliff2Parser;
      }(); // Convert ml nodes (xliff syntax) to i18n nodes


      var XmlToI18n$1 = /*#__PURE__*/function () {
        function XmlToI18n$1() {
          _classCallCheck(this, XmlToI18n$1);
        }

        _createClass2(XmlToI18n$1, [{
          key: "convert",
          value: function convert(message, url) {
            var _ref32;

            var xmlIcu = new XmlParser().parse(message, url, {
              tokenizeExpansionForms: true
            });
            this._errors = xmlIcu.errors;
            var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ? [] : (_ref32 = []).concat.apply(_ref32, _toConsumableArray(visitAll$1(this, xmlIcu.rootNodes)));
            return {
              i18nNodes: i18nNodes,
              errors: this._errors
            };
          }
        }, {
          key: "visitText",
          value: function visitText(text, context) {
            return new Text$1(text.value, text.sourceSpan);
          }
        }, {
          key: "visitElement",
          value: function visitElement(el, context) {
            var _this217 = this,
                _ref33;

            switch (el.name) {
              case _PLACEHOLDER_TAG$2:
                var nameAttr = el.attrs.find(function (attr) {
                  return attr.name === 'equiv';
                });

                if (nameAttr) {
                  return [new Placeholder('', nameAttr.value, el.sourceSpan)];
                }

                this._addError(el, "<".concat(_PLACEHOLDER_TAG$2, "> misses the \"equiv\" attribute"));

                break;

              case _PLACEHOLDER_SPANNING_TAG:
                var startAttr = el.attrs.find(function (attr) {
                  return attr.name === 'equivStart';
                });
                var endAttr = el.attrs.find(function (attr) {
                  return attr.name === 'equivEnd';
                });

                if (!startAttr) {
                  this._addError(el, "<".concat(_PLACEHOLDER_TAG$2, "> misses the \"equivStart\" attribute"));
                } else if (!endAttr) {
                  this._addError(el, "<".concat(_PLACEHOLDER_TAG$2, "> misses the \"equivEnd\" attribute"));
                } else {
                  var startId = startAttr.value;
                  var endId = endAttr.value;
                  var nodes = [];
                  return nodes.concat.apply(nodes, [new Placeholder('', startId, el.sourceSpan)].concat(_toConsumableArray(el.children.map(function (node) {
                    return node.visit(_this217, null);
                  })), [new Placeholder('', endId, el.sourceSpan)]));
                }

                break;

              case _MARKER_TAG$1:
                return (_ref33 = []).concat.apply(_ref33, _toConsumableArray(visitAll$1(this, el.children)));

              default:
                this._addError(el, "Unexpected tag");

            }

            return null;
          }
        }, {
          key: "visitExpansion",
          value: function visitExpansion(icu, context) {
            var caseMap = {};
            visitAll$1(this, icu.cases).forEach(function (c) {
              caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);
            });
            return new Icu$1(icu.switchValue, icu.type, caseMap, icu.sourceSpan);
          }
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(icuCase, context) {
            var _ref34;

            return {
              value: icuCase.value,
              nodes: (_ref34 = []).concat.apply(_ref34, _toConsumableArray(visitAll$1(this, icuCase.expression)))
            };
          }
        }, {
          key: "visitComment",
          value: function visitComment(comment, context) {}
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute, context) {}
        }, {
          key: "_addError",
          value: function _addError(node, message) {
            this._errors.push(new I18nError(node.sourceSpan, message));
          }
        }]);

        return XmlToI18n$1;
      }();

      function getTypeForTag(tag) {
        switch (tag.toLowerCase()) {
          case 'br':
          case 'b':
          case 'i':
          case 'u':
            return 'fmt';

          case 'img':
            return 'image';

          case 'a':
            return 'link';

          default:
            return 'other';
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _TRANSLATIONS_TAG = 'translationbundle';
      var _TRANSLATION_TAG = 'translation';
      var _PLACEHOLDER_TAG$3 = 'ph';

      var Xtb = /*#__PURE__*/function (_Serializer4) {
        _inherits(Xtb, _Serializer4);

        var _super108 = _createSuper(Xtb);

        function Xtb() {
          _classCallCheck(this, Xtb);

          return _super108.apply(this, arguments);
        }

        _createClass2(Xtb, [{
          key: "write",
          value: function write(messages, locale) {
            throw new Error('Unsupported');
          }
        }, {
          key: "load",
          value: function load(content, url) {
            // xtb to xml nodes
            var xtbParser = new XtbParser();

            var _xtbParser$parse = xtbParser.parse(content, url),
                locale = _xtbParser$parse.locale,
                msgIdToHtml = _xtbParser$parse.msgIdToHtml,
                errors = _xtbParser$parse.errors; // xml nodes to i18n nodes


            var i18nNodesByMsgId = {};
            var converter = new XmlToI18n$2(); // Because we should be able to load xtb files that rely on features not supported by angular,
            // we need to delay the conversion of html to i18n nodes so that non angular messages are not
            // converted

            Object.keys(msgIdToHtml).forEach(function (msgId) {
              var valueFn = function valueFn() {
                var _converter$convert3 = converter.convert(msgIdToHtml[msgId], url),
                    i18nNodes = _converter$convert3.i18nNodes,
                    errors = _converter$convert3.errors;

                if (errors.length) {
                  throw new Error("xtb parse errors:\n".concat(errors.join('\n')));
                }

                return i18nNodes;
              };

              createLazyProperty(i18nNodesByMsgId, msgId, valueFn);
            });

            if (errors.length) {
              throw new Error("xtb parse errors:\n".concat(errors.join('\n')));
            }

            return {
              locale: locale,
              i18nNodesByMsgId: i18nNodesByMsgId
            };
          }
        }, {
          key: "digest",
          value: function digest(message) {
            return digest$1(message);
          }
        }, {
          key: "createNameMapper",
          value: function createNameMapper(message) {
            return new SimplePlaceholderMapper(message, toPublicName);
          }
        }]);

        return Xtb;
      }(Serializer);

      function createLazyProperty(messages, id, valueFn) {
        Object.defineProperty(messages, id, {
          configurable: true,
          enumerable: true,
          get: function get() {
            var value = valueFn();
            Object.defineProperty(messages, id, {
              enumerable: true,
              value: value
            });
            return value;
          },
          set: function set(_) {
            throw new Error('Could not overwrite an XTB translation');
          }
        });
      } // Extract messages as xml nodes from the xtb file


      var XtbParser = /*#__PURE__*/function () {
        function XtbParser() {
          _classCallCheck(this, XtbParser);

          this._locale = null;
        }

        _createClass2(XtbParser, [{
          key: "parse",
          value: function parse(xtb, url) {
            this._bundleDepth = 0;
            this._msgIdToHtml = {}; // We can not parse the ICU messages at this point as some messages might not originate
            // from Angular that could not be lex'd.

            var xml = new XmlParser().parse(xtb, url);
            this._errors = xml.errors;
            visitAll$1(this, xml.rootNodes);
            return {
              msgIdToHtml: this._msgIdToHtml,
              errors: this._errors,
              locale: this._locale
            };
          }
        }, {
          key: "visitElement",
          value: function visitElement(element, context) {
            switch (element.name) {
              case _TRANSLATIONS_TAG:
                this._bundleDepth++;

                if (this._bundleDepth > 1) {
                  this._addError(element, "<".concat(_TRANSLATIONS_TAG, "> elements can not be nested"));
                }

                var langAttr = element.attrs.find(function (attr) {
                  return attr.name === 'lang';
                });

                if (langAttr) {
                  this._locale = langAttr.value;
                }

                visitAll$1(this, element.children, null);
                this._bundleDepth--;
                break;

              case _TRANSLATION_TAG:
                var idAttr = element.attrs.find(function (attr) {
                  return attr.name === 'id';
                });

                if (!idAttr) {
                  this._addError(element, "<".concat(_TRANSLATION_TAG, "> misses the \"id\" attribute"));
                } else {
                  var id = idAttr.value;

                  if (this._msgIdToHtml.hasOwnProperty(id)) {
                    this._addError(element, "Duplicated translations for msg ".concat(id));
                  } else {
                    var innerTextStart = element.startSourceSpan.end.offset;
                    var innerTextEnd = element.endSourceSpan.start.offset;
                    var content = element.startSourceSpan.start.file.content;
                    var innerText = content.slice(innerTextStart, innerTextEnd);
                    this._msgIdToHtml[id] = innerText;
                  }
                }

                break;

              default:
                this._addError(element, 'Unexpected tag');

            }
          }
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute, context) {}
        }, {
          key: "visitText",
          value: function visitText(text, context) {}
        }, {
          key: "visitComment",
          value: function visitComment(comment, context) {}
        }, {
          key: "visitExpansion",
          value: function visitExpansion(expansion, context) {}
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(expansionCase, context) {}
        }, {
          key: "_addError",
          value: function _addError(node, message) {
            this._errors.push(new I18nError(node.sourceSpan, message));
          }
        }]);

        return XtbParser;
      }(); // Convert ml nodes (xtb syntax) to i18n nodes


      var XmlToI18n$2 = /*#__PURE__*/function () {
        function XmlToI18n$2() {
          _classCallCheck(this, XmlToI18n$2);
        }

        _createClass2(XmlToI18n$2, [{
          key: "convert",
          value: function convert(message, url) {
            var xmlIcu = new XmlParser().parse(message, url, {
              tokenizeExpansionForms: true
            });
            this._errors = xmlIcu.errors;
            var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ? [] : visitAll$1(this, xmlIcu.rootNodes);
            return {
              i18nNodes: i18nNodes,
              errors: this._errors
            };
          }
        }, {
          key: "visitText",
          value: function visitText(text, context) {
            return new Text$1(text.value, text.sourceSpan);
          }
        }, {
          key: "visitExpansion",
          value: function visitExpansion(icu, context) {
            var caseMap = {};
            visitAll$1(this, icu.cases).forEach(function (c) {
              caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);
            });
            return new Icu$1(icu.switchValue, icu.type, caseMap, icu.sourceSpan);
          }
        }, {
          key: "visitExpansionCase",
          value: function visitExpansionCase(icuCase, context) {
            return {
              value: icuCase.value,
              nodes: visitAll$1(this, icuCase.expression)
            };
          }
        }, {
          key: "visitElement",
          value: function visitElement(el, context) {
            if (el.name === _PLACEHOLDER_TAG$3) {
              var nameAttr = el.attrs.find(function (attr) {
                return attr.name === 'name';
              });

              if (nameAttr) {
                return new Placeholder('', nameAttr.value, el.sourceSpan);
              }

              this._addError(el, "<".concat(_PLACEHOLDER_TAG$3, "> misses the \"name\" attribute"));
            } else {
              this._addError(el, "Unexpected tag");
            }

            return null;
          }
        }, {
          key: "visitComment",
          value: function visitComment(comment, context) {}
        }, {
          key: "visitAttribute",
          value: function visitAttribute(attribute, context) {}
        }, {
          key: "_addError",
          value: function _addError(node, message) {
            this._errors.push(new I18nError(node.sourceSpan, message));
          }
        }]);

        return XmlToI18n$2;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A container for translated messages
       */


      var TranslationBundle = /*#__PURE__*/function () {
        function TranslationBundle() {
          var _i18nNodesByMsgId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

          var locale = arguments.length > 1 ? arguments[1] : undefined;
          var digest = arguments.length > 2 ? arguments[2] : undefined;
          var mapperFactory = arguments.length > 3 ? arguments[3] : undefined;
          var missingTranslationStrategy = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : MissingTranslationStrategy.Warning;
          var console = arguments.length > 5 ? arguments[5] : undefined;

          _classCallCheck(this, TranslationBundle);

          this._i18nNodesByMsgId = _i18nNodesByMsgId;
          this.digest = digest;
          this.mapperFactory = mapperFactory;
          this._i18nToHtml = new I18nToHtmlVisitor(_i18nNodesByMsgId, locale, digest, mapperFactory, missingTranslationStrategy, console);
        } // Creates a `TranslationBundle` by parsing the given `content` with the `serializer`.


        _createClass2(TranslationBundle, [{
          key: "get",
          value: // Returns the translation as HTML nodes from the given source message.
          function get(srcMsg) {
            var html = this._i18nToHtml.convert(srcMsg);

            if (html.errors.length) {
              throw new Error(html.errors.join('\n'));
            }

            return html.nodes;
          }
        }, {
          key: "has",
          value: function has(srcMsg) {
            return this.digest(srcMsg) in this._i18nNodesByMsgId;
          }
        }], [{
          key: "load",
          value: function load(content, url, serializer, missingTranslationStrategy, console) {
            var _serializer$load = serializer.load(content, url),
                locale = _serializer$load.locale,
                i18nNodesByMsgId = _serializer$load.i18nNodesByMsgId;

            var digestFn = function digestFn(m) {
              return serializer.digest(m);
            };

            var mapperFactory = function mapperFactory(m) {
              return serializer.createNameMapper(m);
            };

            return new TranslationBundle(i18nNodesByMsgId, locale, digestFn, mapperFactory, missingTranslationStrategy, console);
          }
        }]);

        return TranslationBundle;
      }();

      var I18nToHtmlVisitor = /*#__PURE__*/function () {
        function I18nToHtmlVisitor() {
          var _i18nNodesByMsgId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

          var _locale = arguments.length > 1 ? arguments[1] : undefined;

          var _digest = arguments.length > 2 ? arguments[2] : undefined;

          var _mapperFactory = arguments.length > 3 ? arguments[3] : undefined;

          var _missingTranslationStrategy = arguments.length > 4 ? arguments[4] : undefined;

          var _console = arguments.length > 5 ? arguments[5] : undefined;

          _classCallCheck(this, I18nToHtmlVisitor);

          this._i18nNodesByMsgId = _i18nNodesByMsgId;
          this._locale = _locale;
          this._digest = _digest;
          this._mapperFactory = _mapperFactory;
          this._missingTranslationStrategy = _missingTranslationStrategy;
          this._console = _console;
          this._contextStack = [];
          this._errors = [];
        }

        _createClass2(I18nToHtmlVisitor, [{
          key: "convert",
          value: function convert(srcMsg) {
            this._contextStack.length = 0;
            this._errors.length = 0; // i18n to text

            var text = this._convertToText(srcMsg); // text to html


            var url = srcMsg.nodes[0].sourceSpan.start.file.url;
            var html = new HtmlParser().parse(text, url, {
              tokenizeExpansionForms: true
            });
            return {
              nodes: html.rootNodes,
              errors: [].concat(_toConsumableArray(this._errors), _toConsumableArray(html.errors))
            };
          }
        }, {
          key: "visitText",
          value: function visitText(text, context) {
            // `convert()` uses an `HtmlParser` to return `html.Node`s
            // we should then make sure that any special characters are escaped
            return escapeXml(text.value);
          }
        }, {
          key: "visitContainer",
          value: function visitContainer(container, context) {
            var _this218 = this;

            return container.children.map(function (n) {
              return n.visit(_this218);
            }).join('');
          }
        }, {
          key: "visitIcu",
          value: function visitIcu(icu, context) {
            var _this219 = this;

            var cases = Object.keys(icu.cases).map(function (k) {
              return "".concat(k, " {").concat(icu.cases[k].visit(_this219), "}");
            }); // TODO(vicb): Once all format switch to using expression placeholders
            // we should throw when the placeholder is not in the source message

            var exp = this._srcMsg.placeholders.hasOwnProperty(icu.expression) ? this._srcMsg.placeholders[icu.expression].text : icu.expression;
            return "{".concat(exp, ", ").concat(icu.type, ", ").concat(cases.join(' '), "}");
          }
        }, {
          key: "visitPlaceholder",
          value: function visitPlaceholder(ph, context) {
            var phName = this._mapper(ph.name);

            if (this._srcMsg.placeholders.hasOwnProperty(phName)) {
              return this._srcMsg.placeholders[phName].text;
            }

            if (this._srcMsg.placeholderToMessage.hasOwnProperty(phName)) {
              return this._convertToText(this._srcMsg.placeholderToMessage[phName]);
            }

            this._addError(ph, "Unknown placeholder \"".concat(ph.name, "\""));

            return '';
          } // Loaded message contains only placeholders (vs tag and icu placeholders).
          // However when a translation can not be found, we need to serialize the source message
          // which can contain tag placeholders

        }, {
          key: "visitTagPlaceholder",
          value: function visitTagPlaceholder(ph, context) {
            var _this220 = this;

            var tag = "".concat(ph.tag);
            var attrs = Object.keys(ph.attrs).map(function (name) {
              return "".concat(name, "=\"").concat(ph.attrs[name], "\"");
            }).join(' ');

            if (ph.isVoid) {
              return "<".concat(tag, " ").concat(attrs, "/>");
            }

            var children = ph.children.map(function (c) {
              return c.visit(_this220);
            }).join('');
            return "<".concat(tag, " ").concat(attrs, ">").concat(children, "</").concat(tag, ">");
          } // Loaded message contains only placeholders (vs tag and icu placeholders).
          // However when a translation can not be found, we need to serialize the source message
          // which can contain tag placeholders

        }, {
          key: "visitIcuPlaceholder",
          value: function visitIcuPlaceholder(ph, context) {
            // An ICU placeholder references the source message to be serialized
            return this._convertToText(this._srcMsg.placeholderToMessage[ph.name]);
          }
          /**
           * Convert a source message to a translated text string:
           * - text nodes are replaced with their translation,
           * - placeholders are replaced with their content,
           * - ICU nodes are converted to ICU expressions.
           */

        }, {
          key: "_convertToText",
          value: function _convertToText(srcMsg) {
            var _this221 = this;

            var id = this._digest(srcMsg);

            var mapper = this._mapperFactory ? this._mapperFactory(srcMsg) : null;
            var nodes;

            this._contextStack.push({
              msg: this._srcMsg,
              mapper: this._mapper
            });

            this._srcMsg = srcMsg;

            if (this._i18nNodesByMsgId.hasOwnProperty(id)) {
              // When there is a translation use its nodes as the source
              // And create a mapper to convert serialized placeholder names to internal names
              nodes = this._i18nNodesByMsgId[id];

              this._mapper = function (name) {
                return mapper ? mapper.toInternalName(name) : name;
              };
            } else {
              // When no translation has been found
              // - report an error / a warning / nothing,
              // - use the nodes from the original message
              // - placeholders are already internal and need no mapper
              if (this._missingTranslationStrategy === MissingTranslationStrategy.Error) {
                var ctx = this._locale ? " for locale \"".concat(this._locale, "\"") : '';

                this._addError(srcMsg.nodes[0], "Missing translation for message \"".concat(id, "\"").concat(ctx));
              } else if (this._console && this._missingTranslationStrategy === MissingTranslationStrategy.Warning) {
                var _ctx2 = this._locale ? " for locale \"".concat(this._locale, "\"") : '';

                this._console.warn("Missing translation for message \"".concat(id, "\"").concat(_ctx2));
              }

              nodes = srcMsg.nodes;

              this._mapper = function (name) {
                return name;
              };
            }

            var text = nodes.map(function (node) {
              return node.visit(_this221);
            }).join('');

            var context = this._contextStack.pop();

            this._srcMsg = context.msg;
            this._mapper = context.mapper;
            return text;
          }
        }, {
          key: "_addError",
          value: function _addError(el, msg) {
            this._errors.push(new I18nError(el.sourceSpan, msg));
          }
        }]);

        return I18nToHtmlVisitor;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var I18NHtmlParser = /*#__PURE__*/function () {
        function I18NHtmlParser(_htmlParser, translations, translationsFormat) {
          var missingTranslation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : MissingTranslationStrategy.Warning;
          var console = arguments.length > 4 ? arguments[4] : undefined;

          _classCallCheck(this, I18NHtmlParser);

          this._htmlParser = _htmlParser;

          if (translations) {
            var _serializer = createSerializer(translationsFormat);

            this._translationBundle = TranslationBundle.load(translations, 'i18n', _serializer, missingTranslation, console);
          } else {
            this._translationBundle = new TranslationBundle({}, null, _digest2, undefined, missingTranslation, console);
          }
        }

        _createClass2(I18NHtmlParser, [{
          key: "parse",
          value: function parse(source, url) {
            var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
            var interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;

            var parseResult = this._htmlParser.parse(source, url, Object.assign({
              interpolationConfig: interpolationConfig
            }, options));

            if (parseResult.errors.length) {
              return new ParseTreeResult(parseResult.rootNodes, parseResult.errors);
            }

            return mergeTranslations(parseResult.rootNodes, this._translationBundle, interpolationConfig, [], {});
          }
        }]);

        return I18NHtmlParser;
      }();

      function createSerializer(format) {
        format = (format || 'xlf').toLowerCase();

        switch (format) {
          case 'xmb':
            return new Xmb();

          case 'xtb':
            return new Xtb();

          case 'xliff2':
          case 'xlf2':
            return new Xliff2();

          case 'xliff':
          case 'xlf':
          default:
            return new Xliff();
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var QUOTED_KEYS = '$quoted$';

      function convertValueToOutputAst(ctx, value) {
        var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
        return visitValue(value, new _ValueOutputAstTransformer(ctx), type);
      }

      var _ValueOutputAstTransformer = /*#__PURE__*/function () {
        function _ValueOutputAstTransformer(ctx) {
          _classCallCheck(this, _ValueOutputAstTransformer);

          this.ctx = ctx;
        }

        _createClass2(_ValueOutputAstTransformer, [{
          key: "visitArray",
          value: function visitArray(arr, type) {
            var values = []; // Note Array.map() must not be used to convert the values because it will
            // skip over empty elements in arrays constructed using `new Array(length)`,
            // resulting in `undefined` elements. This breaks the type guarantee that
            // all values in `o.LiteralArrayExpr` are of type `o.Expression`.
            // See test case in `value_util_spec.ts`.

            for (var i = 0; i < arr.length; ++i) {
              values.push(visitValue(arr[i], this, null
              /* context */
              ));
            }

            return literalArr(values, type);
          }
        }, {
          key: "visitStringMap",
          value: function visitStringMap(map, type) {
            var _this222 = this;

            var entries = [];
            var quotedSet = new Set(map && map[QUOTED_KEYS]);
            Object.keys(map).forEach(function (key) {
              entries.push(new LiteralMapEntry(key, visitValue(map[key], _this222, null), quotedSet.has(key)));
            });
            return new LiteralMapExpr(entries, type);
          }
        }, {
          key: "visitPrimitive",
          value: function visitPrimitive(value, type) {
            return literal(value, type);
          }
        }, {
          key: "visitOther",
          value: function visitOther(value, type) {
            if (value instanceof Expression) {
              return value;
            } else {
              return this.ctx.importExpr(value);
            }
          }
        }]);

        return _ValueOutputAstTransformer;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function mapEntry$1(key, value) {
        return {
          key: key,
          value: value,
          quoted: false
        };
      }

      var InjectableCompiler = /*#__PURE__*/function () {
        function InjectableCompiler(reflector, alwaysGenerateDef) {
          _classCallCheck(this, InjectableCompiler);

          this.reflector = reflector;
          this.alwaysGenerateDef = alwaysGenerateDef;
          this.tokenInjector = reflector.resolveExternalReference(Identifiers.Injector);
        }

        _createClass2(InjectableCompiler, [{
          key: "depsArray",
          value: function depsArray(deps, ctx) {
            var _this223 = this;

            return deps.map(function (dep) {
              var token = dep;
              var args = [token];
              var flags = 0
              /* Default */
              ;

              if (Array.isArray(dep)) {
                for (var i = 0; i < dep.length; i++) {
                  var v = dep[i];

                  if (v) {
                    if (v.ngMetadataName === 'Optional') {
                      flags |= 8
                      /* Optional */
                      ;
                    } else if (v.ngMetadataName === 'SkipSelf') {
                      flags |= 4
                      /* SkipSelf */
                      ;
                    } else if (v.ngMetadataName === 'Self') {
                      flags |= 2
                      /* Self */
                      ;
                    } else if (v.ngMetadataName === 'Inject') {
                      token = v.token;
                    } else {
                      token = v;
                    }
                  }
                }
              }

              var tokenExpr;

              if (typeof token === 'string') {
                tokenExpr = literal(token);
              } else if (token === _this223.tokenInjector) {
                tokenExpr = importExpr(Identifiers.INJECTOR);
              } else {
                tokenExpr = ctx.importExpr(token);
              }

              if (flags !== 0
              /* Default */
              ) {
                args = [tokenExpr, literal(flags)];
              } else {
                args = [tokenExpr];
              }

              return importExpr(Identifiers.inject).callFn(args);
            });
          }
        }, {
          key: "factoryFor",
          value: function factoryFor(injectable, ctx) {
            var retValue;

            if (injectable.useExisting) {
              retValue = importExpr(Identifiers.inject).callFn([ctx.importExpr(injectable.useExisting)]);
            } else if (injectable.useFactory) {
              var deps = injectable.deps || [];

              if (deps.length > 0) {
                retValue = ctx.importExpr(injectable.useFactory).callFn(this.depsArray(deps, ctx));
              } else {
                return ctx.importExpr(injectable.useFactory);
              }
            } else if (injectable.useValue) {
              retValue = convertValueToOutputAst(ctx, injectable.useValue);
            } else {
              var clazz = injectable.useClass || injectable.symbol;
              var depArgs = this.depsArray(this.reflector.parameters(clazz), ctx);
              retValue = new InstantiateExpr(ctx.importExpr(clazz), depArgs);
            }

            return fn([], [new ReturnStatement(retValue)], undefined, undefined, injectable.symbol.name + '_Factory');
          }
        }, {
          key: "injectableDef",
          value: function injectableDef(injectable, ctx) {
            var providedIn = NULL_EXPR;

            if (injectable.providedIn !== undefined) {
              if (injectable.providedIn === null) {
                providedIn = NULL_EXPR;
              } else if (typeof injectable.providedIn === 'string') {
                providedIn = literal(injectable.providedIn);
              } else {
                providedIn = ctx.importExpr(injectable.providedIn);
              }
            }

            var def = [mapEntry$1('factory', this.factoryFor(injectable, ctx)), mapEntry$1('token', ctx.importExpr(injectable.type.reference)), mapEntry$1('providedIn', providedIn)];
            return importExpr(Identifiers.ɵɵdefineInjectable).callFn([literalMap(def)]);
          }
        }, {
          key: "compile",
          value: function compile(injectable, ctx) {
            if (this.alwaysGenerateDef || injectable.providedIn !== undefined) {
              var className = identifierName(injectable.type);
              var clazz = new ClassStmt(className, null, [new ClassField('ɵprov', INFERRED_TYPE, [StmtModifier.Static], this.injectableDef(injectable, ctx))], [], new ClassMethod(null, [], []), []);
              ctx.statements.push(clazz);
            }
          }
        }]);

        return InjectableCompiler;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var STRIP_SRC_FILE_SUFFIXES = /(\.ts|\.d\.ts|\.js|\.jsx|\.tsx)$/;
      var GENERATED_FILE = /\.ngfactory\.|\.ngsummary\./;
      var JIT_SUMMARY_FILE = /\.ngsummary\./;
      var JIT_SUMMARY_NAME = /NgSummary$/;

      function ngfactoryFilePath(filePath) {
        var forceSourceFile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
        var urlWithSuffix = splitTypescriptSuffix(filePath, forceSourceFile);
        return "".concat(urlWithSuffix[0], ".ngfactory").concat(normalizeGenFileSuffix(urlWithSuffix[1]));
      }

      function stripGeneratedFileSuffix(filePath) {
        return filePath.replace(GENERATED_FILE, '.');
      }

      function isGeneratedFile(filePath) {
        return GENERATED_FILE.test(filePath);
      }

      function splitTypescriptSuffix(path) {
        var forceSourceFile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

        if (path.endsWith('.d.ts')) {
          return [path.slice(0, -5), forceSourceFile ? '.ts' : '.d.ts'];
        }

        var lastDot = path.lastIndexOf('.');

        if (lastDot !== -1) {
          return [path.substring(0, lastDot), path.substring(lastDot)];
        }

        return [path, ''];
      }

      function normalizeGenFileSuffix(srcFileSuffix) {
        return srcFileSuffix === '.tsx' ? '.ts' : srcFileSuffix;
      }

      function summaryFileName(fileName) {
        var fileNameWithoutSuffix = fileName.replace(STRIP_SRC_FILE_SUFFIXES, '');
        return "".concat(fileNameWithoutSuffix, ".ngsummary.json");
      }

      function summaryForJitFileName(fileName) {
        var forceSourceFile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
        var urlWithSuffix = splitTypescriptSuffix(stripGeneratedFileSuffix(fileName), forceSourceFile);
        return "".concat(urlWithSuffix[0], ".ngsummary").concat(urlWithSuffix[1]);
      }

      function stripSummaryForJitFileSuffix(filePath) {
        return filePath.replace(JIT_SUMMARY_FILE, '.');
      }

      function summaryForJitName(symbolName) {
        return "".concat(symbolName, "NgSummary");
      }

      function stripSummaryForJitNameSuffix(symbolName) {
        return symbolName.replace(JIT_SUMMARY_NAME, '');
      }

      var LOWERED_SYMBOL = /\u0275\d+/;

      function isLoweredSymbol(name) {
        return LOWERED_SYMBOL.test(name);
      }

      function createLoweredSymbol(id) {
        return "\u0275".concat(id);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var LifecycleHooks;

      (function (LifecycleHooks) {
        LifecycleHooks[LifecycleHooks["OnInit"] = 0] = "OnInit";
        LifecycleHooks[LifecycleHooks["OnDestroy"] = 1] = "OnDestroy";
        LifecycleHooks[LifecycleHooks["DoCheck"] = 2] = "DoCheck";
        LifecycleHooks[LifecycleHooks["OnChanges"] = 3] = "OnChanges";
        LifecycleHooks[LifecycleHooks["AfterContentInit"] = 4] = "AfterContentInit";
        LifecycleHooks[LifecycleHooks["AfterContentChecked"] = 5] = "AfterContentChecked";
        LifecycleHooks[LifecycleHooks["AfterViewInit"] = 6] = "AfterViewInit";
        LifecycleHooks[LifecycleHooks["AfterViewChecked"] = 7] = "AfterViewChecked";
      })(LifecycleHooks || (LifecycleHooks = {}));

      var LIFECYCLE_HOOKS_VALUES = [LifecycleHooks.OnInit, LifecycleHooks.OnDestroy, LifecycleHooks.DoCheck, LifecycleHooks.OnChanges, LifecycleHooks.AfterContentInit, LifecycleHooks.AfterContentChecked, LifecycleHooks.AfterViewInit, LifecycleHooks.AfterViewChecked];

      function hasLifecycleHook(reflector, hook, token) {
        return reflector.hasLifecycleHook(token, getHookName(hook));
      }

      function getAllLifecycleHooks(reflector, token) {
        return LIFECYCLE_HOOKS_VALUES.filter(function (hook) {
          return hasLifecycleHook(reflector, hook, token);
        });
      }

      function getHookName(hook) {
        switch (hook) {
          case LifecycleHooks.OnInit:
            return 'ngOnInit';

          case LifecycleHooks.OnDestroy:
            return 'ngOnDestroy';

          case LifecycleHooks.DoCheck:
            return 'ngDoCheck';

          case LifecycleHooks.OnChanges:
            return 'ngOnChanges';

          case LifecycleHooks.AfterContentInit:
            return 'ngAfterContentInit';

          case LifecycleHooks.AfterContentChecked:
            return 'ngAfterContentChecked';

          case LifecycleHooks.AfterViewInit:
            return 'ngAfterViewInit';

          case LifecycleHooks.AfterViewChecked:
            return 'ngAfterViewChecked';

          default:
            // This default case is not needed by TypeScript compiler, as the switch is exhaustive.
            // However Closure Compiler does not understand that and reports an error in typed mode.
            // The `throw new Error` below works around the problem, and the unexpected: never variable
            // makes sure tsc still checks this code is unreachable.
            var unexpected = hook;
            throw new Error("unexpected ".concat(unexpected));
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ERROR_COMPONENT_TYPE = 'ngComponentType'; // Design notes:
      // - don't lazily create metadata:
      //   For some metadata, we need to do async work sometimes,
      //   so the user has to kick off this loading.
      //   But we want to report errors even when the async work is
      //   not required to check that the user would have been able
      //   to wait correctly.

      var CompileMetadataResolver = /*#__PURE__*/function () {
        function CompileMetadataResolver(_config, _htmlParser, _ngModuleResolver, _directiveResolver, _pipeResolver, _summaryResolver, _schemaRegistry, _directiveNormalizer, _console, _staticSymbolCache, _reflector, _errorCollector) {
          _classCallCheck(this, CompileMetadataResolver);

          this._config = _config;
          this._htmlParser = _htmlParser;
          this._ngModuleResolver = _ngModuleResolver;
          this._directiveResolver = _directiveResolver;
          this._pipeResolver = _pipeResolver;
          this._summaryResolver = _summaryResolver;
          this._schemaRegistry = _schemaRegistry;
          this._directiveNormalizer = _directiveNormalizer;
          this._console = _console;
          this._staticSymbolCache = _staticSymbolCache;
          this._reflector = _reflector;
          this._errorCollector = _errorCollector;
          this._nonNormalizedDirectiveCache = new Map();
          this._directiveCache = new Map();
          this._summaryCache = new Map();
          this._pipeCache = new Map();
          this._ngModuleCache = new Map();
          this._ngModuleOfTypes = new Map();
          this._shallowModuleCache = new Map();
        }

        _createClass2(CompileMetadataResolver, [{
          key: "getReflector",
          value: function getReflector() {
            return this._reflector;
          }
        }, {
          key: "clearCacheFor",
          value: function clearCacheFor(type) {
            var dirMeta = this._directiveCache.get(type);

            this._directiveCache["delete"](type);

            this._nonNormalizedDirectiveCache["delete"](type);

            this._summaryCache["delete"](type);

            this._pipeCache["delete"](type);

            this._ngModuleOfTypes["delete"](type); // Clear all of the NgModule as they contain transitive information!


            this._ngModuleCache.clear();

            if (dirMeta) {
              this._directiveNormalizer.clearCacheFor(dirMeta);
            }
          }
        }, {
          key: "clearCache",
          value: function clearCache() {
            this._directiveCache.clear();

            this._nonNormalizedDirectiveCache.clear();

            this._summaryCache.clear();

            this._pipeCache.clear();

            this._ngModuleCache.clear();

            this._ngModuleOfTypes.clear();

            this._directiveNormalizer.clearCache();
          }
        }, {
          key: "_createProxyClass",
          value: function _createProxyClass(baseType, name) {
            var delegate = null;

            var proxyClass = function proxyClass() {
              if (!delegate) {
                throw new Error("Illegal state: Class ".concat(name, " for type ").concat(stringify(baseType), " is not compiled yet!"));
              }

              return delegate.apply(this, arguments);
            };

            proxyClass.setDelegate = function (d) {
              delegate = d;
              proxyClass.prototype = d.prototype;
            }; // Make stringify work correctly


            proxyClass.overriddenName = name;
            return proxyClass;
          }
        }, {
          key: "getGeneratedClass",
          value: function getGeneratedClass(dirType, name) {
            if (dirType instanceof StaticSymbol) {
              return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), name);
            } else {
              return this._createProxyClass(dirType, name);
            }
          }
        }, {
          key: "getComponentViewClass",
          value: function getComponentViewClass(dirType) {
            return this.getGeneratedClass(dirType, viewClassName(dirType, 0));
          }
        }, {
          key: "getHostComponentViewClass",
          value: function getHostComponentViewClass(dirType) {
            return this.getGeneratedClass(dirType, hostViewClassName(dirType));
          }
        }, {
          key: "getHostComponentType",
          value: function getHostComponentType(dirType) {
            var name = "".concat(identifierName({
              reference: dirType
            }), "_Host");

            if (dirType instanceof StaticSymbol) {
              return this._staticSymbolCache.get(dirType.filePath, name);
            }

            return this._createProxyClass(dirType, name);
          }
        }, {
          key: "getRendererType",
          value: function getRendererType(dirType) {
            if (dirType instanceof StaticSymbol) {
              return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), rendererTypeName(dirType));
            } else {
              // returning an object as proxy,
              // that we fill later during runtime compilation.
              return {};
            }
          }
        }, {
          key: "getComponentFactory",
          value: function getComponentFactory(selector, dirType, inputs, outputs) {
            if (dirType instanceof StaticSymbol) {
              return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), componentFactoryName(dirType));
            } else {
              var hostView = this.getHostComponentViewClass(dirType); // Note: ngContentSelectors will be filled later once the template is
              // loaded.

              var createComponentFactory = this._reflector.resolveExternalReference(Identifiers.createComponentFactory);

              return createComponentFactory(selector, dirType, hostView, inputs, outputs, []);
            }
          }
        }, {
          key: "initComponentFactory",
          value: function initComponentFactory(factory, ngContentSelectors) {
            if (!(factory instanceof StaticSymbol)) {
              var _factory$ngContentSel;

              (_factory$ngContentSel = factory.ngContentSelectors).push.apply(_factory$ngContentSel, _toConsumableArray(ngContentSelectors));
            }
          }
        }, {
          key: "_loadSummary",
          value: function _loadSummary(type, kind) {
            var typeSummary = this._summaryCache.get(type);

            if (!typeSummary) {
              var summary = this._summaryResolver.resolveSummary(type);

              typeSummary = summary ? summary.type : null;

              this._summaryCache.set(type, typeSummary || null);
            }

            return typeSummary && typeSummary.summaryKind === kind ? typeSummary : null;
          }
        }, {
          key: "getHostComponentMetadata",
          value: function getHostComponentMetadata(compMeta, hostViewType) {
            var hostType = this.getHostComponentType(compMeta.type.reference);

            if (!hostViewType) {
              hostViewType = this.getHostComponentViewClass(hostType);
            } // Note: ! is ok here as this method should only be called with normalized directive
            // metadata, which always fills in the selector.


            var template = CssSelector.parse(compMeta.selector)[0].getMatchingElementTemplate();
            var templateUrl = '';

            var htmlAst = this._htmlParser.parse(template, templateUrl);

            return CompileDirectiveMetadata.create({
              isHost: true,
              type: {
                reference: hostType,
                diDeps: [],
                lifecycleHooks: []
              },
              template: new CompileTemplateMetadata({
                encapsulation: ViewEncapsulation.None,
                template: template,
                templateUrl: templateUrl,
                htmlAst: htmlAst,
                styles: [],
                styleUrls: [],
                ngContentSelectors: [],
                animations: [],
                isInline: true,
                externalStylesheets: [],
                interpolation: null,
                preserveWhitespaces: false
              }),
              exportAs: null,
              changeDetection: ChangeDetectionStrategy.Default,
              inputs: [],
              outputs: [],
              host: {},
              isComponent: true,
              selector: '*',
              providers: [],
              viewProviders: [],
              queries: [],
              guards: {},
              viewQueries: [],
              componentViewType: hostViewType,
              rendererType: {
                id: '__Host__',
                encapsulation: ViewEncapsulation.None,
                styles: [],
                data: {}
              },
              entryComponents: [],
              componentFactory: null
            });
          }
        }, {
          key: "loadDirectiveMetadata",
          value: function loadDirectiveMetadata(ngModuleType, directiveType, isSync) {
            var _this224 = this;

            if (this._directiveCache.has(directiveType)) {
              return null;
            }

            directiveType = resolveForwardRef(directiveType);

            var _this$getNonNormalize = this.getNonNormalizedDirectiveMetadata(directiveType),
                annotation = _this$getNonNormalize.annotation,
                metadata = _this$getNonNormalize.metadata;

            var createDirectiveMetadata = function createDirectiveMetadata(templateMetadata) {
              var normalizedDirMeta = new CompileDirectiveMetadata({
                isHost: false,
                type: metadata.type,
                isComponent: metadata.isComponent,
                selector: metadata.selector,
                exportAs: metadata.exportAs,
                changeDetection: metadata.changeDetection,
                inputs: metadata.inputs,
                outputs: metadata.outputs,
                hostListeners: metadata.hostListeners,
                hostProperties: metadata.hostProperties,
                hostAttributes: metadata.hostAttributes,
                providers: metadata.providers,
                viewProviders: metadata.viewProviders,
                queries: metadata.queries,
                guards: metadata.guards,
                viewQueries: metadata.viewQueries,
                entryComponents: metadata.entryComponents,
                componentViewType: metadata.componentViewType,
                rendererType: metadata.rendererType,
                componentFactory: metadata.componentFactory,
                template: templateMetadata
              });

              if (templateMetadata) {
                _this224.initComponentFactory(metadata.componentFactory, templateMetadata.ngContentSelectors);
              }

              _this224._directiveCache.set(directiveType, normalizedDirMeta);

              _this224._summaryCache.set(directiveType, normalizedDirMeta.toSummary());

              return null;
            };

            if (metadata.isComponent) {
              var template = metadata.template;

              var templateMeta = this._directiveNormalizer.normalizeTemplate({
                ngModuleType: ngModuleType,
                componentType: directiveType,
                moduleUrl: this._reflector.componentModuleUrl(directiveType, annotation),
                encapsulation: template.encapsulation,
                template: template.template,
                templateUrl: template.templateUrl,
                styles: template.styles,
                styleUrls: template.styleUrls,
                animations: template.animations,
                interpolation: template.interpolation,
                preserveWhitespaces: template.preserveWhitespaces
              });

              if (isPromise(templateMeta) && isSync) {
                this._reportError(componentStillLoadingError(directiveType), directiveType);

                return null;
              }

              return SyncAsync.then(templateMeta, createDirectiveMetadata);
            } else {
              // directive
              createDirectiveMetadata(null);
              return null;
            }
          }
        }, {
          key: "getNonNormalizedDirectiveMetadata",
          value: function getNonNormalizedDirectiveMetadata(directiveType) {
            var _this225 = this;

            directiveType = resolveForwardRef(directiveType);

            if (!directiveType) {
              return null;
            }

            var cacheEntry = this._nonNormalizedDirectiveCache.get(directiveType);

            if (cacheEntry) {
              return cacheEntry;
            }

            var dirMeta = this._directiveResolver.resolve(directiveType, false);

            if (!dirMeta) {
              return null;
            }

            var nonNormalizedTemplateMetadata = undefined;

            if (createComponent.isTypeOf(dirMeta)) {
              // component
              var compMeta = dirMeta;
              assertArrayOfStrings('styles', compMeta.styles);
              assertArrayOfStrings('styleUrls', compMeta.styleUrls);
              assertInterpolationSymbols('interpolation', compMeta.interpolation);
              var animations = compMeta.animations;
              nonNormalizedTemplateMetadata = new CompileTemplateMetadata({
                encapsulation: noUndefined(compMeta.encapsulation),
                template: noUndefined(compMeta.template),
                templateUrl: noUndefined(compMeta.templateUrl),
                htmlAst: null,
                styles: compMeta.styles || [],
                styleUrls: compMeta.styleUrls || [],
                animations: animations || [],
                interpolation: noUndefined(compMeta.interpolation),
                isInline: !!compMeta.template,
                externalStylesheets: [],
                ngContentSelectors: [],
                preserveWhitespaces: noUndefined(dirMeta.preserveWhitespaces)
              });
            }

            var changeDetectionStrategy = null;
            var viewProviders = [];
            var entryComponentMetadata = [];
            var selector = dirMeta.selector;

            if (createComponent.isTypeOf(dirMeta)) {
              // Component
              var _compMeta = dirMeta;
              changeDetectionStrategy = _compMeta.changeDetection;

              if (_compMeta.viewProviders) {
                viewProviders = this._getProvidersMetadata(_compMeta.viewProviders, entryComponentMetadata, "viewProviders for \"".concat(stringifyType(directiveType), "\""), [], directiveType);
              }

              if (_compMeta.entryComponents) {
                entryComponentMetadata = flattenAndDedupeArray(_compMeta.entryComponents).map(function (type) {
                  return _this225._getEntryComponentMetadata(type);
                }).concat(entryComponentMetadata);
              }

              if (!selector) {
                selector = this._schemaRegistry.getDefaultComponentElementName();
              }
            } else {
              // Directive
              if (!selector) {
                selector = null;
              }
            }

            var providers = [];

            if (dirMeta.providers != null) {
              providers = this._getProvidersMetadata(dirMeta.providers, entryComponentMetadata, "providers for \"".concat(stringifyType(directiveType), "\""), [], directiveType);
            }

            var queries = [];
            var viewQueries = [];

            if (dirMeta.queries != null) {
              queries = this._getQueriesMetadata(dirMeta.queries, false, directiveType);
              viewQueries = this._getQueriesMetadata(dirMeta.queries, true, directiveType);
            }

            var metadata = CompileDirectiveMetadata.create({
              isHost: false,
              selector: selector,
              exportAs: noUndefined(dirMeta.exportAs),
              isComponent: !!nonNormalizedTemplateMetadata,
              type: this._getTypeMetadata(directiveType),
              template: nonNormalizedTemplateMetadata,
              changeDetection: changeDetectionStrategy,
              inputs: dirMeta.inputs || [],
              outputs: dirMeta.outputs || [],
              host: dirMeta.host || {},
              providers: providers || [],
              viewProviders: viewProviders || [],
              queries: queries || [],
              guards: dirMeta.guards || {},
              viewQueries: viewQueries || [],
              entryComponents: entryComponentMetadata,
              componentViewType: nonNormalizedTemplateMetadata ? this.getComponentViewClass(directiveType) : null,
              rendererType: nonNormalizedTemplateMetadata ? this.getRendererType(directiveType) : null,
              componentFactory: null
            });

            if (nonNormalizedTemplateMetadata) {
              metadata.componentFactory = this.getComponentFactory(selector, directiveType, metadata.inputs, metadata.outputs);
            }

            cacheEntry = {
              metadata: metadata,
              annotation: dirMeta
            };

            this._nonNormalizedDirectiveCache.set(directiveType, cacheEntry);

            return cacheEntry;
          }
          /**
           * Gets the metadata for the given directive.
           * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.
           */

        }, {
          key: "getDirectiveMetadata",
          value: function getDirectiveMetadata(directiveType) {
            var dirMeta = this._directiveCache.get(directiveType);

            if (!dirMeta) {
              this._reportError(syntaxError("Illegal state: getDirectiveMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Directive ".concat(stringifyType(directiveType), ".")), directiveType);
            }

            return dirMeta;
          }
        }, {
          key: "getDirectiveSummary",
          value: function getDirectiveSummary(dirType) {
            var dirSummary = this._loadSummary(dirType, CompileSummaryKind.Directive);

            if (!dirSummary) {
              this._reportError(syntaxError("Illegal state: Could not load the summary for directive ".concat(stringifyType(dirType), ".")), dirType);
            }

            return dirSummary;
          }
        }, {
          key: "isDirective",
          value: function isDirective(type) {
            return !!this._loadSummary(type, CompileSummaryKind.Directive) || this._directiveResolver.isDirective(type);
          }
        }, {
          key: "isAbstractDirective",
          value: function isAbstractDirective(type) {
            var summary = this._loadSummary(type, CompileSummaryKind.Directive);

            if (summary && !summary.isComponent) {
              return !summary.selector;
            }

            var meta = this._directiveResolver.resolve(type, false);

            if (meta && !createComponent.isTypeOf(meta)) {
              return !meta.selector;
            }

            return false;
          }
        }, {
          key: "isPipe",
          value: function isPipe(type) {
            return !!this._loadSummary(type, CompileSummaryKind.Pipe) || this._pipeResolver.isPipe(type);
          }
        }, {
          key: "isNgModule",
          value: function isNgModule(type) {
            return !!this._loadSummary(type, CompileSummaryKind.NgModule) || this._ngModuleResolver.isNgModule(type);
          }
        }, {
          key: "getNgModuleSummary",
          value: function getNgModuleSummary(moduleType) {
            var alreadyCollecting = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

            var moduleSummary = this._loadSummary(moduleType, CompileSummaryKind.NgModule);

            if (!moduleSummary) {
              var moduleMeta = this.getNgModuleMetadata(moduleType, false, alreadyCollecting);
              moduleSummary = moduleMeta ? moduleMeta.toSummary() : null;

              if (moduleSummary) {
                this._summaryCache.set(moduleType, moduleSummary);
              }
            }

            return moduleSummary;
          }
          /**
           * Loads the declared directives and pipes of an NgModule.
           */

        }, {
          key: "loadNgModuleDirectiveAndPipeMetadata",
          value: function loadNgModuleDirectiveAndPipeMetadata(moduleType, isSync) {
            var _this226 = this;

            var throwIfNotFound = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
            var ngModule = this.getNgModuleMetadata(moduleType, throwIfNotFound);
            var loading = [];

            if (ngModule) {
              ngModule.declaredDirectives.forEach(function (id) {
                var promise = _this226.loadDirectiveMetadata(moduleType, id.reference, isSync);

                if (promise) {
                  loading.push(promise);
                }
              });
              ngModule.declaredPipes.forEach(function (id) {
                return _this226._loadPipeMetadata(id.reference);
              });
            }

            return Promise.all(loading);
          }
        }, {
          key: "getShallowModuleMetadata",
          value: function getShallowModuleMetadata(moduleType) {
            var compileMeta = this._shallowModuleCache.get(moduleType);

            if (compileMeta) {
              return compileMeta;
            }

            var ngModuleMeta = findLast(this._reflector.shallowAnnotations(moduleType), createNgModule.isTypeOf);
            compileMeta = {
              type: this._getTypeMetadata(moduleType),
              rawExports: ngModuleMeta.exports,
              rawImports: ngModuleMeta.imports,
              rawProviders: ngModuleMeta.providers
            };

            this._shallowModuleCache.set(moduleType, compileMeta);

            return compileMeta;
          }
        }, {
          key: "getNgModuleMetadata",
          value: function getNgModuleMetadata(moduleType) {
            var _this227 = this;

            var throwIfNotFound = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
            var alreadyCollecting = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
            moduleType = resolveForwardRef(moduleType);

            var compileMeta = this._ngModuleCache.get(moduleType);

            if (compileMeta) {
              return compileMeta;
            }

            var meta = this._ngModuleResolver.resolve(moduleType, throwIfNotFound);

            if (!meta) {
              return null;
            }

            var declaredDirectives = [];
            var exportedNonModuleIdentifiers = [];
            var declaredPipes = [];
            var importedModules = [];
            var exportedModules = [];
            var providers = [];
            var entryComponents = [];
            var bootstrapComponents = [];
            var schemas = [];

            if (meta.imports) {
              flattenAndDedupeArray(meta.imports).forEach(function (importedType) {
                var importedModuleType = undefined;

                if (isValidType(importedType)) {
                  importedModuleType = importedType;
                } else if (importedType && importedType.ngModule) {
                  var moduleWithProviders = importedType;
                  importedModuleType = moduleWithProviders.ngModule;

                  if (moduleWithProviders.providers) {
                    providers.push.apply(providers, _toConsumableArray(_this227._getProvidersMetadata(moduleWithProviders.providers, entryComponents, "provider for the NgModule '".concat(stringifyType(importedModuleType), "'"), [], importedType)));
                  }
                }

                if (importedModuleType) {
                  if (_this227._checkSelfImport(moduleType, importedModuleType)) return;
                  if (!alreadyCollecting) alreadyCollecting = new Set();

                  if (alreadyCollecting.has(importedModuleType)) {
                    _this227._reportError(syntaxError("".concat(_this227._getTypeDescriptor(importedModuleType), " '").concat(stringifyType(importedType), "' is imported recursively by the module '").concat(stringifyType(moduleType), "'.")), moduleType);

                    return;
                  }

                  alreadyCollecting.add(importedModuleType);

                  var importedModuleSummary = _this227.getNgModuleSummary(importedModuleType, alreadyCollecting);

                  alreadyCollecting["delete"](importedModuleType);

                  if (!importedModuleSummary) {
                    _this227._reportError(syntaxError("Unexpected ".concat(_this227._getTypeDescriptor(importedType), " '").concat(stringifyType(importedType), "' imported by the module '").concat(stringifyType(moduleType), "'. Please add a @NgModule annotation.")), moduleType);

                    return;
                  }

                  importedModules.push(importedModuleSummary);
                } else {
                  _this227._reportError(syntaxError("Unexpected value '".concat(stringifyType(importedType), "' imported by the module '").concat(stringifyType(moduleType), "'")), moduleType);

                  return;
                }
              });
            }

            if (meta.exports) {
              flattenAndDedupeArray(meta.exports).forEach(function (exportedType) {
                if (!isValidType(exportedType)) {
                  _this227._reportError(syntaxError("Unexpected value '".concat(stringifyType(exportedType), "' exported by the module '").concat(stringifyType(moduleType), "'")), moduleType);

                  return;
                }

                if (!alreadyCollecting) alreadyCollecting = new Set();

                if (alreadyCollecting.has(exportedType)) {
                  _this227._reportError(syntaxError("".concat(_this227._getTypeDescriptor(exportedType), " '").concat(stringify(exportedType), "' is exported recursively by the module '").concat(stringifyType(moduleType), "'")), moduleType);

                  return;
                }

                alreadyCollecting.add(exportedType);

                var exportedModuleSummary = _this227.getNgModuleSummary(exportedType, alreadyCollecting);

                alreadyCollecting["delete"](exportedType);

                if (exportedModuleSummary) {
                  exportedModules.push(exportedModuleSummary);
                } else {
                  exportedNonModuleIdentifiers.push(_this227._getIdentifierMetadata(exportedType));
                }
              });
            } // Note: This will be modified later, so we rely on
            // getting a new instance every time!


            var transitiveModule = this._getTransitiveNgModuleMetadata(importedModules, exportedModules);

            if (meta.declarations) {
              flattenAndDedupeArray(meta.declarations).forEach(function (declaredType) {
                if (!isValidType(declaredType)) {
                  _this227._reportError(syntaxError("Unexpected value '".concat(stringifyType(declaredType), "' declared by the module '").concat(stringifyType(moduleType), "'")), moduleType);

                  return;
                }

                var declaredIdentifier = _this227._getIdentifierMetadata(declaredType);

                if (_this227.isDirective(declaredType)) {
                  if (_this227.isAbstractDirective(declaredType)) {
                    _this227._reportError(syntaxError("Directive ".concat(stringifyType(declaredType), " has no selector, please add it!")), declaredType);
                  }

                  transitiveModule.addDirective(declaredIdentifier);
                  declaredDirectives.push(declaredIdentifier);

                  _this227._addTypeToModule(declaredType, moduleType);
                } else if (_this227.isPipe(declaredType)) {
                  transitiveModule.addPipe(declaredIdentifier);
                  transitiveModule.pipes.push(declaredIdentifier);
                  declaredPipes.push(declaredIdentifier);

                  _this227._addTypeToModule(declaredType, moduleType);
                } else {
                  _this227._reportError(syntaxError("Unexpected ".concat(_this227._getTypeDescriptor(declaredType), " '").concat(stringifyType(declaredType), "' declared by the module '").concat(stringifyType(moduleType), "'. Please add a @Pipe/@Directive/@Component annotation.")), moduleType);

                  return;
                }
              });
            }

            var exportedDirectives = [];
            var exportedPipes = [];
            exportedNonModuleIdentifiers.forEach(function (exportedId) {
              if (transitiveModule.directivesSet.has(exportedId.reference)) {
                exportedDirectives.push(exportedId);
                transitiveModule.addExportedDirective(exportedId);
              } else if (transitiveModule.pipesSet.has(exportedId.reference)) {
                exportedPipes.push(exportedId);
                transitiveModule.addExportedPipe(exportedId);
              } else {
                _this227._reportError(syntaxError("Can't export ".concat(_this227._getTypeDescriptor(exportedId.reference), " ").concat(stringifyType(exportedId.reference), " from ").concat(stringifyType(moduleType), " as it was neither declared nor imported!")), moduleType);

                return;
              }
            }); // The providers of the module have to go last
            // so that they overwrite any other provider we already added.

            if (meta.providers) {
              providers.push.apply(providers, _toConsumableArray(this._getProvidersMetadata(meta.providers, entryComponents, "provider for the NgModule '".concat(stringifyType(moduleType), "'"), [], moduleType)));
            }

            if (meta.entryComponents) {
              entryComponents.push.apply(entryComponents, _toConsumableArray(flattenAndDedupeArray(meta.entryComponents).map(function (type) {
                return _this227._getEntryComponentMetadata(type);
              })));
            }

            if (meta.bootstrap) {
              flattenAndDedupeArray(meta.bootstrap).forEach(function (type) {
                if (!isValidType(type)) {
                  _this227._reportError(syntaxError("Unexpected value '".concat(stringifyType(type), "' used in the bootstrap property of module '").concat(stringifyType(moduleType), "'")), moduleType);

                  return;
                }

                bootstrapComponents.push(_this227._getIdentifierMetadata(type));
              });
            }

            entryComponents.push.apply(entryComponents, _toConsumableArray(bootstrapComponents.map(function (type) {
              return _this227._getEntryComponentMetadata(type.reference);
            })));

            if (meta.schemas) {
              schemas.push.apply(schemas, _toConsumableArray(flattenAndDedupeArray(meta.schemas)));
            }

            compileMeta = new CompileNgModuleMetadata({
              type: this._getTypeMetadata(moduleType),
              providers: providers,
              entryComponents: entryComponents,
              bootstrapComponents: bootstrapComponents,
              schemas: schemas,
              declaredDirectives: declaredDirectives,
              exportedDirectives: exportedDirectives,
              declaredPipes: declaredPipes,
              exportedPipes: exportedPipes,
              importedModules: importedModules,
              exportedModules: exportedModules,
              transitiveModule: transitiveModule,
              id: meta.id || null
            });
            entryComponents.forEach(function (id) {
              return transitiveModule.addEntryComponent(id);
            });
            providers.forEach(function (provider) {
              return transitiveModule.addProvider(provider, compileMeta.type);
            });
            transitiveModule.addModule(compileMeta.type);

            this._ngModuleCache.set(moduleType, compileMeta);

            return compileMeta;
          }
        }, {
          key: "_checkSelfImport",
          value: function _checkSelfImport(moduleType, importedModuleType) {
            if (moduleType === importedModuleType) {
              this._reportError(syntaxError("'".concat(stringifyType(moduleType), "' module can't import itself")), moduleType);

              return true;
            }

            return false;
          }
        }, {
          key: "_getTypeDescriptor",
          value: function _getTypeDescriptor(type) {
            if (isValidType(type)) {
              if (this.isDirective(type)) {
                return 'directive';
              }

              if (this.isPipe(type)) {
                return 'pipe';
              }

              if (this.isNgModule(type)) {
                return 'module';
              }
            }

            if (type.provide) {
              return 'provider';
            }

            return 'value';
          }
        }, {
          key: "_addTypeToModule",
          value: function _addTypeToModule(type, moduleType) {
            var oldModule = this._ngModuleOfTypes.get(type);

            if (oldModule && oldModule !== moduleType) {
              this._reportError(syntaxError("Type ".concat(stringifyType(type), " is part of the declarations of 2 modules: ").concat(stringifyType(oldModule), " and ").concat(stringifyType(moduleType), "! ") + "Please consider moving ".concat(stringifyType(type), " to a higher module that imports ").concat(stringifyType(oldModule), " and ").concat(stringifyType(moduleType), ". ") + "You can also create a new NgModule that exports and includes ".concat(stringifyType(type), " then import that NgModule in ").concat(stringifyType(oldModule), " and ").concat(stringifyType(moduleType), ".")), moduleType);

              return;
            }

            this._ngModuleOfTypes.set(type, moduleType);
          }
        }, {
          key: "_getTransitiveNgModuleMetadata",
          value: function _getTransitiveNgModuleMetadata(importedModules, exportedModules) {
            // collect `providers` / `entryComponents` from all imported and all exported modules
            var result = new TransitiveCompileNgModuleMetadata();
            var modulesByToken = new Map();
            importedModules.concat(exportedModules).forEach(function (modSummary) {
              modSummary.modules.forEach(function (mod) {
                return result.addModule(mod);
              });
              modSummary.entryComponents.forEach(function (comp) {
                return result.addEntryComponent(comp);
              });
              var addedTokens = new Set();
              modSummary.providers.forEach(function (entry) {
                var tokenRef = tokenReference(entry.provider.token);
                var prevModules = modulesByToken.get(tokenRef);

                if (!prevModules) {
                  prevModules = new Set();
                  modulesByToken.set(tokenRef, prevModules);
                }

                var moduleRef = entry.module.reference; // Note: the providers of one module may still contain multiple providers
                // per token (e.g. for multi providers), and we need to preserve these.

                if (addedTokens.has(tokenRef) || !prevModules.has(moduleRef)) {
                  prevModules.add(moduleRef);
                  addedTokens.add(tokenRef);
                  result.addProvider(entry.provider, entry.module);
                }
              });
            });
            exportedModules.forEach(function (modSummary) {
              modSummary.exportedDirectives.forEach(function (id) {
                return result.addExportedDirective(id);
              });
              modSummary.exportedPipes.forEach(function (id) {
                return result.addExportedPipe(id);
              });
            });
            importedModules.forEach(function (modSummary) {
              modSummary.exportedDirectives.forEach(function (id) {
                return result.addDirective(id);
              });
              modSummary.exportedPipes.forEach(function (id) {
                return result.addPipe(id);
              });
            });
            return result;
          }
        }, {
          key: "_getIdentifierMetadata",
          value: function _getIdentifierMetadata(type) {
            type = resolveForwardRef(type);
            return {
              reference: type
            };
          }
        }, {
          key: "isInjectable",
          value: function isInjectable(type) {
            var annotations = this._reflector.tryAnnotations(type);

            return annotations.some(function (ann) {
              return createInjectable.isTypeOf(ann);
            });
          }
        }, {
          key: "getInjectableSummary",
          value: function getInjectableSummary(type) {
            return {
              summaryKind: CompileSummaryKind.Injectable,
              type: this._getTypeMetadata(type, null, false)
            };
          }
        }, {
          key: "getInjectableMetadata",
          value: function getInjectableMetadata(type) {
            var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            var throwOnUnknownDeps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;

            var typeSummary = this._loadSummary(type, CompileSummaryKind.Injectable);

            var typeMetadata = typeSummary ? typeSummary.type : this._getTypeMetadata(type, dependencies, throwOnUnknownDeps);

            var annotations = this._reflector.annotations(type).filter(function (ann) {
              return createInjectable.isTypeOf(ann);
            });

            if (annotations.length === 0) {
              return null;
            }

            var meta = annotations[annotations.length - 1];
            return {
              symbol: type,
              type: typeMetadata,
              providedIn: meta.providedIn,
              useValue: meta.useValue,
              useClass: meta.useClass,
              useExisting: meta.useExisting,
              useFactory: meta.useFactory,
              deps: meta.deps
            };
          }
        }, {
          key: "_getTypeMetadata",
          value: function _getTypeMetadata(type) {
            var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            var throwOnUnknownDeps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;

            var identifier = this._getIdentifierMetadata(type);

            return {
              reference: identifier.reference,
              diDeps: this._getDependenciesMetadata(identifier.reference, dependencies, throwOnUnknownDeps),
              lifecycleHooks: getAllLifecycleHooks(this._reflector, identifier.reference)
            };
          }
        }, {
          key: "_getFactoryMetadata",
          value: function _getFactoryMetadata(factory) {
            var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
            factory = resolveForwardRef(factory);
            return {
              reference: factory,
              diDeps: this._getDependenciesMetadata(factory, dependencies)
            };
          }
          /**
           * Gets the metadata for the given pipe.
           * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.
           */

        }, {
          key: "getPipeMetadata",
          value: function getPipeMetadata(pipeType) {
            var pipeMeta = this._pipeCache.get(pipeType);

            if (!pipeMeta) {
              this._reportError(syntaxError("Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe ".concat(stringifyType(pipeType), ".")), pipeType);
            }

            return pipeMeta || null;
          }
        }, {
          key: "getPipeSummary",
          value: function getPipeSummary(pipeType) {
            var pipeSummary = this._loadSummary(pipeType, CompileSummaryKind.Pipe);

            if (!pipeSummary) {
              this._reportError(syntaxError("Illegal state: Could not load the summary for pipe ".concat(stringifyType(pipeType), ".")), pipeType);
            }

            return pipeSummary;
          }
        }, {
          key: "getOrLoadPipeMetadata",
          value: function getOrLoadPipeMetadata(pipeType) {
            var pipeMeta = this._pipeCache.get(pipeType);

            if (!pipeMeta) {
              pipeMeta = this._loadPipeMetadata(pipeType);
            }

            return pipeMeta;
          }
        }, {
          key: "_loadPipeMetadata",
          value: function _loadPipeMetadata(pipeType) {
            pipeType = resolveForwardRef(pipeType);

            var pipeAnnotation = this._pipeResolver.resolve(pipeType);

            var pipeMeta = new CompilePipeMetadata({
              type: this._getTypeMetadata(pipeType),
              name: pipeAnnotation.name,
              pure: !!pipeAnnotation.pure
            });

            this._pipeCache.set(pipeType, pipeMeta);

            this._summaryCache.set(pipeType, pipeMeta.toSummary());

            return pipeMeta;
          }
        }, {
          key: "_getDependenciesMetadata",
          value: function _getDependenciesMetadata(typeOrFunc, dependencies) {
            var _this228 = this;

            var throwOnUnknownDeps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
            var hasUnknownDeps = false;
            var params = dependencies || this._reflector.parameters(typeOrFunc) || [];
            var dependenciesMetadata = params.map(function (param) {
              var isAttribute = false;
              var isHost = false;
              var isSelf = false;
              var isSkipSelf = false;
              var isOptional = false;
              var token = null;

              if (Array.isArray(param)) {
                param.forEach(function (paramEntry) {
                  if (createHost.isTypeOf(paramEntry)) {
                    isHost = true;
                  } else if (createSelf.isTypeOf(paramEntry)) {
                    isSelf = true;
                  } else if (createSkipSelf.isTypeOf(paramEntry)) {
                    isSkipSelf = true;
                  } else if (createOptional.isTypeOf(paramEntry)) {
                    isOptional = true;
                  } else if (createAttribute.isTypeOf(paramEntry)) {
                    isAttribute = true;
                    token = paramEntry.attributeName;
                  } else if (createInject.isTypeOf(paramEntry)) {
                    token = paramEntry.token;
                  } else if (createInjectionToken.isTypeOf(paramEntry) || paramEntry instanceof StaticSymbol) {
                    token = paramEntry;
                  } else if (isValidType(paramEntry) && token == null) {
                    token = paramEntry;
                  }
                });
              } else {
                token = param;
              }

              if (token == null) {
                hasUnknownDeps = true;
                return {};
              }

              return {
                isAttribute: isAttribute,
                isHost: isHost,
                isSelf: isSelf,
                isSkipSelf: isSkipSelf,
                isOptional: isOptional,
                token: _this228._getTokenMetadata(token)
              };
            });

            if (hasUnknownDeps) {
              var depsTokens = dependenciesMetadata.map(function (dep) {
                return dep.token ? stringifyType(dep.token) : '?';
              }).join(', ');
              var message = "Can't resolve all parameters for ".concat(stringifyType(typeOrFunc), ": (").concat(depsTokens, ").");

              if (throwOnUnknownDeps || this._config.strictInjectionParameters) {
                this._reportError(syntaxError(message), typeOrFunc);
              }
            }

            return dependenciesMetadata;
          }
        }, {
          key: "_getTokenMetadata",
          value: function _getTokenMetadata(token) {
            token = resolveForwardRef(token);
            var compileToken;

            if (typeof token === 'string') {
              compileToken = {
                value: token
              };
            } else {
              compileToken = {
                identifier: {
                  reference: token
                }
              };
            }

            return compileToken;
          }
        }, {
          key: "_getProvidersMetadata",
          value: function _getProvidersMetadata(providers, targetEntryComponents, debugInfo) {
            var _this229 = this;

            var compileProviders = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
            var type = arguments.length > 4 ? arguments[4] : undefined;
            providers.forEach(function (provider, providerIdx) {
              if (Array.isArray(provider)) {
                _this229._getProvidersMetadata(provider, targetEntryComponents, debugInfo, compileProviders);
              } else {
                provider = resolveForwardRef(provider);
                var providerMeta = undefined;

                if (provider && typeof provider === 'object' && provider.hasOwnProperty('provide')) {
                  _this229._validateProvider(provider);

                  providerMeta = new ProviderMeta(provider.provide, provider);
                } else if (isValidType(provider)) {
                  providerMeta = new ProviderMeta(provider, {
                    useClass: provider
                  });
                } else if (provider === void 0) {
                  _this229._reportError(syntaxError("Encountered undefined provider! Usually this means you have a circular dependencies. This might be caused by using 'barrel' index.ts files."));

                  return;
                } else {
                  var providersInfo = providers.reduce(function (soFar, seenProvider, seenProviderIdx) {
                    if (seenProviderIdx < providerIdx) {
                      soFar.push("".concat(stringifyType(seenProvider)));
                    } else if (seenProviderIdx == providerIdx) {
                      soFar.push("?".concat(stringifyType(seenProvider), "?"));
                    } else if (seenProviderIdx == providerIdx + 1) {
                      soFar.push('...');
                    }

                    return soFar;
                  }, []).join(', ');

                  _this229._reportError(syntaxError("Invalid ".concat(debugInfo ? debugInfo : 'provider', " - only instances of Provider and Type are allowed, got: [").concat(providersInfo, "]")), type);

                  return;
                }

                if (providerMeta.token === _this229._reflector.resolveExternalReference(Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS)) {
                  targetEntryComponents.push.apply(targetEntryComponents, _toConsumableArray(_this229._getEntryComponentsFromProvider(providerMeta, type)));
                } else {
                  compileProviders.push(_this229.getProviderMetadata(providerMeta));
                }
              }
            });
            return compileProviders;
          }
        }, {
          key: "_validateProvider",
          value: function _validateProvider(provider) {
            if (provider.hasOwnProperty('useClass') && provider.useClass == null) {
              this._reportError(syntaxError("Invalid provider for ".concat(stringifyType(provider.provide), ". useClass cannot be ").concat(provider.useClass, ".\n           Usually it happens when:\n           1. There's a circular dependency (might be caused by using index.ts (barrel) files).\n           2. Class was used before it was declared. Use forwardRef in this case.")));
            }
          }
        }, {
          key: "_getEntryComponentsFromProvider",
          value: function _getEntryComponentsFromProvider(provider, type) {
            var _this230 = this;

            var components = [];
            var collectedIdentifiers = [];

            if (provider.useFactory || provider.useExisting || provider.useClass) {
              this._reportError(syntaxError("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!"), type);

              return [];
            }

            if (!provider.multi) {
              this._reportError(syntaxError("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!"), type);

              return [];
            }

            extractIdentifiers(provider.useValue, collectedIdentifiers);
            collectedIdentifiers.forEach(function (identifier) {
              var entry = _this230._getEntryComponentMetadata(identifier.reference, false);

              if (entry) {
                components.push(entry);
              }
            });
            return components;
          }
        }, {
          key: "_getEntryComponentMetadata",
          value: function _getEntryComponentMetadata(dirType) {
            var throwIfNotFound = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
            var dirMeta = this.getNonNormalizedDirectiveMetadata(dirType);

            if (dirMeta && dirMeta.metadata.isComponent) {
              return {
                componentType: dirType,
                componentFactory: dirMeta.metadata.componentFactory
              };
            }

            var dirSummary = this._loadSummary(dirType, CompileSummaryKind.Directive);

            if (dirSummary && dirSummary.isComponent) {
              return {
                componentType: dirType,
                componentFactory: dirSummary.componentFactory
              };
            }

            if (throwIfNotFound) {
              throw syntaxError("".concat(dirType.name, " cannot be used as an entry component."));
            }

            return null;
          }
        }, {
          key: "_getInjectableTypeMetadata",
          value: function _getInjectableTypeMetadata(type) {
            var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

            var typeSummary = this._loadSummary(type, CompileSummaryKind.Injectable);

            if (typeSummary) {
              return typeSummary.type;
            }

            return this._getTypeMetadata(type, dependencies);
          }
        }, {
          key: "getProviderMetadata",
          value: function getProviderMetadata(provider) {
            var compileDeps = undefined;
            var compileTypeMetadata = null;
            var compileFactoryMetadata = null;

            var token = this._getTokenMetadata(provider.token);

            if (provider.useClass) {
              compileTypeMetadata = this._getInjectableTypeMetadata(provider.useClass, provider.dependencies);
              compileDeps = compileTypeMetadata.diDeps;

              if (provider.token === provider.useClass) {
                // use the compileTypeMetadata as it contains information about lifecycleHooks...
                token = {
                  identifier: compileTypeMetadata
                };
              }
            } else if (provider.useFactory) {
              compileFactoryMetadata = this._getFactoryMetadata(provider.useFactory, provider.dependencies);
              compileDeps = compileFactoryMetadata.diDeps;
            }

            return {
              token: token,
              useClass: compileTypeMetadata,
              useValue: provider.useValue,
              useFactory: compileFactoryMetadata,
              useExisting: provider.useExisting ? this._getTokenMetadata(provider.useExisting) : undefined,
              deps: compileDeps,
              multi: provider.multi
            };
          }
        }, {
          key: "_getQueriesMetadata",
          value: function _getQueriesMetadata(queries, isViewQuery, directiveType) {
            var _this231 = this;

            var res = [];
            Object.keys(queries).forEach(function (propertyName) {
              var query = queries[propertyName];

              if (query.isViewQuery === isViewQuery) {
                res.push(_this231._getQueryMetadata(query, propertyName, directiveType));
              }
            });
            return res;
          }
        }, {
          key: "_queryVarBindings",
          value: function _queryVarBindings(selector) {
            return selector.split(/\s*,\s*/);
          }
        }, {
          key: "_getQueryMetadata",
          value: function _getQueryMetadata(q, propertyName, typeOrFunc) {
            var _this232 = this;

            var selectors;

            if (typeof q.selector === 'string') {
              selectors = this._queryVarBindings(q.selector).map(function (varName) {
                return _this232._getTokenMetadata(varName);
              });
            } else {
              if (!q.selector) {
                this._reportError(syntaxError("Can't construct a query for the property \"".concat(propertyName, "\" of \"").concat(stringifyType(typeOrFunc), "\" since the query selector wasn't defined.")), typeOrFunc);

                selectors = [];
              } else {
                selectors = [this._getTokenMetadata(q.selector)];
              }
            }

            return {
              selectors: selectors,
              first: q.first,
              descendants: q.descendants,
              propertyName: propertyName,
              read: q.read ? this._getTokenMetadata(q.read) : null,
              "static": q["static"]
            };
          }
        }, {
          key: "_reportError",
          value: function _reportError(error, type, otherType) {
            if (this._errorCollector) {
              this._errorCollector(error, type);

              if (otherType) {
                this._errorCollector(error, otherType);
              }
            } else {
              throw error;
            }
          }
        }]);

        return CompileMetadataResolver;
      }();

      function flattenArray(tree) {
        var out = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];

        if (tree) {
          for (var i = 0; i < tree.length; i++) {
            var item = resolveForwardRef(tree[i]);

            if (Array.isArray(item)) {
              flattenArray(item, out);
            } else {
              out.push(item);
            }
          }
        }

        return out;
      }

      function dedupeArray(array) {
        if (array) {
          return Array.from(new Set(array));
        }

        return [];
      }

      function flattenAndDedupeArray(tree) {
        return dedupeArray(flattenArray(tree));
      }

      function isValidType(value) {
        return value instanceof StaticSymbol || value instanceof Type;
      }

      function extractIdentifiers(value, targetIdentifiers) {
        visitValue(value, new _CompileValueConverter(), targetIdentifiers);
      }

      var _CompileValueConverter = /*#__PURE__*/function (_ValueTransformer) {
        _inherits(_CompileValueConverter, _ValueTransformer);

        var _super109 = _createSuper(_CompileValueConverter);

        function _CompileValueConverter() {
          _classCallCheck(this, _CompileValueConverter);

          return _super109.apply(this, arguments);
        }

        _createClass2(_CompileValueConverter, [{
          key: "visitOther",
          value: function visitOther(value, targetIdentifiers) {
            targetIdentifiers.push({
              reference: value
            });
          }
        }]);

        return _CompileValueConverter;
      }(ValueTransformer);

      function stringifyType(type) {
        if (type instanceof StaticSymbol) {
          return "".concat(type.name, " in ").concat(type.filePath);
        } else {
          return stringify(type);
        }
      }
      /**
       * Indicates that a component is still being loaded in a synchronous compile.
       */


      function componentStillLoadingError(compType) {
        var error = Error("Can't compile synchronously as ".concat(stringify(compType), " is still being loaded!"));
        error[ERROR_COMPONENT_TYPE] = compType;
        return error;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function providerDef(ctx, providerAst) {
        var flags = 0
        /* None */
        ;

        if (!providerAst.eager) {
          flags |= 4096
          /* LazyProvider */
          ;
        }

        if (providerAst.providerType === ProviderAstType.PrivateService) {
          flags |= 8192
          /* PrivateProvider */
          ;
        }

        if (providerAst.isModule) {
          flags |= 1073741824
          /* TypeModuleProvider */
          ;
        }

        providerAst.lifecycleHooks.forEach(function (lifecycleHook) {
          // for regular providers, we only support ngOnDestroy
          if (lifecycleHook === LifecycleHooks.OnDestroy || providerAst.providerType === ProviderAstType.Directive || providerAst.providerType === ProviderAstType.Component) {
            flags |= lifecycleHookToNodeFlag(lifecycleHook);
          }
        });

        var _ref35 = providerAst.multiProvider ? multiProviderDef(ctx, flags, providerAst.providers) : singleProviderDef(ctx, flags, providerAst.providerType, providerAst.providers[0]),
            providerExpr = _ref35.providerExpr,
            providerFlags = _ref35.flags,
            depsExpr = _ref35.depsExpr;

        return {
          providerExpr: providerExpr,
          flags: providerFlags,
          depsExpr: depsExpr,
          tokenExpr: tokenExpr(ctx, providerAst.token)
        };
      }

      function multiProviderDef(ctx, flags, providers) {
        var allDepDefs = [];
        var allParams = [];
        var exprs = providers.map(function (provider, providerIndex) {
          var expr;

          if (provider.useClass) {
            var depExprs = convertDeps(providerIndex, provider.deps || provider.useClass.diDeps);
            expr = ctx.importExpr(provider.useClass.reference).instantiate(depExprs);
          } else if (provider.useFactory) {
            var _depExprs = convertDeps(providerIndex, provider.deps || provider.useFactory.diDeps);

            expr = ctx.importExpr(provider.useFactory.reference).callFn(_depExprs);
          } else if (provider.useExisting) {
            var _depExprs2 = convertDeps(providerIndex, [{
              token: provider.useExisting
            }]);

            expr = _depExprs2[0];
          } else {
            expr = convertValueToOutputAst(ctx, provider.useValue);
          }

          return expr;
        });
        var providerExpr = fn(allParams, [new ReturnStatement(literalArr(exprs))], INFERRED_TYPE);
        return {
          providerExpr: providerExpr,
          flags: flags | 1024
          /* TypeFactoryProvider */
          ,
          depsExpr: literalArr(allDepDefs)
        };

        function convertDeps(providerIndex, deps) {
          return deps.map(function (dep, depIndex) {
            var paramName = "p".concat(providerIndex, "_").concat(depIndex);
            allParams.push(new FnParam(paramName, DYNAMIC_TYPE));
            allDepDefs.push(depDef(ctx, dep));
            return variable(paramName);
          });
        }
      }

      function singleProviderDef(ctx, flags, providerType, providerMeta) {
        var providerExpr;
        var deps;

        if (providerType === ProviderAstType.Directive || providerType === ProviderAstType.Component) {
          providerExpr = ctx.importExpr(providerMeta.useClass.reference);
          flags |= 16384
          /* TypeDirective */
          ;
          deps = providerMeta.deps || providerMeta.useClass.diDeps;
        } else {
          if (providerMeta.useClass) {
            providerExpr = ctx.importExpr(providerMeta.useClass.reference);
            flags |= 512
            /* TypeClassProvider */
            ;
            deps = providerMeta.deps || providerMeta.useClass.diDeps;
          } else if (providerMeta.useFactory) {
            providerExpr = ctx.importExpr(providerMeta.useFactory.reference);
            flags |= 1024
            /* TypeFactoryProvider */
            ;
            deps = providerMeta.deps || providerMeta.useFactory.diDeps;
          } else if (providerMeta.useExisting) {
            providerExpr = NULL_EXPR;
            flags |= 2048
            /* TypeUseExistingProvider */
            ;
            deps = [{
              token: providerMeta.useExisting
            }];
          } else {
            providerExpr = convertValueToOutputAst(ctx, providerMeta.useValue);
            flags |= 256
            /* TypeValueProvider */
            ;
            deps = [];
          }
        }

        var depsExpr = literalArr(deps.map(function (dep) {
          return depDef(ctx, dep);
        }));
        return {
          providerExpr: providerExpr,
          flags: flags,
          depsExpr: depsExpr
        };
      }

      function tokenExpr(ctx, tokenMeta) {
        return tokenMeta.identifier ? ctx.importExpr(tokenMeta.identifier.reference) : literal(tokenMeta.value);
      }

      function depDef(ctx, dep) {
        // Note: the following fields have already been normalized out by provider_analyzer:
        // - isAttribute, isHost
        var expr = dep.isValue ? convertValueToOutputAst(ctx, dep.value) : tokenExpr(ctx, dep.token);
        var flags = 0
        /* None */
        ;

        if (dep.isSkipSelf) {
          flags |= 1
          /* SkipSelf */
          ;
        }

        if (dep.isOptional) {
          flags |= 2
          /* Optional */
          ;
        }

        if (dep.isSelf) {
          flags |= 4
          /* Self */
          ;
        }

        if (dep.isValue) {
          flags |= 8
          /* Value */
          ;
        }

        return flags === 0
        /* None */
        ? expr : literalArr([literal(flags), expr]);
      }

      function lifecycleHookToNodeFlag(lifecycleHook) {
        var nodeFlag = 0
        /* None */
        ;

        switch (lifecycleHook) {
          case LifecycleHooks.AfterContentChecked:
            nodeFlag = 2097152
            /* AfterContentChecked */
            ;
            break;

          case LifecycleHooks.AfterContentInit:
            nodeFlag = 1048576
            /* AfterContentInit */
            ;
            break;

          case LifecycleHooks.AfterViewChecked:
            nodeFlag = 8388608
            /* AfterViewChecked */
            ;
            break;

          case LifecycleHooks.AfterViewInit:
            nodeFlag = 4194304
            /* AfterViewInit */
            ;
            break;

          case LifecycleHooks.DoCheck:
            nodeFlag = 262144
            /* DoCheck */
            ;
            break;

          case LifecycleHooks.OnChanges:
            nodeFlag = 524288
            /* OnChanges */
            ;
            break;

          case LifecycleHooks.OnDestroy:
            nodeFlag = 131072
            /* OnDestroy */
            ;
            break;

          case LifecycleHooks.OnInit:
            nodeFlag = 65536
            /* OnInit */
            ;
            break;
        }

        return nodeFlag;
      }

      function componentFactoryResolverProviderDef(reflector, ctx, flags, entryComponents) {
        var entryComponentFactories = entryComponents.map(function (entryComponent) {
          return ctx.importExpr(entryComponent.componentFactory);
        });
        var token = createTokenForExternalReference(reflector, Identifiers.ComponentFactoryResolver);
        var classMeta = {
          diDeps: [{
            isValue: true,
            value: literalArr(entryComponentFactories)
          }, {
            token: token,
            isSkipSelf: true,
            isOptional: true
          }, {
            token: createTokenForExternalReference(reflector, Identifiers.NgModuleRef)
          }],
          lifecycleHooks: [],
          reference: reflector.resolveExternalReference(Identifiers.CodegenComponentFactoryResolver)
        };

        var _singleProviderDef = singleProviderDef(ctx, flags, ProviderAstType.PrivateService, {
          token: token,
          multi: false,
          useClass: classMeta
        }),
            providerExpr = _singleProviderDef.providerExpr,
            providerFlags = _singleProviderDef.flags,
            depsExpr = _singleProviderDef.depsExpr;

        return {
          providerExpr: providerExpr,
          flags: providerFlags,
          depsExpr: depsExpr,
          tokenExpr: tokenExpr(ctx, token)
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var NgModuleCompileResult = function NgModuleCompileResult(ngModuleFactoryVar) {
        _classCallCheck(this, NgModuleCompileResult);

        this.ngModuleFactoryVar = ngModuleFactoryVar;
      };

      var LOG_VAR = variable('_l');

      var NgModuleCompiler = /*#__PURE__*/function () {
        function NgModuleCompiler(reflector) {
          _classCallCheck(this, NgModuleCompiler);

          this.reflector = reflector;
        }

        _createClass2(NgModuleCompiler, [{
          key: "compile",
          value: function compile(ctx, ngModuleMeta, extraProviders) {
            var sourceSpan = typeSourceSpan('NgModule', ngModuleMeta.type);
            var entryComponentFactories = ngModuleMeta.transitiveModule.entryComponents;
            var bootstrapComponents = ngModuleMeta.bootstrapComponents;
            var providerParser = new NgModuleProviderAnalyzer(this.reflector, ngModuleMeta, extraProviders, sourceSpan);
            var providerDefs = [componentFactoryResolverProviderDef(this.reflector, ctx, 0
            /* None */
            , entryComponentFactories)].concat(providerParser.parse().map(function (provider) {
              return providerDef(ctx, provider);
            })).map(function (_ref36) {
              var providerExpr = _ref36.providerExpr,
                  depsExpr = _ref36.depsExpr,
                  flags = _ref36.flags,
                  tokenExpr = _ref36.tokenExpr;
              return importExpr(Identifiers.moduleProviderDef).callFn([literal(flags), tokenExpr, providerExpr, depsExpr]);
            });
            var ngModuleDef = importExpr(Identifiers.moduleDef).callFn([literalArr(providerDefs)]);
            var ngModuleDefFactory = fn([new FnParam(LOG_VAR.name)], [new ReturnStatement(ngModuleDef)], INFERRED_TYPE);
            var ngModuleFactoryVar = "".concat(identifierName(ngModuleMeta.type), "NgFactory");

            this._createNgModuleFactory(ctx, ngModuleMeta.type.reference, importExpr(Identifiers.createModuleFactory).callFn([ctx.importExpr(ngModuleMeta.type.reference), literalArr(bootstrapComponents.map(function (id) {
              return ctx.importExpr(id.reference);
            })), ngModuleDefFactory]));

            if (ngModuleMeta.id) {
              var id = typeof ngModuleMeta.id === 'string' ? literal(ngModuleMeta.id) : ctx.importExpr(ngModuleMeta.id);
              var registerFactoryStmt = importExpr(Identifiers.RegisterModuleFactoryFn).callFn([id, variable(ngModuleFactoryVar)]).toStmt();
              ctx.statements.push(registerFactoryStmt);
            }

            return new NgModuleCompileResult(ngModuleFactoryVar);
          }
        }, {
          key: "createStub",
          value: function createStub(ctx, ngModuleReference) {
            this._createNgModuleFactory(ctx, ngModuleReference, NULL_EXPR);
          }
        }, {
          key: "_createNgModuleFactory",
          value: function _createNgModuleFactory(ctx, reference, value) {
            var ngModuleFactoryVar = "".concat(identifierName({
              reference: reference
            }), "NgFactory");
            var ngModuleFactoryStmt = variable(ngModuleFactoryVar).set(value).toDeclStmt(importType(Identifiers.NgModuleFactory, [expressionType(ctx.importExpr(reference))], [TypeModifier.Const]), [StmtModifier.Final, StmtModifier.Exported]);
            ctx.statements.push(ngModuleFactoryStmt);
          }
        }]);

        return NgModuleCompiler;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Resolves types to {@link NgModule}.
       */


      var NgModuleResolver = /*#__PURE__*/function () {
        function NgModuleResolver(_reflector) {
          _classCallCheck(this, NgModuleResolver);

          this._reflector = _reflector;
        }

        _createClass2(NgModuleResolver, [{
          key: "isNgModule",
          value: function isNgModule(type) {
            return this._reflector.annotations(type).some(createNgModule.isTypeOf);
          }
        }, {
          key: "resolve",
          value: function resolve(type) {
            var throwIfNotFound = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
            var ngModuleMeta = findLast(this._reflector.annotations(type), createNgModule.isTypeOf);

            if (ngModuleMeta) {
              return ngModuleMeta;
            } else {
              if (throwIfNotFound) {
                throw new Error("No NgModule metadata found for '".concat(stringify(type), "'."));
              }

              return null;
            }
          }
        }]);

        return NgModuleResolver;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function debugOutputAstAsTypeScript(ast) {
        var converter = new _TsEmitterVisitor();
        var ctx = EmitterVisitorContext.createRoot();
        var asts = Array.isArray(ast) ? ast : [ast];
        asts.forEach(function (ast) {
          if (ast instanceof Statement) {
            ast.visitStatement(converter, ctx);
          } else if (ast instanceof Expression) {
            ast.visitExpression(converter, ctx);
          } else if (ast instanceof Type$1) {
            ast.visitType(converter, ctx);
          } else {
            throw new Error("Don't know how to print debug info for ".concat(ast));
          }
        });
        return ctx.toSource();
      }

      var TypeScriptEmitter = /*#__PURE__*/function () {
        function TypeScriptEmitter() {
          _classCallCheck(this, TypeScriptEmitter);
        }

        _createClass2(TypeScriptEmitter, [{
          key: "emitStatementsAndContext",
          value: function emitStatementsAndContext(genFilePath, stmts) {
            var preamble = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
            var emitSourceMaps = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
            var referenceFilter = arguments.length > 4 ? arguments[4] : undefined;
            var importFilter = arguments.length > 5 ? arguments[5] : undefined;
            var converter = new _TsEmitterVisitor(referenceFilter, importFilter);
            var ctx = EmitterVisitorContext.createRoot();
            converter.visitAllStatements(stmts, ctx);
            var preambleLines = preamble ? preamble.split('\n') : [];
            converter.reexports.forEach(function (reexports, exportedModuleName) {
              var reexportsCode = reexports.map(function (reexport) {
                return "".concat(reexport.name, " as ").concat(reexport.as);
              }).join(',');
              preambleLines.push("export {".concat(reexportsCode, "} from '").concat(exportedModuleName, "';"));
            });
            converter.importsWithPrefixes.forEach(function (prefix, importedModuleName) {
              // Note: can't write the real word for import as it screws up system.js auto detection...
              preambleLines.push("imp" + "ort * as ".concat(prefix, " from '").concat(importedModuleName, "';"));
            });
            var sm = emitSourceMaps ? ctx.toSourceMapGenerator(genFilePath, preambleLines.length).toJsComment() : '';
            var lines = [].concat(_toConsumableArray(preambleLines), [ctx.toSource(), sm]);

            if (sm) {
              // always add a newline at the end, as some tools have bugs without it.
              lines.push('');
            }

            ctx.setPreambleLineCount(preambleLines.length);
            return {
              sourceText: lines.join('\n'),
              context: ctx
            };
          }
        }, {
          key: "emitStatements",
          value: function emitStatements(genFilePath, stmts) {
            var preamble = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
            return this.emitStatementsAndContext(genFilePath, stmts, preamble).sourceText;
          }
        }]);

        return TypeScriptEmitter;
      }();

      var _TsEmitterVisitor = /*#__PURE__*/function (_AbstractEmitterVisit2) {
        _inherits(_TsEmitterVisitor, _AbstractEmitterVisit2);

        var _super110 = _createSuper(_TsEmitterVisitor);

        function _TsEmitterVisitor(referenceFilter, importFilter) {
          var _this233;

          _classCallCheck(this, _TsEmitterVisitor);

          _this233 = _super110.call(this, false);
          _this233.referenceFilter = referenceFilter;
          _this233.importFilter = importFilter;
          _this233.typeExpression = 0;
          _this233.importsWithPrefixes = new Map();
          _this233.reexports = new Map();
          return _this233;
        }

        _createClass2(_TsEmitterVisitor, [{
          key: "visitType",
          value: function visitType(t, ctx) {
            var defaultType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'any';

            if (t) {
              this.typeExpression++;
              t.visitType(this, ctx);
              this.typeExpression--;
            } else {
              ctx.print(null, defaultType);
            }
          }
        }, {
          key: "visitLiteralExpr",
          value: function visitLiteralExpr(ast, ctx) {
            var value = ast.value;

            if (value == null && ast.type != INFERRED_TYPE) {
              ctx.print(ast, "(".concat(value, " as any)"));
              return null;
            }

            return _get(_getPrototypeOf(_TsEmitterVisitor.prototype), "visitLiteralExpr", this).call(this, ast, ctx);
          } // Temporary workaround to support strictNullCheck enabled consumers of ngc emit.
          // In SNC mode, [] have the type never[], so we cast here to any[].
          // TODO: narrow the cast to a more explicit type, or use a pattern that does not
          // start with [].concat. see https://github.com/angular/angular/pull/11846

        }, {
          key: "visitLiteralArrayExpr",
          value: function visitLiteralArrayExpr(ast, ctx) {
            if (ast.entries.length === 0) {
              ctx.print(ast, '(');
            }

            var result = _get(_getPrototypeOf(_TsEmitterVisitor.prototype), "visitLiteralArrayExpr", this).call(this, ast, ctx);

            if (ast.entries.length === 0) {
              ctx.print(ast, ' as any[])');
            }

            return result;
          }
        }, {
          key: "visitExternalExpr",
          value: function visitExternalExpr(ast, ctx) {
            this._visitIdentifier(ast.value, ast.typeParams, ctx);

            return null;
          }
        }, {
          key: "visitAssertNotNullExpr",
          value: function visitAssertNotNullExpr(ast, ctx) {
            var result = _get(_getPrototypeOf(_TsEmitterVisitor.prototype), "visitAssertNotNullExpr", this).call(this, ast, ctx);

            ctx.print(ast, '!');
            return result;
          }
        }, {
          key: "visitDeclareVarStmt",
          value: function visitDeclareVarStmt(stmt, ctx) {
            if (stmt.hasModifier(StmtModifier.Exported) && stmt.value instanceof ExternalExpr && !stmt.type) {
              // check for a reexport
              var _stmt$value$value = stmt.value.value,
                  name = _stmt$value$value.name,
                  moduleName = _stmt$value$value.moduleName;

              if (moduleName) {
                var reexports = this.reexports.get(moduleName);

                if (!reexports) {
                  reexports = [];
                  this.reexports.set(moduleName, reexports);
                }

                reexports.push({
                  name: name,
                  as: stmt.name
                });
                return null;
              }
            }

            if (stmt.hasModifier(StmtModifier.Exported)) {
              ctx.print(stmt, "export ");
            }

            if (stmt.hasModifier(StmtModifier.Final)) {
              ctx.print(stmt, "const");
            } else {
              ctx.print(stmt, "var");
            }

            ctx.print(stmt, " ".concat(stmt.name));

            this._printColonType(stmt.type, ctx);

            if (stmt.value) {
              ctx.print(stmt, " = ");
              stmt.value.visitExpression(this, ctx);
            }

            ctx.println(stmt, ";");
            return null;
          }
        }, {
          key: "visitWrappedNodeExpr",
          value: function visitWrappedNodeExpr(ast, ctx) {
            throw new Error('Cannot visit a WrappedNodeExpr when outputting Typescript.');
          }
        }, {
          key: "visitCastExpr",
          value: function visitCastExpr(ast, ctx) {
            ctx.print(ast, "(<");
            ast.type.visitType(this, ctx);
            ctx.print(ast, ">");
            ast.value.visitExpression(this, ctx);
            ctx.print(ast, ")");
            return null;
          }
        }, {
          key: "visitInstantiateExpr",
          value: function visitInstantiateExpr(ast, ctx) {
            ctx.print(ast, "new ");
            this.typeExpression++;
            ast.classExpr.visitExpression(this, ctx);
            this.typeExpression--;
            ctx.print(ast, "(");
            this.visitAllExpressions(ast.args, ctx, ',');
            ctx.print(ast, ")");
            return null;
          }
        }, {
          key: "visitDeclareClassStmt",
          value: function visitDeclareClassStmt(stmt, ctx) {
            var _this234 = this;

            ctx.pushClass(stmt);

            if (stmt.hasModifier(StmtModifier.Exported)) {
              ctx.print(stmt, "export ");
            }

            ctx.print(stmt, "class ".concat(stmt.name));

            if (stmt.parent != null) {
              ctx.print(stmt, " extends ");
              this.typeExpression++;
              stmt.parent.visitExpression(this, ctx);
              this.typeExpression--;
            }

            ctx.println(stmt, " {");
            ctx.incIndent();
            stmt.fields.forEach(function (field) {
              return _this234._visitClassField(field, ctx);
            });

            if (stmt.constructorMethod != null) {
              this._visitClassConstructor(stmt, ctx);
            }

            stmt.getters.forEach(function (getter) {
              return _this234._visitClassGetter(getter, ctx);
            });
            stmt.methods.forEach(function (method) {
              return _this234._visitClassMethod(method, ctx);
            });
            ctx.decIndent();
            ctx.println(stmt, "}");
            ctx.popClass();
            return null;
          }
        }, {
          key: "_visitClassField",
          value: function _visitClassField(field, ctx) {
            if (field.hasModifier(StmtModifier.Private)) {
              // comment out as a workaround for #10967
              ctx.print(null, "/*private*/ ");
            }

            if (field.hasModifier(StmtModifier.Static)) {
              ctx.print(null, 'static ');
            }

            ctx.print(null, field.name);

            this._printColonType(field.type, ctx);

            if (field.initializer) {
              ctx.print(null, ' = ');
              field.initializer.visitExpression(this, ctx);
            }

            ctx.println(null, ";");
          }
        }, {
          key: "_visitClassGetter",
          value: function _visitClassGetter(getter, ctx) {
            if (getter.hasModifier(StmtModifier.Private)) {
              ctx.print(null, "private ");
            }

            ctx.print(null, "get ".concat(getter.name, "()"));

            this._printColonType(getter.type, ctx);

            ctx.println(null, " {");
            ctx.incIndent();
            this.visitAllStatements(getter.body, ctx);
            ctx.decIndent();
            ctx.println(null, "}");
          }
        }, {
          key: "_visitClassConstructor",
          value: function _visitClassConstructor(stmt, ctx) {
            ctx.print(stmt, "constructor(");

            this._visitParams(stmt.constructorMethod.params, ctx);

            ctx.println(stmt, ") {");
            ctx.incIndent();
            this.visitAllStatements(stmt.constructorMethod.body, ctx);
            ctx.decIndent();
            ctx.println(stmt, "}");
          }
        }, {
          key: "_visitClassMethod",
          value: function _visitClassMethod(method, ctx) {
            if (method.hasModifier(StmtModifier.Private)) {
              ctx.print(null, "private ");
            }

            ctx.print(null, "".concat(method.name, "("));

            this._visitParams(method.params, ctx);

            ctx.print(null, ")");

            this._printColonType(method.type, ctx, 'void');

            ctx.println(null, " {");
            ctx.incIndent();
            this.visitAllStatements(method.body, ctx);
            ctx.decIndent();
            ctx.println(null, "}");
          }
        }, {
          key: "visitFunctionExpr",
          value: function visitFunctionExpr(ast, ctx) {
            if (ast.name) {
              ctx.print(ast, 'function ');
              ctx.print(ast, ast.name);
            }

            ctx.print(ast, "(");

            this._visitParams(ast.params, ctx);

            ctx.print(ast, ")");

            this._printColonType(ast.type, ctx, 'void');

            if (!ast.name) {
              ctx.print(ast, " => ");
            }

            ctx.println(ast, '{');
            ctx.incIndent();
            this.visitAllStatements(ast.statements, ctx);
            ctx.decIndent();
            ctx.print(ast, "}");
            return null;
          }
        }, {
          key: "visitDeclareFunctionStmt",
          value: function visitDeclareFunctionStmt(stmt, ctx) {
            if (stmt.hasModifier(StmtModifier.Exported)) {
              ctx.print(stmt, "export ");
            }

            ctx.print(stmt, "function ".concat(stmt.name, "("));

            this._visitParams(stmt.params, ctx);

            ctx.print(stmt, ")");

            this._printColonType(stmt.type, ctx, 'void');

            ctx.println(stmt, " {");
            ctx.incIndent();
            this.visitAllStatements(stmt.statements, ctx);
            ctx.decIndent();
            ctx.println(stmt, "}");
            return null;
          }
        }, {
          key: "visitTryCatchStmt",
          value: function visitTryCatchStmt(stmt, ctx) {
            ctx.println(stmt, "try {");
            ctx.incIndent();
            this.visitAllStatements(stmt.bodyStmts, ctx);
            ctx.decIndent();
            ctx.println(stmt, "} catch (".concat(CATCH_ERROR_VAR$1.name, ") {"));
            ctx.incIndent();
            var catchStmts = [CATCH_STACK_VAR$1.set(CATCH_ERROR_VAR$1.prop('stack', null)).toDeclStmt(null, [StmtModifier.Final])].concat(stmt.catchStmts);
            this.visitAllStatements(catchStmts, ctx);
            ctx.decIndent();
            ctx.println(stmt, "}");
            return null;
          }
        }, {
          key: "visitBuiltinType",
          value: function visitBuiltinType(type, ctx) {
            var typeStr;

            switch (type.name) {
              case BuiltinTypeName.Bool:
                typeStr = 'boolean';
                break;

              case BuiltinTypeName.Dynamic:
                typeStr = 'any';
                break;

              case BuiltinTypeName.Function:
                typeStr = 'Function';
                break;

              case BuiltinTypeName.Number:
                typeStr = 'number';
                break;

              case BuiltinTypeName.Int:
                typeStr = 'number';
                break;

              case BuiltinTypeName.String:
                typeStr = 'string';
                break;

              case BuiltinTypeName.None:
                typeStr = 'never';
                break;

              default:
                throw new Error("Unsupported builtin type ".concat(type.name));
            }

            ctx.print(null, typeStr);
            return null;
          }
        }, {
          key: "visitExpressionType",
          value: function visitExpressionType(ast, ctx) {
            var _this235 = this;

            ast.value.visitExpression(this, ctx);

            if (ast.typeParams !== null) {
              ctx.print(null, '<');
              this.visitAllObjects(function (type) {
                return _this235.visitType(type, ctx);
              }, ast.typeParams, ctx, ',');
              ctx.print(null, '>');
            }

            return null;
          }
        }, {
          key: "visitArrayType",
          value: function visitArrayType(type, ctx) {
            this.visitType(type.of, ctx);
            ctx.print(null, "[]");
            return null;
          }
        }, {
          key: "visitMapType",
          value: function visitMapType(type, ctx) {
            ctx.print(null, "{[key: string]:");
            this.visitType(type.valueType, ctx);
            ctx.print(null, "}");
            return null;
          }
        }, {
          key: "getBuiltinMethodName",
          value: function getBuiltinMethodName(method) {
            var name;

            switch (method) {
              case BuiltinMethod.ConcatArray:
                name = 'concat';
                break;

              case BuiltinMethod.SubscribeObservable:
                name = 'subscribe';
                break;

              case BuiltinMethod.Bind:
                name = 'bind';
                break;

              default:
                throw new Error("Unknown builtin method: ".concat(method));
            }

            return name;
          }
        }, {
          key: "_visitParams",
          value: function _visitParams(params, ctx) {
            var _this236 = this;

            this.visitAllObjects(function (param) {
              ctx.print(null, param.name);

              _this236._printColonType(param.type, ctx);
            }, params, ctx, ',');
          }
        }, {
          key: "_visitIdentifier",
          value: function _visitIdentifier(value, typeParams, ctx) {
            var _this237 = this;

            var name = value.name,
                moduleName = value.moduleName;

            if (this.referenceFilter && this.referenceFilter(value)) {
              ctx.print(null, '(null as any)');
              return;
            }

            if (moduleName && (!this.importFilter || !this.importFilter(value))) {
              var prefix = this.importsWithPrefixes.get(moduleName);

              if (prefix == null) {
                prefix = "i".concat(this.importsWithPrefixes.size);
                this.importsWithPrefixes.set(moduleName, prefix);
              }

              ctx.print(null, "".concat(prefix, "."));
            }

            ctx.print(null, name);

            if (this.typeExpression > 0) {
              // If we are in a type expression that refers to a generic type then supply
              // the required type parameters. If there were not enough type parameters
              // supplied, supply any as the type. Outside a type expression the reference
              // should not supply type parameters and be treated as a simple value reference
              // to the constructor function itself.
              var suppliedParameters = typeParams || [];

              if (suppliedParameters.length > 0) {
                ctx.print(null, "<");
                this.visitAllObjects(function (type) {
                  return type.visitType(_this237, ctx);
                }, typeParams, ctx, ',');
                ctx.print(null, ">");
              }
            }
          }
        }, {
          key: "_printColonType",
          value: function _printColonType(type, ctx, defaultType) {
            if (type !== INFERRED_TYPE) {
              ctx.print(null, ':');
              this.visitType(type, ctx, defaultType);
            }
          }
        }]);

        return _TsEmitterVisitor;
      }(AbstractEmitterVisitor);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Resolve a `Type` for {@link Pipe}.
       *
       * This interface can be overridden by the application developer to create custom behavior.
       *
       * See {@link Compiler}
       */


      var PipeResolver = /*#__PURE__*/function () {
        function PipeResolver(_reflector) {
          _classCallCheck(this, PipeResolver);

          this._reflector = _reflector;
        }

        _createClass2(PipeResolver, [{
          key: "isPipe",
          value: function isPipe(type) {
            var typeMetadata = this._reflector.annotations(resolveForwardRef(type));

            return typeMetadata && typeMetadata.some(createPipe.isTypeOf);
          }
          /**
           * Return {@link Pipe} for a given `Type`.
           */

        }, {
          key: "resolve",
          value: function resolve(type) {
            var throwIfNotFound = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;

            var metas = this._reflector.annotations(resolveForwardRef(type));

            if (metas) {
              var annotation = findLast(metas, createPipe.isTypeOf);

              if (annotation) {
                return annotation;
              }
            }

            if (throwIfNotFound) {
              throw new Error("No Pipe decorator found on ".concat(stringify(type)));
            }

            return null;
          }
        }]);

        return PipeResolver;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Generates code that is used to type check templates.
       */


      var TypeCheckCompiler = /*#__PURE__*/function () {
        function TypeCheckCompiler(options, reflector) {
          _classCallCheck(this, TypeCheckCompiler);

          this.options = options;
          this.reflector = reflector;
        }
        /**
         * Important notes:
         * - This must not produce new `import` statements, but only refer to types outside
         *   of the file via the variables provided via externalReferenceVars.
         *   This allows Typescript to reuse the old program's structure as no imports have changed.
         * - This must not produce any exports, as this would pollute the .d.ts file
         *   and also violate the point above.
         */


        _createClass2(TypeCheckCompiler, [{
          key: "compileComponent",
          value: function compileComponent(componentId, component, template, usedPipes, externalReferenceVars, ctx) {
            var _this238 = this;

            var pipes = new Map();
            usedPipes.forEach(function (p) {
              return pipes.set(p.name, p.type.reference);
            });
            var embeddedViewCount = 0;

            var viewBuilderFactory = function viewBuilderFactory(parent, guards) {
              var embeddedViewIndex = embeddedViewCount++;
              return new ViewBuilder(_this238.options, _this238.reflector, externalReferenceVars, parent, component.type.reference, component.isHost, embeddedViewIndex, pipes, guards, ctx, viewBuilderFactory);
            };

            var visitor = viewBuilderFactory(null, []);
            visitor.visitAll([], template);
            return visitor.build(componentId);
          }
        }]);

        return TypeCheckCompiler;
      }();

      var DYNAMIC_VAR_NAME = '_any';

      var TypeCheckLocalResolver = /*#__PURE__*/function () {
        function TypeCheckLocalResolver() {
          _classCallCheck(this, TypeCheckLocalResolver);
        }

        _createClass2(TypeCheckLocalResolver, [{
          key: "notifyImplicitReceiverUse",
          value: function notifyImplicitReceiverUse() {}
        }, {
          key: "getLocal",
          value: function getLocal(name) {
            if (name === EventHandlerVars.event.name) {
              // References to the event should not be type-checked.
              // TODO(chuckj): determine a better type for the event.
              return variable(DYNAMIC_VAR_NAME);
            }

            return null;
          }
        }]);

        return TypeCheckLocalResolver;
      }();

      var defaultResolver = new TypeCheckLocalResolver();

      var ViewBuilder = /*#__PURE__*/function () {
        function ViewBuilder(options, reflector, externalReferenceVars, parent, component, isHostComponent, embeddedViewIndex, pipes, guards, ctx, viewBuilderFactory) {
          _classCallCheck(this, ViewBuilder);

          this.options = options;
          this.reflector = reflector;
          this.externalReferenceVars = externalReferenceVars;
          this.parent = parent;
          this.component = component;
          this.isHostComponent = isHostComponent;
          this.embeddedViewIndex = embeddedViewIndex;
          this.pipes = pipes;
          this.guards = guards;
          this.ctx = ctx;
          this.viewBuilderFactory = viewBuilderFactory;
          this.refOutputVars = new Map();
          this.variables = [];
          this.children = [];
          this.updates = [];
          this.actions = [];
        }

        _createClass2(ViewBuilder, [{
          key: "getOutputVar",
          value: function getOutputVar(type) {
            var varName;

            if (type === this.component && this.isHostComponent) {
              varName = DYNAMIC_VAR_NAME;
            } else if (type instanceof StaticSymbol) {
              varName = this.externalReferenceVars.get(type);
            } else {
              varName = DYNAMIC_VAR_NAME;
            }

            if (!varName) {
              throw new Error("Illegal State: referring to a type without a variable ".concat(JSON.stringify(type)));
            }

            return varName;
          }
        }, {
          key: "getTypeGuardExpressions",
          value: function getTypeGuardExpressions(ast) {
            var result = _toConsumableArray(this.guards);

            var _iterator23 = _createForOfIteratorHelper(ast.directives),
                _step23;

            try {
              for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
                var directive = _step23.value;

                var _iterator24 = _createForOfIteratorHelper(directive.inputs),
                    _step24;

                try {
                  for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
                    var input = _step24.value;
                    var guard = directive.directive.guards[input.directiveName];

                    if (guard) {
                      var useIf = guard === 'UseIf';
                      result.push({
                        guard: guard,
                        useIf: useIf,
                        expression: {
                          context: this.component,
                          value: input.value,
                          sourceSpan: input.sourceSpan
                        }
                      });
                    }
                  }
                } catch (err) {
                  _iterator24.e(err);
                } finally {
                  _iterator24.f();
                }
              }
            } catch (err) {
              _iterator23.e(err);
            } finally {
              _iterator23.f();
            }

            return result;
          }
        }, {
          key: "visitAll",
          value: function visitAll(variables, astNodes) {
            this.variables = variables;
            templateVisitAll(this, astNodes);
          }
        }, {
          key: "build",
          value: function build(componentId) {
            var _this239 = this;

            var targetStatements = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
            this.children.forEach(function (child) {
              return child.build(componentId, targetStatements);
            });
            var viewStmts = [variable(DYNAMIC_VAR_NAME).set(NULL_EXPR).toDeclStmt(DYNAMIC_TYPE)];
            var bindingCount = 0;
            this.updates.forEach(function (expression) {
              var _viewStmts;

              var _this239$preprocessUp = _this239.preprocessUpdateExpression(expression),
                  sourceSpan = _this239$preprocessUp.sourceSpan,
                  context = _this239$preprocessUp.context,
                  value = _this239$preprocessUp.value;

              var bindingId = "".concat(bindingCount++);
              var nameResolver = context === _this239.component ? _this239 : defaultResolver;

              var _convertPropertyBindi = _convertPropertyBinding(nameResolver, variable(_this239.getOutputVar(context)), value, bindingId, BindingForm.General),
                  stmts = _convertPropertyBindi.stmts,
                  currValExpr = _convertPropertyBindi.currValExpr;

              stmts.push(new ExpressionStatement(currValExpr));

              (_viewStmts = viewStmts).push.apply(_viewStmts, _toConsumableArray(stmts.map(function (stmt) {
                return applySourceSpanToStatementIfNeeded(stmt, sourceSpan);
              })));
            });
            this.actions.forEach(function (_ref37) {
              var _viewStmts2;

              var sourceSpan = _ref37.sourceSpan,
                  context = _ref37.context,
                  value = _ref37.value;
              var bindingId = "".concat(bindingCount++);
              var nameResolver = context === _this239.component ? _this239 : defaultResolver;

              var _convertActionBinding = convertActionBinding(nameResolver, variable(_this239.getOutputVar(context)), value, bindingId),
                  stmts = _convertActionBinding.stmts;

              (_viewStmts2 = viewStmts).push.apply(_viewStmts2, _toConsumableArray(stmts.map(function (stmt) {
                return applySourceSpanToStatementIfNeeded(stmt, sourceSpan);
              })));
            });

            if (this.guards.length) {
              var guardExpression = undefined;

              var _iterator25 = _createForOfIteratorHelper(this.guards),
                  _step25;

              try {
                for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
                  var guard = _step25.value;

                  var _this$preprocessUpdat = this.preprocessUpdateExpression(guard.expression),
                      context = _this$preprocessUpdat.context,
                      value = _this$preprocessUpdat.value;

                  var bindingId = "".concat(bindingCount++);
                  var nameResolver = context === this.component ? this : defaultResolver; // We only support support simple expressions and ignore others as they
                  // are unlikely to affect type narrowing.

                  var _convertPropertyBindi2 = _convertPropertyBinding(nameResolver, variable(this.getOutputVar(context)), value, bindingId, BindingForm.TrySimple),
                      stmts = _convertPropertyBindi2.stmts,
                      currValExpr = _convertPropertyBindi2.currValExpr;

                  if (stmts.length == 0) {
                    var guardClause = guard.useIf ? currValExpr : this.ctx.importExpr(guard.guard).callFn([currValExpr]);
                    guardExpression = guardExpression ? guardExpression.and(guardClause) : guardClause;
                  }
                }
              } catch (err) {
                _iterator25.e(err);
              } finally {
                _iterator25.f();
              }

              if (guardExpression) {
                viewStmts = [new IfStmt(guardExpression, viewStmts)];
              }
            }

            var viewName = "_View_".concat(componentId, "_").concat(this.embeddedViewIndex);
            var viewFactory = new DeclareFunctionStmt(viewName, [], viewStmts);
            targetStatements.push(viewFactory);
            return targetStatements;
          }
        }, {
          key: "visitBoundText",
          value: function visitBoundText(ast, context) {
            var _this240 = this;

            var astWithSource = ast.value;
            var inter = astWithSource.ast;
            inter.expressions.forEach(function (expr) {
              return _this240.updates.push({
                context: _this240.component,
                value: expr,
                sourceSpan: ast.sourceSpan
              });
            });
          }
        }, {
          key: "visitEmbeddedTemplate",
          value: function visitEmbeddedTemplate(ast, context) {
            this.visitElementOrTemplate(ast); // Note: The old view compiler used to use an `any` type
            // for the context in any embedded view.
            // We keep this behaivor behind a flag for now.

            if (this.options.fullTemplateTypeCheck) {
              // Find any applicable type guards. For example, NgIf has a type guard on ngIf
              // (see NgIf.ngIfTypeGuard) that can be used to indicate that a template is only
              // stamped out if ngIf is truthy so any bindings in the template can assume that,
              // if a nullable type is used for ngIf, that expression is not null or undefined.
              var guards = this.getTypeGuardExpressions(ast);
              var childVisitor = this.viewBuilderFactory(this, guards);
              this.children.push(childVisitor);
              childVisitor.visitAll(ast.variables, ast.children);
            }
          }
        }, {
          key: "visitElement",
          value: function visitElement(ast, context) {
            var _this241 = this;

            this.visitElementOrTemplate(ast);
            var inputDefs = [];
            var updateRendererExpressions = [];
            var outputDefs = [];
            ast.inputs.forEach(function (inputAst) {
              _this241.updates.push({
                context: _this241.component,
                value: inputAst.value,
                sourceSpan: inputAst.sourceSpan
              });
            });
            templateVisitAll(this, ast.children);
          }
        }, {
          key: "visitElementOrTemplate",
          value: function visitElementOrTemplate(ast) {
            var _this242 = this;

            ast.directives.forEach(function (dirAst) {
              _this242.visitDirective(dirAst);
            });
            ast.references.forEach(function (ref) {
              var outputVarType = null; // Note: The old view compiler used to use an `any` type
              // for directives exposed via `exportAs`.
              // We keep this behaivor behind a flag for now.

              if (ref.value && ref.value.identifier && _this242.options.fullTemplateTypeCheck) {
                outputVarType = ref.value.identifier.reference;
              } else {
                outputVarType = BuiltinTypeName.Dynamic;
              }

              _this242.refOutputVars.set(ref.name, outputVarType);
            });
            ast.outputs.forEach(function (outputAst) {
              _this242.actions.push({
                context: _this242.component,
                value: outputAst.handler,
                sourceSpan: outputAst.sourceSpan
              });
            });
          }
        }, {
          key: "visitDirective",
          value: function visitDirective(dirAst) {
            var _this243 = this;

            var dirType = dirAst.directive.type.reference;
            dirAst.inputs.forEach(function (input) {
              return _this243.updates.push({
                context: _this243.component,
                value: input.value,
                sourceSpan: input.sourceSpan
              });
            }); // Note: The old view compiler used to use an `any` type
            // for expressions in host properties / events.
            // We keep this behaivor behind a flag for now.

            if (this.options.fullTemplateTypeCheck) {
              dirAst.hostProperties.forEach(function (inputAst) {
                return _this243.updates.push({
                  context: dirType,
                  value: inputAst.value,
                  sourceSpan: inputAst.sourceSpan
                });
              });
              dirAst.hostEvents.forEach(function (hostEventAst) {
                return _this243.actions.push({
                  context: dirType,
                  value: hostEventAst.handler,
                  sourceSpan: hostEventAst.sourceSpan
                });
              });
            }
          }
        }, {
          key: "notifyImplicitReceiverUse",
          value: function notifyImplicitReceiverUse() {}
        }, {
          key: "getLocal",
          value: function getLocal(name) {
            if (name == EventHandlerVars.event.name) {
              return variable(this.getOutputVar(BuiltinTypeName.Dynamic));
            }

            for (var currBuilder = this; currBuilder; currBuilder = currBuilder.parent) {
              var outputVarType = void 0; // check references

              outputVarType = currBuilder.refOutputVars.get(name);

              if (outputVarType == null) {
                // check variables
                var varAst = currBuilder.variables.find(function (varAst) {
                  return varAst.name === name;
                });

                if (varAst) {
                  outputVarType = BuiltinTypeName.Dynamic;
                }
              }

              if (outputVarType != null) {
                return variable(this.getOutputVar(outputVarType));
              }
            }

            return null;
          }
        }, {
          key: "pipeOutputVar",
          value: function pipeOutputVar(name) {
            var pipe = this.pipes.get(name);

            if (!pipe) {
              throw new Error("Illegal State: Could not find pipe ".concat(name, " in template of ").concat(this.component));
            }

            return this.getOutputVar(pipe);
          }
        }, {
          key: "preprocessUpdateExpression",
          value: function preprocessUpdateExpression(expression) {
            var _this244 = this;

            return {
              sourceSpan: expression.sourceSpan,
              context: expression.context,
              value: convertPropertyBindingBuiltins({
                createLiteralArrayConverter: function createLiteralArrayConverter(argCount) {
                  return function (args) {
                    var arr = literalArr(args); // Note: The old view compiler used to use an `any` type
                    // for arrays.

                    return _this244.options.fullTemplateTypeCheck ? arr : arr.cast(DYNAMIC_TYPE);
                  };
                },
                createLiteralMapConverter: function createLiteralMapConverter(keys) {
                  return function (values) {
                    var entries = keys.map(function (k, i) {
                      return {
                        key: k.key,
                        value: values[i],
                        quoted: k.quoted
                      };
                    });
                    var map = literalMap(entries); // Note: The old view compiler used to use an `any` type
                    // for maps.

                    return _this244.options.fullTemplateTypeCheck ? map : map.cast(DYNAMIC_TYPE);
                  };
                },
                createPipeConverter: function createPipeConverter(name, argCount) {
                  return function (args) {
                    // Note: The old view compiler used to use an `any` type
                    // for pipes.
                    var pipeExpr = _this244.options.fullTemplateTypeCheck ? variable(_this244.pipeOutputVar(name)) : variable(_this244.getOutputVar(BuiltinTypeName.Dynamic));
                    return pipeExpr.callMethod('transform', args);
                  };
                }
              }, expression.value)
            };
          }
        }, {
          key: "visitNgContent",
          value: function visitNgContent(ast, context) {}
        }, {
          key: "visitText",
          value: function visitText(ast, context) {}
        }, {
          key: "visitDirectiveProperty",
          value: function visitDirectiveProperty(ast, context) {}
        }, {
          key: "visitReference",
          value: function visitReference(ast, context) {}
        }, {
          key: "visitVariable",
          value: function visitVariable(ast, context) {}
        }, {
          key: "visitEvent",
          value: function visitEvent(ast, context) {}
        }, {
          key: "visitElementProperty",
          value: function visitElementProperty(ast, context) {}
        }, {
          key: "visitAttr",
          value: function visitAttr(ast, context) {}
        }]);

        return ViewBuilder;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var CLASS_ATTR$1 = 'class';
      var STYLE_ATTR = 'style';
      var IMPLICIT_TEMPLATE_VAR = '\$implicit';

      var ViewCompileResult = function ViewCompileResult(viewClassVar, rendererTypeVar) {
        _classCallCheck(this, ViewCompileResult);

        this.viewClassVar = viewClassVar;
        this.rendererTypeVar = rendererTypeVar;
      };

      var ViewCompiler = /*#__PURE__*/function () {
        function ViewCompiler(_reflector) {
          _classCallCheck(this, ViewCompiler);

          this._reflector = _reflector;
        }

        _createClass2(ViewCompiler, [{
          key: "compileComponent",
          value: function compileComponent(outputCtx, component, template, styles, usedPipes) {
            var _this245 = this,
                _outputCtx$statements;

            var embeddedViewCount = 0;
            var renderComponentVarName = undefined;

            if (!component.isHost) {
              var _template2 = component.template;
              var customRenderData = [];

              if (_template2.animations && _template2.animations.length) {
                customRenderData.push(new LiteralMapEntry('animation', convertValueToOutputAst(outputCtx, _template2.animations), true));
              }

              var renderComponentVar = variable(rendererTypeName(component.type.reference));
              renderComponentVarName = renderComponentVar.name;
              outputCtx.statements.push(renderComponentVar.set(importExpr(Identifiers.createRendererType2).callFn([new LiteralMapExpr([new LiteralMapEntry('encapsulation', literal(_template2.encapsulation), false), new LiteralMapEntry('styles', styles, false), new LiteralMapEntry('data', new LiteralMapExpr(customRenderData), false)])])).toDeclStmt(importType(Identifiers.RendererType2), [StmtModifier.Final, StmtModifier.Exported]));
            }

            var viewBuilderFactory = function viewBuilderFactory(parent) {
              var embeddedViewIndex = embeddedViewCount++;
              return new ViewBuilder$1(_this245._reflector, outputCtx, parent, component, embeddedViewIndex, usedPipes, viewBuilderFactory);
            };

            var visitor = viewBuilderFactory(null);
            visitor.visitAll([], template);

            (_outputCtx$statements = outputCtx.statements).push.apply(_outputCtx$statements, _toConsumableArray(visitor.build()));

            return new ViewCompileResult(visitor.viewName, renderComponentVarName);
          }
        }]);

        return ViewCompiler;
      }();

      var LOG_VAR$1 = variable('_l');
      var VIEW_VAR = variable('_v');
      var CHECK_VAR = variable('_ck');
      var COMP_VAR = variable('_co');
      var EVENT_NAME_VAR = variable('en');
      var ALLOW_DEFAULT_VAR = variable("ad");

      var ViewBuilder$1 = /*#__PURE__*/function () {
        function ViewBuilder$1(reflector, outputCtx, parent, component, embeddedViewIndex, usedPipes, viewBuilderFactory) {
          _classCallCheck(this, ViewBuilder$1);

          this.reflector = reflector;
          this.outputCtx = outputCtx;
          this.parent = parent;
          this.component = component;
          this.embeddedViewIndex = embeddedViewIndex;
          this.usedPipes = usedPipes;
          this.viewBuilderFactory = viewBuilderFactory;
          this.nodes = [];
          this.purePipeNodeIndices = Object.create(null); // Need Object.create so that we don't have builtin values...

          this.refNodeIndices = Object.create(null);
          this.variables = [];
          this.children = []; // TODO(tbosch): The old view compiler used to use an `any` type
          // for the context in any embedded view. We keep this behaivor for now
          // to be able to introduce the new view compiler without too many errors.

          this.compType = this.embeddedViewIndex > 0 ? DYNAMIC_TYPE : expressionType(outputCtx.importExpr(this.component.type.reference));
          this.viewName = viewClassName(this.component.type.reference, this.embeddedViewIndex);
        }

        _createClass2(ViewBuilder$1, [{
          key: "visitAll",
          value: function visitAll(variables, astNodes) {
            var _this246 = this;

            this.variables = variables; // create the pipes for the pure pipes immediately, so that we know their indices.

            if (!this.parent) {
              this.usedPipes.forEach(function (pipe) {
                if (pipe.pure) {
                  _this246.purePipeNodeIndices[pipe.name] = _this246._createPipe(null, pipe);
                }
              });
            }

            if (!this.parent) {
              this.component.viewQueries.forEach(function (query, queryIndex) {
                // Note: queries start with id 1 so we can use the number in a Bloom filter!
                var queryId = queryIndex + 1;
                var bindingType = query.first ? 0
                /* First */
                : 1
                /* All */
                ;
                var flags = 134217728
                /* TypeViewQuery */
                | calcStaticDynamicQueryFlags(query);

                _this246.nodes.push(function () {
                  return {
                    sourceSpan: null,
                    nodeFlags: flags,
                    nodeDef: importExpr(Identifiers.queryDef).callFn([literal(flags), literal(queryId), new LiteralMapExpr([new LiteralMapEntry(query.propertyName, literal(bindingType), false)])])
                  };
                });
              });
            }

            templateVisitAll(this, astNodes);

            if (this.parent && (astNodes.length === 0 || needsAdditionalRootNode(astNodes))) {
              // if the view is an embedded view, then we need to add an additional root node in some cases
              this.nodes.push(function () {
                return {
                  sourceSpan: null,
                  nodeFlags: 1
                  /* TypeElement */
                  ,
                  nodeDef: importExpr(Identifiers.anchorDef).callFn([literal(0
                  /* None */
                  ), NULL_EXPR, NULL_EXPR, literal(0)])
                };
              });
            }
          }
        }, {
          key: "build",
          value: function build() {
            var targetStatements = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
            this.children.forEach(function (child) {
              return child.build(targetStatements);
            });

            var _this$_createNodeExpr = this._createNodeExpressions(),
                updateRendererStmts = _this$_createNodeExpr.updateRendererStmts,
                updateDirectivesStmts = _this$_createNodeExpr.updateDirectivesStmts,
                nodeDefExprs = _this$_createNodeExpr.nodeDefExprs;

            var updateRendererFn = this._createUpdateFn(updateRendererStmts);

            var updateDirectivesFn = this._createUpdateFn(updateDirectivesStmts);

            var viewFlags = 0
            /* None */
            ;

            if (!this.parent && this.component.changeDetection === ChangeDetectionStrategy.OnPush) {
              viewFlags |= 2
              /* OnPush */
              ;
            }

            var viewFactory = new DeclareFunctionStmt(this.viewName, [new FnParam(LOG_VAR$1.name)], [new ReturnStatement(importExpr(Identifiers.viewDef).callFn([literal(viewFlags), literalArr(nodeDefExprs), updateDirectivesFn, updateRendererFn]))], importType(Identifiers.ViewDefinition), this.embeddedViewIndex === 0 ? [StmtModifier.Exported] : []);
            targetStatements.push(viewFactory);
            return targetStatements;
          }
        }, {
          key: "_createUpdateFn",
          value: function _createUpdateFn(updateStmts) {
            var updateFn;

            if (updateStmts.length > 0) {
              var preStmts = [];

              if (!this.component.isHost && findReadVarNames(updateStmts).has(COMP_VAR.name)) {
                preStmts.push(COMP_VAR.set(VIEW_VAR.prop('component')).toDeclStmt(this.compType));
              }

              updateFn = fn([new FnParam(CHECK_VAR.name, INFERRED_TYPE), new FnParam(VIEW_VAR.name, INFERRED_TYPE)], [].concat(preStmts, _toConsumableArray(updateStmts)), INFERRED_TYPE);
            } else {
              updateFn = NULL_EXPR;
            }

            return updateFn;
          }
        }, {
          key: "visitNgContent",
          value: function visitNgContent(ast, context) {
            // ngContentDef(ngContentIndex: number, index: number): NodeDef;
            this.nodes.push(function () {
              return {
                sourceSpan: ast.sourceSpan,
                nodeFlags: 8
                /* TypeNgContent */
                ,
                nodeDef: importExpr(Identifiers.ngContentDef).callFn([literal(ast.ngContentIndex), literal(ast.index)])
              };
            });
          }
        }, {
          key: "visitText",
          value: function visitText(ast, context) {
            // Static text nodes have no check function
            var checkIndex = -1;
            this.nodes.push(function () {
              return {
                sourceSpan: ast.sourceSpan,
                nodeFlags: 2
                /* TypeText */
                ,
                nodeDef: importExpr(Identifiers.textDef).callFn([literal(checkIndex), literal(ast.ngContentIndex), literalArr([literal(ast.value)])])
              };
            });
          }
        }, {
          key: "visitBoundText",
          value: function visitBoundText(ast, context) {
            var _this247 = this;

            var nodeIndex = this.nodes.length; // reserve the space in the nodeDefs array

            this.nodes.push(null);
            var astWithSource = ast.value;
            var inter = astWithSource.ast;
            var updateRendererExpressions = inter.expressions.map(function (expr, bindingIndex) {
              return _this247._preprocessUpdateExpression({
                nodeIndex: nodeIndex,
                bindingIndex: bindingIndex,
                sourceSpan: ast.sourceSpan,
                context: COMP_VAR,
                value: expr
              });
            }); // Check index is the same as the node index during compilation
            // They might only differ at runtime

            var checkIndex = nodeIndex;

            this.nodes[nodeIndex] = function () {
              return {
                sourceSpan: ast.sourceSpan,
                nodeFlags: 2
                /* TypeText */
                ,
                nodeDef: importExpr(Identifiers.textDef).callFn([literal(checkIndex), literal(ast.ngContentIndex), literalArr(inter.strings.map(function (s) {
                  return literal(s);
                }))]),
                updateRenderer: updateRendererExpressions
              };
            };
          }
        }, {
          key: "visitEmbeddedTemplate",
          value: function visitEmbeddedTemplate(ast, context) {
            var _this248 = this;

            var nodeIndex = this.nodes.length; // reserve the space in the nodeDefs array

            this.nodes.push(null);

            var _this$_visitElementOr = this._visitElementOrTemplate(nodeIndex, ast),
                flags = _this$_visitElementOr.flags,
                queryMatchesExpr = _this$_visitElementOr.queryMatchesExpr,
                hostEvents = _this$_visitElementOr.hostEvents;

            var childVisitor = this.viewBuilderFactory(this);
            this.children.push(childVisitor);
            childVisitor.visitAll(ast.variables, ast.children);
            var childCount = this.nodes.length - nodeIndex - 1; // anchorDef(
            //   flags: NodeFlags, matchedQueries: [string, QueryValueType][], ngContentIndex: number,
            //   childCount: number, handleEventFn?: ElementHandleEventFn, templateFactory?:
            //   ViewDefinitionFactory): NodeDef;

            this.nodes[nodeIndex] = function () {
              return {
                sourceSpan: ast.sourceSpan,
                nodeFlags: 1
                /* TypeElement */
                | flags,
                nodeDef: importExpr(Identifiers.anchorDef).callFn([literal(flags), queryMatchesExpr, literal(ast.ngContentIndex), literal(childCount), _this248._createElementHandleEventFn(nodeIndex, hostEvents), variable(childVisitor.viewName)])
              };
            };
          }
        }, {
          key: "visitElement",
          value: function visitElement(ast, context) {
            var _this249 = this;

            var nodeIndex = this.nodes.length; // reserve the space in the nodeDefs array so we can add children

            this.nodes.push(null); // Using a null element name creates an anchor.

            var elName = isNgContainer(ast.name) ? null : ast.name;

            var _this$_visitElementOr2 = this._visitElementOrTemplate(nodeIndex, ast),
                flags = _this$_visitElementOr2.flags,
                usedEvents = _this$_visitElementOr2.usedEvents,
                queryMatchesExpr = _this$_visitElementOr2.queryMatchesExpr,
                dirHostBindings = _this$_visitElementOr2.hostBindings,
                hostEvents = _this$_visitElementOr2.hostEvents;

            var inputDefs = [];
            var updateRendererExpressions = [];
            var outputDefs = [];

            if (elName) {
              var hostBindings = ast.inputs.map(function (inputAst) {
                return {
                  context: COMP_VAR,
                  inputAst: inputAst,
                  dirAst: null
                };
              }).concat(dirHostBindings);

              if (hostBindings.length) {
                updateRendererExpressions = hostBindings.map(function (hostBinding, bindingIndex) {
                  return _this249._preprocessUpdateExpression({
                    context: hostBinding.context,
                    nodeIndex: nodeIndex,
                    bindingIndex: bindingIndex,
                    sourceSpan: hostBinding.inputAst.sourceSpan,
                    value: hostBinding.inputAst.value
                  });
                });
                inputDefs = hostBindings.map(function (hostBinding) {
                  return elementBindingDef(hostBinding.inputAst, hostBinding.dirAst);
                });
              }

              outputDefs = usedEvents.map(function (_ref38) {
                var _ref39 = _slicedToArray(_ref38, 2),
                    target = _ref39[0],
                    eventName = _ref39[1];

                return literalArr([literal(target), literal(eventName)]);
              });
            }

            templateVisitAll(this, ast.children);
            var childCount = this.nodes.length - nodeIndex - 1;
            var compAst = ast.directives.find(function (dirAst) {
              return dirAst.directive.isComponent;
            });
            var compRendererType = NULL_EXPR;
            var compView = NULL_EXPR;

            if (compAst) {
              compView = this.outputCtx.importExpr(compAst.directive.componentViewType);
              compRendererType = this.outputCtx.importExpr(compAst.directive.rendererType);
            } // Check index is the same as the node index during compilation
            // They might only differ at runtime


            var checkIndex = nodeIndex;

            this.nodes[nodeIndex] = function () {
              return {
                sourceSpan: ast.sourceSpan,
                nodeFlags: 1
                /* TypeElement */
                | flags,
                nodeDef: importExpr(Identifiers.elementDef).callFn([literal(checkIndex), literal(flags), queryMatchesExpr, literal(ast.ngContentIndex), literal(childCount), literal(elName), elName ? fixedAttrsDef(ast) : NULL_EXPR, inputDefs.length ? literalArr(inputDefs) : NULL_EXPR, outputDefs.length ? literalArr(outputDefs) : NULL_EXPR, _this249._createElementHandleEventFn(nodeIndex, hostEvents), compView, compRendererType]),
                updateRenderer: updateRendererExpressions
              };
            };
          }
        }, {
          key: "_visitElementOrTemplate",
          value: function _visitElementOrTemplate(nodeIndex, ast) {
            var _this250 = this;

            var flags = 0
            /* None */
            ;

            if (ast.hasViewContainer) {
              flags |= 16777216
              /* EmbeddedViews */
              ;
            }

            var usedEvents = new Map();
            ast.outputs.forEach(function (event) {
              var _elementEventNameAndT = elementEventNameAndTarget(event, null),
                  name = _elementEventNameAndT.name,
                  target = _elementEventNameAndT.target;

              usedEvents.set(elementEventFullName(target, name), [target, name]);
            });
            ast.directives.forEach(function (dirAst) {
              dirAst.hostEvents.forEach(function (event) {
                var _elementEventNameAndT2 = elementEventNameAndTarget(event, dirAst),
                    name = _elementEventNameAndT2.name,
                    target = _elementEventNameAndT2.target;

                usedEvents.set(elementEventFullName(target, name), [target, name]);
              });
            });
            var hostBindings = [];
            var hostEvents = [];

            this._visitComponentFactoryResolverProvider(ast.directives);

            ast.providers.forEach(function (providerAst) {
              var dirAst = undefined;
              ast.directives.forEach(function (localDirAst) {
                if (localDirAst.directive.type.reference === tokenReference(providerAst.token)) {
                  dirAst = localDirAst;
                }
              });

              if (dirAst) {
                var _this250$_visitDirect = _this250._visitDirective(providerAst, dirAst, ast.references, ast.queryMatches, usedEvents),
                    dirHostBindings = _this250$_visitDirect.hostBindings,
                    dirHostEvents = _this250$_visitDirect.hostEvents;

                hostBindings.push.apply(hostBindings, _toConsumableArray(dirHostBindings));
                hostEvents.push.apply(hostEvents, _toConsumableArray(dirHostEvents));
              } else {
                _this250._visitProvider(providerAst, ast.queryMatches);
              }
            });
            var queryMatchExprs = [];
            ast.queryMatches.forEach(function (match) {
              var valueType = undefined;

              if (tokenReference(match.value) === _this250.reflector.resolveExternalReference(Identifiers.ElementRef)) {
                valueType = 0
                /* ElementRef */
                ;
              } else if (tokenReference(match.value) === _this250.reflector.resolveExternalReference(Identifiers.ViewContainerRef)) {
                valueType = 3
                /* ViewContainerRef */
                ;
              } else if (tokenReference(match.value) === _this250.reflector.resolveExternalReference(Identifiers.TemplateRef)) {
                valueType = 2
                /* TemplateRef */
                ;
              }

              if (valueType != null) {
                queryMatchExprs.push(literalArr([literal(match.queryId), literal(valueType)]));
              }
            });
            ast.references.forEach(function (ref) {
              var valueType = undefined;

              if (!ref.value) {
                valueType = 1
                /* RenderElement */
                ;
              } else if (tokenReference(ref.value) === _this250.reflector.resolveExternalReference(Identifiers.TemplateRef)) {
                valueType = 2
                /* TemplateRef */
                ;
              }

              if (valueType != null) {
                _this250.refNodeIndices[ref.name] = nodeIndex;
                queryMatchExprs.push(literalArr([literal(ref.name), literal(valueType)]));
              }
            });
            ast.outputs.forEach(function (outputAst) {
              hostEvents.push({
                context: COMP_VAR,
                eventAst: outputAst,
                dirAst: null
              });
            });
            return {
              flags: flags,
              usedEvents: Array.from(usedEvents.values()),
              queryMatchesExpr: queryMatchExprs.length ? literalArr(queryMatchExprs) : NULL_EXPR,
              hostBindings: hostBindings,
              hostEvents: hostEvents
            };
          }
        }, {
          key: "_visitDirective",
          value: function _visitDirective(providerAst, dirAst, refs, queryMatches, usedEvents) {
            var _this251 = this;

            var nodeIndex = this.nodes.length; // reserve the space in the nodeDefs array so we can add children

            this.nodes.push(null);
            dirAst.directive.queries.forEach(function (query, queryIndex) {
              var queryId = dirAst.contentQueryStartId + queryIndex;
              var flags = 67108864
              /* TypeContentQuery */
              | calcStaticDynamicQueryFlags(query);
              var bindingType = query.first ? 0
              /* First */
              : 1
              /* All */
              ;

              _this251.nodes.push(function () {
                return {
                  sourceSpan: dirAst.sourceSpan,
                  nodeFlags: flags,
                  nodeDef: importExpr(Identifiers.queryDef).callFn([literal(flags), literal(queryId), new LiteralMapExpr([new LiteralMapEntry(query.propertyName, literal(bindingType), false)])])
                };
              });
            }); // Note: the operation below might also create new nodeDefs,
            // but we don't want them to be a child of a directive,
            // as they might be a provider/pipe on their own.
            // I.e. we only allow queries as children of directives nodes.

            var childCount = this.nodes.length - nodeIndex - 1;

            var _this$_visitProviderO = this._visitProviderOrDirective(providerAst, queryMatches),
                flags = _this$_visitProviderO.flags,
                queryMatchExprs = _this$_visitProviderO.queryMatchExprs,
                providerExpr = _this$_visitProviderO.providerExpr,
                depsExpr = _this$_visitProviderO.depsExpr;

            refs.forEach(function (ref) {
              if (ref.value && tokenReference(ref.value) === tokenReference(providerAst.token)) {
                _this251.refNodeIndices[ref.name] = nodeIndex;
                queryMatchExprs.push(literalArr([literal(ref.name), literal(4
                /* Provider */
                )]));
              }
            });

            if (dirAst.directive.isComponent) {
              flags |= 32768
              /* Component */
              ;
            }

            var inputDefs = dirAst.inputs.map(function (inputAst, inputIndex) {
              var mapValue = literalArr([literal(inputIndex), literal(inputAst.directiveName)]); // Note: it's important to not quote the key so that we can capture renames by minifiers!

              return new LiteralMapEntry(inputAst.directiveName, mapValue, false);
            });
            var outputDefs = [];
            var dirMeta = dirAst.directive;
            Object.keys(dirMeta.outputs).forEach(function (propName) {
              var eventName = dirMeta.outputs[propName];

              if (usedEvents.has(eventName)) {
                // Note: it's important to not quote the key so that we can capture renames by minifiers!
                outputDefs.push(new LiteralMapEntry(propName, literal(eventName), false));
              }
            });
            var updateDirectiveExpressions = [];

            if (dirAst.inputs.length || (flags & (262144
            /* DoCheck */
            | 65536
            /* OnInit */
            )) > 0) {
              updateDirectiveExpressions = dirAst.inputs.map(function (input, bindingIndex) {
                return _this251._preprocessUpdateExpression({
                  nodeIndex: nodeIndex,
                  bindingIndex: bindingIndex,
                  sourceSpan: input.sourceSpan,
                  context: COMP_VAR,
                  value: input.value
                });
              });
            }

            var dirContextExpr = importExpr(Identifiers.nodeValue).callFn([VIEW_VAR, literal(nodeIndex)]);
            var hostBindings = dirAst.hostProperties.map(function (inputAst) {
              return {
                context: dirContextExpr,
                dirAst: dirAst,
                inputAst: inputAst
              };
            });
            var hostEvents = dirAst.hostEvents.map(function (hostEventAst) {
              return {
                context: dirContextExpr,
                eventAst: hostEventAst,
                dirAst: dirAst
              };
            }); // Check index is the same as the node index during compilation
            // They might only differ at runtime

            var checkIndex = nodeIndex;

            this.nodes[nodeIndex] = function () {
              return {
                sourceSpan: dirAst.sourceSpan,
                nodeFlags: 16384
                /* TypeDirective */
                | flags,
                nodeDef: importExpr(Identifiers.directiveDef).callFn([literal(checkIndex), literal(flags), queryMatchExprs.length ? literalArr(queryMatchExprs) : NULL_EXPR, literal(childCount), providerExpr, depsExpr, inputDefs.length ? new LiteralMapExpr(inputDefs) : NULL_EXPR, outputDefs.length ? new LiteralMapExpr(outputDefs) : NULL_EXPR]),
                updateDirectives: updateDirectiveExpressions,
                directive: dirAst.directive.type
              };
            };

            return {
              hostBindings: hostBindings,
              hostEvents: hostEvents
            };
          }
        }, {
          key: "_visitProvider",
          value: function _visitProvider(providerAst, queryMatches) {
            this._addProviderNode(this._visitProviderOrDirective(providerAst, queryMatches));
          }
        }, {
          key: "_visitComponentFactoryResolverProvider",
          value: function _visitComponentFactoryResolverProvider(directives) {
            var componentDirMeta = directives.find(function (dirAst) {
              return dirAst.directive.isComponent;
            });

            if (componentDirMeta && componentDirMeta.directive.entryComponents.length) {
              var _componentFactoryReso = componentFactoryResolverProviderDef(this.reflector, this.outputCtx, 8192
              /* PrivateProvider */
              , componentDirMeta.directive.entryComponents),
                  providerExpr = _componentFactoryReso.providerExpr,
                  depsExpr = _componentFactoryReso.depsExpr,
                  flags = _componentFactoryReso.flags,
                  _tokenExpr = _componentFactoryReso.tokenExpr;

              this._addProviderNode({
                providerExpr: providerExpr,
                depsExpr: depsExpr,
                flags: flags,
                tokenExpr: _tokenExpr,
                queryMatchExprs: [],
                sourceSpan: componentDirMeta.sourceSpan
              });
            }
          }
        }, {
          key: "_addProviderNode",
          value: function _addProviderNode(data) {
            // providerDef(
            //   flags: NodeFlags, matchedQueries: [string, QueryValueType][], token:any,
            //   value: any, deps: ([DepFlags, any] | any)[]): NodeDef;
            this.nodes.push(function () {
              return {
                sourceSpan: data.sourceSpan,
                nodeFlags: data.flags,
                nodeDef: importExpr(Identifiers.providerDef).callFn([literal(data.flags), data.queryMatchExprs.length ? literalArr(data.queryMatchExprs) : NULL_EXPR, data.tokenExpr, data.providerExpr, data.depsExpr])
              };
            });
          }
        }, {
          key: "_visitProviderOrDirective",
          value: function _visitProviderOrDirective(providerAst, queryMatches) {
            var flags = 0
            /* None */
            ;
            var queryMatchExprs = [];
            queryMatches.forEach(function (match) {
              if (tokenReference(match.value) === tokenReference(providerAst.token)) {
                queryMatchExprs.push(literalArr([literal(match.queryId), literal(4
                /* Provider */
                )]));
              }
            });

            var _providerDef = providerDef(this.outputCtx, providerAst),
                providerExpr = _providerDef.providerExpr,
                depsExpr = _providerDef.depsExpr,
                providerFlags = _providerDef.flags,
                tokenExpr = _providerDef.tokenExpr;

            return {
              flags: flags | providerFlags,
              queryMatchExprs: queryMatchExprs,
              providerExpr: providerExpr,
              depsExpr: depsExpr,
              tokenExpr: tokenExpr,
              sourceSpan: providerAst.sourceSpan
            };
          }
        }, {
          key: "getLocal",
          value: function getLocal(name) {
            if (name == EventHandlerVars.event.name) {
              return EventHandlerVars.event;
            }

            var currViewExpr = VIEW_VAR;

            for (var currBuilder = this; currBuilder; currBuilder = currBuilder.parent, currViewExpr = currViewExpr.prop('parent').cast(DYNAMIC_TYPE)) {
              // check references
              var refNodeIndex = currBuilder.refNodeIndices[name];

              if (refNodeIndex != null) {
                return importExpr(Identifiers.nodeValue).callFn([currViewExpr, literal(refNodeIndex)]);
              } // check variables


              var varAst = currBuilder.variables.find(function (varAst) {
                return varAst.name === name;
              });

              if (varAst) {
                var varValue = varAst.value || IMPLICIT_TEMPLATE_VAR;
                return currViewExpr.prop('context').prop(varValue);
              }
            }

            return null;
          }
        }, {
          key: "notifyImplicitReceiverUse",
          value: function notifyImplicitReceiverUse() {// Not needed in View Engine as View Engine walks through the generated
            // expressions to figure out if the implicit receiver is used and needs
            // to be generated as part of the pre-update statements.
          }
        }, {
          key: "_createLiteralArrayConverter",
          value: function _createLiteralArrayConverter(sourceSpan, argCount) {
            if (argCount === 0) {
              var valueExpr = importExpr(Identifiers.EMPTY_ARRAY);
              return function () {
                return valueExpr;
              };
            }

            var checkIndex = this.nodes.length;
            this.nodes.push(function () {
              return {
                sourceSpan: sourceSpan,
                nodeFlags: 32
                /* TypePureArray */
                ,
                nodeDef: importExpr(Identifiers.pureArrayDef).callFn([literal(checkIndex), literal(argCount)])
              };
            });
            return function (args) {
              return callCheckStmt(checkIndex, args);
            };
          }
        }, {
          key: "_createLiteralMapConverter",
          value: function _createLiteralMapConverter(sourceSpan, keys) {
            if (keys.length === 0) {
              var valueExpr = importExpr(Identifiers.EMPTY_MAP);
              return function () {
                return valueExpr;
              };
            }

            var map = literalMap(keys.map(function (e, i) {
              return Object.assign(Object.assign({}, e), {
                value: literal(i)
              });
            }));
            var checkIndex = this.nodes.length;
            this.nodes.push(function () {
              return {
                sourceSpan: sourceSpan,
                nodeFlags: 64
                /* TypePureObject */
                ,
                nodeDef: importExpr(Identifiers.pureObjectDef).callFn([literal(checkIndex), map])
              };
            });
            return function (args) {
              return callCheckStmt(checkIndex, args);
            };
          }
        }, {
          key: "_createPipeConverter",
          value: function _createPipeConverter(expression, name, argCount) {
            var pipe = this.usedPipes.find(function (pipeSummary) {
              return pipeSummary.name === name;
            });

            if (pipe.pure) {
              var checkIndex = this.nodes.length;
              this.nodes.push(function () {
                return {
                  sourceSpan: expression.sourceSpan,
                  nodeFlags: 128
                  /* TypePurePipe */
                  ,
                  nodeDef: importExpr(Identifiers.purePipeDef).callFn([literal(checkIndex), literal(argCount)])
                };
              }); // find underlying pipe in the component view

              var compViewExpr = VIEW_VAR;
              var compBuilder = this;

              while (compBuilder.parent) {
                compBuilder = compBuilder.parent;
                compViewExpr = compViewExpr.prop('parent').cast(DYNAMIC_TYPE);
              }

              var pipeNodeIndex = compBuilder.purePipeNodeIndices[name];
              var pipeValueExpr = importExpr(Identifiers.nodeValue).callFn([compViewExpr, literal(pipeNodeIndex)]);
              return function (args) {
                return callUnwrapValue(expression.nodeIndex, expression.bindingIndex, callCheckStmt(checkIndex, [pipeValueExpr].concat(args)));
              };
            } else {
              var nodeIndex = this._createPipe(expression.sourceSpan, pipe);

              var nodeValueExpr = importExpr(Identifiers.nodeValue).callFn([VIEW_VAR, literal(nodeIndex)]);
              return function (args) {
                return callUnwrapValue(expression.nodeIndex, expression.bindingIndex, nodeValueExpr.callMethod('transform', args));
              };
            }
          }
        }, {
          key: "_createPipe",
          value: function _createPipe(sourceSpan, pipe) {
            var _this252 = this;

            var nodeIndex = this.nodes.length;
            var flags = 0
            /* None */
            ;
            pipe.type.lifecycleHooks.forEach(function (lifecycleHook) {
              // for pipes, we only support ngOnDestroy
              if (lifecycleHook === LifecycleHooks.OnDestroy) {
                flags |= lifecycleHookToNodeFlag(lifecycleHook);
              }
            });
            var depExprs = pipe.type.diDeps.map(function (diDep) {
              return depDef(_this252.outputCtx, diDep);
            }); // function pipeDef(
            //   flags: NodeFlags, ctor: any, deps: ([DepFlags, any] | any)[]): NodeDef

            this.nodes.push(function () {
              return {
                sourceSpan: sourceSpan,
                nodeFlags: 16
                /* TypePipe */
                ,
                nodeDef: importExpr(Identifiers.pipeDef).callFn([literal(flags), _this252.outputCtx.importExpr(pipe.type.reference), literalArr(depExprs)])
              };
            });
            return nodeIndex;
          }
          /**
           * For the AST in `UpdateExpression.value`:
           * - create nodes for pipes, literal arrays and, literal maps,
           * - update the AST to replace pipes, literal arrays and, literal maps with calls to check fn.
           *
           * WARNING: This might create new nodeDefs (for pipes and literal arrays and literal maps)!
           */

        }, {
          key: "_preprocessUpdateExpression",
          value: function _preprocessUpdateExpression(expression) {
            var _this253 = this;

            return {
              nodeIndex: expression.nodeIndex,
              bindingIndex: expression.bindingIndex,
              sourceSpan: expression.sourceSpan,
              context: expression.context,
              value: convertPropertyBindingBuiltins({
                createLiteralArrayConverter: function createLiteralArrayConverter(argCount) {
                  return _this253._createLiteralArrayConverter(expression.sourceSpan, argCount);
                },
                createLiteralMapConverter: function createLiteralMapConverter(keys) {
                  return _this253._createLiteralMapConverter(expression.sourceSpan, keys);
                },
                createPipeConverter: function createPipeConverter(name, argCount) {
                  return _this253._createPipeConverter(expression, name, argCount);
                }
              }, expression.value)
            };
          }
        }, {
          key: "_createNodeExpressions",
          value: function _createNodeExpressions() {
            var self = this;
            var updateBindingCount = 0;
            var updateRendererStmts = [];
            var updateDirectivesStmts = [];
            var nodeDefExprs = this.nodes.map(function (factory, nodeIndex) {
              var _factory = factory(),
                  nodeDef = _factory.nodeDef,
                  nodeFlags = _factory.nodeFlags,
                  updateDirectives = _factory.updateDirectives,
                  updateRenderer = _factory.updateRenderer,
                  sourceSpan = _factory.sourceSpan;

              if (updateRenderer) {
                updateRendererStmts.push.apply(updateRendererStmts, _toConsumableArray(createUpdateStatements(nodeIndex, sourceSpan, updateRenderer, false)));
              }

              if (updateDirectives) {
                updateDirectivesStmts.push.apply(updateDirectivesStmts, _toConsumableArray(createUpdateStatements(nodeIndex, sourceSpan, updateDirectives, (nodeFlags & (262144
                /* DoCheck */
                | 65536
                /* OnInit */
                )) > 0)));
              } // We use a comma expression to call the log function before
              // the nodeDef function, but still use the result of the nodeDef function
              // as the value.
              // Note: We only add the logger to elements / text nodes,
              // so we don't generate too much code.


              var logWithNodeDef = nodeFlags & 3
              /* CatRenderNode */
              ? new CommaExpr([LOG_VAR$1.callFn([]).callFn([]), nodeDef]) : nodeDef;
              return applySourceSpanToExpressionIfNeeded(logWithNodeDef, sourceSpan);
            });
            return {
              updateRendererStmts: updateRendererStmts,
              updateDirectivesStmts: updateDirectivesStmts,
              nodeDefExprs: nodeDefExprs
            };

            function createUpdateStatements(nodeIndex, sourceSpan, expressions, allowEmptyExprs) {
              var updateStmts = [];
              var exprs = expressions.map(function (_ref40) {
                var sourceSpan = _ref40.sourceSpan,
                    context = _ref40.context,
                    value = _ref40.value;
                var bindingId = "".concat(updateBindingCount++);
                var nameResolver = context === COMP_VAR ? self : null;

                var _convertPropertyBindi3 = _convertPropertyBinding(nameResolver, context, value, bindingId, BindingForm.General),
                    stmts = _convertPropertyBindi3.stmts,
                    currValExpr = _convertPropertyBindi3.currValExpr;

                updateStmts.push.apply(updateStmts, _toConsumableArray(stmts.map(function (stmt) {
                  return applySourceSpanToStatementIfNeeded(stmt, sourceSpan);
                })));
                return applySourceSpanToExpressionIfNeeded(currValExpr, sourceSpan);
              });

              if (expressions.length || allowEmptyExprs) {
                updateStmts.push(applySourceSpanToStatementIfNeeded(callCheckStmt(nodeIndex, exprs).toStmt(), sourceSpan));
              }

              return updateStmts;
            }
          }
        }, {
          key: "_createElementHandleEventFn",
          value: function _createElementHandleEventFn(nodeIndex, handlers) {
            var _this254 = this;

            var handleEventStmts = [];
            var handleEventBindingCount = 0;
            handlers.forEach(function (_ref41) {
              var context = _ref41.context,
                  eventAst = _ref41.eventAst,
                  dirAst = _ref41.dirAst;
              var bindingId = "".concat(handleEventBindingCount++);
              var nameResolver = context === COMP_VAR ? _this254 : null;

              var _convertActionBinding2 = convertActionBinding(nameResolver, context, eventAst.handler, bindingId),
                  stmts = _convertActionBinding2.stmts,
                  allowDefault = _convertActionBinding2.allowDefault;

              var trueStmts = stmts;

              if (allowDefault) {
                trueStmts.push(ALLOW_DEFAULT_VAR.set(allowDefault.and(ALLOW_DEFAULT_VAR)).toStmt());
              }

              var _elementEventNameAndT3 = elementEventNameAndTarget(eventAst, dirAst),
                  eventTarget = _elementEventNameAndT3.target,
                  eventName = _elementEventNameAndT3.name;

              var fullEventName = elementEventFullName(eventTarget, eventName);
              handleEventStmts.push(applySourceSpanToStatementIfNeeded(new IfStmt(literal(fullEventName).identical(EVENT_NAME_VAR), trueStmts), eventAst.sourceSpan));
            });
            var handleEventFn;

            if (handleEventStmts.length > 0) {
              var preStmts = [ALLOW_DEFAULT_VAR.set(literal(true)).toDeclStmt(BOOL_TYPE)];

              if (!this.component.isHost && findReadVarNames(handleEventStmts).has(COMP_VAR.name)) {
                preStmts.push(COMP_VAR.set(VIEW_VAR.prop('component')).toDeclStmt(this.compType));
              }

              handleEventFn = fn([new FnParam(VIEW_VAR.name, INFERRED_TYPE), new FnParam(EVENT_NAME_VAR.name, INFERRED_TYPE), new FnParam(EventHandlerVars.event.name, INFERRED_TYPE)], [].concat(preStmts, handleEventStmts, [new ReturnStatement(ALLOW_DEFAULT_VAR)]), INFERRED_TYPE);
            } else {
              handleEventFn = NULL_EXPR;
            }

            return handleEventFn;
          }
        }, {
          key: "visitDirective",
          value: function visitDirective(ast, context) {}
        }, {
          key: "visitDirectiveProperty",
          value: function visitDirectiveProperty(ast, context) {}
        }, {
          key: "visitReference",
          value: function visitReference(ast, context) {}
        }, {
          key: "visitVariable",
          value: function visitVariable(ast, context) {}
        }, {
          key: "visitEvent",
          value: function visitEvent(ast, context) {}
        }, {
          key: "visitElementProperty",
          value: function visitElementProperty(ast, context) {}
        }, {
          key: "visitAttr",
          value: function visitAttr(ast, context) {}
        }]);

        return ViewBuilder$1;
      }();

      function needsAdditionalRootNode(astNodes) {
        var lastAstNode = astNodes[astNodes.length - 1];

        if (lastAstNode instanceof EmbeddedTemplateAst) {
          return lastAstNode.hasViewContainer;
        }

        if (lastAstNode instanceof ElementAst) {
          if (isNgContainer(lastAstNode.name) && lastAstNode.children.length) {
            return needsAdditionalRootNode(lastAstNode.children);
          }

          return lastAstNode.hasViewContainer;
        }

        return lastAstNode instanceof NgContentAst;
      }

      function elementBindingDef(inputAst, dirAst) {
        var inputType = inputAst.type;

        switch (inputType) {
          case 1
          /* Attribute */
          :
            return literalArr([literal(1
            /* TypeElementAttribute */
            ), literal(inputAst.name), literal(inputAst.securityContext)]);

          case 0
          /* Property */
          :
            return literalArr([literal(8
            /* TypeProperty */
            ), literal(inputAst.name), literal(inputAst.securityContext)]);

          case 4
          /* Animation */
          :
            var bindingType = 8
            /* TypeProperty */
            | (dirAst && dirAst.directive.isComponent ? 32
            /* SyntheticHostProperty */
            : 16
            /* SyntheticProperty */
            );
            return literalArr([literal(bindingType), literal('@' + inputAst.name), literal(inputAst.securityContext)]);

          case 2
          /* Class */
          :
            return literalArr([literal(2
            /* TypeElementClass */
            ), literal(inputAst.name), NULL_EXPR]);

          case 3
          /* Style */
          :
            return literalArr([literal(4
            /* TypeElementStyle */
            ), literal(inputAst.name), literal(inputAst.unit)]);

          default:
            // This default case is not needed by TypeScript compiler, as the switch is exhaustive.
            // However Closure Compiler does not understand that and reports an error in typed mode.
            // The `throw new Error` below works around the problem, and the unexpected: never variable
            // makes sure tsc still checks this code is unreachable.
            var unexpected = inputType;
            throw new Error("unexpected ".concat(unexpected));
        }
      }

      function fixedAttrsDef(elementAst) {
        var mapResult = Object.create(null);
        elementAst.attrs.forEach(function (attrAst) {
          mapResult[attrAst.name] = attrAst.value;
        });
        elementAst.directives.forEach(function (dirAst) {
          Object.keys(dirAst.directive.hostAttributes).forEach(function (name) {
            var value = dirAst.directive.hostAttributes[name];
            var prevValue = mapResult[name];
            mapResult[name] = prevValue != null ? mergeAttributeValue(name, prevValue, value) : value;
          });
        }); // Note: We need to sort to get a defined output order
        // for tests and for caching generated artifacts...

        return literalArr(Object.keys(mapResult).sort().map(function (attrName) {
          return literalArr([literal(attrName), literal(mapResult[attrName])]);
        }));
      }

      function mergeAttributeValue(attrName, attrValue1, attrValue2) {
        if (attrName == CLASS_ATTR$1 || attrName == STYLE_ATTR) {
          return "".concat(attrValue1, " ").concat(attrValue2);
        } else {
          return attrValue2;
        }
      }

      function callCheckStmt(nodeIndex, exprs) {
        if (exprs.length > 10) {
          return CHECK_VAR.callFn([VIEW_VAR, literal(nodeIndex), literal(1
          /* Dynamic */
          ), literalArr(exprs)]);
        } else {
          return CHECK_VAR.callFn([VIEW_VAR, literal(nodeIndex), literal(0
          /* Inline */
          )].concat(_toConsumableArray(exprs)));
        }
      }

      function callUnwrapValue(nodeIndex, bindingIdx, expr) {
        return importExpr(Identifiers.unwrapValue).callFn([VIEW_VAR, literal(nodeIndex), literal(bindingIdx), expr]);
      }

      function elementEventNameAndTarget(eventAst, dirAst) {
        if (eventAst.isAnimation) {
          return {
            name: "@".concat(eventAst.name, ".").concat(eventAst.phase),
            target: dirAst && dirAst.directive.isComponent ? 'component' : null
          };
        } else {
          return eventAst;
        }
      }

      function calcStaticDynamicQueryFlags(query) {
        var flags = 0
        /* None */
        ; // Note: We only make queries static that query for a single item and the user specifically
        // set the to be static. This is because of backwards compatibility with the old view compiler...

        if (query.first && query["static"]) {
          flags |= 268435456
          /* StaticQuery */
          ;
        } else {
          flags |= 536870912
          /* DynamicQuery */
          ;
        }

        return flags;
      }

      function elementEventFullName(target, name) {
        return target ? "".concat(target, ":").concat(name) : name;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A container for message extracted from the templates.
       */


      var MessageBundle = /*#__PURE__*/function () {
        function MessageBundle(_htmlParser, _implicitTags, _implicitAttrs) {
          var _locale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;

          _classCallCheck(this, MessageBundle);

          this._htmlParser = _htmlParser;
          this._implicitTags = _implicitTags;
          this._implicitAttrs = _implicitAttrs;
          this._locale = _locale;
          this._messages = [];
        }

        _createClass2(MessageBundle, [{
          key: "updateFromTemplate",
          value: function updateFromTemplate(html, url, interpolationConfig) {
            var _this$_messages;

            var htmlParserResult = this._htmlParser.parse(html, url, {
              tokenizeExpansionForms: true,
              interpolationConfig: interpolationConfig
            });

            if (htmlParserResult.errors.length) {
              return htmlParserResult.errors;
            }

            var i18nParserResult = extractMessages(htmlParserResult.rootNodes, interpolationConfig, this._implicitTags, this._implicitAttrs);

            if (i18nParserResult.errors.length) {
              return i18nParserResult.errors;
            }

            (_this$_messages = this._messages).push.apply(_this$_messages, _toConsumableArray(i18nParserResult.messages));

            return [];
          } // Return the message in the internal format
          // The public (serialized) format might be different, see the `write` method.

        }, {
          key: "getMessages",
          value: function getMessages() {
            return this._messages;
          }
        }, {
          key: "write",
          value: function write(serializer, filterSources) {
            var messages = {};
            var mapperVisitor = new MapPlaceholderNames(); // Deduplicate messages based on their ID

            this._messages.forEach(function (message) {
              var id = serializer.digest(message);

              if (!messages.hasOwnProperty(id)) {
                messages[id] = message;
              } else {
                var _messages$id$sources;

                (_messages$id$sources = messages[id].sources).push.apply(_messages$id$sources, _toConsumableArray(message.sources));
              }
            }); // Transform placeholder names using the serializer mapping


            var msgList = Object.keys(messages).map(function (id) {
              var mapper = serializer.createNameMapper(messages[id]);
              var src = messages[id];
              var nodes = mapper ? mapperVisitor.convert(src.nodes, mapper) : src.nodes;
              var transformedMessage = new Message(nodes, {}, {}, src.meaning, src.description, id);
              transformedMessage.sources = src.sources;

              if (filterSources) {
                transformedMessage.sources.forEach(function (source) {
                  return source.filePath = filterSources(source.filePath);
                });
              }

              return transformedMessage;
            });
            return serializer.write(msgList, this._locale);
          }
        }]);

        return MessageBundle;
      }(); // Transform an i18n AST by renaming the placeholder nodes with the given mapper


      var MapPlaceholderNames = /*#__PURE__*/function (_CloneVisitor) {
        _inherits(MapPlaceholderNames, _CloneVisitor);

        var _super111 = _createSuper(MapPlaceholderNames);

        function MapPlaceholderNames() {
          _classCallCheck(this, MapPlaceholderNames);

          return _super111.apply(this, arguments);
        }

        _createClass2(MapPlaceholderNames, [{
          key: "convert",
          value: function convert(nodes, mapper) {
            var _this255 = this;

            return mapper ? nodes.map(function (n) {
              return n.visit(_this255, mapper);
            }) : nodes;
          }
        }, {
          key: "visitTagPlaceholder",
          value: function visitTagPlaceholder(ph, mapper) {
            var _this256 = this;

            var startName = mapper.toPublicName(ph.startName);
            var closeName = ph.closeName ? mapper.toPublicName(ph.closeName) : ph.closeName;
            var children = ph.children.map(function (n) {
              return n.visit(_this256, mapper);
            });
            return new TagPlaceholder(ph.tag, ph.attrs, startName, closeName, children, ph.isVoid, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan);
          }
        }, {
          key: "visitPlaceholder",
          value: function visitPlaceholder(ph, mapper) {
            return new Placeholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);
          }
        }, {
          key: "visitIcuPlaceholder",
          value: function visitIcuPlaceholder(ph, mapper) {
            return new IcuPlaceholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);
          }
        }]);

        return MapPlaceholderNames;
      }(CloneVisitor);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var GeneratedFile = /*#__PURE__*/function () {
        function GeneratedFile(srcFileUrl, genFileUrl, sourceOrStmts) {
          _classCallCheck(this, GeneratedFile);

          this.srcFileUrl = srcFileUrl;
          this.genFileUrl = genFileUrl;

          if (typeof sourceOrStmts === 'string') {
            this.source = sourceOrStmts;
            this.stmts = null;
          } else {
            this.source = null;
            this.stmts = sourceOrStmts;
          }
        }

        _createClass2(GeneratedFile, [{
          key: "isEquivalent",
          value: function isEquivalent(other) {
            if (this.genFileUrl !== other.genFileUrl) {
              return false;
            }

            if (this.source) {
              return this.source === other.source;
            }

            if (other.stmts == null) {
              return false;
            } // Note: the constructor guarantees that if this.source is not filled,
            // then this.stmts is.


            return areAllEquivalent(this.stmts, other.stmts);
          }
        }]);

        return GeneratedFile;
      }();

      function toTypeScript(file) {
        var preamble = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';

        if (!file.stmts) {
          throw new Error("Illegal state: No stmts present on GeneratedFile ".concat(file.genFileUrl));
        }

        return new TypeScriptEmitter().emitStatements(file.genFileUrl, file.stmts, preamble);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function _listLazyRoutes(moduleMeta, reflector) {
        var allLazyRoutes = [];

        var _iterator26 = _createForOfIteratorHelper(moduleMeta.transitiveModule.providers),
            _step26;

        try {
          for (_iterator26.s(); !(_step26 = _iterator26.n()).done;) {
            var _step26$value = _step26.value,
                provider = _step26$value.provider,
                _module = _step26$value.module;

            if (tokenReference(provider.token) === reflector.ROUTES) {
              var loadChildren = _collectLoadChildren(provider.useValue);

              var _iterator27 = _createForOfIteratorHelper(loadChildren),
                  _step27;

              try {
                for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {
                  var route = _step27.value;
                  allLazyRoutes.push(parseLazyRoute(route, reflector, _module.reference));
                }
              } catch (err) {
                _iterator27.e(err);
              } finally {
                _iterator27.f();
              }
            }
          }
        } catch (err) {
          _iterator26.e(err);
        } finally {
          _iterator26.f();
        }

        return allLazyRoutes;
      }

      function _collectLoadChildren(routes) {
        var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];

        if (typeof routes === 'string') {
          target.push(routes);
        } else if (Array.isArray(routes)) {
          var _iterator28 = _createForOfIteratorHelper(routes),
              _step28;

          try {
            for (_iterator28.s(); !(_step28 = _iterator28.n()).done;) {
              var route = _step28.value;

              _collectLoadChildren(route, target);
            }
          } catch (err) {
            _iterator28.e(err);
          } finally {
            _iterator28.f();
          }
        } else if (routes.loadChildren) {
          _collectLoadChildren(routes.loadChildren, target);
        } else if (routes.children) {
          _collectLoadChildren(routes.children, target);
        }

        return target;
      }

      function parseLazyRoute(route, reflector, module) {
        var _route$split = route.split('#'),
            _route$split2 = _slicedToArray(_route$split, 2),
            routePath = _route$split2[0],
            routeName = _route$split2[1];

        var referencedModule = reflector.resolveExternalReference({
          moduleName: routePath,
          name: routeName
        }, module ? module.filePath : undefined);
        return {
          route: route,
          module: module || referencedModule,
          referencedModule: referencedModule
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var TS = /^(?!.*\.d\.ts$).*\.ts$/;

      var ResolvedStaticSymbol = function ResolvedStaticSymbol(symbol, metadata) {
        _classCallCheck(this, ResolvedStaticSymbol);

        this.symbol = symbol;
        this.metadata = metadata;
      };

      var SUPPORTED_SCHEMA_VERSION = 4;
      /**
       * This class is responsible for loading metadata per symbol,
       * and normalizing references between symbols.
       *
       * Internally, it only uses symbols without members,
       * and deduces the values for symbols with members based
       * on these symbols.
       */

      var StaticSymbolResolver = /*#__PURE__*/function () {
        function StaticSymbolResolver(host, staticSymbolCache, summaryResolver, errorRecorder) {
          _classCallCheck(this, StaticSymbolResolver);

          this.host = host;
          this.staticSymbolCache = staticSymbolCache;
          this.summaryResolver = summaryResolver;
          this.errorRecorder = errorRecorder;
          this.metadataCache = new Map(); // Note: this will only contain StaticSymbols without members!

          this.resolvedSymbols = new Map(); // Note: this will only contain StaticSymbols without members!

          this.importAs = new Map();
          this.symbolResourcePaths = new Map();
          this.symbolFromFile = new Map();
          this.knownFileNameToModuleNames = new Map();
        }

        _createClass2(StaticSymbolResolver, [{
          key: "resolveSymbol",
          value: function resolveSymbol(staticSymbol) {
            if (staticSymbol.members.length > 0) {
              return this._resolveSymbolMembers(staticSymbol);
            } // Note: always ask for a summary first,
            // as we might have read shallow metadata via a .d.ts file
            // for the symbol.


            var resultFromSummary = this._resolveSymbolFromSummary(staticSymbol);

            if (resultFromSummary) {
              return resultFromSummary;
            }

            var resultFromCache = this.resolvedSymbols.get(staticSymbol);

            if (resultFromCache) {
              return resultFromCache;
            } // Note: Some users use libraries that were not compiled with ngc, i.e. they don't
            // have summaries, only .d.ts files. So we always need to check both, the summary
            // and metadata.


            this._createSymbolsOf(staticSymbol.filePath);

            return this.resolvedSymbols.get(staticSymbol);
          }
          /**
           * getImportAs produces a symbol that can be used to import the given symbol.
           * The import might be different than the symbol if the symbol is exported from
           * a library with a summary; in which case we want to import the symbol from the
           * ngfactory re-export instead of directly to avoid introducing a direct dependency
           * on an otherwise indirect dependency.
           *
           * @param staticSymbol the symbol for which to generate a import symbol
           */

        }, {
          key: "getImportAs",
          value: function getImportAs(staticSymbol) {
            var useSummaries = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;

            if (staticSymbol.members.length) {
              var baseSymbol = this.getStaticSymbol(staticSymbol.filePath, staticSymbol.name);
              var baseImportAs = this.getImportAs(baseSymbol, useSummaries);
              return baseImportAs ? this.getStaticSymbol(baseImportAs.filePath, baseImportAs.name, staticSymbol.members) : null;
            }

            var summarizedFileName = stripSummaryForJitFileSuffix(staticSymbol.filePath);

            if (summarizedFileName !== staticSymbol.filePath) {
              var summarizedName = stripSummaryForJitNameSuffix(staticSymbol.name);

              var _baseSymbol = this.getStaticSymbol(summarizedFileName, summarizedName, staticSymbol.members);

              var _baseImportAs = this.getImportAs(_baseSymbol, useSummaries);

              return _baseImportAs ? this.getStaticSymbol(summaryForJitFileName(_baseImportAs.filePath), summaryForJitName(_baseImportAs.name), _baseSymbol.members) : null;
            }

            var result = useSummaries && this.summaryResolver.getImportAs(staticSymbol) || null;

            if (!result) {
              result = this.importAs.get(staticSymbol);
            }

            return result;
          }
          /**
           * getResourcePath produces the path to the original location of the symbol and should
           * be used to determine the relative location of resource references recorded in
           * symbol metadata.
           */

        }, {
          key: "getResourcePath",
          value: function getResourcePath(staticSymbol) {
            return this.symbolResourcePaths.get(staticSymbol) || staticSymbol.filePath;
          }
          /**
           * getTypeArity returns the number of generic type parameters the given symbol
           * has. If the symbol is not a type the result is null.
           */

        }, {
          key: "getTypeArity",
          value: function getTypeArity(staticSymbol) {
            // If the file is a factory/ngsummary file, don't resolve the symbol as doing so would
            // cause the metadata for an factory/ngsummary file to be loaded which doesn't exist.
            // All references to generated classes must include the correct arity whenever
            // generating code.
            if (isGeneratedFile(staticSymbol.filePath)) {
              return null;
            }

            var resolvedSymbol = unwrapResolvedMetadata(this.resolveSymbol(staticSymbol));

            while (resolvedSymbol && resolvedSymbol.metadata instanceof StaticSymbol) {
              resolvedSymbol = unwrapResolvedMetadata(this.resolveSymbol(resolvedSymbol.metadata));
            }

            return resolvedSymbol && resolvedSymbol.metadata && resolvedSymbol.metadata.arity || null;
          }
        }, {
          key: "getKnownModuleName",
          value: function getKnownModuleName(filePath) {
            return this.knownFileNameToModuleNames.get(filePath) || null;
          }
        }, {
          key: "recordImportAs",
          value: function recordImportAs(sourceSymbol, targetSymbol) {
            sourceSymbol.assertNoMembers();
            targetSymbol.assertNoMembers();
            this.importAs.set(sourceSymbol, targetSymbol);
          }
        }, {
          key: "recordModuleNameForFileName",
          value: function recordModuleNameForFileName(fileName, moduleName) {
            this.knownFileNameToModuleNames.set(fileName, moduleName);
          }
          /**
           * Invalidate all information derived from the given file and return the
           * static symbols contained in the file.
           *
           * @param fileName the file to invalidate
           */

        }, {
          key: "invalidateFile",
          value: function invalidateFile(fileName) {
            this.metadataCache["delete"](fileName);
            var symbols = this.symbolFromFile.get(fileName);

            if (!symbols) {
              return [];
            }

            this.symbolFromFile["delete"](fileName);

            var _iterator29 = _createForOfIteratorHelper(symbols),
                _step29;

            try {
              for (_iterator29.s(); !(_step29 = _iterator29.n()).done;) {
                var symbol = _step29.value;
                this.resolvedSymbols["delete"](symbol);
                this.importAs["delete"](symbol);
                this.symbolResourcePaths["delete"](symbol);
              }
            } catch (err) {
              _iterator29.e(err);
            } finally {
              _iterator29.f();
            }

            return symbols;
          }
          /** @internal */

        }, {
          key: "ignoreErrorsFor",
          value: function ignoreErrorsFor(cb) {
            var recorder = this.errorRecorder;

            this.errorRecorder = function () {};

            try {
              return cb();
            } finally {
              this.errorRecorder = recorder;
            }
          }
        }, {
          key: "_resolveSymbolMembers",
          value: function _resolveSymbolMembers(staticSymbol) {
            var members = staticSymbol.members;
            var baseResolvedSymbol = this.resolveSymbol(this.getStaticSymbol(staticSymbol.filePath, staticSymbol.name));

            if (!baseResolvedSymbol) {
              return null;
            }

            var baseMetadata = unwrapResolvedMetadata(baseResolvedSymbol.metadata);

            if (baseMetadata instanceof StaticSymbol) {
              return new ResolvedStaticSymbol(staticSymbol, this.getStaticSymbol(baseMetadata.filePath, baseMetadata.name, members));
            } else if (baseMetadata && baseMetadata.__symbolic === 'class') {
              if (baseMetadata.statics && members.length === 1) {
                return new ResolvedStaticSymbol(staticSymbol, baseMetadata.statics[members[0]]);
              }
            } else {
              var value = baseMetadata;

              for (var i = 0; i < members.length && value; i++) {
                value = value[members[i]];
              }

              return new ResolvedStaticSymbol(staticSymbol, value);
            }

            return null;
          }
        }, {
          key: "_resolveSymbolFromSummary",
          value: function _resolveSymbolFromSummary(staticSymbol) {
            var summary = this.summaryResolver.resolveSummary(staticSymbol);
            return summary ? new ResolvedStaticSymbol(staticSymbol, summary.metadata) : null;
          }
          /**
           * getStaticSymbol produces a Type whose metadata is known but whose implementation is not loaded.
           * All types passed to the StaticResolver should be pseudo-types returned by this method.
           *
           * @param declarationFile the absolute path of the file where the symbol is declared
           * @param name the name of the type.
           * @param members a symbol for a static member of the named type
           */

        }, {
          key: "getStaticSymbol",
          value: function getStaticSymbol(declarationFile, name, members) {
            return this.staticSymbolCache.get(declarationFile, name, members);
          }
          /**
           * hasDecorators checks a file's metadata for the presence of decorators without evaluating the
           * metadata.
           *
           * @param filePath the absolute path to examine for decorators.
           * @returns true if any class in the file has a decorator.
           */

        }, {
          key: "hasDecorators",
          value: function hasDecorators(filePath) {
            var metadata = this.getModuleMetadata(filePath);

            if (metadata['metadata']) {
              return Object.keys(metadata['metadata']).some(function (metadataKey) {
                var entry = metadata['metadata'][metadataKey];
                return entry && entry.__symbolic === 'class' && entry.decorators;
              });
            }

            return false;
          }
        }, {
          key: "getSymbolsOf",
          value: function getSymbolsOf(filePath) {
            var summarySymbols = this.summaryResolver.getSymbolsOf(filePath);

            if (summarySymbols) {
              return summarySymbols;
            } // Note: Some users use libraries that were not compiled with ngc, i.e. they don't
            // have summaries, only .d.ts files, but `summaryResolver.isLibraryFile` returns true.


            this._createSymbolsOf(filePath);

            return this.symbolFromFile.get(filePath) || [];
          }
        }, {
          key: "_createSymbolsOf",
          value: function _createSymbolsOf(filePath) {
            var _this257 = this;

            if (this.symbolFromFile.has(filePath)) {
              return;
            }

            var resolvedSymbols = [];
            var metadata = this.getModuleMetadata(filePath);

            if (metadata['importAs']) {
              // Index bundle indices should use the importAs module name defined
              // in the bundle.
              this.knownFileNameToModuleNames.set(filePath, metadata['importAs']);
            } // handle the symbols in one of the re-export location


            if (metadata['exports']) {
              var _iterator30 = _createForOfIteratorHelper(metadata['exports']),
                  _step30;

              try {
                var _loop3 = function _loop3() {
                  var moduleExport = _step30.value;

                  // handle the symbols in the list of explicitly re-exported symbols.
                  if (moduleExport["export"]) {
                    moduleExport["export"].forEach(function (exportSymbol) {
                      var symbolName;

                      if (typeof exportSymbol === 'string') {
                        symbolName = exportSymbol;
                      } else {
                        symbolName = exportSymbol.as;
                      }

                      symbolName = unescapeIdentifier(symbolName);
                      var symName = symbolName;

                      if (typeof exportSymbol !== 'string') {
                        symName = unescapeIdentifier(exportSymbol.name);
                      }

                      var resolvedModule = _this257.resolveModule(moduleExport.from, filePath);

                      if (resolvedModule) {
                        var targetSymbol = _this257.getStaticSymbol(resolvedModule, symName);

                        var sourceSymbol = _this257.getStaticSymbol(filePath, symbolName);

                        resolvedSymbols.push(_this257.createExport(sourceSymbol, targetSymbol));
                      }
                    });
                  } else {
                    // Handle the symbols loaded by 'export *' directives.
                    var resolvedModule = _this257.resolveModule(moduleExport.from, filePath);

                    if (resolvedModule && resolvedModule !== filePath) {
                      var nestedExports = _this257.getSymbolsOf(resolvedModule);

                      nestedExports.forEach(function (targetSymbol) {
                        var sourceSymbol = _this257.getStaticSymbol(filePath, targetSymbol.name);

                        resolvedSymbols.push(_this257.createExport(sourceSymbol, targetSymbol));
                      });
                    }
                  }
                };

                for (_iterator30.s(); !(_step30 = _iterator30.n()).done;) {
                  _loop3();
                }
              } catch (err) {
                _iterator30.e(err);
              } finally {
                _iterator30.f();
              }
            } // handle the actual metadata. Has to be after the exports
            // as there might be collisions in the names, and we want the symbols
            // of the current module to win ofter reexports.


            if (metadata['metadata']) {
              // handle direct declarations of the symbol
              var topLevelSymbolNames = new Set(Object.keys(metadata['metadata']).map(unescapeIdentifier));
              var origins = metadata['origins'] || {};
              Object.keys(metadata['metadata']).forEach(function (metadataKey) {
                var symbolMeta = metadata['metadata'][metadataKey];
                var name = unescapeIdentifier(metadataKey);

                var symbol = _this257.getStaticSymbol(filePath, name);

                var origin = origins.hasOwnProperty(metadataKey) && origins[metadataKey];

                if (origin) {
                  // If the symbol is from a bundled index, use the declaration location of the
                  // symbol so relative references (such as './my.html') will be calculated
                  // correctly.
                  var originFilePath = _this257.resolveModule(origin, filePath);

                  if (!originFilePath) {
                    _this257.reportError(new Error("Couldn't resolve original symbol for ".concat(origin, " from ").concat(_this257.host.getOutputName(filePath))));
                  } else {
                    _this257.symbolResourcePaths.set(symbol, originFilePath);
                  }
                }

                resolvedSymbols.push(_this257.createResolvedSymbol(symbol, filePath, topLevelSymbolNames, symbolMeta));
              });
            }

            var uniqueSymbols = new Set();

            for (var _i10 = 0, _resolvedSymbols = resolvedSymbols; _i10 < _resolvedSymbols.length; _i10++) {
              var resolvedSymbol = _resolvedSymbols[_i10];
              this.resolvedSymbols.set(resolvedSymbol.symbol, resolvedSymbol);
              uniqueSymbols.add(resolvedSymbol.symbol);
            }

            this.symbolFromFile.set(filePath, Array.from(uniqueSymbols));
          }
        }, {
          key: "createResolvedSymbol",
          value: function createResolvedSymbol(sourceSymbol, topLevelPath, topLevelSymbolNames, metadata) {
            var _this258 = this;

            // For classes that don't have Angular summaries / metadata,
            // we only keep their arity, but nothing else
            // (e.g. their constructor parameters).
            // We do this to prevent introducing deep imports
            // as we didn't generate .ngfactory.ts files with proper reexports.
            var isTsFile = TS.test(sourceSymbol.filePath);

            if (this.summaryResolver.isLibraryFile(sourceSymbol.filePath) && !isTsFile && metadata && metadata['__symbolic'] === 'class') {
              var _transformedMeta = {
                __symbolic: 'class',
                arity: metadata.arity
              };
              return new ResolvedStaticSymbol(sourceSymbol, _transformedMeta);
            }

            var _originalFileMemo;

            var getOriginalName = function getOriginalName() {
              if (!_originalFileMemo) {
                // Guess what the original file name is from the reference. If it has a `.d.ts` extension
                // replace it with `.ts`. If it already has `.ts` just leave it in place. If it doesn't have
                // .ts or .d.ts, append `.ts'. Also, if it is in `node_modules`, trim the `node_module`
                // location as it is not important to finding the file.
                _originalFileMemo = _this258.host.getOutputName(topLevelPath.replace(/((\.ts)|(\.d\.ts)|)$/, '.ts').replace(/^.*node_modules[/\\]/, ''));
              }

              return _originalFileMemo;
            };

            var self = this;

            var ReferenceTransformer = /*#__PURE__*/function (_ValueTransformer2) {
              _inherits(ReferenceTransformer, _ValueTransformer2);

              var _super112 = _createSuper(ReferenceTransformer);

              function ReferenceTransformer() {
                _classCallCheck(this, ReferenceTransformer);

                return _super112.apply(this, arguments);
              }

              _createClass2(ReferenceTransformer, [{
                key: "visitStringMap",
                value: function visitStringMap(map, functionParams) {
                  var symbolic = map['__symbolic'];

                  if (symbolic === 'function') {
                    var oldLen = functionParams.length;
                    functionParams.push.apply(functionParams, _toConsumableArray(map['parameters'] || []));

                    var result = _get(_getPrototypeOf(ReferenceTransformer.prototype), "visitStringMap", this).call(this, map, functionParams);

                    functionParams.length = oldLen;
                    return result;
                  } else if (symbolic === 'reference') {
                    var _module2 = map['module'];
                    var name = map['name'] ? unescapeIdentifier(map['name']) : map['name'];

                    if (!name) {
                      return null;
                    }

                    var filePath;

                    if (_module2) {
                      filePath = self.resolveModule(_module2, sourceSymbol.filePath);

                      if (!filePath) {
                        return {
                          __symbolic: 'error',
                          message: "Could not resolve ".concat(_module2, " relative to ").concat(self.host.getMetadataFor(sourceSymbol.filePath), "."),
                          line: map['line'],
                          character: map['character'],
                          fileName: getOriginalName()
                        };
                      }

                      return {
                        __symbolic: 'resolved',
                        symbol: self.getStaticSymbol(filePath, name),
                        line: map['line'],
                        character: map['character'],
                        fileName: getOriginalName()
                      };
                    } else if (functionParams.indexOf(name) >= 0) {
                      // reference to a function parameter
                      return {
                        __symbolic: 'reference',
                        name: name
                      };
                    } else {
                      if (topLevelSymbolNames.has(name)) {
                        return self.getStaticSymbol(topLevelPath, name);
                      } // ambient value


                      null;
                    }
                  } else if (symbolic === 'error') {
                    return Object.assign(Object.assign({}, map), {
                      fileName: getOriginalName()
                    });
                  } else {
                    return _get(_getPrototypeOf(ReferenceTransformer.prototype), "visitStringMap", this).call(this, map, functionParams);
                  }
                }
              }]);

              return ReferenceTransformer;
            }(ValueTransformer);

            var transformedMeta = visitValue(metadata, new ReferenceTransformer(), []);
            var unwrappedTransformedMeta = unwrapResolvedMetadata(transformedMeta);

            if (unwrappedTransformedMeta instanceof StaticSymbol) {
              return this.createExport(sourceSymbol, unwrappedTransformedMeta);
            }

            return new ResolvedStaticSymbol(sourceSymbol, transformedMeta);
          }
        }, {
          key: "createExport",
          value: function createExport(sourceSymbol, targetSymbol) {
            sourceSymbol.assertNoMembers();
            targetSymbol.assertNoMembers();

            if (this.summaryResolver.isLibraryFile(sourceSymbol.filePath) && this.summaryResolver.isLibraryFile(targetSymbol.filePath)) {
              // This case is for an ng library importing symbols from a plain ts library
              // transitively.
              // Note: We rely on the fact that we discover symbols in the direction
              // from source files to library files
              this.importAs.set(targetSymbol, this.getImportAs(sourceSymbol) || sourceSymbol);
            }

            return new ResolvedStaticSymbol(sourceSymbol, targetSymbol);
          }
        }, {
          key: "reportError",
          value: function reportError(error, context, path) {
            if (this.errorRecorder) {
              this.errorRecorder(error, context && context.filePath || path);
            } else {
              throw error;
            }
          }
          /**
           * @param module an absolute path to a module file.
           */

        }, {
          key: "getModuleMetadata",
          value: function getModuleMetadata(module) {
            var moduleMetadata = this.metadataCache.get(module);

            if (!moduleMetadata) {
              var moduleMetadatas = this.host.getMetadataFor(module);

              if (moduleMetadatas) {
                var maxVersion = -1;
                moduleMetadatas.forEach(function (md) {
                  if (md && md['version'] > maxVersion) {
                    maxVersion = md['version'];
                    moduleMetadata = md;
                  }
                });
              }

              if (!moduleMetadata) {
                moduleMetadata = {
                  __symbolic: 'module',
                  version: SUPPORTED_SCHEMA_VERSION,
                  module: module,
                  metadata: {}
                };
              }

              if (moduleMetadata['version'] != SUPPORTED_SCHEMA_VERSION) {
                var errorMessage = moduleMetadata['version'] == 2 ? "Unsupported metadata version ".concat(moduleMetadata['version'], " for module ").concat(module, ". This module should be compiled with a newer version of ngc") : "Metadata version mismatch for module ".concat(this.host.getOutputName(module), ", found version ").concat(moduleMetadata['version'], ", expected ").concat(SUPPORTED_SCHEMA_VERSION);
                this.reportError(new Error(errorMessage));
              }

              this.metadataCache.set(module, moduleMetadata);
            }

            return moduleMetadata;
          }
        }, {
          key: "getSymbolByModule",
          value: function getSymbolByModule(module, symbolName, containingFile) {
            var filePath = this.resolveModule(module, containingFile);

            if (!filePath) {
              this.reportError(new Error("Could not resolve module ".concat(module).concat(containingFile ? ' relative to ' + this.host.getOutputName(containingFile) : '')));
              return this.getStaticSymbol("ERROR:".concat(module), symbolName);
            }

            return this.getStaticSymbol(filePath, symbolName);
          }
        }, {
          key: "resolveModule",
          value: function resolveModule(module, containingFile) {
            try {
              return this.host.moduleNameToFileName(module, containingFile);
            } catch (e) {
              console.error("Could not resolve module '".concat(module, "' relative to file ").concat(containingFile));
              this.reportError(e, undefined, containingFile);
            }

            return null;
          }
        }]);

        return StaticSymbolResolver;
      }(); // Remove extra underscore from escaped identifier.
      // See https://github.com/Microsoft/TypeScript/blob/master/src/compiler/utilities.ts


      function unescapeIdentifier(identifier) {
        return identifier.startsWith('___') ? identifier.substr(1) : identifier;
      }

      function unwrapResolvedMetadata(metadata) {
        if (metadata && metadata.__symbolic === 'resolved') {
          return metadata.symbol;
        }

        return metadata;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function serializeSummaries(srcFileName, forJitCtx, summaryResolver, symbolResolver, symbols, types) {
        var createExternalSymbolReexports = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
        var toJsonSerializer = new ToJsonSerializer(symbolResolver, summaryResolver, srcFileName); // for symbols, we use everything except for the class metadata itself
        // (we keep the statics though), as the class metadata is contained in the
        // CompileTypeSummary.

        symbols.forEach(function (resolvedSymbol) {
          return toJsonSerializer.addSummary({
            symbol: resolvedSymbol.symbol,
            metadata: resolvedSymbol.metadata
          });
        }); // Add type summaries.

        types.forEach(function (_ref42) {
          var summary = _ref42.summary,
              metadata = _ref42.metadata;
          toJsonSerializer.addSummary({
            symbol: summary.type.reference,
            metadata: undefined,
            type: summary
          });
        });

        var _toJsonSerializer$ser = toJsonSerializer.serialize(createExternalSymbolReexports),
            json = _toJsonSerializer$ser.json,
            exportAs = _toJsonSerializer$ser.exportAs;

        if (forJitCtx) {
          var forJitSerializer = new ForJitSerializer(forJitCtx, symbolResolver, summaryResolver);
          types.forEach(function (_ref43) {
            var summary = _ref43.summary,
                metadata = _ref43.metadata;
            forJitSerializer.addSourceType(summary, metadata);
          });
          toJsonSerializer.unprocessedSymbolSummariesBySymbol.forEach(function (summary) {
            if (summaryResolver.isLibraryFile(summary.symbol.filePath) && summary.type) {
              forJitSerializer.addLibType(summary.type);
            }
          });
          forJitSerializer.serialize(exportAs);
        }

        return {
          json: json,
          exportAs: exportAs
        };
      }

      function deserializeSummaries(symbolCache, summaryResolver, libraryFileName, json) {
        var deserializer = new FromJsonDeserializer(symbolCache, summaryResolver);
        return deserializer.deserialize(libraryFileName, json);
      }

      function createForJitStub(outputCtx, reference) {
        return createSummaryForJitFunction(outputCtx, reference, NULL_EXPR);
      }

      function createSummaryForJitFunction(outputCtx, reference, value) {
        var fnName = summaryForJitName(reference.name);
        outputCtx.statements.push(fn([], [new ReturnStatement(value)], new ArrayType(DYNAMIC_TYPE)).toDeclStmt(fnName, [StmtModifier.Final, StmtModifier.Exported]));
      }

      var ToJsonSerializer = /*#__PURE__*/function (_ValueTransformer3) {
        _inherits(ToJsonSerializer, _ValueTransformer3);

        var _super113 = _createSuper(ToJsonSerializer);

        function ToJsonSerializer(symbolResolver, summaryResolver, srcFileName) {
          var _this259;

          _classCallCheck(this, ToJsonSerializer);

          _this259 = _super113.call(this);
          _this259.symbolResolver = symbolResolver;
          _this259.summaryResolver = summaryResolver;
          _this259.srcFileName = srcFileName; // Note: This only contains symbols without members.

          _this259.symbols = [];
          _this259.indexBySymbol = new Map();
          _this259.reexportedBy = new Map(); // This now contains a `__symbol: number` in the place of
          // StaticSymbols, but otherwise has the same shape as the original objects.

          _this259.processedSummaryBySymbol = new Map();
          _this259.processedSummaries = [];
          _this259.unprocessedSymbolSummariesBySymbol = new Map();
          _this259.moduleName = symbolResolver.getKnownModuleName(srcFileName);
          return _this259;
        }

        _createClass2(ToJsonSerializer, [{
          key: "addSummary",
          value: function addSummary(summary) {
            var _this260 = this;

            var unprocessedSummary = this.unprocessedSymbolSummariesBySymbol.get(summary.symbol);
            var processedSummary = this.processedSummaryBySymbol.get(summary.symbol);

            if (!unprocessedSummary) {
              unprocessedSummary = {
                symbol: summary.symbol,
                metadata: undefined
              };
              this.unprocessedSymbolSummariesBySymbol.set(summary.symbol, unprocessedSummary);
              processedSummary = {
                symbol: this.processValue(summary.symbol, 0
                /* None */
                )
              };
              this.processedSummaries.push(processedSummary);
              this.processedSummaryBySymbol.set(summary.symbol, processedSummary);
            }

            if (!unprocessedSummary.metadata && summary.metadata) {
              var metadata = summary.metadata || {};

              if (metadata.__symbolic === 'class') {
                // For classes, we keep everything except their class decorators.
                // We need to keep e.g. the ctor args, method names, method decorators
                // so that the class can be extended in another compilation unit.
                // We don't keep the class decorators as
                // 1) they refer to data
                //   that should not cause a rebuild of downstream compilation units
                //   (e.g. inline templates of @Component, or @NgModule.declarations)
                // 2) their data is already captured in TypeSummaries, e.g. DirectiveSummary.
                var clone = {};
                Object.keys(metadata).forEach(function (propName) {
                  if (propName !== 'decorators') {
                    clone[propName] = metadata[propName];
                  }
                });
                metadata = clone;
              } else if (isCall(metadata)) {
                if (!isFunctionCall(metadata) && !isMethodCallOnVariable(metadata)) {
                  // Don't store complex calls as we won't be able to simplify them anyways later on.
                  metadata = {
                    __symbolic: 'error',
                    message: 'Complex function calls are not supported.'
                  };
                }
              } // Note: We need to keep storing ctor calls for e.g.
              // `export const x = new InjectionToken(...)`


              unprocessedSummary.metadata = metadata;
              processedSummary.metadata = this.processValue(metadata, 1
              /* ResolveValue */
              );

              if (metadata instanceof StaticSymbol && this.summaryResolver.isLibraryFile(metadata.filePath)) {
                var declarationSymbol = this.symbols[this.indexBySymbol.get(metadata)];

                if (!isLoweredSymbol(declarationSymbol.name)) {
                  // Note: symbols that were introduced during codegen in the user file can have a reexport
                  // if a user used `export *`. However, we can't rely on this as tsickle will change
                  // `export *` into named exports, using only the information from the typechecker.
                  // As we introduce the new symbols after typecheck, Tsickle does not know about them,
                  // and omits them when expanding `export *`.
                  // So we have to keep reexporting these symbols manually via .ngfactory files.
                  this.reexportedBy.set(declarationSymbol, summary.symbol);
                }
              }
            }

            if (!unprocessedSummary.type && summary.type) {
              unprocessedSummary.type = summary.type; // Note: We don't add the summaries of all referenced symbols as for the ResolvedSymbols,
              // as the type summaries already contain the transitive data that they require
              // (in a minimal way).

              processedSummary.type = this.processValue(summary.type, 0
              /* None */
              ); // except for reexported directives / pipes, so we need to store
              // their summaries explicitly.

              if (summary.type.summaryKind === CompileSummaryKind.NgModule) {
                var ngModuleSummary = summary.type;
                ngModuleSummary.exportedDirectives.concat(ngModuleSummary.exportedPipes).forEach(function (id) {
                  var symbol = id.reference;

                  if (_this260.summaryResolver.isLibraryFile(symbol.filePath) && !_this260.unprocessedSymbolSummariesBySymbol.has(symbol)) {
                    var _summary = _this260.summaryResolver.resolveSummary(symbol);

                    if (_summary) {
                      _this260.addSummary(_summary);
                    }
                  }
                });
              }
            }
          }
          /**
           * @param createExternalSymbolReexports Whether external static symbols should be re-exported.
           * This can be enabled if external symbols should be re-exported by the current module in
           * order to avoid dynamically generated module dependencies which can break strict dependency
           * enforcements (as in Google3). Read more here: https://github.com/angular/angular/issues/25644
           */

        }, {
          key: "serialize",
          value: function serialize(createExternalSymbolReexports) {
            var _this261 = this;

            var exportAs = [];
            var json = JSON.stringify({
              moduleName: this.moduleName,
              summaries: this.processedSummaries,
              symbols: this.symbols.map(function (symbol, index) {
                symbol.assertNoMembers();
                var importAs = undefined;

                if (_this261.summaryResolver.isLibraryFile(symbol.filePath)) {
                  var reexportSymbol = _this261.reexportedBy.get(symbol);

                  if (reexportSymbol) {
                    // In case the given external static symbol is already manually exported by the
                    // user, we just proxy the external static symbol reference to the manual export.
                    // This ensures that the AOT compiler imports the external symbol through the
                    // user export and does not introduce another dependency which is not needed.
                    importAs = _this261.indexBySymbol.get(reexportSymbol);
                  } else if (createExternalSymbolReexports) {
                    // In this case, the given external static symbol is *not* manually exported by
                    // the user, and we manually create a re-export in the factory file so that we
                    // don't introduce another module dependency. This is useful when running within
                    // Bazel so that the AOT compiler does not introduce any module dependencies
                    // which can break the strict dependency enforcement. (e.g. as in Google3)
                    // Read more about this here: https://github.com/angular/angular/issues/25644
                    var summary = _this261.unprocessedSymbolSummariesBySymbol.get(symbol);

                    if (!summary || !summary.metadata || summary.metadata.__symbolic !== 'interface') {
                      importAs = "".concat(symbol.name, "_").concat(index);
                      exportAs.push({
                        symbol: symbol,
                        exportAs: importAs
                      });
                    }
                  }
                }

                return {
                  __symbol: index,
                  name: symbol.name,
                  filePath: _this261.summaryResolver.toSummaryFileName(symbol.filePath, _this261.srcFileName),
                  importAs: importAs
                };
              })
            });
            return {
              json: json,
              exportAs: exportAs
            };
          }
        }, {
          key: "processValue",
          value: function processValue(value, flags) {
            return visitValue(value, this, flags);
          }
        }, {
          key: "visitOther",
          value: function visitOther(value, context) {
            if (value instanceof StaticSymbol) {
              var baseSymbol = this.symbolResolver.getStaticSymbol(value.filePath, value.name);
              var index = this.visitStaticSymbol(baseSymbol, context);
              return {
                __symbol: index,
                members: value.members
              };
            }
          }
          /**
           * Strip line and character numbers from ngsummaries.
           * Emitting them causes white spaces changes to retrigger upstream
           * recompilations in bazel.
           * TODO: find out a way to have line and character numbers in errors without
           * excessive recompilation in bazel.
           */

        }, {
          key: "visitStringMap",
          value: function visitStringMap(map, context) {
            if (map['__symbolic'] === 'resolved') {
              return visitValue(map['symbol'], this, context);
            }

            if (map['__symbolic'] === 'error') {
              delete map['line'];
              delete map['character'];
            }

            return _get(_getPrototypeOf(ToJsonSerializer.prototype), "visitStringMap", this).call(this, map, context);
          }
          /**
           * Returns null if the options.resolveValue is true, and the summary for the symbol
           * resolved to a type or could not be resolved.
           */

        }, {
          key: "visitStaticSymbol",
          value: function visitStaticSymbol(baseSymbol, flags) {
            var index = this.indexBySymbol.get(baseSymbol);
            var summary = null;

            if (flags & 1
            /* ResolveValue */
            && this.summaryResolver.isLibraryFile(baseSymbol.filePath)) {
              if (this.unprocessedSymbolSummariesBySymbol.has(baseSymbol)) {
                // the summary for this symbol was already added
                // -> nothing to do.
                return index;
              }

              summary = this.loadSummary(baseSymbol);

              if (summary && summary.metadata instanceof StaticSymbol) {
                // The summary is a reexport
                index = this.visitStaticSymbol(summary.metadata, flags); // reset the summary as it is just a reexport, so we don't want to store it.

                summary = null;
              }
            } else if (index != null) {
              // Note: == on purpose to compare with undefined!
              // No summary and the symbol is already added -> nothing to do.
              return index;
            } // Note: == on purpose to compare with undefined!


            if (index == null) {
              index = this.symbols.length;
              this.symbols.push(baseSymbol);
            }

            this.indexBySymbol.set(baseSymbol, index);

            if (summary) {
              this.addSummary(summary);
            }

            return index;
          }
        }, {
          key: "loadSummary",
          value: function loadSummary(symbol) {
            var summary = this.summaryResolver.resolveSummary(symbol);

            if (!summary) {
              // some symbols might originate from a plain typescript library
              // that just exported .d.ts and .metadata.json files, i.e. where no summary
              // files were created.
              var resolvedSymbol = this.symbolResolver.resolveSymbol(symbol);

              if (resolvedSymbol) {
                summary = {
                  symbol: resolvedSymbol.symbol,
                  metadata: resolvedSymbol.metadata
                };
              }
            }

            return summary;
          }
        }]);

        return ToJsonSerializer;
      }(ValueTransformer);

      var ForJitSerializer = /*#__PURE__*/function () {
        function ForJitSerializer(outputCtx, symbolResolver, summaryResolver) {
          _classCallCheck(this, ForJitSerializer);

          this.outputCtx = outputCtx;
          this.symbolResolver = symbolResolver;
          this.summaryResolver = summaryResolver;
          this.data = [];
        }

        _createClass2(ForJitSerializer, [{
          key: "addSourceType",
          value: function addSourceType(summary, metadata) {
            this.data.push({
              summary: summary,
              metadata: metadata,
              isLibrary: false
            });
          }
        }, {
          key: "addLibType",
          value: function addLibType(summary) {
            this.data.push({
              summary: summary,
              metadata: null,
              isLibrary: true
            });
          }
        }, {
          key: "serialize",
          value: function serialize(exportAsArr) {
            var _this262 = this;

            var exportAsBySymbol = new Map();

            var _iterator31 = _createForOfIteratorHelper(exportAsArr),
                _step31;

            try {
              for (_iterator31.s(); !(_step31 = _iterator31.n()).done;) {
                var _step31$value = _step31.value,
                    symbol = _step31$value.symbol,
                    exportAs = _step31$value.exportAs;
                exportAsBySymbol.set(symbol, exportAs);
              }
            } catch (err) {
              _iterator31.e(err);
            } finally {
              _iterator31.f();
            }

            var ngModuleSymbols = new Set();

            var _iterator32 = _createForOfIteratorHelper(this.data),
                _step32;

            try {
              for (_iterator32.s(); !(_step32 = _iterator32.n()).done;) {
                var _step32$value = _step32.value,
                    summary = _step32$value.summary,
                    metadata = _step32$value.metadata,
                    isLibrary = _step32$value.isLibrary;

                if (summary.summaryKind === CompileSummaryKind.NgModule) {
                  // collect the symbols that refer to NgModule classes.
                  // Note: we can't just rely on `summary.type.summaryKind` to determine this as
                  // we don't add the summaries of all referenced symbols when we serialize type summaries.
                  // See serializeSummaries for details.
                  ngModuleSymbols.add(summary.type.reference);
                  var modSummary = summary;

                  var _iterator33 = _createForOfIteratorHelper(modSummary.modules),
                      _step33;

                  try {
                    for (_iterator33.s(); !(_step33 = _iterator33.n()).done;) {
                      var mod = _step33.value;
                      ngModuleSymbols.add(mod.reference);
                    }
                  } catch (err) {
                    _iterator33.e(err);
                  } finally {
                    _iterator33.f();
                  }
                }

                if (!isLibrary) {
                  var fnName = summaryForJitName(summary.type.reference.name);
                  createSummaryForJitFunction(this.outputCtx, summary.type.reference, this.serializeSummaryWithDeps(summary, metadata));
                }
              }
            } catch (err) {
              _iterator32.e(err);
            } finally {
              _iterator32.f();
            }

            ngModuleSymbols.forEach(function (ngModuleSymbol) {
              if (_this262.summaryResolver.isLibraryFile(ngModuleSymbol.filePath)) {
                var exportAs = exportAsBySymbol.get(ngModuleSymbol) || ngModuleSymbol.name;
                var jitExportAsName = summaryForJitName(exportAs);

                _this262.outputCtx.statements.push(variable(jitExportAsName).set(_this262.serializeSummaryRef(ngModuleSymbol)).toDeclStmt(null, [StmtModifier.Exported]));
              }
            });
          }
        }, {
          key: "serializeSummaryWithDeps",
          value: function serializeSummaryWithDeps(summary, metadata) {
            var _this263 = this;

            var expressions = [this.serializeSummary(summary)];
            var providers = [];

            if (metadata instanceof CompileNgModuleMetadata) {
              expressions.push.apply(expressions, _toConsumableArray( // For directives / pipes, we only add the declared ones,
              // and rely on transitively importing NgModules to get the transitive
              // summaries.
              metadata.declaredDirectives.concat(metadata.declaredPipes).map(function (type) {
                return type.reference;
              }) // For modules,
              // we also add the summaries for modules
              // from libraries.
              // This is ok as we produce reexports for all transitive modules.
              .concat(metadata.transitiveModule.modules.map(function (type) {
                return type.reference;
              }).filter(function (ref) {
                return ref !== metadata.type.reference;
              })).map(function (ref) {
                return _this263.serializeSummaryRef(ref);
              }))); // Note: We don't use `NgModuleSummary.providers`, as that one is transitive,
              // and we already have transitive modules.

              providers = metadata.providers;
            } else if (summary.summaryKind === CompileSummaryKind.Directive) {
              var dirSummary = summary;
              providers = dirSummary.providers.concat(dirSummary.viewProviders);
            } // Note: We can't just refer to the `ngsummary.ts` files for `useClass` providers (as we do for
            // declaredDirectives / declaredPipes), as we allow
            // providers without ctor arguments to skip the `@Injectable` decorator,
            // i.e. we didn't generate .ngsummary.ts files for these.


            expressions.push.apply(expressions, _toConsumableArray(providers.filter(function (provider) {
              return !!provider.useClass;
            }).map(function (provider) {
              return _this263.serializeSummary({
                summaryKind: CompileSummaryKind.Injectable,
                type: provider.useClass
              });
            })));
            return literalArr(expressions);
          }
        }, {
          key: "serializeSummaryRef",
          value: function serializeSummaryRef(typeSymbol) {
            var jitImportedSymbol = this.symbolResolver.getStaticSymbol(summaryForJitFileName(typeSymbol.filePath), summaryForJitName(typeSymbol.name));
            return this.outputCtx.importExpr(jitImportedSymbol);
          }
        }, {
          key: "serializeSummary",
          value: function serializeSummary(data) {
            var outputCtx = this.outputCtx;

            var Transformer = /*#__PURE__*/function () {
              function Transformer() {
                _classCallCheck(this, Transformer);
              }

              _createClass2(Transformer, [{
                key: "visitArray",
                value: function visitArray(arr, context) {
                  var _this264 = this;

                  return literalArr(arr.map(function (entry) {
                    return visitValue(entry, _this264, context);
                  }));
                }
              }, {
                key: "visitStringMap",
                value: function visitStringMap(map, context) {
                  var _this265 = this;

                  return new LiteralMapExpr(Object.keys(map).map(function (key) {
                    return new LiteralMapEntry(key, visitValue(map[key], _this265, context), false);
                  }));
                }
              }, {
                key: "visitPrimitive",
                value: function visitPrimitive(value, context) {
                  return literal(value);
                }
              }, {
                key: "visitOther",
                value: function visitOther(value, context) {
                  if (value instanceof StaticSymbol) {
                    return outputCtx.importExpr(value);
                  } else {
                    throw new Error("Illegal State: Encountered value ".concat(value));
                  }
                }
              }]);

              return Transformer;
            }();

            return visitValue(data, new Transformer(), null);
          }
        }]);

        return ForJitSerializer;
      }();

      var FromJsonDeserializer = /*#__PURE__*/function (_ValueTransformer4) {
        _inherits(FromJsonDeserializer, _ValueTransformer4);

        var _super114 = _createSuper(FromJsonDeserializer);

        function FromJsonDeserializer(symbolCache, summaryResolver) {
          var _this266;

          _classCallCheck(this, FromJsonDeserializer);

          _this266 = _super114.call(this);
          _this266.symbolCache = symbolCache;
          _this266.summaryResolver = summaryResolver;
          return _this266;
        }

        _createClass2(FromJsonDeserializer, [{
          key: "deserialize",
          value: function deserialize(libraryFileName, json) {
            var _this267 = this;

            var data = JSON.parse(json);
            var allImportAs = [];
            this.symbols = data.symbols.map(function (serializedSymbol) {
              return _this267.symbolCache.get(_this267.summaryResolver.fromSummaryFileName(serializedSymbol.filePath, libraryFileName), serializedSymbol.name);
            });
            data.symbols.forEach(function (serializedSymbol, index) {
              var symbol = _this267.symbols[index];
              var importAs = serializedSymbol.importAs;

              if (typeof importAs === 'number') {
                allImportAs.push({
                  symbol: symbol,
                  importAs: _this267.symbols[importAs]
                });
              } else if (typeof importAs === 'string') {
                allImportAs.push({
                  symbol: symbol,
                  importAs: _this267.symbolCache.get(ngfactoryFilePath(libraryFileName), importAs)
                });
              }
            });
            var summaries = visitValue(data.summaries, this, null);
            return {
              moduleName: data.moduleName,
              summaries: summaries,
              importAs: allImportAs
            };
          }
        }, {
          key: "visitStringMap",
          value: function visitStringMap(map, context) {
            if ('__symbol' in map) {
              var baseSymbol = this.symbols[map['__symbol']];
              var members = map['members'];
              return members.length ? this.symbolCache.get(baseSymbol.filePath, baseSymbol.name, members) : baseSymbol;
            } else {
              return _get(_getPrototypeOf(FromJsonDeserializer.prototype), "visitStringMap", this).call(this, map, context);
            }
          }
        }]);

        return FromJsonDeserializer;
      }(ValueTransformer);

      function isCall(metadata) {
        return metadata && metadata.__symbolic === 'call';
      }

      function isFunctionCall(metadata) {
        return isCall(metadata) && unwrapResolvedMetadata(metadata.expression) instanceof StaticSymbol;
      }

      function isMethodCallOnVariable(metadata) {
        return isCall(metadata) && metadata.expression && metadata.expression.__symbolic === 'select' && unwrapResolvedMetadata(metadata.expression.expression) instanceof StaticSymbol;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var AotCompiler = /*#__PURE__*/function () {
        function AotCompiler(_config, _options, _host, reflector, _metadataResolver, _templateParser, _styleCompiler, _viewCompiler, _typeCheckCompiler, _ngModuleCompiler, _injectableCompiler, _outputEmitter, _summaryResolver, _symbolResolver) {
          _classCallCheck(this, AotCompiler);

          this._config = _config;
          this._options = _options;
          this._host = _host;
          this.reflector = reflector;
          this._metadataResolver = _metadataResolver;
          this._templateParser = _templateParser;
          this._styleCompiler = _styleCompiler;
          this._viewCompiler = _viewCompiler;
          this._typeCheckCompiler = _typeCheckCompiler;
          this._ngModuleCompiler = _ngModuleCompiler;
          this._injectableCompiler = _injectableCompiler;
          this._outputEmitter = _outputEmitter;
          this._summaryResolver = _summaryResolver;
          this._symbolResolver = _symbolResolver;
          this._templateAstCache = new Map();
          this._analyzedFiles = new Map();
          this._analyzedFilesForInjectables = new Map();
        }

        _createClass2(AotCompiler, [{
          key: "clearCache",
          value: function clearCache() {
            this._metadataResolver.clearCache();
          }
        }, {
          key: "analyzeModulesSync",
          value: function analyzeModulesSync(rootFiles) {
            var _this268 = this;

            var analyzeResult = analyzeAndValidateNgModules(rootFiles, this._host, this._symbolResolver, this._metadataResolver);
            analyzeResult.ngModules.forEach(function (ngModule) {
              return _this268._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, true);
            });
            return analyzeResult;
          }
        }, {
          key: "analyzeModulesAsync",
          value: function analyzeModulesAsync(rootFiles) {
            var _this269 = this;

            var analyzeResult = analyzeAndValidateNgModules(rootFiles, this._host, this._symbolResolver, this._metadataResolver);
            return Promise.all(analyzeResult.ngModules.map(function (ngModule) {
              return _this269._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false);
            })).then(function () {
              return analyzeResult;
            });
          }
        }, {
          key: "_analyzeFile",
          value: function _analyzeFile(fileName) {
            var analyzedFile = this._analyzedFiles.get(fileName);

            if (!analyzedFile) {
              analyzedFile = analyzeFile(this._host, this._symbolResolver, this._metadataResolver, fileName);

              this._analyzedFiles.set(fileName, analyzedFile);
            }

            return analyzedFile;
          }
        }, {
          key: "_analyzeFileForInjectables",
          value: function _analyzeFileForInjectables(fileName) {
            var analyzedFile = this._analyzedFilesForInjectables.get(fileName);

            if (!analyzedFile) {
              analyzedFile = analyzeFileForInjectables(this._host, this._symbolResolver, this._metadataResolver, fileName);

              this._analyzedFilesForInjectables.set(fileName, analyzedFile);
            }

            return analyzedFile;
          }
        }, {
          key: "findGeneratedFileNames",
          value: function findGeneratedFileNames(fileName) {
            var _this270 = this;

            var genFileNames = [];

            var file = this._analyzeFile(fileName); // Make sure we create a .ngfactory if we have a injectable/directive/pipe/NgModule
            // or a reference to a non source file.
            // Note: This is overestimating the required .ngfactory files as the real calculation is harder.
            // Only do this for StubEmitFlags.Basic, as adding a type check block
            // does not change this file (as we generate type check blocks based on NgModules).


            if (this._options.allowEmptyCodegenFiles || file.directives.length || file.pipes.length || file.injectables.length || file.ngModules.length || file.exportsNonSourceFiles) {
              genFileNames.push(ngfactoryFilePath(file.fileName, true));

              if (this._options.enableSummariesForJit) {
                genFileNames.push(summaryForJitFileName(file.fileName, true));
              }
            }

            var fileSuffix = normalizeGenFileSuffix(splitTypescriptSuffix(file.fileName, true)[1]);
            file.directives.forEach(function (dirSymbol) {
              var compMeta = _this270._metadataResolver.getNonNormalizedDirectiveMetadata(dirSymbol).metadata;

              if (!compMeta.isComponent) {
                return;
              } // Note: compMeta is a component and therefore template is non null.


              compMeta.template.styleUrls.forEach(function (styleUrl) {
                var normalizedUrl = _this270._host.resourceNameToFileName(styleUrl, file.fileName);

                if (!normalizedUrl) {
                  throw syntaxError("Couldn't resolve resource ".concat(styleUrl, " relative to ").concat(file.fileName));
                }

                var needsShim = (compMeta.template.encapsulation || _this270._config.defaultEncapsulation) === ViewEncapsulation.Emulated;
                genFileNames.push(_stylesModuleUrl(normalizedUrl, needsShim, fileSuffix));

                if (_this270._options.allowEmptyCodegenFiles) {
                  genFileNames.push(_stylesModuleUrl(normalizedUrl, !needsShim, fileSuffix));
                }
              });
            });
            return genFileNames;
          }
        }, {
          key: "emitBasicStub",
          value: function emitBasicStub(genFileName, originalFileName) {
            var outputCtx = this._createOutputContext(genFileName);

            if (genFileName.endsWith('.ngfactory.ts')) {
              if (!originalFileName) {
                throw new Error("Assertion error: require the original file for .ngfactory.ts stubs. File: ".concat(genFileName));
              }

              var originalFile = this._analyzeFile(originalFileName);

              this._createNgFactoryStub(outputCtx, originalFile, 1
              /* Basic */
              );
            } else if (genFileName.endsWith('.ngsummary.ts')) {
              if (this._options.enableSummariesForJit) {
                if (!originalFileName) {
                  throw new Error("Assertion error: require the original file for .ngsummary.ts stubs. File: ".concat(genFileName));
                }

                var _originalFile = this._analyzeFile(originalFileName);

                _createEmptyStub(outputCtx);

                _originalFile.ngModules.forEach(function (ngModule) {
                  // create exports that user code can reference
                  createForJitStub(outputCtx, ngModule.type.reference);
                });
              }
            } else if (genFileName.endsWith('.ngstyle.ts')) {
              _createEmptyStub(outputCtx);
            } // Note: for the stubs, we don't need a property srcFileUrl,
            // as later on in emitAllImpls we will create the proper GeneratedFiles with the
            // correct srcFileUrl.
            // This is good as e.g. for .ngstyle.ts files we can't derive
            // the url of components based on the genFileUrl.


            return this._codegenSourceModule('unknown', outputCtx);
          }
        }, {
          key: "emitTypeCheckStub",
          value: function emitTypeCheckStub(genFileName, originalFileName) {
            var originalFile = this._analyzeFile(originalFileName);

            var outputCtx = this._createOutputContext(genFileName);

            if (genFileName.endsWith('.ngfactory.ts')) {
              this._createNgFactoryStub(outputCtx, originalFile, 2
              /* TypeCheck */
              );
            }

            return outputCtx.statements.length > 0 ? this._codegenSourceModule(originalFile.fileName, outputCtx) : null;
          }
        }, {
          key: "loadFilesAsync",
          value: function loadFilesAsync(fileNames, tsFiles) {
            var _this271 = this;

            var files = fileNames.map(function (fileName) {
              return _this271._analyzeFile(fileName);
            });
            var loadingPromises = [];
            files.forEach(function (file) {
              return file.ngModules.forEach(function (ngModule) {
                return loadingPromises.push(_this271._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false));
              });
            });
            var analyzedInjectables = tsFiles.map(function (tsFile) {
              return _this271._analyzeFileForInjectables(tsFile);
            });
            return Promise.all(loadingPromises).then(function (_) {
              return {
                analyzedModules: mergeAndValidateNgFiles(files),
                analyzedInjectables: analyzedInjectables
              };
            });
          }
        }, {
          key: "loadFilesSync",
          value: function loadFilesSync(fileNames, tsFiles) {
            var _this272 = this;

            var files = fileNames.map(function (fileName) {
              return _this272._analyzeFile(fileName);
            });
            files.forEach(function (file) {
              return file.ngModules.forEach(function (ngModule) {
                return _this272._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, true);
              });
            });
            var analyzedInjectables = tsFiles.map(function (tsFile) {
              return _this272._analyzeFileForInjectables(tsFile);
            });
            return {
              analyzedModules: mergeAndValidateNgFiles(files),
              analyzedInjectables: analyzedInjectables
            };
          }
        }, {
          key: "_createNgFactoryStub",
          value: function _createNgFactoryStub(outputCtx, file, emitFlags) {
            var _this273 = this;

            var componentId = 0;
            file.ngModules.forEach(function (ngModuleMeta, ngModuleIndex) {
              // Note: the code below needs to executed for StubEmitFlags.Basic and StubEmitFlags.TypeCheck,
              // so we don't change the .ngfactory file too much when adding the type-check block.
              // create exports that user code can reference
              _this273._ngModuleCompiler.createStub(outputCtx, ngModuleMeta.type.reference); // add references to the symbols from the metadata.
              // These can be used by the type check block for components,
              // and they also cause TypeScript to include these files into the program too,
              // which will make them part of the analyzedFiles.


              var externalReferences = [].concat(_toConsumableArray(ngModuleMeta.transitiveModule.directives.map(function (d) {
                return d.reference;
              })), _toConsumableArray(ngModuleMeta.transitiveModule.pipes.map(function (d) {
                return d.reference;
              })), _toConsumableArray(ngModuleMeta.importedModules.map(function (m) {
                return m.type.reference;
              })), _toConsumableArray(ngModuleMeta.exportedModules.map(function (m) {
                return m.type.reference;
              })), _toConsumableArray(_this273._externalIdentifierReferences([Identifiers.TemplateRef, Identifiers.ElementRef])));
              var externalReferenceVars = new Map();
              externalReferences.forEach(function (ref, typeIndex) {
                externalReferenceVars.set(ref, "_decl".concat(ngModuleIndex, "_").concat(typeIndex));
              });
              externalReferenceVars.forEach(function (varName, reference) {
                outputCtx.statements.push(variable(varName).set(NULL_EXPR.cast(DYNAMIC_TYPE)).toDeclStmt(expressionType(outputCtx.importExpr(reference,
                /* typeParams */
                null,
                /* useSummaries */
                false))));
              });

              if (emitFlags & 2
              /* TypeCheck */
              ) {
                // add the type-check block for all components of the NgModule
                ngModuleMeta.declaredDirectives.forEach(function (dirId) {
                  var compMeta = _this273._metadataResolver.getDirectiveMetadata(dirId.reference);

                  if (!compMeta.isComponent) {
                    return;
                  }

                  componentId++;

                  _this273._createTypeCheckBlock(outputCtx, "".concat(compMeta.type.reference.name, "_Host_").concat(componentId), ngModuleMeta, _this273._metadataResolver.getHostComponentMetadata(compMeta), [compMeta.type], externalReferenceVars);

                  _this273._createTypeCheckBlock(outputCtx, "".concat(compMeta.type.reference.name, "_").concat(componentId), ngModuleMeta, compMeta, ngModuleMeta.transitiveModule.directives, externalReferenceVars);
                });
              }
            });

            if (outputCtx.statements.length === 0) {
              _createEmptyStub(outputCtx);
            }
          }
        }, {
          key: "_externalIdentifierReferences",
          value: function _externalIdentifierReferences(references) {
            var result = [];

            var _iterator34 = _createForOfIteratorHelper(references),
                _step34;

            try {
              for (_iterator34.s(); !(_step34 = _iterator34.n()).done;) {
                var reference = _step34.value;
                var token = createTokenForExternalReference(this.reflector, reference);

                if (token.identifier) {
                  result.push(token.identifier.reference);
                }
              }
            } catch (err) {
              _iterator34.e(err);
            } finally {
              _iterator34.f();
            }

            return result;
          }
        }, {
          key: "_createTypeCheckBlock",
          value: function _createTypeCheckBlock(ctx, componentId, moduleMeta, compMeta, directives, externalReferenceVars) {
            var _ctx$statements;

            var _this$_parseTemplate = this._parseTemplate(compMeta, moduleMeta, directives),
                parsedTemplate = _this$_parseTemplate.template,
                usedPipes = _this$_parseTemplate.pipes;

            (_ctx$statements = ctx.statements).push.apply(_ctx$statements, _toConsumableArray(this._typeCheckCompiler.compileComponent(componentId, compMeta, parsedTemplate, usedPipes, externalReferenceVars, ctx)));
          }
        }, {
          key: "emitMessageBundle",
          value: function emitMessageBundle(analyzeResult, locale) {
            var _this274 = this;

            var errors = [];
            var htmlParser = new HtmlParser(); // TODO(vicb): implicit tags & attributes

            var messageBundle = new MessageBundle(htmlParser, [], {}, locale);
            analyzeResult.files.forEach(function (file) {
              var compMetas = [];
              file.directives.forEach(function (directiveType) {
                var dirMeta = _this274._metadataResolver.getDirectiveMetadata(directiveType);

                if (dirMeta && dirMeta.isComponent) {
                  compMetas.push(dirMeta);
                }
              });
              compMetas.forEach(function (compMeta) {
                var html = compMeta.template.template; // Template URL points to either an HTML or TS file depending on whether
                // the file is used with `templateUrl:` or `template:`, respectively.

                var templateUrl = compMeta.template.templateUrl;
                var interpolationConfig = InterpolationConfig.fromArray(compMeta.template.interpolation);
                errors.push.apply(errors, _toConsumableArray(messageBundle.updateFromTemplate(html, templateUrl, interpolationConfig)));
              });
            });

            if (errors.length) {
              throw new Error(errors.map(function (e) {
                return e.toString();
              }).join('\n'));
            }

            return messageBundle;
          }
        }, {
          key: "emitAllPartialModules",
          value: function emitAllPartialModules(_ref44, r3Files) {
            var _this275 = this;

            var ngModuleByPipeOrDirective = _ref44.ngModuleByPipeOrDirective,
                files = _ref44.files;
            var contextMap = new Map();

            var getContext = function getContext(fileName) {
              if (!contextMap.has(fileName)) {
                contextMap.set(fileName, _this275._createOutputContext(fileName));
              }

              return contextMap.get(fileName);
            };

            files.forEach(function (file) {
              return _this275._compilePartialModule(file.fileName, ngModuleByPipeOrDirective, file.directives, file.pipes, file.ngModules, file.injectables, getContext(file.fileName));
            });
            r3Files.forEach(function (file) {
              return _this275._compileShallowModules(file.fileName, file.shallowModules, getContext(file.fileName));
            });
            return Array.from(contextMap.values()).map(function (context) {
              return {
                fileName: context.genFilePath,
                statements: [].concat(_toConsumableArray(context.constantPool.statements), _toConsumableArray(context.statements))
              };
            });
          }
        }, {
          key: "_compileShallowModules",
          value: function _compileShallowModules(fileName, shallowModules, context) {
            var _this276 = this;

            shallowModules.forEach(function (module) {
              return compileNgModuleFromRender2(context, module, _this276._injectableCompiler);
            });
          }
        }, {
          key: "_compilePartialModule",
          value: function _compilePartialModule(fileName, ngModuleByPipeOrDirective, directives, pipes, ngModules, injectables, context) {
            var _this277 = this;

            var errors = [];
            var schemaRegistry = new DomElementSchemaRegistry();
            var hostBindingParser = new BindingParser(this._templateParser.expressionParser, DEFAULT_INTERPOLATION_CONFIG, schemaRegistry, [], errors); // Process all components and directives

            directives.forEach(function (directiveType) {
              var directiveMetadata = _this277._metadataResolver.getDirectiveMetadata(directiveType);

              if (directiveMetadata.isComponent) {
                var _module3 = ngModuleByPipeOrDirective.get(directiveType);

                _module3 || error("Cannot determine the module for component '".concat(identifierName(directiveMetadata.type), "'"));
                var htmlAst = directiveMetadata.template.htmlAst;
                var preserveWhitespaces = directiveMetadata.template.preserveWhitespaces;

                if (!preserveWhitespaces) {
                  htmlAst = removeWhitespaces(htmlAst);
                }

                var render3Ast = htmlAstToRender3Ast(htmlAst.rootNodes, hostBindingParser); // Map of StaticType by directive selectors

                var directiveTypeBySel = new Map();

                var _directives = _module3.transitiveModule.directives.map(function (dir) {
                  return _this277._metadataResolver.getDirectiveSummary(dir.reference);
                });

                _directives.forEach(function (directive) {
                  if (directive.selector) {
                    directiveTypeBySel.set(directive.selector, directive.type.reference);
                  }
                }); // Map of StaticType by pipe names


                var pipeTypeByName = new Map();

                var _pipes = _module3.transitiveModule.pipes.map(function (pipe) {
                  return _this277._metadataResolver.getPipeSummary(pipe.reference);
                });

                _pipes.forEach(function (pipe) {
                  pipeTypeByName.set(pipe.name, pipe.type.reference);
                });

                compileComponentFromRender2(context, directiveMetadata, render3Ast, _this277.reflector, hostBindingParser, directiveTypeBySel, pipeTypeByName);
              } else {
                compileDirectiveFromRender2(context, directiveMetadata, _this277.reflector, hostBindingParser);
              }
            });
            pipes.forEach(function (pipeType) {
              var pipeMetadata = _this277._metadataResolver.getPipeMetadata(pipeType);

              if (pipeMetadata) {
                compilePipeFromRender2(context, pipeMetadata, _this277.reflector);
              }
            });
            injectables.forEach(function (injectable) {
              return _this277._injectableCompiler.compile(injectable, context);
            });
          }
        }, {
          key: "emitAllPartialModules2",
          value: function emitAllPartialModules2(files) {
            var _this278 = this;

            // Using reduce like this is a select many pattern (where map is a select pattern)
            return files.reduce(function (r, file) {
              r.push.apply(r, _toConsumableArray(_this278._emitPartialModule2(file.fileName, file.injectables)));
              return r;
            }, []);
          }
        }, {
          key: "_emitPartialModule2",
          value: function _emitPartialModule2(fileName, injectables) {
            var _this279 = this;

            var context = this._createOutputContext(fileName);

            injectables.forEach(function (injectable) {
              return _this279._injectableCompiler.compile(injectable, context);
            });

            if (context.statements && context.statements.length > 0) {
              return [{
                fileName: fileName,
                statements: [].concat(_toConsumableArray(context.constantPool.statements), _toConsumableArray(context.statements))
              }];
            }

            return [];
          }
        }, {
          key: "emitAllImpls",
          value: function emitAllImpls(analyzeResult) {
            var _this280 = this;

            var ngModuleByPipeOrDirective = analyzeResult.ngModuleByPipeOrDirective,
                files = analyzeResult.files;
            var sourceModules = files.map(function (file) {
              return _this280._compileImplFile(file.fileName, ngModuleByPipeOrDirective, file.directives, file.pipes, file.ngModules, file.injectables);
            });
            return flatten(sourceModules);
          }
        }, {
          key: "_compileImplFile",
          value: function _compileImplFile(srcFileUrl, ngModuleByPipeOrDirective, directives, pipes, ngModules, injectables) {
            var _this281 = this;

            var fileSuffix = normalizeGenFileSuffix(splitTypescriptSuffix(srcFileUrl, true)[1]);
            var generatedFiles = [];

            var outputCtx = this._createOutputContext(ngfactoryFilePath(srcFileUrl, true));

            generatedFiles.push.apply(generatedFiles, _toConsumableArray(this._createSummary(srcFileUrl, directives, pipes, ngModules, injectables, outputCtx))); // compile all ng modules

            ngModules.forEach(function (ngModuleMeta) {
              return _this281._compileModule(outputCtx, ngModuleMeta);
            }); // compile components

            directives.forEach(function (dirType) {
              var compMeta = _this281._metadataResolver.getDirectiveMetadata(dirType);

              if (!compMeta.isComponent) {
                return;
              }

              var ngModule = ngModuleByPipeOrDirective.get(dirType);

              if (!ngModule) {
                throw new Error("Internal Error: cannot determine the module for component ".concat(identifierName(compMeta.type), "!"));
              } // compile styles


              var componentStylesheet = _this281._styleCompiler.compileComponent(outputCtx, compMeta); // Note: compMeta is a component and therefore template is non null.


              compMeta.template.externalStylesheets.forEach(function (stylesheetMeta) {
                // Note: fill non shim and shim style files as they might
                // be shared by component with and without ViewEncapsulation.
                var shim = _this281._styleCompiler.needsStyleShim(compMeta);

                generatedFiles.push(_this281._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, shim, fileSuffix));

                if (_this281._options.allowEmptyCodegenFiles) {
                  generatedFiles.push(_this281._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, !shim, fileSuffix));
                }
              }); // compile components

              var compViewVars = _this281._compileComponent(outputCtx, compMeta, ngModule, ngModule.transitiveModule.directives, componentStylesheet, fileSuffix);

              _this281._compileComponentFactory(outputCtx, compMeta, ngModule, fileSuffix);
            });

            if (outputCtx.statements.length > 0 || this._options.allowEmptyCodegenFiles) {
              var srcModule = this._codegenSourceModule(srcFileUrl, outputCtx);

              generatedFiles.unshift(srcModule);
            }

            return generatedFiles;
          }
        }, {
          key: "_createSummary",
          value: function _createSummary(srcFileName, directives, pipes, ngModules, injectables, ngFactoryCtx) {
            var _this282 = this;

            var symbolSummaries = this._symbolResolver.getSymbolsOf(srcFileName).map(function (symbol) {
              return _this282._symbolResolver.resolveSymbol(symbol);
            });

            var typeData = [].concat(_toConsumableArray(ngModules.map(function (meta) {
              return {
                summary: _this282._metadataResolver.getNgModuleSummary(meta.type.reference),
                metadata: _this282._metadataResolver.getNgModuleMetadata(meta.type.reference)
              };
            })), _toConsumableArray(directives.map(function (ref) {
              return {
                summary: _this282._metadataResolver.getDirectiveSummary(ref),
                metadata: _this282._metadataResolver.getDirectiveMetadata(ref)
              };
            })), _toConsumableArray(pipes.map(function (ref) {
              return {
                summary: _this282._metadataResolver.getPipeSummary(ref),
                metadata: _this282._metadataResolver.getPipeMetadata(ref)
              };
            })), _toConsumableArray(injectables.map(function (ref) {
              return {
                summary: _this282._metadataResolver.getInjectableSummary(ref.symbol),
                metadata: _this282._metadataResolver.getInjectableSummary(ref.symbol).type
              };
            })));
            var forJitOutputCtx = this._options.enableSummariesForJit ? this._createOutputContext(summaryForJitFileName(srcFileName, true)) : null;

            var _serializeSummaries = serializeSummaries(srcFileName, forJitOutputCtx, this._summaryResolver, this._symbolResolver, symbolSummaries, typeData, this._options.createExternalSymbolFactoryReexports),
                json = _serializeSummaries.json,
                exportAs = _serializeSummaries.exportAs;

            exportAs.forEach(function (entry) {
              ngFactoryCtx.statements.push(variable(entry.exportAs).set(ngFactoryCtx.importExpr(entry.symbol)).toDeclStmt(null, [StmtModifier.Exported]));
            });
            var summaryJson = new GeneratedFile(srcFileName, summaryFileName(srcFileName), json);
            var result = [summaryJson];

            if (forJitOutputCtx) {
              result.push(this._codegenSourceModule(srcFileName, forJitOutputCtx));
            }

            return result;
          }
        }, {
          key: "_compileModule",
          value: function _compileModule(outputCtx, ngModule) {
            var providers = [];

            if (this._options.locale) {
              var normalizedLocale = this._options.locale.replace(/_/g, '-');

              providers.push({
                token: createTokenForExternalReference(this.reflector, Identifiers.LOCALE_ID),
                useValue: normalizedLocale
              });
            }

            if (this._options.i18nFormat) {
              providers.push({
                token: createTokenForExternalReference(this.reflector, Identifiers.TRANSLATIONS_FORMAT),
                useValue: this._options.i18nFormat
              });
            }

            this._ngModuleCompiler.compile(outputCtx, ngModule, providers);
          }
        }, {
          key: "_compileComponentFactory",
          value: function _compileComponentFactory(outputCtx, compMeta, ngModule, fileSuffix) {
            var hostMeta = this._metadataResolver.getHostComponentMetadata(compMeta);

            var hostViewFactoryVar = this._compileComponent(outputCtx, hostMeta, ngModule, [compMeta.type], null, fileSuffix).viewClassVar;

            var compFactoryVar = componentFactoryName(compMeta.type.reference);
            var inputsExprs = [];

            for (var propName in compMeta.inputs) {
              var templateName = compMeta.inputs[propName]; // Don't quote so that the key gets minified...

              inputsExprs.push(new LiteralMapEntry(propName, literal(templateName), false));
            }

            var outputsExprs = [];

            for (var _propName in compMeta.outputs) {
              var _templateName = compMeta.outputs[_propName]; // Don't quote so that the key gets minified...

              outputsExprs.push(new LiteralMapEntry(_propName, literal(_templateName), false));
            }

            outputCtx.statements.push(variable(compFactoryVar).set(importExpr(Identifiers.createComponentFactory).callFn([literal(compMeta.selector), outputCtx.importExpr(compMeta.type.reference), variable(hostViewFactoryVar), new LiteralMapExpr(inputsExprs), new LiteralMapExpr(outputsExprs), literalArr(compMeta.template.ngContentSelectors.map(function (selector) {
              return literal(selector);
            }))])).toDeclStmt(importType(Identifiers.ComponentFactory, [expressionType(outputCtx.importExpr(compMeta.type.reference))], [TypeModifier.Const]), [StmtModifier.Final, StmtModifier.Exported]));
          }
        }, {
          key: "_compileComponent",
          value: function _compileComponent(outputCtx, compMeta, ngModule, directiveIdentifiers, componentStyles, fileSuffix) {
            var _this$_parseTemplate2 = this._parseTemplate(compMeta, ngModule, directiveIdentifiers),
                parsedTemplate = _this$_parseTemplate2.template,
                usedPipes = _this$_parseTemplate2.pipes;

            var stylesExpr = componentStyles ? variable(componentStyles.stylesVar) : literalArr([]);

            var viewResult = this._viewCompiler.compileComponent(outputCtx, compMeta, parsedTemplate, stylesExpr, usedPipes);

            if (componentStyles) {
              _resolveStyleStatements(this._symbolResolver, componentStyles, this._styleCompiler.needsStyleShim(compMeta), fileSuffix);
            }

            return viewResult;
          }
        }, {
          key: "_parseTemplate",
          value: function _parseTemplate(compMeta, ngModule, directiveIdentifiers) {
            var _this283 = this;

            if (this._templateAstCache.has(compMeta.type.reference)) {
              return this._templateAstCache.get(compMeta.type.reference);
            }

            var preserveWhitespaces = compMeta.template.preserveWhitespaces;
            var directives = directiveIdentifiers.map(function (dir) {
              return _this283._metadataResolver.getDirectiveSummary(dir.reference);
            });
            var pipes = ngModule.transitiveModule.pipes.map(function (pipe) {
              return _this283._metadataResolver.getPipeSummary(pipe.reference);
            });

            var result = this._templateParser.parse(compMeta, compMeta.template.htmlAst, directives, pipes, ngModule.schemas, templateSourceUrl(ngModule.type, compMeta, compMeta.template), preserveWhitespaces);

            this._templateAstCache.set(compMeta.type.reference, result);

            return result;
          }
        }, {
          key: "_createOutputContext",
          value: function _createOutputContext(genFilePath) {
            var _this284 = this;

            var importExpr$1 = function importExpr$1(symbol) {
              var typeParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
              var useSummaries = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;

              if (!(symbol instanceof StaticSymbol)) {
                throw new Error("Internal error: unknown identifier ".concat(JSON.stringify(symbol)));
              }

              var arity = _this284._symbolResolver.getTypeArity(symbol) || 0;

              var _ref45 = _this284._symbolResolver.getImportAs(symbol, useSummaries) || symbol,
                  filePath = _ref45.filePath,
                  name = _ref45.name,
                  members = _ref45.members;

              var importModule = _this284._fileNameToModuleName(filePath, genFilePath); // It should be good enough to compare filePath to genFilePath and if they are equal
              // there is a self reference. However, ngfactory files generate to .ts but their
              // symbols have .d.ts so a simple compare is insufficient. They should be canonical
              // and is tracked by #17705.


              var selfReference = _this284._fileNameToModuleName(genFilePath, genFilePath);

              var moduleName = importModule === selfReference ? null : importModule; // If we are in a type expression that refers to a generic type then supply
              // the required type parameters. If there were not enough type parameters
              // supplied, supply any as the type. Outside a type expression the reference
              // should not supply type parameters and be treated as a simple value reference
              // to the constructor function itself.

              var suppliedTypeParams = typeParams || [];
              var missingTypeParamsCount = arity - suppliedTypeParams.length;
              var allTypeParams = suppliedTypeParams.concat(newArray(missingTypeParamsCount, DYNAMIC_TYPE));
              return members.reduce(function (expr, memberName) {
                return expr.prop(memberName);
              }, importExpr(new ExternalReference(moduleName, name, null), allTypeParams));
            };

            return {
              statements: [],
              genFilePath: genFilePath,
              importExpr: importExpr$1,
              constantPool: new ConstantPool()
            };
          }
        }, {
          key: "_fileNameToModuleName",
          value: function _fileNameToModuleName(importedFilePath, containingFilePath) {
            return this._summaryResolver.getKnownModuleName(importedFilePath) || this._symbolResolver.getKnownModuleName(importedFilePath) || this._host.fileNameToModuleName(importedFilePath, containingFilePath);
          }
        }, {
          key: "_codegenStyles",
          value: function _codegenStyles(srcFileUrl, compMeta, stylesheetMetadata, isShimmed, fileSuffix) {
            var outputCtx = this._createOutputContext(_stylesModuleUrl(stylesheetMetadata.moduleUrl, isShimmed, fileSuffix));

            var compiledStylesheet = this._styleCompiler.compileStyles(outputCtx, compMeta, stylesheetMetadata, isShimmed);

            _resolveStyleStatements(this._symbolResolver, compiledStylesheet, isShimmed, fileSuffix);

            return this._codegenSourceModule(srcFileUrl, outputCtx);
          }
        }, {
          key: "_codegenSourceModule",
          value: function _codegenSourceModule(srcFileUrl, ctx) {
            return new GeneratedFile(srcFileUrl, ctx.genFilePath, ctx.statements);
          }
        }, {
          key: "listLazyRoutes",
          value: function listLazyRoutes(entryRoute, analyzedModules) {
            var self = this;

            if (entryRoute) {
              var symbol = parseLazyRoute(entryRoute, this.reflector).referencedModule;
              return visitLazyRoute(symbol);
            } else if (analyzedModules) {
              var allLazyRoutes = [];

              var _iterator35 = _createForOfIteratorHelper(analyzedModules.ngModules),
                  _step35;

              try {
                for (_iterator35.s(); !(_step35 = _iterator35.n()).done;) {
                  var ngModule = _step35.value;

                  var lazyRoutes = _listLazyRoutes(ngModule, this.reflector);

                  var _iterator36 = _createForOfIteratorHelper(lazyRoutes),
                      _step36;

                  try {
                    for (_iterator36.s(); !(_step36 = _iterator36.n()).done;) {
                      var lazyRoute = _step36.value;
                      allLazyRoutes.push(lazyRoute);
                    }
                  } catch (err) {
                    _iterator36.e(err);
                  } finally {
                    _iterator36.f();
                  }
                }
              } catch (err) {
                _iterator35.e(err);
              } finally {
                _iterator35.f();
              }

              return allLazyRoutes;
            } else {
              throw new Error("Either route or analyzedModules has to be specified!");
            }

            function visitLazyRoute(symbol) {
              var seenRoutes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Set();
              var allLazyRoutes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];

              // Support pointing to default exports, but stop recursing there,
              // as the StaticReflector does not yet support default exports.
              if (seenRoutes.has(symbol) || !symbol.name) {
                return allLazyRoutes;
              }

              seenRoutes.add(symbol);

              var lazyRoutes = _listLazyRoutes(self._metadataResolver.getNgModuleMetadata(symbol, true), self.reflector);

              var _iterator37 = _createForOfIteratorHelper(lazyRoutes),
                  _step37;

              try {
                for (_iterator37.s(); !(_step37 = _iterator37.n()).done;) {
                  var _lazyRoute = _step37.value;
                  allLazyRoutes.push(_lazyRoute);
                  visitLazyRoute(_lazyRoute.referencedModule, seenRoutes, allLazyRoutes);
                }
              } catch (err) {
                _iterator37.e(err);
              } finally {
                _iterator37.f();
              }

              return allLazyRoutes;
            }
          }
        }]);

        return AotCompiler;
      }();

      function _createEmptyStub(outputCtx) {
        // Note: We need to produce at least one import statement so that
        // TypeScript knows that the file is an es6 module. Otherwise our generated
        // exports / imports won't be emitted properly by TypeScript.
        outputCtx.statements.push(importExpr(Identifiers.ComponentFactory).toStmt());
      }

      function _resolveStyleStatements(symbolResolver, compileResult, needsShim, fileSuffix) {
        compileResult.dependencies.forEach(function (dep) {
          dep.setValue(symbolResolver.getStaticSymbol(_stylesModuleUrl(dep.moduleUrl, needsShim, fileSuffix), dep.name));
        });
      }

      function _stylesModuleUrl(stylesheetUrl, shim, suffix) {
        return "".concat(stylesheetUrl).concat(shim ? '.shim' : '', ".ngstyle").concat(suffix);
      }

      function analyzeNgModules(fileNames, host, staticSymbolResolver, metadataResolver) {
        var files = _analyzeFilesIncludingNonProgramFiles(fileNames, host, staticSymbolResolver, metadataResolver);

        return mergeAnalyzedFiles(files);
      }

      function analyzeAndValidateNgModules(fileNames, host, staticSymbolResolver, metadataResolver) {
        return validateAnalyzedModules(analyzeNgModules(fileNames, host, staticSymbolResolver, metadataResolver));
      }

      function validateAnalyzedModules(analyzedModules) {
        if (analyzedModules.symbolsMissingModule && analyzedModules.symbolsMissingModule.length) {
          var messages = analyzedModules.symbolsMissingModule.map(function (s) {
            return "Cannot determine the module for class ".concat(s.name, " in ").concat(s.filePath, "! Add ").concat(s.name, " to the NgModule to fix it.");
          });
          throw syntaxError(messages.join('\n'));
        }

        return analyzedModules;
      } // Analyzes all of the program files,
      // including files that are not part of the program
      // but are referenced by an NgModule.


      function _analyzeFilesIncludingNonProgramFiles(fileNames, host, staticSymbolResolver, metadataResolver) {
        var seenFiles = new Set();
        var files = [];

        var visitFile = function visitFile(fileName) {
          if (seenFiles.has(fileName) || !host.isSourceFile(fileName)) {
            return false;
          }

          seenFiles.add(fileName);
          var analyzedFile = analyzeFile(host, staticSymbolResolver, metadataResolver, fileName);
          files.push(analyzedFile);
          analyzedFile.ngModules.forEach(function (ngModule) {
            ngModule.transitiveModule.modules.forEach(function (modMeta) {
              return visitFile(modMeta.reference.filePath);
            });
          });
        };

        fileNames.forEach(function (fileName) {
          return visitFile(fileName);
        });
        return files;
      }

      function analyzeFile(host, staticSymbolResolver, metadataResolver, fileName) {
        var abstractDirectives = [];
        var directives = [];
        var pipes = [];
        var injectables = [];
        var ngModules = [];
        var hasDecorators = staticSymbolResolver.hasDecorators(fileName);
        var exportsNonSourceFiles = false;
        var isDeclarationFile = fileName.endsWith('.d.ts'); // Don't analyze .d.ts files that have no decorators as a shortcut
        // to speed up the analysis. This prevents us from
        // resolving the references in these files.
        // Note: exportsNonSourceFiles is only needed when compiling with summaries,
        // which is not the case when .d.ts files are treated as input files.

        if (!isDeclarationFile || hasDecorators) {
          staticSymbolResolver.getSymbolsOf(fileName).forEach(function (symbol) {
            var resolvedSymbol = staticSymbolResolver.resolveSymbol(symbol);
            var symbolMeta = resolvedSymbol.metadata;

            if (!symbolMeta || symbolMeta.__symbolic === 'error') {
              return;
            }

            var isNgSymbol = false;

            if (symbolMeta.__symbolic === 'class') {
              if (metadataResolver.isDirective(symbol)) {
                isNgSymbol = true; // This directive either has a selector or doesn't. Selector-less directives get tracked
                // in abstractDirectives, not directives. The compiler doesn't deal with selector-less
                // directives at all, really, other than to persist their metadata. This is done so that
                // apps will have an easier time migrating to Ivy, which requires the selector-less
                // annotations to be applied.

                if (!metadataResolver.isAbstractDirective(symbol)) {
                  // The directive is an ordinary directive.
                  directives.push(symbol);
                } else {
                  // The directive has no selector and is an "abstract" directive, so track it
                  // accordingly.
                  abstractDirectives.push(symbol);
                }
              } else if (metadataResolver.isPipe(symbol)) {
                isNgSymbol = true;
                pipes.push(symbol);
              } else if (metadataResolver.isNgModule(symbol)) {
                var ngModule = metadataResolver.getNgModuleMetadata(symbol, false);

                if (ngModule) {
                  isNgSymbol = true;
                  ngModules.push(ngModule);
                }
              } else if (metadataResolver.isInjectable(symbol)) {
                isNgSymbol = true;
                var injectable = metadataResolver.getInjectableMetadata(symbol, null, false);

                if (injectable) {
                  injectables.push(injectable);
                }
              }
            }

            if (!isNgSymbol) {
              exportsNonSourceFiles = exportsNonSourceFiles || isValueExportingNonSourceFile(host, symbolMeta);
            }
          });
        }

        return {
          fileName: fileName,
          directives: directives,
          abstractDirectives: abstractDirectives,
          pipes: pipes,
          ngModules: ngModules,
          injectables: injectables,
          exportsNonSourceFiles: exportsNonSourceFiles
        };
      }

      function analyzeFileForInjectables(host, staticSymbolResolver, metadataResolver, fileName) {
        var injectables = [];
        var shallowModules = [];

        if (staticSymbolResolver.hasDecorators(fileName)) {
          staticSymbolResolver.getSymbolsOf(fileName).forEach(function (symbol) {
            var resolvedSymbol = staticSymbolResolver.resolveSymbol(symbol);
            var symbolMeta = resolvedSymbol.metadata;

            if (!symbolMeta || symbolMeta.__symbolic === 'error') {
              return;
            }

            if (symbolMeta.__symbolic === 'class') {
              if (metadataResolver.isInjectable(symbol)) {
                var injectable = metadataResolver.getInjectableMetadata(symbol, null, false);

                if (injectable) {
                  injectables.push(injectable);
                }
              } else if (metadataResolver.isNgModule(symbol)) {
                var _module4 = metadataResolver.getShallowModuleMetadata(symbol);

                if (_module4) {
                  shallowModules.push(_module4);
                }
              }
            }
          });
        }

        return {
          fileName: fileName,
          injectables: injectables,
          shallowModules: shallowModules
        };
      }

      function isValueExportingNonSourceFile(host, metadata) {
        var exportsNonSourceFiles = false;

        var Visitor = /*#__PURE__*/function () {
          function Visitor() {
            _classCallCheck(this, Visitor);
          }

          _createClass2(Visitor, [{
            key: "visitArray",
            value: function visitArray(arr, context) {
              var _this285 = this;

              arr.forEach(function (v) {
                return visitValue(v, _this285, context);
              });
            }
          }, {
            key: "visitStringMap",
            value: function visitStringMap(map, context) {
              var _this286 = this;

              Object.keys(map).forEach(function (key) {
                return visitValue(map[key], _this286, context);
              });
            }
          }, {
            key: "visitPrimitive",
            value: function visitPrimitive(value, context) {}
          }, {
            key: "visitOther",
            value: function visitOther(value, context) {
              if (value instanceof StaticSymbol && !host.isSourceFile(value.filePath)) {
                exportsNonSourceFiles = true;
              }
            }
          }]);

          return Visitor;
        }();

        visitValue(metadata, new Visitor(), null);
        return exportsNonSourceFiles;
      }

      function mergeAnalyzedFiles(analyzedFiles) {
        var allNgModules = [];
        var ngModuleByPipeOrDirective = new Map();
        var allPipesAndDirectives = new Set();
        analyzedFiles.forEach(function (af) {
          af.ngModules.forEach(function (ngModule) {
            allNgModules.push(ngModule);
            ngModule.declaredDirectives.forEach(function (d) {
              return ngModuleByPipeOrDirective.set(d.reference, ngModule);
            });
            ngModule.declaredPipes.forEach(function (p) {
              return ngModuleByPipeOrDirective.set(p.reference, ngModule);
            });
          });
          af.directives.forEach(function (d) {
            return allPipesAndDirectives.add(d);
          });
          af.pipes.forEach(function (p) {
            return allPipesAndDirectives.add(p);
          });
        });
        var symbolsMissingModule = [];
        allPipesAndDirectives.forEach(function (ref) {
          if (!ngModuleByPipeOrDirective.has(ref)) {
            symbolsMissingModule.push(ref);
          }
        });
        return {
          ngModules: allNgModules,
          ngModuleByPipeOrDirective: ngModuleByPipeOrDirective,
          symbolsMissingModule: symbolsMissingModule,
          files: analyzedFiles
        };
      }

      function mergeAndValidateNgFiles(files) {
        return validateAnalyzedModules(mergeAnalyzedFiles(files));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var FORMATTED_MESSAGE = 'ngFormattedMessage';

      function indentStr(level) {
        if (level <= 0) return '';
        if (level < 6) return ['', ' ', '  ', '   ', '    ', '     '][level];
        var half = indentStr(Math.floor(level / 2));
        return half + half + (level % 2 === 1 ? ' ' : '');
      }

      function formatChain(chain) {
        var indent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
        if (!chain) return '';
        var position = chain.position ? "".concat(chain.position.fileName, "(").concat(chain.position.line + 1, ",").concat(chain.position.column + 1, ")") : '';
        var prefix = position && indent === 0 ? "".concat(position, ": ") : '';
        var postfix = position && indent !== 0 ? " at ".concat(position) : '';
        var message = "".concat(prefix).concat(chain.message).concat(postfix);

        if (chain.next) {
          var _iterator38 = _createForOfIteratorHelper(chain.next),
              _step38;

          try {
            for (_iterator38.s(); !(_step38 = _iterator38.n()).done;) {
              var kid = _step38.value;
              message += '\n' + formatChain(kid, indent + 2);
            }
          } catch (err) {
            _iterator38.e(err);
          } finally {
            _iterator38.f();
          }
        }

        return "".concat(indentStr(indent)).concat(message);
      }

      function formattedError(chain) {
        var message = formatChain(chain) + '.';
        var error = syntaxError(message);
        error[FORMATTED_MESSAGE] = true;
        error.chain = chain;
        error.position = chain.position;
        return error;
      }

      function isFormattedError(error) {
        return !!error[FORMATTED_MESSAGE];
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ANGULAR_CORE = '@angular/core';
      var ANGULAR_ROUTER = '@angular/router';
      var HIDDEN_KEY = /^\$.*\$$/;
      var IGNORE = {
        __symbolic: 'ignore'
      };
      var USE_VALUE$1 = 'useValue';
      var PROVIDE = 'provide';
      var REFERENCE_SET = new Set([USE_VALUE$1, 'useFactory', 'data', 'id', 'loadChildren']);
      var TYPEGUARD_POSTFIX = 'TypeGuard';
      var USE_IF = 'UseIf';

      function shouldIgnore(value) {
        return value && value.__symbolic == 'ignore';
      }
      /**
       * A static reflector implements enough of the Reflector API that is necessary to compile
       * templates statically.
       */


      var StaticReflector = /*#__PURE__*/function () {
        function StaticReflector(summaryResolver, symbolResolver) {
          var _this287 = this;

          var knownMetadataClasses = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
          var knownMetadataFunctions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
          var errorRecorder = arguments.length > 4 ? arguments[4] : undefined;

          _classCallCheck(this, StaticReflector);

          this.summaryResolver = summaryResolver;
          this.symbolResolver = symbolResolver;
          this.errorRecorder = errorRecorder;
          this.annotationCache = new Map();
          this.shallowAnnotationCache = new Map();
          this.propertyCache = new Map();
          this.parameterCache = new Map();
          this.methodCache = new Map();
          this.staticCache = new Map();
          this.conversionMap = new Map();
          this.resolvedExternalReferences = new Map();
          this.annotationForParentClassWithSummaryKind = new Map();
          this.initializeConversionMap();
          knownMetadataClasses.forEach(function (kc) {
            return _this287._registerDecoratorOrConstructor(_this287.getStaticSymbol(kc.filePath, kc.name), kc.ctor);
          });
          knownMetadataFunctions.forEach(function (kf) {
            return _this287._registerFunction(_this287.getStaticSymbol(kf.filePath, kf.name), kf.fn);
          });
          this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Directive, [createDirective, createComponent]);
          this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Pipe, [createPipe]);
          this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.NgModule, [createNgModule]);
          this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Injectable, [createInjectable, createPipe, createDirective, createComponent, createNgModule]);
        }

        _createClass2(StaticReflector, [{
          key: "componentModuleUrl",
          value: function componentModuleUrl(typeOrFunc) {
            var staticSymbol = this.findSymbolDeclaration(typeOrFunc);
            return this.symbolResolver.getResourcePath(staticSymbol);
          }
          /**
           * Invalidate the specified `symbols` on program change.
           * @param symbols
           */

        }, {
          key: "invalidateSymbols",
          value: function invalidateSymbols(symbols) {
            var _iterator39 = _createForOfIteratorHelper(symbols),
                _step39;

            try {
              for (_iterator39.s(); !(_step39 = _iterator39.n()).done;) {
                var symbol = _step39.value;
                this.annotationCache["delete"](symbol);
                this.shallowAnnotationCache["delete"](symbol);
                this.propertyCache["delete"](symbol);
                this.parameterCache["delete"](symbol);
                this.methodCache["delete"](symbol);
                this.staticCache["delete"](symbol);
                this.conversionMap["delete"](symbol);
              }
            } catch (err) {
              _iterator39.e(err);
            } finally {
              _iterator39.f();
            }
          }
        }, {
          key: "resolveExternalReference",
          value: function resolveExternalReference(ref, containingFile) {
            var key = undefined;

            if (!containingFile) {
              key = "".concat(ref.moduleName, ":").concat(ref.name);

              var _declarationSymbol = this.resolvedExternalReferences.get(key);

              if (_declarationSymbol) return _declarationSymbol;
            }

            var refSymbol = this.symbolResolver.getSymbolByModule(ref.moduleName, ref.name, containingFile);
            var declarationSymbol = this.findSymbolDeclaration(refSymbol);

            if (!containingFile) {
              this.symbolResolver.recordModuleNameForFileName(refSymbol.filePath, ref.moduleName);
              this.symbolResolver.recordImportAs(declarationSymbol, refSymbol);
            }

            if (key) {
              this.resolvedExternalReferences.set(key, declarationSymbol);
            }

            return declarationSymbol;
          }
        }, {
          key: "findDeclaration",
          value: function findDeclaration(moduleUrl, name, containingFile) {
            return this.findSymbolDeclaration(this.symbolResolver.getSymbolByModule(moduleUrl, name, containingFile));
          }
        }, {
          key: "tryFindDeclaration",
          value: function tryFindDeclaration(moduleUrl, name, containingFile) {
            var _this288 = this;

            return this.symbolResolver.ignoreErrorsFor(function () {
              return _this288.findDeclaration(moduleUrl, name, containingFile);
            });
          }
        }, {
          key: "findSymbolDeclaration",
          value: function findSymbolDeclaration(symbol) {
            var resolvedSymbol = this.symbolResolver.resolveSymbol(symbol);

            if (resolvedSymbol) {
              var resolvedMetadata = resolvedSymbol.metadata;

              if (resolvedMetadata && resolvedMetadata.__symbolic === 'resolved') {
                resolvedMetadata = resolvedMetadata.symbol;
              }

              if (resolvedMetadata instanceof StaticSymbol) {
                return this.findSymbolDeclaration(resolvedSymbol.metadata);
              }
            }

            return symbol;
          }
        }, {
          key: "tryAnnotations",
          value: function tryAnnotations(type) {
            var originalRecorder = this.errorRecorder;

            this.errorRecorder = function (error, fileName) {};

            try {
              return this.annotations(type);
            } finally {
              this.errorRecorder = originalRecorder;
            }
          }
        }, {
          key: "annotations",
          value: function annotations(type) {
            var _this289 = this;

            return this._annotations(type, function (type, decorators) {
              return _this289.simplify(type, decorators);
            }, this.annotationCache);
          }
        }, {
          key: "shallowAnnotations",
          value: function shallowAnnotations(type) {
            var _this290 = this;

            return this._annotations(type, function (type, decorators) {
              return _this290.simplify(type, decorators, true);
            }, this.shallowAnnotationCache);
          }
        }, {
          key: "_annotations",
          value: function _annotations(type, simplify, annotationCache) {
            var annotations = annotationCache.get(type);

            if (!annotations) {
              annotations = [];
              var classMetadata = this.getTypeMetadata(type);
              var parentType = this.findParentType(type, classMetadata);

              if (parentType) {
                var _annotations2;

                var parentAnnotations = this.annotations(parentType);

                (_annotations2 = annotations).push.apply(_annotations2, _toConsumableArray(parentAnnotations));
              }

              var ownAnnotations = [];

              if (classMetadata['decorators']) {
                ownAnnotations = simplify(type, classMetadata['decorators']);

                if (ownAnnotations) {
                  var _annotations3;

                  (_annotations3 = annotations).push.apply(_annotations3, _toConsumableArray(ownAnnotations));
                }
              }

              if (parentType && !this.summaryResolver.isLibraryFile(type.filePath) && this.summaryResolver.isLibraryFile(parentType.filePath)) {
                var summary = this.summaryResolver.resolveSummary(parentType);

                if (summary && summary.type) {
                  var requiredAnnotationTypes = this.annotationForParentClassWithSummaryKind.get(summary.type.summaryKind);
                  var typeHasRequiredAnnotation = requiredAnnotationTypes.some(function (requiredType) {
                    return ownAnnotations.some(function (ann) {
                      return requiredType.isTypeOf(ann);
                    });
                  });

                  if (!typeHasRequiredAnnotation) {
                    this.reportError(formatMetadataError(metadataError("Class ".concat(type.name, " in ").concat(type.filePath, " extends from a ").concat(CompileSummaryKind[summary.type.summaryKind], " in another compilation unit without duplicating the decorator"),
                    /* summary */
                    undefined, "Please add a ".concat(requiredAnnotationTypes.map(function (type) {
                      return type.ngMetadataName;
                    }).join(' or '), " decorator to the class")), type), type);
                  }
                }
              }

              annotationCache.set(type, annotations.filter(function (ann) {
                return !!ann;
              }));
            }

            return annotations;
          }
        }, {
          key: "propMetadata",
          value: function propMetadata(type) {
            var _this291 = this;

            var propMetadata = this.propertyCache.get(type);

            if (!propMetadata) {
              var classMetadata = this.getTypeMetadata(type);
              propMetadata = {};
              var parentType = this.findParentType(type, classMetadata);

              if (parentType) {
                var parentPropMetadata = this.propMetadata(parentType);
                Object.keys(parentPropMetadata).forEach(function (parentProp) {
                  propMetadata[parentProp] = parentPropMetadata[parentProp];
                });
              }

              var members = classMetadata['members'] || {};
              Object.keys(members).forEach(function (propName) {
                var propData = members[propName];
                var prop = propData.find(function (a) {
                  return a['__symbolic'] == 'property' || a['__symbolic'] == 'method';
                });
                var decorators = []; // hasOwnProperty() is used here to make sure we do not look up methods
                // on `Object.prototype`.

                if (propMetadata === null || propMetadata === void 0 ? void 0 : propMetadata.hasOwnProperty(propName)) {
                  decorators.push.apply(decorators, _toConsumableArray(propMetadata[propName]));
                }

                propMetadata[propName] = decorators;

                if (prop && prop['decorators']) {
                  decorators.push.apply(decorators, _toConsumableArray(_this291.simplify(type, prop['decorators'])));
                }
              });
              this.propertyCache.set(type, propMetadata);
            }

            return propMetadata;
          }
        }, {
          key: "parameters",
          value: function parameters(type) {
            var _this292 = this;

            if (!(type instanceof StaticSymbol)) {
              this.reportError(new Error("parameters received ".concat(JSON.stringify(type), " which is not a StaticSymbol")), type);
              return [];
            }

            try {
              var parameters = this.parameterCache.get(type);

              if (!parameters) {
                var classMetadata = this.getTypeMetadata(type);
                var parentType = this.findParentType(type, classMetadata);
                var members = classMetadata ? classMetadata['members'] : null;
                var ctorData = members ? members['__ctor__'] : null;

                if (ctorData) {
                  var ctor = ctorData.find(function (a) {
                    return a['__symbolic'] == 'constructor';
                  });
                  var rawParameterTypes = ctor['parameters'] || [];
                  var parameterDecorators = this.simplify(type, ctor['parameterDecorators'] || []);
                  parameters = [];
                  rawParameterTypes.forEach(function (rawParamType, index) {
                    var nestedResult = [];

                    var paramType = _this292.trySimplify(type, rawParamType);

                    if (paramType) nestedResult.push(paramType);
                    var decorators = parameterDecorators ? parameterDecorators[index] : null;

                    if (decorators) {
                      nestedResult.push.apply(nestedResult, _toConsumableArray(decorators));
                    }

                    parameters.push(nestedResult);
                  });
                } else if (parentType) {
                  parameters = this.parameters(parentType);
                }

                if (!parameters) {
                  parameters = [];
                }

                this.parameterCache.set(type, parameters);
              }

              return parameters;
            } catch (e) {
              console.error("Failed on type ".concat(JSON.stringify(type), " with error ").concat(e));
              throw e;
            }
          }
        }, {
          key: "_methodNames",
          value: function _methodNames(type) {
            var methodNames = this.methodCache.get(type);

            if (!methodNames) {
              var classMetadata = this.getTypeMetadata(type);
              methodNames = {};
              var parentType = this.findParentType(type, classMetadata);

              if (parentType) {
                var parentMethodNames = this._methodNames(parentType);

                Object.keys(parentMethodNames).forEach(function (parentProp) {
                  methodNames[parentProp] = parentMethodNames[parentProp];
                });
              }

              var members = classMetadata['members'] || {};
              Object.keys(members).forEach(function (propName) {
                var propData = members[propName];
                var isMethod = propData.some(function (a) {
                  return a['__symbolic'] == 'method';
                });
                methodNames[propName] = methodNames[propName] || isMethod;
              });
              this.methodCache.set(type, methodNames);
            }

            return methodNames;
          }
        }, {
          key: "_staticMembers",
          value: function _staticMembers(type) {
            var staticMembers = this.staticCache.get(type);

            if (!staticMembers) {
              var classMetadata = this.getTypeMetadata(type);
              var staticMemberData = classMetadata['statics'] || {};
              staticMembers = Object.keys(staticMemberData);
              this.staticCache.set(type, staticMembers);
            }

            return staticMembers;
          }
        }, {
          key: "findParentType",
          value: function findParentType(type, classMetadata) {
            var parentType = this.trySimplify(type, classMetadata['extends']);

            if (parentType instanceof StaticSymbol) {
              return parentType;
            }
          }
        }, {
          key: "hasLifecycleHook",
          value: function hasLifecycleHook(type, lcProperty) {
            if (!(type instanceof StaticSymbol)) {
              this.reportError(new Error("hasLifecycleHook received ".concat(JSON.stringify(type), " which is not a StaticSymbol")), type);
            }

            try {
              return !!this._methodNames(type)[lcProperty];
            } catch (e) {
              console.error("Failed on type ".concat(JSON.stringify(type), " with error ").concat(e));
              throw e;
            }
          }
        }, {
          key: "guards",
          value: function guards(type) {
            if (!(type instanceof StaticSymbol)) {
              this.reportError(new Error("guards received ".concat(JSON.stringify(type), " which is not a StaticSymbol")), type);
              return {};
            }

            var staticMembers = this._staticMembers(type);

            var result = {};

            var _iterator40 = _createForOfIteratorHelper(staticMembers),
                _step40;

            try {
              for (_iterator40.s(); !(_step40 = _iterator40.n()).done;) {
                var name = _step40.value;

                if (name.endsWith(TYPEGUARD_POSTFIX)) {
                  var property = name.substr(0, name.length - TYPEGUARD_POSTFIX.length);
                  var value = void 0;

                  if (property.endsWith(USE_IF)) {
                    property = name.substr(0, property.length - USE_IF.length);
                    value = USE_IF;
                  } else {
                    value = this.getStaticSymbol(type.filePath, type.name, [name]);
                  }

                  result[property] = value;
                }
              }
            } catch (err) {
              _iterator40.e(err);
            } finally {
              _iterator40.f();
            }

            return result;
          }
        }, {
          key: "_registerDecoratorOrConstructor",
          value: function _registerDecoratorOrConstructor(type, ctor) {
            this.conversionMap.set(type, function (context, args) {
              return _construct(ctor, _toConsumableArray(args));
            });
          }
        }, {
          key: "_registerFunction",
          value: function _registerFunction(type, fn) {
            this.conversionMap.set(type, function (context, args) {
              return fn.apply(undefined, args);
            });
          }
        }, {
          key: "initializeConversionMap",
          value: function initializeConversionMap() {
            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Injectable'), createInjectable);

            this.injectionToken = this.findDeclaration(ANGULAR_CORE, 'InjectionToken');
            this.opaqueToken = this.findDeclaration(ANGULAR_CORE, 'OpaqueToken');
            this.ROUTES = this.tryFindDeclaration(ANGULAR_ROUTER, 'ROUTES');
            this.ANALYZE_FOR_ENTRY_COMPONENTS = this.findDeclaration(ANGULAR_CORE, 'ANALYZE_FOR_ENTRY_COMPONENTS');

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Host'), createHost);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Self'), createSelf);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'SkipSelf'), createSkipSelf);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Inject'), createInject);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Optional'), createOptional);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Attribute'), createAttribute);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ContentChild'), createContentChild);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ContentChildren'), createContentChildren);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ViewChild'), createViewChild);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ViewChildren'), createViewChildren);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Input'), createInput);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Output'), createOutput);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Pipe'), createPipe);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'HostBinding'), createHostBinding);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'HostListener'), createHostListener);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Directive'), createDirective);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Component'), createComponent);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'NgModule'), createNgModule); // Note: Some metadata classes can be used directly with Provider.deps.


            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Host'), createHost);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Self'), createSelf);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'SkipSelf'), createSkipSelf);

            this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Optional'), createOptional);
          }
          /**
           * getStaticSymbol produces a Type whose metadata is known but whose implementation is not loaded.
           * All types passed to the StaticResolver should be pseudo-types returned by this method.
           *
           * @param declarationFile the absolute path of the file where the symbol is declared
           * @param name the name of the type.
           */

        }, {
          key: "getStaticSymbol",
          value: function getStaticSymbol(declarationFile, name, members) {
            return this.symbolResolver.getStaticSymbol(declarationFile, name, members);
          }
          /**
           * Simplify but discard any errors
           */

        }, {
          key: "trySimplify",
          value: function trySimplify(context, value) {
            var originalRecorder = this.errorRecorder;

            this.errorRecorder = function (error, fileName) {};

            var result = this.simplify(context, value);
            this.errorRecorder = originalRecorder;
            return result;
          }
          /** @internal */

        }, {
          key: "simplify",
          value: function simplify(context, value) {
            var lazy = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
            var self = this;
            var scope = BindingScope$1.empty;
            var calling = new Map();
            var rootContext = context;

            function simplifyInContext(context, value, depth, references) {
              function resolveReferenceValue(staticSymbol) {
                var resolvedSymbol = self.symbolResolver.resolveSymbol(staticSymbol);
                return resolvedSymbol ? resolvedSymbol.metadata : null;
              }

              function simplifyEagerly(value) {
                return simplifyInContext(context, value, depth, 0);
              }

              function simplifyLazily(value) {
                return simplifyInContext(context, value, depth, references + 1);
              }

              function simplifyNested(nestedContext, value) {
                if (nestedContext === context) {
                  // If the context hasn't changed let the exception propagate unmodified.
                  return simplifyInContext(nestedContext, value, depth + 1, references);
                }

                try {
                  return simplifyInContext(nestedContext, value, depth + 1, references);
                } catch (e) {
                  if (isMetadataError(e)) {
                    // Propagate the message text up but add a message to the chain that explains how we got
                    // here.
                    // e.chain implies e.symbol
                    var summaryMsg = e.chain ? 'references \'' + e.symbol.name + '\'' : errorSummary(e);
                    var summary = "'".concat(nestedContext.name, "' ").concat(summaryMsg);
                    var chain = {
                      message: summary,
                      position: e.position,
                      next: e.chain
                    }; // TODO(chuckj): retrieve the position information indirectly from the collectors node
                    // map if the metadata is from a .ts file.

                    self.error({
                      message: e.message,
                      advise: e.advise,
                      context: e.context,
                      chain: chain,
                      symbol: nestedContext
                    }, context);
                  } else {
                    // It is probably an internal error.
                    throw e;
                  }
                }
              }

              function simplifyCall(functionSymbol, targetFunction, args, targetExpression) {
                if (targetFunction && targetFunction['__symbolic'] == 'function') {
                  if (calling.get(functionSymbol)) {
                    self.error({
                      message: 'Recursion is not supported',
                      summary: "called '".concat(functionSymbol.name, "' recursively"),
                      value: targetFunction
                    }, functionSymbol);
                  }

                  try {
                    var _value7 = targetFunction['value'];

                    if (_value7 && (depth != 0 || _value7.__symbolic != 'error')) {
                      var parameters = targetFunction['parameters'];
                      var defaults = targetFunction.defaults;
                      args = args.map(function (arg) {
                        return simplifyNested(context, arg);
                      }).map(function (arg) {
                        return shouldIgnore(arg) ? undefined : arg;
                      });

                      if (defaults && defaults.length > args.length) {
                        var _args3;

                        (_args3 = args).push.apply(_args3, _toConsumableArray(defaults.slice(args.length).map(function (value) {
                          return simplify(value);
                        })));
                      }

                      calling.set(functionSymbol, true);
                      var functionScope = BindingScope$1.build();

                      for (var i = 0; i < parameters.length; i++) {
                        functionScope.define(parameters[i], args[i]);
                      }

                      var oldScope = scope;

                      var _result;

                      try {
                        scope = functionScope.done();
                        _result = simplifyNested(functionSymbol, _value7);
                      } finally {
                        scope = oldScope;
                      }

                      return _result;
                    }
                  } finally {
                    calling["delete"](functionSymbol);
                  }
                }

                if (depth === 0) {
                  // If depth is 0 we are evaluating the top level expression that is describing element
                  // decorator. In this case, it is a decorator we don't understand, such as a custom
                  // non-angular decorator, and we should just ignore it.
                  return IGNORE;
                }

                var position = undefined;

                if (targetExpression && targetExpression.__symbolic == 'resolved') {
                  var line = targetExpression.line;
                  var character = targetExpression.character;
                  var fileName = targetExpression.fileName;

                  if (fileName != null && line != null && character != null) {
                    position = {
                      fileName: fileName,
                      line: line,
                      column: character
                    };
                  }
                }

                self.error({
                  message: FUNCTION_CALL_NOT_SUPPORTED,
                  context: functionSymbol,
                  value: targetFunction,
                  position: position
                }, context);
              }

              function simplify(expression) {
                if (isPrimitive(expression)) {
                  return expression;
                }

                if (Array.isArray(expression)) {
                  var _result2 = [];

                  var _iterator41 = _createForOfIteratorHelper(expression),
                      _step41;

                  try {
                    for (_iterator41.s(); !(_step41 = _iterator41.n()).done;) {
                      var item = _step41.value;

                      // Check for a spread expression
                      if (item && item.__symbolic === 'spread') {
                        // We call with references as 0 because we require the actual value and cannot
                        // tolerate a reference here.
                        var spreadArray = simplifyEagerly(item.expression);

                        if (Array.isArray(spreadArray)) {
                          var _iterator42 = _createForOfIteratorHelper(spreadArray),
                              _step42;

                          try {
                            for (_iterator42.s(); !(_step42 = _iterator42.n()).done;) {
                              var spreadItem = _step42.value;

                              _result2.push(spreadItem);
                            }
                          } catch (err) {
                            _iterator42.e(err);
                          } finally {
                            _iterator42.f();
                          }

                          continue;
                        }
                      }

                      var _value8 = simplify(item);

                      if (shouldIgnore(_value8)) {
                        continue;
                      }

                      _result2.push(_value8);
                    }
                  } catch (err) {
                    _iterator41.e(err);
                  } finally {
                    _iterator41.f();
                  }

                  return _result2;
                }

                if (expression instanceof StaticSymbol) {
                  // Stop simplification at builtin symbols or if we are in a reference context and
                  // the symbol doesn't have members.
                  if (expression === self.injectionToken || self.conversionMap.has(expression) || references > 0 && !expression.members.length) {
                    return expression;
                  } else {
                    var staticSymbol = expression;
                    var declarationValue = resolveReferenceValue(staticSymbol);

                    if (declarationValue != null) {
                      return simplifyNested(staticSymbol, declarationValue);
                    } else {
                      return staticSymbol;
                    }
                  }
                }

                if (expression) {
                  if (expression['__symbolic']) {
                    var _staticSymbol;

                    switch (expression['__symbolic']) {
                      case 'binop':
                        var left = simplify(expression['left']);
                        if (shouldIgnore(left)) return left;
                        var right = simplify(expression['right']);
                        if (shouldIgnore(right)) return right;

                        switch (expression['operator']) {
                          case '&&':
                            return left && right;

                          case '||':
                            return left || right;

                          case '|':
                            return left | right;

                          case '^':
                            return left ^ right;

                          case '&':
                            return left & right;

                          case '==':
                            return left == right;

                          case '!=':
                            return left != right;

                          case '===':
                            return left === right;

                          case '!==':
                            return left !== right;

                          case '<':
                            return left < right;

                          case '>':
                            return left > right;

                          case '<=':
                            return left <= right;

                          case '>=':
                            return left >= right;

                          case '<<':
                            return left << right;

                          case '>>':
                            return left >> right;

                          case '+':
                            return left + right;

                          case '-':
                            return left - right;

                          case '*':
                            return left * right;

                          case '/':
                            return left / right;

                          case '%':
                            return left % right;
                        }

                        return null;

                      case 'if':
                        var condition = simplify(expression['condition']);
                        return condition ? simplify(expression['thenExpression']) : simplify(expression['elseExpression']);

                      case 'pre':
                        var operand = simplify(expression['operand']);
                        if (shouldIgnore(operand)) return operand;

                        switch (expression['operator']) {
                          case '+':
                            return operand;

                          case '-':
                            return -operand;

                          case '!':
                            return !operand;

                          case '~':
                            return ~operand;
                        }

                        return null;

                      case 'index':
                        var indexTarget = simplifyEagerly(expression['expression']);
                        var index = simplifyEagerly(expression['index']);
                        if (indexTarget && isPrimitive(index)) return indexTarget[index];
                        return null;

                      case 'select':
                        var member = expression['member'];
                        var selectContext = context;
                        var selectTarget = simplify(expression['expression']);

                        if (selectTarget instanceof StaticSymbol) {
                          var members = selectTarget.members.concat(member);
                          selectContext = self.getStaticSymbol(selectTarget.filePath, selectTarget.name, members);

                          var _declarationValue = resolveReferenceValue(selectContext);

                          if (_declarationValue != null) {
                            return simplifyNested(selectContext, _declarationValue);
                          } else {
                            return selectContext;
                          }
                        }

                        if (selectTarget && isPrimitive(member)) return simplifyNested(selectContext, selectTarget[member]);
                        return null;

                      case 'reference':
                        // Note: This only has to deal with variable references, as symbol references have
                        // been converted into 'resolved'
                        // in the StaticSymbolResolver.
                        var name = expression['name'];
                        var localValue = scope.resolve(name);

                        if (localValue != BindingScope$1.missing) {
                          return localValue;
                        }

                        break;

                      case 'resolved':
                        try {
                          return simplify(expression.symbol);
                        } catch (e) {
                          // If an error is reported evaluating the symbol record the position of the
                          // reference in the error so it can
                          // be reported in the error message generated from the exception.
                          if (isMetadataError(e) && expression.fileName != null && expression.line != null && expression.character != null) {
                            e.position = {
                              fileName: expression.fileName,
                              line: expression.line,
                              column: expression.character
                            };
                          }

                          throw e;
                        }

                      case 'class':
                        return context;

                      case 'function':
                        return context;

                      case 'new':
                      case 'call':
                        // Determine if the function is a built-in conversion
                        _staticSymbol = simplifyInContext(context, expression['expression'], depth + 1,
                        /* references */
                        0);

                        if (_staticSymbol instanceof StaticSymbol) {
                          if (_staticSymbol === self.injectionToken || _staticSymbol === self.opaqueToken) {
                            // if somebody calls new InjectionToken, don't create an InjectionToken,
                            // but rather return the symbol to which the InjectionToken is assigned to.
                            // OpaqueToken is supported too as it is required by the language service to
                            // support v4 and prior versions of Angular.
                            return context;
                          }

                          var argExpressions = expression['arguments'] || [];
                          var converter = self.conversionMap.get(_staticSymbol);

                          if (converter) {
                            var args = argExpressions.map(function (arg) {
                              return simplifyNested(context, arg);
                            }).map(function (arg) {
                              return shouldIgnore(arg) ? undefined : arg;
                            });
                            return converter(context, args);
                          } else {
                            // Determine if the function is one we can simplify.
                            var targetFunction = resolveReferenceValue(_staticSymbol);
                            return simplifyCall(_staticSymbol, targetFunction, argExpressions, expression['expression']);
                          }
                        }

                        return IGNORE;

                      case 'error':
                        var message = expression.message;

                        if (expression['line'] != null) {
                          self.error({
                            message: message,
                            context: expression.context,
                            value: expression,
                            position: {
                              fileName: expression['fileName'],
                              line: expression['line'],
                              column: expression['character']
                            }
                          }, context);
                        } else {
                          self.error({
                            message: message,
                            context: expression.context
                          }, context);
                        }

                        return IGNORE;

                      case 'ignore':
                        return expression;
                    }

                    return null;
                  }

                  return mapStringMap(expression, function (value, name) {
                    if (REFERENCE_SET.has(name)) {
                      if (name === USE_VALUE$1 && PROVIDE in expression) {
                        // If this is a provider expression, check for special tokens that need the value
                        // during analysis.
                        var provide = simplify(expression.provide);

                        if (provide === self.ROUTES || provide == self.ANALYZE_FOR_ENTRY_COMPONENTS) {
                          return simplify(value);
                        }
                      }

                      return simplifyLazily(value);
                    }

                    return simplify(value);
                  });
                }

                return IGNORE;
              }

              return simplify(value);
            }

            var result;

            try {
              result = simplifyInContext(context, value, 0, lazy ? 1 : 0);
            } catch (e) {
              if (this.errorRecorder) {
                this.reportError(e, context);
              } else {
                throw formatMetadataError(e, context);
              }
            }

            if (shouldIgnore(result)) {
              return undefined;
            }

            return result;
          }
        }, {
          key: "getTypeMetadata",
          value: function getTypeMetadata(type) {
            var resolvedSymbol = this.symbolResolver.resolveSymbol(type);
            return resolvedSymbol && resolvedSymbol.metadata ? resolvedSymbol.metadata : {
              __symbolic: 'class'
            };
          }
        }, {
          key: "reportError",
          value: function reportError(error, context, path) {
            if (this.errorRecorder) {
              this.errorRecorder(formatMetadataError(error, context), context && context.filePath || path);
            } else {
              throw error;
            }
          }
        }, {
          key: "error",
          value: function error(_ref46, reportingContext) {
            var message = _ref46.message,
                summary = _ref46.summary,
                advise = _ref46.advise,
                position = _ref46.position,
                context = _ref46.context,
                value = _ref46.value,
                symbol = _ref46.symbol,
                chain = _ref46.chain;
            this.reportError(metadataError(message, summary, advise, position, symbol, context, chain), reportingContext);
          }
        }]);

        return StaticReflector;
      }();

      var METADATA_ERROR = 'ngMetadataError';

      function metadataError(message, summary, advise, position, symbol, context, chain) {
        var error = syntaxError(message);
        error[METADATA_ERROR] = true;
        if (advise) error.advise = advise;
        if (position) error.position = position;
        if (summary) error.summary = summary;
        if (context) error.context = context;
        if (chain) error.chain = chain;
        if (symbol) error.symbol = symbol;
        return error;
      }

      function isMetadataError(error) {
        return !!error[METADATA_ERROR];
      }

      var REFERENCE_TO_NONEXPORTED_CLASS = 'Reference to non-exported class';
      var VARIABLE_NOT_INITIALIZED = 'Variable not initialized';
      var DESTRUCTURE_NOT_SUPPORTED = 'Destructuring not supported';
      var COULD_NOT_RESOLVE_TYPE = 'Could not resolve type';
      var FUNCTION_CALL_NOT_SUPPORTED = 'Function call not supported';
      var REFERENCE_TO_LOCAL_SYMBOL = 'Reference to a local symbol';
      var LAMBDA_NOT_SUPPORTED = 'Lambda not supported';

      function expandedMessage(message, context) {
        switch (message) {
          case REFERENCE_TO_NONEXPORTED_CLASS:
            if (context && context.className) {
              return "References to a non-exported class are not supported in decorators but ".concat(context.className, " was referenced.");
            }

            break;

          case VARIABLE_NOT_INITIALIZED:
            return 'Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler';

          case DESTRUCTURE_NOT_SUPPORTED:
            return 'Referencing an exported destructured variable or constant is not supported in decorators and this value is needed by the template compiler';

          case COULD_NOT_RESOLVE_TYPE:
            if (context && context.typeName) {
              return "Could not resolve type ".concat(context.typeName);
            }

            break;

          case FUNCTION_CALL_NOT_SUPPORTED:
            if (context && context.name) {
              return "Function calls are not supported in decorators but '".concat(context.name, "' was called");
            }

            return 'Function calls are not supported in decorators';

          case REFERENCE_TO_LOCAL_SYMBOL:
            if (context && context.name) {
              return "Reference to a local (non-exported) symbols are not supported in decorators but '".concat(context.name, "' was referenced");
            }

            break;

          case LAMBDA_NOT_SUPPORTED:
            return "Function expressions are not supported in decorators";
        }

        return message;
      }

      function messageAdvise(message, context) {
        switch (message) {
          case REFERENCE_TO_NONEXPORTED_CLASS:
            if (context && context.className) {
              return "Consider exporting '".concat(context.className, "'");
            }

            break;

          case DESTRUCTURE_NOT_SUPPORTED:
            return 'Consider simplifying to avoid destructuring';

          case REFERENCE_TO_LOCAL_SYMBOL:
            if (context && context.name) {
              return "Consider exporting '".concat(context.name, "'");
            }

            break;

          case LAMBDA_NOT_SUPPORTED:
            return "Consider changing the function expression into an exported function";
        }

        return undefined;
      }

      function errorSummary(error) {
        if (error.summary) {
          return error.summary;
        }

        switch (error.message) {
          case REFERENCE_TO_NONEXPORTED_CLASS:
            if (error.context && error.context.className) {
              return "references non-exported class ".concat(error.context.className);
            }

            break;

          case VARIABLE_NOT_INITIALIZED:
            return 'is not initialized';

          case DESTRUCTURE_NOT_SUPPORTED:
            return 'is a destructured variable';

          case COULD_NOT_RESOLVE_TYPE:
            return 'could not be resolved';

          case FUNCTION_CALL_NOT_SUPPORTED:
            if (error.context && error.context.name) {
              return "calls '".concat(error.context.name, "'");
            }

            return "calls a function";

          case REFERENCE_TO_LOCAL_SYMBOL:
            if (error.context && error.context.name) {
              return "references local variable ".concat(error.context.name);
            }

            return "references a local variable";
        }

        return 'contains the error';
      }

      function mapStringMap(input, transform) {
        if (!input) return {};
        var result = {};
        Object.keys(input).forEach(function (key) {
          var value = transform(input[key], key);

          if (!shouldIgnore(value)) {
            if (HIDDEN_KEY.test(key)) {
              Object.defineProperty(result, key, {
                enumerable: false,
                configurable: true,
                value: value
              });
            } else {
              result[key] = value;
            }
          }
        });
        return result;
      }

      function isPrimitive(o) {
        return o === null || typeof o !== 'function' && typeof o !== 'object';
      }

      var BindingScope$1 = /*#__PURE__*/function () {
        function BindingScope$1() {
          _classCallCheck(this, BindingScope$1);
        }

        _createClass2(BindingScope$1, null, [{
          key: "build",
          value: function build() {
            var current = new Map();
            return {
              define: function define(name, value) {
                current.set(name, value);
                return this;
              },
              done: function done() {
                return current.size > 0 ? new PopulatedScope(current) : BindingScope$1.empty;
              }
            };
          }
        }]);

        return BindingScope$1;
      }();

      BindingScope$1.missing = {};
      BindingScope$1.empty = {
        resolve: function resolve(name) {
          return BindingScope$1.missing;
        }
      };

      var PopulatedScope = /*#__PURE__*/function (_BindingScope$) {
        _inherits(PopulatedScope, _BindingScope$);

        var _super115 = _createSuper(PopulatedScope);

        function PopulatedScope(bindings) {
          var _this293;

          _classCallCheck(this, PopulatedScope);

          _this293 = _super115.call(this);
          _this293.bindings = bindings;
          return _this293;
        }

        _createClass2(PopulatedScope, [{
          key: "resolve",
          value: function resolve(name) {
            return this.bindings.has(name) ? this.bindings.get(name) : BindingScope$1.missing;
          }
        }]);

        return PopulatedScope;
      }(BindingScope$1);

      function formatMetadataMessageChain(chain, advise) {
        var expanded = expandedMessage(chain.message, chain.context);
        var nesting = chain.symbol ? " in '".concat(chain.symbol.name, "'") : '';
        var message = "".concat(expanded).concat(nesting);
        var position = chain.position;
        var next = chain.next ? formatMetadataMessageChain(chain.next, advise) : advise ? {
          message: advise
        } : undefined;
        return {
          message: message,
          position: position,
          next: next ? [next] : undefined
        };
      }

      function formatMetadataError(e, context) {
        if (isMetadataError(e)) {
          // Produce a formatted version of the and leaving enough information in the original error
          // to recover the formatting information to eventually produce a diagnostic error message.
          var position = e.position;
          var chain = {
            message: "Error during template compile of '".concat(context.name, "'"),
            position: position,
            next: {
              message: e.message,
              next: e.chain,
              context: e.context,
              symbol: e.symbol
            }
          };
          var advise = e.advise || messageAdvise(e.message, e.context);
          return formattedError(formatMetadataMessageChain(chain, advise));
        }

        return e;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var AotSummaryResolver = /*#__PURE__*/function () {
        function AotSummaryResolver(host, staticSymbolCache) {
          _classCallCheck(this, AotSummaryResolver);

          this.host = host;
          this.staticSymbolCache = staticSymbolCache; // Note: this will only contain StaticSymbols without members!

          this.summaryCache = new Map();
          this.loadedFilePaths = new Map(); // Note: this will only contain StaticSymbols without members!

          this.importAs = new Map();
          this.knownFileNameToModuleNames = new Map();
        }

        _createClass2(AotSummaryResolver, [{
          key: "isLibraryFile",
          value: function isLibraryFile(filePath) {
            // Note: We need to strip the .ngfactory. file path,
            // so this method also works for generated files
            // (for which host.isSourceFile will always return false).
            return !this.host.isSourceFile(stripGeneratedFileSuffix(filePath));
          }
        }, {
          key: "toSummaryFileName",
          value: function toSummaryFileName(filePath, referringSrcFileName) {
            return this.host.toSummaryFileName(filePath, referringSrcFileName);
          }
        }, {
          key: "fromSummaryFileName",
          value: function fromSummaryFileName(fileName, referringLibFileName) {
            return this.host.fromSummaryFileName(fileName, referringLibFileName);
          }
        }, {
          key: "resolveSummary",
          value: function resolveSummary(staticSymbol) {
            var rootSymbol = staticSymbol.members.length ? this.staticSymbolCache.get(staticSymbol.filePath, staticSymbol.name) : staticSymbol;
            var summary = this.summaryCache.get(rootSymbol);

            if (!summary) {
              this._loadSummaryFile(staticSymbol.filePath);

              summary = this.summaryCache.get(staticSymbol);
            }

            return rootSymbol === staticSymbol && summary || null;
          }
        }, {
          key: "getSymbolsOf",
          value: function getSymbolsOf(filePath) {
            if (this._loadSummaryFile(filePath)) {
              return Array.from(this.summaryCache.keys()).filter(function (symbol) {
                return symbol.filePath === filePath;
              });
            }

            return null;
          }
        }, {
          key: "getImportAs",
          value: function getImportAs(staticSymbol) {
            staticSymbol.assertNoMembers();
            return this.importAs.get(staticSymbol);
          }
          /**
           * Converts a file path to a module name that can be used as an `import`.
           */

        }, {
          key: "getKnownModuleName",
          value: function getKnownModuleName(importedFilePath) {
            return this.knownFileNameToModuleNames.get(importedFilePath) || null;
          }
        }, {
          key: "addSummary",
          value: function addSummary(summary) {
            this.summaryCache.set(summary.symbol, summary);
          }
        }, {
          key: "_loadSummaryFile",
          value: function _loadSummaryFile(filePath) {
            var _this294 = this;

            var hasSummary = this.loadedFilePaths.get(filePath);

            if (hasSummary != null) {
              return hasSummary;
            }

            var json = null;

            if (this.isLibraryFile(filePath)) {
              var summaryFilePath = summaryFileName(filePath);

              try {
                json = this.host.loadSummary(summaryFilePath);
              } catch (e) {
                console.error("Error loading summary file ".concat(summaryFilePath));
                throw e;
              }
            }

            hasSummary = json != null;
            this.loadedFilePaths.set(filePath, hasSummary);

            if (json) {
              var _deserializeSummaries = deserializeSummaries(this.staticSymbolCache, this, filePath, json),
                  moduleName = _deserializeSummaries.moduleName,
                  summaries = _deserializeSummaries.summaries,
                  importAs = _deserializeSummaries.importAs;

              summaries.forEach(function (summary) {
                return _this294.summaryCache.set(summary.symbol, summary);
              });

              if (moduleName) {
                this.knownFileNameToModuleNames.set(filePath, moduleName);
              }

              importAs.forEach(function (importAs) {
                _this294.importAs.set(importAs.symbol, importAs.importAs);
              });
            }

            return hasSummary;
          }
        }]);

        return AotSummaryResolver;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function createAotUrlResolver(host) {
        return {
          resolve: function resolve(basePath, url) {
            var filePath = host.resourceNameToFileName(url, basePath);

            if (!filePath) {
              throw syntaxError("Couldn't resolve resource ".concat(url, " from ").concat(basePath));
            }

            return filePath;
          }
        };
      }
      /**
       * Creates a new AotCompiler based on options and a host.
       */


      function createAotCompiler(compilerHost, options, errorCollector) {
        var translations = options.translations || '';
        var urlResolver = createAotUrlResolver(compilerHost);
        var symbolCache = new StaticSymbolCache();
        var summaryResolver = new AotSummaryResolver(compilerHost, symbolCache);
        var symbolResolver = new StaticSymbolResolver(compilerHost, symbolCache, summaryResolver);
        var staticReflector = new StaticReflector(summaryResolver, symbolResolver, [], [], errorCollector);
        var htmlParser;

        if (!!options.enableIvy) {
          // Ivy handles i18n at the compiler level so we must use a regular parser
          htmlParser = new HtmlParser();
        } else {
          htmlParser = new I18NHtmlParser(new HtmlParser(), translations, options.i18nFormat, options.missingTranslation, console);
        }

        var config = new CompilerConfig({
          defaultEncapsulation: ViewEncapsulation.Emulated,
          useJit: false,
          missingTranslation: options.missingTranslation,
          preserveWhitespaces: options.preserveWhitespaces,
          strictInjectionParameters: options.strictInjectionParameters
        });
        var normalizer = new DirectiveNormalizer({
          get: function get(url) {
            return compilerHost.loadResource(url);
          }
        }, urlResolver, htmlParser, config);
        var expressionParser = new Parser$1(new Lexer());
        var elementSchemaRegistry = new DomElementSchemaRegistry();
        var tmplParser = new TemplateParser(config, staticReflector, expressionParser, elementSchemaRegistry, htmlParser, console, []);
        var resolver = new CompileMetadataResolver(config, htmlParser, new NgModuleResolver(staticReflector), new DirectiveResolver(staticReflector), new PipeResolver(staticReflector), summaryResolver, elementSchemaRegistry, normalizer, console, symbolCache, staticReflector, errorCollector); // TODO(vicb): do not pass options.i18nFormat here

        var viewCompiler = new ViewCompiler(staticReflector);
        var typeCheckCompiler = new TypeCheckCompiler(options, staticReflector);
        var compiler = new AotCompiler(config, options, compilerHost, staticReflector, resolver, tmplParser, new StyleCompiler(urlResolver), viewCompiler, typeCheckCompiler, new NgModuleCompiler(staticReflector), new InjectableCompiler(staticReflector, !!options.enableIvy), new TypeScriptEmitter(), summaryResolver, symbolResolver);
        return {
          compiler: compiler,
          reflector: staticReflector
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var SummaryResolver = function SummaryResolver() {
        _classCallCheck(this, SummaryResolver);
      };

      var JitSummaryResolver = /*#__PURE__*/function () {
        function JitSummaryResolver() {
          _classCallCheck(this, JitSummaryResolver);

          this._summaries = new Map();
        }

        _createClass2(JitSummaryResolver, [{
          key: "isLibraryFile",
          value: function isLibraryFile() {
            return false;
          }
        }, {
          key: "toSummaryFileName",
          value: function toSummaryFileName(fileName) {
            return fileName;
          }
        }, {
          key: "fromSummaryFileName",
          value: function fromSummaryFileName(fileName) {
            return fileName;
          }
        }, {
          key: "resolveSummary",
          value: function resolveSummary(reference) {
            return this._summaries.get(reference) || null;
          }
        }, {
          key: "getSymbolsOf",
          value: function getSymbolsOf() {
            return [];
          }
        }, {
          key: "getImportAs",
          value: function getImportAs(reference) {
            return reference;
          }
        }, {
          key: "getKnownModuleName",
          value: function getKnownModuleName(fileName) {
            return null;
          }
        }, {
          key: "addSummary",
          value: function addSummary(summary) {
            this._summaries.set(summary.symbol, summary);
          }
        }]);

        return JitSummaryResolver;
      }();

      function interpretStatements(statements, reflector) {
        var ctx = new _ExecutionContext(null, null, null, new Map());
        var visitor = new StatementInterpreter(reflector);
        visitor.visitAllStatements(statements, ctx);
        var result = {};
        ctx.exports.forEach(function (exportName) {
          result[exportName] = ctx.vars.get(exportName);
        });
        return result;
      }

      function _executeFunctionStatements(varNames, varValues, statements, ctx, visitor) {
        var childCtx = ctx.createChildWihtLocalVars();

        for (var i = 0; i < varNames.length; i++) {
          childCtx.vars.set(varNames[i], varValues[i]);
        }

        var result = visitor.visitAllStatements(statements, childCtx);
        return result ? result.value : null;
      }

      var _ExecutionContext = /*#__PURE__*/function () {
        function _ExecutionContext(parent, instance, className, vars) {
          _classCallCheck(this, _ExecutionContext);

          this.parent = parent;
          this.instance = instance;
          this.className = className;
          this.vars = vars;
          this.exports = [];
        }

        _createClass2(_ExecutionContext, [{
          key: "createChildWihtLocalVars",
          value: function createChildWihtLocalVars() {
            return new _ExecutionContext(this, this.instance, this.className, new Map());
          }
        }]);

        return _ExecutionContext;
      }();

      var ReturnValue = function ReturnValue(value) {
        _classCallCheck(this, ReturnValue);

        this.value = value;
      };

      function createDynamicClass(_classStmt, _ctx, _visitor) {
        var propertyDescriptors = {};

        _classStmt.getters.forEach(function (getter) {
          // Note: use `function` instead of arrow function to capture `this`
          propertyDescriptors[getter.name] = {
            configurable: false,
            get: function get() {
              var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);
              return _executeFunctionStatements([], [], getter.body, instanceCtx, _visitor);
            }
          };
        });

        _classStmt.methods.forEach(function (method) {
          var paramNames = method.params.map(function (param) {
            return param.name;
          }); // Note: use `function` instead of arrow function to capture `this`

          propertyDescriptors[method.name] = {
            writable: false,
            configurable: false,
            value: function value() {
              var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);

              for (var _len7 = arguments.length, args = new Array(_len7), _key8 = 0; _key8 < _len7; _key8++) {
                args[_key8] = arguments[_key8];
              }

              return _executeFunctionStatements(paramNames, args, method.body, instanceCtx, _visitor);
            }
          };
        });

        var ctorParamNames = _classStmt.constructorMethod.params.map(function (param) {
          return param.name;
        }); // Note: use `function` instead of arrow function to capture `this`


        var ctor = function ctor() {
          var _this295 = this;

          var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);

          _classStmt.fields.forEach(function (field) {
            _this295[field.name] = undefined;
          });

          for (var _len8 = arguments.length, args = new Array(_len8), _key9 = 0; _key9 < _len8; _key9++) {
            args[_key9] = arguments[_key9];
          }

          _executeFunctionStatements(ctorParamNames, args, _classStmt.constructorMethod.body, instanceCtx, _visitor);
        };

        var superClass = _classStmt.parent ? _classStmt.parent.visitExpression(_visitor, _ctx) : Object;
        ctor.prototype = Object.create(superClass.prototype, propertyDescriptors);
        return ctor;
      }

      var StatementInterpreter = /*#__PURE__*/function () {
        function StatementInterpreter(reflector) {
          _classCallCheck(this, StatementInterpreter);

          this.reflector = reflector;
        }

        _createClass2(StatementInterpreter, [{
          key: "debugAst",
          value: function debugAst(ast) {
            return debugOutputAstAsTypeScript(ast);
          }
        }, {
          key: "visitDeclareVarStmt",
          value: function visitDeclareVarStmt(stmt, ctx) {
            var initialValue = stmt.value ? stmt.value.visitExpression(this, ctx) : undefined;
            ctx.vars.set(stmt.name, initialValue);

            if (stmt.hasModifier(StmtModifier.Exported)) {
              ctx.exports.push(stmt.name);
            }

            return null;
          }
        }, {
          key: "visitWriteVarExpr",
          value: function visitWriteVarExpr(expr, ctx) {
            var value = expr.value.visitExpression(this, ctx);
            var currCtx = ctx;

            while (currCtx != null) {
              if (currCtx.vars.has(expr.name)) {
                currCtx.vars.set(expr.name, value);
                return value;
              }

              currCtx = currCtx.parent;
            }

            throw new Error("Not declared variable ".concat(expr.name));
          }
        }, {
          key: "visitWrappedNodeExpr",
          value: function visitWrappedNodeExpr(ast, ctx) {
            throw new Error('Cannot interpret a WrappedNodeExpr.');
          }
        }, {
          key: "visitTypeofExpr",
          value: function visitTypeofExpr(ast, ctx) {
            throw new Error('Cannot interpret a TypeofExpr');
          }
        }, {
          key: "visitReadVarExpr",
          value: function visitReadVarExpr(ast, ctx) {
            var varName = ast.name;

            if (ast.builtin != null) {
              switch (ast.builtin) {
                case BuiltinVar.Super:
                  return Object.getPrototypeOf(ctx.instance);

                case BuiltinVar.This:
                  return ctx.instance;

                case BuiltinVar.CatchError:
                  varName = CATCH_ERROR_VAR$2;
                  break;

                case BuiltinVar.CatchStack:
                  varName = CATCH_STACK_VAR$2;
                  break;

                default:
                  throw new Error("Unknown builtin variable ".concat(ast.builtin));
              }
            }

            var currCtx = ctx;

            while (currCtx != null) {
              if (currCtx.vars.has(varName)) {
                return currCtx.vars.get(varName);
              }

              currCtx = currCtx.parent;
            }

            throw new Error("Not declared variable ".concat(varName));
          }
        }, {
          key: "visitWriteKeyExpr",
          value: function visitWriteKeyExpr(expr, ctx) {
            var receiver = expr.receiver.visitExpression(this, ctx);
            var index = expr.index.visitExpression(this, ctx);
            var value = expr.value.visitExpression(this, ctx);
            receiver[index] = value;
            return value;
          }
        }, {
          key: "visitWritePropExpr",
          value: function visitWritePropExpr(expr, ctx) {
            var receiver = expr.receiver.visitExpression(this, ctx);
            var value = expr.value.visitExpression(this, ctx);
            receiver[expr.name] = value;
            return value;
          }
        }, {
          key: "visitInvokeMethodExpr",
          value: function visitInvokeMethodExpr(expr, ctx) {
            var receiver = expr.receiver.visitExpression(this, ctx);
            var args = this.visitAllExpressions(expr.args, ctx);
            var result;

            if (expr.builtin != null) {
              switch (expr.builtin) {
                case BuiltinMethod.ConcatArray:
                  result = receiver.concat.apply(receiver, _toConsumableArray(args));
                  break;

                case BuiltinMethod.SubscribeObservable:
                  result = receiver.subscribe({
                    next: args[0]
                  });
                  break;

                case BuiltinMethod.Bind:
                  result = receiver.bind.apply(receiver, _toConsumableArray(args));
                  break;

                default:
                  throw new Error("Unknown builtin method ".concat(expr.builtin));
              }
            } else {
              result = receiver[expr.name].apply(receiver, args);
            }

            return result;
          }
        }, {
          key: "visitInvokeFunctionExpr",
          value: function visitInvokeFunctionExpr(stmt, ctx) {
            var args = this.visitAllExpressions(stmt.args, ctx);
            var fnExpr = stmt.fn;

            if (fnExpr instanceof ReadVarExpr && fnExpr.builtin === BuiltinVar.Super) {
              ctx.instance.constructor.prototype.constructor.apply(ctx.instance, args);
              return null;
            } else {
              var _fn = stmt.fn.visitExpression(this, ctx);

              return _fn.apply(null, args);
            }
          }
        }, {
          key: "visitReturnStmt",
          value: function visitReturnStmt(stmt, ctx) {
            return new ReturnValue(stmt.value.visitExpression(this, ctx));
          }
        }, {
          key: "visitDeclareClassStmt",
          value: function visitDeclareClassStmt(stmt, ctx) {
            var clazz = createDynamicClass(stmt, ctx, this);
            ctx.vars.set(stmt.name, clazz);

            if (stmt.hasModifier(StmtModifier.Exported)) {
              ctx.exports.push(stmt.name);
            }

            return null;
          }
        }, {
          key: "visitExpressionStmt",
          value: function visitExpressionStmt(stmt, ctx) {
            return stmt.expr.visitExpression(this, ctx);
          }
        }, {
          key: "visitIfStmt",
          value: function visitIfStmt(stmt, ctx) {
            var condition = stmt.condition.visitExpression(this, ctx);

            if (condition) {
              return this.visitAllStatements(stmt.trueCase, ctx);
            } else if (stmt.falseCase != null) {
              return this.visitAllStatements(stmt.falseCase, ctx);
            }

            return null;
          }
        }, {
          key: "visitTryCatchStmt",
          value: function visitTryCatchStmt(stmt, ctx) {
            try {
              return this.visitAllStatements(stmt.bodyStmts, ctx);
            } catch (e) {
              var childCtx = ctx.createChildWihtLocalVars();
              childCtx.vars.set(CATCH_ERROR_VAR$2, e);
              childCtx.vars.set(CATCH_STACK_VAR$2, e.stack);
              return this.visitAllStatements(stmt.catchStmts, childCtx);
            }
          }
        }, {
          key: "visitThrowStmt",
          value: function visitThrowStmt(stmt, ctx) {
            throw stmt.error.visitExpression(this, ctx);
          }
        }, {
          key: "visitInstantiateExpr",
          value: function visitInstantiateExpr(ast, ctx) {
            var args = this.visitAllExpressions(ast.args, ctx);
            var clazz = ast.classExpr.visitExpression(this, ctx);
            return _construct(clazz, _toConsumableArray(args));
          }
        }, {
          key: "visitLiteralExpr",
          value: function visitLiteralExpr(ast, ctx) {
            return ast.value;
          }
        }, {
          key: "visitLocalizedString",
          value: function visitLocalizedString(ast, context) {
            return null;
          }
        }, {
          key: "visitExternalExpr",
          value: function visitExternalExpr(ast, ctx) {
            return this.reflector.resolveExternalReference(ast.value);
          }
        }, {
          key: "visitConditionalExpr",
          value: function visitConditionalExpr(ast, ctx) {
            if (ast.condition.visitExpression(this, ctx)) {
              return ast.trueCase.visitExpression(this, ctx);
            } else if (ast.falseCase != null) {
              return ast.falseCase.visitExpression(this, ctx);
            }

            return null;
          }
        }, {
          key: "visitNotExpr",
          value: function visitNotExpr(ast, ctx) {
            return !ast.condition.visitExpression(this, ctx);
          }
        }, {
          key: "visitAssertNotNullExpr",
          value: function visitAssertNotNullExpr(ast, ctx) {
            return ast.condition.visitExpression(this, ctx);
          }
        }, {
          key: "visitCastExpr",
          value: function visitCastExpr(ast, ctx) {
            return ast.value.visitExpression(this, ctx);
          }
        }, {
          key: "visitFunctionExpr",
          value: function visitFunctionExpr(ast, ctx) {
            var paramNames = ast.params.map(function (param) {
              return param.name;
            });
            return _declareFn(paramNames, ast.statements, ctx, this);
          }
        }, {
          key: "visitDeclareFunctionStmt",
          value: function visitDeclareFunctionStmt(stmt, ctx) {
            var paramNames = stmt.params.map(function (param) {
              return param.name;
            });
            ctx.vars.set(stmt.name, _declareFn(paramNames, stmt.statements, ctx, this));

            if (stmt.hasModifier(StmtModifier.Exported)) {
              ctx.exports.push(stmt.name);
            }

            return null;
          }
        }, {
          key: "visitUnaryOperatorExpr",
          value: function visitUnaryOperatorExpr(ast, ctx) {
            var _this296 = this;

            var rhs = function rhs() {
              return ast.expr.visitExpression(_this296, ctx);
            };

            switch (ast.operator) {
              case UnaryOperator.Plus:
                return +rhs();

              case UnaryOperator.Minus:
                return -rhs();

              default:
                throw new Error("Unknown operator ".concat(ast.operator));
            }
          }
        }, {
          key: "visitBinaryOperatorExpr",
          value: function visitBinaryOperatorExpr(ast, ctx) {
            var _this297 = this;

            var lhs = function lhs() {
              return ast.lhs.visitExpression(_this297, ctx);
            };

            var rhs = function rhs() {
              return ast.rhs.visitExpression(_this297, ctx);
            };

            switch (ast.operator) {
              case BinaryOperator.Equals:
                return lhs() == rhs();

              case BinaryOperator.Identical:
                return lhs() === rhs();

              case BinaryOperator.NotEquals:
                return lhs() != rhs();

              case BinaryOperator.NotIdentical:
                return lhs() !== rhs();

              case BinaryOperator.And:
                return lhs() && rhs();

              case BinaryOperator.Or:
                return lhs() || rhs();

              case BinaryOperator.Plus:
                return lhs() + rhs();

              case BinaryOperator.Minus:
                return lhs() - rhs();

              case BinaryOperator.Divide:
                return lhs() / rhs();

              case BinaryOperator.Multiply:
                return lhs() * rhs();

              case BinaryOperator.Modulo:
                return lhs() % rhs();

              case BinaryOperator.Lower:
                return lhs() < rhs();

              case BinaryOperator.LowerEquals:
                return lhs() <= rhs();

              case BinaryOperator.Bigger:
                return lhs() > rhs();

              case BinaryOperator.BiggerEquals:
                return lhs() >= rhs();

              default:
                throw new Error("Unknown operator ".concat(ast.operator));
            }
          }
        }, {
          key: "visitReadPropExpr",
          value: function visitReadPropExpr(ast, ctx) {
            var result;
            var receiver = ast.receiver.visitExpression(this, ctx);
            result = receiver[ast.name];
            return result;
          }
        }, {
          key: "visitReadKeyExpr",
          value: function visitReadKeyExpr(ast, ctx) {
            var receiver = ast.receiver.visitExpression(this, ctx);
            var prop = ast.index.visitExpression(this, ctx);
            return receiver[prop];
          }
        }, {
          key: "visitLiteralArrayExpr",
          value: function visitLiteralArrayExpr(ast, ctx) {
            return this.visitAllExpressions(ast.entries, ctx);
          }
        }, {
          key: "visitLiteralMapExpr",
          value: function visitLiteralMapExpr(ast, ctx) {
            var _this298 = this;

            var result = {};
            ast.entries.forEach(function (entry) {
              return result[entry.key] = entry.value.visitExpression(_this298, ctx);
            });
            return result;
          }
        }, {
          key: "visitCommaExpr",
          value: function visitCommaExpr(ast, context) {
            var values = this.visitAllExpressions(ast.parts, context);
            return values[values.length - 1];
          }
        }, {
          key: "visitAllExpressions",
          value: function visitAllExpressions(expressions, ctx) {
            var _this299 = this;

            return expressions.map(function (expr) {
              return expr.visitExpression(_this299, ctx);
            });
          }
        }, {
          key: "visitAllStatements",
          value: function visitAllStatements(statements, ctx) {
            for (var i = 0; i < statements.length; i++) {
              var stmt = statements[i];
              var val = stmt.visitStatement(this, ctx);

              if (val instanceof ReturnValue) {
                return val;
              }
            }

            return null;
          }
        }]);

        return StatementInterpreter;
      }();

      function _declareFn(varNames, statements, ctx, visitor) {
        return function () {
          for (var _len9 = arguments.length, args = new Array(_len9), _key10 = 0; _key10 < _len9; _key10++) {
            args[_key10] = arguments[_key10];
          }

          return _executeFunctionStatements(varNames, args, statements, ctx, visitor);
        };
      }

      var CATCH_ERROR_VAR$2 = 'error';
      var CATCH_STACK_VAR$2 = 'stack';
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * An internal module of the Angular compiler that begins with component types,
       * extracts templates, and eventually produces a compiled version of the component
       * ready for linking into an application.
       *
       * @security  When compiling templates at runtime, you must ensure that the entire template comes
       * from a trusted source. Attacker-controlled data introduced by a template could expose your
       * application to XSS risks.  For more detail, see the [Security Guide](https://g.co/ng/security).
       */

      var JitCompiler = /*#__PURE__*/function () {
        function JitCompiler(_metadataResolver, _templateParser, _styleCompiler, _viewCompiler, _ngModuleCompiler, _summaryResolver, _reflector, _jitEvaluator, _compilerConfig, _console, getExtraNgModuleProviders) {
          _classCallCheck(this, JitCompiler);

          this._metadataResolver = _metadataResolver;
          this._templateParser = _templateParser;
          this._styleCompiler = _styleCompiler;
          this._viewCompiler = _viewCompiler;
          this._ngModuleCompiler = _ngModuleCompiler;
          this._summaryResolver = _summaryResolver;
          this._reflector = _reflector;
          this._jitEvaluator = _jitEvaluator;
          this._compilerConfig = _compilerConfig;
          this._console = _console;
          this.getExtraNgModuleProviders = getExtraNgModuleProviders;
          this._compiledTemplateCache = new Map();
          this._compiledHostTemplateCache = new Map();
          this._compiledDirectiveWrapperCache = new Map();
          this._compiledNgModuleCache = new Map();
          this._sharedStylesheetCount = 0;
          this._addedAotSummaries = new Set();
        }

        _createClass2(JitCompiler, [{
          key: "compileModuleSync",
          value: function compileModuleSync(moduleType) {
            return SyncAsync.assertSync(this._compileModuleAndComponents(moduleType, true));
          }
        }, {
          key: "compileModuleAsync",
          value: function compileModuleAsync(moduleType) {
            return Promise.resolve(this._compileModuleAndComponents(moduleType, false));
          }
        }, {
          key: "compileModuleAndAllComponentsSync",
          value: function compileModuleAndAllComponentsSync(moduleType) {
            return SyncAsync.assertSync(this._compileModuleAndAllComponents(moduleType, true));
          }
        }, {
          key: "compileModuleAndAllComponentsAsync",
          value: function compileModuleAndAllComponentsAsync(moduleType) {
            return Promise.resolve(this._compileModuleAndAllComponents(moduleType, false));
          }
        }, {
          key: "getComponentFactory",
          value: function getComponentFactory(component) {
            var summary = this._metadataResolver.getDirectiveSummary(component);

            return summary.componentFactory;
          }
        }, {
          key: "loadAotSummaries",
          value: function loadAotSummaries(summaries) {
            this.clearCache();

            this._addAotSummaries(summaries);
          }
        }, {
          key: "_addAotSummaries",
          value: function _addAotSummaries(fn) {
            if (this._addedAotSummaries.has(fn)) {
              return;
            }

            this._addedAotSummaries.add(fn);

            var summaries = fn();

            for (var i = 0; i < summaries.length; i++) {
              var entry = summaries[i];

              if (typeof entry === 'function') {
                this._addAotSummaries(entry);
              } else {
                var summary = entry;

                this._summaryResolver.addSummary({
                  symbol: summary.type.reference,
                  metadata: null,
                  type: summary
                });
              }
            }
          }
        }, {
          key: "hasAotSummary",
          value: function hasAotSummary(ref) {
            return !!this._summaryResolver.resolveSummary(ref);
          }
        }, {
          key: "_filterJitIdentifiers",
          value: function _filterJitIdentifiers(ids) {
            var _this300 = this;

            return ids.map(function (mod) {
              return mod.reference;
            }).filter(function (ref) {
              return !_this300.hasAotSummary(ref);
            });
          }
        }, {
          key: "_compileModuleAndComponents",
          value: function _compileModuleAndComponents(moduleType, isSync) {
            var _this301 = this;

            return SyncAsync.then(this._loadModules(moduleType, isSync), function () {
              _this301._compileComponents(moduleType, null);

              return _this301._compileModule(moduleType);
            });
          }
        }, {
          key: "_compileModuleAndAllComponents",
          value: function _compileModuleAndAllComponents(moduleType, isSync) {
            var _this302 = this;

            return SyncAsync.then(this._loadModules(moduleType, isSync), function () {
              var componentFactories = [];

              _this302._compileComponents(moduleType, componentFactories);

              return {
                ngModuleFactory: _this302._compileModule(moduleType),
                componentFactories: componentFactories
              };
            });
          }
        }, {
          key: "_loadModules",
          value: function _loadModules(mainModule, isSync) {
            var _this303 = this;

            var loading = [];

            var mainNgModule = this._metadataResolver.getNgModuleMetadata(mainModule); // Note: for runtime compilation, we want to transitively compile all modules,
            // so we also need to load the declared directives / pipes for all nested modules.


            this._filterJitIdentifiers(mainNgModule.transitiveModule.modules).forEach(function (nestedNgModule) {
              // getNgModuleMetadata only returns null if the value passed in is not an NgModule
              var moduleMeta = _this303._metadataResolver.getNgModuleMetadata(nestedNgModule);

              _this303._filterJitIdentifiers(moduleMeta.declaredDirectives).forEach(function (ref) {
                var promise = _this303._metadataResolver.loadDirectiveMetadata(moduleMeta.type.reference, ref, isSync);

                if (promise) {
                  loading.push(promise);
                }
              });

              _this303._filterJitIdentifiers(moduleMeta.declaredPipes).forEach(function (ref) {
                return _this303._metadataResolver.getOrLoadPipeMetadata(ref);
              });
            });

            return SyncAsync.all(loading);
          }
        }, {
          key: "_compileModule",
          value: function _compileModule(moduleType) {
            var ngModuleFactory = this._compiledNgModuleCache.get(moduleType);

            if (!ngModuleFactory) {
              var moduleMeta = this._metadataResolver.getNgModuleMetadata(moduleType); // Always provide a bound Compiler


              var extraProviders = this.getExtraNgModuleProviders(moduleMeta.type.reference);
              var outputCtx = createOutputContext();

              var compileResult = this._ngModuleCompiler.compile(outputCtx, moduleMeta, extraProviders);

              ngModuleFactory = this._interpretOrJit(ngModuleJitUrl(moduleMeta), outputCtx.statements)[compileResult.ngModuleFactoryVar];

              this._compiledNgModuleCache.set(moduleMeta.type.reference, ngModuleFactory);
            }

            return ngModuleFactory;
          }
          /**
           * @internal
           */

        }, {
          key: "_compileComponents",
          value: function _compileComponents(mainModule, allComponentFactories) {
            var _this304 = this;

            var ngModule = this._metadataResolver.getNgModuleMetadata(mainModule);

            var moduleByJitDirective = new Map();
            var templates = new Set();

            var transJitModules = this._filterJitIdentifiers(ngModule.transitiveModule.modules);

            transJitModules.forEach(function (localMod) {
              var localModuleMeta = _this304._metadataResolver.getNgModuleMetadata(localMod);

              _this304._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach(function (dirRef) {
                moduleByJitDirective.set(dirRef, localModuleMeta);

                var dirMeta = _this304._metadataResolver.getDirectiveMetadata(dirRef);

                if (dirMeta.isComponent) {
                  templates.add(_this304._createCompiledTemplate(dirMeta, localModuleMeta));

                  if (allComponentFactories) {
                    var template = _this304._createCompiledHostTemplate(dirMeta.type.reference, localModuleMeta);

                    templates.add(template);
                    allComponentFactories.push(dirMeta.componentFactory);
                  }
                }
              });
            });
            transJitModules.forEach(function (localMod) {
              var localModuleMeta = _this304._metadataResolver.getNgModuleMetadata(localMod);

              _this304._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach(function (dirRef) {
                var dirMeta = _this304._metadataResolver.getDirectiveMetadata(dirRef);

                if (dirMeta.isComponent) {
                  dirMeta.entryComponents.forEach(function (entryComponentType) {
                    var moduleMeta = moduleByJitDirective.get(entryComponentType.componentType);
                    templates.add(_this304._createCompiledHostTemplate(entryComponentType.componentType, moduleMeta));
                  });
                }
              });

              localModuleMeta.entryComponents.forEach(function (entryComponentType) {
                if (!_this304.hasAotSummary(entryComponentType.componentType)) {
                  var moduleMeta = moduleByJitDirective.get(entryComponentType.componentType);
                  templates.add(_this304._createCompiledHostTemplate(entryComponentType.componentType, moduleMeta));
                }
              });
            });
            templates.forEach(function (template) {
              return _this304._compileTemplate(template);
            });
          }
        }, {
          key: "clearCacheFor",
          value: function clearCacheFor(type) {
            this._compiledNgModuleCache["delete"](type);

            this._metadataResolver.clearCacheFor(type);

            this._compiledHostTemplateCache["delete"](type);

            var compiledTemplate = this._compiledTemplateCache.get(type);

            if (compiledTemplate) {
              this._compiledTemplateCache["delete"](type);
            }
          }
        }, {
          key: "clearCache",
          value: function clearCache() {
            // Note: don't clear the _addedAotSummaries, as they don't change!
            this._metadataResolver.clearCache();

            this._compiledTemplateCache.clear();

            this._compiledHostTemplateCache.clear();

            this._compiledNgModuleCache.clear();
          }
        }, {
          key: "_createCompiledHostTemplate",
          value: function _createCompiledHostTemplate(compType, ngModule) {
            if (!ngModule) {
              throw new Error("Component ".concat(stringify(compType), " is not part of any NgModule or the module has not been imported into your module."));
            }

            var compiledTemplate = this._compiledHostTemplateCache.get(compType);

            if (!compiledTemplate) {
              var compMeta = this._metadataResolver.getDirectiveMetadata(compType);

              assertComponent(compMeta);

              var hostMeta = this._metadataResolver.getHostComponentMetadata(compMeta, compMeta.componentFactory.viewDefFactory);

              compiledTemplate = new CompiledTemplate(true, compMeta.type, hostMeta, ngModule, [compMeta.type]);

              this._compiledHostTemplateCache.set(compType, compiledTemplate);
            }

            return compiledTemplate;
          }
        }, {
          key: "_createCompiledTemplate",
          value: function _createCompiledTemplate(compMeta, ngModule) {
            var compiledTemplate = this._compiledTemplateCache.get(compMeta.type.reference);

            if (!compiledTemplate) {
              assertComponent(compMeta);
              compiledTemplate = new CompiledTemplate(false, compMeta.type, compMeta, ngModule, ngModule.transitiveModule.directives);

              this._compiledTemplateCache.set(compMeta.type.reference, compiledTemplate);
            }

            return compiledTemplate;
          }
        }, {
          key: "_compileTemplate",
          value: function _compileTemplate(template) {
            var _this305 = this;

            if (template.isCompiled) {
              return;
            }

            var compMeta = template.compMeta;
            var externalStylesheetsByModuleUrl = new Map();
            var outputContext = createOutputContext();

            var componentStylesheet = this._styleCompiler.compileComponent(outputContext, compMeta);

            compMeta.template.externalStylesheets.forEach(function (stylesheetMeta) {
              var compiledStylesheet = _this305._styleCompiler.compileStyles(createOutputContext(), compMeta, stylesheetMeta);

              externalStylesheetsByModuleUrl.set(stylesheetMeta.moduleUrl, compiledStylesheet);
            });

            this._resolveStylesCompileResult(componentStylesheet, externalStylesheetsByModuleUrl);

            var pipes = template.ngModule.transitiveModule.pipes.map(function (pipe) {
              return _this305._metadataResolver.getPipeSummary(pipe.reference);
            });

            var _this$_parseTemplate3 = this._parseTemplate(compMeta, template.ngModule, template.directives),
                parsedTemplate = _this$_parseTemplate3.template,
                usedPipes = _this$_parseTemplate3.pipes;

            var compileResult = this._viewCompiler.compileComponent(outputContext, compMeta, parsedTemplate, variable(componentStylesheet.stylesVar), usedPipes);

            var evalResult = this._interpretOrJit(templateJitUrl(template.ngModule.type, template.compMeta), outputContext.statements);

            var viewClass = evalResult[compileResult.viewClassVar];
            var rendererType = evalResult[compileResult.rendererTypeVar];
            template.compiled(viewClass, rendererType);
          }
        }, {
          key: "_parseTemplate",
          value: function _parseTemplate(compMeta, ngModule, directiveIdentifiers) {
            var _this306 = this;

            // Note: ! is ok here as components always have a template.
            var preserveWhitespaces = compMeta.template.preserveWhitespaces;
            var directives = directiveIdentifiers.map(function (dir) {
              return _this306._metadataResolver.getDirectiveSummary(dir.reference);
            });
            var pipes = ngModule.transitiveModule.pipes.map(function (pipe) {
              return _this306._metadataResolver.getPipeSummary(pipe.reference);
            });
            return this._templateParser.parse(compMeta, compMeta.template.htmlAst, directives, pipes, ngModule.schemas, templateSourceUrl(ngModule.type, compMeta, compMeta.template), preserveWhitespaces);
          }
        }, {
          key: "_resolveStylesCompileResult",
          value: function _resolveStylesCompileResult(result, externalStylesheetsByModuleUrl) {
            var _this307 = this;

            result.dependencies.forEach(function (dep, i) {
              var nestedCompileResult = externalStylesheetsByModuleUrl.get(dep.moduleUrl);

              var nestedStylesArr = _this307._resolveAndEvalStylesCompileResult(nestedCompileResult, externalStylesheetsByModuleUrl);

              dep.setValue(nestedStylesArr);
            });
          }
        }, {
          key: "_resolveAndEvalStylesCompileResult",
          value: function _resolveAndEvalStylesCompileResult(result, externalStylesheetsByModuleUrl) {
            this._resolveStylesCompileResult(result, externalStylesheetsByModuleUrl);

            return this._interpretOrJit(sharedStylesheetJitUrl(result.meta, this._sharedStylesheetCount++), result.outputCtx.statements)[result.stylesVar];
          }
        }, {
          key: "_interpretOrJit",
          value: function _interpretOrJit(sourceUrl, statements) {
            if (!this._compilerConfig.useJit) {
              return interpretStatements(statements, this._reflector);
            } else {
              return this._jitEvaluator.evaluateStatements(sourceUrl, statements, this._reflector, this._compilerConfig.jitDevMode);
            }
          }
        }]);

        return JitCompiler;
      }();

      var CompiledTemplate = /*#__PURE__*/function () {
        function CompiledTemplate(isHost, compType, compMeta, ngModule, directives) {
          _classCallCheck(this, CompiledTemplate);

          this.isHost = isHost;
          this.compType = compType;
          this.compMeta = compMeta;
          this.ngModule = ngModule;
          this.directives = directives;
          this._viewClass = null;
          this.isCompiled = false;
        }

        _createClass2(CompiledTemplate, [{
          key: "compiled",
          value: function compiled(viewClass, rendererType) {
            this._viewClass = viewClass;
            this.compMeta.componentViewType.setDelegate(viewClass);

            for (var prop in rendererType) {
              this.compMeta.rendererType[prop] = rendererType[prop];
            }

            this.isCompiled = true;
          }
        }]);

        return CompiledTemplate;
      }();

      function assertComponent(meta) {
        if (!meta.isComponent) {
          throw new Error("Could not compile '".concat(identifierName(meta.type), "' because it is not a component."));
        }
      }

      function createOutputContext() {
        var importExpr$1 = function importExpr$1(symbol) {
          return importExpr({
            name: identifierName(symbol),
            moduleName: null,
            runtime: symbol
          });
        };

        return {
          statements: [],
          genFilePath: '',
          importExpr: importExpr$1,
          constantPool: new ConstantPool()
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Provides access to reflection data about symbols that the compiler needs.
       */


      var CompileReflector = function CompileReflector() {
        _classCallCheck(this, CompileReflector);
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Create a {@link UrlResolver} with no package prefix.
       */


      function createUrlResolverWithoutPackagePrefix() {
        return new UrlResolver();
      }

      function createOfflineCompileUrlResolver() {
        return new UrlResolver('.');
      }

      var UrlResolver = /*#__PURE__*/function () {
        function UrlResolverImpl() {
          var _packagePrefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;

          _classCallCheck(this, UrlResolverImpl);

          this._packagePrefix = _packagePrefix;
        }
        /**
         * Resolves the `url` given the `baseUrl`:
         * - when the `url` is null, the `baseUrl` is returned,
         * - if `url` is relative ('path/to/here', './path/to/here'), the resolved url is a combination of
         * `baseUrl` and `url`,
         * - if `url` is absolute (it has a scheme: 'http://', 'https://' or start with '/'), the `url` is
         * returned as is (ignoring the `baseUrl`)
         */


        _createClass2(UrlResolverImpl, [{
          key: "resolve",
          value: function resolve(baseUrl, url) {
            var resolvedUrl = url;

            if (baseUrl != null && baseUrl.length > 0) {
              resolvedUrl = _resolveUrl(baseUrl, resolvedUrl);
            }

            var resolvedParts = _split(resolvedUrl);

            var prefix = this._packagePrefix;

            if (prefix != null && resolvedParts != null && resolvedParts[_ComponentIndex.Scheme] == 'package') {
              var path = resolvedParts[_ComponentIndex.Path];
              prefix = prefix.replace(/\/+$/, '');
              path = path.replace(/^\/+/, '');
              return "".concat(prefix, "/").concat(path);
            }

            return resolvedUrl;
          }
        }]);

        return UrlResolverImpl;
      }();
      /**
       * Extract the scheme of a URL.
       */


      function getUrlScheme(url) {
        var match = _split(url);

        return match && match[_ComponentIndex.Scheme] || '';
      } // The code below is adapted from Traceur:
      // https://github.com/google/traceur-compiler/blob/9511c1dafa972bf0de1202a8a863bad02f0f95a8/src/runtime/url.js

      /**
       * Builds a URI string from already-encoded parts.
       *
       * No encoding is performed.  Any component may be omitted as either null or
       * undefined.
       *
       * @param opt_scheme The scheme such as 'http'.
       * @param opt_userInfo The user name before the '@'.
       * @param opt_domain The domain such as 'www.google.com', already
       *     URI-encoded.
       * @param opt_port The port number.
       * @param opt_path The path, already URI-encoded.  If it is not
       *     empty, it must begin with a slash.
       * @param opt_queryData The URI-encoded query data.
       * @param opt_fragment The URI-encoded fragment identifier.
       * @return The fully combined URI.
       */


      function _buildFromEncodedParts(opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_queryData, opt_fragment) {
        var out = [];

        if (opt_scheme != null) {
          out.push(opt_scheme + ':');
        }

        if (opt_domain != null) {
          out.push('//');

          if (opt_userInfo != null) {
            out.push(opt_userInfo + '@');
          }

          out.push(opt_domain);

          if (opt_port != null) {
            out.push(':' + opt_port);
          }
        }

        if (opt_path != null) {
          out.push(opt_path);
        }

        if (opt_queryData != null) {
          out.push('?' + opt_queryData);
        }

        if (opt_fragment != null) {
          out.push('#' + opt_fragment);
        }

        return out.join('');
      }
      /**
       * A regular expression for breaking a URI into its component parts.
       *
       * {@link https://tools.ietf.org/html/rfc3986#appendix-B} says
       * As the "first-match-wins" algorithm is identical to the "greedy"
       * disambiguation method used by POSIX regular expressions, it is natural and
       * commonplace to use a regular expression for parsing the potential five
       * components of a URI reference.
       *
       * The following line is the regular expression for breaking-down a
       * well-formed URI reference into its components.
       *
       * <pre>
       * ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
       *  12            3  4          5       6  7        8 9
       * </pre>
       *
       * The numbers in the second line above are only to assist readability; they
       * indicate the reference points for each subexpression (i.e., each paired
       * parenthesis). We refer to the value matched for subexpression <n> as $<n>.
       * For example, matching the above expression to
       * <pre>
       *     http://www.ics.uci.edu/pub/ietf/uri/#Related
       * </pre>
       * results in the following subexpression matches:
       * <pre>
       *    $1 = http:
       *    $2 = http
       *    $3 = //www.ics.uci.edu
       *    $4 = www.ics.uci.edu
       *    $5 = /pub/ietf/uri/
       *    $6 = <undefined>
       *    $7 = <undefined>
       *    $8 = #Related
       *    $9 = Related
       * </pre>
       * where <undefined> indicates that the component is not present, as is the
       * case for the query component in the above example. Therefore, we can
       * determine the value of the five components as
       * <pre>
       *    scheme    = $2
       *    authority = $4
       *    path      = $5
       *    query     = $7
       *    fragment  = $9
       * </pre>
       *
       * The regular expression has been modified slightly to expose the
       * userInfo, domain, and port separately from the authority.
       * The modified version yields
       * <pre>
       *    $1 = http              scheme
       *    $2 = <undefined>       userInfo -\
       *    $3 = www.ics.uci.edu   domain     | authority
       *    $4 = <undefined>       port     -/
       *    $5 = /pub/ietf/uri/    path
       *    $6 = <undefined>       query without ?
       *    $7 = Related           fragment without #
       * </pre>
       * @internal
       */


      var _splitRe = new RegExp('^' + '(?:' + '([^:/?#.]+)' + // scheme - ignore special characters
      // used by other URL parts such as :,
      // ?, /, #, and .
      ':)?' + '(?://' + '(?:([^/?#]*)@)?' + // userInfo
      "([\\w\\d\\-\\u0100-\\uffff.%]*)" + // domain - restrict to letters,
      // digits, dashes, dots, percent
      // escapes, and unicode characters.
      '(?::([0-9]+))?' + // port
      ')?' + '([^?#]+)?' + // path
      '(?:\\?([^#]*))?' + // query
      '(?:#(.*))?' + // fragment
      '$');
      /**
       * The index of each URI component in the return value of goog.uri.utils.split.
       * @enum {number}
       */


      var _ComponentIndex;

      (function (_ComponentIndex) {
        _ComponentIndex[_ComponentIndex["Scheme"] = 1] = "Scheme";
        _ComponentIndex[_ComponentIndex["UserInfo"] = 2] = "UserInfo";
        _ComponentIndex[_ComponentIndex["Domain"] = 3] = "Domain";
        _ComponentIndex[_ComponentIndex["Port"] = 4] = "Port";
        _ComponentIndex[_ComponentIndex["Path"] = 5] = "Path";
        _ComponentIndex[_ComponentIndex["QueryData"] = 6] = "QueryData";
        _ComponentIndex[_ComponentIndex["Fragment"] = 7] = "Fragment";
      })(_ComponentIndex || (_ComponentIndex = {}));
      /**
       * Splits a URI into its component parts.
       *
       * Each component can be accessed via the component indices; for example:
       * <pre>
       * goog.uri.utils.split(someStr)[goog.uri.utils.CompontentIndex.QUERY_DATA];
       * </pre>
       *
       * @param uri The URI string to examine.
       * @return Each component still URI-encoded.
       *     Each component that is present will contain the encoded value, whereas
       *     components that are not present will be undefined or empty, depending
       *     on the browser's regular expression implementation.  Never null, since
       *     arbitrary strings may still look like path names.
       */


      function _split(uri) {
        return uri.match(_splitRe);
      }
      /**
       * Removes dot segments in given path component, as described in
       * RFC 3986, section 5.2.4.
       *
       * @param path A non-empty path component.
       * @return Path component with removed dot segments.
       */


      function _removeDotSegments(path) {
        if (path == '/') return '/';
        var leadingSlash = path[0] == '/' ? '/' : '';
        var trailingSlash = path[path.length - 1] === '/' ? '/' : '';
        var segments = path.split('/');
        var out = [];
        var up = 0;

        for (var pos = 0; pos < segments.length; pos++) {
          var segment = segments[pos];

          switch (segment) {
            case '':
            case '.':
              break;

            case '..':
              if (out.length > 0) {
                out.pop();
              } else {
                up++;
              }

              break;

            default:
              out.push(segment);
          }
        }

        if (leadingSlash == '') {
          while (up-- > 0) {
            out.unshift('..');
          }

          if (out.length === 0) out.push('.');
        }

        return leadingSlash + out.join('/') + trailingSlash;
      }
      /**
       * Takes an array of the parts from split and canonicalizes the path part
       * and then joins all the parts.
       */


      function _joinAndCanonicalizePath(parts) {
        var path = parts[_ComponentIndex.Path];
        path = path == null ? '' : _removeDotSegments(path);
        parts[_ComponentIndex.Path] = path;
        return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);
      }
      /**
       * Resolves a URL.
       * @param base The URL acting as the base URL.
       * @param to The URL to resolve.
       */


      function _resolveUrl(base, url) {
        var parts = _split(encodeURI(url));

        var baseParts = _split(base);

        if (parts[_ComponentIndex.Scheme] != null) {
          return _joinAndCanonicalizePath(parts);
        } else {
          parts[_ComponentIndex.Scheme] = baseParts[_ComponentIndex.Scheme];
        }

        for (var i = _ComponentIndex.Scheme; i <= _ComponentIndex.Port; i++) {
          if (parts[i] == null) {
            parts[i] = baseParts[i];
          }
        }

        if (parts[_ComponentIndex.Path][0] == '/') {
          return _joinAndCanonicalizePath(parts);
        }

        var path = baseParts[_ComponentIndex.Path];
        if (path == null) path = '/';
        var index = path.lastIndexOf('/');
        path = path.substring(0, index + 1) + parts[_ComponentIndex.Path];
        parts[_ComponentIndex.Path] = path;
        return _joinAndCanonicalizePath(parts);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var Extractor = /*#__PURE__*/function () {
        function Extractor(host, staticSymbolResolver, messageBundle, metadataResolver) {
          _classCallCheck(this, Extractor);

          this.host = host;
          this.staticSymbolResolver = staticSymbolResolver;
          this.messageBundle = messageBundle;
          this.metadataResolver = metadataResolver;
        }

        _createClass2(Extractor, [{
          key: "extract",
          value: function extract(rootFiles) {
            var _this308 = this;

            var _analyzeAndValidateNg = analyzeAndValidateNgModules(rootFiles, this.host, this.staticSymbolResolver, this.metadataResolver),
                files = _analyzeAndValidateNg.files,
                ngModules = _analyzeAndValidateNg.ngModules;

            return Promise.all(ngModules.map(function (ngModule) {
              return _this308.metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false);
            })).then(function () {
              var errors = [];
              files.forEach(function (file) {
                var compMetas = [];
                file.directives.forEach(function (directiveType) {
                  var dirMeta = _this308.metadataResolver.getDirectiveMetadata(directiveType);

                  if (dirMeta && dirMeta.isComponent) {
                    compMetas.push(dirMeta);
                  }
                });
                compMetas.forEach(function (compMeta) {
                  var html = compMeta.template.template; // Template URL points to either an HTML or TS file depending on
                  // whether the file is used with `templateUrl:` or `template:`,
                  // respectively.

                  var templateUrl = compMeta.template.templateUrl;
                  var interpolationConfig = InterpolationConfig.fromArray(compMeta.template.interpolation);
                  errors.push.apply(errors, _toConsumableArray(_this308.messageBundle.updateFromTemplate(html, templateUrl, interpolationConfig)));
                });
              });

              if (errors.length) {
                throw new Error(errors.map(function (e) {
                  return e.toString();
                }).join('\n'));
              }

              return _this308.messageBundle;
            });
          }
        }], [{
          key: "create",
          value: function create(host, locale) {
            var htmlParser = new HtmlParser();
            var urlResolver = createAotUrlResolver(host);
            var symbolCache = new StaticSymbolCache();
            var summaryResolver = new AotSummaryResolver(host, symbolCache);
            var staticSymbolResolver = new StaticSymbolResolver(host, symbolCache, summaryResolver);
            var staticReflector = new StaticReflector(summaryResolver, staticSymbolResolver);
            var config = new CompilerConfig({
              defaultEncapsulation: ViewEncapsulation.Emulated,
              useJit: false
            });
            var normalizer = new DirectiveNormalizer({
              get: function get(url) {
                return host.loadResource(url);
              }
            }, urlResolver, htmlParser, config);
            var elementSchemaRegistry = new DomElementSchemaRegistry();
            var resolver = new CompileMetadataResolver(config, htmlParser, new NgModuleResolver(staticReflector), new DirectiveResolver(staticReflector), new PipeResolver(staticReflector), summaryResolver, elementSchemaRegistry, normalizer, console, symbolCache, staticReflector); // TODO(vicb): implicit tags & attributes

            var messageBundle = new MessageBundle(htmlParser, [], {}, locale);
            var extractor = new Extractor(host, staticSymbolResolver, messageBundle, resolver);
            return {
              extractor: extractor,
              staticReflector: staticReflector
            };
          }
        }]);

        return Extractor;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Processes `Target`s with a given set of directives and performs a binding operation, which
       * returns an object similar to TypeScript's `ts.TypeChecker` that contains knowledge about the
       * target.
       */


      var R3TargetBinder = /*#__PURE__*/function () {
        function R3TargetBinder(directiveMatcher) {
          _classCallCheck(this, R3TargetBinder);

          this.directiveMatcher = directiveMatcher;
        }
        /**
         * Perform a binding operation on the given `Target` and return a `BoundTarget` which contains
         * metadata about the types referenced in the template.
         */


        _createClass2(R3TargetBinder, [{
          key: "bind",
          value: function bind(target) {
            if (!target.template) {
              // TODO(alxhub): handle targets which contain things like HostBindings, etc.
              throw new Error('Binding without a template not yet supported');
            } // First, parse the template into a `Scope` structure. This operation captures the syntactic
            // scopes in the template and makes them available for later use.


            var scope = Scope.apply(target.template); // Use the `Scope` to extract the entities present at every level of the template.

            var templateEntities = extractTemplateEntities(scope); // Next, perform directive matching on the template using the `DirectiveBinder`. This returns:
            //   - directives: Map of nodes (elements & ng-templates) to the directives on them.
            //   - bindings: Map of inputs, outputs, and attributes to the directive/element that claims
            //     them. TODO(alxhub): handle multiple directives claiming an input/output/etc.
            //   - references: Map of #references to their targets.

            var _DirectiveBinder$appl = DirectiveBinder.apply(target.template, this.directiveMatcher),
                directives = _DirectiveBinder$appl.directives,
                bindings = _DirectiveBinder$appl.bindings,
                references = _DirectiveBinder$appl.references; // Finally, run the TemplateBinder to bind references, variables, and other entities within the
            // template. This extracts all the metadata that doesn't depend on directive matching.


            var _TemplateBinder$apply = TemplateBinder.apply(target.template, scope),
                expressions = _TemplateBinder$apply.expressions,
                symbols = _TemplateBinder$apply.symbols,
                nestingLevel = _TemplateBinder$apply.nestingLevel,
                usedPipes = _TemplateBinder$apply.usedPipes;

            return new R3BoundTarget(target, directives, bindings, references, expressions, symbols, nestingLevel, templateEntities, usedPipes);
          }
        }]);

        return R3TargetBinder;
      }();
      /**
       * Represents a binding scope within a template.
       *
       * Any variables, references, or other named entities declared within the template will
       * be captured and available by name in `namedEntities`. Additionally, child templates will
       * be analyzed and have their child `Scope`s available in `childScopes`.
       */


      var Scope = /*#__PURE__*/function () {
        function Scope(parentScope, template) {
          _classCallCheck(this, Scope);

          this.parentScope = parentScope;
          this.template = template;
          /**
           * Named members of the `Scope`, such as `Reference`s or `Variable`s.
           */

          this.namedEntities = new Map();
          /**
           * Child `Scope`s for immediately nested `Template`s.
           */

          this.childScopes = new Map();
        }

        _createClass2(Scope, [{
          key: "ingest",
          value:
          /**
           * Internal method to process the template and populate the `Scope`.
           */
          function ingest(template) {
            var _this309 = this;

            if (template instanceof Template) {
              // Variables on an <ng-template> are defined in the inner scope.
              template.variables.forEach(function (node) {
                return _this309.visitVariable(node);
              }); // Process the nodes of the template.

              template.children.forEach(function (node) {
                return node.visit(_this309);
              });
            } else {
              // No overarching `Template` instance, so process the nodes directly.
              template.forEach(function (node) {
                return node.visit(_this309);
              });
            }
          }
        }, {
          key: "visitElement",
          value: function visitElement(element) {
            var _this310 = this;

            // `Element`s in the template may have `Reference`s which are captured in the scope.
            element.references.forEach(function (node) {
              return _this310.visitReference(node);
            }); // Recurse into the `Element`'s children.

            element.children.forEach(function (node) {
              return node.visit(_this310);
            });
          }
        }, {
          key: "visitTemplate",
          value: function visitTemplate(template) {
            var _this311 = this;

            // References on a <ng-template> are defined in the outer scope, so capture them before
            // processing the template's child scope.
            template.references.forEach(function (node) {
              return _this311.visitReference(node);
            }); // Next, create an inner scope and process the template within it.

            var scope = new Scope(this, template);
            scope.ingest(template);
            this.childScopes.set(template, scope);
          }
        }, {
          key: "visitVariable",
          value: function visitVariable(variable) {
            // Declare the variable if it's not already.
            this.maybeDeclare(variable);
          }
        }, {
          key: "visitReference",
          value: function visitReference(reference) {
            // Declare the variable if it's not already.
            this.maybeDeclare(reference);
          } // Unused visitors.

        }, {
          key: "visitContent",
          value: function visitContent(content) {}
        }, {
          key: "visitBoundAttribute",
          value: function visitBoundAttribute(attr) {}
        }, {
          key: "visitBoundEvent",
          value: function visitBoundEvent(event) {}
        }, {
          key: "visitBoundText",
          value: function visitBoundText(text) {}
        }, {
          key: "visitText",
          value: function visitText(text) {}
        }, {
          key: "visitTextAttribute",
          value: function visitTextAttribute(attr) {}
        }, {
          key: "visitIcu",
          value: function visitIcu(icu) {}
        }, {
          key: "maybeDeclare",
          value: function maybeDeclare(thing) {
            // Declare something with a name, as long as that name isn't taken.
            if (!this.namedEntities.has(thing.name)) {
              this.namedEntities.set(thing.name, thing);
            }
          }
          /**
           * Look up a variable within this `Scope`.
           *
           * This can recurse into a parent `Scope` if it's available.
           */

        }, {
          key: "lookup",
          value: function lookup(name) {
            if (this.namedEntities.has(name)) {
              // Found in the local scope.
              return this.namedEntities.get(name);
            } else if (this.parentScope !== null) {
              // Not in the local scope, but there's a parent scope so check there.
              return this.parentScope.lookup(name);
            } else {
              // At the top level and it wasn't found.
              return null;
            }
          }
          /**
           * Get the child scope for a `Template`.
           *
           * This should always be defined.
           */

        }, {
          key: "getChildScope",
          value: function getChildScope(template) {
            var res = this.childScopes.get(template);

            if (res === undefined) {
              throw new Error("Assertion error: child scope for ".concat(template, " not found"));
            }

            return res;
          }
        }], [{
          key: "newRootScope",
          value: function newRootScope() {
            return new Scope(null, null);
          }
          /**
           * Process a template (either as a `Template` sub-template with variables, or a plain array of
           * template `Node`s) and construct its `Scope`.
           */

        }, {
          key: "apply",
          value: function apply(template) {
            var scope = Scope.newRootScope();
            scope.ingest(template);
            return scope;
          }
        }]);

        return Scope;
      }();
      /**
       * Processes a template and matches directives on nodes (elements and templates).
       *
       * Usually used via the static `apply()` method.
       */


      var DirectiveBinder = /*#__PURE__*/function () {
        function DirectiveBinder(matcher, directives, bindings, references) {
          _classCallCheck(this, DirectiveBinder);

          this.matcher = matcher;
          this.directives = directives;
          this.bindings = bindings;
          this.references = references;
        }
        /**
         * Process a template (list of `Node`s) and perform directive matching against each node.
         *
         * @param template the list of template `Node`s to match (recursively).
         * @param selectorMatcher a `SelectorMatcher` containing the directives that are in scope for
         * this template.
         * @returns three maps which contain information about directives in the template: the
         * `directives` map which lists directives matched on each node, the `bindings` map which
         * indicates which directives claimed which bindings (inputs, outputs, etc), and the `references`
         * map which resolves #references (`Reference`s) within the template to the named directive or
         * template node.
         */


        _createClass2(DirectiveBinder, [{
          key: "ingest",
          value: function ingest(template) {
            var _this312 = this;

            template.forEach(function (node) {
              return node.visit(_this312);
            });
          }
        }, {
          key: "visitElement",
          value: function visitElement(element) {
            this.visitElementOrTemplate(element.name, element);
          }
        }, {
          key: "visitTemplate",
          value: function visitTemplate(template) {
            this.visitElementOrTemplate('ng-template', template);
          }
        }, {
          key: "visitElementOrTemplate",
          value: function visitElementOrTemplate(elementName, node) {
            var _this313 = this;

            // First, determine the HTML shape of the node for the purpose of directive matching.
            // Do this by building up a `CssSelector` for the node.
            var cssSelector = createCssSelector(elementName, getAttrsForDirectiveMatching(node)); // Next, use the `SelectorMatcher` to get the list of directives on the node.

            var directives = [];
            this.matcher.match(cssSelector, function (_, directive) {
              return directives.push(directive);
            });

            if (directives.length > 0) {
              this.directives.set(node, directives);
            } // Resolve any references that are created on this node.


            node.references.forEach(function (ref) {
              var dirTarget = null; // If the reference expression is empty, then it matches the "primary" directive on the node
              // (if there is one). Otherwise it matches the host node itself (either an element or
              // <ng-template> node).

              if (ref.value.trim() === '') {
                // This could be a reference to a component if there is one.
                dirTarget = directives.find(function (dir) {
                  return dir.isComponent;
                }) || null;
              } else {
                // This should be a reference to a directive exported via exportAs.
                dirTarget = directives.find(function (dir) {
                  return dir.exportAs !== null && dir.exportAs.some(function (value) {
                    return value === ref.value;
                  });
                }) || null; // Check if a matching directive was found.

                if (dirTarget === null) {
                  // No matching directive was found - this reference points to an unknown target. Leave it
                  // unmapped.
                  return;
                }
              }

              if (dirTarget !== null) {
                // This reference points to a directive.
                _this313.references.set(ref, {
                  directive: dirTarget,
                  node: node
                });
              } else {
                // This reference points to the node itself.
                _this313.references.set(ref, node);
              }
            });

            var setAttributeBinding = function setAttributeBinding(attribute, ioType) {
              var dir = directives.find(function (dir) {
                return dir[ioType].hasBindingPropertyName(attribute.name);
              });
              var binding = dir !== undefined ? dir : node;

              _this313.bindings.set(attribute, binding);
            }; // Node inputs (bound attributes) and text attributes can be bound to an
            // input on a directive.


            node.inputs.forEach(function (input) {
              return setAttributeBinding(input, 'inputs');
            });
            node.attributes.forEach(function (attr) {
              return setAttributeBinding(attr, 'inputs');
            });

            if (node instanceof Template) {
              node.templateAttrs.forEach(function (attr) {
                return setAttributeBinding(attr, 'inputs');
              });
            } // Node outputs (bound events) can be bound to an output on a directive.


            node.outputs.forEach(function (output) {
              return setAttributeBinding(output, 'outputs');
            }); // Recurse into the node's children.

            node.children.forEach(function (child) {
              return child.visit(_this313);
            });
          } // Unused visitors.

        }, {
          key: "visitContent",
          value: function visitContent(content) {}
        }, {
          key: "visitVariable",
          value: function visitVariable(variable) {}
        }, {
          key: "visitReference",
          value: function visitReference(reference) {}
        }, {
          key: "visitTextAttribute",
          value: function visitTextAttribute(attribute) {}
        }, {
          key: "visitBoundAttribute",
          value: function visitBoundAttribute(attribute) {}
        }, {
          key: "visitBoundEvent",
          value: function visitBoundEvent(attribute) {}
        }, {
          key: "visitBoundAttributeOrEvent",
          value: function visitBoundAttributeOrEvent(node) {}
        }, {
          key: "visitText",
          value: function visitText(text) {}
        }, {
          key: "visitBoundText",
          value: function visitBoundText(text) {}
        }, {
          key: "visitIcu",
          value: function visitIcu(icu) {}
        }], [{
          key: "apply",
          value: function apply(template, selectorMatcher) {
            var directives = new Map();
            var bindings = new Map();
            var references = new Map();
            var matcher = new DirectiveBinder(selectorMatcher, directives, bindings, references);
            matcher.ingest(template);
            return {
              directives: directives,
              bindings: bindings,
              references: references
            };
          }
        }]);

        return DirectiveBinder;
      }();
      /**
       * Processes a template and extract metadata about expressions and symbols within.
       *
       * This is a companion to the `DirectiveBinder` that doesn't require knowledge of directives matched
       * within the template in order to operate.
       *
       * Expressions are visited by the superclass `RecursiveAstVisitor`, with custom logic provided
       * by overridden methods from that visitor.
       */


      var TemplateBinder = /*#__PURE__*/function (_RecursiveAstVisitor$3) {
        _inherits(TemplateBinder, _RecursiveAstVisitor$3);

        var _super116 = _createSuper(TemplateBinder);

        function TemplateBinder(bindings, symbols, usedPipes, nestingLevel, scope, template, level) {
          var _this314;

          _classCallCheck(this, TemplateBinder);

          _this314 = _super116.call(this);
          _this314.bindings = bindings;
          _this314.symbols = symbols;
          _this314.usedPipes = usedPipes;
          _this314.nestingLevel = nestingLevel;
          _this314.scope = scope;
          _this314.template = template;
          _this314.level = level;
          _this314.pipesUsed = []; // Save a bit of processing time by constructing this closure in advance.

          _this314.visitNode = function (node) {
            return node.visit(_assertThisInitialized(_this314));
          };

          return _this314;
        } // This method is defined to reconcile the type of TemplateBinder since both
        // RecursiveAstVisitor and Visitor define the visit() method in their
        // interfaces.


        _createClass2(TemplateBinder, [{
          key: "visit",
          value: function visit(node, context) {
            if (node instanceof AST) {
              node.visit(this, context);
            } else {
              node.visit(this);
            }
          }
          /**
           * Process a template and extract metadata about expressions and symbols within.
           *
           * @param template the nodes of the template to process
           * @param scope the `Scope` of the template being processed.
           * @returns three maps which contain metadata about the template: `expressions` which interprets
           * special `AST` nodes in expressions as pointing to references or variables declared within the
           * template, `symbols` which maps those variables and references to the nested `Template` which
           * declares them, if any, and `nestingLevel` which associates each `Template` with a integer
           * nesting level (how many levels deep within the template structure the `Template` is), starting
           * at 1.
           */

        }, {
          key: "ingest",
          value: function ingest(template) {
            if (template instanceof Template) {
              // For <ng-template>s, process only variables and child nodes. Inputs, outputs, templateAttrs,
              // and references were all processed in the scope of the containing template.
              template.variables.forEach(this.visitNode);
              template.children.forEach(this.visitNode); // Set the nesting level.

              this.nestingLevel.set(template, this.level);
            } else {
              // Visit each node from the top-level template.
              template.forEach(this.visitNode);
            }
          }
        }, {
          key: "visitElement",
          value: function visitElement(element) {
            // Visit the inputs, outputs, and children of the element.
            element.inputs.forEach(this.visitNode);
            element.outputs.forEach(this.visitNode);
            element.children.forEach(this.visitNode);
          }
        }, {
          key: "visitTemplate",
          value: function visitTemplate(template) {
            // First, visit inputs, outputs and template attributes of the template node.
            template.inputs.forEach(this.visitNode);
            template.outputs.forEach(this.visitNode);
            template.templateAttrs.forEach(this.visitNode); // References are also evaluated in the outer context.

            template.references.forEach(this.visitNode); // Next, recurse into the template using its scope, and bumping the nesting level up by one.

            var childScope = this.scope.getChildScope(template);
            var binder = new TemplateBinder(this.bindings, this.symbols, this.usedPipes, this.nestingLevel, childScope, template, this.level + 1);
            binder.ingest(template);
          }
        }, {
          key: "visitVariable",
          value: function visitVariable(variable) {
            // Register the `Variable` as a symbol in the current `Template`.
            if (this.template !== null) {
              this.symbols.set(variable, this.template);
            }
          }
        }, {
          key: "visitReference",
          value: function visitReference(reference) {
            // Register the `Reference` as a symbol in the current `Template`.
            if (this.template !== null) {
              this.symbols.set(reference, this.template);
            }
          } // Unused template visitors

        }, {
          key: "visitText",
          value: function visitText(text) {}
        }, {
          key: "visitContent",
          value: function visitContent(content) {}
        }, {
          key: "visitTextAttribute",
          value: function visitTextAttribute(attribute) {}
        }, {
          key: "visitIcu",
          value: function visitIcu(icu) {
            var _this315 = this;

            Object.keys(icu.vars).forEach(function (key) {
              return icu.vars[key].visit(_this315);
            });
            Object.keys(icu.placeholders).forEach(function (key) {
              return icu.placeholders[key].visit(_this315);
            });
          } // The remaining visitors are concerned with processing AST expressions within template bindings

        }, {
          key: "visitBoundAttribute",
          value: function visitBoundAttribute(attribute) {
            attribute.value.visit(this);
          }
        }, {
          key: "visitBoundEvent",
          value: function visitBoundEvent(event) {
            event.handler.visit(this);
          }
        }, {
          key: "visitBoundText",
          value: function visitBoundText(text) {
            text.value.visit(this);
          }
        }, {
          key: "visitPipe",
          value: function visitPipe(ast, context) {
            this.usedPipes.add(ast.name);
            return _get(_getPrototypeOf(TemplateBinder.prototype), "visitPipe", this).call(this, ast, context);
          } // These five types of AST expressions can refer to expression roots, which could be variables
          // or references in the current scope.

        }, {
          key: "visitPropertyRead",
          value: function visitPropertyRead(ast, context) {
            this.maybeMap(context, ast, ast.name);
            return _get(_getPrototypeOf(TemplateBinder.prototype), "visitPropertyRead", this).call(this, ast, context);
          }
        }, {
          key: "visitSafePropertyRead",
          value: function visitSafePropertyRead(ast, context) {
            this.maybeMap(context, ast, ast.name);
            return _get(_getPrototypeOf(TemplateBinder.prototype), "visitSafePropertyRead", this).call(this, ast, context);
          }
        }, {
          key: "visitPropertyWrite",
          value: function visitPropertyWrite(ast, context) {
            this.maybeMap(context, ast, ast.name);
            return _get(_getPrototypeOf(TemplateBinder.prototype), "visitPropertyWrite", this).call(this, ast, context);
          }
        }, {
          key: "visitMethodCall",
          value: function visitMethodCall(ast, context) {
            this.maybeMap(context, ast, ast.name);
            return _get(_getPrototypeOf(TemplateBinder.prototype), "visitMethodCall", this).call(this, ast, context);
          }
        }, {
          key: "visitSafeMethodCall",
          value: function visitSafeMethodCall(ast, context) {
            this.maybeMap(context, ast, ast.name);
            return _get(_getPrototypeOf(TemplateBinder.prototype), "visitSafeMethodCall", this).call(this, ast, context);
          }
        }, {
          key: "maybeMap",
          value: function maybeMap(scope, ast, name) {
            // If the receiver of the expression isn't the `ImplicitReceiver`, this isn't the root of an
            // `AST` expression that maps to a `Variable` or `Reference`.
            if (!(ast.receiver instanceof ImplicitReceiver)) {
              return;
            } // Check whether the name exists in the current scope. If so, map it. Otherwise, the name is
            // probably a property on the top-level component context.


            var target = this.scope.lookup(name);

            if (target !== null) {
              this.bindings.set(ast, target);
            }
          }
        }], [{
          key: "apply",
          value: function apply(template, scope) {
            var expressions = new Map();
            var symbols = new Map();
            var nestingLevel = new Map();
            var usedPipes = new Set(); // The top-level template has nesting level 0.

            var binder = new TemplateBinder(expressions, symbols, usedPipes, nestingLevel, scope, template instanceof Template ? template : null, 0);
            binder.ingest(template);
            return {
              expressions: expressions,
              symbols: symbols,
              nestingLevel: nestingLevel,
              usedPipes: usedPipes
            };
          }
        }]);

        return TemplateBinder;
      }(RecursiveAstVisitor$1);
      /**
       * Metadata container for a `Target` that allows queries for specific bits of metadata.
       *
       * See `BoundTarget` for documentation on the individual methods.
       */


      var R3BoundTarget = /*#__PURE__*/function () {
        function R3BoundTarget(target, directives, bindings, references, exprTargets, symbols, nestingLevel, templateEntities, usedPipes) {
          _classCallCheck(this, R3BoundTarget);

          this.target = target;
          this.directives = directives;
          this.bindings = bindings;
          this.references = references;
          this.exprTargets = exprTargets;
          this.symbols = symbols;
          this.nestingLevel = nestingLevel;
          this.templateEntities = templateEntities;
          this.usedPipes = usedPipes;
        }

        _createClass2(R3BoundTarget, [{
          key: "getEntitiesInTemplateScope",
          value: function getEntitiesInTemplateScope(template) {
            var _a;

            return (_a = this.templateEntities.get(template)) !== null && _a !== void 0 ? _a : new Set();
          }
        }, {
          key: "getDirectivesOfNode",
          value: function getDirectivesOfNode(node) {
            return this.directives.get(node) || null;
          }
        }, {
          key: "getReferenceTarget",
          value: function getReferenceTarget(ref) {
            return this.references.get(ref) || null;
          }
        }, {
          key: "getConsumerOfBinding",
          value: function getConsumerOfBinding(binding) {
            return this.bindings.get(binding) || null;
          }
        }, {
          key: "getExpressionTarget",
          value: function getExpressionTarget(expr) {
            return this.exprTargets.get(expr) || null;
          }
        }, {
          key: "getTemplateOfSymbol",
          value: function getTemplateOfSymbol(symbol) {
            return this.symbols.get(symbol) || null;
          }
        }, {
          key: "getNestingLevel",
          value: function getNestingLevel(template) {
            return this.nestingLevel.get(template) || 0;
          }
        }, {
          key: "getUsedDirectives",
          value: function getUsedDirectives() {
            var set = new Set();
            this.directives.forEach(function (dirs) {
              return dirs.forEach(function (dir) {
                return set.add(dir);
              });
            });
            return Array.from(set.values());
          }
        }, {
          key: "getUsedPipes",
          value: function getUsedPipes() {
            return Array.from(this.usedPipes);
          }
        }]);

        return R3BoundTarget;
      }();

      function extractTemplateEntities(rootScope) {
        var entityMap = new Map();

        function extractScopeEntities(scope) {
          if (entityMap.has(scope.template)) {
            return entityMap.get(scope.template);
          }

          var currentEntities = scope.namedEntities;
          var templateEntities;

          if (scope.parentScope !== null) {
            templateEntities = new Map([].concat(_toConsumableArray(extractScopeEntities(scope.parentScope)), _toConsumableArray(currentEntities)));
          } else {
            templateEntities = new Map(currentEntities);
          }

          entityMap.set(scope.template, templateEntities);
          return templateEntities;
        }

        var scopesToProcess = [rootScope];

        while (scopesToProcess.length > 0) {
          var scope = scopesToProcess.pop();

          var _iterator43 = _createForOfIteratorHelper(scope.childScopes.values()),
              _step43;

          try {
            for (_iterator43.s(); !(_step43 = _iterator43.n()).done;) {
              var childScope = _step43.value;
              scopesToProcess.push(childScope);
            }
          } catch (err) {
            _iterator43.e(err);
          } finally {
            _iterator43.f();
          }

          extractScopeEntities(scope);
        }

        var templateEntities = new Map();

        var _iterator44 = _createForOfIteratorHelper(entityMap),
            _step44;

        try {
          for (_iterator44.s(); !(_step44 = _iterator44.n()).done;) {
            var _step44$value = _slicedToArray(_step44.value, 2),
                template = _step44$value[0],
                entities = _step44$value[1];

            templateEntities.set(template, new Set(entities.values()));
          }
        } catch (err) {
          _iterator44.e(err);
        } finally {
          _iterator44.f();
        }

        return templateEntities;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // This file only reexports content of the `src` folder. Keep it that way.
      // This function call has a global side effects and publishes the compiler into global namespace for
      // the late binding of the Compiler to the @angular/core for jit compilation.


      publishFacade(_global);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // This file only reexports content of the `src` folder. Keep it that way.

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      //# sourceMappingURL=compiler.js.map

      /***/
    },

    /***/
    "1uah":
    /*!***************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/zip.js ***!
      \***************************************************************/

    /*! exports provided: zip, ZipOperator, ZipSubscriber */

    /***/
    function uah(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "zip", function () {
        return zip;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ZipOperator", function () {
        return ZipOperator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ZipSubscriber", function () {
        return ZipSubscriber;
      });
      /* harmony import */


      var _fromArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./fromArray */
      "yCtX");
      /* harmony import */


      var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/isArray */
      "DH7j");
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../../internal/symbol/iterator */
      "Lhse");
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function zip() {
        for (var _len10 = arguments.length, observables = new Array(_len10), _key11 = 0; _key11 < _len10; _key11++) {
          observables[_key11] = arguments[_key11];
        }

        var resultSelector = observables[observables.length - 1];

        if (typeof resultSelector === 'function') {
          observables.pop();
        }

        return Object(_fromArray__WEBPACK_IMPORTED_MODULE_0__["fromArray"])(observables, undefined).lift(new ZipOperator(resultSelector));
      }

      var ZipOperator = /*#__PURE__*/function () {
        function ZipOperator(resultSelector) {
          _classCallCheck(this, ZipOperator);

          this.resultSelector = resultSelector;
        }

        _createClass2(ZipOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));
          }
        }]);

        return ZipOperator;
      }();

      var ZipSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_4) {
        _inherits(ZipSubscriber, _Subscriber__WEBPACK_4);

        var _super117 = _createSuper(ZipSubscriber);

        function ZipSubscriber(destination, resultSelector) {
          var _this316;

          var values = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Object.create(null);

          _classCallCheck(this, ZipSubscriber);

          _this316 = _super117.call(this, destination);
          _this316.resultSelector = resultSelector;
          _this316.iterators = [];
          _this316.active = 0;
          _this316.resultSelector = typeof resultSelector === 'function' ? resultSelector : undefined;
          return _this316;
        }

        _createClass2(ZipSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var iterators = this.iterators;

            if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(value)) {
              iterators.push(new StaticArrayIterator(value));
            } else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]] === 'function') {
              iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]]()));
            } else {
              iterators.push(new ZipBufferIterator(this.destination, this, value));
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var iterators = this.iterators;
            var len = iterators.length;
            this.unsubscribe();

            if (len === 0) {
              this.destination.complete();
              return;
            }

            this.active = len;

            for (var i = 0; i < len; i++) {
              var iterator = iterators[i];

              if (iterator.stillUnsubscribed) {
                var destination = this.destination;
                destination.add(iterator.subscribe());
              } else {
                this.active--;
              }
            }
          }
        }, {
          key: "notifyInactive",
          value: function notifyInactive() {
            this.active--;

            if (this.active === 0) {
              this.destination.complete();
            }
          }
        }, {
          key: "checkIterators",
          value: function checkIterators() {
            var iterators = this.iterators;
            var len = iterators.length;
            var destination = this.destination;

            for (var i = 0; i < len; i++) {
              var iterator = iterators[i];

              if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {
                return;
              }
            }

            var shouldComplete = false;
            var args = [];

            for (var _i11 = 0; _i11 < len; _i11++) {
              var _iterator45 = iterators[_i11];

              var result = _iterator45.next();

              if (_iterator45.hasCompleted()) {
                shouldComplete = true;
              }

              if (result.done) {
                destination.complete();
                return;
              }

              args.push(result.value);
            }

            if (this.resultSelector) {
              this._tryresultSelector(args);
            } else {
              destination.next(args);
            }

            if (shouldComplete) {
              destination.complete();
            }
          }
        }, {
          key: "_tryresultSelector",
          value: function _tryresultSelector(args) {
            var result;

            try {
              result = this.resultSelector.apply(this, args);
            } catch (err) {
              this.destination.error(err);
              return;
            }

            this.destination.next(result);
          }
        }]);

        return ZipSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]);

      var StaticIterator = /*#__PURE__*/function () {
        function StaticIterator(iterator) {
          _classCallCheck(this, StaticIterator);

          this.iterator = iterator;
          this.nextResult = iterator.next();
        }

        _createClass2(StaticIterator, [{
          key: "hasValue",
          value: function hasValue() {
            return true;
          }
        }, {
          key: "next",
          value: function next() {
            var result = this.nextResult;
            this.nextResult = this.iterator.next();
            return result;
          }
        }, {
          key: "hasCompleted",
          value: function hasCompleted() {
            var nextResult = this.nextResult;
            return Boolean(nextResult && nextResult.done);
          }
        }]);

        return StaticIterator;
      }();

      var StaticArrayIterator = /*#__PURE__*/function (_internal_symbol_iter) {
        function StaticArrayIterator(array) {
          _classCallCheck(this, StaticArrayIterator);

          this.array = array;
          this.index = 0;
          this.length = 0;
          this.length = array.length;
        }

        _createClass2(StaticArrayIterator, [{
          key: _internal_symbol_iter,
          value: function value() {
            return this;
          }
        }, {
          key: "next",
          value: function next(value) {
            var i = this.index++;
            var array = this.array;
            return i < this.length ? {
              value: array[i],
              done: false
            } : {
              value: null,
              done: true
            };
          }
        }, {
          key: "hasValue",
          value: function hasValue() {
            return this.array.length > this.index;
          }
        }, {
          key: "hasCompleted",
          value: function hasCompleted() {
            return this.array.length === this.index;
          }
        }]);

        return StaticArrayIterator;
      }(_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]);

      var ZipBufferIterator = /*#__PURE__*/function (_innerSubscribe__WEBP3, _internal_symbol_iter2) {
        _inherits(ZipBufferIterator, _innerSubscribe__WEBP3);

        var _super118 = _createSuper(ZipBufferIterator);

        function ZipBufferIterator(destination, parent, observable) {
          var _this317;

          _classCallCheck(this, ZipBufferIterator);

          _this317 = _super118.call(this, destination);
          _this317.parent = parent;
          _this317.observable = observable;
          _this317.stillUnsubscribed = true;
          _this317.buffer = [];
          _this317.isComplete = false;
          return _this317;
        }

        _createClass2(ZipBufferIterator, [{
          key: _internal_symbol_iter2,
          value: function value() {
            return this;
          }
        }, {
          key: "next",
          value: function next() {
            var buffer = this.buffer;

            if (buffer.length === 0 && this.isComplete) {
              return {
                value: null,
                done: true
              };
            } else {
              return {
                value: buffer.shift(),
                done: false
              };
            }
          }
        }, {
          key: "hasValue",
          value: function hasValue() {
            return this.buffer.length > 0;
          }
        }, {
          key: "hasCompleted",
          value: function hasCompleted() {
            return this.buffer.length === 0 && this.isComplete;
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            if (this.buffer.length > 0) {
              this.isComplete = true;
              this.parent.notifyInactive();
            } else {
              this.destination.complete();
            }
          }
        }, {
          key: "notifyNext",
          value: function notifyNext(innerValue) {
            this.buffer.push(innerValue);
            this.parent.checkIterators();
          }
        }, {
          key: "subscribe",
          value: function subscribe() {
            return Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_4__["innerSubscribe"])(this.observable, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_4__["SimpleInnerSubscriber"](this));
          }
        }]);

        return ZipBufferIterator;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_4__["SimpleOuterSubscriber"], _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]); //# sourceMappingURL=zip.js.map

      /***/

    },

    /***/
    "1vRN":
    /*!***************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/helpers-dd7e4b7b.js ***!
      \***************************************************************/

    /*! exports provided: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, r */

    /***/
    function vRN(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "a", function () {
        return addEventListener;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "b", function () {
        return removeEventListener;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "c", function () {
        return componentOnReady;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "d", function () {
        return getAriaLabel;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "e", function () {
        return renderHiddenInput;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "f", function () {
        return debounceEvent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "g", function () {
        return getElementRoot;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "h", function () {
        return findItemLabel;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "i", function () {
        return inheritAttributes;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "j", function () {
        return clamp;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "k", function () {
        return hasShadowDom;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "l", function () {
        return assert;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "m", function () {
        return isEndSide;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "n", function () {
        return debounce;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "o", function () {
        return now;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "p", function () {
        return pointerCoord;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "r", function () {
        return raf;
      });
      /**
       * Waits for a component to be ready for
       * both custom element and non-custom element builds.
       * If non-custom element build, el.componentOnReady
       * will be used.
       * For custom element builds, we wait a frame
       * so that the inner contents of the component
       * have a chance to render.
       *
       * Use this utility rather than calling
       * el.componentOnReady yourself.
       */


      var componentOnReady = function componentOnReady(el, callback) {
        if (el.componentOnReady) {
          el.componentOnReady().then(function (resolvedEl) {
            return callback(resolvedEl);
          });
        } else {
          raf(function () {
            return callback(el);
          });
        }
      };
      /**
       * Elements inside of web components sometimes need to inherit global attributes
       * set on the host. For example, the inner input in `ion-input` should inherit
       * the `title` attribute that developers set directly on `ion-input`. This
       * helper function should be called in componentWillLoad and assigned to a variable
       * that is later used in the render function.
       *
       * This does not need to be reactive as changing attributes on the host element
       * does not trigger a re-render.
       */


      var inheritAttributes = function inheritAttributes(el) {
        var attributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
        var attributeObject = {};
        attributes.forEach(function (attr) {
          if (el.hasAttribute(attr)) {
            var value = el.getAttribute(attr);

            if (value !== null) {
              attributeObject[attr] = el.getAttribute(attr);
            }

            el.removeAttribute(attr);
          }
        });
        return attributeObject;
      };

      var addEventListener = function addEventListener(el, eventName, callback, opts) {
        if (typeof window !== 'undefined') {
          var win = window;
          var config = win && win.Ionic && win.Ionic.config;

          if (config) {
            var ael = config.get('_ael');

            if (ael) {
              return ael(el, eventName, callback, opts);
            } else if (config._ael) {
              return config._ael(el, eventName, callback, opts);
            }
          }
        }

        return el.addEventListener(eventName, callback, opts);
      };

      var removeEventListener = function removeEventListener(el, eventName, callback, opts) {
        if (typeof window !== 'undefined') {
          var win = window;
          var config = win && win.Ionic && win.Ionic.config;

          if (config) {
            var rel = config.get('_rel');

            if (rel) {
              return rel(el, eventName, callback, opts);
            } else if (config._rel) {
              return config._rel(el, eventName, callback, opts);
            }
          }
        }

        return el.removeEventListener(eventName, callback, opts);
      };
      /**
       * Gets the root context of a shadow dom element
       * On newer browsers this will be the shadowRoot,
       * but for older browser this may just be the
       * element itself.
       *
       * Useful for whenever you need to explicitly
       * do "myElement.shadowRoot!.querySelector(...)".
       */


      var getElementRoot = function getElementRoot(el) {
        var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : el;
        return el.shadowRoot || fallback;
      };
      /**
       * Patched version of requestAnimationFrame that avoids ngzone
       * Use only when you know ngzone should not run
       */


      var raf = function raf(h) {
        if (typeof __zone_symbol__requestAnimationFrame === 'function') {
          return __zone_symbol__requestAnimationFrame(h);
        }

        if (typeof requestAnimationFrame === 'function') {
          return requestAnimationFrame(h);
        }

        return setTimeout(h);
      };

      var hasShadowDom = function hasShadowDom(el) {
        return !!el.shadowRoot && !!el.attachShadow;
      };

      var findItemLabel = function findItemLabel(componentEl) {
        var itemEl = componentEl.closest('ion-item');

        if (itemEl) {
          return itemEl.querySelector('ion-label');
        }

        return null;
      };
      /**
       * This method is used for Ionic's input components that use Shadow DOM. In
       * order to properly label the inputs to work with screen readers, we need
       * to get the text content of the label outside of the shadow root and pass
       * it to the input inside of the shadow root.
       *
       * Referencing label elements by id from outside of the component is
       * impossible due to the shadow boundary, read more here:
       * https://developer.salesforce.com/blogs/2020/01/accessibility-for-web-components.html
       *
       * @param componentEl The shadow element that needs the aria label
       * @param inputId The unique identifier for the input
       */


      var getAriaLabel = function getAriaLabel(componentEl, inputId) {
        var labelText; // If the user provides their own label via the aria-labelledby attr
        // we should use that instead of looking for an ion-label

        var labelledBy = componentEl.getAttribute('aria-labelledby'); // Grab the id off of the component in case they are using
        // a custom label using the label element

        var componentId = componentEl.id;
        var labelId = labelledBy !== null && labelledBy.trim() !== '' ? labelledBy : inputId + '-lbl';
        var label = labelledBy !== null && labelledBy.trim() !== '' ? document.getElementById(labelledBy) : findItemLabel(componentEl);

        if (label) {
          if (labelledBy === null) {
            label.id = labelId;
          }

          labelText = label.textContent;
          label.setAttribute('aria-hidden', 'true'); // if there is no label, check to see if the user has provided
          // one by setting an id on the component and using the label element
        } else if (componentId.trim() !== '') {
          label = document.querySelector("label[for=\"".concat(componentId, "\"]"));

          if (label) {
            if (label.id !== '') {
              labelId = label.id;
            } else {
              label.id = labelId = "".concat(componentId, "-lbl");
            }

            labelText = label.textContent;
          }
        }

        return {
          label: label,
          labelId: labelId,
          labelText: labelText
        };
      };
      /**
       * This method is used to add a hidden input to a host element that contains
       * a Shadow DOM. It does not add the input inside of the Shadow root which
       * allows it to be picked up inside of forms. It should contain the same
       * values as the host element.
       *
       * @param always Add a hidden input even if the container does not use Shadow
       * @param container The element where the input will be added
       * @param name The name of the input
       * @param value The value of the input
       * @param disabled If true, the input is disabled
       */


      var renderHiddenInput = function renderHiddenInput(always, container, name, value, disabled) {
        if (always || hasShadowDom(container)) {
          var input = container.querySelector('input.aux-input');

          if (!input) {
            input = container.ownerDocument.createElement('input');
            input.type = 'hidden';
            input.classList.add('aux-input');
            container.appendChild(input);
          }

          input.disabled = disabled;
          input.name = name;
          input.value = value || '';
        }
      };

      var clamp = function clamp(min, n, max) {
        return Math.max(min, Math.min(n, max));
      };

      var assert = function assert(actual, reason) {
        if (!actual) {
          var message = 'ASSERT: ' + reason;
          console.error(message);
          debugger; // tslint:disable-line

          throw new Error(message);
        }
      };

      var now = function now(ev) {
        return ev.timeStamp || Date.now();
      };

      var pointerCoord = function pointerCoord(ev) {
        // get X coordinates for either a mouse click
        // or a touch depending on the given event
        if (ev) {
          var changedTouches = ev.changedTouches;

          if (changedTouches && changedTouches.length > 0) {
            var touch = changedTouches[0];
            return {
              x: touch.clientX,
              y: touch.clientY
            };
          }

          if (ev.pageX !== undefined) {
            return {
              x: ev.pageX,
              y: ev.pageY
            };
          }
        }

        return {
          x: 0,
          y: 0
        };
      };
      /**
       * @hidden
       * Given a side, return if it should be on the end
       * based on the value of dir
       * @param side the side
       * @param isRTL whether the application dir is rtl
       */


      var isEndSide = function isEndSide(side) {
        var isRTL = document.dir === 'rtl';

        switch (side) {
          case 'start':
            return isRTL;

          case 'end':
            return !isRTL;

          default:
            throw new Error("\"".concat(side, "\" is not a valid value for [side]. Use \"start\" or \"end\" instead."));
        }
      };

      var debounceEvent = function debounceEvent(event, wait) {
        var original = event._original || event;
        return {
          _original: event,
          emit: debounce(original.emit.bind(original), wait)
        };
      };

      var debounce = function debounce(func) {
        var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
        var timer;
        return function () {
          clearTimeout(timer);

          for (var _len11 = arguments.length, args = new Array(_len11), _key12 = 0; _key12 < _len11; _key12++) {
            args[_key12] = arguments[_key12];
          }

          timer = setTimeout.apply(void 0, [func, wait].concat(args));
        };
      };
      /***/

    },

    /***/
    "2O0U":
    /*!**************************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/transports/fetch.js ***!
      \**************************************************************/

    /*! exports provided: FetchTransport */

    /***/
    function O0U(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FetchTransport", function () {
        return FetchTransport;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/core */
      "wBhU");
      /* harmony import */


      var _sentry_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/types */
      "PIsB");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./base */
      "DTjN");
      /* harmony import */


      var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./utils */
      "2TjN");
      /** `fetch` based transport */


      var FetchTransport =
      /** @class */
      function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FetchTransport, _super);

        function FetchTransport(options, fetchImpl) {
          if (fetchImpl === void 0) {
            fetchImpl = Object(_utils__WEBPACK_IMPORTED_MODULE_5__["getNativeFetchImplementation"])();
          }

          var _this = _super.call(this, options) || this;

          _this._fetch = fetchImpl;
          return _this;
        }
        /**
         * @inheritDoc
         */


        FetchTransport.prototype.sendEvent = function (event) {
          return this._sendRequest(Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["eventToSentryRequest"])(event, this._api), event);
        };
        /**
         * @inheritDoc
         */


        FetchTransport.prototype.sendSession = function (session) {
          return this._sendRequest(Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["sessionToSentryRequest"])(session, this._api), session);
        };
        /**
         * @param sentryRequest Prepared SentryRequest to be delivered
         * @param originalPayload Original payload used to create SentryRequest
         */


        FetchTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {
          var _this = this;

          if (this._isRateLimited(sentryRequest.type)) {
            this.recordLostEvent(_sentry_types__WEBPACK_IMPORTED_MODULE_2__["Outcome"].RateLimitBackoff, sentryRequest.type);
            return Promise.reject({
              event: originalPayload,
              type: sentryRequest.type,
              reason: "Transport for " + sentryRequest.type + " requests locked till " + this._disabledUntil(sentryRequest.type) + " due to too many requests.",
              status: 429
            });
          }

          var options = {
            body: sentryRequest.body,
            method: 'POST',
            // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default
            // https://caniuse.com/#feat=referrer-policy
            // It doesn't. And it throw exception instead of ignoring this parameter...
            // REF: https://github.com/getsentry/raven-js/issues/1233
            referrerPolicy: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["supportsReferrerPolicy"])() ? 'origin' : ''
          };

          if (this.options.fetchParameters !== undefined) {
            Object.assign(options, this.options.fetchParameters);
          }

          if (this.options.headers !== undefined) {
            options.headers = this.options.headers;
          }

          return this._buffer.add(function () {
            return new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SyncPromise"](function (resolve, reject) {
              void _this._fetch(sentryRequest.url, options).then(function (response) {
                var headers = {
                  'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),
                  'retry-after': response.headers.get('Retry-After')
                };

                _this._handleResponse({
                  requestType: sentryRequest.type,
                  response: response,
                  headers: headers,
                  resolve: resolve,
                  reject: reject
                });
              })["catch"](reject);
            });
          }).then(undefined, function (reason) {
            // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.
            if (reason instanceof _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SentryError"]) {
              _this.recordLostEvent(_sentry_types__WEBPACK_IMPORTED_MODULE_2__["Outcome"].QueueOverflow, sentryRequest.type);
            } else {
              _this.recordLostEvent(_sentry_types__WEBPACK_IMPORTED_MODULE_2__["Outcome"].NetworkError, sentryRequest.type);
            }

            throw reason;
          });
        };

        return FetchTransport;
      }(_base__WEBPACK_IMPORTED_MODULE_4__["BaseTransport"]); //# sourceMappingURL=fetch.js.map

      /***/

    },

    /***/
    "2QA8":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/symbol/rxSubscriber.js ***!
      \********************************************************************/

    /*! exports provided: rxSubscriber, $$rxSubscriber */

    /***/
    function QA8(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "rxSubscriber", function () {
        return rxSubscriber;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "$$rxSubscriber", function () {
        return $$rxSubscriber;
      });

      var rxSubscriber = function () {
        return typeof Symbol === 'function' ? Symbol('rxSubscriber') : '@@rxSubscriber_' + Math.random();
      }();

      var $$rxSubscriber = rxSubscriber; //# sourceMappingURL=rxSubscriber.js.map

      /***/
    },

    /***/
    "2QGa":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/partition.js ***!
      \*********************************************************************/

    /*! exports provided: partition */

    /***/
    function QGa(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "partition", function () {
        return partition;
      });
      /* harmony import */


      var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../util/not */
      "F97/");
      /* harmony import */


      var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/subscribeTo */
      "SeVD");
      /* harmony import */


      var _operators_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../operators/filter */
      "pLZG");
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");

      function partition(source, predicate, thisArg) {
        return [Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(predicate, thisArg)(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source))), Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source)))];
      } //# sourceMappingURL=partition.js.map

      /***/

    },

    /***/
    "2TjN":
    /*!**************************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/transports/utils.js ***!
      \**************************************************************/

    /*! exports provided: getNativeFetchImplementation, sendReport */

    /***/
    function TjN(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getNativeFetchImplementation", function () {
        return getNativeFetchImplementation;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "sendReport", function () {
        return sendReport;
      });
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");

      var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getGlobalObject"])();
      var cachedFetchImpl;
      /**
       * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.
       * Whenever someone wraps the Fetch API and returns the wrong promise chain,
       * this chain becomes orphaned and there is no possible way to capture it's rejections
       * other than allowing it bubble up to this very handler. eg.
       *
       * const f = window.fetch;
       * window.fetch = function () {
       *   const p = f.apply(this, arguments);
       *
       *   p.then(function() {
       *     console.log('hi.');
       *   });
       *
       *   return p;
       * }
       *
       * `p.then(function () { ... })` is producing a completely separate promise chain,
       * however, what's returned is `p` - the result of original `fetch` call.
       *
       * This mean, that whenever we use the Fetch API to send our own requests, _and_
       * some ad-blocker blocks it, this orphaned chain will _always_ reject,
       * effectively causing another event to be captured.
       * This makes a whole process become an infinite loop, which we need to somehow
       * deal with, and break it in one way or another.
       *
       * To deal with this issue, we are making sure that we _always_ use the real
       * browser Fetch API, instead of relying on what `window.fetch` exposes.
       * The only downside to this would be missing our own requests as breadcrumbs,
       * but because we are already not doing this, it should be just fine.
       *
       * Possible failed fetch error messages per-browser:
       *
       * Chrome:  Failed to fetch
       * Edge:    Failed to Fetch
       * Firefox: NetworkError when attempting to fetch resource
       * Safari:  resource blocked by content blocker
       */

      function getNativeFetchImplementation() {
        var _a, _b;

        if (cachedFetchImpl) {
          return cachedFetchImpl;
        }
        /* eslint-disable @typescript-eslint/unbound-method */
        // Fast path to avoid DOM I/O


        if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["isNativeFetch"])(global.fetch)) {
          return cachedFetchImpl = global.fetch.bind(global);
        }

        var document = global.document;
        var fetchImpl = global.fetch; // eslint-disable-next-line deprecation/deprecation

        if (typeof ((_a = document) === null || _a === void 0 ? void 0 : _a.createElement) === "function") {
          try {
            var sandbox = document.createElement('iframe');
            sandbox.hidden = true;
            document.head.appendChild(sandbox);

            if ((_b = sandbox.contentWindow) === null || _b === void 0 ? void 0 : _b.fetch) {
              fetchImpl = sandbox.contentWindow.fetch;
            }

            document.head.removeChild(sandbox);
          } catch (e) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);
          }
        }

        return cachedFetchImpl = fetchImpl.bind(global);
        /* eslint-enable @typescript-eslint/unbound-method */
      }
      /**
       * Sends sdk client report using sendBeacon or fetch as a fallback if available
       *
       * @param url report endpoint
       * @param body report payload
       */


      function sendReport(url, body) {
        var isRealNavigator = Object.prototype.toString.call(global && global.navigator) === '[object Navigator]';
        var hasSendBeacon = isRealNavigator && typeof global.navigator.sendBeacon === 'function';

        if (hasSendBeacon) {
          // Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch
          var sendBeacon = global.navigator.sendBeacon.bind(global.navigator);
          return sendBeacon(url, body);
        }

        if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["supportsFetch"])()) {
          var fetch_1 = getNativeFetchImplementation();
          return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["forget"])(fetch_1(url, {
            body: body,
            method: 'POST',
            credentials: 'omit',
            keepalive: true
          }));
        }
      } //# sourceMappingURL=utils.js.map

      /***/

    },

    /***/
    "2Vo4":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/BehaviorSubject.js ***!
      \****************************************************************/

    /*! exports provided: BehaviorSubject */

    /***/
    function Vo4(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function () {
        return BehaviorSubject;
      });
      /* harmony import */


      var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./Subject */
      "XNiG");
      /* harmony import */


      var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./util/ObjectUnsubscribedError */
      "9ppp");

      var BehaviorSubject = /*#__PURE__*/function (_Subject__WEBPACK_IMP) {
        _inherits(BehaviorSubject, _Subject__WEBPACK_IMP);

        var _super119 = _createSuper(BehaviorSubject);

        function BehaviorSubject(_value) {
          var _this318;

          _classCallCheck(this, BehaviorSubject);

          _this318 = _super119.call(this);
          _this318._value = _value;
          return _this318;
        }

        _createClass2(BehaviorSubject, [{
          key: "value",
          get: function get() {
            return this.getValue();
          }
        }, {
          key: "_subscribe",
          value: function _subscribe(subscriber) {
            var subscription = _get(_getPrototypeOf(BehaviorSubject.prototype), "_subscribe", this).call(this, subscriber);

            if (subscription && !subscription.closed) {
              subscriber.next(this._value);
            }

            return subscription;
          }
        }, {
          key: "getValue",
          value: function getValue() {
            if (this.hasError) {
              throw this.thrownError;
            } else if (this.closed) {
              throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__["ObjectUnsubscribedError"]();
            } else {
              return this._value;
            }
          }
        }, {
          key: "next",
          value: function next(value) {
            _get(_getPrototypeOf(BehaviorSubject.prototype), "next", this).call(this, this._value = value);
          }
        }]);

        return BehaviorSubject;
      }(_Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]); //# sourceMappingURL=BehaviorSubject.js.map

      /***/

    },

    /***/
    "2bdC":
    /*!****************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/errors.js ***!
      \****************************************************/

    /*! exports provided: registerErrorInstrumentation */

    /***/
    function bdC(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "registerErrorInstrumentation", function () {
        return registerErrorInstrumentation;
      });
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _spanstatus__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./spanstatus */
      "bju/");
      /* harmony import */


      var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./utils */
      "FGHR");
      /**
       * Configures global error listeners
       */


      function registerErrorInstrumentation() {
        Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["addInstrumentationHandler"])({
          callback: errorCallback,
          type: 'error'
        });
        Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["addInstrumentationHandler"])({
          callback: errorCallback,
          type: 'unhandledrejection'
        });
      }
      /**
       * If an error or unhandled promise occurs, we mark the active transaction as failed
       */


      function errorCallback() {
        var activeTransaction = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["getActiveTransaction"])();

        if (activeTransaction) {
          _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log("[Tracing] Transaction: " + _spanstatus__WEBPACK_IMPORTED_MODULE_1__["SpanStatus"].InternalError + " -> Global error occured");

          activeTransaction.setStatus(_spanstatus__WEBPACK_IMPORTED_MODULE_1__["SpanStatus"].InternalError);
        }
      } //# sourceMappingURL=errors.js.map

      /***/

    },

    /***/
    "2fFW":
    /*!*******************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/config.js ***!
      \*******************************************************/

    /*! exports provided: config */

    /***/
    function fFW(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "config", function () {
        return config;
      });

      var _enable_super_gross_mode_that_will_cause_bad_things = false;
      var config = {
        Promise: undefined,

        set useDeprecatedSynchronousErrorHandling(value) {
          if (value) {
            var error = new Error();
            console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
          } else if (_enable_super_gross_mode_that_will_cause_bad_things) {
            console.log('RxJS: Back to a better error behavior. Thank you. <3');
          }

          _enable_super_gross_mode_that_will_cause_bad_things = value;
        },

        get useDeprecatedSynchronousErrorHandling() {
          return _enable_super_gross_mode_that_will_cause_bad_things;
        }

      }; //# sourceMappingURL=config.js.map

      /***/
    },

    /***/
    "31uO":
    /*!**********************************************************!*\
      !*** ./node_modules/@sentry/core/esm/transports/noop.js ***!
      \**********************************************************/

    /*! exports provided: NoopTransport */

    /***/
    function uO(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NoopTransport", function () {
        return NoopTransport;
      });
      /* harmony import */


      var _sentry_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/types */
      "PIsB");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /** Noop transport */


      var NoopTransport =
      /** @class */
      function () {
        function NoopTransport() {}
        /**
         * @inheritDoc
         */


        NoopTransport.prototype.sendEvent = function (_) {
          return _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["SyncPromise"].resolve({
            reason: "NoopTransport: Event has been skipped because no Dsn is configured.",
            status: _sentry_types__WEBPACK_IMPORTED_MODULE_0__["Status"].Skipped
          });
        };
        /**
         * @inheritDoc
         */


        NoopTransport.prototype.close = function (_) {
          return _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["SyncPromise"].resolve(true);
        };

        return NoopTransport;
      }(); //# sourceMappingURL=noop.js.map

      /***/

    },

    /***/
    "32Ea":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/skipWhile.js ***!
      \********************************************************************/

    /*! exports provided: skipWhile */

    /***/
    function Ea(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "skipWhile", function () {
        return skipWhile;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function skipWhile(predicate) {
        return function (source) {
          return source.lift(new SkipWhileOperator(predicate));
        };
      }

      var SkipWhileOperator = /*#__PURE__*/function () {
        function SkipWhileOperator(predicate) {
          _classCallCheck(this, SkipWhileOperator);

          this.predicate = predicate;
        }

        _createClass2(SkipWhileOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));
          }
        }]);

        return SkipWhileOperator;
      }();

      var SkipWhileSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_5) {
        _inherits(SkipWhileSubscriber, _Subscriber__WEBPACK_5);

        var _super120 = _createSuper(SkipWhileSubscriber);

        function SkipWhileSubscriber(destination, predicate) {
          var _this319;

          _classCallCheck(this, SkipWhileSubscriber);

          _this319 = _super120.call(this, destination);
          _this319.predicate = predicate;
          _this319.skipping = true;
          _this319.index = 0;
          return _this319;
        }

        _createClass2(SkipWhileSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var destination = this.destination;

            if (this.skipping) {
              this.tryCallPredicate(value);
            }

            if (!this.skipping) {
              destination.next(value);
            }
          }
        }, {
          key: "tryCallPredicate",
          value: function tryCallPredicate(value) {
            try {
              var result = this.predicate(value, this.index++);
              this.skipping = Boolean(result);
            } catch (err) {
              this.destination.error(err);
            }
          }
        }]);

        return SkipWhileSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=skipWhile.js.map

      /***/

    },

    /***/
    "39oe":
    /*!*************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/index-9e3fe806.js ***!
      \*************************************************************/

    /*! exports provided: I, s */

    /***/
    function oe(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "I", function () {
        return IonicSafeString;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "s", function () {
        return sanitizeDOMString;
      });
      /**
       * Does a simple sanitization of all elements
       * in an untrusted string
       */


      var sanitizeDOMString = function sanitizeDOMString(untrustedString) {
        try {
          if (untrustedString instanceof IonicSafeString) {
            return untrustedString.value;
          }

          if (!isSanitizerEnabled() || typeof untrustedString !== 'string' || untrustedString === '') {
            return untrustedString;
          }
          /**
           * Create a document fragment
           * separate from the main DOM,
           * create a div to do our work in
           */


          var documentFragment = document.createDocumentFragment();
          var workingDiv = document.createElement('div');
          documentFragment.appendChild(workingDiv);
          workingDiv.innerHTML = untrustedString;
          /**
           * Remove any elements
           * that are blocked
           */

          blockedTags.forEach(function (blockedTag) {
            var getElementsToRemove = documentFragment.querySelectorAll(blockedTag);

            for (var elementIndex = getElementsToRemove.length - 1; elementIndex >= 0; elementIndex--) {
              var element = getElementsToRemove[elementIndex];

              if (element.parentNode) {
                element.parentNode.removeChild(element);
              } else {
                documentFragment.removeChild(element);
              }
              /**
               * We still need to sanitize
               * the children of this element
               * as they are left behind
               */


              var childElements = getElementChildren(element);
              /* tslint:disable-next-line */

              for (var childIndex = 0; childIndex < childElements.length; childIndex++) {
                sanitizeElement(childElements[childIndex]);
              }
            }
          });
          /**
           * Go through remaining elements and remove
           * non-allowed attribs
           */
          // IE does not support .children on document fragments, only .childNodes

          var dfChildren = getElementChildren(documentFragment);
          /* tslint:disable-next-line */

          for (var childIndex = 0; childIndex < dfChildren.length; childIndex++) {
            sanitizeElement(dfChildren[childIndex]);
          } // Append document fragment to div


          var fragmentDiv = document.createElement('div');
          fragmentDiv.appendChild(documentFragment); // First child is always the div we did our work in

          var getInnerDiv = fragmentDiv.querySelector('div');
          return getInnerDiv !== null ? getInnerDiv.innerHTML : fragmentDiv.innerHTML;
        } catch (err) {
          console.error(err);
          return '';
        }
      };
      /**
       * Clean up current element based on allowed attributes
       * and then recursively dig down into any child elements to
       * clean those up as well
       */


      var sanitizeElement = function sanitizeElement(element) {
        // IE uses childNodes, so ignore nodes that are not elements
        if (element.nodeType && element.nodeType !== 1) {
          return;
        }

        for (var i = element.attributes.length - 1; i >= 0; i--) {
          var attribute = element.attributes.item(i);
          var attributeName = attribute.name; // remove non-allowed attribs

          if (!allowedAttributes.includes(attributeName.toLowerCase())) {
            element.removeAttribute(attributeName);
            continue;
          } // clean up any allowed attribs
          // that attempt to do any JS funny-business


          var attributeValue = attribute.value;
          /* tslint:disable-next-line */

          if (attributeValue != null && attributeValue.toLowerCase().includes('javascript:')) {
            element.removeAttribute(attributeName);
          }
        }
        /**
         * Sanitize any nested children
         */


        var childElements = getElementChildren(element);
        /* tslint:disable-next-line */

        for (var _i12 = 0; _i12 < childElements.length; _i12++) {
          sanitizeElement(childElements[_i12]);
        }
      };
      /**
       * IE doesn't always support .children
       * so we revert to .childNodes instead
       */


      var getElementChildren = function getElementChildren(el) {
        return el.children != null ? el.children : el.childNodes;
      };

      var isSanitizerEnabled = function isSanitizerEnabled() {
        var win = window;
        var config = win && win.Ionic && win.Ionic.config;

        if (config) {
          if (config.get) {
            return config.get('sanitizerEnabled', true);
          } else {
            return config.sanitizerEnabled === true || config.sanitizerEnabled === undefined;
          }
        }

        return true;
      };

      var allowedAttributes = ['class', 'id', 'href', 'src', 'name', 'slot'];
      var blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed'];

      var IonicSafeString = function IonicSafeString(value) {
        _classCallCheck(this, IonicSafeString);

        this.value = value;
      };
      /***/

    },

    /***/
    "3CEA":
    /*!*************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/sdk.js ***!
      \*************************************************/

    /*! exports provided: defaultIntegrations, init, showReportDialog, lastEventId, forceLoad, onLoad, flush, close, wrap */

    /***/
    function CEA(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "defaultIntegrations", function () {
        return defaultIntegrations;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "init", function () {
        return init;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "showReportDialog", function () {
        return showReportDialog;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "lastEventId", function () {
        return lastEventId;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "forceLoad", function () {
        return forceLoad;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "onLoad", function () {
        return onLoad;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "flush", function () {
        return flush;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "close", function () {
        return close;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "wrap", function () {
        return wrap;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/core */
      "wBhU");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _client__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./client */
      "kWuB");
      /* harmony import */


      var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./helpers */
      "vzc1");
      /* harmony import */


      var _integrations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./integrations */
      "4kjc");

      var defaultIntegrations = [new _sentry_core__WEBPACK_IMPORTED_MODULE_1__["Integrations"].InboundFilters(), new _sentry_core__WEBPACK_IMPORTED_MODULE_1__["Integrations"].FunctionToString(), new _integrations__WEBPACK_IMPORTED_MODULE_5__["TryCatch"](), new _integrations__WEBPACK_IMPORTED_MODULE_5__["Breadcrumbs"](), new _integrations__WEBPACK_IMPORTED_MODULE_5__["GlobalHandlers"](), new _integrations__WEBPACK_IMPORTED_MODULE_5__["LinkedErrors"](), new _integrations__WEBPACK_IMPORTED_MODULE_5__["Dedupe"](), new _integrations__WEBPACK_IMPORTED_MODULE_5__["UserAgent"]()];
      /**
       * The Sentry Browser SDK Client.
       *
       * To use this SDK, call the {@link init} function as early as possible when
       * loading the web page. To set context information or send manual events, use
       * the provided methods.
       *
       * @example
       *
       * ```
       *
       * import { init } from '@sentry/browser';
       *
       * init({
       *   dsn: '__DSN__',
       *   // ...
       * });
       * ```
       *
       * @example
       * ```
       *
       * import { configureScope } from '@sentry/browser';
       * configureScope((scope: Scope) => {
       *   scope.setExtra({ battery: 0.7 });
       *   scope.setTag({ user_mode: 'admin' });
       *   scope.setUser({ id: '4711' });
       * });
       * ```
       *
       * @example
       * ```
       *
       * import { addBreadcrumb } from '@sentry/browser';
       * addBreadcrumb({
       *   message: 'My Breadcrumb',
       *   // ...
       * });
       * ```
       *
       * @example
       *
       * ```
       *
       * import * as Sentry from '@sentry/browser';
       * Sentry.captureMessage('Hello, world!');
       * Sentry.captureException(new Error('Good bye'));
       * Sentry.captureEvent({
       *   message: 'Manual',
       *   stacktrace: [
       *     // ...
       *   ],
       * });
       * ```
       *
       * @see {@link BrowserOptions} for documentation on configuration options.
       */

      function init(options) {
        if (options === void 0) {
          options = {};
        }

        if (options.defaultIntegrations === undefined) {
          options.defaultIntegrations = defaultIntegrations;
        }

        if (options.release === undefined) {
          var window_1 = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["getGlobalObject"])(); // This supports the variable that sentry-webpack-plugin injects

          if (window_1.SENTRY_RELEASE && window_1.SENTRY_RELEASE.id) {
            options.release = window_1.SENTRY_RELEASE.id;
          }
        }

        if (options.autoSessionTracking === undefined) {
          options.autoSessionTracking = true;
        }

        if (options.sendClientReports === undefined) {
          options.sendClientReports = true;
        }

        Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["initAndBind"])(_client__WEBPACK_IMPORTED_MODULE_3__["BrowserClient"], options);

        if (options.autoSessionTracking) {
          startSessionTracking();
        }
      }
      /**
       * Present the user with a report dialog.
       *
       * @param options Everything is optional, we try to fetch all info need from the global scope.
       */


      function showReportDialog(options) {
        if (options === void 0) {
          options = {};
        }

        var hub = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])();
        var scope = hub.getScope();

        if (scope) {
          options.user = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, scope.getUser()), options.user);
        }

        if (!options.eventId) {
          options.eventId = hub.lastEventId();
        }

        var client = hub.getClient();

        if (client) {
          client.showReportDialog(options);
        }
      }
      /**
       * This is the getter for lastEventId.
       *
       * @returns The last event id of a captured event.
       */


      function lastEventId() {
        return Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])().lastEventId();
      }
      /**
       * This function is here to be API compatible with the loader.
       * @hidden
       */


      function forceLoad() {// Noop
      }
      /**
       * This function is here to be API compatible with the loader.
       * @hidden
       */


      function onLoad(callback) {
        callback();
      }
      /**
       * Call `flush()` on the current client, if there is one. See {@link Client.flush}.
       *
       * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause
       * the client to wait until all events are sent before resolving the promise.
       * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
       * doesn't (or if there's no client defined).
       */


      function flush(timeout) {
        var client = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])().getClient();

        if (client) {
          return client.flush(timeout);
        }

        _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].warn('Cannot flush events. No client defined.');

        return _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["SyncPromise"].resolve(false);
      }
      /**
       * Call `close()` on the current client, if there is one. See {@link Client.close}.
       *
       * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this
       * parameter will cause the client to wait until all events are sent before disabling itself.
       * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
       * doesn't (or if there's no client defined).
       */


      function close(timeout) {
        var client = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])().getClient();

        if (client) {
          return client.close(timeout);
        }

        _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].warn('Cannot flush events and disable SDK. No client defined.');

        return _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["SyncPromise"].resolve(false);
      }
      /**
       * Wrap code within a try/catch block so the SDK is able to capture errors.
       *
       * @param fn A function to wrap.
       *
       * @returns The result of wrapped function call.
       */
      // eslint-disable-next-line @typescript-eslint/no-explicit-any


      function wrap(fn) {
        return Object(_helpers__WEBPACK_IMPORTED_MODULE_4__["wrap"])(fn)();
      }
      /**
       * Enable automatic Session Tracking for the initial page load.
       */


      function startSessionTracking() {
        var window = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["getGlobalObject"])();
        var document = window.document;

        if (typeof document === 'undefined') {
          _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].warn('Session tracking in non-browser environment with @sentry/browser is not supported.');

          return;
        }

        var hub = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])(); // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and
        // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are
        // pinned at the same version in package.json, but there are edge cases where it's possible. See
        // https://github.com/getsentry/sentry-javascript/issues/3207 and
        // https://github.com/getsentry/sentry-javascript/issues/3234 and
        // https://github.com/getsentry/sentry-javascript/issues/3278.

        if (typeof hub.startSession !== 'function' || typeof hub.captureSession !== 'function') {
          return;
        } // The session duration for browser sessions does not track a meaningful
        // concept that can be used as a metric.
        // Automatically captured sessions are akin to page views, and thus we
        // discard their duration.


        hub.startSession({
          ignoreDuration: true
        });
        hub.captureSession(); // We want to create a session for every navigation as well

        Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["addInstrumentationHandler"])({
          callback: function callback(_a) {
            var from = _a.from,
                to = _a.to; // Don't create an additional session for the initial route or if the location did not change

            if (from === undefined || from === to) {
              return;
            }

            hub.startSession({
              ignoreDuration: true
            });
            hub.captureSession();
          },
          type: 'history'
        });
      } //# sourceMappingURL=sdk.js.map

      /***/

    },

    /***/
    "3E0/":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/delay.js ***!
      \****************************************************************/

    /*! exports provided: delay */

    /***/
    function E0(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "delay", function () {
        return delay;
      });
      /* harmony import */


      var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../scheduler/async */
      "D0XW");
      /* harmony import */


      var _util_isDate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/isDate */
      "mlxB");
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _Notification__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../Notification */
      "WMd4");

      function delay(delay) {
        var scheduler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
        var absoluteDelay = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_1__["isDate"])(delay);
        var delayFor = absoluteDelay ? +delay - scheduler.now() : Math.abs(delay);
        return function (source) {
          return source.lift(new DelayOperator(delayFor, scheduler));
        };
      }

      var DelayOperator = /*#__PURE__*/function () {
        function DelayOperator(delay, scheduler) {
          _classCallCheck(this, DelayOperator);

          this.delay = delay;
          this.scheduler = scheduler;
        }

        _createClass2(DelayOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));
          }
        }]);

        return DelayOperator;
      }();

      var DelaySubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_6) {
        _inherits(DelaySubscriber, _Subscriber__WEBPACK_6);

        var _super121 = _createSuper(DelaySubscriber);

        function DelaySubscriber(destination, delay, scheduler) {
          var _this320;

          _classCallCheck(this, DelaySubscriber);

          _this320 = _super121.call(this, destination);
          _this320.delay = delay;
          _this320.scheduler = scheduler;
          _this320.queue = [];
          _this320.active = false;
          _this320.errored = false;
          return _this320;
        }

        _createClass2(DelaySubscriber, [{
          key: "_schedule",
          value: function _schedule(scheduler) {
            this.active = true;
            var destination = this.destination;
            destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {
              source: this,
              destination: this.destination,
              scheduler: scheduler
            }));
          }
        }, {
          key: "scheduleNotification",
          value: function scheduleNotification(notification) {
            if (this.errored === true) {
              return;
            }

            var scheduler = this.scheduler;
            var message = new DelayMessage(scheduler.now() + this.delay, notification);
            this.queue.push(message);

            if (this.active === false) {
              this._schedule(scheduler);
            }
          }
        }, {
          key: "_next",
          value: function _next(value) {
            this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_3__["Notification"].createNext(value));
          }
        }, {
          key: "_error",
          value: function _error(err) {
            this.errored = true;
            this.queue = [];
            this.destination.error(err);
            this.unsubscribe();
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_3__["Notification"].createComplete());
            this.unsubscribe();
          }
        }], [{
          key: "dispatch",
          value: function dispatch(state) {
            var source = state.source;
            var queue = source.queue;
            var scheduler = state.scheduler;
            var destination = state.destination;

            while (queue.length > 0 && queue[0].time - scheduler.now() <= 0) {
              queue.shift().notification.observe(destination);
            }

            if (queue.length > 0) {
              var _delay2 = Math.max(0, queue[0].time - scheduler.now());

              this.schedule(state, _delay2);
            } else {
              this.unsubscribe();
              source.active = false;
            }
          }
        }]);

        return DelaySubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]);

      var DelayMessage = function DelayMessage(time, notification) {
        _classCallCheck(this, DelayMessage);

        this.time = time;
        this.notification = notification;
      }; //# sourceMappingURL=delay.js.map

      /***/

    },

    /***/
    "3MsT":
    /*!**********************************************!*\
      !*** ./node_modules/@sentry/core/esm/api.js ***!
      \**********************************************/

    /*! exports provided: API */

    /***/
    function MsT(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "API", function () {
        return API;
      });
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");

      var SENTRY_API_VERSION = '7';
      /**
       * Helper class to provide urls, headers and metadata that can be used to form
       * different types of requests to Sentry endpoints.
       * Supports both envelopes and regular event requests.
       **/

      var API =
      /** @class */
      function () {
        /** Create a new instance of API */
        function API(dsn, metadata, tunnel) {
          if (metadata === void 0) {
            metadata = {};
          }

          this.dsn = dsn;
          this._dsnObject = new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["Dsn"](dsn);
          this.metadata = metadata;
          this._tunnel = tunnel;
        }
        /** Returns the Dsn object. */


        API.prototype.getDsn = function () {
          return this._dsnObject;
        };
        /** Does this transport force envelopes? */


        API.prototype.forceEnvelope = function () {
          return !!this._tunnel;
        };
        /** Returns the prefix to construct Sentry ingestion API endpoints. */


        API.prototype.getBaseApiEndpoint = function () {
          var dsn = this.getDsn();
          var protocol = dsn.protocol ? dsn.protocol + ":" : '';
          var port = dsn.port ? ":" + dsn.port : '';
          return protocol + "//" + dsn.host + port + (dsn.path ? "/" + dsn.path : '') + "/api/";
        };
        /** Returns the store endpoint URL. */


        API.prototype.getStoreEndpoint = function () {
          return this._getIngestEndpoint('store');
        };
        /**
         * Returns the store endpoint URL with auth in the query string.
         *
         * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.
         */


        API.prototype.getStoreEndpointWithUrlEncodedAuth = function () {
          return this.getStoreEndpoint() + "?" + this._encodedAuth();
        };
        /**
         * Returns the envelope endpoint URL with auth in the query string.
         *
         * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.
         */


        API.prototype.getEnvelopeEndpointWithUrlEncodedAuth = function () {
          if (this.forceEnvelope()) {
            return this._tunnel;
          }

          return this._getEnvelopeEndpoint() + "?" + this._encodedAuth();
        };
        /** Returns only the path component for the store endpoint. */


        API.prototype.getStoreEndpointPath = function () {
          var dsn = this.getDsn();
          return (dsn.path ? "/" + dsn.path : '') + "/api/" + dsn.projectId + "/store/";
        };
        /**
         * Returns an object that can be used in request headers.
         * This is needed for node and the old /store endpoint in sentry
         */


        API.prototype.getRequestHeaders = function (clientName, clientVersion) {
          // CHANGE THIS to use metadata but keep clientName and clientVersion compatible
          var dsn = this.getDsn();
          var header = ["Sentry sentry_version=" + SENTRY_API_VERSION];
          header.push("sentry_client=" + clientName + "/" + clientVersion);
          header.push("sentry_key=" + dsn.publicKey);

          if (dsn.pass) {
            header.push("sentry_secret=" + dsn.pass);
          }

          return {
            'Content-Type': 'application/json',
            'X-Sentry-Auth': header.join(', ')
          };
        };
        /** Returns the url to the report dialog endpoint. */


        API.prototype.getReportDialogEndpoint = function (dialogOptions) {
          if (dialogOptions === void 0) {
            dialogOptions = {};
          }

          var dsn = this.getDsn();
          var endpoint = this.getBaseApiEndpoint() + "embed/error-page/";
          var encodedOptions = [];
          encodedOptions.push("dsn=" + dsn.toString());

          for (var key in dialogOptions) {
            if (key === 'dsn') {
              continue;
            }

            if (key === 'user') {
              if (!dialogOptions.user) {
                continue;
              }

              if (dialogOptions.user.name) {
                encodedOptions.push("name=" + encodeURIComponent(dialogOptions.user.name));
              }

              if (dialogOptions.user.email) {
                encodedOptions.push("email=" + encodeURIComponent(dialogOptions.user.email));
              }
            } else {
              encodedOptions.push(encodeURIComponent(key) + "=" + encodeURIComponent(dialogOptions[key]));
            }
          }

          if (encodedOptions.length) {
            return endpoint + "?" + encodedOptions.join('&');
          }

          return endpoint;
        };
        /** Returns the envelope endpoint URL. */


        API.prototype._getEnvelopeEndpoint = function () {
          return this._getIngestEndpoint('envelope');
        };
        /** Returns the ingest API endpoint for target. */


        API.prototype._getIngestEndpoint = function (target) {
          if (this._tunnel) {
            return this._tunnel;
          }

          var base = this.getBaseApiEndpoint();
          var dsn = this.getDsn();
          return "" + base + dsn.projectId + "/" + target + "/";
        };
        /** Returns a URL-encoded string with auth config suitable for a query string. */


        API.prototype._encodedAuth = function () {
          var dsn = this.getDsn();
          var auth = {
            // We send only the minimum set of required information. See
            // https://github.com/getsentry/sentry-javascript/issues/2572.
            sentry_key: dsn.publicKey,
            sentry_version: SENTRY_API_VERSION
          };
          return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["urlEncode"])(auth);
        };

        return API;
      }(); //# sourceMappingURL=api.js.map

      /***/

    },

    /***/
    "3N8a":
    /*!**********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsyncAction.js ***!
      \**********************************************************************/

    /*! exports provided: AsyncAction */

    /***/
    function N8a(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AsyncAction", function () {
        return AsyncAction;
      });
      /* harmony import */


      var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./Action */
      "7ve7");

      var AsyncAction = /*#__PURE__*/function (_Action__WEBPACK_IMPO) {
        _inherits(AsyncAction, _Action__WEBPACK_IMPO);

        var _super122 = _createSuper(AsyncAction);

        function AsyncAction(scheduler, work) {
          var _this321;

          _classCallCheck(this, AsyncAction);

          _this321 = _super122.call(this, scheduler, work);
          _this321.scheduler = scheduler;
          _this321.work = work;
          _this321.pending = false;
          return _this321;
        }

        _createClass2(AsyncAction, [{
          key: "schedule",
          value: function schedule(state) {
            var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;

            if (this.closed) {
              return this;
            }

            this.state = state;
            var id = this.id;
            var scheduler = this.scheduler;

            if (id != null) {
              this.id = this.recycleAsyncId(scheduler, id, delay);
            }

            this.pending = true;
            this.delay = delay;
            this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
            return this;
          }
        }, {
          key: "requestAsyncId",
          value: function requestAsyncId(scheduler, id) {
            var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
            return setInterval(scheduler.flush.bind(scheduler, this), delay);
          }
        }, {
          key: "recycleAsyncId",
          value: function recycleAsyncId(scheduler, id) {
            var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;

            if (delay !== null && this.delay === delay && this.pending === false) {
              return id;
            }

            clearInterval(id);
            return undefined;
          }
        }, {
          key: "execute",
          value: function execute(state, delay) {
            if (this.closed) {
              return new Error('executing a cancelled action');
            }

            this.pending = false;

            var error = this._execute(state, delay);

            if (error) {
              return error;
            } else if (this.pending === false && this.id != null) {
              this.id = this.recycleAsyncId(this.scheduler, this.id, null);
            }
          }
        }, {
          key: "_execute",
          value: function _execute(state, delay) {
            var errored = false;
            var errorValue = undefined;

            try {
              this.work(state);
            } catch (e) {
              errored = true;
              errorValue = !!e && e || new Error(e);
            }

            if (errored) {
              this.unsubscribe();
              return errorValue;
            }
          }
        }, {
          key: "_unsubscribe",
          value: function _unsubscribe() {
            var id = this.id;
            var scheduler = this.scheduler;
            var actions = scheduler.actions;
            var index = actions.indexOf(this);
            this.work = null;
            this.state = null;
            this.pending = false;
            this.scheduler = null;

            if (index !== -1) {
              actions.splice(index, 1);
            }

            if (id != null) {
              this.id = this.recycleAsyncId(scheduler, id, null);
            }

            this.delay = null;
          }
        }]);

        return AsyncAction;
      }(_Action__WEBPACK_IMPORTED_MODULE_0__["Action"]); //# sourceMappingURL=AsyncAction.js.map

      /***/

    },

    /***/
    "3Pt+":
    /*!********************************************************************!*\
      !*** ./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js ***!
      \********************************************************************/

    /*! exports provided: AbstractControl, AbstractControlDirective, AbstractFormGroupDirective, COMPOSITION_BUFFER_MODE, CheckboxControlValueAccessor, CheckboxRequiredValidator, ControlContainer, DefaultValueAccessor, EmailValidator, FormArray, FormArrayName, FormBuilder, FormControl, FormControlDirective, FormControlName, FormGroup, FormGroupDirective, FormGroupName, FormsModule, MaxLengthValidator, MinLengthValidator, NG_ASYNC_VALIDATORS, NG_VALIDATORS, NG_VALUE_ACCESSOR, NgControl, NgControlStatus, NgControlStatusGroup, NgForm, NgModel, NgModelGroup, NgSelectOption, NumberValueAccessor, PatternValidator, RadioControlValueAccessor, RangeValueAccessor, ReactiveFormsModule, RequiredValidator, SelectControlValueAccessor, SelectMultipleControlValueAccessor, VERSION, Validators, ɵInternalFormsSharedModule, ɵNgNoValidate, ɵNgSelectMultipleOption, ɵangular_packages_forms_forms_a, ɵangular_packages_forms_forms_b, ɵangular_packages_forms_forms_ba, ɵangular_packages_forms_forms_bb, ɵangular_packages_forms_forms_bc, ɵangular_packages_forms_forms_bd, ɵangular_packages_forms_forms_be, ɵangular_packages_forms_forms_c, ɵangular_packages_forms_forms_d, ɵangular_packages_forms_forms_e, ɵangular_packages_forms_forms_f, ɵangular_packages_forms_forms_g, ɵangular_packages_forms_forms_h, ɵangular_packages_forms_forms_i, ɵangular_packages_forms_forms_j, ɵangular_packages_forms_forms_k, ɵangular_packages_forms_forms_l, ɵangular_packages_forms_forms_m, ɵangular_packages_forms_forms_n, ɵangular_packages_forms_forms_o, ɵangular_packages_forms_forms_p, ɵangular_packages_forms_forms_q, ɵangular_packages_forms_forms_r, ɵangular_packages_forms_forms_s, ɵangular_packages_forms_forms_t, ɵangular_packages_forms_forms_u, ɵangular_packages_forms_forms_v, ɵangular_packages_forms_forms_w, ɵangular_packages_forms_forms_x, ɵangular_packages_forms_forms_y, ɵangular_packages_forms_forms_z */

    /***/
    function Pt(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AbstractControl", function () {
        return AbstractControl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AbstractControlDirective", function () {
        return AbstractControlDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AbstractFormGroupDirective", function () {
        return AbstractFormGroupDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "COMPOSITION_BUFFER_MODE", function () {
        return COMPOSITION_BUFFER_MODE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CheckboxControlValueAccessor", function () {
        return CheckboxControlValueAccessor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CheckboxRequiredValidator", function () {
        return CheckboxRequiredValidator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ControlContainer", function () {
        return ControlContainer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DefaultValueAccessor", function () {
        return DefaultValueAccessor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "EmailValidator", function () {
        return EmailValidator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormArray", function () {
        return FormArray;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormArrayName", function () {
        return FormArrayName;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormBuilder", function () {
        return FormBuilder;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormControl", function () {
        return FormControl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormControlDirective", function () {
        return FormControlDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormControlName", function () {
        return FormControlName;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormGroup", function () {
        return FormGroup;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormGroupDirective", function () {
        return FormGroupDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormGroupName", function () {
        return FormGroupName;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormsModule", function () {
        return FormsModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MaxLengthValidator", function () {
        return MaxLengthValidator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MinLengthValidator", function () {
        return MinLengthValidator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NG_ASYNC_VALIDATORS", function () {
        return NG_ASYNC_VALIDATORS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NG_VALIDATORS", function () {
        return NG_VALIDATORS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NG_VALUE_ACCESSOR", function () {
        return NG_VALUE_ACCESSOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgControl", function () {
        return NgControl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgControlStatus", function () {
        return NgControlStatus;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgControlStatusGroup", function () {
        return NgControlStatusGroup;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgForm", function () {
        return NgForm;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgModel", function () {
        return NgModel;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgModelGroup", function () {
        return NgModelGroup;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgSelectOption", function () {
        return NgSelectOption;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NumberValueAccessor", function () {
        return NumberValueAccessor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PatternValidator", function () {
        return PatternValidator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RadioControlValueAccessor", function () {
        return RadioControlValueAccessor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RangeValueAccessor", function () {
        return RangeValueAccessor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ReactiveFormsModule", function () {
        return ReactiveFormsModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RequiredValidator", function () {
        return RequiredValidator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SelectControlValueAccessor", function () {
        return SelectControlValueAccessor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SelectMultipleControlValueAccessor", function () {
        return SelectMultipleControlValueAccessor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VERSION", function () {
        return VERSION;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Validators", function () {
        return Validators;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵInternalFormsSharedModule", function () {
        return ɵInternalFormsSharedModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNgNoValidate", function () {
        return ɵNgNoValidate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNgSelectMultipleOption", function () {
        return ɵNgSelectMultipleOption;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_a", function () {
        return SHARED_FORM_DIRECTIVES;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_b", function () {
        return TEMPLATE_DRIVEN_DIRECTIVES;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_ba", function () {
        return CHECKBOX_REQUIRED_VALIDATOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_bb", function () {
        return EMAIL_VALIDATOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_bc", function () {
        return MIN_LENGTH_VALIDATOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_bd", function () {
        return MAX_LENGTH_VALIDATOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_be", function () {
        return PATTERN_VALIDATOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_c", function () {
        return REACTIVE_DRIVEN_DIRECTIVES;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_d", function () {
        return ɵInternalFormsSharedModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_e", function () {
        return CHECKBOX_VALUE_ACCESSOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_f", function () {
        return DEFAULT_VALUE_ACCESSOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_g", function () {
        return AbstractControlStatus;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_h", function () {
        return ngControlStatusHost;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_i", function () {
        return formDirectiveProvider;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_j", function () {
        return formControlBinding;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_k", function () {
        return modelGroupProvider;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_l", function () {
        return NUMBER_VALUE_ACCESSOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_m", function () {
        return RADIO_VALUE_ACCESSOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_n", function () {
        return RadioControlRegistry;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_o", function () {
        return RANGE_VALUE_ACCESSOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_p", function () {
        return NG_MODEL_WITH_FORM_CONTROL_WARNING;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_q", function () {
        return formControlBinding$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_r", function () {
        return controlNameBinding;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_s", function () {
        return formDirectiveProvider$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_t", function () {
        return formGroupNameProvider;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_u", function () {
        return formArrayNameProvider;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_v", function () {
        return SELECT_VALUE_ACCESSOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_w", function () {
        return SELECT_MULTIPLE_VALUE_ACCESSOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_x", function () {
        return ɵNgSelectMultipleOption;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_y", function () {
        return ɵNgNoValidate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_z", function () {
        return REQUIRED_VALIDATOR;
      });
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/common */
      "ofXK");
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! rxjs */
      "qCKp");
      /* harmony import */


      var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! rxjs/operators */
      "kU1M");
      /**
       * @license Angular v11.0.9
       * (c) 2010-2020 Google LLC. https://angular.io/
       * License: MIT
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Used to provide a `ControlValueAccessor` for form controls.
       *
       * See `DefaultValueAccessor` for how to implement one.
       *
       * @publicApi
       */


      var NG_VALUE_ACCESSOR = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('NgValueAccessor');
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var CHECKBOX_VALUE_ACCESSOR = {
        provide: NG_VALUE_ACCESSOR,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return CheckboxControlValueAccessor;
        }),
        multi: true
      };
      /**
       * @description
       * A `ControlValueAccessor` for writing a value and listening to changes on a checkbox input
       * element.
       *
       * @usageNotes
       *
       * ### Using a checkbox with a reactive form.
       *
       * The following example shows how to use a checkbox with a reactive form.
       *
       * ```ts
       * const rememberLoginControl = new FormControl();
       * ```
       *
       * ```
       * <input type="checkbox" [formControl]="rememberLoginControl">
       * ```
       *
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       * @publicApi
       */

      var CheckboxControlValueAccessor = /*#__PURE__*/function () {
        function CheckboxControlValueAccessor(_renderer, _elementRef) {
          _classCallCheck(this, CheckboxControlValueAccessor);

          this._renderer = _renderer;
          this._elementRef = _elementRef;
          /**
           * The registered callback function called when a change event occurs on the input element.
           * @nodoc
           */

          this.onChange = function (_) {};
          /**
           * The registered callback function called when a blur event occurs on the input element.
           * @nodoc
           */


          this.onTouched = function () {};
        }
        /**
         * Sets the "checked" property on the input element.
         * @nodoc
         */


        _createClass2(CheckboxControlValueAccessor, [{
          key: "writeValue",
          value: function writeValue(value) {
            this._renderer.setProperty(this._elementRef.nativeElement, 'checked', value);
          }
          /**
           * Registers a function called when the control value changes.
           * @nodoc
           */

        }, {
          key: "registerOnChange",
          value: function registerOnChange(fn) {
            this.onChange = fn;
          }
          /**
           * Registers a function called when the control is touched.
           * @nodoc
           */

        }, {
          key: "registerOnTouched",
          value: function registerOnTouched(fn) {
            this.onTouched = fn;
          }
          /**
           * Sets the "disabled" property on the input element.
           * @nodoc
           */

        }, {
          key: "setDisabledState",
          value: function setDisabledState(isDisabled) {
            this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
          }
        }]);

        return CheckboxControlValueAccessor;
      }();

      CheckboxControlValueAccessor.ɵfac = function CheckboxControlValueAccessor_Factory(t) {
        return new (t || CheckboxControlValueAccessor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]));
      };

      CheckboxControlValueAccessor.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: CheckboxControlValueAccessor,
        selectors: [["input", "type", "checkbox", "formControlName", ""], ["input", "type", "checkbox", "formControl", ""], ["input", "type", "checkbox", "ngModel", ""]],
        hostBindings: function CheckboxControlValueAccessor_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("change", function CheckboxControlValueAccessor_change_HostBindingHandler($event) {
              return ctx.onChange($event.target.checked);
            })("blur", function CheckboxControlValueAccessor_blur_HostBindingHandler() {
              return ctx.onTouched();
            });
          }
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([CHECKBOX_VALUE_ACCESSOR])]
      });

      CheckboxControlValueAccessor.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CheckboxControlValueAccessor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: 'input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]',
            host: {
              '(change)': 'onChange($event.target.checked)',
              '(blur)': 'onTouched()'
            },
            providers: [CHECKBOX_VALUE_ACCESSOR]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var DEFAULT_VALUE_ACCESSOR = {
        provide: NG_VALUE_ACCESSOR,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return DefaultValueAccessor;
        }),
        multi: true
      };
      /**
       * We must check whether the agent is Android because composition events
       * behave differently between iOS and Android.
       */

      function _isAndroid() {
        var userAgent = Object(_angular_common__WEBPACK_IMPORTED_MODULE_1__["ɵgetDOM"])() ? Object(_angular_common__WEBPACK_IMPORTED_MODULE_1__["ɵgetDOM"])().getUserAgent() : '';
        return /android (\d+)/.test(userAgent.toLowerCase());
      }
      /**
       * @description
       * Provide this token to control if form directives buffer IME input until
       * the "compositionend" event occurs.
       * @publicApi
       */


      var COMPOSITION_BUFFER_MODE = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('CompositionEventMode');
      /**
       * @description
       *
       * {@searchKeywords ngDefaultControl}
       *
       * The default `ControlValueAccessor` for writing a value and listening to changes on input
       * elements. The accessor is used by the `FormControlDirective`, `FormControlName`, and
       * `NgModel` directives.
       *
       * @usageNotes
       *
       * ### Using the default value accessor
       *
       * The following example shows how to use an input element that activates the default value accessor
       * (in this case, a text field).
       *
       * ```ts
       * const firstNameControl = new FormControl();
       * ```
       *
       * ```
       * <input type="text" [formControl]="firstNameControl">
       * ```
       *
       * This value accessor is used by default for `<input type="text">` and `<textarea>` elements, but
       * you could also use it for custom components that have similar behavior and do not require special
       * processing. In order to attach the default value accessor to a custom element, add the
       * `ngDefaultControl` attribute as shown below.
       *
       * ```
       * <custom-input-component ngDefaultControl [(ngModel)]="value"></custom-input-component>
       * ```
       *
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       * @publicApi
       */

      var DefaultValueAccessor = /*#__PURE__*/function () {
        function DefaultValueAccessor(_renderer, _elementRef, _compositionMode) {
          _classCallCheck(this, DefaultValueAccessor);

          this._renderer = _renderer;
          this._elementRef = _elementRef;
          this._compositionMode = _compositionMode;
          /**
           * The registered callback function called when an input event occurs on the input element.
           * @nodoc
           */

          this.onChange = function (_) {};
          /**
           * The registered callback function called when a blur event occurs on the input element.
           * @nodoc
           */


          this.onTouched = function () {};
          /** Whether the user is creating a composition string (IME events). */


          this._composing = false;

          if (this._compositionMode == null) {
            this._compositionMode = !_isAndroid();
          }
        }
        /**
         * Sets the "value" property on the input element.
         * @nodoc
         */


        _createClass2(DefaultValueAccessor, [{
          key: "writeValue",
          value: function writeValue(value) {
            var normalizedValue = value == null ? '' : value;

            this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);
          }
          /**
           * Registers a function called when the control value changes.
           * @nodoc
           */

        }, {
          key: "registerOnChange",
          value: function registerOnChange(fn) {
            this.onChange = fn;
          }
          /**
           * Registers a function called when the control is touched.
           * @nodoc
           */

        }, {
          key: "registerOnTouched",
          value: function registerOnTouched(fn) {
            this.onTouched = fn;
          }
          /**
           * Sets the "disabled" property on the input element.
           * @nodoc
           */

        }, {
          key: "setDisabledState",
          value: function setDisabledState(isDisabled) {
            this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
          }
          /** @internal */

        }, {
          key: "_handleInput",
          value: function _handleInput(value) {
            if (!this._compositionMode || this._compositionMode && !this._composing) {
              this.onChange(value);
            }
          }
          /** @internal */

        }, {
          key: "_compositionStart",
          value: function _compositionStart() {
            this._composing = true;
          }
          /** @internal */

        }, {
          key: "_compositionEnd",
          value: function _compositionEnd(value) {
            this._composing = false;
            this._compositionMode && this.onChange(value);
          }
        }]);

        return DefaultValueAccessor;
      }();

      DefaultValueAccessor.ɵfac = function DefaultValueAccessor_Factory(t) {
        return new (t || DefaultValueAccessor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](COMPOSITION_BUFFER_MODE, 8));
      };

      DefaultValueAccessor.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: DefaultValueAccessor,
        selectors: [["input", "formControlName", "", 3, "type", "checkbox"], ["textarea", "formControlName", ""], ["input", "formControl", "", 3, "type", "checkbox"], ["textarea", "formControl", ""], ["input", "ngModel", "", 3, "type", "checkbox"], ["textarea", "ngModel", ""], ["", "ngDefaultControl", ""]],
        hostBindings: function DefaultValueAccessor_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("input", function DefaultValueAccessor_input_HostBindingHandler($event) {
              return ctx._handleInput($event.target.value);
            })("blur", function DefaultValueAccessor_blur_HostBindingHandler() {
              return ctx.onTouched();
            })("compositionstart", function DefaultValueAccessor_compositionstart_HostBindingHandler() {
              return ctx._compositionStart();
            })("compositionend", function DefaultValueAccessor_compositionend_HostBindingHandler($event) {
              return ctx._compositionEnd($event.target.value);
            });
          }
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([DEFAULT_VALUE_ACCESSOR])]
      });

      DefaultValueAccessor.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }, {
          type: Boolean,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [COMPOSITION_BUFFER_MODE]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DefaultValueAccessor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: 'input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]',
            // TODO: vsavkin replace the above selector with the one below it once
            // https://github.com/angular/angular/issues/3011 is implemented
            // selector: '[ngModel],[formControl],[formControlName]',
            host: {
              '(input)': '$any(this)._handleInput($event.target.value)',
              '(blur)': 'onTouched()',
              '(compositionstart)': '$any(this)._compositionStart()',
              '(compositionend)': '$any(this)._compositionEnd($event.target.value)'
            },
            providers: [DEFAULT_VALUE_ACCESSOR]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }, {
            type: Boolean,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [COMPOSITION_BUFFER_MODE]
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function isEmptyInputValue(value) {
        // we don't check for string here so it also works with arrays
        return value == null || value.length === 0;
      }

      function hasValidLength(value) {
        // non-strict comparison is intentional, to check for both `null` and `undefined` values
        return value != null && typeof value.length === 'number';
      }
      /**
       * @description
       * An `InjectionToken` for registering additional synchronous validators used with
       * `AbstractControl`s.
       *
       * @see `NG_ASYNC_VALIDATORS`
       *
       * @usageNotes
       *
       * ### Providing a custom validator
       *
       * The following example registers a custom validator directive. Adding the validator to the
       * existing collection of validators requires the `multi: true` option.
       *
       * ```typescript
       * @Directive({
       *   selector: '[customValidator]',
       *   providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]
       * })
       * class CustomValidatorDirective implements Validator {
       *   validate(control: AbstractControl): ValidationErrors | null {
       *     return { 'custom': true };
       *   }
       * }
       * ```
       *
       * @publicApi
       */


      var NG_VALIDATORS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('NgValidators');
      /**
       * @description
       * An `InjectionToken` for registering additional asynchronous validators used with
       * `AbstractControl`s.
       *
       * @see `NG_VALIDATORS`
       *
       * @publicApi
       */

      var NG_ASYNC_VALIDATORS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('NgAsyncValidators');
      /**
       * A regular expression that matches valid e-mail addresses.
       *
       * At a high level, this regexp matches e-mail addresses of the format `local-part@tld`, where:
       * - `local-part` consists of one or more of the allowed characters (alphanumeric and some
       *   punctuation symbols).
       * - `local-part` cannot begin or end with a period (`.`).
       * - `local-part` cannot be longer than 64 characters.
       * - `tld` consists of one or more `labels` separated by periods (`.`). For example `localhost` or
       *   `foo.com`.
       * - A `label` consists of one or more of the allowed characters (alphanumeric, dashes (`-`) and
       *   periods (`.`)).
       * - A `label` cannot begin or end with a dash (`-`) or a period (`.`).
       * - A `label` cannot be longer than 63 characters.
       * - The whole address cannot be longer than 254 characters.
       *
       * ## Implementation background
       *
       * This regexp was ported over from AngularJS (see there for git history):
       * https://github.com/angular/angular.js/blob/c133ef836/src/ng/directive/input.js#L27
       * It is based on the
       * [WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with
       * some enhancements to incorporate more RFC rules (such as rules related to domain names and the
       * lengths of different parts of the address). The main differences from the WHATWG version are:
       *   - Disallow `local-part` to begin or end with a period (`.`).
       *   - Disallow `local-part` length to exceed 64 characters.
       *   - Disallow total address length to exceed 254 characters.
       *
       * See [this commit](https://github.com/angular/angular.js/commit/f3f5cf72e) for more details.
       */

      var EMAIL_REGEXP = /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
      /**
       * @description
       * Provides a set of built-in validators that can be used by form controls.
       *
       * A validator is a function that processes a `FormControl` or collection of
       * controls and returns an error map or null. A null map means that validation has passed.
       *
       * @see [Form Validation](/guide/form-validation)
       *
       * @publicApi
       */

      var Validators = /*#__PURE__*/function () {
        function Validators() {
          _classCallCheck(this, Validators);
        }

        _createClass2(Validators, null, [{
          key: "min",
          value:
          /**
           * @description
           * Validator that requires the control's value to be greater than or equal to the provided number.
           * The validator exists only as a function and not as a directive.
           *
           * @usageNotes
           *
           * ### Validate against a minimum of 3
           *
           * ```typescript
           * const control = new FormControl(2, Validators.min(3));
           *
           * console.log(control.errors); // {min: {min: 3, actual: 2}}
           * ```
           *
           * @returns A validator function that returns an error map with the
           * `min` property if the validation check fails, otherwise `null`.
           *
           * @see `updateValueAndValidity()`
           *
           */
          function min(_min) {
            return function (control) {
              if (isEmptyInputValue(control.value) || isEmptyInputValue(_min)) {
                return null; // don't validate empty values to allow optional controls
              }

              var value = parseFloat(control.value); // Controls with NaN values after parsing should be treated as not having a
              // minimum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-min

              return !isNaN(value) && value < _min ? {
                'min': {
                  'min': _min,
                  'actual': control.value
                }
              } : null;
            };
          }
          /**
           * @description
           * Validator that requires the control's value to be less than or equal to the provided number.
           * The validator exists only as a function and not as a directive.
           *
           * @usageNotes
           *
           * ### Validate against a maximum of 15
           *
           * ```typescript
           * const control = new FormControl(16, Validators.max(15));
           *
           * console.log(control.errors); // {max: {max: 15, actual: 16}}
           * ```
           *
           * @returns A validator function that returns an error map with the
           * `max` property if the validation check fails, otherwise `null`.
           *
           * @see `updateValueAndValidity()`
           *
           */

        }, {
          key: "max",
          value: function max(_max) {
            return function (control) {
              if (isEmptyInputValue(control.value) || isEmptyInputValue(_max)) {
                return null; // don't validate empty values to allow optional controls
              }

              var value = parseFloat(control.value); // Controls with NaN values after parsing should be treated as not having a
              // maximum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-max

              return !isNaN(value) && value > _max ? {
                'max': {
                  'max': _max,
                  'actual': control.value
                }
              } : null;
            };
          }
          /**
           * @description
           * Validator that requires the control have a non-empty value.
           *
           * @usageNotes
           *
           * ### Validate that the field is non-empty
           *
           * ```typescript
           * const control = new FormControl('', Validators.required);
           *
           * console.log(control.errors); // {required: true}
           * ```
           *
           * @returns An error map with the `required` property
           * if the validation check fails, otherwise `null`.
           *
           * @see `updateValueAndValidity()`
           *
           */

        }, {
          key: "required",
          value: function required(control) {
            return isEmptyInputValue(control.value) ? {
              'required': true
            } : null;
          }
          /**
           * @description
           * Validator that requires the control's value be true. This validator is commonly
           * used for required checkboxes.
           *
           * @usageNotes
           *
           * ### Validate that the field value is true
           *
           * ```typescript
           * const control = new FormControl('', Validators.requiredTrue);
           *
           * console.log(control.errors); // {required: true}
           * ```
           *
           * @returns An error map that contains the `required` property
           * set to `true` if the validation check fails, otherwise `null`.
           *
           * @see `updateValueAndValidity()`
           *
           */

        }, {
          key: "requiredTrue",
          value: function requiredTrue(control) {
            return control.value === true ? null : {
              'required': true
            };
          }
          /**
           * @description
           * Validator that requires the control's value pass an email validation test.
           *
           * Tests the value using a [regular
           * expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)
           * pattern suitable for common usecases. The pattern is based on the definition of a valid email
           * address in the [WHATWG HTML
           * specification](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with
           * some enhancements to incorporate more RFC rules (such as rules related to domain names and the
           * lengths of different parts of the address).
           *
           * The differences from the WHATWG version include:
           * - Disallow `local-part` (the part before the `@` symbol) to begin or end with a period (`.`).
           * - Disallow `local-part` to be longer than 64 characters.
           * - Disallow the whole address to be longer than 254 characters.
           *
           * If this pattern does not satisfy your business needs, you can use `Validators.pattern()` to
           * validate the value against a different pattern.
           *
           * @usageNotes
           *
           * ### Validate that the field matches a valid email pattern
           *
           * ```typescript
           * const control = new FormControl('bad@', Validators.email);
           *
           * console.log(control.errors); // {email: true}
           * ```
           *
           * @returns An error map with the `email` property
           * if the validation check fails, otherwise `null`.
           *
           * @see `updateValueAndValidity()`
           *
           */

        }, {
          key: "email",
          value: function email(control) {
            if (isEmptyInputValue(control.value)) {
              return null; // don't validate empty values to allow optional controls
            }

            return EMAIL_REGEXP.test(control.value) ? null : {
              'email': true
            };
          }
          /**
           * @description
           * Validator that requires the length of the control's value to be greater than or equal
           * to the provided minimum length. This validator is also provided by default if you use the
           * the HTML5 `minlength` attribute. Note that the `minLength` validator is intended to be used
           * only for types that have a numeric `length` property, such as strings or arrays. The
           * `minLength` validator logic is also not invoked for values when their `length` property is 0
           * (for example in case of an empty string or an empty array), to support optional controls. You
           * can use the standard `required` validator if empty values should not be considered valid.
           *
           * @usageNotes
           *
           * ### Validate that the field has a minimum of 3 characters
           *
           * ```typescript
           * const control = new FormControl('ng', Validators.minLength(3));
           *
           * console.log(control.errors); // {minlength: {requiredLength: 3, actualLength: 2}}
           * ```
           *
           * ```html
           * <input minlength="5">
           * ```
           *
           * @returns A validator function that returns an error map with the
           * `minlength` property if the validation check fails, otherwise `null`.
           *
           * @see `updateValueAndValidity()`
           *
           */

        }, {
          key: "minLength",
          value: function minLength(_minLength) {
            return function (control) {
              if (isEmptyInputValue(control.value) || !hasValidLength(control.value)) {
                // don't validate empty values to allow optional controls
                // don't validate values without `length` property
                return null;
              }

              return control.value.length < _minLength ? {
                'minlength': {
                  'requiredLength': _minLength,
                  'actualLength': control.value.length
                }
              } : null;
            };
          }
          /**
           * @description
           * Validator that requires the length of the control's value to be less than or equal
           * to the provided maximum length. This validator is also provided by default if you use the
           * the HTML5 `maxlength` attribute. Note that the `maxLength` validator is intended to be used
           * only for types that have a numeric `length` property, such as strings or arrays.
           *
           * @usageNotes
           *
           * ### Validate that the field has maximum of 5 characters
           *
           * ```typescript
           * const control = new FormControl('Angular', Validators.maxLength(5));
           *
           * console.log(control.errors); // {maxlength: {requiredLength: 5, actualLength: 7}}
           * ```
           *
           * ```html
           * <input maxlength="5">
           * ```
           *
           * @returns A validator function that returns an error map with the
           * `maxlength` property if the validation check fails, otherwise `null`.
           *
           * @see `updateValueAndValidity()`
           *
           */

        }, {
          key: "maxLength",
          value: function maxLength(_maxLength) {
            return function (control) {
              return hasValidLength(control.value) && control.value.length > _maxLength ? {
                'maxlength': {
                  'requiredLength': _maxLength,
                  'actualLength': control.value.length
                }
              } : null;
            };
          }
          /**
           * @description
           * Validator that requires the control's value to match a regex pattern. This validator is also
           * provided by default if you use the HTML5 `pattern` attribute.
           *
           * @usageNotes
           *
           * ### Validate that the field only contains letters or spaces
           *
           * ```typescript
           * const control = new FormControl('1', Validators.pattern('[a-zA-Z ]*'));
           *
           * console.log(control.errors); // {pattern: {requiredPattern: '^[a-zA-Z ]*$', actualValue: '1'}}
           * ```
           *
           * ```html
           * <input pattern="[a-zA-Z ]*">
           * ```
           *
           * ### Pattern matching with the global or sticky flag
           *
           * `RegExp` objects created with the `g` or `y` flags that are passed into `Validators.pattern`
           * can produce different results on the same input when validations are run consecutively. This is
           * due to how the behavior of `RegExp.prototype.test` is
           * specified in [ECMA-262](https://tc39.es/ecma262/#sec-regexpbuiltinexec)
           * (`RegExp` preserves the index of the last match when the global or sticky flag is used).
           * Due to this behavior, it is recommended that when using
           * `Validators.pattern` you **do not** pass in a `RegExp` object with either the global or sticky
           * flag enabled.
           *
           * ```typescript
           * // Not recommended (since the `g` flag is used)
           * const controlOne = new FormControl('1', Validators.pattern(/foo/g));
           *
           * // Good
           * const controlTwo = new FormControl('1', Validators.pattern(/foo/));
           * ```
           *
           * @param pattern A regular expression to be used as is to test the values, or a string.
           * If a string is passed, the `^` character is prepended and the `$` character is
           * appended to the provided string (if not already present), and the resulting regular
           * expression is used to test the values.
           *
           * @returns A validator function that returns an error map with the
           * `pattern` property if the validation check fails, otherwise `null`.
           *
           * @see `updateValueAndValidity()`
           *
           */

        }, {
          key: "pattern",
          value: function pattern(_pattern) {
            if (!_pattern) return Validators.nullValidator;
            var regex;
            var regexStr;

            if (typeof _pattern === 'string') {
              regexStr = '';
              if (_pattern.charAt(0) !== '^') regexStr += '^';
              regexStr += _pattern;
              if (_pattern.charAt(_pattern.length - 1) !== '$') regexStr += '$';
              regex = new RegExp(regexStr);
            } else {
              regexStr = _pattern.toString();
              regex = _pattern;
            }

            return function (control) {
              if (isEmptyInputValue(control.value)) {
                return null; // don't validate empty values to allow optional controls
              }

              var value = control.value;
              return regex.test(value) ? null : {
                'pattern': {
                  'requiredPattern': regexStr,
                  'actualValue': value
                }
              };
            };
          }
          /**
           * @description
           * Validator that performs no operation.
           *
           * @see `updateValueAndValidity()`
           *
           */

        }, {
          key: "nullValidator",
          value: function nullValidator(control) {
            return null;
          }
        }, {
          key: "compose",
          value: function compose(validators) {
            if (!validators) return null;
            var presentValidators = validators.filter(isPresent);
            if (presentValidators.length == 0) return null;
            return function (control) {
              return mergeErrors(executeValidators(control, presentValidators));
            };
          }
          /**
           * @description
           * Compose multiple async validators into a single function that returns the union
           * of the individual error objects for the provided control.
           *
           * @returns A validator function that returns an error map with the
           * merged error objects of the async validators if the validation check fails, otherwise `null`.
           *
           * @see `updateValueAndValidity()`
           *
           */

        }, {
          key: "composeAsync",
          value: function composeAsync(validators) {
            if (!validators) return null;
            var presentValidators = validators.filter(isPresent);
            if (presentValidators.length == 0) return null;
            return function (control) {
              var observables = executeValidators(control, presentValidators).map(toObservable);
              return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["forkJoin"])(observables).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(mergeErrors));
            };
          }
        }]);

        return Validators;
      }();

      function isPresent(o) {
        return o != null;
      }

      function toObservable(r) {
        var obs = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisPromise"])(r) ? Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(r) : r;

        if (!Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisObservable"])(obs) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
          throw new Error("Expected validator to return Promise or Observable.");
        }

        return obs;
      }

      function mergeErrors(arrayOfErrors) {
        var res = {}; // Not using Array.reduce here due to a Chrome 80 bug
        // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982

        arrayOfErrors.forEach(function (errors) {
          res = errors != null ? Object.assign(Object.assign({}, res), errors) : res;
        });
        return Object.keys(res).length === 0 ? null : res;
      }

      function executeValidators(control, validators) {
        return validators.map(function (validator) {
          return validator(control);
        });
      }

      function isValidatorFn(validator) {
        return !validator.validate;
      }
      /**
       * Given the list of validators that may contain both functions as well as classes, return the list
       * of validator functions (convert validator classes into validator functions). This is needed to
       * have consistent structure in validators list before composing them.
       *
       * @param validators The set of validators that may contain validators both in plain function form
       *     as well as represented as a validator class.
       */


      function normalizeValidators(validators) {
        return validators.map(function (validator) {
          return isValidatorFn(validator) ? validator : function (c) {
            return validator.validate(c);
          };
        });
      }
      /**
       * Merges synchronous validators into a single validator function (combined using
       * `Validators.compose`).
       */


      function composeValidators(validators) {
        return validators != null ? Validators.compose(normalizeValidators(validators)) : null;
      }
      /**
       * Merges asynchronous validators into a single validator function (combined using
       * `Validators.composeAsync`).
       */


      function composeAsyncValidators(validators) {
        return validators != null ? Validators.composeAsync(normalizeValidators(validators)) : null;
      }
      /**
       * Merges raw control validators with a given directive validator and returns the combined list of
       * validators as an array.
       */


      function mergeValidators(controlValidators, dirValidator) {
        if (controlValidators === null) return [dirValidator];
        return Array.isArray(controlValidators) ? [].concat(_toConsumableArray(controlValidators), [dirValidator]) : [controlValidators, dirValidator];
      }
      /**
       * Retrieves the list of raw synchronous validators attached to a given control.
       */


      function getControlValidators(control) {
        return control._rawValidators;
      }
      /**
       * Retrieves the list of raw asynchronous validators attached to a given control.
       */


      function getControlAsyncValidators(control) {
        return control._rawAsyncValidators;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description
       * Base class for control directives.
       *
       * This class is only used internally in the `ReactiveFormsModule` and the `FormsModule`.
       *
       * @publicApi
       */


      var AbstractControlDirective = /*#__PURE__*/function () {
        function AbstractControlDirective() {
          _classCallCheck(this, AbstractControlDirective);

          /**
           * Set of synchronous validators as they were provided while calling `setValidators` function.
           * @internal
           */
          this._rawValidators = [];
          /**
           * Set of asynchronous validators as they were provided while calling `setAsyncValidators`
           * function.
           * @internal
           */

          this._rawAsyncValidators = [];
          /*
           * The set of callbacks to be invoked when directive instance is being destroyed.
           */

          this._onDestroyCallbacks = [];
        }
        /**
         * @description
         * Reports the value of the control if it is present, otherwise null.
         */


        _createClass2(AbstractControlDirective, [{
          key: "value",
          get: function get() {
            return this.control ? this.control.value : null;
          }
          /**
           * @description
           * Reports whether the control is valid. A control is considered valid if no
           * validation errors exist with the current value.
           * If the control is not present, null is returned.
           */

        }, {
          key: "valid",
          get: function get() {
            return this.control ? this.control.valid : null;
          }
          /**
           * @description
           * Reports whether the control is invalid, meaning that an error exists in the input value.
           * If the control is not present, null is returned.
           */

        }, {
          key: "invalid",
          get: function get() {
            return this.control ? this.control.invalid : null;
          }
          /**
           * @description
           * Reports whether a control is pending, meaning that that async validation is occurring and
           * errors are not yet available for the input value. If the control is not present, null is
           * returned.
           */

        }, {
          key: "pending",
          get: function get() {
            return this.control ? this.control.pending : null;
          }
          /**
           * @description
           * Reports whether the control is disabled, meaning that the control is disabled
           * in the UI and is exempt from validation checks and excluded from aggregate
           * values of ancestor controls. If the control is not present, null is returned.
           */

        }, {
          key: "disabled",
          get: function get() {
            return this.control ? this.control.disabled : null;
          }
          /**
           * @description
           * Reports whether the control is enabled, meaning that the control is included in ancestor
           * calculations of validity or value. If the control is not present, null is returned.
           */

        }, {
          key: "enabled",
          get: function get() {
            return this.control ? this.control.enabled : null;
          }
          /**
           * @description
           * Reports the control's validation errors. If the control is not present, null is returned.
           */

        }, {
          key: "errors",
          get: function get() {
            return this.control ? this.control.errors : null;
          }
          /**
           * @description
           * Reports whether the control is pristine, meaning that the user has not yet changed
           * the value in the UI. If the control is not present, null is returned.
           */

        }, {
          key: "pristine",
          get: function get() {
            return this.control ? this.control.pristine : null;
          }
          /**
           * @description
           * Reports whether the control is dirty, meaning that the user has changed
           * the value in the UI. If the control is not present, null is returned.
           */

        }, {
          key: "dirty",
          get: function get() {
            return this.control ? this.control.dirty : null;
          }
          /**
           * @description
           * Reports whether the control is touched, meaning that the user has triggered
           * a `blur` event on it. If the control is not present, null is returned.
           */

        }, {
          key: "touched",
          get: function get() {
            return this.control ? this.control.touched : null;
          }
          /**
           * @description
           * Reports the validation status of the control. Possible values include:
           * 'VALID', 'INVALID', 'DISABLED', and 'PENDING'.
           * If the control is not present, null is returned.
           */

        }, {
          key: "status",
          get: function get() {
            return this.control ? this.control.status : null;
          }
          /**
           * @description
           * Reports whether the control is untouched, meaning that the user has not yet triggered
           * a `blur` event on it. If the control is not present, null is returned.
           */

        }, {
          key: "untouched",
          get: function get() {
            return this.control ? this.control.untouched : null;
          }
          /**
           * @description
           * Returns a multicasting observable that emits a validation status whenever it is
           * calculated for the control. If the control is not present, null is returned.
           */

        }, {
          key: "statusChanges",
          get: function get() {
            return this.control ? this.control.statusChanges : null;
          }
          /**
           * @description
           * Returns a multicasting observable of value changes for the control that emits every time the
           * value of the control changes in the UI or programmatically.
           * If the control is not present, null is returned.
           */

        }, {
          key: "valueChanges",
          get: function get() {
            return this.control ? this.control.valueChanges : null;
          }
          /**
           * @description
           * Returns an array that represents the path from the top-level form to this control.
           * Each index is the string name of the control on that level.
           */

        }, {
          key: "path",
          get: function get() {
            return null;
          }
          /**
           * Sets synchronous validators for this directive.
           * @internal
           */

        }, {
          key: "_setValidators",
          value: function _setValidators(validators) {
            this._rawValidators = validators || [];
            this._composedValidatorFn = composeValidators(this._rawValidators);
          }
          /**
           * Sets asynchronous validators for this directive.
           * @internal
           */

        }, {
          key: "_setAsyncValidators",
          value: function _setAsyncValidators(validators) {
            this._rawAsyncValidators = validators || [];
            this._composedAsyncValidatorFn = composeAsyncValidators(this._rawAsyncValidators);
          }
          /**
           * @description
           * Synchronous validator function composed of all the synchronous validators registered with this
           * directive.
           */

        }, {
          key: "validator",
          get: function get() {
            return this._composedValidatorFn || null;
          }
          /**
           * @description
           * Asynchronous validator function composed of all the asynchronous validators registered with
           * this directive.
           */

        }, {
          key: "asyncValidator",
          get: function get() {
            return this._composedAsyncValidatorFn || null;
          }
          /**
           * Internal function to register callbacks that should be invoked
           * when directive instance is being destroyed.
           * @internal
           */

        }, {
          key: "_registerOnDestroy",
          value: function _registerOnDestroy(fn) {
            this._onDestroyCallbacks.push(fn);
          }
          /**
           * Internal function to invoke all registered "on destroy" callbacks.
           * Note: calling this function also clears the list of callbacks.
           * @internal
           */

        }, {
          key: "_invokeOnDestroyCallbacks",
          value: function _invokeOnDestroyCallbacks() {
            this._onDestroyCallbacks.forEach(function (fn) {
              return fn();
            });

            this._onDestroyCallbacks = [];
          }
          /**
           * @description
           * Resets the control with the provided value if the control is present.
           */

        }, {
          key: "reset",
          value: function reset() {
            var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
            if (this.control) this.control.reset(value);
          }
          /**
           * @description
           * Reports whether the control with the given path has the error specified.
           *
           * @param errorCode The code of the error to check
           * @param path A list of control names that designates how to move from the current control
           * to the control that should be queried for errors.
           *
           * @usageNotes
           * For example, for the following `FormGroup`:
           *
           * ```
           * form = new FormGroup({
           *   address: new FormGroup({ street: new FormControl() })
           * });
           * ```
           *
           * The path to the 'street' control from the root form would be 'address' -> 'street'.
           *
           * It can be provided to this method in one of two formats:
           *
           * 1. An array of string control names, e.g. `['address', 'street']`
           * 1. A period-delimited list of control names in one string, e.g. `'address.street'`
           *
           * If no path is given, this method checks for the error on the current control.
           *
           * @returns whether the given error is present in the control at the given path.
           *
           * If the control is not present, false is returned.
           */

        }, {
          key: "hasError",
          value: function hasError(errorCode, path) {
            return this.control ? this.control.hasError(errorCode, path) : false;
          }
          /**
           * @description
           * Reports error data for the control with the given path.
           *
           * @param errorCode The code of the error to check
           * @param path A list of control names that designates how to move from the current control
           * to the control that should be queried for errors.
           *
           * @usageNotes
           * For example, for the following `FormGroup`:
           *
           * ```
           * form = new FormGroup({
           *   address: new FormGroup({ street: new FormControl() })
           * });
           * ```
           *
           * The path to the 'street' control from the root form would be 'address' -> 'street'.
           *
           * It can be provided to this method in one of two formats:
           *
           * 1. An array of string control names, e.g. `['address', 'street']`
           * 1. A period-delimited list of control names in one string, e.g. `'address.street'`
           *
           * @returns error data for that particular error. If the control or error is not present,
           * null is returned.
           */

        }, {
          key: "getError",
          value: function getError(errorCode, path) {
            return this.control ? this.control.getError(errorCode, path) : null;
          }
        }]);

        return AbstractControlDirective;
      }();

      AbstractControlDirective.ɵfac = function AbstractControlDirective_Factory(t) {
        return new (t || AbstractControlDirective)();
      };

      AbstractControlDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: AbstractControlDirective
      });
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description
       * A base class for directives that contain multiple registered instances of `NgControl`.
       * Only used by the forms module.
       *
       * @publicApi
       */

      var ControlContainer = /*#__PURE__*/function (_AbstractControlDirec) {
        _inherits(ControlContainer, _AbstractControlDirec);

        var _super123 = _createSuper(ControlContainer);

        function ControlContainer() {
          _classCallCheck(this, ControlContainer);

          return _super123.apply(this, arguments);
        }

        _createClass2(ControlContainer, [{
          key: "formDirective",
          get:
          /**
           * @description
           * The top-level form directive for the control.
           */
          function get() {
            return null;
          }
          /**
           * @description
           * The path to this group.
           */

        }, {
          key: "path",
          get: function get() {
            return null;
          }
        }]);

        return ControlContainer;
      }(AbstractControlDirective);

      ControlContainer.ɵfac = function ControlContainer_Factory(t) {
        return ɵControlContainer_BaseFactory(t || ControlContainer);
      };

      ControlContainer.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: ControlContainer,
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]
      });

      var ɵControlContainer_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetInheritedFactory"](ControlContainer);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description
       * A base class that all `FormControl`-based directives extend. It binds a `FormControl`
       * object to a DOM element.
       *
       * @publicApi
       */


      var NgControl = /*#__PURE__*/function (_AbstractControlDirec2) {
        _inherits(NgControl, _AbstractControlDirec2);

        var _super124 = _createSuper(NgControl);

        function NgControl() {
          var _this322;

          _classCallCheck(this, NgControl);

          _this322 = _super124.apply(this, arguments);
          /**
           * @description
           * The parent form for the control.
           *
           * @internal
           */

          _this322._parent = null;
          /**
           * @description
           * The name for the control
           */

          _this322.name = null;
          /**
           * @description
           * The value accessor for the control
           */

          _this322.valueAccessor = null;
          return _this322;
        }

        return NgControl;
      }(AbstractControlDirective);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var AbstractControlStatus = /*#__PURE__*/function () {
        function AbstractControlStatus(cd) {
          _classCallCheck(this, AbstractControlStatus);

          this._cd = cd;
        }

        _createClass2(AbstractControlStatus, [{
          key: "ngClassUntouched",
          get: function get() {
            var _a, _b, _c;

            return (_c = (_b = (_a = this._cd) === null || _a === void 0 ? void 0 : _a.control) === null || _b === void 0 ? void 0 : _b.untouched) !== null && _c !== void 0 ? _c : false;
          }
        }, {
          key: "ngClassTouched",
          get: function get() {
            var _a, _b, _c;

            return (_c = (_b = (_a = this._cd) === null || _a === void 0 ? void 0 : _a.control) === null || _b === void 0 ? void 0 : _b.touched) !== null && _c !== void 0 ? _c : false;
          }
        }, {
          key: "ngClassPristine",
          get: function get() {
            var _a, _b, _c;

            return (_c = (_b = (_a = this._cd) === null || _a === void 0 ? void 0 : _a.control) === null || _b === void 0 ? void 0 : _b.pristine) !== null && _c !== void 0 ? _c : false;
          }
        }, {
          key: "ngClassDirty",
          get: function get() {
            var _a, _b, _c;

            return (_c = (_b = (_a = this._cd) === null || _a === void 0 ? void 0 : _a.control) === null || _b === void 0 ? void 0 : _b.dirty) !== null && _c !== void 0 ? _c : false;
          }
        }, {
          key: "ngClassValid",
          get: function get() {
            var _a, _b, _c;

            return (_c = (_b = (_a = this._cd) === null || _a === void 0 ? void 0 : _a.control) === null || _b === void 0 ? void 0 : _b.valid) !== null && _c !== void 0 ? _c : false;
          }
        }, {
          key: "ngClassInvalid",
          get: function get() {
            var _a, _b, _c;

            return (_c = (_b = (_a = this._cd) === null || _a === void 0 ? void 0 : _a.control) === null || _b === void 0 ? void 0 : _b.invalid) !== null && _c !== void 0 ? _c : false;
          }
        }, {
          key: "ngClassPending",
          get: function get() {
            var _a, _b, _c;

            return (_c = (_b = (_a = this._cd) === null || _a === void 0 ? void 0 : _a.control) === null || _b === void 0 ? void 0 : _b.pending) !== null && _c !== void 0 ? _c : false;
          }
        }]);

        return AbstractControlStatus;
      }();

      var ngControlStatusHost = {
        '[class.ng-untouched]': 'ngClassUntouched',
        '[class.ng-touched]': 'ngClassTouched',
        '[class.ng-pristine]': 'ngClassPristine',
        '[class.ng-dirty]': 'ngClassDirty',
        '[class.ng-valid]': 'ngClassValid',
        '[class.ng-invalid]': 'ngClassInvalid',
        '[class.ng-pending]': 'ngClassPending'
      };
      /**
       * @description
       * Directive automatically applied to Angular form controls that sets CSS classes
       * based on control status.
       *
       * @usageNotes
       *
       * ### CSS classes applied
       *
       * The following classes are applied as the properties become true:
       *
       * * ng-valid
       * * ng-invalid
       * * ng-pending
       * * ng-pristine
       * * ng-dirty
       * * ng-untouched
       * * ng-touched
       *
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       * @publicApi
       */

      var NgControlStatus = /*#__PURE__*/function (_AbstractControlStatu) {
        _inherits(NgControlStatus, _AbstractControlStatu);

        var _super125 = _createSuper(NgControlStatus);

        function NgControlStatus(cd) {
          _classCallCheck(this, NgControlStatus);

          return _super125.call(this, cd);
        }

        return NgControlStatus;
      }(AbstractControlStatus);

      NgControlStatus.ɵfac = function NgControlStatus_Factory(t) {
        return new (t || NgControlStatus)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgControl, 2));
      };

      NgControlStatus.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgControlStatus,
        selectors: [["", "formControlName", ""], ["", "ngModel", ""], ["", "formControl", ""]],
        hostVars: 14,
        hostBindings: function NgControlStatus_HostBindings(rf, ctx) {
          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("ng-untouched", ctx.ngClassUntouched)("ng-touched", ctx.ngClassTouched)("ng-pristine", ctx.ngClassPristine)("ng-dirty", ctx.ngClassDirty)("ng-valid", ctx.ngClassValid)("ng-invalid", ctx.ngClassInvalid)("ng-pending", ctx.ngClassPending);
          }
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]
      });

      NgControlStatus.ctorParameters = function () {
        return [{
          type: NgControl,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgControlStatus, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[formControlName],[ngModel],[formControl]',
            host: ngControlStatusHost
          }]
        }], function () {
          return [{
            type: NgControl,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }]
          }];
        }, null);
      })();
      /**
       * @description
       * Directive automatically applied to Angular form groups that sets CSS classes
       * based on control status (valid/invalid/dirty/etc).
       *
       * @see `NgControlStatus`
       *
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       * @publicApi
       */


      var NgControlStatusGroup = /*#__PURE__*/function (_AbstractControlStatu2) {
        _inherits(NgControlStatusGroup, _AbstractControlStatu2);

        var _super126 = _createSuper(NgControlStatusGroup);

        function NgControlStatusGroup(cd) {
          _classCallCheck(this, NgControlStatusGroup);

          return _super126.call(this, cd);
        }

        return NgControlStatusGroup;
      }(AbstractControlStatus);

      NgControlStatusGroup.ɵfac = function NgControlStatusGroup_Factory(t) {
        return new (t || NgControlStatusGroup)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ControlContainer, 10));
      };

      NgControlStatusGroup.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgControlStatusGroup,
        selectors: [["", "formGroupName", ""], ["", "formArrayName", ""], ["", "ngModelGroup", ""], ["", "formGroup", ""], ["form", 3, "ngNoForm", ""], ["", "ngForm", ""]],
        hostVars: 14,
        hostBindings: function NgControlStatusGroup_HostBindings(rf, ctx) {
          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("ng-untouched", ctx.ngClassUntouched)("ng-touched", ctx.ngClassTouched)("ng-pristine", ctx.ngClassPristine)("ng-dirty", ctx.ngClassDirty)("ng-valid", ctx.ngClassValid)("ng-invalid", ctx.ngClassInvalid)("ng-pending", ctx.ngClassPending);
          }
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]
      });

      NgControlStatusGroup.ctorParameters = function () {
        return [{
          type: ControlContainer,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgControlStatusGroup, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',
            host: ngControlStatusHost
          }]
        }], function () {
          return [{
            type: ControlContainer,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var NUMBER_VALUE_ACCESSOR = {
        provide: NG_VALUE_ACCESSOR,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return NumberValueAccessor;
        }),
        multi: true
      };
      /**
       * @description
       * The `ControlValueAccessor` for writing a number value and listening to number input changes.
       * The value accessor is used by the `FormControlDirective`, `FormControlName`, and `NgModel`
       * directives.
       *
       * @usageNotes
       *
       * ### Using a number input with a reactive form.
       *
       * The following example shows how to use a number input with a reactive form.
       *
       * ```ts
       * const totalCountControl = new FormControl();
       * ```
       *
       * ```
       * <input type="number" [formControl]="totalCountControl">
       * ```
       *
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       * @publicApi
       */

      var NumberValueAccessor = /*#__PURE__*/function () {
        function NumberValueAccessor(_renderer, _elementRef) {
          _classCallCheck(this, NumberValueAccessor);

          this._renderer = _renderer;
          this._elementRef = _elementRef;
          /**
           * The registered callback function called when a change or input event occurs on the input
           * element.
           * @nodoc
           */

          this.onChange = function (_) {};
          /**
           * The registered callback function called when a blur event occurs on the input element.
           * @nodoc
           */


          this.onTouched = function () {};
        }
        /**
         * Sets the "value" property on the input element.
         * @nodoc
         */


        _createClass2(NumberValueAccessor, [{
          key: "writeValue",
          value: function writeValue(value) {
            // The value needs to be normalized for IE9, otherwise it is set to 'null' when null
            var normalizedValue = value == null ? '' : value;

            this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);
          }
          /**
           * Registers a function called when the control value changes.
           * @nodoc
           */

        }, {
          key: "registerOnChange",
          value: function registerOnChange(fn) {
            this.onChange = function (value) {
              fn(value == '' ? null : parseFloat(value));
            };
          }
          /**
           * Registers a function called when the control is touched.
           * @nodoc
           */

        }, {
          key: "registerOnTouched",
          value: function registerOnTouched(fn) {
            this.onTouched = fn;
          }
          /**
           * Sets the "disabled" property on the input element.
           * @nodoc
           */

        }, {
          key: "setDisabledState",
          value: function setDisabledState(isDisabled) {
            this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
          }
        }]);

        return NumberValueAccessor;
      }();

      NumberValueAccessor.ɵfac = function NumberValueAccessor_Factory(t) {
        return new (t || NumberValueAccessor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]));
      };

      NumberValueAccessor.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NumberValueAccessor,
        selectors: [["input", "type", "number", "formControlName", ""], ["input", "type", "number", "formControl", ""], ["input", "type", "number", "ngModel", ""]],
        hostBindings: function NumberValueAccessor_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("input", function NumberValueAccessor_input_HostBindingHandler($event) {
              return ctx.onChange($event.target.value);
            })("blur", function NumberValueAccessor_blur_HostBindingHandler() {
              return ctx.onTouched();
            });
          }
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([NUMBER_VALUE_ACCESSOR])]
      });

      NumberValueAccessor.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NumberValueAccessor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: 'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]',
            host: {
              '(input)': 'onChange($event.target.value)',
              '(blur)': 'onTouched()'
            },
            providers: [NUMBER_VALUE_ACCESSOR]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var RADIO_VALUE_ACCESSOR = {
        provide: NG_VALUE_ACCESSOR,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return RadioControlValueAccessor;
        }),
        multi: true
      };

      function throwNameError() {
        throw new Error("\n      If you define both a name and a formControlName attribute on your radio button, their values\n      must match. Ex: <input type=\"radio\" formControlName=\"food\" name=\"food\">\n    ");
      }
      /**
       * @description
       * Class used by Angular to track radio buttons. For internal use only.
       */


      var RadioControlRegistry = /*#__PURE__*/function () {
        function RadioControlRegistry() {
          _classCallCheck(this, RadioControlRegistry);

          this._accessors = [];
        }
        /**
         * @description
         * Adds a control to the internal registry. For internal use only.
         */


        _createClass2(RadioControlRegistry, [{
          key: "add",
          value: function add(control, accessor) {
            this._accessors.push([control, accessor]);
          }
          /**
           * @description
           * Removes a control from the internal registry. For internal use only.
           */

        }, {
          key: "remove",
          value: function remove(accessor) {
            for (var i = this._accessors.length - 1; i >= 0; --i) {
              if (this._accessors[i][1] === accessor) {
                this._accessors.splice(i, 1);

                return;
              }
            }
          }
          /**
           * @description
           * Selects a radio button. For internal use only.
           */

        }, {
          key: "select",
          value: function select(accessor) {
            var _this323 = this;

            this._accessors.forEach(function (c) {
              if (_this323._isSameGroup(c, accessor) && c[1] !== accessor) {
                c[1].fireUncheck(accessor.value);
              }
            });
          }
        }, {
          key: "_isSameGroup",
          value: function _isSameGroup(controlPair, accessor) {
            if (!controlPair[0].control) return false;
            return controlPair[0]._parent === accessor._control._parent && controlPair[1].name === accessor.name;
          }
        }]);

        return RadioControlRegistry;
      }();

      RadioControlRegistry.ɵfac = function RadioControlRegistry_Factory(t) {
        return new (t || RadioControlRegistry)();
      };

      RadioControlRegistry.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: RadioControlRegistry,
        factory: RadioControlRegistry.ɵfac
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](RadioControlRegistry, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], function () {
          return [];
        }, null);
      })();
      /**
       * @description
       * The `ControlValueAccessor` for writing radio control values and listening to radio control
       * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and
       * `NgModel` directives.
       *
       * @usageNotes
       *
       * ### Using radio buttons with reactive form directives
       *
       * The follow example shows how to use radio buttons in a reactive form. When using radio buttons in
       * a reactive form, radio buttons in the same group should have the same `formControlName`.
       * Providing a `name` attribute is optional.
       *
       * {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}
       *
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       * @publicApi
       */


      var RadioControlValueAccessor = /*#__PURE__*/function () {
        function RadioControlValueAccessor(_renderer, _elementRef, _registry, _injector) {
          _classCallCheck(this, RadioControlValueAccessor);

          this._renderer = _renderer;
          this._elementRef = _elementRef;
          this._registry = _registry;
          this._injector = _injector;
          /**
           * The registered callback function called when a change event occurs on the input element.
           * @nodoc
           */

          this.onChange = function () {};
          /**
           * The registered callback function called when a blur event occurs on the input element.
           * @nodoc
           */


          this.onTouched = function () {};
        }
        /** @nodoc */


        _createClass2(RadioControlValueAccessor, [{
          key: "ngOnInit",
          value: function ngOnInit() {
            this._control = this._injector.get(NgControl);

            this._checkName();

            this._registry.add(this._control, this);
          }
          /** @nodoc */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this._registry.remove(this);
          }
          /**
           * Sets the "checked" property value on the radio input element.
           * @nodoc
           */

        }, {
          key: "writeValue",
          value: function writeValue(value) {
            this._state = value === this.value;

            this._renderer.setProperty(this._elementRef.nativeElement, 'checked', this._state);
          }
          /**
           * Registers a function called when the control value changes.
           * @nodoc
           */

        }, {
          key: "registerOnChange",
          value: function registerOnChange(fn) {
            var _this324 = this;

            this._fn = fn;

            this.onChange = function () {
              fn(_this324.value);

              _this324._registry.select(_this324);
            };
          }
          /**
           * Sets the "value" on the radio input element and unchecks it.
           *
           * @param value
           */

        }, {
          key: "fireUncheck",
          value: function fireUncheck(value) {
            this.writeValue(value);
          }
          /**
           * Registers a function called when the control is touched.
           * @nodoc
           */

        }, {
          key: "registerOnTouched",
          value: function registerOnTouched(fn) {
            this.onTouched = fn;
          }
          /**
           * Sets the "disabled" property on the input element.
           * @nodoc
           */

        }, {
          key: "setDisabledState",
          value: function setDisabledState(isDisabled) {
            this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
          }
        }, {
          key: "_checkName",
          value: function _checkName() {
            if (this.name && this.formControlName && this.name !== this.formControlName && (typeof ngDevMode === 'undefined' || ngDevMode)) {
              throwNameError();
            }

            if (!this.name && this.formControlName) this.name = this.formControlName;
          }
        }]);

        return RadioControlValueAccessor;
      }();

      RadioControlValueAccessor.ɵfac = function RadioControlValueAccessor_Factory(t) {
        return new (t || RadioControlValueAccessor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](RadioControlRegistry), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]));
      };

      RadioControlValueAccessor.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: RadioControlValueAccessor,
        selectors: [["input", "type", "radio", "formControlName", ""], ["input", "type", "radio", "formControl", ""], ["input", "type", "radio", "ngModel", ""]],
        hostBindings: function RadioControlValueAccessor_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("change", function RadioControlValueAccessor_change_HostBindingHandler() {
              return ctx.onChange();
            })("blur", function RadioControlValueAccessor_blur_HostBindingHandler() {
              return ctx.onTouched();
            });
          }
        },
        inputs: {
          name: "name",
          formControlName: "formControlName",
          value: "value"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([RADIO_VALUE_ACCESSOR])]
      });

      RadioControlValueAccessor.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }, {
          type: RadioControlRegistry
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]
        }];
      };

      RadioControlValueAccessor.propDecorators = {
        name: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        formControlName: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        value: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](RadioControlValueAccessor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: 'input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]',
            host: {
              '(change)': 'onChange()',
              '(blur)': 'onTouched()'
            },
            providers: [RADIO_VALUE_ACCESSOR]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }, {
            type: RadioControlRegistry
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]
          }];
        }, {
          name: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          formControlName: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          value: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var RANGE_VALUE_ACCESSOR = {
        provide: NG_VALUE_ACCESSOR,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return RangeValueAccessor;
        }),
        multi: true
      };
      /**
       * @description
       * The `ControlValueAccessor` for writing a range value and listening to range input changes.
       * The value accessor is used by the `FormControlDirective`, `FormControlName`, and  `NgModel`
       * directives.
       *
       * @usageNotes
       *
       * ### Using a range input with a reactive form
       *
       * The following example shows how to use a range input with a reactive form.
       *
       * ```ts
       * const ageControl = new FormControl();
       * ```
       *
       * ```
       * <input type="range" [formControl]="ageControl">
       * ```
       *
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       * @publicApi
       */

      var RangeValueAccessor = /*#__PURE__*/function () {
        function RangeValueAccessor(_renderer, _elementRef) {
          _classCallCheck(this, RangeValueAccessor);

          this._renderer = _renderer;
          this._elementRef = _elementRef;
          /**
           * The registered callback function called when a change or input event occurs on the input
           * element.
           * @nodoc
           */

          this.onChange = function (_) {};
          /**
           * The registered callback function called when a blur event occurs on the input element.
           * @nodoc
           */


          this.onTouched = function () {};
        }
        /**
         * Sets the "value" property on the input element.
         * @nodoc
         */


        _createClass2(RangeValueAccessor, [{
          key: "writeValue",
          value: function writeValue(value) {
            this._renderer.setProperty(this._elementRef.nativeElement, 'value', parseFloat(value));
          }
          /**
           * Registers a function called when the control value changes.
           * @nodoc
           */

        }, {
          key: "registerOnChange",
          value: function registerOnChange(fn) {
            this.onChange = function (value) {
              fn(value == '' ? null : parseFloat(value));
            };
          }
          /**
           * Registers a function called when the control is touched.
           * @nodoc
           */

        }, {
          key: "registerOnTouched",
          value: function registerOnTouched(fn) {
            this.onTouched = fn;
          }
          /**
           * Sets the "disabled" property on the range input element.
           * @nodoc
           */

        }, {
          key: "setDisabledState",
          value: function setDisabledState(isDisabled) {
            this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
          }
        }]);

        return RangeValueAccessor;
      }();

      RangeValueAccessor.ɵfac = function RangeValueAccessor_Factory(t) {
        return new (t || RangeValueAccessor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]));
      };

      RangeValueAccessor.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: RangeValueAccessor,
        selectors: [["input", "type", "range", "formControlName", ""], ["input", "type", "range", "formControl", ""], ["input", "type", "range", "ngModel", ""]],
        hostBindings: function RangeValueAccessor_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("change", function RangeValueAccessor_change_HostBindingHandler($event) {
              return ctx.onChange($event.target.value);
            })("input", function RangeValueAccessor_input_HostBindingHandler($event) {
              return ctx.onChange($event.target.value);
            })("blur", function RangeValueAccessor_blur_HostBindingHandler() {
              return ctx.onTouched();
            });
          }
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([RANGE_VALUE_ACCESSOR])]
      });

      RangeValueAccessor.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](RangeValueAccessor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: 'input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]',
            host: {
              '(change)': 'onChange($event.target.value)',
              '(input)': 'onChange($event.target.value)',
              '(blur)': 'onTouched()'
            },
            providers: [RANGE_VALUE_ACCESSOR]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var FormErrorExamples = {
        formControlName: "\n    <div [formGroup]=\"myGroup\">\n      <input formControlName=\"firstName\">\n    </div>\n\n    In your class:\n\n    this.myGroup = new FormGroup({\n       firstName: new FormControl()\n    });",
        formGroupName: "\n    <div [formGroup]=\"myGroup\">\n       <div formGroupName=\"person\">\n          <input formControlName=\"firstName\">\n       </div>\n    </div>\n\n    In your class:\n\n    this.myGroup = new FormGroup({\n       person: new FormGroup({ firstName: new FormControl() })\n    });",
        formArrayName: "\n    <div [formGroup]=\"myGroup\">\n      <div formArrayName=\"cities\">\n        <div *ngFor=\"let city of cityArray.controls; index as i\">\n          <input [formControlName]=\"i\">\n        </div>\n      </div>\n    </div>\n\n    In your class:\n\n    this.cityArray = new FormArray([new FormControl('SF')]);\n    this.myGroup = new FormGroup({\n      cities: this.cityArray\n    });",
        ngModelGroup: "\n    <form>\n       <div ngModelGroup=\"person\">\n          <input [(ngModel)]=\"person.name\" name=\"firstName\">\n       </div>\n    </form>",
        ngModelWithFormGroup: "\n    <div [formGroup]=\"myGroup\">\n       <input formControlName=\"firstName\">\n       <input [(ngModel)]=\"showMoreControls\" [ngModelOptions]=\"{standalone: true}\">\n    </div>\n  "
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var ReactiveErrors = /*#__PURE__*/function () {
        function ReactiveErrors() {
          _classCallCheck(this, ReactiveErrors);
        }

        _createClass2(ReactiveErrors, null, [{
          key: "controlParentException",
          value: function controlParentException() {
            throw new Error("formControlName must be used with a parent formGroup directive.  You'll want to add a formGroup\n       directive and pass it an existing FormGroup instance (you can create one in your class).\n\n      Example:\n\n      ".concat(FormErrorExamples.formControlName));
          }
        }, {
          key: "ngModelGroupException",
          value: function ngModelGroupException() {
            throw new Error("formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n       that also have a \"form\" prefix: formGroupName, formArrayName, or formGroup.\n\n       Option 1:  Update the parent to be formGroupName (reactive form strategy)\n\n        ".concat(FormErrorExamples.formGroupName, "\n\n        Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n        ").concat(FormErrorExamples.ngModelGroup));
          }
        }, {
          key: "missingFormException",
          value: function missingFormException() {
            throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n       Example:\n\n       ".concat(FormErrorExamples.formControlName));
          }
        }, {
          key: "groupParentException",
          value: function groupParentException() {
            throw new Error("formGroupName must be used with a parent formGroup directive.  You'll want to add a formGroup\n      directive and pass it an existing FormGroup instance (you can create one in your class).\n\n      Example:\n\n      ".concat(FormErrorExamples.formGroupName));
          }
        }, {
          key: "arrayParentException",
          value: function arrayParentException() {
            throw new Error("formArrayName must be used with a parent formGroup directive.  You'll want to add a formGroup\n       directive and pass it an existing FormGroup instance (you can create one in your class).\n\n        Example:\n\n        ".concat(FormErrorExamples.formArrayName));
          }
        }, {
          key: "disabledAttrWarning",
          value: function disabledAttrWarning() {
            console.warn("\n      It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n      when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n      you. We recommend using this approach to avoid 'changed after checked' errors.\n\n      Example:\n      form = new FormGroup({\n        first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n        last: new FormControl('Drew', Validators.required)\n      });\n    ");
          }
        }, {
          key: "ngModelWarning",
          value: function ngModelWarning(directiveName) {
            console.warn("\n    It looks like you're using ngModel on the same form field as ".concat(directiveName, ".\n    Support for using the ngModel input property and ngModelChange event with\n    reactive form directives has been deprecated in Angular v6 and will be removed\n    in a future version of Angular.\n\n    For more information on this, see our API docs here:\n    https://angular.io/api/forms/").concat(directiveName === 'formControl' ? 'FormControlDirective' : 'FormControlName', "#use-with-ngmodel\n    "));
          }
        }]);

        return ReactiveErrors;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var SELECT_VALUE_ACCESSOR = {
        provide: NG_VALUE_ACCESSOR,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return SelectControlValueAccessor;
        }),
        multi: true
      };

      function _buildValueString(id, value) {
        if (id == null) return "".concat(value);
        if (value && typeof value === 'object') value = 'Object';
        return "".concat(id, ": ").concat(value).slice(0, 50);
      }

      function _extractId(valueString) {
        return valueString.split(':')[0];
      }
      /**
       * @description
       * The `ControlValueAccessor` for writing select control values and listening to select control
       * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and
       * `NgModel` directives.
       *
       * @usageNotes
       *
       * ### Using select controls in a reactive form
       *
       * The following examples show how to use a select control in a reactive form.
       *
       * {@example forms/ts/reactiveSelectControl/reactive_select_control_example.ts region='Component'}
       *
       * ### Using select controls in a template-driven form
       *
       * To use a select in a template-driven form, simply add an `ngModel` and a `name`
       * attribute to the main `<select>` tag.
       *
       * {@example forms/ts/selectControl/select_control_example.ts region='Component'}
       *
       * ### Customizing option selection
       *
       * Angular uses object identity to select option. It's possible for the identities of items
       * to change while the data does not. This can happen, for example, if the items are produced
       * from an RPC to the server, and that RPC is re-run. Even if the data hasn't changed, the
       * second response will produce objects with different identities.
       *
       * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.
       * `compareWith` takes a **function** which has two arguments: `option1` and `option2`.
       * If `compareWith` is given, Angular selects option by the return value of the function.
       *
       * ```ts
       * const selectedCountriesControl = new FormControl();
       * ```
       *
       * ```
       * <select [compareWith]="compareFn"  [formControl]="selectedCountriesControl">
       *     <option *ngFor="let country of countries" [ngValue]="country">
       *         {{country.name}}
       *     </option>
       * </select>
       *
       * compareFn(c1: Country, c2: Country): boolean {
       *     return c1 && c2 ? c1.id === c2.id : c1 === c2;
       * }
       * ```
       *
       * **Note:** We listen to the 'change' event because 'input' events aren't fired
       * for selects in Firefox and IE:
       * https://bugzilla.mozilla.org/show_bug.cgi?id=1024350
       * https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/
       *
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       * @publicApi
       */


      var SelectControlValueAccessor = /*#__PURE__*/function () {
        function SelectControlValueAccessor(_renderer, _elementRef) {
          _classCallCheck(this, SelectControlValueAccessor);

          this._renderer = _renderer;
          this._elementRef = _elementRef;
          /** @internal */

          this._optionMap = new Map();
          /** @internal */

          this._idCounter = 0;
          /**
           * The registered callback function called when a change event occurs on the input element.
           * @nodoc
           */

          this.onChange = function (_) {};
          /**
           * The registered callback function called when a blur event occurs on the input element.
           * @nodoc
           */


          this.onTouched = function () {};

          this._compareWith = Object.is;
        }
        /**
         * @description
         * Tracks the option comparison algorithm for tracking identities when
         * checking for changes.
         */


        _createClass2(SelectControlValueAccessor, [{
          key: "compareWith",
          set: function set(fn) {
            if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {
              throw new Error("compareWith must be a function, but received ".concat(JSON.stringify(fn)));
            }

            this._compareWith = fn;
          }
          /**
           * Sets the "value" property on the input element. The "selectedIndex"
           * property is also set if an ID is provided on the option element.
           * @nodoc
           */

        }, {
          key: "writeValue",
          value: function writeValue(value) {
            this.value = value;

            var id = this._getOptionId(value);

            if (id == null) {
              this._renderer.setProperty(this._elementRef.nativeElement, 'selectedIndex', -1);
            }

            var valueString = _buildValueString(id, value);

            this._renderer.setProperty(this._elementRef.nativeElement, 'value', valueString);
          }
          /**
           * Registers a function called when the control value changes.
           * @nodoc
           */

        }, {
          key: "registerOnChange",
          value: function registerOnChange(fn) {
            var _this325 = this;

            this.onChange = function (valueString) {
              _this325.value = _this325._getOptionValue(valueString);
              fn(_this325.value);
            };
          }
          /**
           * Registers a function called when the control is touched.
           * @nodoc
           */

        }, {
          key: "registerOnTouched",
          value: function registerOnTouched(fn) {
            this.onTouched = fn;
          }
          /**
           * Sets the "disabled" property on the select input element.
           * @nodoc
           */

        }, {
          key: "setDisabledState",
          value: function setDisabledState(isDisabled) {
            this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
          }
          /** @internal */

        }, {
          key: "_registerOption",
          value: function _registerOption() {
            return (this._idCounter++).toString();
          }
          /** @internal */

        }, {
          key: "_getOptionId",
          value: function _getOptionId(value) {
            for (var _i13 = 0, _Array$from = Array.from(this._optionMap.keys()); _i13 < _Array$from.length; _i13++) {
              var id = _Array$from[_i13];
              if (this._compareWith(this._optionMap.get(id), value)) return id;
            }

            return null;
          }
          /** @internal */

        }, {
          key: "_getOptionValue",
          value: function _getOptionValue(valueString) {
            var id = _extractId(valueString);

            return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;
          }
        }]);

        return SelectControlValueAccessor;
      }();

      SelectControlValueAccessor.ɵfac = function SelectControlValueAccessor_Factory(t) {
        return new (t || SelectControlValueAccessor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]));
      };

      SelectControlValueAccessor.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: SelectControlValueAccessor,
        selectors: [["select", "formControlName", "", 3, "multiple", ""], ["select", "formControl", "", 3, "multiple", ""], ["select", "ngModel", "", 3, "multiple", ""]],
        hostBindings: function SelectControlValueAccessor_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("change", function SelectControlValueAccessor_change_HostBindingHandler($event) {
              return ctx.onChange($event.target.value);
            })("blur", function SelectControlValueAccessor_blur_HostBindingHandler() {
              return ctx.onTouched();
            });
          }
        },
        inputs: {
          compareWith: "compareWith"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([SELECT_VALUE_ACCESSOR])]
      });

      SelectControlValueAccessor.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }];
      };

      SelectControlValueAccessor.propDecorators = {
        compareWith: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](SelectControlValueAccessor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: 'select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]',
            host: {
              '(change)': 'onChange($event.target.value)',
              '(blur)': 'onTouched()'
            },
            providers: [SELECT_VALUE_ACCESSOR]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }];
        }, {
          compareWith: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();
      /**
       * @description
       * Marks `<option>` as dynamic, so Angular can be notified when options change.
       *
       * @see `SelectControlValueAccessor`
       *
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       * @publicApi
       */


      var NgSelectOption = /*#__PURE__*/function () {
        function NgSelectOption(_element, _renderer, _select) {
          _classCallCheck(this, NgSelectOption);

          this._element = _element;
          this._renderer = _renderer;
          this._select = _select;
          if (this._select) this.id = this._select._registerOption();
        }
        /**
         * @description
         * Tracks the value bound to the option element. Unlike the value binding,
         * ngValue supports binding to objects.
         */


        _createClass2(NgSelectOption, [{
          key: "ngValue",
          set: function set(value) {
            if (this._select == null) return;

            this._select._optionMap.set(this.id, value);

            this._setElementValue(_buildValueString(this.id, value));

            this._select.writeValue(this._select.value);
          }
          /**
           * @description
           * Tracks simple string values bound to the option element.
           * For objects, use the `ngValue` input binding.
           */

        }, {
          key: "value",
          set: function set(value) {
            this._setElementValue(value);

            if (this._select) this._select.writeValue(this._select.value);
          }
          /** @internal */

        }, {
          key: "_setElementValue",
          value: function _setElementValue(value) {
            this._renderer.setProperty(this._element.nativeElement, 'value', value);
          }
          /** @nodoc */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            if (this._select) {
              this._select._optionMap["delete"](this.id);

              this._select.writeValue(this._select.value);
            }
          }
        }]);

        return NgSelectOption;
      }();

      NgSelectOption.ɵfac = function NgSelectOption_Factory(t) {
        return new (t || NgSelectOption)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](SelectControlValueAccessor, 9));
      };

      NgSelectOption.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgSelectOption,
        selectors: [["option"]],
        inputs: {
          ngValue: "ngValue",
          value: "value"
        }
      });

      NgSelectOption.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
        }, {
          type: SelectControlValueAccessor,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
          }]
        }];
      };

      NgSelectOption.propDecorators = {
        ngValue: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['ngValue']
        }],
        value: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['value']
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSelectOption, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: 'option'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
          }, {
            type: SelectControlValueAccessor,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
            }]
          }];
        }, {
          ngValue: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['ngValue']
          }],
          value: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['value']
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var SELECT_MULTIPLE_VALUE_ACCESSOR = {
        provide: NG_VALUE_ACCESSOR,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return SelectMultipleControlValueAccessor;
        }),
        multi: true
      };

      function _buildValueString$1(id, value) {
        if (id == null) return "".concat(value);
        if (typeof value === 'string') value = "'".concat(value, "'");
        if (value && typeof value === 'object') value = 'Object';
        return "".concat(id, ": ").concat(value).slice(0, 50);
      }

      function _extractId$1(valueString) {
        return valueString.split(':')[0];
      }
      /** Mock interface for HTMLCollection */


      var HTMLCollection = function HTMLCollection() {
        _classCallCheck(this, HTMLCollection);
      };
      /**
       * @description
       * The `ControlValueAccessor` for writing multi-select control values and listening to multi-select
       * control changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and
       * `NgModel` directives.
       *
       * @see `SelectControlValueAccessor`
       *
       * @usageNotes
       *
       * ### Using a multi-select control
       *
       * The follow example shows you how to use a multi-select control with a reactive form.
       *
       * ```ts
       * const countryControl = new FormControl();
       * ```
       *
       * ```
       * <select multiple name="countries" [formControl]="countryControl">
       *   <option *ngFor="let country of countries" [ngValue]="country">
       *     {{ country.name }}
       *   </option>
       * </select>
       * ```
       *
       * ### Customizing option selection
       *
       * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.
       * See the `SelectControlValueAccessor` for usage.
       *
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       * @publicApi
       */


      var SelectMultipleControlValueAccessor = /*#__PURE__*/function () {
        function SelectMultipleControlValueAccessor(_renderer, _elementRef) {
          _classCallCheck(this, SelectMultipleControlValueAccessor);

          this._renderer = _renderer;
          this._elementRef = _elementRef;
          /** @internal */

          this._optionMap = new Map();
          /** @internal */

          this._idCounter = 0;
          /**
           * The registered callback function called when a change event occurs on the input element.
           * @nodoc
           */

          this.onChange = function (_) {};
          /**
           * The registered callback function called when a blur event occurs on the input element.
           * @nodoc
           */


          this.onTouched = function () {};

          this._compareWith = Object.is;
        }
        /**
         * @description
         * Tracks the option comparison algorithm for tracking identities when
         * checking for changes.
         */


        _createClass2(SelectMultipleControlValueAccessor, [{
          key: "compareWith",
          set: function set(fn) {
            if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {
              throw new Error("compareWith must be a function, but received ".concat(JSON.stringify(fn)));
            }

            this._compareWith = fn;
          }
          /**
           * Sets the "value" property on one or of more of the select's options.
           * @nodoc
           */

        }, {
          key: "writeValue",
          value: function writeValue(value) {
            var _this326 = this;

            this.value = value;
            var optionSelectedStateSetter;

            if (Array.isArray(value)) {
              // convert values to ids
              var ids = value.map(function (v) {
                return _this326._getOptionId(v);
              });

              optionSelectedStateSetter = function optionSelectedStateSetter(opt, o) {
                opt._setSelected(ids.indexOf(o.toString()) > -1);
              };
            } else {
              optionSelectedStateSetter = function optionSelectedStateSetter(opt, o) {
                opt._setSelected(false);
              };
            }

            this._optionMap.forEach(optionSelectedStateSetter);
          }
          /**
           * Registers a function called when the control value changes
           * and writes an array of the selected options.
           * @nodoc
           */

        }, {
          key: "registerOnChange",
          value: function registerOnChange(fn) {
            var _this327 = this;

            this.onChange = function (_) {
              var selected = [];

              if (_.selectedOptions !== undefined) {
                var options = _.selectedOptions;

                for (var i = 0; i < options.length; i++) {
                  var opt = options.item(i);

                  var val = _this327._getOptionValue(opt.value);

                  selected.push(val);
                }
              } // Degrade on IE
              else {
                var _options2 = _.options;

                for (var _i14 = 0; _i14 < _options2.length; _i14++) {
                  var _opt = _options2.item(_i14);

                  if (_opt.selected) {
                    var _val = _this327._getOptionValue(_opt.value);

                    selected.push(_val);
                  }
                }
              }

              _this327.value = selected;
              fn(selected);
            };
          }
          /**
           * Registers a function called when the control is touched.
           * @nodoc
           */

        }, {
          key: "registerOnTouched",
          value: function registerOnTouched(fn) {
            this.onTouched = fn;
          }
          /**
           * Sets the "disabled" property on the select input element.
           * @nodoc
           */

        }, {
          key: "setDisabledState",
          value: function setDisabledState(isDisabled) {
            this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
          }
          /** @internal */

        }, {
          key: "_registerOption",
          value: function _registerOption(value) {
            var id = (this._idCounter++).toString();

            this._optionMap.set(id, value);

            return id;
          }
          /** @internal */

        }, {
          key: "_getOptionId",
          value: function _getOptionId(value) {
            for (var _i15 = 0, _Array$from2 = Array.from(this._optionMap.keys()); _i15 < _Array$from2.length; _i15++) {
              var id = _Array$from2[_i15];
              if (this._compareWith(this._optionMap.get(id)._value, value)) return id;
            }

            return null;
          }
          /** @internal */

        }, {
          key: "_getOptionValue",
          value: function _getOptionValue(valueString) {
            var id = _extractId$1(valueString);

            return this._optionMap.has(id) ? this._optionMap.get(id)._value : valueString;
          }
        }]);

        return SelectMultipleControlValueAccessor;
      }();

      SelectMultipleControlValueAccessor.ɵfac = function SelectMultipleControlValueAccessor_Factory(t) {
        return new (t || SelectMultipleControlValueAccessor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]));
      };

      SelectMultipleControlValueAccessor.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: SelectMultipleControlValueAccessor,
        selectors: [["select", "multiple", "", "formControlName", ""], ["select", "multiple", "", "formControl", ""], ["select", "multiple", "", "ngModel", ""]],
        hostBindings: function SelectMultipleControlValueAccessor_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("change", function SelectMultipleControlValueAccessor_change_HostBindingHandler($event) {
              return ctx.onChange($event.target);
            })("blur", function SelectMultipleControlValueAccessor_blur_HostBindingHandler() {
              return ctx.onTouched();
            });
          }
        },
        inputs: {
          compareWith: "compareWith"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([SELECT_MULTIPLE_VALUE_ACCESSOR])]
      });

      SelectMultipleControlValueAccessor.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }];
      };

      SelectMultipleControlValueAccessor.propDecorators = {
        compareWith: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](SelectMultipleControlValueAccessor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: 'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]',
            host: {
              '(change)': 'onChange($event.target)',
              '(blur)': 'onTouched()'
            },
            providers: [SELECT_MULTIPLE_VALUE_ACCESSOR]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }];
        }, {
          compareWith: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();
      /**
       * @description
       * Marks `<option>` as dynamic, so Angular can be notified when options change.
       *
       * @see `SelectMultipleControlValueAccessor`
       *
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       * @publicApi
       */


      var ɵNgSelectMultipleOption = /*#__PURE__*/function () {
        function ɵNgSelectMultipleOption(_element, _renderer, _select) {
          _classCallCheck(this, ɵNgSelectMultipleOption);

          this._element = _element;
          this._renderer = _renderer;
          this._select = _select;

          if (this._select) {
            this.id = this._select._registerOption(this);
          }
        }
        /**
         * @description
         * Tracks the value bound to the option element. Unlike the value binding,
         * ngValue supports binding to objects.
         */


        _createClass2(ɵNgSelectMultipleOption, [{
          key: "ngValue",
          set: function set(value) {
            if (this._select == null) return;
            this._value = value;

            this._setElementValue(_buildValueString$1(this.id, value));

            this._select.writeValue(this._select.value);
          }
          /**
           * @description
           * Tracks simple string values bound to the option element.
           * For objects, use the `ngValue` input binding.
           */

        }, {
          key: "value",
          set: function set(value) {
            if (this._select) {
              this._value = value;

              this._setElementValue(_buildValueString$1(this.id, value));

              this._select.writeValue(this._select.value);
            } else {
              this._setElementValue(value);
            }
          }
          /** @internal */

        }, {
          key: "_setElementValue",
          value: function _setElementValue(value) {
            this._renderer.setProperty(this._element.nativeElement, 'value', value);
          }
          /** @internal */

        }, {
          key: "_setSelected",
          value: function _setSelected(selected) {
            this._renderer.setProperty(this._element.nativeElement, 'selected', selected);
          }
          /** @nodoc */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            if (this._select) {
              this._select._optionMap["delete"](this.id);

              this._select.writeValue(this._select.value);
            }
          }
        }]);

        return ɵNgSelectMultipleOption;
      }();

      ɵNgSelectMultipleOption.ɵfac = function ɵNgSelectMultipleOption_Factory(t) {
        return new (t || ɵNgSelectMultipleOption)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](SelectMultipleControlValueAccessor, 9));
      };

      ɵNgSelectMultipleOption.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: ɵNgSelectMultipleOption,
        selectors: [["option"]],
        inputs: {
          ngValue: "ngValue",
          value: "value"
        }
      });

      ɵNgSelectMultipleOption.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
        }, {
          type: SelectMultipleControlValueAccessor,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
          }]
        }];
      };

      ɵNgSelectMultipleOption.propDecorators = {
        ngValue: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['ngValue']
        }],
        value: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['value']
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ɵNgSelectMultipleOption, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: 'option'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
          }, {
            type: SelectMultipleControlValueAccessor,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
            }]
          }];
        }, {
          ngValue: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['ngValue']
          }],
          value: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['value']
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function controlPath(name, parent) {
        return [].concat(_toConsumableArray(parent.path), [name]);
      }

      function setUpControl(control, dir) {
        if (typeof ngDevMode === 'undefined' || ngDevMode) {
          if (!control) _throwError(dir, 'Cannot find control with');
          if (!dir.valueAccessor) _throwError(dir, 'No value accessor for form control with');
        }

        setUpValidators(control, dir,
        /* handleOnValidatorChange */
        true);
        dir.valueAccessor.writeValue(control.value);
        setUpViewChangePipeline(control, dir);
        setUpModelChangePipeline(control, dir);
        setUpBlurPipeline(control, dir);
        setUpDisabledChangeHandler(control, dir);
      }

      function cleanUpControl(control, dir) {
        var noop = function noop() {
          if (typeof ngDevMode === 'undefined' || ngDevMode) {
            _noControlError(dir);
          }
        };

        dir.valueAccessor.registerOnChange(noop);
        dir.valueAccessor.registerOnTouched(noop);
        cleanUpValidators(control, dir,
        /* handleOnValidatorChange */
        true);

        if (control) {
          dir._invokeOnDestroyCallbacks();

          control._registerOnCollectionChange(function () {});
        }
      }

      function registerOnValidatorChange(validators, onChange) {
        validators.forEach(function (validator) {
          if (validator.registerOnValidatorChange) validator.registerOnValidatorChange(onChange);
        });
      }
      /**
       * Sets up disabled change handler function on a given form control if ControlValueAccessor
       * associated with a given directive instance supports the `setDisabledState` call.
       *
       * @param control Form control where disabled change handler should be setup.
       * @param dir Corresponding directive instance associated with this control.
       */


      function setUpDisabledChangeHandler(control, dir) {
        if (dir.valueAccessor.setDisabledState) {
          var onDisabledChange = function onDisabledChange(isDisabled) {
            dir.valueAccessor.setDisabledState(isDisabled);
          };

          control.registerOnDisabledChange(onDisabledChange); // Register a callback function to cleanup disabled change handler
          // from a control instance when a directive is destroyed.

          dir._registerOnDestroy(function () {
            control._unregisterOnDisabledChange(onDisabledChange);
          });
        }
      }
      /**
       * Sets up sync and async directive validators on provided form control.
       * This function merges validators from the directive into the validators of the control.
       *
       * @param control Form control where directive validators should be setup.
       * @param dir Directive instance that contains validators to be setup.
       * @param handleOnValidatorChange Flag that determines whether directive validators should be setup
       *     to handle validator input change.
       */


      function setUpValidators(control, dir, handleOnValidatorChange) {
        var validators = getControlValidators(control);

        if (dir.validator !== null) {
          control.setValidators(mergeValidators(validators, dir.validator));
        } else if (typeof validators === 'function') {
          // If sync validators are represented by a single validator function, we force the
          // `Validators.compose` call to happen by executing the `setValidators` function with
          // an array that contains that function. We need this to avoid possible discrepancies in
          // validators behavior, so sync validators are always processed by the `Validators.compose`.
          // Note: we should consider moving this logic inside the `setValidators` function itself, so we
          // have consistent behavior on AbstractControl API level. The same applies to the async
          // validators logic below.
          control.setValidators([validators]);
        }

        var asyncValidators = getControlAsyncValidators(control);

        if (dir.asyncValidator !== null) {
          control.setAsyncValidators(mergeValidators(asyncValidators, dir.asyncValidator));
        } else if (typeof asyncValidators === 'function') {
          control.setAsyncValidators([asyncValidators]);
        } // Re-run validation when validator binding changes, e.g. minlength=3 -> minlength=4


        if (handleOnValidatorChange) {
          var onValidatorChange = function onValidatorChange() {
            return control.updateValueAndValidity();
          };

          registerOnValidatorChange(dir._rawValidators, onValidatorChange);
          registerOnValidatorChange(dir._rawAsyncValidators, onValidatorChange);
        }
      }
      /**
       * Cleans up sync and async directive validators on provided form control.
       * This function reverts the setup performed by the `setUpValidators` function, i.e.
       * removes directive-specific validators from a given control instance.
       *
       * @param control Form control from where directive validators should be removed.
       * @param dir Directive instance that contains validators to be removed.
       * @param handleOnValidatorChange Flag that determines whether directive validators should also be
       *     cleaned up to stop handling validator input change (if previously configured to do so).
       */


      function cleanUpValidators(control, dir, handleOnValidatorChange) {
        if (control !== null) {
          if (dir.validator !== null) {
            var validators = getControlValidators(control);

            if (Array.isArray(validators) && validators.length > 0) {
              // Filter out directive validator function.
              control.setValidators(validators.filter(function (validator) {
                return validator !== dir.validator;
              }));
            }
          }

          if (dir.asyncValidator !== null) {
            var asyncValidators = getControlAsyncValidators(control);

            if (Array.isArray(asyncValidators) && asyncValidators.length > 0) {
              // Filter out directive async validator function.
              control.setAsyncValidators(asyncValidators.filter(function (asyncValidator) {
                return asyncValidator !== dir.asyncValidator;
              }));
            }
          }
        }

        if (handleOnValidatorChange) {
          // Clear onValidatorChange callbacks by providing a noop function.
          var noop = function noop() {};

          registerOnValidatorChange(dir._rawValidators, noop);
          registerOnValidatorChange(dir._rawAsyncValidators, noop);
        }
      }

      function setUpViewChangePipeline(control, dir) {
        dir.valueAccessor.registerOnChange(function (newValue) {
          control._pendingValue = newValue;
          control._pendingChange = true;
          control._pendingDirty = true;
          if (control.updateOn === 'change') updateControl(control, dir);
        });
      }

      function setUpBlurPipeline(control, dir) {
        dir.valueAccessor.registerOnTouched(function () {
          control._pendingTouched = true;
          if (control.updateOn === 'blur' && control._pendingChange) updateControl(control, dir);
          if (control.updateOn !== 'submit') control.markAsTouched();
        });
      }

      function updateControl(control, dir) {
        if (control._pendingDirty) control.markAsDirty();
        control.setValue(control._pendingValue, {
          emitModelToViewChange: false
        });
        dir.viewToModelUpdate(control._pendingValue);
        control._pendingChange = false;
      }

      function setUpModelChangePipeline(control, dir) {
        var onChange = function onChange(newValue, emitModelEvent) {
          // control -> view
          dir.valueAccessor.writeValue(newValue); // control -> ngModel

          if (emitModelEvent) dir.viewToModelUpdate(newValue);
        };

        control.registerOnChange(onChange); // Register a callback function to cleanup onChange handler
        // from a control instance when a directive is destroyed.

        dir._registerOnDestroy(function () {
          control._unregisterOnChange(onChange);
        });
      }

      function setUpFormContainer(control, dir) {
        if (control == null && (typeof ngDevMode === 'undefined' || ngDevMode)) _throwError(dir, 'Cannot find control with');
        setUpValidators(control, dir,
        /* handleOnValidatorChange */
        false);
      }

      function _noControlError(dir) {
        return _throwError(dir, 'There is no FormControl instance attached to form control element with');
      }

      function _throwError(dir, message) {
        var messageEnd;

        if (dir.path.length > 1) {
          messageEnd = "path: '".concat(dir.path.join(' -> '), "'");
        } else if (dir.path[0]) {
          messageEnd = "name: '".concat(dir.path, "'");
        } else {
          messageEnd = 'unspecified name attribute';
        }

        throw new Error("".concat(message, " ").concat(messageEnd));
      }

      function isPropertyUpdated(changes, viewModel) {
        if (!changes.hasOwnProperty('model')) return false;
        var change = changes['model'];
        if (change.isFirstChange()) return true;
        return !Object.is(viewModel, change.currentValue);
      }

      var BUILTIN_ACCESSORS = [CheckboxControlValueAccessor, RangeValueAccessor, NumberValueAccessor, SelectControlValueAccessor, SelectMultipleControlValueAccessor, RadioControlValueAccessor];

      function isBuiltInAccessor(valueAccessor) {
        return BUILTIN_ACCESSORS.some(function (a) {
          return valueAccessor.constructor === a;
        });
      }

      function syncPendingControls(form, directives) {
        form._syncPendingControls();

        directives.forEach(function (dir) {
          var control = dir.control;

          if (control.updateOn === 'submit' && control._pendingChange) {
            dir.viewToModelUpdate(control._pendingValue);
            control._pendingChange = false;
          }
        });
      } // TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented


      function selectValueAccessor(dir, valueAccessors) {
        if (!valueAccessors) return null;
        if (!Array.isArray(valueAccessors) && (typeof ngDevMode === 'undefined' || ngDevMode)) _throwError(dir, 'Value accessor was not provided as an array for form control with');
        var defaultAccessor = undefined;
        var builtinAccessor = undefined;
        var customAccessor = undefined;
        valueAccessors.forEach(function (v) {
          if (v.constructor === DefaultValueAccessor) {
            defaultAccessor = v;
          } else if (isBuiltInAccessor(v)) {
            if (builtinAccessor && (typeof ngDevMode === 'undefined' || ngDevMode)) _throwError(dir, 'More than one built-in value accessor matches form control with');
            builtinAccessor = v;
          } else {
            if (customAccessor && (typeof ngDevMode === 'undefined' || ngDevMode)) _throwError(dir, 'More than one custom value accessor matches form control with');
            customAccessor = v;
          }
        });
        if (customAccessor) return customAccessor;
        if (builtinAccessor) return builtinAccessor;
        if (defaultAccessor) return defaultAccessor;

        if (typeof ngDevMode === 'undefined' || ngDevMode) {
          _throwError(dir, 'No valid value accessor for form control with');
        }

        return null;
      }

      function removeListItem(list, el) {
        var index = list.indexOf(el);
        if (index > -1) list.splice(index, 1);
      } // TODO(kara): remove after deprecation period


      function _ngModelWarning(name, type, instance, warningConfig) {
        if (warningConfig === 'never') return;

        if ((warningConfig === null || warningConfig === 'once') && !type._ngModelWarningSentOnce || warningConfig === 'always' && !instance._ngModelWarningSent) {
          ReactiveErrors.ngModelWarning(name);
          type._ngModelWarningSentOnce = true;
          instance._ngModelWarningSent = true;
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Reports that a FormControl is valid, meaning that no errors exist in the input value.
       *
       * @see `status`
       */


      var VALID = 'VALID';
      /**
       * Reports that a FormControl is invalid, meaning that an error exists in the input value.
       *
       * @see `status`
       */

      var INVALID = 'INVALID';
      /**
       * Reports that a FormControl is pending, meaning that that async validation is occurring and
       * errors are not yet available for the input value.
       *
       * @see `markAsPending`
       * @see `status`
       */

      var PENDING = 'PENDING';
      /**
       * Reports that a FormControl is disabled, meaning that the control is exempt from ancestor
       * calculations of validity or value.
       *
       * @see `markAsDisabled`
       * @see `status`
       */

      var DISABLED = 'DISABLED';

      function _find(control, path, delimiter) {
        if (path == null) return null;

        if (!Array.isArray(path)) {
          path = path.split(delimiter);
        }

        if (Array.isArray(path) && path.length === 0) return null; // Not using Array.reduce here due to a Chrome 80 bug
        // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982

        var controlToFind = control;
        path.forEach(function (name) {
          if (controlToFind instanceof FormGroup) {
            controlToFind = controlToFind.controls.hasOwnProperty(name) ? controlToFind.controls[name] : null;
          } else if (controlToFind instanceof FormArray) {
            controlToFind = controlToFind.at(name) || null;
          } else {
            controlToFind = null;
          }
        });
        return controlToFind;
      }
      /**
       * Gets validators from either an options object or given validators.
       */


      function pickValidators(validatorOrOpts) {
        return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.validators : validatorOrOpts) || null;
      }
      /**
       * Creates validator function by combining provided validators.
       */


      function coerceToValidator(validator) {
        return Array.isArray(validator) ? composeValidators(validator) : validator || null;
      }
      /**
       * Gets async validators from either an options object or given validators.
       */


      function pickAsyncValidators(asyncValidator, validatorOrOpts) {
        return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.asyncValidators : asyncValidator) || null;
      }
      /**
       * Creates async validator function by combining provided async validators.
       */


      function coerceToAsyncValidator(asyncValidator) {
        return Array.isArray(asyncValidator) ? composeAsyncValidators(asyncValidator) : asyncValidator || null;
      }

      function isOptionsObj(validatorOrOpts) {
        return validatorOrOpts != null && !Array.isArray(validatorOrOpts) && typeof validatorOrOpts === 'object';
      }
      /**
       * This is the base class for `FormControl`, `FormGroup`, and `FormArray`.
       *
       * It provides some of the shared behavior that all controls and groups of controls have, like
       * running validators, calculating status, and resetting state. It also defines the properties
       * that are shared between all sub-classes, like `value`, `valid`, and `dirty`. It shouldn't be
       * instantiated directly.
       *
       * @see [Forms Guide](/guide/forms)
       * @see [Reactive Forms Guide](/guide/reactive-forms)
       * @see [Dynamic Forms Guide](/guide/dynamic-form)
       *
       * @publicApi
       */


      var AbstractControl = /*#__PURE__*/function () {
        /**
         * Initialize the AbstractControl instance.
         *
         * @param validators The function or array of functions that is used to determine the validity of
         *     this control synchronously.
         * @param asyncValidators The function or array of functions that is used to determine validity of
         *     this control asynchronously.
         */
        function AbstractControl(validators, asyncValidators) {
          _classCallCheck(this, AbstractControl);

          /**
           * Indicates that a control has its own pending asynchronous validation in progress.
           *
           * @internal
           */
          this._hasOwnPendingAsyncValidator = false;
          /** @internal */

          this._onCollectionChange = function () {};

          this._parent = null;
          /**
           * A control is `pristine` if the user has not yet changed
           * the value in the UI.
           *
           * @returns True if the user has not yet changed the value in the UI; compare `dirty`.
           * Programmatic changes to a control's value do not mark it dirty.
           */

          this.pristine = true;
          /**
           * True if the control is marked as `touched`.
           *
           * A control is marked `touched` once the user has triggered
           * a `blur` event on it.
           */

          this.touched = false;
          /** @internal */

          this._onDisabledChange = [];
          this._rawValidators = validators;
          this._rawAsyncValidators = asyncValidators;
          this._composedValidatorFn = coerceToValidator(this._rawValidators);
          this._composedAsyncValidatorFn = coerceToAsyncValidator(this._rawAsyncValidators);
        }
        /**
         * The function that is used to determine the validity of this control synchronously.
         */


        _createClass2(AbstractControl, [{
          key: "validator",
          get: function get() {
            return this._composedValidatorFn;
          },
          set: function set(validatorFn) {
            this._rawValidators = this._composedValidatorFn = validatorFn;
          }
          /**
           * The function that is used to determine the validity of this control asynchronously.
           */

        }, {
          key: "asyncValidator",
          get: function get() {
            return this._composedAsyncValidatorFn;
          },
          set: function set(asyncValidatorFn) {
            this._rawAsyncValidators = this._composedAsyncValidatorFn = asyncValidatorFn;
          }
          /**
           * The parent control.
           */

        }, {
          key: "parent",
          get: function get() {
            return this._parent;
          }
          /**
           * A control is `valid` when its `status` is `VALID`.
           *
           * @see {@link AbstractControl.status}
           *
           * @returns True if the control has passed all of its validation tests,
           * false otherwise.
           */

        }, {
          key: "valid",
          get: function get() {
            return this.status === VALID;
          }
          /**
           * A control is `invalid` when its `status` is `INVALID`.
           *
           * @see {@link AbstractControl.status}
           *
           * @returns True if this control has failed one or more of its validation checks,
           * false otherwise.
           */

        }, {
          key: "invalid",
          get: function get() {
            return this.status === INVALID;
          }
          /**
           * A control is `pending` when its `status` is `PENDING`.
           *
           * @see {@link AbstractControl.status}
           *
           * @returns True if this control is in the process of conducting a validation check,
           * false otherwise.
           */

        }, {
          key: "pending",
          get: function get() {
            return this.status == PENDING;
          }
          /**
           * A control is `disabled` when its `status` is `DISABLED`.
           *
           * Disabled controls are exempt from validation checks and
           * are not included in the aggregate value of their ancestor
           * controls.
           *
           * @see {@link AbstractControl.status}
           *
           * @returns True if the control is disabled, false otherwise.
           */

        }, {
          key: "disabled",
          get: function get() {
            return this.status === DISABLED;
          }
          /**
           * A control is `enabled` as long as its `status` is not `DISABLED`.
           *
           * @returns True if the control has any status other than 'DISABLED',
           * false if the status is 'DISABLED'.
           *
           * @see {@link AbstractControl.status}
           *
           */

        }, {
          key: "enabled",
          get: function get() {
            return this.status !== DISABLED;
          }
          /**
           * A control is `dirty` if the user has changed the value
           * in the UI.
           *
           * @returns True if the user has changed the value of this control in the UI; compare `pristine`.
           * Programmatic changes to a control's value do not mark it dirty.
           */

        }, {
          key: "dirty",
          get: function get() {
            return !this.pristine;
          }
          /**
           * True if the control has not been marked as touched
           *
           * A control is `untouched` if the user has not yet triggered
           * a `blur` event on it.
           */

        }, {
          key: "untouched",
          get: function get() {
            return !this.touched;
          }
          /**
           * Reports the update strategy of the `AbstractControl` (meaning
           * the event on which the control updates itself).
           * Possible values: `'change'` | `'blur'` | `'submit'`
           * Default value: `'change'`
           */

        }, {
          key: "updateOn",
          get: function get() {
            return this._updateOn ? this._updateOn : this.parent ? this.parent.updateOn : 'change';
          }
          /**
           * Sets the synchronous validators that are active on this control.  Calling
           * this overwrites any existing sync validators.
           *
           * When you add or remove a validator at run time, you must call
           * `updateValueAndValidity()` for the new validation to take effect.
           *
           */

        }, {
          key: "setValidators",
          value: function setValidators(newValidator) {
            this._rawValidators = newValidator;
            this._composedValidatorFn = coerceToValidator(newValidator);
          }
          /**
           * Sets the async validators that are active on this control. Calling this
           * overwrites any existing async validators.
           *
           * When you add or remove a validator at run time, you must call
           * `updateValueAndValidity()` for the new validation to take effect.
           *
           */

        }, {
          key: "setAsyncValidators",
          value: function setAsyncValidators(newValidator) {
            this._rawAsyncValidators = newValidator;
            this._composedAsyncValidatorFn = coerceToAsyncValidator(newValidator);
          }
          /**
           * Empties out the sync validator list.
           *
           * When you add or remove a validator at run time, you must call
           * `updateValueAndValidity()` for the new validation to take effect.
           *
           */

        }, {
          key: "clearValidators",
          value: function clearValidators() {
            this.validator = null;
          }
          /**
           * Empties out the async validator list.
           *
           * When you add or remove a validator at run time, you must call
           * `updateValueAndValidity()` for the new validation to take effect.
           *
           */

        }, {
          key: "clearAsyncValidators",
          value: function clearAsyncValidators() {
            this.asyncValidator = null;
          }
          /**
           * Marks the control as `touched`. A control is touched by focus and
           * blur events that do not change the value.
           *
           * @see `markAsUntouched()`
           * @see `markAsDirty()`
           * @see `markAsPristine()`
           *
           * @param opts Configuration options that determine how the control propagates changes
           * and emits events after marking is applied.
           * * `onlySelf`: When true, mark only this control. When false or not supplied,
           * marks all direct ancestors. Default is false.
           */

        }, {
          key: "markAsTouched",
          value: function markAsTouched() {
            var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            this.touched = true;

            if (this._parent && !opts.onlySelf) {
              this._parent.markAsTouched(opts);
            }
          }
          /**
           * Marks the control and all its descendant controls as `touched`.
           * @see `markAsTouched()`
           */

        }, {
          key: "markAllAsTouched",
          value: function markAllAsTouched() {
            this.markAsTouched({
              onlySelf: true
            });

            this._forEachChild(function (control) {
              return control.markAllAsTouched();
            });
          }
          /**
           * Marks the control as `untouched`.
           *
           * If the control has any children, also marks all children as `untouched`
           * and recalculates the `touched` status of all parent controls.
           *
           * @see `markAsTouched()`
           * @see `markAsDirty()`
           * @see `markAsPristine()`
           *
           * @param opts Configuration options that determine how the control propagates changes
           * and emits events after the marking is applied.
           * * `onlySelf`: When true, mark only this control. When false or not supplied,
           * marks all direct ancestors. Default is false.
           */

        }, {
          key: "markAsUntouched",
          value: function markAsUntouched() {
            var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            this.touched = false;
            this._pendingTouched = false;

            this._forEachChild(function (control) {
              control.markAsUntouched({
                onlySelf: true
              });
            });

            if (this._parent && !opts.onlySelf) {
              this._parent._updateTouched(opts);
            }
          }
          /**
           * Marks the control as `dirty`. A control becomes dirty when
           * the control's value is changed through the UI; compare `markAsTouched`.
           *
           * @see `markAsTouched()`
           * @see `markAsUntouched()`
           * @see `markAsPristine()`
           *
           * @param opts Configuration options that determine how the control propagates changes
           * and emits events after marking is applied.
           * * `onlySelf`: When true, mark only this control. When false or not supplied,
           * marks all direct ancestors. Default is false.
           */

        }, {
          key: "markAsDirty",
          value: function markAsDirty() {
            var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            this.pristine = false;

            if (this._parent && !opts.onlySelf) {
              this._parent.markAsDirty(opts);
            }
          }
          /**
           * Marks the control as `pristine`.
           *
           * If the control has any children, marks all children as `pristine`,
           * and recalculates the `pristine` status of all parent
           * controls.
           *
           * @see `markAsTouched()`
           * @see `markAsUntouched()`
           * @see `markAsDirty()`
           *
           * @param opts Configuration options that determine how the control emits events after
           * marking is applied.
           * * `onlySelf`: When true, mark only this control. When false or not supplied,
           * marks all direct ancestors. Default is false.
           */

        }, {
          key: "markAsPristine",
          value: function markAsPristine() {
            var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            this.pristine = true;
            this._pendingDirty = false;

            this._forEachChild(function (control) {
              control.markAsPristine({
                onlySelf: true
              });
            });

            if (this._parent && !opts.onlySelf) {
              this._parent._updatePristine(opts);
            }
          }
          /**
           * Marks the control as `pending`.
           *
           * A control is pending while the control performs async validation.
           *
           * @see {@link AbstractControl.status}
           *
           * @param opts Configuration options that determine how the control propagates changes and
           * emits events after marking is applied.
           * * `onlySelf`: When true, mark only this control. When false or not supplied,
           * marks all direct ancestors. Default is false.
           * * `emitEvent`: When true or not supplied (the default), the `statusChanges`
           * observable emits an event with the latest status the control is marked pending.
           * When false, no events are emitted.
           *
           */

        }, {
          key: "markAsPending",
          value: function markAsPending() {
            var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            this.status = PENDING;

            if (opts.emitEvent !== false) {
              this.statusChanges.emit(this.status);
            }

            if (this._parent && !opts.onlySelf) {
              this._parent.markAsPending(opts);
            }
          }
          /**
           * Disables the control. This means the control is exempt from validation checks and
           * excluded from the aggregate value of any parent. Its status is `DISABLED`.
           *
           * If the control has children, all children are also disabled.
           *
           * @see {@link AbstractControl.status}
           *
           * @param opts Configuration options that determine how the control propagates
           * changes and emits events after the control is disabled.
           * * `onlySelf`: When true, mark only this control. When false or not supplied,
           * marks all direct ancestors. Default is false.
           * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
           * `valueChanges`
           * observables emit events with the latest status and value when the control is disabled.
           * When false, no events are emitted.
           */

        }, {
          key: "disable",
          value: function disable() {
            var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

            // If parent has been marked artificially dirty we don't want to re-calculate the
            // parent's dirtiness based on the children.
            var skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);

            this.status = DISABLED;
            this.errors = null;

            this._forEachChild(function (control) {
              control.disable(Object.assign(Object.assign({}, opts), {
                onlySelf: true
              }));
            });

            this._updateValue();

            if (opts.emitEvent !== false) {
              this.valueChanges.emit(this.value);
              this.statusChanges.emit(this.status);
            }

            this._updateAncestors(Object.assign(Object.assign({}, opts), {
              skipPristineCheck: skipPristineCheck
            }));

            this._onDisabledChange.forEach(function (changeFn) {
              return changeFn(true);
            });
          }
          /**
           * Enables the control. This means the control is included in validation checks and
           * the aggregate value of its parent. Its status recalculates based on its value and
           * its validators.
           *
           * By default, if the control has children, all children are enabled.
           *
           * @see {@link AbstractControl.status}
           *
           * @param opts Configure options that control how the control propagates changes and
           * emits events when marked as untouched
           * * `onlySelf`: When true, mark only this control. When false or not supplied,
           * marks all direct ancestors. Default is false.
           * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
           * `valueChanges`
           * observables emit events with the latest status and value when the control is enabled.
           * When false, no events are emitted.
           */

        }, {
          key: "enable",
          value: function enable() {
            var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

            // If parent has been marked artificially dirty we don't want to re-calculate the
            // parent's dirtiness based on the children.
            var skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);

            this.status = VALID;

            this._forEachChild(function (control) {
              control.enable(Object.assign(Object.assign({}, opts), {
                onlySelf: true
              }));
            });

            this.updateValueAndValidity({
              onlySelf: true,
              emitEvent: opts.emitEvent
            });

            this._updateAncestors(Object.assign(Object.assign({}, opts), {
              skipPristineCheck: skipPristineCheck
            }));

            this._onDisabledChange.forEach(function (changeFn) {
              return changeFn(false);
            });
          }
        }, {
          key: "_updateAncestors",
          value: function _updateAncestors(opts) {
            if (this._parent && !opts.onlySelf) {
              this._parent.updateValueAndValidity(opts);

              if (!opts.skipPristineCheck) {
                this._parent._updatePristine();
              }

              this._parent._updateTouched();
            }
          }
          /**
           * @param parent Sets the parent of the control
           */

        }, {
          key: "setParent",
          value: function setParent(parent) {
            this._parent = parent;
          }
          /**
           * Recalculates the value and validation status of the control.
           *
           * By default, it also updates the value and validity of its ancestors.
           *
           * @param opts Configuration options determine how the control propagates changes and emits events
           * after updates and validity checks are applied.
           * * `onlySelf`: When true, only update this control. When false or not supplied,
           * update all direct ancestors. Default is false.
           * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
           * `valueChanges`
           * observables emit events with the latest status and value when the control is updated.
           * When false, no events are emitted.
           */

        }, {
          key: "updateValueAndValidity",
          value: function updateValueAndValidity() {
            var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

            this._setInitialStatus();

            this._updateValue();

            if (this.enabled) {
              this._cancelExistingSubscription();

              this.errors = this._runValidator();
              this.status = this._calculateStatus();

              if (this.status === VALID || this.status === PENDING) {
                this._runAsyncValidator(opts.emitEvent);
              }
            }

            if (opts.emitEvent !== false) {
              this.valueChanges.emit(this.value);
              this.statusChanges.emit(this.status);
            }

            if (this._parent && !opts.onlySelf) {
              this._parent.updateValueAndValidity(opts);
            }
          }
          /** @internal */

        }, {
          key: "_updateTreeValidity",
          value: function _updateTreeValidity() {
            var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
              emitEvent: true
            };

            this._forEachChild(function (ctrl) {
              return ctrl._updateTreeValidity(opts);
            });

            this.updateValueAndValidity({
              onlySelf: true,
              emitEvent: opts.emitEvent
            });
          }
        }, {
          key: "_setInitialStatus",
          value: function _setInitialStatus() {
            this.status = this._allControlsDisabled() ? DISABLED : VALID;
          }
        }, {
          key: "_runValidator",
          value: function _runValidator() {
            return this.validator ? this.validator(this) : null;
          }
        }, {
          key: "_runAsyncValidator",
          value: function _runAsyncValidator(emitEvent) {
            var _this328 = this;

            if (this.asyncValidator) {
              this.status = PENDING;
              this._hasOwnPendingAsyncValidator = true;
              var obs = toObservable(this.asyncValidator(this));
              this._asyncValidationSubscription = obs.subscribe(function (errors) {
                _this328._hasOwnPendingAsyncValidator = false; // This will trigger the recalculation of the validation status, which depends on
                // the state of the asynchronous validation (whether it is in progress or not). So, it is
                // necessary that we have updated the `_hasOwnPendingAsyncValidator` boolean flag first.

                _this328.setErrors(errors, {
                  emitEvent: emitEvent
                });
              });
            }
          }
        }, {
          key: "_cancelExistingSubscription",
          value: function _cancelExistingSubscription() {
            if (this._asyncValidationSubscription) {
              this._asyncValidationSubscription.unsubscribe();

              this._hasOwnPendingAsyncValidator = false;
            }
          }
          /**
           * Sets errors on a form control when running validations manually, rather than automatically.
           *
           * Calling `setErrors` also updates the validity of the parent control.
           *
           * @usageNotes
           *
           * ### Manually set the errors for a control
           *
           * ```
           * const login = new FormControl('someLogin');
           * login.setErrors({
           *   notUnique: true
           * });
           *
           * expect(login.valid).toEqual(false);
           * expect(login.errors).toEqual({ notUnique: true });
           *
           * login.setValue('someOtherLogin');
           *
           * expect(login.valid).toEqual(true);
           * ```
           */

        }, {
          key: "setErrors",
          value: function setErrors(errors) {
            var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
            this.errors = errors;

            this._updateControlsErrors(opts.emitEvent !== false);
          }
          /**
           * Retrieves a child control given the control's name or path.
           *
           * @param path A dot-delimited string or array of string/number values that define the path to the
           * control.
           *
           * @usageNotes
           * ### Retrieve a nested control
           *
           * For example, to get a `name` control nested within a `person` sub-group:
           *
           * * `this.form.get('person.name');`
           *
           * -OR-
           *
           * * `this.form.get(['person', 'name']);`
           */

        }, {
          key: "get",
          value: function get(path) {
            return _find(this, path, '.');
          }
          /**
           * @description
           * Reports error data for the control with the given path.
           *
           * @param errorCode The code of the error to check
           * @param path A list of control names that designates how to move from the current control
           * to the control that should be queried for errors.
           *
           * @usageNotes
           * For example, for the following `FormGroup`:
           *
           * ```
           * form = new FormGroup({
           *   address: new FormGroup({ street: new FormControl() })
           * });
           * ```
           *
           * The path to the 'street' control from the root form would be 'address' -> 'street'.
           *
           * It can be provided to this method in one of two formats:
           *
           * 1. An array of string control names, e.g. `['address', 'street']`
           * 1. A period-delimited list of control names in one string, e.g. `'address.street'`
           *
           * @returns error data for that particular error. If the control or error is not present,
           * null is returned.
           */

        }, {
          key: "getError",
          value: function getError(errorCode, path) {
            var control = path ? this.get(path) : this;
            return control && control.errors ? control.errors[errorCode] : null;
          }
          /**
           * @description
           * Reports whether the control with the given path has the error specified.
           *
           * @param errorCode The code of the error to check
           * @param path A list of control names that designates how to move from the current control
           * to the control that should be queried for errors.
           *
           * @usageNotes
           * For example, for the following `FormGroup`:
           *
           * ```
           * form = new FormGroup({
           *   address: new FormGroup({ street: new FormControl() })
           * });
           * ```
           *
           * The path to the 'street' control from the root form would be 'address' -> 'street'.
           *
           * It can be provided to this method in one of two formats:
           *
           * 1. An array of string control names, e.g. `['address', 'street']`
           * 1. A period-delimited list of control names in one string, e.g. `'address.street'`
           *
           * If no path is given, this method checks for the error on the current control.
           *
           * @returns whether the given error is present in the control at the given path.
           *
           * If the control is not present, false is returned.
           */

        }, {
          key: "hasError",
          value: function hasError(errorCode, path) {
            return !!this.getError(errorCode, path);
          }
          /**
           * Retrieves the top-level ancestor of this control.
           */

        }, {
          key: "root",
          get: function get() {
            var x = this;

            while (x._parent) {
              x = x._parent;
            }

            return x;
          }
          /** @internal */

        }, {
          key: "_updateControlsErrors",
          value: function _updateControlsErrors(emitEvent) {
            this.status = this._calculateStatus();

            if (emitEvent) {
              this.statusChanges.emit(this.status);
            }

            if (this._parent) {
              this._parent._updateControlsErrors(emitEvent);
            }
          }
          /** @internal */

        }, {
          key: "_initObservables",
          value: function _initObservables() {
            this.valueChanges = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
            this.statusChanges = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          }
        }, {
          key: "_calculateStatus",
          value: function _calculateStatus() {
            if (this._allControlsDisabled()) return DISABLED;
            if (this.errors) return INVALID;
            if (this._hasOwnPendingAsyncValidator || this._anyControlsHaveStatus(PENDING)) return PENDING;
            if (this._anyControlsHaveStatus(INVALID)) return INVALID;
            return VALID;
          }
          /** @internal */

        }, {
          key: "_anyControlsHaveStatus",
          value: function _anyControlsHaveStatus(status) {
            return this._anyControls(function (control) {
              return control.status === status;
            });
          }
          /** @internal */

        }, {
          key: "_anyControlsDirty",
          value: function _anyControlsDirty() {
            return this._anyControls(function (control) {
              return control.dirty;
            });
          }
          /** @internal */

        }, {
          key: "_anyControlsTouched",
          value: function _anyControlsTouched() {
            return this._anyControls(function (control) {
              return control.touched;
            });
          }
          /** @internal */

        }, {
          key: "_updatePristine",
          value: function _updatePristine() {
            var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            this.pristine = !this._anyControlsDirty();

            if (this._parent && !opts.onlySelf) {
              this._parent._updatePristine(opts);
            }
          }
          /** @internal */

        }, {
          key: "_updateTouched",
          value: function _updateTouched() {
            var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            this.touched = this._anyControlsTouched();

            if (this._parent && !opts.onlySelf) {
              this._parent._updateTouched(opts);
            }
          }
          /** @internal */

        }, {
          key: "_isBoxedValue",
          value: function _isBoxedValue(formState) {
            return typeof formState === 'object' && formState !== null && Object.keys(formState).length === 2 && 'value' in formState && 'disabled' in formState;
          }
          /** @internal */

        }, {
          key: "_registerOnCollectionChange",
          value: function _registerOnCollectionChange(fn) {
            this._onCollectionChange = fn;
          }
          /** @internal */

        }, {
          key: "_setUpdateStrategy",
          value: function _setUpdateStrategy(opts) {
            if (isOptionsObj(opts) && opts.updateOn != null) {
              this._updateOn = opts.updateOn;
            }
          }
          /**
           * Check to see if parent has been marked artificially dirty.
           *
           * @internal
           */

        }, {
          key: "_parentMarkedDirty",
          value: function _parentMarkedDirty(onlySelf) {
            var parentDirty = this._parent && this._parent.dirty;
            return !onlySelf && !!parentDirty && !this._parent._anyControlsDirty();
          }
        }]);

        return AbstractControl;
      }();
      /**
       * Tracks the value and validation status of an individual form control.
       *
       * This is one of the three fundamental building blocks of Angular forms, along with
       * `FormGroup` and `FormArray`. It extends the `AbstractControl` class that
       * implements most of the base functionality for accessing the value, validation status,
       * user interactions and events. See [usage examples below](#usage-notes).
       *
       * @see `AbstractControl`
       * @see [Reactive Forms Guide](guide/reactive-forms)
       * @see [Usage Notes](#usage-notes)
       *
       * @usageNotes
       *
       * ### Initializing Form Controls
       *
       * Instantiate a `FormControl`, with an initial value.
       *
       * ```ts
       * const control = new FormControl('some value');
       * console.log(control.value);     // 'some value'
       *```
       *
       * The following example initializes the control with a form state object. The `value`
       * and `disabled` keys are required in this case.
       *
       * ```ts
       * const control = new FormControl({ value: 'n/a', disabled: true });
       * console.log(control.value);     // 'n/a'
       * console.log(control.status);    // 'DISABLED'
       * ```
       *
       * The following example initializes the control with a sync validator.
       *
       * ```ts
       * const control = new FormControl('', Validators.required);
       * console.log(control.value);      // ''
       * console.log(control.status);     // 'INVALID'
       * ```
       *
       * The following example initializes the control using an options object.
       *
       * ```ts
       * const control = new FormControl('', {
       *    validators: Validators.required,
       *    asyncValidators: myAsyncValidator
       * });
       * ```
       *
       * ### Configure the control to update on a blur event
       *
       * Set the `updateOn` option to `'blur'` to update on the blur `event`.
       *
       * ```ts
       * const control = new FormControl('', { updateOn: 'blur' });
       * ```
       *
       * ### Configure the control to update on a submit event
       *
       * Set the `updateOn` option to `'submit'` to update on a submit `event`.
       *
       * ```ts
       * const control = new FormControl('', { updateOn: 'submit' });
       * ```
       *
       * ### Reset the control back to an initial value
       *
       * You reset to a specific form state by passing through a standalone
       * value or a form state object that contains both a value and a disabled state
       * (these are the only two properties that cannot be calculated).
       *
       * ```ts
       * const control = new FormControl('Nancy');
       *
       * console.log(control.value); // 'Nancy'
       *
       * control.reset('Drew');
       *
       * console.log(control.value); // 'Drew'
       * ```
       *
       * ### Reset the control back to an initial value and disabled
       *
       * ```
       * const control = new FormControl('Nancy');
       *
       * console.log(control.value); // 'Nancy'
       * console.log(control.status); // 'VALID'
       *
       * control.reset({ value: 'Drew', disabled: true });
       *
       * console.log(control.value); // 'Drew'
       * console.log(control.status); // 'DISABLED'
       * ```
       *
       * @publicApi
       */


      var FormControl = /*#__PURE__*/function (_AbstractControl) {
        _inherits(FormControl, _AbstractControl);

        var _super127 = _createSuper(FormControl);

        /**
         * Creates a new `FormControl` instance.
         *
         * @param formState Initializes the control with an initial value,
         * or an object that defines the initial value and disabled state.
         *
         * @param validatorOrOpts A synchronous validator function, or an array of
         * such functions, or an `AbstractControlOptions` object that contains validation functions
         * and a validation trigger.
         *
         * @param asyncValidator A single async validator or array of async validator functions
         *
         */
        function FormControl() {
          var _this329;

          var formState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
          var validatorOrOpts = arguments.length > 1 ? arguments[1] : undefined;
          var asyncValidator = arguments.length > 2 ? arguments[2] : undefined;

          _classCallCheck(this, FormControl);

          _this329 = _super127.call(this, pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));
          /** @internal */

          _this329._onChange = [];

          _this329._applyFormState(formState);

          _this329._setUpdateStrategy(validatorOrOpts);

          _this329._initObservables();

          _this329.updateValueAndValidity({
            onlySelf: true,
            // If `asyncValidator` is present, it will trigger control status change from `PENDING` to
            // `VALID` or `INVALID`.
            // The status should be broadcasted via the `statusChanges` observable, so we set `emitEvent`
            // to `true` to allow that during the control creation process.
            emitEvent: !!asyncValidator
          });

          return _this329;
        }
        /**
         * Sets a new value for the form control.
         *
         * @param value The new value for the control.
         * @param options Configuration options that determine how the control propagates changes
         * and emits events when the value changes.
         * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity
         * updateValueAndValidity} method.
         *
         * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is
         * false.
         * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
         * `valueChanges`
         * observables emit events with the latest status and value when the control value is updated.
         * When false, no events are emitted.
         * * `emitModelToViewChange`: When true or not supplied  (the default), each change triggers an
         * `onChange` event to
         * update the view.
         * * `emitViewToModelChange`: When true or not supplied (the default), each change triggers an
         * `ngModelChange`
         * event to update the model.
         *
         */


        _createClass2(FormControl, [{
          key: "setValue",
          value: function setValue(value) {
            var _this330 = this;

            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
            this.value = this._pendingValue = value;

            if (this._onChange.length && options.emitModelToViewChange !== false) {
              this._onChange.forEach(function (changeFn) {
                return changeFn(_this330.value, options.emitViewToModelChange !== false);
              });
            }

            this.updateValueAndValidity(options);
          }
          /**
           * Patches the value of a control.
           *
           * This function is functionally the same as {@link FormControl#setValue setValue} at this level.
           * It exists for symmetry with {@link FormGroup#patchValue patchValue} on `FormGroups` and
           * `FormArrays`, where it does behave differently.
           *
           * @see `setValue` for options
           */

        }, {
          key: "patchValue",
          value: function patchValue(value) {
            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
            this.setValue(value, options);
          }
          /**
           * Resets the form control, marking it `pristine` and `untouched`, and setting
           * the value to null.
           *
           * @param formState Resets the control with an initial value,
           * or an object that defines the initial value and disabled state.
           *
           * @param options Configuration options that determine how the control propagates changes
           * and emits events after the value changes.
           *
           * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is
           * false.
           * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
           * `valueChanges`
           * observables emit events with the latest status and value when the control is reset.
           * When false, no events are emitted.
           *
           */

        }, {
          key: "reset",
          value: function reset() {
            var formState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

            this._applyFormState(formState);

            this.markAsPristine(options);
            this.markAsUntouched(options);
            this.setValue(this.value, options);
            this._pendingChange = false;
          }
          /**
           * @internal
           */

        }, {
          key: "_updateValue",
          value: function _updateValue() {}
          /**
           * @internal
           */

        }, {
          key: "_anyControls",
          value: function _anyControls(condition) {
            return false;
          }
          /**
           * @internal
           */

        }, {
          key: "_allControlsDisabled",
          value: function _allControlsDisabled() {
            return this.disabled;
          }
          /**
           * Register a listener for change events.
           *
           * @param fn The method that is called when the value changes
           */

        }, {
          key: "registerOnChange",
          value: function registerOnChange(fn) {
            this._onChange.push(fn);
          }
          /**
           * Internal function to unregister a change events listener.
           * @internal
           */

        }, {
          key: "_unregisterOnChange",
          value: function _unregisterOnChange(fn) {
            removeListItem(this._onChange, fn);
          }
          /**
           * Register a listener for disabled events.
           *
           * @param fn The method that is called when the disabled status changes.
           */

        }, {
          key: "registerOnDisabledChange",
          value: function registerOnDisabledChange(fn) {
            this._onDisabledChange.push(fn);
          }
          /**
           * Internal function to unregister a disabled event listener.
           * @internal
           */

        }, {
          key: "_unregisterOnDisabledChange",
          value: function _unregisterOnDisabledChange(fn) {
            removeListItem(this._onDisabledChange, fn);
          }
          /**
           * @internal
           */

        }, {
          key: "_forEachChild",
          value: function _forEachChild(cb) {}
          /** @internal */

        }, {
          key: "_syncPendingControls",
          value: function _syncPendingControls() {
            if (this.updateOn === 'submit') {
              if (this._pendingDirty) this.markAsDirty();
              if (this._pendingTouched) this.markAsTouched();

              if (this._pendingChange) {
                this.setValue(this._pendingValue, {
                  onlySelf: true,
                  emitModelToViewChange: false
                });
                return true;
              }
            }

            return false;
          }
        }, {
          key: "_applyFormState",
          value: function _applyFormState(formState) {
            if (this._isBoxedValue(formState)) {
              this.value = this._pendingValue = formState.value;
              formState.disabled ? this.disable({
                onlySelf: true,
                emitEvent: false
              }) : this.enable({
                onlySelf: true,
                emitEvent: false
              });
            } else {
              this.value = this._pendingValue = formState;
            }
          }
        }]);

        return FormControl;
      }(AbstractControl);
      /**
       * Tracks the value and validity state of a group of `FormControl` instances.
       *
       * A `FormGroup` aggregates the values of each child `FormControl` into one object,
       * with each control name as the key.  It calculates its status by reducing the status values
       * of its children. For example, if one of the controls in a group is invalid, the entire
       * group becomes invalid.
       *
       * `FormGroup` is one of the three fundamental building blocks used to define forms in Angular,
       * along with `FormControl` and `FormArray`.
       *
       * When instantiating a `FormGroup`, pass in a collection of child controls as the first
       * argument. The key for each child registers the name for the control.
       *
       * @usageNotes
       *
       * ### Create a form group with 2 controls
       *
       * ```
       * const form = new FormGroup({
       *   first: new FormControl('Nancy', Validators.minLength(2)),
       *   last: new FormControl('Drew'),
       * });
       *
       * console.log(form.value);   // {first: 'Nancy', last; 'Drew'}
       * console.log(form.status);  // 'VALID'
       * ```
       *
       * ### Create a form group with a group-level validator
       *
       * You include group-level validators as the second arg, or group-level async
       * validators as the third arg. These come in handy when you want to perform validation
       * that considers the value of more than one child control.
       *
       * ```
       * const form = new FormGroup({
       *   password: new FormControl('', Validators.minLength(2)),
       *   passwordConfirm: new FormControl('', Validators.minLength(2)),
       * }, passwordMatchValidator);
       *
       *
       * function passwordMatchValidator(g: FormGroup) {
       *    return g.get('password').value === g.get('passwordConfirm').value
       *       ? null : {'mismatch': true};
       * }
       * ```
       *
       * Like `FormControl` instances, you choose to pass in
       * validators and async validators as part of an options object.
       *
       * ```
       * const form = new FormGroup({
       *   password: new FormControl('')
       *   passwordConfirm: new FormControl('')
       * }, { validators: passwordMatchValidator, asyncValidators: otherValidator });
       * ```
       *
       * ### Set the updateOn property for all controls in a form group
       *
       * The options object is used to set a default value for each child
       * control's `updateOn` property. If you set `updateOn` to `'blur'` at the
       * group level, all child controls default to 'blur', unless the child
       * has explicitly specified a different `updateOn` value.
       *
       * ```ts
       * const c = new FormGroup({
       *   one: new FormControl()
       * }, { updateOn: 'blur' });
       * ```
       *
       * @publicApi
       */


      var FormGroup = /*#__PURE__*/function (_AbstractControl2) {
        _inherits(FormGroup, _AbstractControl2);

        var _super128 = _createSuper(FormGroup);

        /**
         * Creates a new `FormGroup` instance.
         *
         * @param controls A collection of child controls. The key for each child is the name
         * under which it is registered.
         *
         * @param validatorOrOpts A synchronous validator function, or an array of
         * such functions, or an `AbstractControlOptions` object that contains validation functions
         * and a validation trigger.
         *
         * @param asyncValidator A single async validator or array of async validator functions
         *
         */
        function FormGroup(controls, validatorOrOpts, asyncValidator) {
          var _this331;

          _classCallCheck(this, FormGroup);

          _this331 = _super128.call(this, pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));
          _this331.controls = controls;

          _this331._initObservables();

          _this331._setUpdateStrategy(validatorOrOpts);

          _this331._setUpControls();

          _this331.updateValueAndValidity({
            onlySelf: true,
            // If `asyncValidator` is present, it will trigger control status change from `PENDING` to
            // `VALID` or `INVALID`. The status should be broadcasted via the `statusChanges` observable,
            // so we set `emitEvent` to `true` to allow that during the control creation process.
            emitEvent: !!asyncValidator
          });

          return _this331;
        }
        /**
         * Registers a control with the group's list of controls.
         *
         * This method does not update the value or validity of the control.
         * Use {@link FormGroup#addControl addControl} instead.
         *
         * @param name The control name to register in the collection
         * @param control Provides the control for the given name
         */


        _createClass2(FormGroup, [{
          key: "registerControl",
          value: function registerControl(name, control) {
            if (this.controls[name]) return this.controls[name];
            this.controls[name] = control;
            control.setParent(this);

            control._registerOnCollectionChange(this._onCollectionChange);

            return control;
          }
          /**
           * Add a control to this group.
           *
           * This method also updates the value and validity of the control.
           *
           * @param name The control name to add to the collection
           * @param control Provides the control for the given name
           */

        }, {
          key: "addControl",
          value: function addControl(name, control) {
            this.registerControl(name, control);
            this.updateValueAndValidity();

            this._onCollectionChange();
          }
          /**
           * Remove a control from this group.
           *
           * @param name The control name to remove from the collection
           */

        }, {
          key: "removeControl",
          value: function removeControl(name) {
            if (this.controls[name]) this.controls[name]._registerOnCollectionChange(function () {});
            delete this.controls[name];
            this.updateValueAndValidity();

            this._onCollectionChange();
          }
          /**
           * Replace an existing control.
           *
           * @param name The control name to replace in the collection
           * @param control Provides the control for the given name
           */

        }, {
          key: "setControl",
          value: function setControl(name, control) {
            if (this.controls[name]) this.controls[name]._registerOnCollectionChange(function () {});
            delete this.controls[name];
            if (control) this.registerControl(name, control);
            this.updateValueAndValidity();

            this._onCollectionChange();
          }
          /**
           * Check whether there is an enabled control with the given name in the group.
           *
           * Reports false for disabled controls. If you'd like to check for existence in the group
           * only, use {@link AbstractControl#get get} instead.
           *
           * @param controlName The control name to check for existence in the collection
           *
           * @returns false for disabled controls, true otherwise.
           */

        }, {
          key: "contains",
          value: function contains(controlName) {
            return this.controls.hasOwnProperty(controlName) && this.controls[controlName].enabled;
          }
          /**
           * Sets the value of the `FormGroup`. It accepts an object that matches
           * the structure of the group, with control names as keys.
           *
           * @usageNotes
           * ### Set the complete value for the form group
           *
           * ```
           * const form = new FormGroup({
           *   first: new FormControl(),
           *   last: new FormControl()
           * });
           *
           * console.log(form.value);   // {first: null, last: null}
           *
           * form.setValue({first: 'Nancy', last: 'Drew'});
           * console.log(form.value);   // {first: 'Nancy', last: 'Drew'}
           * ```
           *
           * @throws When strict checks fail, such as setting the value of a control
           * that doesn't exist or if you exclude a value of a control that does exist.
           *
           * @param value The new value for the control that matches the structure of the group.
           * @param options Configuration options that determine how the control propagates changes
           * and emits events after the value changes.
           * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity
           * updateValueAndValidity} method.
           *
           * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is
           * false.
           * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
           * `valueChanges`
           * observables emit events with the latest status and value when the control value is updated.
           * When false, no events are emitted.
           */

        }, {
          key: "setValue",
          value: function setValue(value) {
            var _this332 = this;

            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

            this._checkAllValuesPresent(value);

            Object.keys(value).forEach(function (name) {
              _this332._throwIfControlMissing(name);

              _this332.controls[name].setValue(value[name], {
                onlySelf: true,
                emitEvent: options.emitEvent
              });
            });
            this.updateValueAndValidity(options);
          }
          /**
           * Patches the value of the `FormGroup`. It accepts an object with control
           * names as keys, and does its best to match the values to the correct controls
           * in the group.
           *
           * It accepts both super-sets and sub-sets of the group without throwing an error.
           *
           * @usageNotes
           * ### Patch the value for a form group
           *
           * ```
           * const form = new FormGroup({
           *    first: new FormControl(),
           *    last: new FormControl()
           * });
           * console.log(form.value);   // {first: null, last: null}
           *
           * form.patchValue({first: 'Nancy'});
           * console.log(form.value);   // {first: 'Nancy', last: null}
           * ```
           *
           * @param value The object that matches the structure of the group.
           * @param options Configuration options that determine how the control propagates changes and
           * emits events after the value is patched.
           * * `onlySelf`: When true, each change only affects this control and not its parent. Default is
           * true.
           * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
           * `valueChanges`
           * observables emit events with the latest status and value when the control value is updated.
           * When false, no events are emitted.
           * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity
           * updateValueAndValidity} method.
           */

        }, {
          key: "patchValue",
          value: function patchValue(value) {
            var _this333 = this;

            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
            Object.keys(value).forEach(function (name) {
              if (_this333.controls[name]) {
                _this333.controls[name].patchValue(value[name], {
                  onlySelf: true,
                  emitEvent: options.emitEvent
                });
              }
            });
            this.updateValueAndValidity(options);
          }
          /**
           * Resets the `FormGroup`, marks all descendants `pristine` and `untouched` and sets
           * the value of all descendants to null.
           *
           * You reset to a specific form state by passing in a map of states
           * that matches the structure of your form, with control names as keys. The state
           * is a standalone value or a form state object with both a value and a disabled
           * status.
           *
           * @param value Resets the control with an initial value,
           * or an object that defines the initial value and disabled state.
           *
           * @param options Configuration options that determine how the control propagates changes
           * and emits events when the group is reset.
           * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is
           * false.
           * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
           * `valueChanges`
           * observables emit events with the latest status and value when the control is reset.
           * When false, no events are emitted.
           * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity
           * updateValueAndValidity} method.
           *
           * @usageNotes
           *
           * ### Reset the form group values
           *
           * ```ts
           * const form = new FormGroup({
           *   first: new FormControl('first name'),
           *   last: new FormControl('last name')
           * });
           *
           * console.log(form.value);  // {first: 'first name', last: 'last name'}
           *
           * form.reset({ first: 'name', last: 'last name' });
           *
           * console.log(form.value);  // {first: 'name', last: 'last name'}
           * ```
           *
           * ### Reset the form group values and disabled status
           *
           * ```
           * const form = new FormGroup({
           *   first: new FormControl('first name'),
           *   last: new FormControl('last name')
           * });
           *
           * form.reset({
           *   first: {value: 'name', disabled: true},
           *   last: 'last'
           * });
           *
           * console.log(form.value);  // {last: 'last'}
           * console.log(form.get('first').status);  // 'DISABLED'
           * ```
           */

        }, {
          key: "reset",
          value: function reset() {
            var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

            this._forEachChild(function (control, name) {
              control.reset(value[name], {
                onlySelf: true,
                emitEvent: options.emitEvent
              });
            });

            this._updatePristine(options);

            this._updateTouched(options);

            this.updateValueAndValidity(options);
          }
          /**
           * The aggregate value of the `FormGroup`, including any disabled controls.
           *
           * Retrieves all values regardless of disabled status.
           * The `value` property is the best way to get the value of the group, because
           * it excludes disabled controls in the `FormGroup`.
           */

        }, {
          key: "getRawValue",
          value: function getRawValue() {
            return this._reduceChildren({}, function (acc, control, name) {
              acc[name] = control instanceof FormControl ? control.value : control.getRawValue();
              return acc;
            });
          }
          /** @internal */

        }, {
          key: "_syncPendingControls",
          value: function _syncPendingControls() {
            var subtreeUpdated = this._reduceChildren(false, function (updated, child) {
              return child._syncPendingControls() ? true : updated;
            });

            if (subtreeUpdated) this.updateValueAndValidity({
              onlySelf: true
            });
            return subtreeUpdated;
          }
          /** @internal */

        }, {
          key: "_throwIfControlMissing",
          value: function _throwIfControlMissing(name) {
            if (!Object.keys(this.controls).length) {
              throw new Error("\n        There are no form controls registered with this group yet. If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      ");
            }

            if (!this.controls[name]) {
              throw new Error("Cannot find form control with name: ".concat(name, "."));
            }
          }
          /** @internal */

        }, {
          key: "_forEachChild",
          value: function _forEachChild(cb) {
            var _this334 = this;

            Object.keys(this.controls).forEach(function (k) {
              return cb(_this334.controls[k], k);
            });
          }
          /** @internal */

        }, {
          key: "_setUpControls",
          value: function _setUpControls() {
            var _this335 = this;

            this._forEachChild(function (control) {
              control.setParent(_this335);

              control._registerOnCollectionChange(_this335._onCollectionChange);
            });
          }
          /** @internal */

        }, {
          key: "_updateValue",
          value: function _updateValue() {
            this.value = this._reduceValue();
          }
          /** @internal */

        }, {
          key: "_anyControls",
          value: function _anyControls(condition) {
            for (var _i16 = 0, _Object$keys3 = Object.keys(this.controls); _i16 < _Object$keys3.length; _i16++) {
              var controlName = _Object$keys3[_i16];
              var control = this.controls[controlName];

              if (this.contains(controlName) && condition(control)) {
                return true;
              }
            }

            return false;
          }
          /** @internal */

        }, {
          key: "_reduceValue",
          value: function _reduceValue() {
            var _this336 = this;

            return this._reduceChildren({}, function (acc, control, name) {
              if (control.enabled || _this336.disabled) {
                acc[name] = control.value;
              }

              return acc;
            });
          }
          /** @internal */

        }, {
          key: "_reduceChildren",
          value: function _reduceChildren(initValue, fn) {
            var res = initValue;

            this._forEachChild(function (control, name) {
              res = fn(res, control, name);
            });

            return res;
          }
          /** @internal */

        }, {
          key: "_allControlsDisabled",
          value: function _allControlsDisabled() {
            for (var _i17 = 0, _Object$keys4 = Object.keys(this.controls); _i17 < _Object$keys4.length; _i17++) {
              var controlName = _Object$keys4[_i17];

              if (this.controls[controlName].enabled) {
                return false;
              }
            }

            return Object.keys(this.controls).length > 0 || this.disabled;
          }
          /** @internal */

        }, {
          key: "_checkAllValuesPresent",
          value: function _checkAllValuesPresent(value) {
            this._forEachChild(function (control, name) {
              if (value[name] === undefined) {
                throw new Error("Must supply a value for form control with name: '".concat(name, "'."));
              }
            });
          }
        }]);

        return FormGroup;
      }(AbstractControl);
      /**
       * Tracks the value and validity state of an array of `FormControl`,
       * `FormGroup` or `FormArray` instances.
       *
       * A `FormArray` aggregates the values of each child `FormControl` into an array.
       * It calculates its status by reducing the status values of its children. For example, if one of
       * the controls in a `FormArray` is invalid, the entire array becomes invalid.
       *
       * `FormArray` is one of the three fundamental building blocks used to define forms in Angular,
       * along with `FormControl` and `FormGroup`.
       *
       * @usageNotes
       *
       * ### Create an array of form controls
       *
       * ```
       * const arr = new FormArray([
       *   new FormControl('Nancy', Validators.minLength(2)),
       *   new FormControl('Drew'),
       * ]);
       *
       * console.log(arr.value);   // ['Nancy', 'Drew']
       * console.log(arr.status);  // 'VALID'
       * ```
       *
       * ### Create a form array with array-level validators
       *
       * You include array-level validators and async validators. These come in handy
       * when you want to perform validation that considers the value of more than one child
       * control.
       *
       * The two types of validators are passed in separately as the second and third arg
       * respectively, or together as part of an options object.
       *
       * ```
       * const arr = new FormArray([
       *   new FormControl('Nancy'),
       *   new FormControl('Drew')
       * ], {validators: myValidator, asyncValidators: myAsyncValidator});
       * ```
       *
       * ### Set the updateOn property for all controls in a form array
       *
       * The options object is used to set a default value for each child
       * control's `updateOn` property. If you set `updateOn` to `'blur'` at the
       * array level, all child controls default to 'blur', unless the child
       * has explicitly specified a different `updateOn` value.
       *
       * ```ts
       * const arr = new FormArray([
       *    new FormControl()
       * ], {updateOn: 'blur'});
       * ```
       *
       * ### Adding or removing controls from a form array
       *
       * To change the controls in the array, use the `push`, `insert`, `removeAt` or `clear` methods
       * in `FormArray` itself. These methods ensure the controls are properly tracked in the
       * form's hierarchy. Do not modify the array of `AbstractControl`s used to instantiate
       * the `FormArray` directly, as that result in strange and unexpected behavior such
       * as broken change detection.
       *
       * @publicApi
       */


      var FormArray = /*#__PURE__*/function (_AbstractControl3) {
        _inherits(FormArray, _AbstractControl3);

        var _super129 = _createSuper(FormArray);

        /**
         * Creates a new `FormArray` instance.
         *
         * @param controls An array of child controls. Each child control is given an index
         * where it is registered.
         *
         * @param validatorOrOpts A synchronous validator function, or an array of
         * such functions, or an `AbstractControlOptions` object that contains validation functions
         * and a validation trigger.
         *
         * @param asyncValidator A single async validator or array of async validator functions
         *
         */
        function FormArray(controls, validatorOrOpts, asyncValidator) {
          var _this337;

          _classCallCheck(this, FormArray);

          _this337 = _super129.call(this, pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));
          _this337.controls = controls;

          _this337._initObservables();

          _this337._setUpdateStrategy(validatorOrOpts);

          _this337._setUpControls();

          _this337.updateValueAndValidity({
            onlySelf: true,
            // If `asyncValidator` is present, it will trigger control status change from `PENDING` to
            // `VALID` or `INVALID`.
            // The status should be broadcasted via the `statusChanges` observable, so we set `emitEvent`
            // to `true` to allow that during the control creation process.
            emitEvent: !!asyncValidator
          });

          return _this337;
        }
        /**
         * Get the `AbstractControl` at the given `index` in the array.
         *
         * @param index Index in the array to retrieve the control
         */


        _createClass2(FormArray, [{
          key: "at",
          value: function at(index) {
            return this.controls[index];
          }
          /**
           * Insert a new `AbstractControl` at the end of the array.
           *
           * @param control Form control to be inserted
           */

        }, {
          key: "push",
          value: function push(control) {
            this.controls.push(control);

            this._registerControl(control);

            this.updateValueAndValidity();

            this._onCollectionChange();
          }
          /**
           * Insert a new `AbstractControl` at the given `index` in the array.
           *
           * @param index Index in the array to insert the control
           * @param control Form control to be inserted
           */

        }, {
          key: "insert",
          value: function insert(index, control) {
            this.controls.splice(index, 0, control);

            this._registerControl(control);

            this.updateValueAndValidity();
          }
          /**
           * Remove the control at the given `index` in the array.
           *
           * @param index Index in the array to remove the control
           */

        }, {
          key: "removeAt",
          value: function removeAt(index) {
            if (this.controls[index]) this.controls[index]._registerOnCollectionChange(function () {});
            this.controls.splice(index, 1);
            this.updateValueAndValidity();
          }
          /**
           * Replace an existing control.
           *
           * @param index Index in the array to replace the control
           * @param control The `AbstractControl` control to replace the existing control
           */

        }, {
          key: "setControl",
          value: function setControl(index, control) {
            if (this.controls[index]) this.controls[index]._registerOnCollectionChange(function () {});
            this.controls.splice(index, 1);

            if (control) {
              this.controls.splice(index, 0, control);

              this._registerControl(control);
            }

            this.updateValueAndValidity();

            this._onCollectionChange();
          }
          /**
           * Length of the control array.
           */

        }, {
          key: "length",
          get: function get() {
            return this.controls.length;
          }
          /**
           * Sets the value of the `FormArray`. It accepts an array that matches
           * the structure of the control.
           *
           * This method performs strict checks, and throws an error if you try
           * to set the value of a control that doesn't exist or if you exclude the
           * value of a control.
           *
           * @usageNotes
           * ### Set the values for the controls in the form array
           *
           * ```
           * const arr = new FormArray([
           *   new FormControl(),
           *   new FormControl()
           * ]);
           * console.log(arr.value);   // [null, null]
           *
           * arr.setValue(['Nancy', 'Drew']);
           * console.log(arr.value);   // ['Nancy', 'Drew']
           * ```
           *
           * @param value Array of values for the controls
           * @param options Configure options that determine how the control propagates changes and
           * emits events after the value changes
           *
           * * `onlySelf`: When true, each change only affects this control, and not its parent. Default
           * is false.
           * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
           * `valueChanges`
           * observables emit events with the latest status and value when the control value is updated.
           * When false, no events are emitted.
           * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity
           * updateValueAndValidity} method.
           */

        }, {
          key: "setValue",
          value: function setValue(value) {
            var _this338 = this;

            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

            this._checkAllValuesPresent(value);

            value.forEach(function (newValue, index) {
              _this338._throwIfControlMissing(index);

              _this338.at(index).setValue(newValue, {
                onlySelf: true,
                emitEvent: options.emitEvent
              });
            });
            this.updateValueAndValidity(options);
          }
          /**
           * Patches the value of the `FormArray`. It accepts an array that matches the
           * structure of the control, and does its best to match the values to the correct
           * controls in the group.
           *
           * It accepts both super-sets and sub-sets of the array without throwing an error.
           *
           * @usageNotes
           * ### Patch the values for controls in a form array
           *
           * ```
           * const arr = new FormArray([
           *    new FormControl(),
           *    new FormControl()
           * ]);
           * console.log(arr.value);   // [null, null]
           *
           * arr.patchValue(['Nancy']);
           * console.log(arr.value);   // ['Nancy', null]
           * ```
           *
           * @param value Array of latest values for the controls
           * @param options Configure options that determine how the control propagates changes and
           * emits events after the value changes
           *
           * * `onlySelf`: When true, each change only affects this control, and not its parent. Default
           * is false.
           * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
           * `valueChanges`
           * observables emit events with the latest status and value when the control value is updated.
           * When false, no events are emitted.
           * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity
           * updateValueAndValidity} method.
           */

        }, {
          key: "patchValue",
          value: function patchValue(value) {
            var _this339 = this;

            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
            value.forEach(function (newValue, index) {
              if (_this339.at(index)) {
                _this339.at(index).patchValue(newValue, {
                  onlySelf: true,
                  emitEvent: options.emitEvent
                });
              }
            });
            this.updateValueAndValidity(options);
          }
          /**
           * Resets the `FormArray` and all descendants are marked `pristine` and `untouched`, and the
           * value of all descendants to null or null maps.
           *
           * You reset to a specific form state by passing in an array of states
           * that matches the structure of the control. The state is a standalone value
           * or a form state object with both a value and a disabled status.
           *
           * @usageNotes
           * ### Reset the values in a form array
           *
           * ```ts
           * const arr = new FormArray([
           *    new FormControl(),
           *    new FormControl()
           * ]);
           * arr.reset(['name', 'last name']);
           *
           * console.log(this.arr.value);  // ['name', 'last name']
           * ```
           *
           * ### Reset the values in a form array and the disabled status for the first control
           *
           * ```
           * this.arr.reset([
           *   {value: 'name', disabled: true},
           *   'last'
           * ]);
           *
           * console.log(this.arr.value);  // ['name', 'last name']
           * console.log(this.arr.get(0).status);  // 'DISABLED'
           * ```
           *
           * @param value Array of values for the controls
           * @param options Configure options that determine how the control propagates changes and
           * emits events after the value changes
           *
           * * `onlySelf`: When true, each change only affects this control, and not its parent. Default
           * is false.
           * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
           * `valueChanges`
           * observables emit events with the latest status and value when the control is reset.
           * When false, no events are emitted.
           * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity
           * updateValueAndValidity} method.
           */

        }, {
          key: "reset",
          value: function reset() {
            var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

            this._forEachChild(function (control, index) {
              control.reset(value[index], {
                onlySelf: true,
                emitEvent: options.emitEvent
              });
            });

            this._updatePristine(options);

            this._updateTouched(options);

            this.updateValueAndValidity(options);
          }
          /**
           * The aggregate value of the array, including any disabled controls.
           *
           * Reports all values regardless of disabled status.
           * For enabled controls only, the `value` property is the best way to get the value of the array.
           */

        }, {
          key: "getRawValue",
          value: function getRawValue() {
            return this.controls.map(function (control) {
              return control instanceof FormControl ? control.value : control.getRawValue();
            });
          }
          /**
           * Remove all controls in the `FormArray`.
           *
           * @usageNotes
           * ### Remove all elements from a FormArray
           *
           * ```ts
           * const arr = new FormArray([
           *    new FormControl(),
           *    new FormControl()
           * ]);
           * console.log(arr.length);  // 2
           *
           * arr.clear();
           * console.log(arr.length);  // 0
           * ```
           *
           * It's a simpler and more efficient alternative to removing all elements one by one:
           *
           * ```ts
           * const arr = new FormArray([
           *    new FormControl(),
           *    new FormControl()
           * ]);
           *
           * while (arr.length) {
           *    arr.removeAt(0);
           * }
           * ```
           */

        }, {
          key: "clear",
          value: function clear() {
            if (this.controls.length < 1) return;

            this._forEachChild(function (control) {
              return control._registerOnCollectionChange(function () {});
            });

            this.controls.splice(0);
            this.updateValueAndValidity();
          }
          /** @internal */

        }, {
          key: "_syncPendingControls",
          value: function _syncPendingControls() {
            var subtreeUpdated = this.controls.reduce(function (updated, child) {
              return child._syncPendingControls() ? true : updated;
            }, false);
            if (subtreeUpdated) this.updateValueAndValidity({
              onlySelf: true
            });
            return subtreeUpdated;
          }
          /** @internal */

        }, {
          key: "_throwIfControlMissing",
          value: function _throwIfControlMissing(index) {
            if (!this.controls.length) {
              throw new Error("\n        There are no form controls registered with this array yet. If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      ");
            }

            if (!this.at(index)) {
              throw new Error("Cannot find form control at index ".concat(index));
            }
          }
          /** @internal */

        }, {
          key: "_forEachChild",
          value: function _forEachChild(cb) {
            this.controls.forEach(function (control, index) {
              cb(control, index);
            });
          }
          /** @internal */

        }, {
          key: "_updateValue",
          value: function _updateValue() {
            var _this340 = this;

            this.value = this.controls.filter(function (control) {
              return control.enabled || _this340.disabled;
            }).map(function (control) {
              return control.value;
            });
          }
          /** @internal */

        }, {
          key: "_anyControls",
          value: function _anyControls(condition) {
            return this.controls.some(function (control) {
              return control.enabled && condition(control);
            });
          }
          /** @internal */

        }, {
          key: "_setUpControls",
          value: function _setUpControls() {
            var _this341 = this;

            this._forEachChild(function (control) {
              return _this341._registerControl(control);
            });
          }
          /** @internal */

        }, {
          key: "_checkAllValuesPresent",
          value: function _checkAllValuesPresent(value) {
            this._forEachChild(function (control, i) {
              if (value[i] === undefined) {
                throw new Error("Must supply a value for form control at index: ".concat(i, "."));
              }
            });
          }
          /** @internal */

        }, {
          key: "_allControlsDisabled",
          value: function _allControlsDisabled() {
            var _iterator46 = _createForOfIteratorHelper(this.controls),
                _step45;

            try {
              for (_iterator46.s(); !(_step45 = _iterator46.n()).done;) {
                var control = _step45.value;
                if (control.enabled) return false;
              }
            } catch (err) {
              _iterator46.e(err);
            } finally {
              _iterator46.f();
            }

            return this.controls.length > 0 || this.disabled;
          }
        }, {
          key: "_registerControl",
          value: function _registerControl(control) {
            control.setParent(this);

            control._registerOnCollectionChange(this._onCollectionChange);
          }
        }]);

        return FormArray;
      }(AbstractControl);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var formDirectiveProvider = {
        provide: ControlContainer,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return NgForm;
        })
      };

      var ɵ0 = function ɵ0() {
        return Promise.resolve(null);
      };

      var resolvedPromise = ɵ0();
      /**
       * @description
       * Creates a top-level `FormGroup` instance and binds it to a form
       * to track aggregate form value and validation status.
       *
       * As soon as you import the `FormsModule`, this directive becomes active by default on
       * all `<form>` tags.  You don't need to add a special selector.
       *
       * You optionally export the directive into a local template variable using `ngForm` as the key
       * (ex: `#myForm="ngForm"`). This is optional, but useful.  Many properties from the underlying
       * `FormGroup` instance are duplicated on the directive itself, so a reference to it
       * gives you access to the aggregate value and validity status of the form, as well as
       * user interaction properties like `dirty` and `touched`.
       *
       * To register child controls with the form, use `NgModel` with a `name`
       * attribute. You may use `NgModelGroup` to create sub-groups within the form.
       *
       * If necessary, listen to the directive's `ngSubmit` event to be notified when the user has
       * triggered a form submission. The `ngSubmit` event emits the original form
       * submission event.
       *
       * In template driven forms, all `<form>` tags are automatically tagged as `NgForm`.
       * To import the `FormsModule` but skip its usage in some forms,
       * for example, to use native HTML5 validation, add the `ngNoForm` and the `<form>`
       * tags won't create an `NgForm` directive. In reactive forms, using `ngNoForm` is
       * unnecessary because the `<form>` tags are inert. In that case, you would
       * refrain from using the `formGroup` directive.
       *
       * @usageNotes
       *
       * ### Listening for form submission
       *
       * The following example shows how to capture the form values from the "ngSubmit" event.
       *
       * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}
       *
       * ### Setting the update options
       *
       * The following example shows you how to change the "updateOn" option from its default using
       * ngFormOptions.
       *
       * ```html
       * <form [ngFormOptions]="{updateOn: 'blur'}">
       *    <input name="one" ngModel>  <!-- this ngModel will update on blur -->
       * </form>
       * ```
       *
       * ### Native DOM validation UI
       *
       * In order to prevent the native DOM form validation UI from interfering with Angular's form
       * validation, Angular automatically adds the `novalidate` attribute on any `<form>` whenever
       * `FormModule` or `ReactiveFormModule` are imported into the application.
       * If you want to explicitly enable native DOM validation UI with Angular forms, you can add the
       * `ngNativeValidate` attribute to the `<form>` element:
       *
       * ```html
       * <form ngNativeValidate>
       *   ...
       * </form>
       * ```
       *
       * @ngModule FormsModule
       * @publicApi
       */

      var NgForm = /*#__PURE__*/function (_ControlContainer) {
        _inherits(NgForm, _ControlContainer);

        var _super130 = _createSuper(NgForm);

        function NgForm(validators, asyncValidators) {
          var _this342;

          _classCallCheck(this, NgForm);

          _this342 = _super130.call(this);
          /**
           * @description
           * Returns whether the form submission has been triggered.
           */

          _this342.submitted = false;
          _this342._directives = [];
          /**
           * @description
           * Event emitter for the "ngSubmit" event
           */

          _this342.ngSubmit = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          _this342.form = new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));
          return _this342;
        }
        /** @nodoc */


        _createClass2(NgForm, [{
          key: "ngAfterViewInit",
          value: function ngAfterViewInit() {
            this._setUpdateStrategy();
          }
          /**
           * @description
           * The directive instance.
           */

        }, {
          key: "formDirective",
          get: function get() {
            return this;
          }
          /**
           * @description
           * The internal `FormGroup` instance.
           */

        }, {
          key: "control",
          get: function get() {
            return this.form;
          }
          /**
           * @description
           * Returns an array representing the path to this group. Because this directive
           * always lives at the top level of a form, it is always an empty array.
           */

        }, {
          key: "path",
          get: function get() {
            return [];
          }
          /**
           * @description
           * Returns a map of the controls in this group.
           */

        }, {
          key: "controls",
          get: function get() {
            return this.form.controls;
          }
          /**
           * @description
           * Method that sets up the control directive in this group, re-calculates its value
           * and validity, and adds the instance to the internal list of directives.
           *
           * @param dir The `NgModel` directive instance.
           */

        }, {
          key: "addControl",
          value: function addControl(dir) {
            var _this343 = this;

            resolvedPromise.then(function () {
              var container = _this343._findContainer(dir.path);

              dir.control = container.registerControl(dir.name, dir.control);
              setUpControl(dir.control, dir);
              dir.control.updateValueAndValidity({
                emitEvent: false
              });

              _this343._directives.push(dir);
            });
          }
          /**
           * @description
           * Retrieves the `FormControl` instance from the provided `NgModel` directive.
           *
           * @param dir The `NgModel` directive instance.
           */

        }, {
          key: "getControl",
          value: function getControl(dir) {
            return this.form.get(dir.path);
          }
          /**
           * @description
           * Removes the `NgModel` instance from the internal list of directives
           *
           * @param dir The `NgModel` directive instance.
           */

        }, {
          key: "removeControl",
          value: function removeControl(dir) {
            var _this344 = this;

            resolvedPromise.then(function () {
              var container = _this344._findContainer(dir.path);

              if (container) {
                container.removeControl(dir.name);
              }

              removeListItem(_this344._directives, dir);
            });
          }
          /**
           * @description
           * Adds a new `NgModelGroup` directive instance to the form.
           *
           * @param dir The `NgModelGroup` directive instance.
           */

        }, {
          key: "addFormGroup",
          value: function addFormGroup(dir) {
            var _this345 = this;

            resolvedPromise.then(function () {
              var container = _this345._findContainer(dir.path);

              var group = new FormGroup({});
              setUpFormContainer(group, dir);
              container.registerControl(dir.name, group);
              group.updateValueAndValidity({
                emitEvent: false
              });
            });
          }
          /**
           * @description
           * Removes the `NgModelGroup` directive instance from the form.
           *
           * @param dir The `NgModelGroup` directive instance.
           */

        }, {
          key: "removeFormGroup",
          value: function removeFormGroup(dir) {
            var _this346 = this;

            resolvedPromise.then(function () {
              var container = _this346._findContainer(dir.path);

              if (container) {
                container.removeControl(dir.name);
              }
            });
          }
          /**
           * @description
           * Retrieves the `FormGroup` for a provided `NgModelGroup` directive instance
           *
           * @param dir The `NgModelGroup` directive instance.
           */

        }, {
          key: "getFormGroup",
          value: function getFormGroup(dir) {
            return this.form.get(dir.path);
          }
          /**
           * Sets the new value for the provided `NgControl` directive.
           *
           * @param dir The `NgControl` directive instance.
           * @param value The new value for the directive's control.
           */

        }, {
          key: "updateModel",
          value: function updateModel(dir, value) {
            var _this347 = this;

            resolvedPromise.then(function () {
              var ctrl = _this347.form.get(dir.path);

              ctrl.setValue(value);
            });
          }
          /**
           * @description
           * Sets the value for this `FormGroup`.
           *
           * @param value The new value
           */

        }, {
          key: "setValue",
          value: function setValue(value) {
            this.control.setValue(value);
          }
          /**
           * @description
           * Method called when the "submit" event is triggered on the form.
           * Triggers the `ngSubmit` emitter to emit the "submit" event as its payload.
           *
           * @param $event The "submit" event object
           */

        }, {
          key: "onSubmit",
          value: function onSubmit($event) {
            this.submitted = true;
            syncPendingControls(this.form, this._directives);
            this.ngSubmit.emit($event);
            return false;
          }
          /**
           * @description
           * Method called when the "reset" event is triggered on the form.
           */

        }, {
          key: "onReset",
          value: function onReset() {
            this.resetForm();
          }
          /**
           * @description
           * Resets the form to an initial value and resets its submitted status.
           *
           * @param value The new value for the form.
           */

        }, {
          key: "resetForm",
          value: function resetForm() {
            var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
            this.form.reset(value);
            this.submitted = false;
          }
        }, {
          key: "_setUpdateStrategy",
          value: function _setUpdateStrategy() {
            if (this.options && this.options.updateOn != null) {
              this.form._updateOn = this.options.updateOn;
            }
          }
          /** @internal */

        }, {
          key: "_findContainer",
          value: function _findContainer(path) {
            path.pop();
            return path.length ? this.form.get(path) : this.form;
          }
        }]);

        return NgForm;
      }(ControlContainer);

      NgForm.ɵfac = function NgForm_Factory(t) {
        return new (t || NgForm)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_VALIDATORS, 10), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_ASYNC_VALIDATORS, 10));
      };

      NgForm.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgForm,
        selectors: [["form", 3, "ngNoForm", "", 3, "formGroup", ""], ["ng-form"], ["", "ngForm", ""]],
        hostBindings: function NgForm_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("submit", function NgForm_submit_HostBindingHandler($event) {
              return ctx.onSubmit($event);
            })("reset", function NgForm_reset_HostBindingHandler() {
              return ctx.onReset();
            });
          }
        },
        inputs: {
          options: ["ngFormOptions", "options"]
        },
        outputs: {
          ngSubmit: "ngSubmit"
        },
        exportAs: ["ngForm"],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([formDirectiveProvider]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]
      });

      NgForm.ctorParameters = function () {
        return [{
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_VALIDATORS]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_ASYNC_VALIDATORS]
          }]
        }];
      };

      NgForm.propDecorators = {
        options: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['ngFormOptions']
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgForm, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: 'form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]',
            providers: [formDirectiveProvider],
            host: {
              '(submit)': 'onSubmit($event)',
              '(reset)': 'onReset()'
            },
            outputs: ['ngSubmit'],
            exportAs: 'ngForm'
          }]
        }], function () {
          return [{
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_VALIDATORS]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_ASYNC_VALIDATORS]
            }]
          }];
        }, {
          options: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['ngFormOptions']
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description
       * A base class for code shared between the `NgModelGroup` and `FormGroupName` directives.
       *
       * @publicApi
       */


      var AbstractFormGroupDirective = /*#__PURE__*/function (_ControlContainer2) {
        _inherits(AbstractFormGroupDirective, _ControlContainer2);

        var _super131 = _createSuper(AbstractFormGroupDirective);

        function AbstractFormGroupDirective() {
          _classCallCheck(this, AbstractFormGroupDirective);

          return _super131.apply(this, arguments);
        }

        _createClass2(AbstractFormGroupDirective, [{
          key: "ngOnInit",
          value:
          /** @nodoc */
          function ngOnInit() {
            this._checkParentType(); // Register the group with its parent group.


            this.formDirective.addFormGroup(this);
          }
          /** @nodoc */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            if (this.formDirective) {
              // Remove the group from its parent group.
              this.formDirective.removeFormGroup(this);
            }
          }
          /**
           * @description
           * The `FormGroup` bound to this directive.
           */

        }, {
          key: "control",
          get: function get() {
            return this.formDirective.getFormGroup(this);
          }
          /**
           * @description
           * The path to this group from the top-level directive.
           */

        }, {
          key: "path",
          get: function get() {
            return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);
          }
          /**
           * @description
           * The top-level directive for this group if present, otherwise null.
           */

        }, {
          key: "formDirective",
          get: function get() {
            return this._parent ? this._parent.formDirective : null;
          }
          /** @internal */

        }, {
          key: "_checkParentType",
          value: function _checkParentType() {}
        }]);

        return AbstractFormGroupDirective;
      }(ControlContainer);

      AbstractFormGroupDirective.ɵfac = function AbstractFormGroupDirective_Factory(t) {
        return ɵAbstractFormGroupDirective_BaseFactory(t || AbstractFormGroupDirective);
      };

      AbstractFormGroupDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: AbstractFormGroupDirective,
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]
      });

      var ɵAbstractFormGroupDirective_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetInheritedFactory"](AbstractFormGroupDirective);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AbstractFormGroupDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var TemplateDrivenErrors = /*#__PURE__*/function () {
        function TemplateDrivenErrors() {
          _classCallCheck(this, TemplateDrivenErrors);
        }

        _createClass2(TemplateDrivenErrors, null, [{
          key: "modelParentException",
          value: function modelParentException() {
            throw new Error("\n      ngModel cannot be used to register form controls with a parent formGroup directive.  Try using\n      formGroup's partner directive \"formControlName\" instead.  Example:\n\n      ".concat(FormErrorExamples.formControlName, "\n\n      Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n      Example:\n\n      ").concat(FormErrorExamples.ngModelWithFormGroup));
          }
        }, {
          key: "formGroupNameException",
          value: function formGroupNameException() {
            throw new Error("\n      ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n      Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n      ".concat(FormErrorExamples.formGroupName, "\n\n      Option 2:  Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n      ").concat(FormErrorExamples.ngModelGroup));
          }
        }, {
          key: "missingNameException",
          value: function missingNameException() {
            throw new Error("If ngModel is used within a form tag, either the name attribute must be set or the form\n      control must be defined as 'standalone' in ngModelOptions.\n\n      Example 1: <input [(ngModel)]=\"person.firstName\" name=\"first\">\n      Example 2: <input [(ngModel)]=\"person.firstName\" [ngModelOptions]=\"{standalone: true}\">");
          }
        }, {
          key: "modelGroupParentException",
          value: function modelGroupParentException() {
            throw new Error("\n      ngModelGroup cannot be used with a parent formGroup directive.\n\n      Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n      ".concat(FormErrorExamples.formGroupName, "\n\n      Option 2:  Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n      ").concat(FormErrorExamples.ngModelGroup));
          }
        }]);

        return TemplateDrivenErrors;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var modelGroupProvider = {
        provide: ControlContainer,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return NgModelGroup;
        })
      };
      /**
       * @description
       * Creates and binds a `FormGroup` instance to a DOM element.
       *
       * This directive can only be used as a child of `NgForm` (within `<form>` tags).
       *
       * Use this directive to validate a sub-group of your form separately from the
       * rest of your form, or if some values in your domain model make more sense
       * to consume together in a nested object.
       *
       * Provide a name for the sub-group and it will become the key
       * for the sub-group in the form's full value. If you need direct access, export the directive into
       * a local template variable using `ngModelGroup` (ex: `#myGroup="ngModelGroup"`).
       *
       * @usageNotes
       *
       * ### Consuming controls in a grouping
       *
       * The following example shows you how to combine controls together in a sub-group
       * of the form.
       *
       * {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}
       *
       * @ngModule FormsModule
       * @publicApi
       */

      var NgModelGroup = /*#__PURE__*/function (_AbstractFormGroupDir) {
        _inherits(NgModelGroup, _AbstractFormGroupDir);

        var _super132 = _createSuper(NgModelGroup);

        function NgModelGroup(parent, validators, asyncValidators) {
          var _this348;

          _classCallCheck(this, NgModelGroup);

          _this348 = _super132.call(this);
          _this348._parent = parent;

          _this348._setValidators(validators);

          _this348._setAsyncValidators(asyncValidators);

          return _this348;
        }
        /** @internal */


        _createClass2(NgModelGroup, [{
          key: "_checkParentType",
          value: function _checkParentType() {
            if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
              TemplateDrivenErrors.modelGroupParentException();
            }
          }
        }]);

        return NgModelGroup;
      }(AbstractFormGroupDirective);

      NgModelGroup.ɵfac = function NgModelGroup_Factory(t) {
        return new (t || NgModelGroup)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ControlContainer, 5), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_VALIDATORS, 10), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_ASYNC_VALIDATORS, 10));
      };

      NgModelGroup.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgModelGroup,
        selectors: [["", "ngModelGroup", ""]],
        inputs: {
          name: ["ngModelGroup", "name"]
        },
        exportAs: ["ngModelGroup"],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([modelGroupProvider]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]
      });

      NgModelGroup.ctorParameters = function () {
        return [{
          type: ControlContainer,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["SkipSelf"]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_VALIDATORS]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_ASYNC_VALIDATORS]
          }]
        }];
      };

      NgModelGroup.propDecorators = {
        name: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['ngModelGroup']
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgModelGroup, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ngModelGroup]',
            providers: [modelGroupProvider],
            exportAs: 'ngModelGroup'
          }]
        }], function () {
          return [{
            type: ControlContainer,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["SkipSelf"]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_VALIDATORS]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_ASYNC_VALIDATORS]
            }]
          }];
        }, {
          name: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['ngModelGroup']
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var formControlBinding = {
        provide: NgControl,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return NgModel;
        })
      };

      var ɵ0$1 = function ɵ0$1() {
        return Promise.resolve(null);
      };
      /**
       * `ngModel` forces an additional change detection run when its inputs change:
       * E.g.:
       * ```
       * <div>{{myModel.valid}}</div>
       * <input [(ngModel)]="myValue" #myModel="ngModel">
       * ```
       * I.e. `ngModel` can export itself on the element and then be used in the template.
       * Normally, this would result in expressions before the `input` that use the exported directive
       * to have an old value as they have been
       * dirty checked before. As this is a very common case for `ngModel`, we added this second change
       * detection run.
       *
       * Notes:
       * - this is just one extra run no matter how many `ngModel`s have been changed.
       * - this is a general problem when using `exportAs` for directives!
       */


      var resolvedPromise$1 = ɵ0$1();
      /**
       * @description
       * Creates a `FormControl` instance from a domain model and binds it
       * to a form control element.
       *
       * The `FormControl` instance tracks the value, user interaction, and
       * validation status of the control and keeps the view synced with the model. If used
       * within a parent form, the directive also registers itself with the form as a child
       * control.
       *
       * This directive is used by itself or as part of a larger form. Use the
       * `ngModel` selector to activate it.
       *
       * It accepts a domain model as an optional `Input`. If you have a one-way binding
       * to `ngModel` with `[]` syntax, changing the domain model's value in the component
       * class sets the value in the view. If you have a two-way binding with `[()]` syntax
       * (also known as 'banana-in-a-box syntax'), the value in the UI always syncs back to
       * the domain model in your class.
       *
       * To inspect the properties of the associated `FormControl` (like the validity state),
       * export the directive into a local template variable using `ngModel` as the key (ex:
       * `#myVar="ngModel"`). You can then access the control using the directive's `control` property.
       * However, the most commonly used properties (like `valid` and `dirty`) also exist on the control
       * for direct access. See a full list of properties directly available in
       * `AbstractControlDirective`.
       *
       * @see `RadioControlValueAccessor`
       * @see `SelectControlValueAccessor`
       *
       * @usageNotes
       *
       * ### Using ngModel on a standalone control
       *
       * The following examples show a simple standalone control using `ngModel`:
       *
       * {@example forms/ts/simpleNgModel/simple_ng_model_example.ts region='Component'}
       *
       * When using the `ngModel` within `<form>` tags, you'll also need to supply a `name` attribute
       * so that the control can be registered with the parent form under that name.
       *
       * In the context of a parent form, it's often unnecessary to include one-way or two-way binding,
       * as the parent form syncs the value for you. You access its properties by exporting it into a
       * local template variable using `ngForm` such as (`#f="ngForm"`). Use the variable where
       * needed on form submission.
       *
       * If you do need to populate initial values into your form, using a one-way binding for
       * `ngModel` tends to be sufficient as long as you use the exported form's value rather
       * than the domain model's value on submit.
       *
       * ### Using ngModel within a form
       *
       * The following example shows controls using `ngModel` within a form:
       *
       * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}
       *
       * ### Using a standalone ngModel within a group
       *
       * The following example shows you how to use a standalone ngModel control
       * within a form. This controls the display of the form, but doesn't contain form data.
       *
       * ```html
       * <form>
       *   <input name="login" ngModel placeholder="Login">
       *   <input type="checkbox" ngModel [ngModelOptions]="{standalone: true}"> Show more options?
       * </form>
       * <!-- form value: {login: ''} -->
       * ```
       *
       * ### Setting the ngModel `name` attribute through options
       *
       * The following example shows you an alternate way to set the name attribute. Here,
       * an attribute identified as name is used within a custom form control component. To still be able
       * to specify the NgModel's name, you must specify it using the `ngModelOptions` input instead.
       *
       * ```html
       * <form>
       *   <my-custom-form-control name="Nancy" ngModel [ngModelOptions]="{name: 'user'}">
       *   </my-custom-form-control>
       * </form>
       * <!-- form value: {user: ''} -->
       * ```
       *
       * @ngModule FormsModule
       * @publicApi
       */

      var NgModel = /*#__PURE__*/function (_NgControl) {
        _inherits(NgModel, _NgControl);

        var _super133 = _createSuper(NgModel);

        function NgModel(parent, validators, asyncValidators, valueAccessors) {
          var _this349;

          _classCallCheck(this, NgModel);

          _this349 = _super133.call(this);
          _this349.control = new FormControl();
          /** @internal */

          _this349._registered = false;
          /**
           * @description
           * Event emitter for producing the `ngModelChange` event after
           * the view model updates.
           */

          _this349.update = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          _this349._parent = parent;

          _this349._setValidators(validators);

          _this349._setAsyncValidators(asyncValidators);

          _this349.valueAccessor = selectValueAccessor(_assertThisInitialized(_this349), valueAccessors);
          return _this349;
        }
        /** @nodoc */


        _createClass2(NgModel, [{
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            this._checkForErrors();

            if (!this._registered) this._setUpControl();

            if ('isDisabled' in changes) {
              this._updateDisabled(changes);
            }

            if (isPropertyUpdated(changes, this.viewModel)) {
              this._updateValue(this.model);

              this.viewModel = this.model;
            }
          }
          /** @nodoc */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this.formDirective && this.formDirective.removeControl(this);
          }
          /**
           * @description
           * Returns an array that represents the path from the top-level form to this control.
           * Each index is the string name of the control on that level.
           */

        }, {
          key: "path",
          get: function get() {
            return this._parent ? controlPath(this.name, this._parent) : [this.name];
          }
          /**
           * @description
           * The top-level directive for this control if present, otherwise null.
           */

        }, {
          key: "formDirective",
          get: function get() {
            return this._parent ? this._parent.formDirective : null;
          }
          /**
           * @description
           * Sets the new value for the view model and emits an `ngModelChange` event.
           *
           * @param newValue The new value emitted by `ngModelChange`.
           */

        }, {
          key: "viewToModelUpdate",
          value: function viewToModelUpdate(newValue) {
            this.viewModel = newValue;
            this.update.emit(newValue);
          }
        }, {
          key: "_setUpControl",
          value: function _setUpControl() {
            this._setUpdateStrategy();

            this._isStandalone() ? this._setUpStandalone() : this.formDirective.addControl(this);
            this._registered = true;
          }
        }, {
          key: "_setUpdateStrategy",
          value: function _setUpdateStrategy() {
            if (this.options && this.options.updateOn != null) {
              this.control._updateOn = this.options.updateOn;
            }
          }
        }, {
          key: "_isStandalone",
          value: function _isStandalone() {
            return !this._parent || !!(this.options && this.options.standalone);
          }
        }, {
          key: "_setUpStandalone",
          value: function _setUpStandalone() {
            setUpControl(this.control, this);
            this.control.updateValueAndValidity({
              emitEvent: false
            });
          }
        }, {
          key: "_checkForErrors",
          value: function _checkForErrors() {
            if (!this._isStandalone()) {
              this._checkParentType();
            }

            this._checkName();
          }
        }, {
          key: "_checkParentType",
          value: function _checkParentType() {
            if (typeof ngDevMode === 'undefined' || ngDevMode) {
              if (!(this._parent instanceof NgModelGroup) && this._parent instanceof AbstractFormGroupDirective) {
                TemplateDrivenErrors.formGroupNameException();
              } else if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {
                TemplateDrivenErrors.modelParentException();
              }
            }
          }
        }, {
          key: "_checkName",
          value: function _checkName() {
            if (this.options && this.options.name) this.name = this.options.name;

            if (!this._isStandalone() && !this.name && (typeof ngDevMode === 'undefined' || ngDevMode)) {
              TemplateDrivenErrors.missingNameException();
            }
          }
        }, {
          key: "_updateValue",
          value: function _updateValue(value) {
            var _this350 = this;

            resolvedPromise$1.then(function () {
              _this350.control.setValue(value, {
                emitViewToModelChange: false
              });
            });
          }
        }, {
          key: "_updateDisabled",
          value: function _updateDisabled(changes) {
            var _this351 = this;

            var disabledValue = changes['isDisabled'].currentValue;
            var isDisabled = disabledValue === '' || disabledValue && disabledValue !== 'false';
            resolvedPromise$1.then(function () {
              if (isDisabled && !_this351.control.disabled) {
                _this351.control.disable();
              } else if (!isDisabled && _this351.control.disabled) {
                _this351.control.enable();
              }
            });
          }
        }]);

        return NgModel;
      }(NgControl);

      NgModel.ɵfac = function NgModel_Factory(t) {
        return new (t || NgModel)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ControlContainer, 9), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_VALIDATORS, 10), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_ASYNC_VALIDATORS, 10), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_VALUE_ACCESSOR, 10));
      };

      NgModel.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgModel,
        selectors: [["", "ngModel", "", 3, "formControlName", "", 3, "formControl", ""]],
        inputs: {
          name: "name",
          isDisabled: ["disabled", "isDisabled"],
          model: ["ngModel", "model"],
          options: ["ngModelOptions", "options"]
        },
        outputs: {
          update: "ngModelChange"
        },
        exportAs: ["ngModel"],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([formControlBinding]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]]
      });

      NgModel.ctorParameters = function () {
        return [{
          type: ControlContainer,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_VALIDATORS]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_ASYNC_VALIDATORS]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_VALUE_ACCESSOR]
          }]
        }];
      };

      NgModel.propDecorators = {
        name: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        isDisabled: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['disabled']
        }],
        model: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['ngModel']
        }],
        options: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['ngModelOptions']
        }],
        update: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
          args: ['ngModelChange']
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgModel, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ngModel]:not([formControlName]):not([formControl])',
            providers: [formControlBinding],
            exportAs: 'ngModel'
          }]
        }], function () {
          return [{
            type: ControlContainer,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_VALIDATORS]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_ASYNC_VALIDATORS]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_VALUE_ACCESSOR]
            }]
          }];
        }, {
          update: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
            args: ['ngModelChange']
          }],
          name: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          isDisabled: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['disabled']
          }],
          model: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['ngModel']
          }],
          options: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['ngModelOptions']
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description
       *
       * Adds `novalidate` attribute to all forms by default.
       *
       * `novalidate` is used to disable browser's native form validation.
       *
       * If you want to use native validation with Angular forms, just add `ngNativeValidate` attribute:
       *
       * ```
       * <form ngNativeValidate></form>
       * ```
       *
       * @publicApi
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       */


      var ɵNgNoValidate = function ɵNgNoValidate() {
        _classCallCheck(this, ɵNgNoValidate);
      };

      ɵNgNoValidate.ɵfac = function ɵNgNoValidate_Factory(t) {
        return new (t || ɵNgNoValidate)();
      };

      ɵNgNoValidate.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: ɵNgNoValidate,
        selectors: [["form", 3, "ngNoForm", "", 3, "ngNativeValidate", ""]],
        hostAttrs: ["novalidate", ""]
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ɵNgNoValidate, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: 'form:not([ngNoForm]):not([ngNativeValidate])',
            host: {
              'novalidate': ''
            }
          }]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Token to provide to turn off the ngModel warning on formControl and formControlName.
       */


      var NG_MODEL_WITH_FORM_CONTROL_WARNING = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('NgModelWithFormControlWarning');
      var formControlBinding$1 = {
        provide: NgControl,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return FormControlDirective;
        })
      };
      /**
       * @description
       * Synchronizes a standalone `FormControl` instance to a form control element.
       *
       * Note that support for using the `ngModel` input property and `ngModelChange` event with reactive
       * form directives was deprecated in Angular v6 and is scheduled for removal in
       * a future version of Angular.
       * For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).
       *
       * @see [Reactive Forms Guide](guide/reactive-forms)
       * @see `FormControl`
       * @see `AbstractControl`
       *
       * @usageNotes
       *
       * The following example shows how to register a standalone control and set its value.
       *
       * {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}
       *
       * @ngModule ReactiveFormsModule
       * @publicApi
       */

      var FormControlDirective = /*#__PURE__*/function (_NgControl2) {
        _inherits(FormControlDirective, _NgControl2);

        var _super134 = _createSuper(FormControlDirective);

        function FormControlDirective(validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {
          var _this352;

          _classCallCheck(this, FormControlDirective);

          _this352 = _super134.call(this);
          _this352._ngModelWarningConfig = _ngModelWarningConfig;
          /** @deprecated as of v6 */

          _this352.update = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          /**
           * @description
           * Instance property used to track whether an ngModel warning has been sent out for this
           * particular `FormControlDirective` instance. Used to support warning config of "always".
           *
           * @internal
           */

          _this352._ngModelWarningSent = false;

          _this352._setValidators(validators);

          _this352._setAsyncValidators(asyncValidators);

          _this352.valueAccessor = selectValueAccessor(_assertThisInitialized(_this352), valueAccessors);
          return _this352;
        }
        /**
         * @description
         * Triggers a warning in dev mode that this input should not be used with reactive forms.
         */


        _createClass2(FormControlDirective, [{
          key: "isDisabled",
          set: function set(isDisabled) {
            if (typeof ngDevMode === 'undefined' || ngDevMode) {
              ReactiveErrors.disabledAttrWarning();
            }
          }
          /** @nodoc */

        }, {
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            if (this._isControlChanged(changes)) {
              setUpControl(this.form, this);

              if (this.control.disabled && this.valueAccessor.setDisabledState) {
                this.valueAccessor.setDisabledState(true);
              }

              this.form.updateValueAndValidity({
                emitEvent: false
              });
            }

            if (isPropertyUpdated(changes, this.viewModel)) {
              if (typeof ngDevMode === 'undefined' || ngDevMode) {
                _ngModelWarning('formControl', FormControlDirective, this, this._ngModelWarningConfig);
              }

              this.form.setValue(this.model);
              this.viewModel = this.model;
            }
          }
          /**
           * @description
           * Returns an array that represents the path from the top-level form to this control.
           * Each index is the string name of the control on that level.
           */

        }, {
          key: "path",
          get: function get() {
            return [];
          }
          /**
           * @description
           * The `FormControl` bound to this directive.
           */

        }, {
          key: "control",
          get: function get() {
            return this.form;
          }
          /**
           * @description
           * Sets the new value for the view model and emits an `ngModelChange` event.
           *
           * @param newValue The new value for the view model.
           */

        }, {
          key: "viewToModelUpdate",
          value: function viewToModelUpdate(newValue) {
            this.viewModel = newValue;
            this.update.emit(newValue);
          }
        }, {
          key: "_isControlChanged",
          value: function _isControlChanged(changes) {
            return changes.hasOwnProperty('form');
          }
        }]);

        return FormControlDirective;
      }(NgControl);

      FormControlDirective.ɵfac = function FormControlDirective_Factory(t) {
        return new (t || FormControlDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_VALIDATORS, 10), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_ASYNC_VALIDATORS, 10), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_VALUE_ACCESSOR, 10), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_MODEL_WITH_FORM_CONTROL_WARNING, 8));
      };

      FormControlDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: FormControlDirective,
        selectors: [["", "formControl", ""]],
        inputs: {
          isDisabled: ["disabled", "isDisabled"],
          form: ["formControl", "form"],
          model: ["ngModel", "model"]
        },
        outputs: {
          update: "ngModelChange"
        },
        exportAs: ["ngForm"],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([formControlBinding$1]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]]
      });
      /**
       * @description
       * Static property used to track whether any ngModel warnings have been sent across
       * all instances of FormControlDirective. Used to support warning config of "once".
       *
       * @internal
       */

      FormControlDirective._ngModelWarningSentOnce = false;

      FormControlDirective.ctorParameters = function () {
        return [{
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_VALIDATORS]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_ASYNC_VALIDATORS]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_VALUE_ACCESSOR]
          }]
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]
          }]
        }];
      };

      FormControlDirective.propDecorators = {
        form: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['formControl']
        }],
        isDisabled: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['disabled']
        }],
        model: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['ngModel']
        }],
        update: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
          args: ['ngModelChange']
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FormControlDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[formControl]',
            providers: [formControlBinding$1],
            exportAs: 'ngForm'
          }]
        }], function () {
          return [{
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_VALIDATORS]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_ASYNC_VALIDATORS]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_VALUE_ACCESSOR]
            }]
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]
            }]
          }];
        }, {
          update: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
            args: ['ngModelChange']
          }],
          isDisabled: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['disabled']
          }],
          form: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['formControl']
          }],
          model: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['ngModel']
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var formDirectiveProvider$1 = {
        provide: ControlContainer,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return FormGroupDirective;
        })
      };
      /**
       * @description
       *
       * Binds an existing `FormGroup` to a DOM element.
       *
       * This directive accepts an existing `FormGroup` instance. It will then use this
       * `FormGroup` instance to match any child `FormControl`, `FormGroup`,
       * and `FormArray` instances to child `FormControlName`, `FormGroupName`,
       * and `FormArrayName` directives.
       *
       * @see [Reactive Forms Guide](guide/reactive-forms)
       * @see `AbstractControl`
       *
       * ### Register Form Group
       *
       * The following example registers a `FormGroup` with first name and last name controls,
       * and listens for the *ngSubmit* event when the button is clicked.
       *
       * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}
       *
       * @ngModule ReactiveFormsModule
       * @publicApi
       */

      var FormGroupDirective = /*#__PURE__*/function (_ControlContainer3) {
        _inherits(FormGroupDirective, _ControlContainer3);

        var _super135 = _createSuper(FormGroupDirective);

        function FormGroupDirective(validators, asyncValidators) {
          var _this353;

          _classCallCheck(this, FormGroupDirective);

          _this353 = _super135.call(this);
          _this353.validators = validators;
          _this353.asyncValidators = asyncValidators;
          /**
           * @description
           * Reports whether the form submission has been triggered.
           */

          _this353.submitted = false;
          /**
           * @description
           * Tracks the list of added `FormControlName` instances
           */

          _this353.directives = [];
          /**
           * @description
           * Tracks the `FormGroup` bound to this directive.
           */

          _this353.form = null;
          /**
           * @description
           * Emits an event when the form submission has been triggered.
           */

          _this353.ngSubmit = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();

          _this353._setValidators(validators);

          _this353._setAsyncValidators(asyncValidators);

          return _this353;
        }
        /** @nodoc */


        _createClass2(FormGroupDirective, [{
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            this._checkFormPresent();

            if (changes.hasOwnProperty('form')) {
              this._updateValidators();

              this._updateDomValue();

              this._updateRegistrations();

              this._oldForm = this.form;
            }
          }
          /**
           * @description
           * Returns this directive's instance.
           */

        }, {
          key: "formDirective",
          get: function get() {
            return this;
          }
          /**
           * @description
           * Returns the `FormGroup` bound to this directive.
           */

        }, {
          key: "control",
          get: function get() {
            return this.form;
          }
          /**
           * @description
           * Returns an array representing the path to this group. Because this directive
           * always lives at the top level of a form, it always an empty array.
           */

        }, {
          key: "path",
          get: function get() {
            return [];
          }
          /**
           * @description
           * Method that sets up the control directive in this group, re-calculates its value
           * and validity, and adds the instance to the internal list of directives.
           *
           * @param dir The `FormControlName` directive instance.
           */

        }, {
          key: "addControl",
          value: function addControl(dir) {
            var ctrl = this.form.get(dir.path);
            setUpControl(ctrl, dir);
            ctrl.updateValueAndValidity({
              emitEvent: false
            });
            this.directives.push(dir);
            return ctrl;
          }
          /**
           * @description
           * Retrieves the `FormControl` instance from the provided `FormControlName` directive
           *
           * @param dir The `FormControlName` directive instance.
           */

        }, {
          key: "getControl",
          value: function getControl(dir) {
            return this.form.get(dir.path);
          }
          /**
           * @description
           * Removes the `FormControlName` instance from the internal list of directives
           *
           * @param dir The `FormControlName` directive instance.
           */

        }, {
          key: "removeControl",
          value: function removeControl(dir) {
            removeListItem(this.directives, dir);
          }
          /**
           * Adds a new `FormGroupName` directive instance to the form.
           *
           * @param dir The `FormGroupName` directive instance.
           */

        }, {
          key: "addFormGroup",
          value: function addFormGroup(dir) {
            var ctrl = this.form.get(dir.path);
            setUpFormContainer(ctrl, dir);
            ctrl.updateValueAndValidity({
              emitEvent: false
            });
          }
          /**
           * No-op method to remove the form group.
           *
           * @param dir The `FormGroupName` directive instance.
           */

        }, {
          key: "removeFormGroup",
          value: function removeFormGroup(dir) {}
          /**
           * @description
           * Retrieves the `FormGroup` for a provided `FormGroupName` directive instance
           *
           * @param dir The `FormGroupName` directive instance.
           */

        }, {
          key: "getFormGroup",
          value: function getFormGroup(dir) {
            return this.form.get(dir.path);
          }
          /**
           * Adds a new `FormArrayName` directive instance to the form.
           *
           * @param dir The `FormArrayName` directive instance.
           */

        }, {
          key: "addFormArray",
          value: function addFormArray(dir) {
            var ctrl = this.form.get(dir.path);
            setUpFormContainer(ctrl, dir);
            ctrl.updateValueAndValidity({
              emitEvent: false
            });
          }
          /**
           * No-op method to remove the form array.
           *
           * @param dir The `FormArrayName` directive instance.
           */

        }, {
          key: "removeFormArray",
          value: function removeFormArray(dir) {}
          /**
           * @description
           * Retrieves the `FormArray` for a provided `FormArrayName` directive instance.
           *
           * @param dir The `FormArrayName` directive instance.
           */

        }, {
          key: "getFormArray",
          value: function getFormArray(dir) {
            return this.form.get(dir.path);
          }
          /**
           * Sets the new value for the provided `FormControlName` directive.
           *
           * @param dir The `FormControlName` directive instance.
           * @param value The new value for the directive's control.
           */

        }, {
          key: "updateModel",
          value: function updateModel(dir, value) {
            var ctrl = this.form.get(dir.path);
            ctrl.setValue(value);
          }
          /**
           * @description
           * Method called with the "submit" event is triggered on the form.
           * Triggers the `ngSubmit` emitter to emit the "submit" event as its payload.
           *
           * @param $event The "submit" event object
           */

        }, {
          key: "onSubmit",
          value: function onSubmit($event) {
            this.submitted = true;
            syncPendingControls(this.form, this.directives);
            this.ngSubmit.emit($event);
            return false;
          }
          /**
           * @description
           * Method called when the "reset" event is triggered on the form.
           */

        }, {
          key: "onReset",
          value: function onReset() {
            this.resetForm();
          }
          /**
           * @description
           * Resets the form to an initial value and resets its submitted status.
           *
           * @param value The new value for the form.
           */

        }, {
          key: "resetForm",
          value: function resetForm() {
            var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
            this.form.reset(value);
            this.submitted = false;
          }
          /** @internal */

        }, {
          key: "_updateDomValue",
          value: function _updateDomValue() {
            var _this354 = this;

            this.directives.forEach(function (dir) {
              var newCtrl = _this354.form.get(dir.path);

              if (dir.control !== newCtrl) {
                // Note: the value of the `dir.control` may not be defined, for example when it's a first
                // `FormControl` that is added to a `FormGroup` instance (via `addControl` call).
                cleanUpControl(dir.control || null, dir);
                if (newCtrl) setUpControl(newCtrl, dir);
                dir.control = newCtrl;
              }
            });

            this.form._updateTreeValidity({
              emitEvent: false
            });
          }
        }, {
          key: "_updateRegistrations",
          value: function _updateRegistrations() {
            var _this355 = this;

            this.form._registerOnCollectionChange(function () {
              return _this355._updateDomValue();
            });

            if (this._oldForm) {
              this._oldForm._registerOnCollectionChange(function () {});
            }
          }
        }, {
          key: "_updateValidators",
          value: function _updateValidators() {
            setUpValidators(this.form, this,
            /* handleOnValidatorChange */
            false);

            if (this._oldForm) {
              cleanUpValidators(this._oldForm, this,
              /* handleOnValidatorChange */
              false);
            }
          }
        }, {
          key: "_checkFormPresent",
          value: function _checkFormPresent() {
            if (!this.form && (typeof ngDevMode === 'undefined' || ngDevMode)) {
              ReactiveErrors.missingFormException();
            }
          }
        }]);

        return FormGroupDirective;
      }(ControlContainer);

      FormGroupDirective.ɵfac = function FormGroupDirective_Factory(t) {
        return new (t || FormGroupDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_VALIDATORS, 10), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_ASYNC_VALIDATORS, 10));
      };

      FormGroupDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: FormGroupDirective,
        selectors: [["", "formGroup", ""]],
        hostBindings: function FormGroupDirective_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("submit", function FormGroupDirective_submit_HostBindingHandler($event) {
              return ctx.onSubmit($event);
            })("reset", function FormGroupDirective_reset_HostBindingHandler() {
              return ctx.onReset();
            });
          }
        },
        inputs: {
          form: ["formGroup", "form"]
        },
        outputs: {
          ngSubmit: "ngSubmit"
        },
        exportAs: ["ngForm"],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([formDirectiveProvider$1]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]]
      });

      FormGroupDirective.ctorParameters = function () {
        return [{
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_VALIDATORS]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_ASYNC_VALIDATORS]
          }]
        }];
      };

      FormGroupDirective.propDecorators = {
        form: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['formGroup']
        }],
        ngSubmit: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FormGroupDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[formGroup]',
            providers: [formDirectiveProvider$1],
            host: {
              '(submit)': 'onSubmit($event)',
              '(reset)': 'onReset()'
            },
            exportAs: 'ngForm'
          }]
        }], function () {
          return [{
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_VALIDATORS]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_ASYNC_VALIDATORS]
            }]
          }];
        }, {
          form: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['formGroup']
          }],
          ngSubmit: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"]
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var formGroupNameProvider = {
        provide: ControlContainer,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return FormGroupName;
        })
      };
      /**
       * @description
       *
       * Syncs a nested `FormGroup` to a DOM element.
       *
       * This directive can only be used with a parent `FormGroupDirective`.
       *
       * It accepts the string name of the nested `FormGroup` to link, and
       * looks for a `FormGroup` registered with that name in the parent
       * `FormGroup` instance you passed into `FormGroupDirective`.
       *
       * Use nested form groups to validate a sub-group of a
       * form separately from the rest or to group the values of certain
       * controls into their own nested object.
       *
       * @see [Reactive Forms Guide](guide/reactive-forms)
       *
       * @usageNotes
       *
       * ### Access the group by name
       *
       * The following example uses the {@link AbstractControl#get get} method to access the
       * associated `FormGroup`
       *
       * ```ts
       *   this.form.get('name');
       * ```
       *
       * ### Access individual controls in the group
       *
       * The following example uses the {@link AbstractControl#get get} method to access
       * individual controls within the group using dot syntax.
       *
       * ```ts
       *   this.form.get('name.first');
       * ```
       *
       * ### Register a nested `FormGroup`.
       *
       * The following example registers a nested *name* `FormGroup` within an existing `FormGroup`,
       * and provides methods to retrieve the nested `FormGroup` and individual controls.
       *
       * {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}
       *
       * @ngModule ReactiveFormsModule
       * @publicApi
       */

      var FormGroupName = /*#__PURE__*/function (_AbstractFormGroupDir2) {
        _inherits(FormGroupName, _AbstractFormGroupDir2);

        var _super136 = _createSuper(FormGroupName);

        function FormGroupName(parent, validators, asyncValidators) {
          var _this356;

          _classCallCheck(this, FormGroupName);

          _this356 = _super136.call(this);
          _this356._parent = parent;

          _this356._setValidators(validators);

          _this356._setAsyncValidators(asyncValidators);

          return _this356;
        }
        /** @internal */


        _createClass2(FormGroupName, [{
          key: "_checkParentType",
          value: function _checkParentType() {
            if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
              ReactiveErrors.groupParentException();
            }
          }
        }]);

        return FormGroupName;
      }(AbstractFormGroupDirective);

      FormGroupName.ɵfac = function FormGroupName_Factory(t) {
        return new (t || FormGroupName)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ControlContainer, 13), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_VALIDATORS, 10), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_ASYNC_VALIDATORS, 10));
      };

      FormGroupName.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: FormGroupName,
        selectors: [["", "formGroupName", ""]],
        inputs: {
          name: ["formGroupName", "name"]
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([formGroupNameProvider]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]
      });

      FormGroupName.ctorParameters = function () {
        return [{
          type: ControlContainer,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["SkipSelf"]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_VALIDATORS]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_ASYNC_VALIDATORS]
          }]
        }];
      };

      FormGroupName.propDecorators = {
        name: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['formGroupName']
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FormGroupName, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[formGroupName]',
            providers: [formGroupNameProvider]
          }]
        }], function () {
          return [{
            type: ControlContainer,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["SkipSelf"]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_VALIDATORS]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_ASYNC_VALIDATORS]
            }]
          }];
        }, {
          name: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['formGroupName']
          }]
        });
      })();

      var formArrayNameProvider = {
        provide: ControlContainer,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return FormArrayName;
        })
      };
      /**
       * @description
       *
       * Syncs a nested `FormArray` to a DOM element.
       *
       * This directive is designed to be used with a parent `FormGroupDirective` (selector:
       * `[formGroup]`).
       *
       * It accepts the string name of the nested `FormArray` you want to link, and
       * will look for a `FormArray` registered with that name in the parent
       * `FormGroup` instance you passed into `FormGroupDirective`.
       *
       * @see [Reactive Forms Guide](guide/reactive-forms)
       * @see `AbstractControl`
       *
       * @usageNotes
       *
       * ### Example
       *
       * {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}
       *
       * @ngModule ReactiveFormsModule
       * @publicApi
       */

      var FormArrayName = /*#__PURE__*/function (_ControlContainer4) {
        _inherits(FormArrayName, _ControlContainer4);

        var _super137 = _createSuper(FormArrayName);

        function FormArrayName(parent, validators, asyncValidators) {
          var _this357;

          _classCallCheck(this, FormArrayName);

          _this357 = _super137.call(this);
          _this357._parent = parent;

          _this357._setValidators(validators);

          _this357._setAsyncValidators(asyncValidators);

          return _this357;
        }
        /**
         * A lifecycle method called when the directive's inputs are initialized. For internal use only.
         * @throws If the directive does not have a valid parent.
         * @nodoc
         */


        _createClass2(FormArrayName, [{
          key: "ngOnInit",
          value: function ngOnInit() {
            this._checkParentType();

            this.formDirective.addFormArray(this);
          }
          /**
           * A lifecycle method called before the directive's instance is destroyed. For internal use only.
           * @nodoc
           */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            if (this.formDirective) {
              this.formDirective.removeFormArray(this);
            }
          }
          /**
           * @description
           * The `FormArray` bound to this directive.
           */

        }, {
          key: "control",
          get: function get() {
            return this.formDirective.getFormArray(this);
          }
          /**
           * @description
           * The top-level directive for this group if present, otherwise null.
           */

        }, {
          key: "formDirective",
          get: function get() {
            return this._parent ? this._parent.formDirective : null;
          }
          /**
           * @description
           * Returns an array that represents the path from the top-level form to this control.
           * Each index is the string name of the control on that level.
           */

        }, {
          key: "path",
          get: function get() {
            return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);
          }
        }, {
          key: "_checkParentType",
          value: function _checkParentType() {
            if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
              ReactiveErrors.arrayParentException();
            }
          }
        }]);

        return FormArrayName;
      }(ControlContainer);

      FormArrayName.ɵfac = function FormArrayName_Factory(t) {
        return new (t || FormArrayName)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ControlContainer, 13), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_VALIDATORS, 10), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_ASYNC_VALIDATORS, 10));
      };

      FormArrayName.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: FormArrayName,
        selectors: [["", "formArrayName", ""]],
        inputs: {
          name: ["formArrayName", "name"]
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([formArrayNameProvider]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]
      });

      FormArrayName.ctorParameters = function () {
        return [{
          type: ControlContainer,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["SkipSelf"]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_VALIDATORS]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_ASYNC_VALIDATORS]
          }]
        }];
      };

      FormArrayName.propDecorators = {
        name: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['formArrayName']
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FormArrayName, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[formArrayName]',
            providers: [formArrayNameProvider]
          }]
        }], function () {
          return [{
            type: ControlContainer,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["SkipSelf"]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_VALIDATORS]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_ASYNC_VALIDATORS]
            }]
          }];
        }, {
          name: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['formArrayName']
          }]
        });
      })();

      function _hasInvalidParent(parent) {
        return !(parent instanceof FormGroupName) && !(parent instanceof FormGroupDirective) && !(parent instanceof FormArrayName);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var controlNameBinding = {
        provide: NgControl,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return FormControlName;
        })
      };
      /**
       * @description
       * Syncs a `FormControl` in an existing `FormGroup` to a form control
       * element by name.
       *
       * @see [Reactive Forms Guide](guide/reactive-forms)
       * @see `FormControl`
       * @see `AbstractControl`
       *
       * @usageNotes
       *
       * ### Register `FormControl` within a group
       *
       * The following example shows how to register multiple form controls within a form group
       * and set their value.
       *
       * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}
       *
       * To see `formControlName` examples with different form control types, see:
       *
       * * Radio buttons: `RadioControlValueAccessor`
       * * Selects: `SelectControlValueAccessor`
       *
       * ### Use with ngModel is deprecated
       *
       * Support for using the `ngModel` input property and `ngModelChange` event with reactive
       * form directives has been deprecated in Angular v6 and is scheduled for removal in
       * a future version of Angular.
       *
       * For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).
       *
       * @ngModule ReactiveFormsModule
       * @publicApi
       */

      var FormControlName = /*#__PURE__*/function (_NgControl3) {
        _inherits(FormControlName, _NgControl3);

        var _super138 = _createSuper(FormControlName);

        function FormControlName(parent, validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {
          var _this358;

          _classCallCheck(this, FormControlName);

          _this358 = _super138.call(this);
          _this358._ngModelWarningConfig = _ngModelWarningConfig;
          _this358._added = false;
          /** @deprecated as of v6 */

          _this358.update = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          /**
           * @description
           * Instance property used to track whether an ngModel warning has been sent out for this
           * particular FormControlName instance. Used to support warning config of "always".
           *
           * @internal
           */

          _this358._ngModelWarningSent = false;
          _this358._parent = parent;

          _this358._setValidators(validators);

          _this358._setAsyncValidators(asyncValidators);

          _this358.valueAccessor = selectValueAccessor(_assertThisInitialized(_this358), valueAccessors);
          return _this358;
        }
        /**
         * @description
         * Triggers a warning in dev mode that this input should not be used with reactive forms.
         */


        _createClass2(FormControlName, [{
          key: "isDisabled",
          set: function set(isDisabled) {
            if (typeof ngDevMode === 'undefined' || ngDevMode) {
              ReactiveErrors.disabledAttrWarning();
            }
          }
          /** @nodoc */

        }, {
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            if (!this._added) this._setUpControl();

            if (isPropertyUpdated(changes, this.viewModel)) {
              if (typeof ngDevMode === 'undefined' || ngDevMode) {
                _ngModelWarning('formControlName', FormControlName, this, this._ngModelWarningConfig);
              }

              this.viewModel = this.model;
              this.formDirective.updateModel(this, this.model);
            }
          }
          /** @nodoc */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            if (this.formDirective) {
              this.formDirective.removeControl(this);
            }
          }
          /**
           * @description
           * Sets the new value for the view model and emits an `ngModelChange` event.
           *
           * @param newValue The new value for the view model.
           */

        }, {
          key: "viewToModelUpdate",
          value: function viewToModelUpdate(newValue) {
            this.viewModel = newValue;
            this.update.emit(newValue);
          }
          /**
           * @description
           * Returns an array that represents the path from the top-level form to this control.
           * Each index is the string name of the control on that level.
           */

        }, {
          key: "path",
          get: function get() {
            return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);
          }
          /**
           * @description
           * The top-level directive for this group if present, otherwise null.
           */

        }, {
          key: "formDirective",
          get: function get() {
            return this._parent ? this._parent.formDirective : null;
          }
        }, {
          key: "_checkParentType",
          value: function _checkParentType() {
            if (typeof ngDevMode === 'undefined' || ngDevMode) {
              if (!(this._parent instanceof FormGroupName) && this._parent instanceof AbstractFormGroupDirective) {
                ReactiveErrors.ngModelGroupException();
              } else if (!(this._parent instanceof FormGroupName) && !(this._parent instanceof FormGroupDirective) && !(this._parent instanceof FormArrayName)) {
                ReactiveErrors.controlParentException();
              }
            }
          }
        }, {
          key: "_setUpControl",
          value: function _setUpControl() {
            this._checkParentType();

            this.control = this.formDirective.addControl(this);

            if (this.control.disabled && this.valueAccessor.setDisabledState) {
              this.valueAccessor.setDisabledState(true);
            }

            this._added = true;
          }
        }]);

        return FormControlName;
      }(NgControl);

      FormControlName.ɵfac = function FormControlName_Factory(t) {
        return new (t || FormControlName)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ControlContainer, 13), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_VALIDATORS, 10), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_ASYNC_VALIDATORS, 10), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_VALUE_ACCESSOR, 10), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NG_MODEL_WITH_FORM_CONTROL_WARNING, 8));
      };

      FormControlName.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: FormControlName,
        selectors: [["", "formControlName", ""]],
        inputs: {
          isDisabled: ["disabled", "isDisabled"],
          name: ["formControlName", "name"],
          model: ["ngModel", "model"]
        },
        outputs: {
          update: "ngModelChange"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([controlNameBinding]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]]
      });
      /**
       * @description
       * Static property used to track whether any ngModel warnings have been sent across
       * all instances of FormControlName. Used to support warning config of "once".
       *
       * @internal
       */

      FormControlName._ngModelWarningSentOnce = false;

      FormControlName.ctorParameters = function () {
        return [{
          type: ControlContainer,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["SkipSelf"]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_VALIDATORS]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_ASYNC_VALIDATORS]
          }]
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_VALUE_ACCESSOR]
          }]
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]
          }]
        }];
      };

      FormControlName.propDecorators = {
        name: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['formControlName']
        }],
        isDisabled: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['disabled']
        }],
        model: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['ngModel']
        }],
        update: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
          args: ['ngModelChange']
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FormControlName, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[formControlName]',
            providers: [controlNameBinding]
          }]
        }], function () {
          return [{
            type: ControlContainer,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["SkipSelf"]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_VALIDATORS]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_ASYNC_VALIDATORS]
            }]
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_VALUE_ACCESSOR]
            }]
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]
            }]
          }];
        }, {
          update: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
            args: ['ngModelChange']
          }],
          isDisabled: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['disabled']
          }],
          name: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['formControlName']
          }],
          model: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['ngModel']
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description
       * Provider which adds `RequiredValidator` to the `NG_VALIDATORS` multi-provider list.
       */


      var REQUIRED_VALIDATOR = {
        provide: NG_VALIDATORS,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return RequiredValidator;
        }),
        multi: true
      };
      /**
       * @description
       * Provider which adds `CheckboxRequiredValidator` to the `NG_VALIDATORS` multi-provider list.
       */

      var CHECKBOX_REQUIRED_VALIDATOR = {
        provide: NG_VALIDATORS,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return CheckboxRequiredValidator;
        }),
        multi: true
      };
      /**
       * @description
       * A directive that adds the `required` validator to any controls marked with the
       * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.
       *
       * @see [Form Validation](guide/form-validation)
       *
       * @usageNotes
       *
       * ### Adding a required validator using template-driven forms
       *
       * ```
       * <input name="fullName" ngModel required>
       * ```
       *
       * @ngModule FormsModule
       * @ngModule ReactiveFormsModule
       * @publicApi
       */

      var RequiredValidator = /*#__PURE__*/function () {
        function RequiredValidator() {
          _classCallCheck(this, RequiredValidator);

          this._required = false;
        }
        /**
         * @description
         * Tracks changes to the required attribute bound to this directive.
         */


        _createClass2(RequiredValidator, [{
          key: "required",
          get: function get() {
            return this._required;
          },
          set: function set(value) {
            this._required = value != null && value !== false && "".concat(value) !== 'false';
            if (this._onChange) this._onChange();
          }
          /**
           * Method that validates whether the control is empty.
           * Returns the validation result if enabled, otherwise null.
           * @nodoc
           */

        }, {
          key: "validate",
          value: function validate(control) {
            return this.required ? Validators.required(control) : null;
          }
          /**
           * Registers a callback function to call when the validator inputs change.
           * @nodoc
           */

        }, {
          key: "registerOnValidatorChange",
          value: function registerOnValidatorChange(fn) {
            this._onChange = fn;
          }
        }]);

        return RequiredValidator;
      }();

      RequiredValidator.ɵfac = function RequiredValidator_Factory(t) {
        return new (t || RequiredValidator)();
      };

      RequiredValidator.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: RequiredValidator,
        selectors: [["", "required", "", "formControlName", "", 3, "type", "checkbox"], ["", "required", "", "formControl", "", 3, "type", "checkbox"], ["", "required", "", "ngModel", "", 3, "type", "checkbox"]],
        hostVars: 1,
        hostBindings: function RequiredValidator_HostBindings(rf, ctx) {
          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("required", ctx.required ? "" : null);
          }
        },
        inputs: {
          required: "required"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([REQUIRED_VALIDATOR])]
      });
      RequiredValidator.propDecorators = {
        required: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](RequiredValidator, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: ':not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]',
            providers: [REQUIRED_VALIDATOR],
            host: {
              '[attr.required]': 'required ? "" : null'
            }
          }]
        }], function () {
          return [];
        }, {
          required: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();
      /**
       * A Directive that adds the `required` validator to checkbox controls marked with the
       * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.
       *
       * @see [Form Validation](guide/form-validation)
       *
       * @usageNotes
       *
       * ### Adding a required checkbox validator using template-driven forms
       *
       * The following example shows how to add a checkbox required validator to an input attached to an
       * ngModel binding.
       *
       * ```
       * <input type="checkbox" name="active" ngModel required>
       * ```
       *
       * @publicApi
       * @ngModule FormsModule
       * @ngModule ReactiveFormsModule
       */


      var CheckboxRequiredValidator = /*#__PURE__*/function (_RequiredValidator) {
        _inherits(CheckboxRequiredValidator, _RequiredValidator);

        var _super139 = _createSuper(CheckboxRequiredValidator);

        function CheckboxRequiredValidator() {
          _classCallCheck(this, CheckboxRequiredValidator);

          return _super139.apply(this, arguments);
        }

        _createClass2(CheckboxRequiredValidator, [{
          key: "validate",
          value:
          /**
           * Method that validates whether or not the checkbox has been checked.
           * Returns the validation result if enabled, otherwise null.
           * @nodoc
           */
          function validate(control) {
            return this.required ? Validators.requiredTrue(control) : null;
          }
        }]);

        return CheckboxRequiredValidator;
      }(RequiredValidator);

      CheckboxRequiredValidator.ɵfac = function CheckboxRequiredValidator_Factory(t) {
        return ɵCheckboxRequiredValidator_BaseFactory(t || CheckboxRequiredValidator);
      };

      CheckboxRequiredValidator.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: CheckboxRequiredValidator,
        selectors: [["input", "type", "checkbox", "required", "", "formControlName", ""], ["input", "type", "checkbox", "required", "", "formControl", ""], ["input", "type", "checkbox", "required", "", "ngModel", ""]],
        hostVars: 1,
        hostBindings: function CheckboxRequiredValidator_HostBindings(rf, ctx) {
          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("required", ctx.required ? "" : null);
          }
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([CHECKBOX_REQUIRED_VALIDATOR]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]]
      });

      var ɵCheckboxRequiredValidator_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetInheritedFactory"](CheckboxRequiredValidator);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CheckboxRequiredValidator, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: 'input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]',
            providers: [CHECKBOX_REQUIRED_VALIDATOR],
            host: {
              '[attr.required]': 'required ? "" : null'
            }
          }]
        }], null, null);
      })();
      /**
       * @description
       * Provider which adds `EmailValidator` to the `NG_VALIDATORS` multi-provider list.
       */


      var EMAIL_VALIDATOR = {
        provide: NG_VALIDATORS,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return EmailValidator;
        }),
        multi: true
      };
      /**
       * A directive that adds the `email` validator to controls marked with the
       * `email` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.
       *
       * @see [Form Validation](guide/form-validation)
       *
       * @usageNotes
       *
       * ### Adding an email validator
       *
       * The following example shows how to add an email validator to an input attached to an ngModel
       * binding.
       *
       * ```
       * <input type="email" name="email" ngModel email>
       * <input type="email" name="email" ngModel email="true">
       * <input type="email" name="email" ngModel [email]="true">
       * ```
       *
       * @publicApi
       * @ngModule FormsModule
       * @ngModule ReactiveFormsModule
       */

      var EmailValidator = /*#__PURE__*/function () {
        function EmailValidator() {
          _classCallCheck(this, EmailValidator);

          this._enabled = false;
        }
        /**
         * @description
         * Tracks changes to the email attribute bound to this directive.
         */


        _createClass2(EmailValidator, [{
          key: "email",
          set: function set(value) {
            this._enabled = value === '' || value === true || value === 'true';
            if (this._onChange) this._onChange();
          }
          /**
           * Method that validates whether an email address is valid.
           * Returns the validation result if enabled, otherwise null.
           * @nodoc
           */

        }, {
          key: "validate",
          value: function validate(control) {
            return this._enabled ? Validators.email(control) : null;
          }
          /**
           * Registers a callback function to call when the validator inputs change.
           * @nodoc
           */

        }, {
          key: "registerOnValidatorChange",
          value: function registerOnValidatorChange(fn) {
            this._onChange = fn;
          }
        }]);

        return EmailValidator;
      }();

      EmailValidator.ɵfac = function EmailValidator_Factory(t) {
        return new (t || EmailValidator)();
      };

      EmailValidator.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: EmailValidator,
        selectors: [["", "email", "", "formControlName", ""], ["", "email", "", "formControl", ""], ["", "email", "", "ngModel", ""]],
        inputs: {
          email: "email"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([EMAIL_VALIDATOR])]
      });
      EmailValidator.propDecorators = {
        email: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](EmailValidator, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[email][formControlName],[email][formControl],[email][ngModel]',
            providers: [EMAIL_VALIDATOR]
          }]
        }], function () {
          return [];
        }, {
          email: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();
      /**
       * @description
       * Provider which adds `MinLengthValidator` to the `NG_VALIDATORS` multi-provider list.
       */


      var MIN_LENGTH_VALIDATOR = {
        provide: NG_VALIDATORS,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return MinLengthValidator;
        }),
        multi: true
      };
      /**
       * A directive that adds minimum length validation to controls marked with the
       * `minlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.
       *
       * @see [Form Validation](guide/form-validation)
       *
       * @usageNotes
       *
       * ### Adding a minimum length validator
       *
       * The following example shows how to add a minimum length validator to an input attached to an
       * ngModel binding.
       *
       * ```html
       * <input name="firstName" ngModel minlength="4">
       * ```
       *
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       * @publicApi
       */

      var MinLengthValidator = /*#__PURE__*/function () {
        function MinLengthValidator() {
          _classCallCheck(this, MinLengthValidator);

          this._validator = Validators.nullValidator;
        }
        /** @nodoc */


        _createClass2(MinLengthValidator, [{
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            if ('minlength' in changes) {
              this._createValidator();

              if (this._onChange) this._onChange();
            }
          }
          /**
           * Method that validates whether the value meets a minimum length requirement.
           * Returns the validation result if enabled, otherwise null.
           * @nodoc
           */

        }, {
          key: "validate",
          value: function validate(control) {
            return this.minlength == null ? null : this._validator(control);
          }
          /**
           * Registers a callback function to call when the validator inputs change.
           * @nodoc
           */

        }, {
          key: "registerOnValidatorChange",
          value: function registerOnValidatorChange(fn) {
            this._onChange = fn;
          }
        }, {
          key: "_createValidator",
          value: function _createValidator() {
            this._validator = Validators.minLength(typeof this.minlength === 'number' ? this.minlength : parseInt(this.minlength, 10));
          }
        }]);

        return MinLengthValidator;
      }();

      MinLengthValidator.ɵfac = function MinLengthValidator_Factory(t) {
        return new (t || MinLengthValidator)();
      };

      MinLengthValidator.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: MinLengthValidator,
        selectors: [["", "minlength", "", "formControlName", ""], ["", "minlength", "", "formControl", ""], ["", "minlength", "", "ngModel", ""]],
        hostVars: 1,
        hostBindings: function MinLengthValidator_HostBindings(rf, ctx) {
          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("minlength", ctx.minlength ? ctx.minlength : null);
          }
        },
        inputs: {
          minlength: "minlength"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([MIN_LENGTH_VALIDATOR]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]]
      });
      MinLengthValidator.propDecorators = {
        minlength: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](MinLengthValidator, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',
            providers: [MIN_LENGTH_VALIDATOR],
            host: {
              '[attr.minlength]': 'minlength ? minlength : null'
            }
          }]
        }], function () {
          return [];
        }, {
          minlength: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();
      /**
       * @description
       * Provider which adds `MaxLengthValidator` to the `NG_VALIDATORS` multi-provider list.
       */


      var MAX_LENGTH_VALIDATOR = {
        provide: NG_VALIDATORS,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return MaxLengthValidator;
        }),
        multi: true
      };
      /**
       * A directive that adds max length validation to controls marked with the
       * `maxlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.
       *
       * @see [Form Validation](guide/form-validation)
       *
       * @usageNotes
       *
       * ### Adding a maximum length validator
       *
       * The following example shows how to add a maximum length validator to an input attached to an
       * ngModel binding.
       *
       * ```html
       * <input name="firstName" ngModel maxlength="25">
       * ```
       *
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       * @publicApi
       */

      var MaxLengthValidator = /*#__PURE__*/function () {
        function MaxLengthValidator() {
          _classCallCheck(this, MaxLengthValidator);

          this._validator = Validators.nullValidator;
        }
        /** @nodoc */


        _createClass2(MaxLengthValidator, [{
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            if ('maxlength' in changes) {
              this._createValidator();

              if (this._onChange) this._onChange();
            }
          }
          /**
           * Method that validates whether the value exceeds the maximum length requirement.
           * @nodoc
           */

        }, {
          key: "validate",
          value: function validate(control) {
            return this.maxlength != null ? this._validator(control) : null;
          }
          /**
           * Registers a callback function to call when the validator inputs change.
           * @nodoc
           */

        }, {
          key: "registerOnValidatorChange",
          value: function registerOnValidatorChange(fn) {
            this._onChange = fn;
          }
        }, {
          key: "_createValidator",
          value: function _createValidator() {
            this._validator = Validators.maxLength(typeof this.maxlength === 'number' ? this.maxlength : parseInt(this.maxlength, 10));
          }
        }]);

        return MaxLengthValidator;
      }();

      MaxLengthValidator.ɵfac = function MaxLengthValidator_Factory(t) {
        return new (t || MaxLengthValidator)();
      };

      MaxLengthValidator.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: MaxLengthValidator,
        selectors: [["", "maxlength", "", "formControlName", ""], ["", "maxlength", "", "formControl", ""], ["", "maxlength", "", "ngModel", ""]],
        hostVars: 1,
        hostBindings: function MaxLengthValidator_HostBindings(rf, ctx) {
          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("maxlength", ctx.maxlength ? ctx.maxlength : null);
          }
        },
        inputs: {
          maxlength: "maxlength"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([MAX_LENGTH_VALIDATOR]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]]
      });
      MaxLengthValidator.propDecorators = {
        maxlength: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](MaxLengthValidator, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',
            providers: [MAX_LENGTH_VALIDATOR],
            host: {
              '[attr.maxlength]': 'maxlength ? maxlength : null'
            }
          }]
        }], function () {
          return [];
        }, {
          maxlength: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();
      /**
       * @description
       * Provider which adds `PatternValidator` to the `NG_VALIDATORS` multi-provider list.
       */


      var PATTERN_VALIDATOR = {
        provide: NG_VALIDATORS,
        useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
          return PatternValidator;
        }),
        multi: true
      };
      /**
       * @description
       * A directive that adds regex pattern validation to controls marked with the
       * `pattern` attribute. The regex must match the entire control value.
       * The directive is provided with the `NG_VALIDATORS` multi-provider list.
       *
       * @see [Form Validation](guide/form-validation)
       *
       * @usageNotes
       *
       * ### Adding a pattern validator
       *
       * The following example shows how to add a pattern validator to an input attached to an
       * ngModel binding.
       *
       * ```html
       * <input name="firstName" ngModel pattern="[a-zA-Z ]*">
       * ```
       *
       * @ngModule ReactiveFormsModule
       * @ngModule FormsModule
       * @publicApi
       */

      var PatternValidator = /*#__PURE__*/function () {
        function PatternValidator() {
          _classCallCheck(this, PatternValidator);

          this._validator = Validators.nullValidator;
        }
        /** @nodoc */


        _createClass2(PatternValidator, [{
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            if ('pattern' in changes) {
              this._createValidator();

              if (this._onChange) this._onChange();
            }
          }
          /**
           * Method that validates whether the value matches the the pattern requirement.
           * @nodoc
           */

        }, {
          key: "validate",
          value: function validate(control) {
            return this._validator(control);
          }
          /**
           * Registers a callback function to call when the validator inputs change.
           * @nodoc
           */

        }, {
          key: "registerOnValidatorChange",
          value: function registerOnValidatorChange(fn) {
            this._onChange = fn;
          }
        }, {
          key: "_createValidator",
          value: function _createValidator() {
            this._validator = Validators.pattern(this.pattern);
          }
        }]);

        return PatternValidator;
      }();

      PatternValidator.ɵfac = function PatternValidator_Factory(t) {
        return new (t || PatternValidator)();
      };

      PatternValidator.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: PatternValidator,
        selectors: [["", "pattern", "", "formControlName", ""], ["", "pattern", "", "formControl", ""], ["", "pattern", "", "ngModel", ""]],
        hostVars: 1,
        hostBindings: function PatternValidator_HostBindings(rf, ctx) {
          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("pattern", ctx.pattern ? ctx.pattern : null);
          }
        },
        inputs: {
          pattern: "pattern"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([PATTERN_VALIDATOR]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]]
      });
      PatternValidator.propDecorators = {
        pattern: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PatternValidator, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',
            providers: [PATTERN_VALIDATOR],
            host: {
              '[attr.pattern]': 'pattern ? pattern : null'
            }
          }]
        }], function () {
          return [];
        }, {
          pattern: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var SHARED_FORM_DIRECTIVES = [ɵNgNoValidate, NgSelectOption, ɵNgSelectMultipleOption, DefaultValueAccessor, NumberValueAccessor, RangeValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor, SelectMultipleControlValueAccessor, RadioControlValueAccessor, NgControlStatus, NgControlStatusGroup, RequiredValidator, MinLengthValidator, MaxLengthValidator, PatternValidator, CheckboxRequiredValidator, EmailValidator];
      var TEMPLATE_DRIVEN_DIRECTIVES = [NgModel, NgModelGroup, NgForm];
      var REACTIVE_DRIVEN_DIRECTIVES = [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName];
      /**
       * Internal module used for sharing directives between FormsModule and ReactiveFormsModule
       */

      var ɵInternalFormsSharedModule = function ɵInternalFormsSharedModule() {
        _classCallCheck(this, ɵInternalFormsSharedModule);
      };

      ɵInternalFormsSharedModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
        type: ɵInternalFormsSharedModule
      });
      ɵInternalFormsSharedModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({
        factory: function ɵInternalFormsSharedModule_Factory(t) {
          return new (t || ɵInternalFormsSharedModule)();
        }
      });

      (function () {
        (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](ɵInternalFormsSharedModule, {
          declarations: [ɵNgNoValidate, NgSelectOption, ɵNgSelectMultipleOption, DefaultValueAccessor, NumberValueAccessor, RangeValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor, SelectMultipleControlValueAccessor, RadioControlValueAccessor, NgControlStatus, NgControlStatusGroup, RequiredValidator, MinLengthValidator, MaxLengthValidator, PatternValidator, CheckboxRequiredValidator, EmailValidator],
          exports: [ɵNgNoValidate, NgSelectOption, ɵNgSelectMultipleOption, DefaultValueAccessor, NumberValueAccessor, RangeValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor, SelectMultipleControlValueAccessor, RadioControlValueAccessor, NgControlStatus, NgControlStatusGroup, RequiredValidator, MinLengthValidator, MaxLengthValidator, PatternValidator, CheckboxRequiredValidator, EmailValidator]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ɵInternalFormsSharedModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
          args: [{
            declarations: SHARED_FORM_DIRECTIVES,
            exports: SHARED_FORM_DIRECTIVES
          }]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function isAbstractControlOptions(options) {
        return options.asyncValidators !== undefined || options.validators !== undefined || options.updateOn !== undefined;
      }
      /**
       * @description
       * Creates an `AbstractControl` from a user-specified configuration.
       *
       * The `FormBuilder` provides syntactic sugar that shortens creating instances of a `FormControl`,
       * `FormGroup`, or `FormArray`. It reduces the amount of boilerplate needed to build complex
       * forms.
       *
       * @see [Reactive Forms Guide](/guide/reactive-forms)
       *
       * @publicApi
       */


      var FormBuilder = /*#__PURE__*/function () {
        function FormBuilder() {
          _classCallCheck(this, FormBuilder);
        }

        _createClass2(FormBuilder, [{
          key: "group",
          value: function group(controlsConfig) {
            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

            var controls = this._reduceControls(controlsConfig);

            var validators = null;
            var asyncValidators = null;
            var updateOn = undefined;

            if (options != null) {
              if (isAbstractControlOptions(options)) {
                // `options` are `AbstractControlOptions`
                validators = options.validators != null ? options.validators : null;
                asyncValidators = options.asyncValidators != null ? options.asyncValidators : null;
                updateOn = options.updateOn != null ? options.updateOn : undefined;
              } else {
                // `options` are legacy form group options
                validators = options['validator'] != null ? options['validator'] : null;
                asyncValidators = options['asyncValidator'] != null ? options['asyncValidator'] : null;
              }
            }

            return new FormGroup(controls, {
              asyncValidators: asyncValidators,
              updateOn: updateOn,
              validators: validators
            });
          }
          /**
           * @description
           * Construct a new `FormControl` with the given state, validators and options.
           *
           * @param formState Initializes the control with an initial state value, or
           * with an object that contains both a value and a disabled status.
           *
           * @param validatorOrOpts A synchronous validator function, or an array of
           * such functions, or an `AbstractControlOptions` object that contains
           * validation functions and a validation trigger.
           *
           * @param asyncValidator A single async validator or array of async validator
           * functions.
           *
           * @usageNotes
           *
           * ### Initialize a control as disabled
           *
           * The following example returns a control with an initial value in a disabled state.
           *
           * <code-example path="forms/ts/formBuilder/form_builder_example.ts" region="disabled-control">
           * </code-example>
           */

        }, {
          key: "control",
          value: function control(formState, validatorOrOpts, asyncValidator) {
            return new FormControl(formState, validatorOrOpts, asyncValidator);
          }
          /**
           * Constructs a new `FormArray` from the given array of configurations,
           * validators and options.
           *
           * @param controlsConfig An array of child controls or control configs. Each
           * child control is given an index when it is registered.
           *
           * @param validatorOrOpts A synchronous validator function, or an array of
           * such functions, or an `AbstractControlOptions` object that contains
           * validation functions and a validation trigger.
           *
           * @param asyncValidator A single async validator or array of async validator
           * functions.
           */

        }, {
          key: "array",
          value: function array(controlsConfig, validatorOrOpts, asyncValidator) {
            var _this359 = this;

            var controls = controlsConfig.map(function (c) {
              return _this359._createControl(c);
            });
            return new FormArray(controls, validatorOrOpts, asyncValidator);
          }
          /** @internal */

        }, {
          key: "_reduceControls",
          value: function _reduceControls(controlsConfig) {
            var _this360 = this;

            var controls = {};
            Object.keys(controlsConfig).forEach(function (controlName) {
              controls[controlName] = _this360._createControl(controlsConfig[controlName]);
            });
            return controls;
          }
          /** @internal */

        }, {
          key: "_createControl",
          value: function _createControl(controlConfig) {
            if (controlConfig instanceof FormControl || controlConfig instanceof FormGroup || controlConfig instanceof FormArray) {
              return controlConfig;
            } else if (Array.isArray(controlConfig)) {
              var value = controlConfig[0];
              var validator = controlConfig.length > 1 ? controlConfig[1] : null;
              var asyncValidator = controlConfig.length > 2 ? controlConfig[2] : null;
              return this.control(value, validator, asyncValidator);
            } else {
              return this.control(controlConfig);
            }
          }
        }]);

        return FormBuilder;
      }();

      FormBuilder.ɵfac = function FormBuilder_Factory(t) {
        return new (t || FormBuilder)();
      };

      FormBuilder.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: FormBuilder,
        factory: FormBuilder.ɵfac
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FormBuilder, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @publicApi
       */


      var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["Version"]('11.0.9');
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Exports the required providers and directives for template-driven forms,
       * making them available for import by NgModules that import this module.
       *
       * @see [Forms Overview](/guide/forms-overview)
       * @see [Template-driven Forms Guide](/guide/forms)
       *
       * @publicApi
       */

      var FormsModule = function FormsModule() {
        _classCallCheck(this, FormsModule);
      };

      FormsModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
        type: FormsModule
      });
      FormsModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({
        factory: function FormsModule_Factory(t) {
          return new (t || FormsModule)();
        },
        providers: [RadioControlRegistry],
        imports: [ɵInternalFormsSharedModule]
      });

      (function () {
        (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](FormsModule, {
          declarations: [NgModel, NgModelGroup, NgForm],
          exports: [ɵInternalFormsSharedModule, NgModel, NgModelGroup, NgForm]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FormsModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
          args: [{
            declarations: TEMPLATE_DRIVEN_DIRECTIVES,
            providers: [RadioControlRegistry],
            exports: [ɵInternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]
          }]
        }], null, null);
      })();
      /**
       * Exports the required infrastructure and directives for reactive forms,
       * making them available for import by NgModules that import this module.
       *
       * @see [Forms Overview](guide/forms-overview)
       * @see [Reactive Forms Guide](guide/reactive-forms)
       *
       * @publicApi
       */


      var ReactiveFormsModule = /*#__PURE__*/function () {
        function ReactiveFormsModule() {
          _classCallCheck(this, ReactiveFormsModule);
        }

        _createClass2(ReactiveFormsModule, null, [{
          key: "withConfig",
          value:
          /**
           * @description
           * Provides options for configuring the reactive forms module.
           *
           * @param opts An object of configuration options
           * * `warnOnNgModelWithFormControl` Configures when to emit a warning when an `ngModel`
           * binding is used with reactive form directives.
           */
          function withConfig(opts) {
            return {
              ngModule: ReactiveFormsModule,
              providers: [{
                provide: NG_MODEL_WITH_FORM_CONTROL_WARNING,
                useValue: opts.warnOnNgModelWithFormControl
              }]
            };
          }
        }]);

        return ReactiveFormsModule;
      }();

      ReactiveFormsModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
        type: ReactiveFormsModule
      });
      ReactiveFormsModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({
        factory: function ReactiveFormsModule_Factory(t) {
          return new (t || ReactiveFormsModule)();
        },
        providers: [FormBuilder, RadioControlRegistry],
        imports: [ɵInternalFormsSharedModule]
      });

      (function () {
        (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](ReactiveFormsModule, {
          declarations: [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName],
          exports: [ɵInternalFormsSharedModule, FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ReactiveFormsModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
          args: [{
            declarations: [REACTIVE_DRIVEN_DIRECTIVES],
            providers: [FormBuilder, RadioControlRegistry],
            exports: [ɵInternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]
          }]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // This file only reexports content of the `src` folder. Keep it that way.

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Generated bundle index. Do not edit.
       */
      //# sourceMappingURL=forms.js.map

      /***/

    },

    /***/
    "3UD+":
    /*!*******************************************!*\
      !*** (webpack)/buildin/harmony-module.js ***!
      \*******************************************/

    /*! no static exports found */

    /***/
    function UD(module, exports) {
      module.exports = function (originalModule) {
        if (!originalModule.webpackPolyfill) {
          var module = Object.create(originalModule); // module.parent = undefined by default

          if (!module.children) module.children = [];
          Object.defineProperty(module, "loaded", {
            enumerable: true,
            get: function get() {
              return module.l;
            }
          });
          Object.defineProperty(module, "id", {
            enumerable: true,
            get: function get() {
              return module.i;
            }
          });
          Object.defineProperty(module, "exports", {
            enumerable: true
          });
          module.webpackPolyfill = 1;
        }

        return module;
      };
      /***/

    },

    /***/
    "3UWI":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/auditTime.js ***!
      \********************************************************************/

    /*! exports provided: auditTime */

    /***/
    function UWI(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "auditTime", function () {
        return auditTime;
      });
      /* harmony import */


      var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../scheduler/async */
      "D0XW");
      /* harmony import */


      var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./audit */
      "tnsW");
      /* harmony import */


      var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../observable/timer */
      "PqYM");

      function auditTime(duration) {
        var scheduler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
        return Object(_audit__WEBPACK_IMPORTED_MODULE_1__["audit"])(function () {
          return Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(duration, scheduler);
        });
      } //# sourceMappingURL=auditTime.js.map

      /***/

    },

    /***/
    "3uIU":
    /*!**************************************************************!*\
      !*** ./node_modules/@ionic-native/core/__ivy_ngcc__/util.js ***!
      \**************************************************************/

    /*! exports provided: get, getPromise */

    /***/
    function uIU(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "get", function () {
        return get;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getPromise", function () {
        return getPromise;
      });
      /**
       * @private
       */


      function get(element, path) {
        var paths = path.split('.');
        var obj = element;

        for (var i = 0; i < paths.length; i++) {
          if (!obj) {
            return null;
          }

          obj = obj[paths[i]];
        }

        return obj;
      }
      /**
       * @private
       */


      function getPromise(callback) {
        if (callback === void 0) {
          callback = function callback() {};
        }

        var tryNativePromise = function tryNativePromise() {
          if (typeof Promise === 'function' || typeof window !== 'undefined' && window.Promise) {
            return new Promise(function (resolve, reject) {
              callback(resolve, reject);
            });
          } else {
            console.error('No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular or on a recent browser.');
          }
        };

        return tryNativePromise();
      } //# sourceMappingURL=util.js.map

      /***/

    },

    /***/
    "4A3s":
    /*!*************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/ignoreElements.js ***!
      \*************************************************************************/

    /*! exports provided: ignoreElements */

    /***/
    function A3s(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ignoreElements", function () {
        return ignoreElements;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function ignoreElements() {
        return function ignoreElementsOperatorFunction(source) {
          return source.lift(new IgnoreElementsOperator());
        };
      }

      var IgnoreElementsOperator = /*#__PURE__*/function () {
        function IgnoreElementsOperator() {
          _classCallCheck(this, IgnoreElementsOperator);
        }

        _createClass2(IgnoreElementsOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new IgnoreElementsSubscriber(subscriber));
          }
        }]);

        return IgnoreElementsOperator;
      }();

      var IgnoreElementsSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_7) {
        _inherits(IgnoreElementsSubscriber, _Subscriber__WEBPACK_7);

        var _super140 = _createSuper(IgnoreElementsSubscriber);

        function IgnoreElementsSubscriber() {
          _classCallCheck(this, IgnoreElementsSubscriber);

          return _super140.apply(this, arguments);
        }

        _createClass2(IgnoreElementsSubscriber, [{
          key: "_next",
          value: function _next(unused) {}
        }]);

        return IgnoreElementsSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=ignoreElements.js.map

      /***/

    },

    /***/
    "4I5i":
    /*!*****************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/ArgumentOutOfRangeError.js ***!
      \*****************************************************************************/

    /*! exports provided: ArgumentOutOfRangeError */

    /***/
    function I5i(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function () {
        return ArgumentOutOfRangeError;
      });

      var ArgumentOutOfRangeErrorImpl = function () {
        function ArgumentOutOfRangeErrorImpl() {
          Error.call(this);
          this.message = 'argument out of range';
          this.name = 'ArgumentOutOfRangeError';
          return this;
        }

        ArgumentOutOfRangeErrorImpl.prototype = Object.create(Error.prototype);
        return ArgumentOutOfRangeErrorImpl;
      }();

      var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl; //# sourceMappingURL=ArgumentOutOfRangeError.js.map

      /***/
    },

    /***/
    "4IIC":
    /*!**********************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/ios.transition-12db6216.js ***!
      \**********************************************************************/

    /*! exports provided: iosTransitionAnimation, shadow */

    /***/
    function IIC(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "iosTransitionAnimation", function () {
        return iosTransitionAnimation;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "shadow", function () {
        return shadow;
      });
      /* harmony import */


      var _animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./animation-096c6391.js */
      "meiF");
      /* harmony import */


      var _index_931440b1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./index-931440b1.js */
      "Js3/");
      /* harmony import */


      var _helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./helpers-dd7e4b7b.js */
      "1vRN");
      /* harmony import */


      var _index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./index-7a8b7a1c.js */
      "wEJo");

      var DURATION = 540;

      var getClonedElement = function getClonedElement(tagName) {
        return document.querySelector("".concat(tagName, ".ion-cloned-element"));
      };

      var shadow = function shadow(el) {
        return el.shadowRoot || el;
      };

      var getLargeTitle = function getLargeTitle(refEl) {
        var tabs = refEl.tagName === 'ION-TABS' ? refEl : refEl.querySelector('ion-tabs');
        var query = 'ion-content ion-header:not(.header-collapse-condense-inactive) ion-title.title-large';

        if (tabs != null) {
          var activeTab = tabs.querySelector('ion-tab:not(.tab-hidden), .ion-page:not(.ion-page-hidden)');
          return activeTab != null ? activeTab.querySelector(query) : null;
        }

        return refEl.querySelector(query);
      };

      var getBackButton = function getBackButton(refEl, backDirection) {
        var tabs = refEl.tagName === 'ION-TABS' ? refEl : refEl.querySelector('ion-tabs');
        var buttonsList = [];

        if (tabs != null) {
          var activeTab = tabs.querySelector('ion-tab:not(.tab-hidden), .ion-page:not(.ion-page-hidden)');

          if (activeTab != null) {
            buttonsList = activeTab.querySelectorAll('ion-buttons');
          }
        } else {
          buttonsList = refEl.querySelectorAll('ion-buttons');
        }

        var _iterator47 = _createForOfIteratorHelper(buttonsList),
            _step46;

        try {
          for (_iterator47.s(); !(_step46 = _iterator47.n()).done;) {
            var buttons = _step46.value;
            var parentHeader = buttons.closest('ion-header');
            var activeHeader = parentHeader && !parentHeader.classList.contains('header-collapse-condense-inactive');
            var backButton = buttons.querySelector('ion-back-button');
            var buttonsCollapse = buttons.classList.contains('buttons-collapse');
            var startSlot = buttons.slot === 'start' || buttons.slot === '';

            if (backButton !== null && startSlot && (buttonsCollapse && activeHeader && backDirection || !buttonsCollapse)) {
              return backButton;
            }
          }
        } catch (err) {
          _iterator47.e(err);
        } finally {
          _iterator47.f();
        }

        return null;
      };

      var createLargeTitleTransition = function createLargeTitleTransition(rootAnimation, rtl, backDirection, enteringEl, leavingEl) {
        var enteringBackButton = getBackButton(enteringEl, backDirection);
        var leavingLargeTitle = getLargeTitle(leavingEl);
        var enteringLargeTitle = getLargeTitle(enteringEl);
        var leavingBackButton = getBackButton(leavingEl, backDirection);
        var shouldAnimationForward = enteringBackButton !== null && leavingLargeTitle !== null && !backDirection;
        var shouldAnimationBackward = enteringLargeTitle !== null && leavingBackButton !== null && backDirection;

        if (shouldAnimationForward) {
          var leavingLargeTitleBox = leavingLargeTitle.getBoundingClientRect();
          var enteringBackButtonBox = enteringBackButton.getBoundingClientRect();
          animateLargeTitle(rootAnimation, rtl, backDirection, leavingLargeTitle, leavingLargeTitleBox, enteringBackButtonBox);
          animateBackButton(rootAnimation, rtl, backDirection, enteringBackButton, leavingLargeTitleBox, enteringBackButtonBox);
        } else if (shouldAnimationBackward) {
          var enteringLargeTitleBox = enteringLargeTitle.getBoundingClientRect();
          var leavingBackButtonBox = leavingBackButton.getBoundingClientRect();
          animateLargeTitle(rootAnimation, rtl, backDirection, enteringLargeTitle, enteringLargeTitleBox, leavingBackButtonBox);
          animateBackButton(rootAnimation, rtl, backDirection, leavingBackButton, enteringLargeTitleBox, leavingBackButtonBox);
        }

        return {
          forward: shouldAnimationForward,
          backward: shouldAnimationBackward
        };
      };

      var animateBackButton = function animateBackButton(rootAnimation, rtl, backDirection, backButtonEl, largeTitleBox, backButtonBox) {
        var BACK_BUTTON_START_OFFSET = rtl ? "calc(100% - ".concat(backButtonBox.right + 4, "px)") : "".concat(backButtonBox.left - 4, "px");
        var START_TEXT_TRANSLATE = rtl ? '7px' : '-7px';
        var END_TEXT_TRANSLATE = rtl ? '-4px' : '4px';
        var ICON_TRANSLATE = rtl ? '-4px' : '4px';
        var TEXT_ORIGIN_X = rtl ? 'right' : 'left';
        var ICON_ORIGIN_X = rtl ? 'left' : 'right';
        var FORWARD_TEXT_KEYFRAMES = [{
          offset: 0,
          opacity: 0,
          transform: "translate3d(".concat(START_TEXT_TRANSLATE, ", ").concat(largeTitleBox.top - 40, "px, 0) scale(2.1)")
        }, {
          offset: 1,
          opacity: 1,
          transform: "translate3d(".concat(END_TEXT_TRANSLATE, ", ").concat(backButtonBox.top - 46, "px, 0) scale(1)")
        }];
        var BACKWARD_TEXT_KEYFRAMES = [{
          offset: 0,
          opacity: 1,
          transform: "translate3d(".concat(END_TEXT_TRANSLATE, ", ").concat(backButtonBox.top - 46, "px, 0) scale(1)")
        }, {
          offset: 0.6,
          opacity: 0
        }, {
          offset: 1,
          opacity: 0,
          transform: "translate3d(".concat(START_TEXT_TRANSLATE, ", ").concat(largeTitleBox.top - 40, "px, 0) scale(2.1)")
        }];
        var TEXT_KEYFRAMES = backDirection ? BACKWARD_TEXT_KEYFRAMES : FORWARD_TEXT_KEYFRAMES;
        var FORWARD_ICON_KEYFRAMES = [{
          offset: 0,
          opacity: 0,
          transform: "translate3d(".concat(ICON_TRANSLATE, ", ").concat(backButtonBox.top - 41, "px, 0) scale(0.6)")
        }, {
          offset: 1,
          opacity: 1,
          transform: "translate3d(".concat(ICON_TRANSLATE, ", ").concat(backButtonBox.top - 46, "px, 0) scale(1)")
        }];
        var BACKWARD_ICON_KEYFRAMES = [{
          offset: 0,
          opacity: 1,
          transform: "translate3d(".concat(ICON_TRANSLATE, ", ").concat(backButtonBox.top - 46, "px, 0) scale(1)")
        }, {
          offset: 0.2,
          opacity: 0,
          transform: "translate3d(".concat(ICON_TRANSLATE, ", ").concat(backButtonBox.top - 41, "px, 0) scale(0.6)")
        }, {
          offset: 1,
          opacity: 0,
          transform: "translate3d(".concat(ICON_TRANSLATE, ", ").concat(backButtonBox.top - 41, "px, 0) scale(0.6)")
        }];
        var ICON_KEYFRAMES = backDirection ? BACKWARD_ICON_KEYFRAMES : FORWARD_ICON_KEYFRAMES;
        var enteringBackButtonTextAnimation = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
        var enteringBackButtonIconAnimation = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
        var clonedBackButtonEl = getClonedElement('ion-back-button');
        var backButtonTextEl = shadow(clonedBackButtonEl).querySelector('.button-text');
        var backButtonIconEl = shadow(clonedBackButtonEl).querySelector('ion-icon');
        clonedBackButtonEl.text = backButtonEl.text;
        clonedBackButtonEl.mode = backButtonEl.mode;
        clonedBackButtonEl.icon = backButtonEl.icon;
        clonedBackButtonEl.color = backButtonEl.color;
        clonedBackButtonEl.disabled = backButtonEl.disabled;
        clonedBackButtonEl.style.setProperty('display', 'block');
        clonedBackButtonEl.style.setProperty('position', 'fixed');
        enteringBackButtonIconAnimation.addElement(backButtonIconEl);
        enteringBackButtonTextAnimation.addElement(backButtonTextEl);
        enteringBackButtonTextAnimation.beforeStyles({
          'transform-origin': "".concat(TEXT_ORIGIN_X, " center")
        }).beforeAddWrite(function () {
          backButtonEl.style.setProperty('display', 'none');
          clonedBackButtonEl.style.setProperty(TEXT_ORIGIN_X, BACK_BUTTON_START_OFFSET);
        }).afterAddWrite(function () {
          backButtonEl.style.setProperty('display', '');
          clonedBackButtonEl.style.setProperty('display', 'none');
          clonedBackButtonEl.style.removeProperty(TEXT_ORIGIN_X);
        }).keyframes(TEXT_KEYFRAMES);
        enteringBackButtonIconAnimation.beforeStyles({
          'transform-origin': "".concat(ICON_ORIGIN_X, " center")
        }).keyframes(ICON_KEYFRAMES);
        rootAnimation.addAnimation([enteringBackButtonTextAnimation, enteringBackButtonIconAnimation]);
      };

      var animateLargeTitle = function animateLargeTitle(rootAnimation, rtl, backDirection, largeTitleEl, largeTitleBox, backButtonBox) {
        var TITLE_START_OFFSET = rtl ? "calc(100% - ".concat(largeTitleBox.right, "px)") : "".concat(largeTitleBox.left, "px");
        var START_TRANSLATE = rtl ? '-18px' : '18px';
        var ORIGIN_X = rtl ? 'right' : 'left';
        var BACKWARDS_KEYFRAMES = [{
          offset: 0,
          opacity: 0,
          transform: "translate3d(".concat(START_TRANSLATE, ", ").concat(backButtonBox.top - 4, "px, 0) scale(0.49)")
        }, {
          offset: 0.1,
          opacity: 0
        }, {
          offset: 1,
          opacity: 1,
          transform: "translate3d(0, ".concat(largeTitleBox.top - 2, "px, 0) scale(1)")
        }];
        var FORWARDS_KEYFRAMES = [{
          offset: 0,
          opacity: 0.99,
          transform: "translate3d(0, ".concat(largeTitleBox.top - 2, "px, 0) scale(1)")
        }, {
          offset: 0.6,
          opacity: 0
        }, {
          offset: 1,
          opacity: 0,
          transform: "translate3d(".concat(START_TRANSLATE, ", ").concat(backButtonBox.top - 4, "px, 0) scale(0.5)")
        }];
        var KEYFRAMES = backDirection ? BACKWARDS_KEYFRAMES : FORWARDS_KEYFRAMES;
        var clonedTitleEl = getClonedElement('ion-title');
        var clonedLargeTitleAnimation = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
        clonedTitleEl.innerText = largeTitleEl.innerText;
        clonedTitleEl.size = largeTitleEl.size;
        clonedTitleEl.color = largeTitleEl.color;
        clonedLargeTitleAnimation.addElement(clonedTitleEl);
        clonedLargeTitleAnimation.beforeStyles(_defineProperty({
          'transform-origin': "".concat(ORIGIN_X, " center"),
          'height': '46px',
          'display': '',
          'position': 'relative'
        }, ORIGIN_X, TITLE_START_OFFSET)).beforeAddWrite(function () {
          largeTitleEl.style.setProperty('display', 'none');
        }).afterAddWrite(function () {
          largeTitleEl.style.setProperty('display', '');
          clonedTitleEl.style.setProperty('display', 'none');
        }).keyframes(KEYFRAMES);
        rootAnimation.addAnimation(clonedLargeTitleAnimation);
      };

      var iosTransitionAnimation = function iosTransitionAnimation(navEl, opts) {
        try {
          var EASING = 'cubic-bezier(0.32,0.72,0,1)';
          var OPACITY = 'opacity';
          var TRANSFORM = 'transform';
          var CENTER = '0%';
          var OFF_OPACITY = 0.8;
          var isRTL = navEl.ownerDocument.dir === 'rtl';
          var OFF_RIGHT = isRTL ? '-99.5%' : '99.5%';
          var OFF_LEFT = isRTL ? '33%' : '-33%';
          var enteringEl = opts.enteringEl;
          var leavingEl = opts.leavingEl;
          var backDirection = opts.direction === 'back';
          var contentEl = enteringEl.querySelector(':scope > ion-content');
          var headerEls = enteringEl.querySelectorAll(':scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *');
          var enteringToolBarEls = enteringEl.querySelectorAll(':scope > ion-header > ion-toolbar');
          var rootAnimation = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
          var enteringContentAnimation = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
          rootAnimation.addElement(enteringEl).duration(opts.duration || DURATION).easing(opts.easing || EASING).fill('both').beforeRemoveClass('ion-page-invisible');

          if (leavingEl && navEl) {
            var navDecorAnimation = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
            navDecorAnimation.addElement(navEl);
            rootAnimation.addAnimation(navDecorAnimation);
          }

          if (!contentEl && enteringToolBarEls.length === 0 && headerEls.length === 0) {
            enteringContentAnimation.addElement(enteringEl.querySelector(':scope > .ion-page, :scope > ion-nav, :scope > ion-tabs')); // REVIEW
          } else {
            enteringContentAnimation.addElement(contentEl); // REVIEW

            enteringContentAnimation.addElement(headerEls);
          }

          rootAnimation.addAnimation(enteringContentAnimation);

          if (backDirection) {
            enteringContentAnimation.beforeClearStyles([OPACITY]).fromTo('transform', "translateX(".concat(OFF_LEFT, ")"), "translateX(".concat(CENTER, ")")).fromTo(OPACITY, OFF_OPACITY, 1);
          } else {
            // entering content, forward direction
            enteringContentAnimation.beforeClearStyles([OPACITY]).fromTo('transform', "translateX(".concat(OFF_RIGHT, ")"), "translateX(".concat(CENTER, ")"));
          }

          if (contentEl) {
            var enteringTransitionEffectEl = shadow(contentEl).querySelector('.transition-effect');

            if (enteringTransitionEffectEl) {
              var enteringTransitionCoverEl = enteringTransitionEffectEl.querySelector('.transition-cover');
              var enteringTransitionShadowEl = enteringTransitionEffectEl.querySelector('.transition-shadow');
              var enteringTransitionEffect = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
              var enteringTransitionCover = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
              var enteringTransitionShadow = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
              enteringTransitionEffect.addElement(enteringTransitionEffectEl).beforeStyles({
                opacity: '1',
                display: 'block'
              }).afterStyles({
                opacity: '',
                display: ''
              });
              enteringTransitionCover.addElement(enteringTransitionCoverEl) // REVIEW
              .beforeClearStyles([OPACITY]).fromTo(OPACITY, 0, 0.1);
              enteringTransitionShadow.addElement(enteringTransitionShadowEl) // REVIEW
              .beforeClearStyles([OPACITY]).fromTo(OPACITY, 0.03, 0.70);
              enteringTransitionEffect.addAnimation([enteringTransitionCover, enteringTransitionShadow]);
              enteringContentAnimation.addAnimation([enteringTransitionEffect]);
            }
          }

          var enteringContentHasLargeTitle = enteringEl.querySelector('ion-header.header-collapse-condense');

          var _createLargeTitleTran = createLargeTitleTransition(rootAnimation, isRTL, backDirection, enteringEl, leavingEl),
              forward = _createLargeTitleTran.forward,
              backward = _createLargeTitleTran.backward;

          enteringToolBarEls.forEach(function (enteringToolBarEl) {
            var enteringToolBar = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
            enteringToolBar.addElement(enteringToolBarEl);
            rootAnimation.addAnimation(enteringToolBar);
            var enteringTitle = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
            enteringTitle.addElement(enteringToolBarEl.querySelector('ion-title')); // REVIEW

            var enteringToolBarButtons = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
            var buttons = Array.from(enteringToolBarEl.querySelectorAll('ion-buttons,[menuToggle]'));
            var parentHeader = enteringToolBarEl.closest('ion-header');
            var inactiveHeader = parentHeader && parentHeader.classList.contains('header-collapse-condense-inactive');
            var buttonsToAnimate;

            if (backDirection) {
              buttonsToAnimate = buttons.filter(function (button) {
                var isCollapseButton = button.classList.contains('buttons-collapse');
                return isCollapseButton && !inactiveHeader || !isCollapseButton;
              });
            } else {
              buttonsToAnimate = buttons.filter(function (button) {
                return !button.classList.contains('buttons-collapse');
              });
            }

            enteringToolBarButtons.addElement(buttonsToAnimate);
            var enteringToolBarItems = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
            enteringToolBarItems.addElement(enteringToolBarEl.querySelectorAll(':scope > *:not(ion-title):not(ion-buttons):not([menuToggle])'));
            var enteringToolBarBg = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
            enteringToolBarBg.addElement(shadow(enteringToolBarEl).querySelector('.toolbar-background')); // REVIEW

            var enteringBackButton = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
            var backButtonEl = enteringToolBarEl.querySelector('ion-back-button');

            if (backButtonEl) {
              enteringBackButton.addElement(backButtonEl);
            }

            enteringToolBar.addAnimation([enteringTitle, enteringToolBarButtons, enteringToolBarItems, enteringToolBarBg, enteringBackButton]);
            enteringToolBarButtons.fromTo(OPACITY, 0.01, 1);
            enteringToolBarItems.fromTo(OPACITY, 0.01, 1);

            if (backDirection) {
              if (!inactiveHeader) {
                enteringTitle.fromTo('transform', "translateX(".concat(OFF_LEFT, ")"), "translateX(".concat(CENTER, ")")).fromTo(OPACITY, 0.01, 1);
              }

              enteringToolBarItems.fromTo('transform', "translateX(".concat(OFF_LEFT, ")"), "translateX(".concat(CENTER, ")")); // back direction, entering page has a back button

              enteringBackButton.fromTo(OPACITY, 0.01, 1);
            } else {
              // entering toolbar, forward direction
              if (!enteringContentHasLargeTitle) {
                enteringTitle.fromTo('transform', "translateX(".concat(OFF_RIGHT, ")"), "translateX(".concat(CENTER, ")")).fromTo(OPACITY, 0.01, 1);
              }

              enteringToolBarItems.fromTo('transform', "translateX(".concat(OFF_RIGHT, ")"), "translateX(".concat(CENTER, ")"));
              enteringToolBarBg.beforeClearStyles([OPACITY, 'transform']);
              var translucentHeader = parentHeader === null || parentHeader === void 0 ? void 0 : parentHeader.translucent;

              if (!translucentHeader) {
                enteringToolBarBg.fromTo(OPACITY, 0.01, 'var(--opacity)');
              } else {
                enteringToolBarBg.fromTo('transform', isRTL ? 'translateX(-100%)' : 'translateX(100%)', 'translateX(0px)');
              } // forward direction, entering page has a back button


              if (!forward) {
                enteringBackButton.fromTo(OPACITY, 0.01, 1);
              }

              if (backButtonEl && !forward) {
                var enteringBackBtnText = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
                enteringBackBtnText.addElement(shadow(backButtonEl).querySelector('.button-text')) // REVIEW
                .fromTo("transform", isRTL ? 'translateX(-100px)' : 'translateX(100px)', 'translateX(0px)');
                enteringToolBar.addAnimation(enteringBackBtnText);
              }
            }
          }); // setup leaving view

          if (leavingEl) {
            var leavingContent = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
            var leavingContentEl = leavingEl.querySelector(':scope > ion-content');
            var leavingToolBarEls = leavingEl.querySelectorAll(':scope > ion-header > ion-toolbar');
            var leavingHeaderEls = leavingEl.querySelectorAll(':scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *');

            if (!leavingContentEl && leavingToolBarEls.length === 0 && leavingHeaderEls.length === 0) {
              leavingContent.addElement(leavingEl.querySelector(':scope > .ion-page, :scope > ion-nav, :scope > ion-tabs')); // REVIEW
            } else {
              leavingContent.addElement(leavingContentEl); // REVIEW

              leavingContent.addElement(leavingHeaderEls);
            }

            rootAnimation.addAnimation(leavingContent);

            if (backDirection) {
              // leaving content, back direction
              leavingContent.beforeClearStyles([OPACITY]).fromTo('transform', "translateX(".concat(CENTER, ")"), isRTL ? 'translateX(-100%)' : 'translateX(100%)');
              var leavingPage = Object(_index_931440b1_js__WEBPACK_IMPORTED_MODULE_1__["g"])(leavingEl);
              rootAnimation.afterAddWrite(function () {
                if (rootAnimation.getDirection() === 'normal') {
                  leavingPage.style.setProperty('display', 'none');
                }
              });
            } else {
              // leaving content, forward direction
              leavingContent.fromTo('transform', "translateX(".concat(CENTER, ")"), "translateX(".concat(OFF_LEFT, ")")).fromTo(OPACITY, 1, OFF_OPACITY);
            }

            if (leavingContentEl) {
              var leavingTransitionEffectEl = shadow(leavingContentEl).querySelector('.transition-effect');

              if (leavingTransitionEffectEl) {
                var leavingTransitionCoverEl = leavingTransitionEffectEl.querySelector('.transition-cover');
                var leavingTransitionShadowEl = leavingTransitionEffectEl.querySelector('.transition-shadow');
                var leavingTransitionEffect = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
                var leavingTransitionCover = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
                var leavingTransitionShadow = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
                leavingTransitionEffect.addElement(leavingTransitionEffectEl).beforeStyles({
                  opacity: '1',
                  display: 'block'
                }).afterStyles({
                  opacity: '',
                  display: ''
                });
                leavingTransitionCover.addElement(leavingTransitionCoverEl) // REVIEW
                .beforeClearStyles([OPACITY]).fromTo(OPACITY, 0.1, 0);
                leavingTransitionShadow.addElement(leavingTransitionShadowEl) // REVIEW
                .beforeClearStyles([OPACITY]).fromTo(OPACITY, 0.70, 0.03);
                leavingTransitionEffect.addAnimation([leavingTransitionCover, leavingTransitionShadow]);
                leavingContent.addAnimation([leavingTransitionEffect]);
              }
            }

            leavingToolBarEls.forEach(function (leavingToolBarEl) {
              var leavingToolBar = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
              leavingToolBar.addElement(leavingToolBarEl);
              var leavingTitle = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
              leavingTitle.addElement(leavingToolBarEl.querySelector('ion-title')); // REVIEW

              var leavingToolBarButtons = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
              var buttons = leavingToolBarEl.querySelectorAll('ion-buttons,[menuToggle]');
              var parentHeader = leavingToolBarEl.closest('ion-header');
              var inactiveHeader = parentHeader && parentHeader.classList.contains('header-collapse-condense-inactive');
              var buttonsToAnimate = Array.from(buttons).filter(function (button) {
                var isCollapseButton = button.classList.contains('buttons-collapse');
                return isCollapseButton && !inactiveHeader || !isCollapseButton;
              });
              leavingToolBarButtons.addElement(buttonsToAnimate);
              var leavingToolBarItems = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
              var leavingToolBarItemEls = leavingToolBarEl.querySelectorAll(':scope > *:not(ion-title):not(ion-buttons):not([menuToggle])');

              if (leavingToolBarItemEls.length > 0) {
                leavingToolBarItems.addElement(leavingToolBarItemEls);
              }

              var leavingToolBarBg = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
              leavingToolBarBg.addElement(shadow(leavingToolBarEl).querySelector('.toolbar-background')); // REVIEW

              var leavingBackButton = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
              var backButtonEl = leavingToolBarEl.querySelector('ion-back-button');

              if (backButtonEl) {
                leavingBackButton.addElement(backButtonEl);
              }

              leavingToolBar.addAnimation([leavingTitle, leavingToolBarButtons, leavingToolBarItems, leavingBackButton, leavingToolBarBg]);
              rootAnimation.addAnimation(leavingToolBar); // fade out leaving toolbar items

              leavingBackButton.fromTo(OPACITY, 0.99, 0);
              leavingToolBarButtons.fromTo(OPACITY, 0.99, 0);
              leavingToolBarItems.fromTo(OPACITY, 0.99, 0);

              if (backDirection) {
                if (!inactiveHeader) {
                  // leaving toolbar, back direction
                  leavingTitle.fromTo('transform', "translateX(".concat(CENTER, ")"), isRTL ? 'translateX(-100%)' : 'translateX(100%)').fromTo(OPACITY, 0.99, 0);
                }

                leavingToolBarItems.fromTo('transform', "translateX(".concat(CENTER, ")"), isRTL ? 'translateX(-100%)' : 'translateX(100%)');
                leavingToolBarBg.beforeClearStyles([OPACITY, 'transform']); // leaving toolbar, back direction, and there's no entering toolbar
                // should just slide out, no fading out

                var translucentHeader = parentHeader === null || parentHeader === void 0 ? void 0 : parentHeader.translucent;

                if (!translucentHeader) {
                  leavingToolBarBg.fromTo(OPACITY, 'var(--opacity)', 0);
                } else {
                  leavingToolBarBg.fromTo('transform', 'translateX(0px)', isRTL ? 'translateX(-100%)' : 'translateX(100%)');
                }

                if (backButtonEl && !backward) {
                  var leavingBackBtnText = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_0__["c"])();
                  leavingBackBtnText.addElement(shadow(backButtonEl).querySelector('.button-text')) // REVIEW
                  .fromTo('transform', "translateX(".concat(CENTER, ")"), "translateX(".concat((isRTL ? -124 : 124) + 'px', ")"));
                  leavingToolBar.addAnimation(leavingBackBtnText);
                }
              } else {
                // leaving toolbar, forward direction
                if (!inactiveHeader) {
                  leavingTitle.fromTo('transform', "translateX(".concat(CENTER, ")"), "translateX(".concat(OFF_LEFT, ")")).fromTo(OPACITY, 0.99, 0).afterClearStyles([TRANSFORM, OPACITY]);
                }

                leavingToolBarItems.fromTo('transform', "translateX(".concat(CENTER, ")"), "translateX(".concat(OFF_LEFT, ")")).afterClearStyles([TRANSFORM, OPACITY]);
                leavingBackButton.afterClearStyles([OPACITY]);
                leavingTitle.afterClearStyles([OPACITY]);
                leavingToolBarButtons.afterClearStyles([OPACITY]);
              }
            });
          }

          return rootAnimation;
        } catch (err) {
          throw err;
        }
      };
      /***/

    },

    /***/
    "4O5X":
    /*!****************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/bindNodeCallback.js ***!
      \****************************************************************************/

    /*! exports provided: bindNodeCallback */

    /***/
    function O5X(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function () {
        return bindNodeCallback;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../AsyncSubject */
      "NHP+");
      /* harmony import */


      var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../operators/map */
      "lJxs");
      /* harmony import */


      var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../util/canReportError */
      "8Qeq");
      /* harmony import */


      var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ../util/isScheduler */
      "z+Ro");
      /* harmony import */


      var _util_isArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ../util/isArray */
      "DH7j");

      function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
        if (resultSelector) {
          if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(resultSelector)) {
            scheduler = resultSelector;
          } else {
            return function () {
              return bindNodeCallback(callbackFunc, scheduler).apply(void 0, arguments).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) {
                return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_5__["isArray"])(args) ? resultSelector.apply(void 0, _toConsumableArray(args)) : resultSelector(args);
              }));
            };
          }
        }

        return function () {
          for (var _len12 = arguments.length, args = new Array(_len12), _key13 = 0; _key13 < _len12; _key13++) {
            args[_key13] = arguments[_key13];
          }

          var params = {
            subject: undefined,
            args: args,
            callbackFunc: callbackFunc,
            scheduler: scheduler,
            context: this
          };
          return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
            var context = params.context;
            var subject = params.subject;

            if (!scheduler) {
              if (!subject) {
                subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();

                var handler = function handler() {
                  for (var _len13 = arguments.length, innerArgs = new Array(_len13), _key14 = 0; _key14 < _len13; _key14++) {
                    innerArgs[_key14] = arguments[_key14];
                  }

                  var err = innerArgs.shift();

                  if (err) {
                    subject.error(err);
                    return;
                  }

                  subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
                  subject.complete();
                };

                try {
                  callbackFunc.apply(context, [].concat(args, [handler]));
                } catch (err) {
                  if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
                    subject.error(err);
                  } else {
                    console.warn(err);
                  }
                }
              }

              return subject.subscribe(subscriber);
            } else {
              return scheduler.schedule(dispatch, 0, {
                params: params,
                subscriber: subscriber,
                context: context
              });
            }
          });
        };
      }

      function dispatch(state) {
        var _this361 = this;

        var params = state.params,
            subscriber = state.subscriber,
            context = state.context;
        var callbackFunc = params.callbackFunc,
            args = params.args,
            scheduler = params.scheduler;
        var subject = params.subject;

        if (!subject) {
          subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();

          var handler = function handler() {
            for (var _len14 = arguments.length, innerArgs = new Array(_len14), _key15 = 0; _key15 < _len14; _key15++) {
              innerArgs[_key15] = arguments[_key15];
            }

            var err = innerArgs.shift();

            if (err) {
              _this361.add(scheduler.schedule(dispatchError, 0, {
                err: err,
                subject: subject
              }));
            } else {
              var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;

              _this361.add(scheduler.schedule(dispatchNext, 0, {
                value: value,
                subject: subject
              }));
            }
          };

          try {
            callbackFunc.apply(context, [].concat(_toConsumableArray(args), [handler]));
          } catch (err) {
            this.add(scheduler.schedule(dispatchError, 0, {
              err: err,
              subject: subject
            }));
          }
        }

        this.add(subject.subscribe(subscriber));
      }

      function dispatchNext(arg) {
        var value = arg.value,
            subject = arg.subject;
        subject.next(value);
        subject.complete();
      }

      function dispatchError(arg) {
        var err = arg.err,
            subject = arg.subject;
        subject.error(err);
      } //# sourceMappingURL=bindNodeCallback.js.map

      /***/

    },

    /***/
    "4Ssk":
    /*!****************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/supports.js ***!
      \****************************************************/

    /*! exports provided: supportsErrorEvent, supportsDOMError, supportsDOMException, supportsFetch, isNativeFetch, supportsNativeFetch, supportsReportingObserver, supportsReferrerPolicy, supportsHistory */

    /***/
    function Ssk(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "supportsErrorEvent", function () {
        return supportsErrorEvent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "supportsDOMError", function () {
        return supportsDOMError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "supportsDOMException", function () {
        return supportsDOMException;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "supportsFetch", function () {
        return supportsFetch;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isNativeFetch", function () {
        return isNativeFetch;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "supportsNativeFetch", function () {
        return supportsNativeFetch;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "supportsReportingObserver", function () {
        return supportsReportingObserver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "supportsReferrerPolicy", function () {
        return supportsReferrerPolicy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "supportsHistory", function () {
        return supportsHistory;
      });
      /* harmony import */


      var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./global */
      "z+RT");
      /* harmony import */


      var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./logger */
      "8LbN");
      /**
       * Tells whether current environment supports ErrorEvent objects
       * {@link supportsErrorEvent}.
       *
       * @returns Answer to the given question.
       */


      function supportsErrorEvent() {
        try {
          new ErrorEvent('');
          return true;
        } catch (e) {
          return false;
        }
      }
      /**
       * Tells whether current environment supports DOMError objects
       * {@link supportsDOMError}.
       *
       * @returns Answer to the given question.
       */


      function supportsDOMError() {
        try {
          // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':
          // 1 argument required, but only 0 present.
          // @ts-ignore It really needs 1 argument, not 0.
          new DOMError('');
          return true;
        } catch (e) {
          return false;
        }
      }
      /**
       * Tells whether current environment supports DOMException objects
       * {@link supportsDOMException}.
       *
       * @returns Answer to the given question.
       */


      function supportsDOMException() {
        try {
          new DOMException('');
          return true;
        } catch (e) {
          return false;
        }
      }
      /**
       * Tells whether current environment supports Fetch API
       * {@link supportsFetch}.
       *
       * @returns Answer to the given question.
       */


      function supportsFetch() {
        if (!('fetch' in Object(_global__WEBPACK_IMPORTED_MODULE_0__["getGlobalObject"])())) {
          return false;
        }

        try {
          new Headers();
          new Request('');
          new Response();
          return true;
        } catch (e) {
          return false;
        }
      }
      /**
       * isNativeFetch checks if the given function is a native implementation of fetch()
       */
      // eslint-disable-next-line @typescript-eslint/ban-types


      function isNativeFetch(func) {
        return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString());
      }
      /**
       * Tells whether current environment supports Fetch API natively
       * {@link supportsNativeFetch}.
       *
       * @returns true if `window.fetch` is natively implemented, false otherwise
       */


      function supportsNativeFetch() {
        if (!supportsFetch()) {
          return false;
        }

        var global = Object(_global__WEBPACK_IMPORTED_MODULE_0__["getGlobalObject"])(); // Fast path to avoid DOM I/O
        // eslint-disable-next-line @typescript-eslint/unbound-method

        if (isNativeFetch(global.fetch)) {
          return true;
        } // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)
        // so create a "pure" iframe to see if that has native fetch


        var result = false;
        var doc = global.document; // eslint-disable-next-line deprecation/deprecation

        if (doc && typeof doc.createElement === "function") {
          try {
            var sandbox = doc.createElement('iframe');
            sandbox.hidden = true;
            doc.head.appendChild(sandbox);

            if (sandbox.contentWindow && sandbox.contentWindow.fetch) {
              // eslint-disable-next-line @typescript-eslint/unbound-method
              result = isNativeFetch(sandbox.contentWindow.fetch);
            }

            doc.head.removeChild(sandbox);
          } catch (err) {
            _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);
          }
        }

        return result;
      }
      /**
       * Tells whether current environment supports ReportingObserver API
       * {@link supportsReportingObserver}.
       *
       * @returns Answer to the given question.
       */


      function supportsReportingObserver() {
        return 'ReportingObserver' in Object(_global__WEBPACK_IMPORTED_MODULE_0__["getGlobalObject"])();
      }
      /**
       * Tells whether current environment supports Referrer Policy API
       * {@link supportsReferrerPolicy}.
       *
       * @returns Answer to the given question.
       */


      function supportsReferrerPolicy() {
        // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default
        // https://caniuse.com/#feat=referrer-policy
        // It doesn't. And it throw exception instead of ignoring this parameter...
        // REF: https://github.com/getsentry/raven-js/issues/1233
        if (!supportsFetch()) {
          return false;
        }

        try {
          new Request('_', {
            referrerPolicy: 'origin'
          });
          return true;
        } catch (e) {
          return false;
        }
      }
      /**
       * Tells whether current environment supports History API
       * {@link supportsHistory}.
       *
       * @returns Answer to the given question.
       */


      function supportsHistory() {
        // NOTE: in Chrome App environment, touching history.pushState, *even inside
        //       a try/catch block*, will cause Chrome to output an error to console.error
        // borrowed from: https://github.com/angular/angular.js/pull/13945/files
        var global = Object(_global__WEBPACK_IMPORTED_MODULE_0__["getGlobalObject"])();
        /* eslint-disable @typescript-eslint/no-unsafe-member-access */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any

        var chrome = global.chrome;
        var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
        /* eslint-enable @typescript-eslint/no-unsafe-member-access */

        var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;
        return !isChromePackagedApp && hasHistoryApi;
      } //# sourceMappingURL=supports.js.map

      /***/

    },

    /***/
    "4f8F":
    /*!***************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/race.js ***!
      \***************************************************************/

    /*! exports provided: race */

    /***/
    function f8F(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "race", function () {
        return race;
      });
      /* harmony import */


      var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../util/isArray */
      "DH7j");
      /* harmony import */


      var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../observable/race */
      "Nv8m");

      function race() {
        for (var _len15 = arguments.length, observables = new Array(_len15), _key16 = 0; _key16 < _len15; _key16++) {
          observables[_key16] = arguments[_key16];
        }

        return function raceOperatorFunction(source) {
          if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
            observables = observables[0];
          }

          return source.lift.call(Object(_observable_race__WEBPACK_IMPORTED_MODULE_1__["race"]).apply(void 0, [source].concat(_toConsumableArray(observables))));
        };
      } //# sourceMappingURL=race.js.map

      /***/

    },

    /***/
    "4hIw":
    /*!***********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/timeInterval.js ***!
      \***********************************************************************/

    /*! exports provided: timeInterval, TimeInterval */

    /***/
    function hIw(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "timeInterval", function () {
        return timeInterval;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TimeInterval", function () {
        return TimeInterval;
      });
      /* harmony import */


      var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../scheduler/async */
      "D0XW");
      /* harmony import */


      var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./scan */
      "Kqap");
      /* harmony import */


      var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../observable/defer */
      "NXyV");
      /* harmony import */


      var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./map */
      "lJxs");

      function timeInterval() {
        var scheduler = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
        return function (source) {
          return Object(_observable_defer__WEBPACK_IMPORTED_MODULE_2__["defer"])(function () {
            return source.pipe(Object(_scan__WEBPACK_IMPORTED_MODULE_1__["scan"])(function (_ref47, value) {
              var current = _ref47.current;
              return {
                value: value,
                current: scheduler.now(),
                last: current
              };
            }, {
              current: scheduler.now(),
              value: undefined,
              last: undefined
            }), Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (_ref48) {
              var current = _ref48.current,
                  last = _ref48.last,
                  value = _ref48.value;
              return new TimeInterval(value, current - last);
            }));
          });
        };
      }

      var TimeInterval = function TimeInterval(value, interval) {
        _classCallCheck(this, TimeInterval);

        this.value = value;
        this.interval = interval;
      }; //# sourceMappingURL=timeInterval.js.map

      /***/

    },

    /***/
    "4kjc":
    /*!****************************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/integrations/index.js ***!
      \****************************************************************/

    /*! exports provided: GlobalHandlers, TryCatch, Breadcrumbs, LinkedErrors, UserAgent, Dedupe */

    /***/
    function kjc(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _globalhandlers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./globalhandlers */
      "UBq+");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "GlobalHandlers", function () {
        return _globalhandlers__WEBPACK_IMPORTED_MODULE_0__["GlobalHandlers"];
      });
      /* harmony import */


      var _trycatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./trycatch */
      "wytX");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "TryCatch", function () {
        return _trycatch__WEBPACK_IMPORTED_MODULE_1__["TryCatch"];
      });
      /* harmony import */


      var _breadcrumbs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./breadcrumbs */
      "/ZhC");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Breadcrumbs", function () {
        return _breadcrumbs__WEBPACK_IMPORTED_MODULE_2__["Breadcrumbs"];
      });
      /* harmony import */


      var _linkederrors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./linkederrors */
      "ZAf6");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "LinkedErrors", function () {
        return _linkederrors__WEBPACK_IMPORTED_MODULE_3__["LinkedErrors"];
      });
      /* harmony import */


      var _useragent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./useragent */
      "nmNn");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "UserAgent", function () {
        return _useragent__WEBPACK_IMPORTED_MODULE_4__["UserAgent"];
      });
      /* harmony import */


      var _dedupe__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./dedupe */
      "WBcU");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Dedupe", function () {
        return _dedupe__WEBPACK_IMPORTED_MODULE_5__["Dedupe"];
      }); //# sourceMappingURL=index.js.map

      /***/

    },

    /***/
    "4yVj":
    /*!**************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduled/schedulePromise.js ***!
      \**************************************************************************/

    /*! exports provided: schedulePromise */

    /***/
    function yVj(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "schedulePromise", function () {
        return schedulePromise;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Subscription */
      "quSY");

      function schedulePromise(input, scheduler) {
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
          sub.add(scheduler.schedule(function () {
            return input.then(function (value) {
              sub.add(scheduler.schedule(function () {
                subscriber.next(value);
                sub.add(scheduler.schedule(function () {
                  return subscriber.complete();
                }));
              }));
            }, function (err) {
              sub.add(scheduler.schedule(function () {
                return subscriber.error(err);
              }));
            });
          }));
          return sub;
        });
      } //# sourceMappingURL=schedulePromise.js.map

      /***/

    },

    /***/
    "5+tZ":
    /*!*******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeMap.js ***!
      \*******************************************************************/

    /*! exports provided: mergeMap, MergeMapOperator, MergeMapSubscriber, flatMap */

    /***/
    function tZ(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "mergeMap", function () {
        return mergeMap;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MergeMapOperator", function () {
        return MergeMapOperator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MergeMapSubscriber", function () {
        return MergeMapSubscriber;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "flatMap", function () {
        return flatMap;
      });
      /* harmony import */


      var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./map */
      "lJxs");
      /* harmony import */


      var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../observable/from */
      "Cfvw");
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function mergeMap(project, resultSelector) {
        var concurrent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.POSITIVE_INFINITY;

        if (typeof resultSelector === 'function') {
          return function (source) {
            return source.pipe(mergeMap(function (a, i) {
              return Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])(function (b, ii) {
                return resultSelector(a, b, i, ii);
              }));
            }, concurrent));
          };
        } else if (typeof resultSelector === 'number') {
          concurrent = resultSelector;
        }

        return function (source) {
          return source.lift(new MergeMapOperator(project, concurrent));
        };
      }

      var MergeMapOperator = /*#__PURE__*/function () {
        function MergeMapOperator(project) {
          var concurrent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.POSITIVE_INFINITY;

          _classCallCheck(this, MergeMapOperator);

          this.project = project;
          this.concurrent = concurrent;
        }

        _createClass2(MergeMapOperator, [{
          key: "call",
          value: function call(observer, source) {
            return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
          }
        }]);

        return MergeMapOperator;
      }();

      var MergeMapSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP4) {
        _inherits(MergeMapSubscriber, _innerSubscribe__WEBP4);

        var _super141 = _createSuper(MergeMapSubscriber);

        function MergeMapSubscriber(destination, project) {
          var _this362;

          var concurrent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.POSITIVE_INFINITY;

          _classCallCheck(this, MergeMapSubscriber);

          _this362 = _super141.call(this, destination);
          _this362.project = project;
          _this362.concurrent = concurrent;
          _this362.hasCompleted = false;
          _this362.buffer = [];
          _this362.active = 0;
          _this362.index = 0;
          return _this362;
        }

        _createClass2(MergeMapSubscriber, [{
          key: "_next",
          value: function _next(value) {
            if (this.active < this.concurrent) {
              this._tryNext(value);
            } else {
              this.buffer.push(value);
            }
          }
        }, {
          key: "_tryNext",
          value: function _tryNext(value) {
            var result;
            var index = this.index++;

            try {
              result = this.project(value, index);
            } catch (err) {
              this.destination.error(err);
              return;
            }

            this.active++;

            this._innerSub(result);
          }
        }, {
          key: "_innerSub",
          value: function _innerSub(ish) {
            var innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this);
            var destination = this.destination;
            destination.add(innerSubscriber);
            var innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(ish, innerSubscriber);

            if (innerSubscription !== innerSubscriber) {
              destination.add(innerSubscription);
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.hasCompleted = true;

            if (this.active === 0 && this.buffer.length === 0) {
              this.destination.complete();
            }

            this.unsubscribe();
          }
        }, {
          key: "notifyNext",
          value: function notifyNext(innerValue) {
            this.destination.next(innerValue);
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            var buffer = this.buffer;
            this.active--;

            if (buffer.length > 0) {
              this._next(buffer.shift());
            } else if (this.active === 0 && this.hasCompleted) {
              this.destination.complete();
            }
          }
        }]);

        return MergeMapSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"]);

      var flatMap = mergeMap; //# sourceMappingURL=mergeMap.js.map

      /***/
    },

    /***/
    "51Bx":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeScan.js ***!
      \********************************************************************/

    /*! exports provided: mergeScan, MergeScanOperator, MergeScanSubscriber */

    /***/
    function Bx(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "mergeScan", function () {
        return mergeScan;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MergeScanOperator", function () {
        return MergeScanOperator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MergeScanSubscriber", function () {
        return MergeScanSubscriber;
      });
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function mergeScan(accumulator, seed) {
        var concurrent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.POSITIVE_INFINITY;
        return function (source) {
          return source.lift(new MergeScanOperator(accumulator, seed, concurrent));
        };
      }

      var MergeScanOperator = /*#__PURE__*/function () {
        function MergeScanOperator(accumulator, seed, concurrent) {
          _classCallCheck(this, MergeScanOperator);

          this.accumulator = accumulator;
          this.seed = seed;
          this.concurrent = concurrent;
        }

        _createClass2(MergeScanOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));
          }
        }]);

        return MergeScanOperator;
      }();

      var MergeScanSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP5) {
        _inherits(MergeScanSubscriber, _innerSubscribe__WEBP5);

        var _super142 = _createSuper(MergeScanSubscriber);

        function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
          var _this363;

          _classCallCheck(this, MergeScanSubscriber);

          _this363 = _super142.call(this, destination);
          _this363.accumulator = accumulator;
          _this363.acc = acc;
          _this363.concurrent = concurrent;
          _this363.hasValue = false;
          _this363.hasCompleted = false;
          _this363.buffer = [];
          _this363.active = 0;
          _this363.index = 0;
          return _this363;
        }

        _createClass2(MergeScanSubscriber, [{
          key: "_next",
          value: function _next(value) {
            if (this.active < this.concurrent) {
              var index = this.index++;
              var destination = this.destination;
              var ish;

              try {
                var accumulator = this.accumulator;
                ish = accumulator(this.acc, value, index);
              } catch (e) {
                return destination.error(e);
              }

              this.active++;

              this._innerSub(ish);
            } else {
              this.buffer.push(value);
            }
          }
        }, {
          key: "_innerSub",
          value: function _innerSub(ish) {
            var innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this);
            var destination = this.destination;
            destination.add(innerSubscriber);
            var innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(ish, innerSubscriber);

            if (innerSubscription !== innerSubscriber) {
              destination.add(innerSubscription);
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.hasCompleted = true;

            if (this.active === 0 && this.buffer.length === 0) {
              if (this.hasValue === false) {
                this.destination.next(this.acc);
              }

              this.destination.complete();
            }

            this.unsubscribe();
          }
        }, {
          key: "notifyNext",
          value: function notifyNext(innerValue) {
            var destination = this.destination;
            this.acc = innerValue;
            this.hasValue = true;
            destination.next(innerValue);
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            var buffer = this.buffer;
            this.active--;

            if (buffer.length > 0) {
              this._next(buffer.shift());
            } else if (this.active === 0 && this.hasCompleted) {
              if (this.hasValue === false) {
                this.destination.next(this.acc);
              }

              this.destination.complete();
            }
          }
        }]);

        return MergeScanSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"]); //# sourceMappingURL=mergeScan.js.map

      /***/

    },

    /***/
    "51Dv":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js ***!
      \****************************************************************/

    /*! exports provided: InnerSubscriber */

    /***/
    function Dv(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "InnerSubscriber", function () {
        return InnerSubscriber;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./Subscriber */
      "7o/Q");

      var InnerSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_8) {
        _inherits(InnerSubscriber, _Subscriber__WEBPACK_8);

        var _super143 = _createSuper(InnerSubscriber);

        function InnerSubscriber(parent, outerValue, outerIndex) {
          var _this364;

          _classCallCheck(this, InnerSubscriber);

          _this364 = _super143.call(this);
          _this364.parent = parent;
          _this364.outerValue = outerValue;
          _this364.outerIndex = outerIndex;
          _this364.index = 0;
          return _this364;
        }

        _createClass2(InnerSubscriber, [{
          key: "_next",
          value: function _next(value) {
            this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
          }
        }, {
          key: "_error",
          value: function _error(error) {
            this.parent.notifyError(error, this);
            this.unsubscribe();
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.parent.notifyComplete(this);
            this.unsubscribe();
          }
        }]);

        return InnerSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=InnerSubscriber.js.map

      /***/

    },

    /***/
    "54vc":
    /*!****************************************************************************!*\
      !*** ./node_modules/@ionic-native/splash-screen/__ivy_ngcc__/ngx/index.js ***!
      \****************************************************************************/

    /*! exports provided: SplashScreen */

    /***/
    function vc(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SplashScreen", function () {
        return SplashScreen;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _ionic_native_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @ionic-native/core */
      "C6fG");

      var SplashScreen =
      /** @class */
      function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SplashScreen, _super);

        function SplashScreen() {
          return _super !== null && _super.apply(this, arguments) || this;
        }

        SplashScreen.prototype.show = function () {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "show", {
            "sync": true
          }, arguments);
        };

        SplashScreen.prototype.hide = function () {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "hide", {
            "sync": true
          }, arguments);
        };

        SplashScreen.pluginName = "SplashScreen";
        SplashScreen.plugin = "cordova-plugin-splashscreen";
        SplashScreen.pluginRef = "navigator.splashscreen";
        SplashScreen.repo = "https://github.com/apache/cordova-plugin-splashscreen";
        SplashScreen.platforms = ["Amazon Fire OS", "Android", "iOS", "Windows"];

        SplashScreen.ɵfac = function SplashScreen_Factory(t) {
          return ɵSplashScreen_BaseFactory(t || SplashScreen);
        };

        SplashScreen.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
          token: SplashScreen,
          factory: function factory(t) {
            return SplashScreen.ɵfac(t);
          }
        });

        var ɵSplashScreen_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetInheritedFactory"](SplashScreen);
        /*@__PURE__*/


        (function () {
          _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](SplashScreen, [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
          }], null, null);
        })();

        return SplashScreen;
      }(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["IonicNativePlugin"]); //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9AaW9uaWMtbmF0aXZlL3BsdWdpbnMvc3BsYXNoLXNjcmVlbi9uZ3gvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyw4QkFBc0MsTUFBTSxvQkFBb0IsQ0FBQzs7QUFDeEU7QUFJQyxJQXVCaUMsZ0NBQWlCO0FBQUM7QUFFOUI7QUFRcEI7QUFBTSxJQUhOLDJCQUFJO0FBTU8sSUFFWCwyQkFBSTtBQUUyRDtBQUE4QztBQUF5RDtBQUF1RDtBQUFpRjtnREFsQi9TLFVBQVU7Ozs7OzBCQUNMO0FBQUMsdUJBN0JQO0FBQUUsRUE2QmdDLGlCQUFpQjtBQUNsRCxTQURZLFlBQVk7QUFBSSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IENvcmRvdmEsIElvbmljTmF0aXZlUGx1Z2luLCBQbHVnaW4gfSBmcm9tICdAaW9uaWMtbmF0aXZlL2NvcmUnO1xuXG4vKipcbiAqIEBuYW1lIFNwbGFzaCBTY3JlZW5cbiAqIEBwcmVtaWVyIHNwbGFzaHNjcmVlblxuICogQGNhcGFjaXRvcmluY29tcGF0aWJsZSB0cnVlXG4gKiBAZGVzY3JpcHRpb24gVGhpcyBwbHVnaW4gZGlzcGxheXMgYW5kIGhpZGVzIGEgc3BsYXNoIHNjcmVlbiBkdXJpbmcgYXBwbGljYXRpb24gbGF1bmNoLiBUaGUgbWV0aG9kcyBiZWxvdyBhbGxvd3Mgc2hvd2luZyBhbmQgaGlkaW5nIHRoZSBzcGxhc2hzY3JlZW4gYWZ0ZXIgdGhlIGFwcCBoYXMgbG9hZGVkLlxuICogQHVzYWdlXG4gKiBgYGB0eXBlc2NyaXB0XG4gKiBpbXBvcnQgeyBTcGxhc2hTY3JlZW4gfSBmcm9tICdAaW9uaWMtbmF0aXZlL3NwbGFzaC1zY3JlZW4vbmd4JztcbiAqXG4gKiBjb25zdHJ1Y3Rvcihwcml2YXRlIHNwbGFzaFNjcmVlbjogU3BsYXNoU2NyZWVuKSB7IH1cbiAqXG4gKiAuLi5cbiAqXG4gKiB0aGlzLnNwbGFzaFNjcmVlbi5zaG93KCk7XG4gKlxuICogdGhpcy5zcGxhc2hTY3JlZW4uaGlkZSgpO1xuICogYGBgXG4gKi9cbkBQbHVnaW4oe1xuICBwbHVnaW5OYW1lOiAnU3BsYXNoU2NyZWVuJyxcbiAgcGx1Z2luOiAnY29yZG92YS1wbHVnaW4tc3BsYXNoc2NyZWVuJyxcbiAgcGx1Z2luUmVmOiAnbmF2aWdhdG9yLnNwbGFzaHNjcmVlbicsXG4gIHJlcG86ICdodHRwczovL2dpdGh1Yi5jb20vYXBhY2hlL2NvcmRvdmEtcGx1Z2luLXNwbGFzaHNjcmVlbicsXG4gIHBsYXRmb3JtczogWydBbWF6b24gRmlyZSBPUycsICdBbmRyb2lkJywgJ2lPUycsICdXaW5kb3dzJ10sXG59KVxuQEluamVjdGFibGUoKVxuZXhwb3J0IGNsYXNzIFNwbGFzaFNjcmVlbiBleHRlbmRzIElvbmljTmF0aXZlUGx1Z2luIHtcbiAgLyoqXG4gICAqIFNob3dzIHRoZSBzcGxhc2hzY3JlZW5cbiAgICovXG4gIEBDb3Jkb3ZhKHtcbiAgICBzeW5jOiB0cnVlLFxuICB9KVxuICBzaG93KCk6IHZvaWQge31cblxuICAvKipcbiAgICogSGlkZXMgdGhlIHNwbGFzaHNjcmVlblxuICAgKi9cbiAgQENvcmRvdmEoe1xuICAgIHN5bmM6IHRydWUsXG4gIH0pXG4gIGhpZGUoKTogdm9pZCB7fVxufVxuIl19

      /***/

    },

    /***/
    "5B2Y":
    /*!*****************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduleObservable.js ***!
      \*****************************************************************************/

    /*! exports provided: scheduleObservable */

    /***/
    function B2Y(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "scheduleObservable", function () {
        return scheduleObservable;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Subscription */
      "quSY");
      /* harmony import */


      var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../symbol/observable */
      "kJWO");

      function scheduleObservable(input, scheduler) {
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
          sub.add(scheduler.schedule(function () {
            var observable = input[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]]();

            sub.add(observable.subscribe({
              next: function next(value) {
                sub.add(scheduler.schedule(function () {
                  return subscriber.next(value);
                }));
              },
              error: function error(err) {
                sub.add(scheduler.schedule(function () {
                  return subscriber.error(err);
                }));
              },
              complete: function complete() {
                sub.add(scheduler.schedule(function () {
                  return subscriber.complete();
                }));
              }
            }));
          }));
          return sub;
        });
      } //# sourceMappingURL=scheduleObservable.js.map

      /***/

    },

    /***/
    "5x/H":
    /*!***********************************************************!*\
      !*** ./node_modules/firebase/firestore/dist/index.esm.js ***!
      \***********************************************************/

    /*! no exports provided */

    /***/
    function xH(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _firebase_firestore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @firebase/firestore */
      "xo5E"); //# sourceMappingURL=index.esm.js.map

      /***/

    },

    /***/
    "5yfJ":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/never.js ***!
      \*****************************************************************/

    /*! exports provided: NEVER, never */

    /***/
    function yfJ(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NEVER", function () {
        return NEVER;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "never", function () {
        return never;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/noop */
      "KqfI");

      var NEVER = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](_util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]);

      function never() {
        return NEVER;
      } //# sourceMappingURL=never.js.map

      /***/

    },

    /***/
    "6PXS":
    /*!**************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/object.js ***!
      \**************************************************/

    /*! exports provided: fill, urlEncode, normalizeToSize, walk, normalize, extractExceptionKeysForMessage, dropUndefinedKeys, objectify */

    /***/
    function PXS(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "fill", function () {
        return fill;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "urlEncode", function () {
        return urlEncode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "normalizeToSize", function () {
        return normalizeToSize;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "walk", function () {
        return walk;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "normalize", function () {
        return normalize;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "extractExceptionKeysForMessage", function () {
        return extractExceptionKeysForMessage;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "dropUndefinedKeys", function () {
        return dropUndefinedKeys;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "objectify", function () {
        return objectify;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./browser */
      "vFt6");
      /* harmony import */


      var _is__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./is */
      "9AQC");
      /* harmony import */


      var _memo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./memo */
      "wCA9");
      /* harmony import */


      var _stacktrace__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./stacktrace */
      "pRiV");
      /* harmony import */


      var _string__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./string */
      "+924");
      /**
       * Replace a method in an object with a wrapped version of itself.
       *
       * @param source An object that contains a method to be wrapped.
       * @param name The name of the method to be wrapped.
       * @param replacementFactory A higher-order function that takes the original version of the given method and returns a
       * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to
       * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other
       * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.
       * @returns void
       */


      function fill(source, name, replacementFactory) {
        if (!(name in source)) {
          return;
        }

        var original = source[name];
        var wrapped = replacementFactory(original); // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work
        // otherwise it'll throw "TypeError: Object.defineProperties called on non-object"

        if (typeof wrapped === 'function') {
          try {
            wrapped.prototype = wrapped.prototype || {};
            Object.defineProperties(wrapped, {
              __sentry_original__: {
                enumerable: false,
                value: original
              }
            });
          } catch (_Oo) {// This can throw if multiple fill happens on a global object like XMLHttpRequest
            // Fixes https://github.com/getsentry/sentry-javascript/issues/2043
          }
        }

        source[name] = wrapped;
      }
      /**
       * Encodes given object into url-friendly format
       *
       * @param object An object that contains serializable values
       * @returns string Encoded
       */


      function urlEncode(object) {
        return Object.keys(object).map(function (key) {
          return encodeURIComponent(key) + "=" + encodeURIComponent(object[key]);
        }).join('&');
      }
      /**
       * Transforms any object into an object literal with all its attributes
       * attached to it.
       *
       * @param value Initial source that we have to transform in order for it to be usable by the serializer
       */


      function getWalkSource(value) {
        if (Object(_is__WEBPACK_IMPORTED_MODULE_2__["isError"])(value)) {
          var error = value;
          var err = {
            message: error.message,
            name: error.name,
            stack: error.stack
          };

          for (var i in error) {
            if (Object.prototype.hasOwnProperty.call(error, i)) {
              err[i] = error[i];
            }
          }

          return err;
        }

        if (Object(_is__WEBPACK_IMPORTED_MODULE_2__["isEvent"])(value)) {
          var event_1 = value;
          var source = {}; // Accessing event attributes can throw (see https://github.com/getsentry/sentry-javascript/issues/768 and
          // https://github.com/getsentry/sentry-javascript/issues/838), but accessing `type` hasn't been wrapped in a
          // try-catch in at least two years and no one's complained, so that's likely not an issue anymore

          source.type = event_1.type;

          try {
            source.target = Object(_is__WEBPACK_IMPORTED_MODULE_2__["isElement"])(event_1.target) ? Object(_browser__WEBPACK_IMPORTED_MODULE_1__["htmlTreeAsString"])(event_1.target) : Object.prototype.toString.call(event_1.target);
          } catch (_oO) {
            source.target = '<unknown>';
          }

          try {
            source.currentTarget = Object(_is__WEBPACK_IMPORTED_MODULE_2__["isElement"])(event_1.currentTarget) ? Object(_browser__WEBPACK_IMPORTED_MODULE_1__["htmlTreeAsString"])(event_1.currentTarget) : Object.prototype.toString.call(event_1.currentTarget);
          } catch (_oO) {
            source.currentTarget = '<unknown>';
          }

          if (typeof CustomEvent !== 'undefined' && Object(_is__WEBPACK_IMPORTED_MODULE_2__["isInstanceOf"])(value, CustomEvent)) {
            source.detail = event_1.detail;
          }

          for (var attr in event_1) {
            if (Object.prototype.hasOwnProperty.call(event_1, attr)) {
              source[attr] = event_1[attr];
            }
          }

          return source;
        }

        return value;
      }
      /** Calculates bytes size of input string */


      function utf8Length(value) {
        // eslint-disable-next-line no-bitwise
        return ~-encodeURI(value).split(/%..|./).length;
      }
      /** Calculates bytes size of input object */


      function jsonSize(value) {
        return utf8Length(JSON.stringify(value));
      }
      /** JSDoc */


      function normalizeToSize(object, // Default Node.js REPL depth
      depth, // 100kB, as 200kB is max payload size, so half sounds reasonable
      maxSize) {
        if (depth === void 0) {
          depth = 3;
        }

        if (maxSize === void 0) {
          maxSize = 100 * 1024;
        }

        var serialized = normalize(object, depth);

        if (jsonSize(serialized) > maxSize) {
          return normalizeToSize(object, depth - 1, maxSize);
        }

        return serialized;
      }
      /**
       * Transform any non-primitive, BigInt, or Symbol-type value into a string. Acts as a no-op on strings, numbers,
       * booleans, null, and undefined.
       *
       * @param value The value to stringify
       * @returns For non-primitive, BigInt, and Symbol-type values, a string denoting the value's type, type and value, or
       *  type and `description` property, respectively. For non-BigInt, non-Symbol primitives, returns the original value,
       *  unchanged.
       */


      function serializeValue(value) {
        var type = Object.prototype.toString.call(value); // Node.js REPL notation

        if (typeof value === 'string') {
          return value;
        }

        if (type === '[object Object]') {
          return '[Object]';
        }

        if (type === '[object Array]') {
          return '[Array]';
        }

        var normalized = normalizeValue(value);
        return Object(_is__WEBPACK_IMPORTED_MODULE_2__["isPrimitive"])(normalized) ? normalized : type;
      }
      /**
       * normalizeValue()
       *
       * Takes unserializable input and make it serializable friendly
       *
       * - translates undefined/NaN values to "[undefined]"/"[NaN]" respectively,
       * - serializes Error objects
       * - filter global objects
       */


      function normalizeValue(value, key) {
        if (key === 'domain' && value && typeof value === 'object' && value._events) {
          return '[Domain]';
        }

        if (key === 'domainEmitter') {
          return '[DomainEmitter]';
        }

        if (typeof global !== 'undefined' && value === global) {
          return '[Global]';
        } // It's safe to use `window` and `document` here in this manner, as we are asserting using `typeof` first
        // which won't throw if they are not present.
        // eslint-disable-next-line no-restricted-globals


        if (typeof window !== 'undefined' && value === window) {
          return '[Window]';
        } // eslint-disable-next-line no-restricted-globals


        if (typeof document !== 'undefined' && value === document) {
          return '[Document]';
        } // React's SyntheticEvent thingy


        if (Object(_is__WEBPACK_IMPORTED_MODULE_2__["isSyntheticEvent"])(value)) {
          return '[SyntheticEvent]';
        }

        if (typeof value === 'number' && value !== value) {
          return '[NaN]';
        }

        if (value === void 0) {
          return '[undefined]';
        }

        if (typeof value === 'function') {
          return "[Function: " + Object(_stacktrace__WEBPACK_IMPORTED_MODULE_4__["getFunctionName"])(value) + "]";
        } // symbols and bigints are considered primitives by TS, but aren't natively JSON-serilaizable


        if (typeof value === 'symbol') {
          return "[" + String(value) + "]";
        }

        if (typeof value === 'bigint') {
          return "[BigInt: " + String(value) + "]";
        }

        return value;
      }
      /**
       * Walks an object to perform a normalization on it
       *
       * @param key of object that's walked in current iteration
       * @param value object to be walked
       * @param depth Optional number indicating how deep should walking be performed
       * @param memo Optional Memo class handling decycling
       */
      // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types


      function walk(key, value, depth, memo) {
        if (depth === void 0) {
          depth = +Infinity;
        }

        if (memo === void 0) {
          memo = new _memo__WEBPACK_IMPORTED_MODULE_3__["Memo"]();
        } // If we reach the maximum depth, serialize whatever has left


        if (depth === 0) {
          return serializeValue(value);
        }
        /* eslint-disable @typescript-eslint/no-unsafe-member-access */
        // If value implements `toJSON` method, call it and return early


        if (value !== null && value !== undefined && typeof value.toJSON === 'function') {
          return value.toJSON();
        }
        /* eslint-enable @typescript-eslint/no-unsafe-member-access */
        // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further


        var normalized = normalizeValue(value, key);

        if (Object(_is__WEBPACK_IMPORTED_MODULE_2__["isPrimitive"])(normalized)) {
          return normalized;
        } // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself


        var source = getWalkSource(value); // Create an accumulator that will act as a parent for all future itterations of that branch

        var acc = Array.isArray(value) ? [] : {}; // If we already walked that branch, bail out, as it's circular reference

        if (memo.memoize(value)) {
          return '[Circular ~]';
        } // Walk all keys of the source


        for (var innerKey in source) {
          // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.
          if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {
            continue;
          } // Recursively walk through all the child nodes


          acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);
        } // Once walked through all the branches, remove the parent from memo storage


        memo.unmemoize(value); // Return accumulated values

        return acc;
      }
      /**
       * normalize()
       *
       * - Creates a copy to prevent original input mutation
       * - Skip non-enumerablers
       * - Calls `toJSON` if implemented
       * - Removes circular references
       * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format
       * - Translates known global objects/Classes to a string representations
       * - Takes care of Error objects serialization
       * - Optionally limit depth of final output
       */
      // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types


      function normalize(input, depth) {
        try {
          return JSON.parse(JSON.stringify(input, function (key, value) {
            return walk(key, value, depth);
          }));
        } catch (_oO) {
          return '**non-serializable**';
        }
      }
      /**
       * Given any captured exception, extract its keys and create a sorted
       * and truncated list that will be used inside the event message.
       * eg. `Non-error exception captured with keys: foo, bar, baz`
       */
      // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types


      function extractExceptionKeysForMessage(exception, maxLength) {
        if (maxLength === void 0) {
          maxLength = 40;
        }

        var keys = Object.keys(getWalkSource(exception));
        keys.sort();

        if (!keys.length) {
          return '[object has no keys]';
        }

        if (keys[0].length >= maxLength) {
          return Object(_string__WEBPACK_IMPORTED_MODULE_5__["truncate"])(keys[0], maxLength);
        }

        for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) {
          var serialized = keys.slice(0, includedKeys).join(', ');

          if (serialized.length > maxLength) {
            continue;
          }

          if (includedKeys === keys.length) {
            return serialized;
          }

          return Object(_string__WEBPACK_IMPORTED_MODULE_5__["truncate"])(serialized, maxLength);
        }

        return '';
      }
      /**
       * Given any object, return the new object with removed keys that value was `undefined`.
       * Works recursively on objects and arrays.
       */


      function dropUndefinedKeys(val) {
        var e_1, _a;

        if (Object(_is__WEBPACK_IMPORTED_MODULE_2__["isPlainObject"])(val)) {
          var obj = val;
          var rv = {};

          try {
            for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {
              var key = _c.value;

              if (typeof obj[key] !== 'undefined') {
                rv[key] = dropUndefinedKeys(obj[key]);
              }
            }
          } catch (e_1_1) {
            e_1 = {
              error: e_1_1
            };
          } finally {
            try {
              if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
            } finally {
              if (e_1) throw e_1.error;
            }
          }

          return rv;
        }

        if (Array.isArray(val)) {
          return val.map(dropUndefinedKeys);
        }

        return val;
      }
      /**
       * Ensure that something is an object.
       *
       * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper
       * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.
       *
       * @param wat The subject of the objectification
       * @returns A version of `wat` which can safely be used with `Object` class methods
       */


      function objectify(wat) {
        var objectified;

        switch (true) {
          case wat === undefined || wat === null:
            objectified = new String(wat);
            break;
          // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason
          // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as
          // an object in order to wrap it.

          case typeof wat === 'symbol' || typeof wat === 'bigint':
            objectified = Object(wat);
            break;
          // this will catch the remaining primitives: `String`, `Number`, and `Boolean`

          case Object(_is__WEBPACK_IMPORTED_MODULE_2__["isPrimitive"])(wat):
            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
            objectified = new wat.constructor(wat);
            break;
          // by process of elimination, at this point we know that `wat` must already be an object

          default:
            objectified = wat;
            break;
        }

        return objectified;
      } //# sourceMappingURL=object.js.map

      /***/

    },

    /***/
    "6eBy":
    /*!*******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/debounce.js ***!
      \*******************************************************************/

    /*! exports provided: debounce */

    /***/
    function eBy(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "debounce", function () {
        return debounce;
      });
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function debounce(durationSelector) {
        return function (source) {
          return source.lift(new DebounceOperator(durationSelector));
        };
      }

      var DebounceOperator = /*#__PURE__*/function () {
        function DebounceOperator(durationSelector) {
          _classCallCheck(this, DebounceOperator);

          this.durationSelector = durationSelector;
        }

        _createClass2(DebounceOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));
          }
        }]);

        return DebounceOperator;
      }();

      var DebounceSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP6) {
        _inherits(DebounceSubscriber, _innerSubscribe__WEBP6);

        var _super144 = _createSuper(DebounceSubscriber);

        function DebounceSubscriber(destination, durationSelector) {
          var _this365;

          _classCallCheck(this, DebounceSubscriber);

          _this365 = _super144.call(this, destination);
          _this365.durationSelector = durationSelector;
          _this365.hasValue = false;
          return _this365;
        }

        _createClass2(DebounceSubscriber, [{
          key: "_next",
          value: function _next(value) {
            try {
              var result = this.durationSelector.call(this, value);

              if (result) {
                this._tryNext(value, result);
              }
            } catch (err) {
              this.destination.error(err);
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.emitValue();
            this.destination.complete();
          }
        }, {
          key: "_tryNext",
          value: function _tryNext(value, duration) {
            var subscription = this.durationSubscription;
            this.value = value;
            this.hasValue = true;

            if (subscription) {
              subscription.unsubscribe();
              this.remove(subscription);
            }

            subscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(duration, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this));

            if (subscription && !subscription.closed) {
              this.add(this.durationSubscription = subscription);
            }
          }
        }, {
          key: "notifyNext",
          value: function notifyNext() {
            this.emitValue();
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            this.emitValue();
          }
        }, {
          key: "emitValue",
          value: function emitValue() {
            if (this.hasValue) {
              var value = this.value;
              var subscription = this.durationSubscription;

              if (subscription) {
                this.durationSubscription = undefined;
                subscription.unsubscribe();
                this.remove(subscription);
              }

              this.value = undefined;
              this.hasValue = false;

              _get(_getPrototypeOf(DebounceSubscriber.prototype), "_next", this).call(this, value);
            }
          }
        }]);

        return DebounceSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"]); //# sourceMappingURL=debounce.js.map

      /***/

    },

    /***/
    "6hSO":
    /*!******************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/instrument.js ***!
      \******************************************************/

    /*! exports provided: addInstrumentationHandler */

    /***/
    function hSO(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "addInstrumentationHandler", function () {
        return addInstrumentationHandler;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./global */
      "z+RT");
      /* harmony import */


      var _is__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./is */
      "9AQC");
      /* harmony import */


      var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./logger */
      "8LbN");
      /* harmony import */


      var _object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./object */
      "6PXS");
      /* harmony import */


      var _stacktrace__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./stacktrace */
      "pRiV");
      /* harmony import */


      var _supports__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ./supports */
      "4Ssk");

      var global = Object(_global__WEBPACK_IMPORTED_MODULE_1__["getGlobalObject"])();
      /**
       * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.
       *  - Console API
       *  - Fetch API
       *  - XHR API
       *  - History API
       *  - DOM API (click/typing)
       *  - Error API
       *  - UnhandledRejection API
       */

      var handlers = {};
      var instrumented = {};
      /** Instruments given API */

      function instrument(type) {
        if (instrumented[type]) {
          return;
        }

        instrumented[type] = true;

        switch (type) {
          case 'console':
            instrumentConsole();
            break;

          case 'dom':
            instrumentDOM();
            break;

          case 'xhr':
            instrumentXHR();
            break;

          case 'fetch':
            instrumentFetch();
            break;

          case 'history':
            instrumentHistory();
            break;

          case 'error':
            instrumentError();
            break;

          case 'unhandledrejection':
            instrumentUnhandledRejection();
            break;

          default:
            _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].warn('unknown instrumentation type:', type);

        }
      }
      /**
       * Add handler that will be called when given type of instrumentation triggers.
       * Use at your own risk, this might break without changelog notice, only used internally.
       * @hidden
       */


      function addInstrumentationHandler(handler) {
        if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {
          return;
        }

        handlers[handler.type] = handlers[handler.type] || [];
        handlers[handler.type].push(handler.callback);
        instrument(handler.type);
      }
      /** JSDoc */


      function triggerHandlers(type, data) {
        var e_1, _a;

        if (!type || !handlers[type]) {
          return;
        }

        try {
          for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) {
            var handler = _c.value;

            try {
              handler(data);
            } catch (e) {
              _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error("Error while triggering instrumentation handler.\nType: " + type + "\nName: " + Object(_stacktrace__WEBPACK_IMPORTED_MODULE_5__["getFunctionName"])(handler) + "\nError: " + e);
            }
          }
        } catch (e_1_1) {
          e_1 = {
            error: e_1_1
          };
        } finally {
          try {
            if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
          } finally {
            if (e_1) throw e_1.error;
          }
        }
      }
      /** JSDoc */


      function instrumentConsole() {
        if (!('console' in global)) {
          return;
        }

        ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function (level) {
          if (!(level in global.console)) {
            return;
          }

          Object(_object__WEBPACK_IMPORTED_MODULE_4__["fill"])(global.console, level, function (originalConsoleLevel) {
            return function () {
              var args = [];

              for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
              }

              triggerHandlers('console', {
                args: args,
                level: level
              }); // this fails for some browsers. :(

              if (originalConsoleLevel) {
                Function.prototype.apply.call(originalConsoleLevel, global.console, args);
              }
            };
          });
        });
      }
      /** JSDoc */


      function instrumentFetch() {
        if (!Object(_supports__WEBPACK_IMPORTED_MODULE_6__["supportsNativeFetch"])()) {
          return;
        }

        Object(_object__WEBPACK_IMPORTED_MODULE_4__["fill"])(global, 'fetch', function (originalFetch) {
          return function () {
            var args = [];

            for (var _i = 0; _i < arguments.length; _i++) {
              args[_i] = arguments[_i];
            }

            var handlerData = {
              args: args,
              fetchData: {
                method: getFetchMethod(args),
                url: getFetchUrl(args)
              },
              startTimestamp: Date.now()
            };
            triggerHandlers('fetch', Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, handlerData)); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access

            return originalFetch.apply(global, args).then(function (response) {
              triggerHandlers('fetch', Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, handlerData), {
                endTimestamp: Date.now(),
                response: response
              }));
              return response;
            }, function (error) {
              triggerHandlers('fetch', Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, handlerData), {
                endTimestamp: Date.now(),
                error: error
              })); // NOTE: If you are a Sentry user, and you are seeing this stack frame,
              //       it means the sentry.javascript SDK caught an error invoking your application code.
              //       This is expected behavior and NOT indicative of a bug with sentry.javascript.

              throw error;
            });
          };
        });
      }
      /* eslint-disable @typescript-eslint/no-unsafe-member-access */

      /** Extract `method` from fetch call arguments */


      function getFetchMethod(fetchArgs) {
        if (fetchArgs === void 0) {
          fetchArgs = [];
        }

        if ('Request' in global && Object(_is__WEBPACK_IMPORTED_MODULE_2__["isInstanceOf"])(fetchArgs[0], Request) && fetchArgs[0].method) {
          return String(fetchArgs[0].method).toUpperCase();
        }

        if (fetchArgs[1] && fetchArgs[1].method) {
          return String(fetchArgs[1].method).toUpperCase();
        }

        return 'GET';
      }
      /** Extract `url` from fetch call arguments */


      function getFetchUrl(fetchArgs) {
        if (fetchArgs === void 0) {
          fetchArgs = [];
        }

        if (typeof fetchArgs[0] === 'string') {
          return fetchArgs[0];
        }

        if ('Request' in global && Object(_is__WEBPACK_IMPORTED_MODULE_2__["isInstanceOf"])(fetchArgs[0], Request)) {
          return fetchArgs[0].url;
        }

        return String(fetchArgs[0]);
      }
      /* eslint-enable @typescript-eslint/no-unsafe-member-access */

      /** JSDoc */


      function instrumentXHR() {
        if (!('XMLHttpRequest' in global)) {
          return;
        } // Poor man's implementation of ES6 `Map`, tracking and keeping in sync key and value separately.


        var requestKeys = [];
        var requestValues = [];
        var xhrproto = XMLHttpRequest.prototype;
        Object(_object__WEBPACK_IMPORTED_MODULE_4__["fill"])(xhrproto, 'open', function (originalOpen) {
          return function () {
            var args = [];

            for (var _i = 0; _i < arguments.length; _i++) {
              args[_i] = arguments[_i];
            } // eslint-disable-next-line @typescript-eslint/no-this-alias


            var xhr = this;
            var url = args[1];
            xhr.__sentry_xhr__ = {
              // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
              method: Object(_is__WEBPACK_IMPORTED_MODULE_2__["isString"])(args[0]) ? args[0].toUpperCase() : args[0],
              url: args[1]
            }; // if Sentry key appears in URL, don't capture it as a request
            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access

            if (Object(_is__WEBPACK_IMPORTED_MODULE_2__["isString"])(url) && xhr.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {
              xhr.__sentry_own_request__ = true;
            }

            var onreadystatechangeHandler = function onreadystatechangeHandler() {
              if (xhr.readyState === 4) {
                try {
                  // touching statusCode in some platforms throws
                  // an exception
                  if (xhr.__sentry_xhr__) {
                    xhr.__sentry_xhr__.status_code = xhr.status;
                  }
                } catch (e) {
                  /* do nothing */
                }

                try {
                  var requestPos = requestKeys.indexOf(xhr);

                  if (requestPos !== -1) {
                    // Make sure to pop both key and value to keep it in sync.
                    requestKeys.splice(requestPos);
                    var args_1 = requestValues.splice(requestPos)[0];

                    if (xhr.__sentry_xhr__ && args_1[0] !== undefined) {
                      xhr.__sentry_xhr__.body = args_1[0];
                    }
                  }
                } catch (e) {
                  /* do nothing */
                }

                triggerHandlers('xhr', {
                  args: args,
                  endTimestamp: Date.now(),
                  startTimestamp: Date.now(),
                  xhr: xhr
                });
              }
            };

            if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {
              Object(_object__WEBPACK_IMPORTED_MODULE_4__["fill"])(xhr, 'onreadystatechange', function (original) {
                return function () {
                  var readyStateArgs = [];

                  for (var _i = 0; _i < arguments.length; _i++) {
                    readyStateArgs[_i] = arguments[_i];
                  }

                  onreadystatechangeHandler();
                  return original.apply(xhr, readyStateArgs);
                };
              });
            } else {
              xhr.addEventListener('readystatechange', onreadystatechangeHandler);
            }

            return originalOpen.apply(xhr, args);
          };
        });
        Object(_object__WEBPACK_IMPORTED_MODULE_4__["fill"])(xhrproto, 'send', function (originalSend) {
          return function () {
            var args = [];

            for (var _i = 0; _i < arguments.length; _i++) {
              args[_i] = arguments[_i];
            }

            requestKeys.push(this);
            requestValues.push(args);
            triggerHandlers('xhr', {
              args: args,
              startTimestamp: Date.now(),
              xhr: this
            });
            return originalSend.apply(this, args);
          };
        });
      }

      var lastHref;
      /** JSDoc */

      function instrumentHistory() {
        if (!Object(_supports__WEBPACK_IMPORTED_MODULE_6__["supportsHistory"])()) {
          return;
        }

        var oldOnPopState = global.onpopstate;

        global.onpopstate = function () {
          var args = [];

          for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
          }

          var to = global.location.href; // keep track of the current URL state, as we always receive only the updated state

          var from = lastHref;
          lastHref = to;
          triggerHandlers('history', {
            from: from,
            to: to
          });

          if (oldOnPopState) {
            // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.
            // https://github.com/getsentry/sentry-javascript/issues/3344
            // https://github.com/bugsnag/bugsnag-js/issues/469
            try {
              return oldOnPopState.apply(this, args);
            } catch (_oO) {// no-empty
            }
          }
        };
        /** @hidden */


        function historyReplacementFunction(originalHistoryFunction) {
          return function () {
            var args = [];

            for (var _i = 0; _i < arguments.length; _i++) {
              args[_i] = arguments[_i];
            }

            var url = args.length > 2 ? args[2] : undefined;

            if (url) {
              // coerce to string (this is what pushState does)
              var from = lastHref;
              var to = String(url); // keep track of the current URL state, as we always receive only the updated state

              lastHref = to;
              triggerHandlers('history', {
                from: from,
                to: to
              });
            }

            return originalHistoryFunction.apply(this, args);
          };
        }

        Object(_object__WEBPACK_IMPORTED_MODULE_4__["fill"])(global.history, 'pushState', historyReplacementFunction);
        Object(_object__WEBPACK_IMPORTED_MODULE_4__["fill"])(global.history, 'replaceState', historyReplacementFunction);
      }

      var debounceDuration = 1000;
      var debounceTimerID;
      var lastCapturedEvent;
      /**
       * Decide whether the current event should finish the debounce of previously captured one.
       * @param previous previously captured event
       * @param current event to be captured
       */

      function shouldShortcircuitPreviousDebounce(previous, current) {
        // If there was no previous event, it should always be swapped for the new one.
        if (!previous) {
          return true;
        } // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.


        if (previous.type !== current.type) {
          return true;
        }

        try {
          // If both events have the same type, it's still possible that actions were performed on different targets.
          // e.g. 2 clicks on different buttons.
          if (previous.target !== current.target) {
            return true;
          }
        } catch (e) {// just accessing `target` property can throw an exception in some rare circumstances
          // see: https://github.com/getsentry/sentry-javascript/issues/838
        } // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_
        // to which an event listener was attached), we treat them as the same action, as we want to capture
        // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.


        return false;
      }
      /**
       * Decide whether an event should be captured.
       * @param event event to be captured
       */


      function shouldSkipDOMEvent(event) {
        // We are only interested in filtering `keypress` events for now.
        if (event.type !== 'keypress') {
          return false;
        }

        try {
          var target = event.target;

          if (!target || !target.tagName) {
            return true;
          } // Only consider keypress events on actual input elements. This will disregard keypresses targeting body
          // e.g.tabbing through elements, hotkeys, etc.


          if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {
            return false;
          }
        } catch (e) {// just accessing `target` property can throw an exception in some rare circumstances
          // see: https://github.com/getsentry/sentry-javascript/issues/838
        }

        return true;
      }
      /**
       * Wraps addEventListener to capture UI breadcrumbs
       * @param handler function that will be triggered
       * @param globalListener indicates whether event was captured by the global event listener
       * @returns wrapped breadcrumb events handler
       * @hidden
       */


      function makeDOMEventHandler(handler, globalListener) {
        if (globalListener === void 0) {
          globalListener = false;
        }

        return function (event) {
          // It's possible this handler might trigger multiple times for the same
          // event (e.g. event propagation through node ancestors).
          // Ignore if we've already captured that event.
          if (!event || lastCapturedEvent === event) {
            return;
          } // We always want to skip _some_ events.


          if (shouldSkipDOMEvent(event)) {
            return;
          }

          var name = event.type === 'keypress' ? 'input' : event.type; // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.

          if (debounceTimerID === undefined) {
            handler({
              event: event,
              name: name,
              global: globalListener
            });
            lastCapturedEvent = event;
          } // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.
          // If that's the case, emit the previous event and store locally the newly-captured DOM event.
          else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {
            handler({
              event: event,
              name: name,
              global: globalListener
            });
            lastCapturedEvent = event;
          } // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.


          clearTimeout(debounceTimerID);
          debounceTimerID = global.setTimeout(function () {
            debounceTimerID = undefined;
          }, debounceDuration);
        };
      }
      /** JSDoc */


      function instrumentDOM() {
        if (!('document' in global)) {
          return;
        } // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom
        // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before
        // we instrument `addEventListener` so that we don't end up attaching this handler twice.


        var triggerDOMHandler = triggerHandlers.bind(null, 'dom');
        var globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);
        global.document.addEventListener('click', globalDOMEventHandler, false);
        global.document.addEventListener('keypress', globalDOMEventHandler, false); // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled
        // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That
        // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler
        // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still
        // guaranteed to fire at least once.)

        ['EventTarget', 'Node'].forEach(function (target) {
          // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
          var proto = global[target] && global[target].prototype; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins

          if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {
            return;
          }

          Object(_object__WEBPACK_IMPORTED_MODULE_4__["fill"])(proto, 'addEventListener', function (originalAddEventListener) {
            return function (type, listener, options) {
              if (type === 'click' || type == 'keypress') {
                try {
                  var el = this;
                  var handlers_1 = el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {};
                  var handlerForType = handlers_1[type] = handlers_1[type] || {
                    refCount: 0
                  };

                  if (!handlerForType.handler) {
                    var handler = makeDOMEventHandler(triggerDOMHandler);
                    handlerForType.handler = handler;
                    originalAddEventListener.call(this, type, handler, options);
                  }

                  handlerForType.refCount += 1;
                } catch (e) {// Accessing dom properties is always fragile.
                  // Also allows us to skip `addEventListenrs` calls with no proper `this` context.
                }
              }

              return originalAddEventListener.call(this, type, listener, options);
            };
          });
          Object(_object__WEBPACK_IMPORTED_MODULE_4__["fill"])(proto, 'removeEventListener', function (originalRemoveEventListener) {
            return function (type, listener, options) {
              if (type === 'click' || type == 'keypress') {
                try {
                  var el = this;
                  var handlers_2 = el.__sentry_instrumentation_handlers__ || {};
                  var handlerForType = handlers_2[type];

                  if (handlerForType) {
                    handlerForType.refCount -= 1; // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.

                    if (handlerForType.refCount <= 0) {
                      originalRemoveEventListener.call(this, type, handlerForType.handler, options);
                      handlerForType.handler = undefined;
                      delete handlers_2[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete
                    } // If there are no longer any custom handlers of any type on this element, cleanup everything.


                    if (Object.keys(handlers_2).length === 0) {
                      delete el.__sentry_instrumentation_handlers__;
                    }
                  }
                } catch (e) {// Accessing dom properties is always fragile.
                  // Also allows us to skip `addEventListenrs` calls with no proper `this` context.
                }
              }

              return originalRemoveEventListener.call(this, type, listener, options);
            };
          });
        });
      }

      var _oldOnErrorHandler = null;
      /** JSDoc */

      function instrumentError() {
        _oldOnErrorHandler = global.onerror;

        global.onerror = function (msg, url, line, column, error) {
          triggerHandlers('error', {
            column: column,
            error: error,
            line: line,
            msg: msg,
            url: url
          });

          if (_oldOnErrorHandler) {
            // eslint-disable-next-line prefer-rest-params
            return _oldOnErrorHandler.apply(this, arguments);
          }

          return false;
        };
      }

      var _oldOnUnhandledRejectionHandler = null;
      /** JSDoc */

      function instrumentUnhandledRejection() {
        _oldOnUnhandledRejectionHandler = global.onunhandledrejection;

        global.onunhandledrejection = function (e) {
          triggerHandlers('unhandledrejection', e);

          if (_oldOnUnhandledRejectionHandler) {
            // eslint-disable-next-line prefer-rest-params
            return _oldOnUnhandledRejectionHandler.apply(this, arguments);
          }

          return true;
        };
      } //# sourceMappingURL=instrument.js.map

      /***/

    },

    /***/
    "6mNm":
    /*!*****************************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/onHidden.js ***!
      \*****************************************************************************/

    /*! exports provided: onHidden */

    /***/
    function mNm(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "onHidden", function () {
        return onHidden;
      });
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /*
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *     https://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var onHidden = function onHidden(cb, once) {
        var onHiddenOrPageHide = function onHiddenOrPageHide(event) {
          if (event.type === 'pagehide' || Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getGlobalObject"])().document.visibilityState === 'hidden') {
            cb(event);

            if (once) {
              removeEventListener('visibilitychange', onHiddenOrPageHide, true);
              removeEventListener('pagehide', onHiddenOrPageHide, true);
            }
          }
        };

        addEventListener('visibilitychange', onHiddenOrPageHide, true); // Some browsers have buggy implementations of visibilitychange,
        // so we use pagehide in addition, just to be safe.

        addEventListener('pagehide', onHiddenOrPageHide, true);
      }; //# sourceMappingURL=onHidden.js.map

      /***/

    },

    /***/
    "7+OI":
    /*!******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/isObservable.js ***!
      \******************************************************************/

    /*! exports provided: isObservable */

    /***/
    function OI(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isObservable", function () {
        return isObservable;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");

      function isObservable(obj) {
        return !!obj && (obj instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] || typeof obj.lift === 'function' && typeof obj.subscribe === 'function');
      } //# sourceMappingURL=isObservable.js.map

      /***/

    },

    /***/
    "7HRe":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduled.js ***!
      \********************************************************************/

    /*! exports provided: scheduled */

    /***/
    function HRe(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "scheduled", function () {
        return scheduled;
      });
      /* harmony import */


      var _scheduleObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./scheduleObservable */
      "5B2Y");
      /* harmony import */


      var _schedulePromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./schedulePromise */
      "4yVj");
      /* harmony import */


      var _scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./scheduleArray */
      "jZKg");
      /* harmony import */


      var _scheduleIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./scheduleIterable */
      "MBAA");
      /* harmony import */


      var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ../util/isInteropObservable */
      "QIAL");
      /* harmony import */


      var _util_isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ../util/isPromise */
      "c2HN");
      /* harmony import */


      var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ../util/isArrayLike */
      "I55L");
      /* harmony import */


      var _util_isIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! ../util/isIterable */
      "CMyj");

      function scheduled(input, scheduler) {
        if (input != null) {
          if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__["isInteropObservable"])(input)) {
            return Object(_scheduleObservable__WEBPACK_IMPORTED_MODULE_0__["scheduleObservable"])(input, scheduler);
          } else if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(input)) {
            return Object(_schedulePromise__WEBPACK_IMPORTED_MODULE_1__["schedulePromise"])(input, scheduler);
          } else if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__["isArrayLike"])(input)) {
            return Object(_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
          } else if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_7__["isIterable"])(input) || typeof input === 'string') {
            return Object(_scheduleIterable__WEBPACK_IMPORTED_MODULE_3__["scheduleIterable"])(input, scheduler);
          }
        }

        throw new TypeError((input !== null && typeof input || input) + ' is not observable');
      } //# sourceMappingURL=scheduled.js.map

      /***/

    },

    /***/
    "7Hc7":
    /*!***************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduler/asap.js ***!
      \***************************************************************/

    /*! exports provided: asapScheduler, asap */

    /***/
    function Hc7(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "asapScheduler", function () {
        return asapScheduler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "asap", function () {
        return asap;
      });
      /* harmony import */


      var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./AsapAction */
      "Pz8W");
      /* harmony import */


      var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./AsapScheduler */
      "RUbi");

      var asapScheduler = new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapScheduler"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__["AsapAction"]);
      var asap = asapScheduler; //# sourceMappingURL=asap.js.map

      /***/
    },

    /***/
    "7o/Q":
    /*!***********************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/Subscriber.js ***!
      \***********************************************************/

    /*! exports provided: Subscriber, SafeSubscriber */

    /***/
    function oQ(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Subscriber", function () {
        return Subscriber;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SafeSubscriber", function () {
        return SafeSubscriber;
      });
      /* harmony import */


      var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./util/isFunction */
      "n6bG");
      /* harmony import */


      var _Observer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./Observer */
      "gRHU");
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./Subscription */
      "quSY");
      /* harmony import */


      var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../internal/symbol/rxSubscriber */
      "2QA8");
      /* harmony import */


      var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./config */
      "2fFW");
      /* harmony import */


      var _util_hostReportError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./util/hostReportError */
      "NJ4a");

      var Subscriber = /*#__PURE__*/function (_Subscription__WEBPAC, _internal_symbol_rxSu) {
        _inherits(Subscriber, _Subscription__WEBPAC);

        var _super145 = _createSuper(Subscriber);

        function Subscriber(destinationOrNext, error, complete) {
          var _this366;

          _classCallCheck(this, Subscriber);

          _this366 = _super145.call(this);
          _this366.syncErrorValue = null;
          _this366.syncErrorThrown = false;
          _this366.syncErrorThrowable = false;
          _this366.isStopped = false;

          switch (arguments.length) {
            case 0:
              _this366.destination = _Observer__WEBPACK_IMPORTED_MODULE_1__["empty"];
              break;

            case 1:
              if (!destinationOrNext) {
                _this366.destination = _Observer__WEBPACK_IMPORTED_MODULE_1__["empty"];
                break;
              }

              if (typeof destinationOrNext === 'object') {
                if (destinationOrNext instanceof Subscriber) {
                  _this366.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
                  _this366.destination = destinationOrNext;
                  destinationOrNext.add(_assertThisInitialized(_this366));
                } else {
                  _this366.syncErrorThrowable = true;
                  _this366.destination = new SafeSubscriber(_assertThisInitialized(_this366), destinationOrNext);
                }

                break;
              }

            default:
              _this366.syncErrorThrowable = true;
              _this366.destination = new SafeSubscriber(_assertThisInitialized(_this366), destinationOrNext, error, complete);
              break;
          }

          return _this366;
        }

        _createClass2(Subscriber, [{
          key: _internal_symbol_rxSu,
          value: function value() {
            return this;
          }
        }, {
          key: "next",
          value: function next(value) {
            if (!this.isStopped) {
              this._next(value);
            }
          }
        }, {
          key: "error",
          value: function error(err) {
            if (!this.isStopped) {
              this.isStopped = true;

              this._error(err);
            }
          }
        }, {
          key: "complete",
          value: function complete() {
            if (!this.isStopped) {
              this.isStopped = true;

              this._complete();
            }
          }
        }, {
          key: "unsubscribe",
          value: function unsubscribe() {
            if (this.closed) {
              return;
            }

            this.isStopped = true;

            _get(_getPrototypeOf(Subscriber.prototype), "unsubscribe", this).call(this);
          }
        }, {
          key: "_next",
          value: function _next(value) {
            this.destination.next(value);
          }
        }, {
          key: "_error",
          value: function _error(err) {
            this.destination.error(err);
            this.unsubscribe();
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.destination.complete();
            this.unsubscribe();
          }
        }, {
          key: "_unsubscribeAndRecycle",
          value: function _unsubscribeAndRecycle() {
            var _parentOrParents = this._parentOrParents;
            this._parentOrParents = null;
            this.unsubscribe();
            this.closed = false;
            this.isStopped = false;
            this._parentOrParents = _parentOrParents;
            return this;
          }
        }], [{
          key: "create",
          value: function create(next, error, complete) {
            var subscriber = new Subscriber(next, error, complete);
            subscriber.syncErrorThrowable = false;
            return subscriber;
          }
        }]);

        return Subscriber;
      }(_Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"], _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_3__["rxSubscriber"]);

      var SafeSubscriber = /*#__PURE__*/function (_Subscriber) {
        _inherits(SafeSubscriber, _Subscriber);

        var _super146 = _createSuper(SafeSubscriber);

        function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
          var _this367;

          _classCallCheck(this, SafeSubscriber);

          _this367 = _super146.call(this);
          _this367._parentSubscriber = _parentSubscriber;
          var next;

          var context = _assertThisInitialized(_this367);

          if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(observerOrNext)) {
            next = observerOrNext;
          } else if (observerOrNext) {
            next = observerOrNext.next;
            error = observerOrNext.error;
            complete = observerOrNext.complete;

            if (observerOrNext !== _Observer__WEBPACK_IMPORTED_MODULE_1__["empty"]) {
              context = Object.create(observerOrNext);

              if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(context.unsubscribe)) {
                _this367.add(context.unsubscribe.bind(context));
              }

              context.unsubscribe = _this367.unsubscribe.bind(_assertThisInitialized(_this367));
            }
          }

          _this367._context = context;
          _this367._next = next;
          _this367._error = error;
          _this367._complete = complete;
          return _this367;
        }

        _createClass2(SafeSubscriber, [{
          key: "next",
          value: function next(value) {
            if (!this.isStopped && this._next) {
              var _parentSubscriber = this._parentSubscriber;

              if (!_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
                this.__tryOrUnsub(this._next, value);
              } else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
                this.unsubscribe();
              }
            }
          }
        }, {
          key: "error",
          value: function error(err) {
            if (!this.isStopped) {
              var _parentSubscriber = this._parentSubscriber;
              var useDeprecatedSynchronousErrorHandling = _config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling;

              if (this._error) {
                if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
                  this.__tryOrUnsub(this._error, err);

                  this.unsubscribe();
                } else {
                  this.__tryOrSetError(_parentSubscriber, this._error, err);

                  this.unsubscribe();
                }
              } else if (!_parentSubscriber.syncErrorThrowable) {
                this.unsubscribe();

                if (useDeprecatedSynchronousErrorHandling) {
                  throw err;
                }

                Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err);
              } else {
                if (useDeprecatedSynchronousErrorHandling) {
                  _parentSubscriber.syncErrorValue = err;
                  _parentSubscriber.syncErrorThrown = true;
                } else {
                  Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err);
                }

                this.unsubscribe();
              }
            }
          }
        }, {
          key: "complete",
          value: function complete() {
            var _this368 = this;

            if (!this.isStopped) {
              var _parentSubscriber = this._parentSubscriber;

              if (this._complete) {
                var wrappedComplete = function wrappedComplete() {
                  return _this368._complete.call(_this368._context);
                };

                if (!_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
                  this.__tryOrUnsub(wrappedComplete);

                  this.unsubscribe();
                } else {
                  this.__tryOrSetError(_parentSubscriber, wrappedComplete);

                  this.unsubscribe();
                }
              } else {
                this.unsubscribe();
              }
            }
          }
        }, {
          key: "__tryOrUnsub",
          value: function __tryOrUnsub(fn, value) {
            try {
              fn.call(this._context, value);
            } catch (err) {
              this.unsubscribe();

              if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
                throw err;
              } else {
                Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err);
              }
            }
          }
        }, {
          key: "__tryOrSetError",
          value: function __tryOrSetError(parent, fn, value) {
            if (!_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
              throw new Error('bad call');
            }

            try {
              fn.call(this._context, value);
            } catch (err) {
              if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
                parent.syncErrorValue = err;
                parent.syncErrorThrown = true;
                return true;
              } else {
                Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err);
                return true;
              }
            }

            return false;
          }
        }, {
          key: "_unsubscribe",
          value: function _unsubscribe() {
            var _parentSubscriber = this._parentSubscriber;
            this._context = null;
            this._parentSubscriber = null;

            _parentSubscriber.unsubscribe();
          }
        }]);

        return SafeSubscriber;
      }(Subscriber); //# sourceMappingURL=Subscriber.js.map

      /***/

    },

    /***/
    "7ve7":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduler/Action.js ***!
      \*****************************************************************/

    /*! exports provided: Action */

    /***/
    function ve7(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Action", function () {
        return Action;
      });
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscription */
      "quSY");

      var Action = /*#__PURE__*/function (_Subscription__WEBPAC2) {
        _inherits(Action, _Subscription__WEBPAC2);

        var _super147 = _createSuper(Action);

        function Action(scheduler, work) {
          _classCallCheck(this, Action);

          return _super147.call(this);
        }

        _createClass2(Action, [{
          key: "schedule",
          value: function schedule(state) {
            var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
            return this;
          }
        }]);

        return Action;
      }(_Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"]); //# sourceMappingURL=Action.js.map

      /***/

    },

    /***/
    "7wxJ":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/combineAll.js ***!
      \*********************************************************************/

    /*! exports provided: combineAll */

    /***/
    function wxJ(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "combineAll", function () {
        return combineAll;
      });
      /* harmony import */


      var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../observable/combineLatest */
      "itXk");

      function combineAll(project) {
        return function (source) {
          return source.lift(new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__["CombineLatestOperator"](project));
        };
      } //# sourceMappingURL=combineAll.js.map

      /***/

    },

    /***/
    "8LbN":
    /*!**************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/logger.js ***!
      \**************************************************/

    /*! exports provided: consoleSandbox, logger */

    /***/
    function LbN(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "consoleSandbox", function () {
        return consoleSandbox;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "logger", function () {
        return logger;
      });
      /* harmony import */


      var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./global */
      "z+RT"); // TODO: Implement different loggers for different environments


      var global = Object(_global__WEBPACK_IMPORTED_MODULE_0__["getGlobalObject"])();
      /** Prefix for logging strings */

      var PREFIX = 'Sentry Logger ';
      /**
       * Temporarily unwrap `console.log` and friends in order to perform the given callback using the original methods.
       * Restores wrapping after the callback completes.
       *
       * @param callback The function to run against the original `console` messages
       * @returns The results of the callback
       */

      function consoleSandbox(callback) {
        var global = Object(_global__WEBPACK_IMPORTED_MODULE_0__["getGlobalObject"])();
        var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];

        if (!('console' in global)) {
          return callback();
        } // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access


        var originalConsole = global.console;
        var wrappedLevels = {}; // Restore all wrapped console methods

        levels.forEach(function (level) {
          // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
          if (level in global.console && originalConsole[level].__sentry_original__) {
            wrappedLevels[level] = originalConsole[level];
            originalConsole[level] = originalConsole[level].__sentry_original__;
          }
        }); // Perform callback manipulations

        var result = callback(); // Revert restoration to wrapped state

        Object.keys(wrappedLevels).forEach(function (level) {
          originalConsole[level] = wrappedLevels[level];
        });
        return result;
      }
      /** JSDoc */


      var Logger =
      /** @class */
      function () {
        /** JSDoc */
        function Logger() {
          this._enabled = false;
        }
        /** JSDoc */


        Logger.prototype.disable = function () {
          this._enabled = false;
        };
        /** JSDoc */


        Logger.prototype.enable = function () {
          this._enabled = true;
        };
        /** JSDoc */


        Logger.prototype.log = function () {
          var args = [];

          for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
          }

          if (!this._enabled) {
            return;
          }

          consoleSandbox(function () {
            global.console.log(PREFIX + "[Log]: " + args.join(' '));
          });
        };
        /** JSDoc */


        Logger.prototype.warn = function () {
          var args = [];

          for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
          }

          if (!this._enabled) {
            return;
          }

          consoleSandbox(function () {
            global.console.warn(PREFIX + "[Warn]: " + args.join(' '));
          });
        };
        /** JSDoc */


        Logger.prototype.error = function () {
          var args = [];

          for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
          }

          if (!this._enabled) {
            return;
          }

          consoleSandbox(function () {
            global.console.error(PREFIX + "[Error]: " + args.join(' '));
          });
        };

        return Logger;
      }(); // Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used


      global.__SENTRY__ = global.__SENTRY__ || {};
      var logger = global.__SENTRY__.logger || (global.__SENTRY__.logger = new Logger()); //# sourceMappingURL=logger.js.map

      /***/
    },

    /***/
    "8Qeq":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/canReportError.js ***!
      \********************************************************************/

    /*! exports provided: canReportError */

    /***/
    function Qeq(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "canReportError", function () {
        return canReportError;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function canReportError(observer) {
        while (observer) {
          var _observer = observer,
              closed = _observer.closed,
              destination = _observer.destination,
              isStopped = _observer.isStopped;

          if (closed || isStopped) {
            return false;
          } else if (destination && destination instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
            observer = destination;
          } else {
            observer = null;
          }
        }

        return true;
      } //# sourceMappingURL=canReportError.js.map

      /***/

    },

    /***/
    "8w4p":
    /*!**********************************************************!*\
      !*** ./node_modules/@sentry/angular/esm/errorhandler.js ***!
      \**********************************************************/

    /*! exports provided: createErrorHandler, SentryErrorHandler */

    /***/
    function w4p(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "createErrorHandler", function () {
        return createErrorHandler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SentryErrorHandler", function () {
        return SentryErrorHandler;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/common/http */
      "tk/3");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _sentry_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @sentry/browser */
      "WSEr");
      /* harmony import */


      var _zone__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./zone */
      "M62x");
      /**
       * Implementation of Angular's ErrorHandler provider that can be used as a drop-in replacement for the stock one.
       */


      var SentryErrorHandler =
      /** @class */
      function () {
        function SentryErrorHandler(options) {
          this._options = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
            logErrors: true
          }, options);
        }
        /**
         * Method called for every value captured through the ErrorHandler
         */


        SentryErrorHandler.prototype.handleError = function (error) {
          var extractedError = this._extractError(error) || 'Handled unknown error'; // Capture handled exception and send it to Sentry.

          var eventId = Object(_zone__WEBPACK_IMPORTED_MODULE_4__["runOutsideAngular"])(function () {
            return _sentry_browser__WEBPACK_IMPORTED_MODULE_3__["captureException"](extractedError);
          }); // When in development mode, log the error to console for immediate feedback.

          if (this._options.logErrors) {
            // eslint-disable-next-line no-console
            console.error(extractedError);
          } // Optionally show user dialog to provide details on what happened.


          if (this._options.showDialog) {
            _sentry_browser__WEBPACK_IMPORTED_MODULE_3__["showReportDialog"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._options.dialogOptions), {
              eventId: eventId
            }));
          }
        };
        /**
         * Used to pull a desired value that will be used to capture an event out of the raw value captured by ErrorHandler.
         */


        SentryErrorHandler.prototype._extractError = function (error) {
          // Allow custom overrides of extracting function
          if (this._options.extractor) {
            var defaultExtractor = this._defaultExtractor.bind(this);

            return this._options.extractor(error, defaultExtractor);
          }

          return this._defaultExtractor(error);
        };
        /**
         * Default implementation of error extraction that handles default error wrapping, HTTP responses, ErrorEvent and few other known cases.
         */


        SentryErrorHandler.prototype._defaultExtractor = function (errorCandidate) {
          var error = errorCandidate; // Try to unwrap zone.js error.
          // https://github.com/angular/angular/blob/master/packages/core/src/util/errors.ts

          if (error && error.ngOriginalError) {
            error = error.ngOriginalError;
          } // We can handle messages and Error objects directly.


          if (typeof error === 'string' || error instanceof Error) {
            return error;
          } // If it's http module error, extract as much information from it as we can.


          if (error instanceof _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpErrorResponse"]) {
            // The `error` property of http exception can be either an `Error` object, which we can use directly...
            if (error.error instanceof Error) {
              return error.error;
            } // ... or an`ErrorEvent`, which can provide us with the message but no stack...


            if (error.error instanceof ErrorEvent && error.error.message) {
              return error.error.message;
            } // ...or the request body itself, which we can use as a message instead.


            if (typeof error.error === 'string') {
              return "Server returned code " + error.status + " with body \"" + error.error + "\"";
            } // If we don't have any detailed information, fallback to the request message itself.


            return error.message;
          } // Nothing was extracted, fallback to default error message.


          return null;
        };

        SentryErrorHandler = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])({
          providedIn: 'root'
        })], SentryErrorHandler);
        return SentryErrorHandler;
      }();
      /**
       * Factory function that creates an instance of a preconfigured ErrorHandler provider.
       */


      function createErrorHandler(config) {
        return new SentryErrorHandler(config);
      } //# sourceMappingURL=errorhandler.js.map

      /***/

    },

    /***/
    "9/Zf":
    /*!************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/misc.js ***!
      \************************************************/

    /*! exports provided: uuid4, parseUrl, getEventDescription, addExceptionTypeValue, addExceptionMechanism, parseSemver, parseRetryAfterHeader, addContextToFrame, stripUrlQueryAndFragment, checkOrSetAlreadyCaught */

    /***/
    function Zf(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "uuid4", function () {
        return uuid4;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "parseUrl", function () {
        return parseUrl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getEventDescription", function () {
        return getEventDescription;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "addExceptionTypeValue", function () {
        return addExceptionTypeValue;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "addExceptionMechanism", function () {
        return addExceptionMechanism;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "parseSemver", function () {
        return parseSemver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "parseRetryAfterHeader", function () {
        return parseRetryAfterHeader;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "addContextToFrame", function () {
        return addContextToFrame;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "stripUrlQueryAndFragment", function () {
        return stripUrlQueryAndFragment;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "checkOrSetAlreadyCaught", function () {
        return checkOrSetAlreadyCaught;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./global */
      "z+RT");
      /* harmony import */


      var _string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./string */
      "+924");
      /**
       * UUID4 generator
       *
       * @returns string Generated UUID4.
       */


      function uuid4() {
        var global = Object(_global__WEBPACK_IMPORTED_MODULE_1__["getGlobalObject"])();
        var crypto = global.crypto || global.msCrypto;

        if (!(crypto === void 0) && crypto.getRandomValues) {
          // Use window.crypto API if available
          var arr = new Uint16Array(8);
          crypto.getRandomValues(arr); // set 4 in byte 7
          // eslint-disable-next-line no-bitwise

          arr[3] = arr[3] & 0xfff | 0x4000; // set 2 most significant bits of byte 9 to '10'
          // eslint-disable-next-line no-bitwise

          arr[4] = arr[4] & 0x3fff | 0x8000;

          var pad = function pad(num) {
            var v = num.toString(16);

            while (v.length < 4) {
              v = "0" + v;
            }

            return v;
          };

          return pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7]);
        } // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523


        return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
          // eslint-disable-next-line no-bitwise
          var r = Math.random() * 16 | 0; // eslint-disable-next-line no-bitwise

          var v = c === 'x' ? r : r & 0x3 | 0x8;
          return v.toString(16);
        });
      }
      /**
       * Parses string form of URL into an object
       * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
       * // intentionally using regex and not <a/> href parsing trick because React Native and other
       * // environments where DOM might not be available
       * @returns parsed URL object
       */


      function parseUrl(url) {
        if (!url) {
          return {};
        }

        var match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);

        if (!match) {
          return {};
        } // coerce to undefined values to empty string so we don't get 'undefined'


        var query = match[6] || '';
        var fragment = match[8] || '';
        return {
          host: match[4],
          path: match[5],
          protocol: match[2],
          relative: match[5] + query + fragment
        };
      }
      /**
       * Extracts either message or type+value from an event that can be used for user-facing logs
       * @returns event's description
       */


      function getEventDescription(event) {
        if (event.message) {
          return event.message;
        }

        if (event.exception && event.exception.values && event.exception.values[0]) {
          var exception = event.exception.values[0];

          if (exception.type && exception.value) {
            return exception.type + ": " + exception.value;
          }

          return exception.type || exception.value || event.event_id || '<unknown>';
        }

        return event.event_id || '<unknown>';
      }
      /**
       * Adds exception values, type and value to an synthetic Exception.
       * @param event The event to modify.
       * @param value Value of the exception.
       * @param type Type of the exception.
       * @hidden
       */


      function addExceptionTypeValue(event, value, type) {
        event.exception = event.exception || {};
        event.exception.values = event.exception.values || [];
        event.exception.values[0] = event.exception.values[0] || {};
        event.exception.values[0].value = event.exception.values[0].value || value || '';
        event.exception.values[0].type = event.exception.values[0].type || type || 'Error';
      }
      /**
       * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.
       *
       * @param event The event to modify.
       * @param newMechanism Mechanism data to add to the event.
       * @hidden
       */


      function addExceptionMechanism(event, newMechanism) {
        var _a;

        if (!event.exception || !event.exception.values) {
          return;
        }

        var exceptionValue0 = event.exception.values[0];
        var defaultMechanism = {
          type: 'generic',
          handled: true
        };
        var currentMechanism = exceptionValue0.mechanism;
        exceptionValue0.mechanism = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, defaultMechanism), currentMechanism), newMechanism);

        if (newMechanism && 'data' in newMechanism) {
          var mergedData = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, (_a = currentMechanism) === null || _a === void 0 ? void 0 : _a.data), newMechanism.data);
          exceptionValue0.mechanism.data = mergedData;
        }
      } // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string


      var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
      /**
       * Parses input into a SemVer interface
       * @param input string representation of a semver version
       */

      function parseSemver(input) {
        var match = input.match(SEMVER_REGEXP) || [];
        var major = parseInt(match[1], 10);
        var minor = parseInt(match[2], 10);
        var patch = parseInt(match[3], 10);
        return {
          buildmetadata: match[5],
          major: isNaN(major) ? undefined : major,
          minor: isNaN(minor) ? undefined : minor,
          patch: isNaN(patch) ? undefined : patch,
          prerelease: match[4]
        };
      }

      var defaultRetryAfter = 60 * 1000; // 60 seconds

      /**
       * Extracts Retry-After value from the request header or returns default value
       * @param now current unix timestamp
       * @param header string representation of 'Retry-After' header
       */

      function parseRetryAfterHeader(now, header) {
        if (!header) {
          return defaultRetryAfter;
        }

        var headerDelay = parseInt("" + header, 10);

        if (!isNaN(headerDelay)) {
          return headerDelay * 1000;
        }

        var headerDate = Date.parse("" + header);

        if (!isNaN(headerDate)) {
          return headerDate - now;
        }

        return defaultRetryAfter;
      }
      /**
       * This function adds context (pre/post/line) lines to the provided frame
       *
       * @param lines string[] containing all lines
       * @param frame StackFrame that will be mutated
       * @param linesOfContext number of context lines we want to add pre/post
       */


      function addContextToFrame(lines, frame, linesOfContext) {
        if (linesOfContext === void 0) {
          linesOfContext = 5;
        }

        var lineno = frame.lineno || 0;
        var maxLines = lines.length;
        var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);
        frame.pre_context = lines.slice(Math.max(0, sourceLine - linesOfContext), sourceLine).map(function (line) {
          return Object(_string__WEBPACK_IMPORTED_MODULE_2__["snipLine"])(line, 0);
        });
        frame.context_line = Object(_string__WEBPACK_IMPORTED_MODULE_2__["snipLine"])(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);
        frame.post_context = lines.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext).map(function (line) {
          return Object(_string__WEBPACK_IMPORTED_MODULE_2__["snipLine"])(line, 0);
        });
      }
      /**
       * Strip the query string and fragment off of a given URL or path (if present)
       *
       * @param urlPath Full URL or path, including possible query string and/or fragment
       * @returns URL or path without query string or fragment
       */


      function stripUrlQueryAndFragment(urlPath) {
        // eslint-disable-next-line no-useless-escape
        return urlPath.split(/[\?#]/, 1)[0];
      }
      /**
       * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object
       * in question), and marks it captured if not.
       *
       * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and
       * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so
       * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because
       * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not
       * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This
       * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we
       * see it.
       *
       * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on
       * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent
       * object wrapper forms so that this check will always work. However, because we need to flag the exact object which
       * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification
       * must be done before the exception captured.
       *
       * @param A thrown exception to check or flag as having been seen
       * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)
       */


      function checkOrSetAlreadyCaught(exception) {
        var _a; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access


        if ((_a = exception) === null || _a === void 0 ? void 0 : _a.__sentry_captured__) {
          return true;
        }

        try {
          // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the
          // `ExtraErrorData` integration
          Object.defineProperty(exception, '__sentry_captured__', {
            value: true
          });
        } catch (err) {// `exception` is a primitive, so we can't mark it seen
        }

        return false;
      } //# sourceMappingURL=misc.js.map

      /***/

    },

    /***/
    "9AQC":
    /*!**********************************************!*\
      !*** ./node_modules/@sentry/utils/esm/is.js ***!
      \**********************************************/

    /*! exports provided: isError, isErrorEvent, isDOMError, isDOMException, isString, isPrimitive, isPlainObject, isEvent, isElement, isRegExp, isThenable, isSyntheticEvent, isInstanceOf */

    /***/
    function AQC(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isError", function () {
        return isError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isErrorEvent", function () {
        return isErrorEvent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isDOMError", function () {
        return isDOMError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isDOMException", function () {
        return isDOMException;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isString", function () {
        return isString;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isPrimitive", function () {
        return isPrimitive;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isPlainObject", function () {
        return isPlainObject;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isEvent", function () {
        return isEvent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isElement", function () {
        return isElement;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isRegExp", function () {
        return isRegExp;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isThenable", function () {
        return isThenable;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isSyntheticEvent", function () {
        return isSyntheticEvent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isInstanceOf", function () {
        return isInstanceOf;
      });
      /* eslint-disable @typescript-eslint/no-explicit-any */

      /* eslint-disable @typescript-eslint/explicit-module-boundary-types */

      /**
       * Checks whether given value's type is one of a few Error or Error-like
       * {@link isError}.
       *
       * @param wat A value to be checked.
       * @returns A boolean representing the result.
       */


      function isError(wat) {
        switch (Object.prototype.toString.call(wat)) {
          case '[object Error]':
            return true;

          case '[object Exception]':
            return true;

          case '[object DOMException]':
            return true;

          default:
            return isInstanceOf(wat, Error);
        }
      }
      /**
       * Checks whether given value's type is ErrorEvent
       * {@link isErrorEvent}.
       *
       * @param wat A value to be checked.
       * @returns A boolean representing the result.
       */


      function isErrorEvent(wat) {
        return Object.prototype.toString.call(wat) === '[object ErrorEvent]';
      }
      /**
       * Checks whether given value's type is DOMError
       * {@link isDOMError}.
       *
       * @param wat A value to be checked.
       * @returns A boolean representing the result.
       */


      function isDOMError(wat) {
        return Object.prototype.toString.call(wat) === '[object DOMError]';
      }
      /**
       * Checks whether given value's type is DOMException
       * {@link isDOMException}.
       *
       * @param wat A value to be checked.
       * @returns A boolean representing the result.
       */


      function isDOMException(wat) {
        return Object.prototype.toString.call(wat) === '[object DOMException]';
      }
      /**
       * Checks whether given value's type is a string
       * {@link isString}.
       *
       * @param wat A value to be checked.
       * @returns A boolean representing the result.
       */


      function isString(wat) {
        return Object.prototype.toString.call(wat) === '[object String]';
      }
      /**
       * Checks whether given value's is a primitive (undefined, null, number, boolean, string, bigint, symbol)
       * {@link isPrimitive}.
       *
       * @param wat A value to be checked.
       * @returns A boolean representing the result.
       */


      function isPrimitive(wat) {
        return wat === null || typeof wat !== 'object' && typeof wat !== 'function';
      }
      /**
       * Checks whether given value's type is an object literal
       * {@link isPlainObject}.
       *
       * @param wat A value to be checked.
       * @returns A boolean representing the result.
       */


      function isPlainObject(wat) {
        return Object.prototype.toString.call(wat) === '[object Object]';
      }
      /**
       * Checks whether given value's type is an Event instance
       * {@link isEvent}.
       *
       * @param wat A value to be checked.
       * @returns A boolean representing the result.
       */


      function isEvent(wat) {
        return typeof Event !== 'undefined' && isInstanceOf(wat, Event);
      }
      /**
       * Checks whether given value's type is an Element instance
       * {@link isElement}.
       *
       * @param wat A value to be checked.
       * @returns A boolean representing the result.
       */


      function isElement(wat) {
        return typeof Element !== 'undefined' && isInstanceOf(wat, Element);
      }
      /**
       * Checks whether given value's type is an regexp
       * {@link isRegExp}.
       *
       * @param wat A value to be checked.
       * @returns A boolean representing the result.
       */


      function isRegExp(wat) {
        return Object.prototype.toString.call(wat) === '[object RegExp]';
      }
      /**
       * Checks whether given value has a then function.
       * @param wat A value to be checked.
       */


      function isThenable(wat) {
        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
        return Boolean(wat && wat.then && typeof wat.then === 'function');
      }
      /**
       * Checks whether given value's type is a SyntheticEvent
       * {@link isSyntheticEvent}.
       *
       * @param wat A value to be checked.
       * @returns A boolean representing the result.
       */


      function isSyntheticEvent(wat) {
        return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;
      }
      /**
       * Checks whether given value's type is an instance of provided constructor.
       * {@link isInstanceOf}.
       *
       * @param wat A value to be checked.
       * @param base A constructor to be used in a check.
       * @returns A boolean representing the result.
       */


      function isInstanceOf(wat, base) {
        try {
          return wat instanceof base;
        } catch (_e) {
          return false;
        }
      } //# sourceMappingURL=is.js.map

      /***/

    },

    /***/
    "9M8c":
    /*!**********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferCount.js ***!
      \**********************************************************************/

    /*! exports provided: bufferCount */

    /***/
    function M8c(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "bufferCount", function () {
        return bufferCount;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function bufferCount(bufferSize) {
        var startBufferEvery = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
        return function bufferCountOperatorFunction(source) {
          return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));
        };
      }

      var BufferCountOperator = /*#__PURE__*/function () {
        function BufferCountOperator(bufferSize, startBufferEvery) {
          _classCallCheck(this, BufferCountOperator);

          this.bufferSize = bufferSize;
          this.startBufferEvery = startBufferEvery;

          if (!startBufferEvery || bufferSize === startBufferEvery) {
            this.subscriberClass = BufferCountSubscriber;
          } else {
            this.subscriberClass = BufferSkipCountSubscriber;
          }
        }

        _createClass2(BufferCountOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));
          }
        }]);

        return BufferCountOperator;
      }();

      var BufferCountSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_9) {
        _inherits(BufferCountSubscriber, _Subscriber__WEBPACK_9);

        var _super148 = _createSuper(BufferCountSubscriber);

        function BufferCountSubscriber(destination, bufferSize) {
          var _this369;

          _classCallCheck(this, BufferCountSubscriber);

          _this369 = _super148.call(this, destination);
          _this369.bufferSize = bufferSize;
          _this369.buffer = [];
          return _this369;
        }

        _createClass2(BufferCountSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var buffer = this.buffer;
            buffer.push(value);

            if (buffer.length == this.bufferSize) {
              this.destination.next(buffer);
              this.buffer = [];
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var buffer = this.buffer;

            if (buffer.length > 0) {
              this.destination.next(buffer);
            }

            _get(_getPrototypeOf(BufferCountSubscriber.prototype), "_complete", this).call(this);
          }
        }]);

        return BufferCountSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]);

      var BufferSkipCountSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_10) {
        _inherits(BufferSkipCountSubscriber, _Subscriber__WEBPACK_10);

        var _super149 = _createSuper(BufferSkipCountSubscriber);

        function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
          var _this370;

          _classCallCheck(this, BufferSkipCountSubscriber);

          _this370 = _super149.call(this, destination);
          _this370.bufferSize = bufferSize;
          _this370.startBufferEvery = startBufferEvery;
          _this370.buffers = [];
          _this370.count = 0;
          return _this370;
        }

        _createClass2(BufferSkipCountSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var bufferSize = this.bufferSize,
                startBufferEvery = this.startBufferEvery,
                buffers = this.buffers,
                count = this.count;
            this.count++;

            if (count % startBufferEvery === 0) {
              buffers.push([]);
            }

            for (var i = buffers.length; i--;) {
              var buffer = buffers[i];
              buffer.push(value);

              if (buffer.length === bufferSize) {
                buffers.splice(i, 1);
                this.destination.next(buffer);
              }
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var buffers = this.buffers,
                destination = this.destination;

            while (buffers.length > 0) {
              var buffer = buffers.shift();

              if (buffer.length > 0) {
                destination.next(buffer);
              }
            }

            _get(_getPrototypeOf(BufferSkipCountSubscriber.prototype), "_complete", this).call(this);
          }
        }]);

        return BufferSkipCountSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=bufferCount.js.map

      /***/

    },

    /***/
    "9Pyj":
    /*!*************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/error.js ***!
      \*************************************************/

    /*! exports provided: SentryError */

    /***/
    function Pyj(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SentryError", function () {
        return SentryError;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _polyfill__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./polyfill */
      "NcYE");
      /** An error emitted by Sentry SDKs and related utilities. */


      var SentryError =
      /** @class */
      function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SentryError, _super);

        function SentryError(message) {
          var _newTarget = this.constructor;

          var _this = _super.call(this, message) || this;

          _this.message = message;
          _this.name = _newTarget.prototype.constructor.name;
          Object(_polyfill__WEBPACK_IMPORTED_MODULE_1__["setPrototypeOf"])(_this, _newTarget.prototype);
          return _this;
        }

        return SentryError;
      }(Error); //# sourceMappingURL=error.js.map

      /***/

    },

    /***/
    "9fYY":
    /*!*****************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/exports.js ***!
      \*****************************************************/

    /*! exports provided: Severity, Status, addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, makeMain, Scope, startTransaction, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, BrowserClient, injectReportDialog, eventFromException, eventFromMessage, defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog, flush, close, wrap, SDK_NAME */

    /***/
    function fYY(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _sentry_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/types */
      "PIsB");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Severity", function () {
        return _sentry_types__WEBPACK_IMPORTED_MODULE_0__["Severity"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Status", function () {
        return _sentry_types__WEBPACK_IMPORTED_MODULE_0__["Status"];
      });
      /* harmony import */


      var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/core */
      "wBhU");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "addGlobalEventProcessor", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["addGlobalEventProcessor"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "addBreadcrumb", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["addBreadcrumb"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "captureException", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["captureException"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "captureEvent", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["captureEvent"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "captureMessage", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["captureMessage"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "configureScope", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["configureScope"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getHubFromCarrier", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["getHubFromCarrier"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getCurrentHub", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Hub", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["Hub"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "makeMain", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["makeMain"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Scope", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["Scope"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "startTransaction", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["startTransaction"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "SDK_VERSION", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["SDK_VERSION"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setContext", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["setContext"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setExtra", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["setExtra"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setExtras", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["setExtras"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setTag", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["setTag"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setTags", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["setTags"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setUser", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["setUser"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "withScope", function () {
        return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["withScope"];
      });
      /* harmony import */


      var _client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./client */
      "kWuB");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "BrowserClient", function () {
        return _client__WEBPACK_IMPORTED_MODULE_2__["BrowserClient"];
      });
      /* harmony import */


      var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./helpers */
      "vzc1");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "injectReportDialog", function () {
        return _helpers__WEBPACK_IMPORTED_MODULE_3__["injectReportDialog"];
      });
      /* harmony import */


      var _eventbuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./eventbuilder */
      "IS+8");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "eventFromException", function () {
        return _eventbuilder__WEBPACK_IMPORTED_MODULE_4__["eventFromException"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "eventFromMessage", function () {
        return _eventbuilder__WEBPACK_IMPORTED_MODULE_4__["eventFromMessage"];
      });
      /* harmony import */


      var _sdk__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./sdk */
      "3CEA");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "defaultIntegrations", function () {
        return _sdk__WEBPACK_IMPORTED_MODULE_5__["defaultIntegrations"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "forceLoad", function () {
        return _sdk__WEBPACK_IMPORTED_MODULE_5__["forceLoad"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "init", function () {
        return _sdk__WEBPACK_IMPORTED_MODULE_5__["init"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "lastEventId", function () {
        return _sdk__WEBPACK_IMPORTED_MODULE_5__["lastEventId"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "onLoad", function () {
        return _sdk__WEBPACK_IMPORTED_MODULE_5__["onLoad"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "showReportDialog", function () {
        return _sdk__WEBPACK_IMPORTED_MODULE_5__["showReportDialog"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "flush", function () {
        return _sdk__WEBPACK_IMPORTED_MODULE_5__["flush"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "close", function () {
        return _sdk__WEBPACK_IMPORTED_MODULE_5__["close"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "wrap", function () {
        return _sdk__WEBPACK_IMPORTED_MODULE_5__["wrap"];
      });
      /* harmony import */


      var _version__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ./version */
      "omaz");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "SDK_NAME", function () {
        return _version__WEBPACK_IMPORTED_MODULE_6__["SDK_NAME"];
      }); //# sourceMappingURL=exports.js.map

      /***/

    },

    /***/
    "9ihq":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/elementAt.js ***!
      \********************************************************************/

    /*! exports provided: elementAt */

    /***/
    function ihq(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "elementAt", function () {
        return elementAt;
      });
      /* harmony import */


      var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../util/ArgumentOutOfRangeError */
      "4I5i");
      /* harmony import */


      var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./filter */
      "pLZG");
      /* harmony import */


      var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./throwIfEmpty */
      "XDbj");
      /* harmony import */


      var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./defaultIfEmpty */
      "xbPD");
      /* harmony import */


      var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./take */
      "IzEk");

      function elementAt(index, defaultValue) {
        if (index < 0) {
          throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]();
        }

        var hasDefaultValue = arguments.length >= 2;
        return function (source) {
          return source.pipe(Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) {
            return i === index;
          }), Object(_take__WEBPACK_IMPORTED_MODULE_4__["take"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__["throwIfEmpty"])(function () {
            return new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]();
          }));
        };
      } //# sourceMappingURL=elementAt.js.map

      /***/

    },

    /***/
    "9ppp":
    /*!*****************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/ObjectUnsubscribedError.js ***!
      \*****************************************************************************/

    /*! exports provided: ObjectUnsubscribedError */

    /***/
    function ppp(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function () {
        return ObjectUnsubscribedError;
      });

      var ObjectUnsubscribedErrorImpl = function () {
        function ObjectUnsubscribedErrorImpl() {
          Error.call(this);
          this.message = 'object unsubscribed';
          this.name = 'ObjectUnsubscribedError';
          return this;
        }

        ObjectUnsubscribedErrorImpl.prototype = Object.create(Error.prototype);
        return ObjectUnsubscribedErrorImpl;
      }();

      var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl; //# sourceMappingURL=ObjectUnsubscribedError.js.map

      /***/
    },

    /***/
    "A3iJ":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/partition.js ***!
      \********************************************************************/

    /*! exports provided: partition */

    /***/
    function A3iJ(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "partition", function () {
        return partition;
      });
      /* harmony import */


      var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../util/not */
      "F97/");
      /* harmony import */


      var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./filter */
      "pLZG");

      function partition(predicate, thisArg) {
        return function (source) {
          return [Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(predicate, thisArg)(source), Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(source)];
        };
      } //# sourceMappingURL=partition.js.map

      /***/

    },

    /***/
    "AKTn":
    /*!***********************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/web-vitals/getLCP.js ***!
      \***********************************************************************/

    /*! exports provided: getLCP */

    /***/
    function AKTn(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLCP", function () {
        return getLCP;
      });
      /* harmony import */


      var _lib_bindReporter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./lib/bindReporter */
      "Fm1u");
      /* harmony import */


      var _lib_getVisibilityWatcher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./lib/getVisibilityWatcher */
      "hNpR");
      /* harmony import */


      var _lib_initMetric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./lib/initMetric */
      "bjvM");
      /* harmony import */


      var _lib_observe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./lib/observe */
      "MaC4");
      /* harmony import */


      var _lib_onHidden__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./lib/onHidden */
      "6mNm");
      /*
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *     https://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var reportedMetricIDs = {};

      var getLCP = function getLCP(onReport, reportAllChanges) {
        var visibilityWatcher = Object(_lib_getVisibilityWatcher__WEBPACK_IMPORTED_MODULE_1__["getVisibilityWatcher"])();
        var metric = Object(_lib_initMetric__WEBPACK_IMPORTED_MODULE_2__["initMetric"])('LCP');
        var report;

        var entryHandler = function entryHandler(entry) {
          // The startTime attribute returns the value of the renderTime if it is not 0,
          // and the value of the loadTime otherwise.
          var value = entry.startTime; // If the page was hidden prior to paint time of the entry,
          // ignore it and mark the metric as final, otherwise add the entry.

          if (value < visibilityWatcher.firstHiddenTime) {
            metric.value = value;
            metric.entries.push(entry);
          }

          if (report) {
            report();
          }
        };

        var po = Object(_lib_observe__WEBPACK_IMPORTED_MODULE_3__["observe"])('largest-contentful-paint', entryHandler);

        if (po) {
          report = Object(_lib_bindReporter__WEBPACK_IMPORTED_MODULE_0__["bindReporter"])(onReport, metric, reportAllChanges);

          var stopListening_1 = function stopListening_1() {
            if (!reportedMetricIDs[metric.id]) {
              po.takeRecords().map(entryHandler);
              po.disconnect();
              reportedMetricIDs[metric.id] = true;
              report(true);
            }
          }; // Stop listening after input. Note: while scrolling is an input that
          // stop LCP observation, it's unreliable since it can be programmatically
          // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75


          ['keydown', 'click'].forEach(function (type) {
            addEventListener(type, stopListening_1, {
              once: true,
              capture: true
            });
          });
          Object(_lib_onHidden__WEBPACK_IMPORTED_MODULE_4__["onHidden"])(stopListening_1, true);
        }
      }; //# sourceMappingURL=getLCP.js.map

      /***/

    },

    /***/
    "B4Jq":
    /*!****************************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/hardware-back-button-4a6b37fb.js ***!
      \****************************************************************************/

    /*! exports provided: MENU_BACK_BUTTON_PRIORITY, OVERLAY_BACK_BUTTON_PRIORITY, blockHardwareBackButton, startHardwareBackButton */

    /***/
    function B4Jq(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MENU_BACK_BUTTON_PRIORITY", function () {
        return MENU_BACK_BUTTON_PRIORITY;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "OVERLAY_BACK_BUTTON_PRIORITY", function () {
        return OVERLAY_BACK_BUTTON_PRIORITY;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "blockHardwareBackButton", function () {
        return blockHardwareBackButton;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "startHardwareBackButton", function () {
        return startHardwareBackButton;
      });
      /**
       * When hardwareBackButton: false in config,
       * we need to make sure we also block the default
       * webview behavior. If we don't then it will be
       * possible for users to navigate backward while
       * an overlay is still open. Additionally, it will
       * give the appearance that the hardwareBackButton
       * config is not working as the page transition
       * will still happen.
       */


      var blockHardwareBackButton = function blockHardwareBackButton() {
        document.addEventListener('backbutton', function () {}); // tslint:disable-line
      };

      var startHardwareBackButton = function startHardwareBackButton() {
        var doc = document;
        var busy = false;
        doc.addEventListener('backbutton', function () {
          if (busy) {
            return;
          }

          var index = 0;
          var handlers = [];
          var ev = new CustomEvent('ionBackButton', {
            bubbles: false,
            detail: {
              register: function register(priority, handler) {
                handlers.push({
                  priority: priority,
                  handler: handler,
                  id: index++
                });
              }
            }
          });
          doc.dispatchEvent(ev);

          var executeAction = /*#__PURE__*/function () {
            var _ref49 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(handlerRegister) {
              var result;
              return regeneratorRuntime.wrap(function _callee$(_context3) {
                while (1) {
                  switch (_context3.prev = _context3.next) {
                    case 0:
                      _context3.prev = 0;

                      if (!(handlerRegister && handlerRegister.handler)) {
                        _context3.next = 6;
                        break;
                      }

                      result = handlerRegister.handler(processHandlers);

                      if (!(result != null)) {
                        _context3.next = 6;
                        break;
                      }

                      _context3.next = 6;
                      return result;

                    case 6:
                      _context3.next = 11;
                      break;

                    case 8:
                      _context3.prev = 8;
                      _context3.t0 = _context3["catch"](0);
                      console.error(_context3.t0);

                    case 11:
                    case "end":
                      return _context3.stop();
                  }
                }
              }, _callee, null, [[0, 8]]);
            }));

            return function executeAction(_x) {
              return _ref49.apply(this, arguments);
            };
          }();

          var processHandlers = function processHandlers() {
            if (handlers.length > 0) {
              var selectedHandler = {
                priority: Number.MIN_SAFE_INTEGER,
                handler: function handler() {
                  return undefined;
                },
                id: -1
              };
              handlers.forEach(function (handler) {
                if (handler.priority >= selectedHandler.priority) {
                  selectedHandler = handler;
                }
              });
              busy = true;
              handlers = handlers.filter(function (handler) {
                return handler.id !== selectedHandler.id;
              });
              executeAction(selectedHandler).then(function () {
                return busy = false;
              });
            }
          };

          processHandlers();
        });
      };

      var OVERLAY_BACK_BUTTON_PRIORITY = 100;
      var MENU_BACK_BUTTON_PRIORITY = 99; // 1 less than overlay priority since menu is displayed behind overlays

      /***/
    },

    /***/
    "BFxc":
    /*!*******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/takeLast.js ***!
      \*******************************************************************/

    /*! exports provided: takeLast */

    /***/
    function BFxc(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "takeLast", function () {
        return takeLast;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/ArgumentOutOfRangeError */
      "4I5i");
      /* harmony import */


      var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../observable/empty */
      "EY2u");

      function takeLast(count) {
        return function takeLastOperatorFunction(source) {
          if (count === 0) {
            return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
          } else {
            return source.lift(new TakeLastOperator(count));
          }
        };
      }

      var TakeLastOperator = /*#__PURE__*/function () {
        function TakeLastOperator(total) {
          _classCallCheck(this, TakeLastOperator);

          this.total = total;

          if (this.total < 0) {
            throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__["ArgumentOutOfRangeError"]();
          }
        }

        _createClass2(TakeLastOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new TakeLastSubscriber(subscriber, this.total));
          }
        }]);

        return TakeLastOperator;
      }();

      var TakeLastSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_11) {
        _inherits(TakeLastSubscriber, _Subscriber__WEBPACK_11);

        var _super150 = _createSuper(TakeLastSubscriber);

        function TakeLastSubscriber(destination, total) {
          var _this371;

          _classCallCheck(this, TakeLastSubscriber);

          _this371 = _super150.call(this, destination);
          _this371.total = total;
          _this371.ring = new Array();
          _this371.count = 0;
          return _this371;
        }

        _createClass2(TakeLastSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var ring = this.ring;
            var total = this.total;
            var count = this.count++;

            if (ring.length < total) {
              ring.push(value);
            } else {
              var index = count % total;
              ring[index] = value;
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var destination = this.destination;
            var count = this.count;

            if (count > 0) {
              var total = this.count >= this.total ? this.total : this.count;
              var ring = this.ring;

              for (var i = 0; i < total; i++) {
                var idx = count++ % total;
                destination.next(ring[idx]);
              }
            }

            destination.complete();
          }
        }]);

        return TakeLastSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=takeLast.js.map

      /***/

    },

    /***/
    "C6fG":
    /*!***************************************************************!*\
      !*** ./node_modules/@ionic-native/core/__ivy_ngcc__/index.js ***!
      \***************************************************************/

    /*! exports provided: IonicNativePlugin, checkAvailability, instanceAvailability, wrap, getPromise, cordova, cordovaFunctionOverride, cordovaInstance, cordovaPropertyGet, cordovaPropertySet, instancePropertyGet, instancePropertySet */

    /***/
    function C6fG(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _bootstrap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./bootstrap */
      "OE48");
      /* harmony import */


      var _ionic_native_plugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./ionic-native-plugin */
      "EKAo");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "IonicNativePlugin", function () {
        return _ionic_native_plugin__WEBPACK_IMPORTED_MODULE_1__["IonicNativePlugin"];
      });
      /* harmony import */


      var _decorators_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./decorators/common */
      "yR3O");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "checkAvailability", function () {
        return _decorators_common__WEBPACK_IMPORTED_MODULE_2__["checkAvailability"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "instanceAvailability", function () {
        return _decorators_common__WEBPACK_IMPORTED_MODULE_2__["instanceAvailability"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "wrap", function () {
        return _decorators_common__WEBPACK_IMPORTED_MODULE_2__["wrap"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getPromise", function () {
        return _decorators_common__WEBPACK_IMPORTED_MODULE_2__["getPromise"];
      });
      /* harmony import */


      var _decorators_cordova__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./decorators/cordova */
      "QMYr");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "cordova", function () {
        return _decorators_cordova__WEBPACK_IMPORTED_MODULE_3__["cordova"];
      });
      /* harmony import */


      var _decorators_cordova_function_override__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./decorators/cordova-function-override */
      "aJZl");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "cordovaFunctionOverride", function () {
        return _decorators_cordova_function_override__WEBPACK_IMPORTED_MODULE_4__["cordovaFunctionOverride"];
      });
      /* harmony import */


      var _decorators_cordova_instance__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./decorators/cordova-instance */
      "gGGD");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "cordovaInstance", function () {
        return _decorators_cordova_instance__WEBPACK_IMPORTED_MODULE_5__["cordovaInstance"];
      });
      /* harmony import */


      var _decorators_cordova_property__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ./decorators/cordova-property */
      "O2kO");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "cordovaPropertyGet", function () {
        return _decorators_cordova_property__WEBPACK_IMPORTED_MODULE_6__["cordovaPropertyGet"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "cordovaPropertySet", function () {
        return _decorators_cordova_property__WEBPACK_IMPORTED_MODULE_6__["cordovaPropertySet"];
      });
      /* harmony import */


      var _decorators_instance_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! ./decorators/instance-property */
      "HD7q");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "instancePropertyGet", function () {
        return _decorators_instance_property__WEBPACK_IMPORTED_MODULE_7__["instancePropertyGet"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "instancePropertySet", function () {
        return _decorators_instance_property__WEBPACK_IMPORTED_MODULE_7__["instancePropertySet"];
      });
      /* harmony import */


      var _decorators_interfaces__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
      /*! ./decorators/interfaces */
      "uC2i");
      /* empty/unused harmony star reexport */
      // Decorators


      Object(_bootstrap__WEBPACK_IMPORTED_MODULE_0__["checkReady"])(); //# sourceMappingURL=index.js.map

      /***/
    },

    /***/
    "C9T/":
    /*!*****************************************************************!*\
      !*** ./node_modules/@capacitor/network/dist/esm/definitions.js ***!
      \*****************************************************************/

    /*! no exports provided */

    /***/
    function C9T(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=definitions.js.map

      /***/

    },

    /***/
    "CJ5d":
    /*!*******************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/backgroundtab.js ***!
      \*******************************************************************/

    /*! exports provided: registerBackgroundTabDetection */

    /***/
    function CJ5d(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "registerBackgroundTabDetection", function () {
        return registerBackgroundTabDetection;
      });
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _spanstatus__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../spanstatus */
      "bju/");
      /* harmony import */


      var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../utils */
      "FGHR");

      var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getGlobalObject"])();
      /**
       * Add a listener that cancels and finishes a transaction when the global
       * document is hidden.
       */

      function registerBackgroundTabDetection() {
        if (global && global.document) {
          global.document.addEventListener('visibilitychange', function () {
            var activeTransaction = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["getActiveTransaction"])();

            if (global.document.hidden && activeTransaction) {
              _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log("[Tracing] Transaction: " + _spanstatus__WEBPACK_IMPORTED_MODULE_1__["SpanStatus"].Cancelled + " -> since tab moved to the background, op: " + activeTransaction.op); // We should not set status if it is already set, this prevent important statuses like
              // error or data loss from being overwritten on transaction.


              if (!activeTransaction.status) {
                activeTransaction.setStatus(_spanstatus__WEBPACK_IMPORTED_MODULE_1__["SpanStatus"].Cancelled);
              }

              activeTransaction.setTag('visibilitychange', 'document.hidden');
              activeTransaction.finish();
            }
          });
        } else {
          _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('[Tracing] Could not set up background tab detection due to lack of global document');
        }
      } //# sourceMappingURL=backgroundtab.js.map

      /***/

    },

    /***/
    "CMyj":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/isIterable.js ***!
      \****************************************************************/

    /*! exports provided: isIterable */

    /***/
    function CMyj(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isIterable", function () {
        return isIterable;
      });
      /* harmony import */


      var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../symbol/iterator */
      "Lhse");

      function isIterable(input) {
        return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]] === 'function';
      } //# sourceMappingURL=isIterable.js.map

      /***/

    },

    /***/
    "CRDf":
    /*!***************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToObservable.js ***!
      \***************************************************************************/

    /*! exports provided: subscribeToObservable */

    /***/
    function CRDf(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "subscribeToObservable", function () {
        return subscribeToObservable;
      });
      /* harmony import */


      var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../symbol/observable */
      "kJWO");

      var subscribeToObservable = function subscribeToObservable(obj) {
        return function (subscriber) {
          var obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]]();

          if (typeof obs.subscribe !== 'function') {
            throw new TypeError('Provided object does not correctly implement Symbol.observable');
          } else {
            return obs.subscribe(subscriber);
          }
        };
      }; //# sourceMappingURL=subscribeToObservable.js.map

      /***/

    },

    /***/
    "Cfvw":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/from.js ***!
      \****************************************************************/

    /*! exports provided: from */

    /***/
    function Cfvw(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "from", function () {
        return from;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/subscribeTo */
      "SeVD");
      /* harmony import */


      var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../scheduled/scheduled */
      "7HRe");

      function from(input, scheduler) {
        if (!scheduler) {
          if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
            return input;
          }

          return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(input));
        } else {
          return Object(_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__["scheduled"])(input, scheduler);
        }
      } //# sourceMappingURL=from.js.map

      /***/

    },

    /***/
    "Cpvd":
    /*!***********************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/hubextensions.js ***!
      \***********************************************************/

    /*! exports provided: startIdleTransaction, _addTracingExtensions, addExtensionMethods */

    /***/
    function Cpvd(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* WEBPACK VAR INJECTION */


      (function (module) {
        /* harmony export (binding) */
        __webpack_require__.d(__webpack_exports__, "startIdleTransaction", function () {
          return startIdleTransaction;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "_addTracingExtensions", function () {
          return _addTracingExtensions;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "addExtensionMethods", function () {
          return addExtensionMethods;
        });
        /* harmony import */


        var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
        /*! tslib */
        "SOwp");
        /* harmony import */


        var _sentry_hub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
        /*! @sentry/hub */
        "uzXi");
        /* harmony import */


        var _sentry_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
        /*! @sentry/types */
        "PIsB");
        /* harmony import */


        var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
        /*! @sentry/utils */
        "TwdF");
        /* harmony import */


        var _errors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
        /*! ./errors */
        "2bdC");
        /* harmony import */


        var _idletransaction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
        /*! ./idletransaction */
        "MBYv");
        /* harmony import */


        var _transaction__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
        /*! ./transaction */
        "EldZ");
        /* harmony import */


        var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
        /*! ./utils */
        "FGHR");
        /** Returns all trace headers that are currently on the top scope. */


        function traceHeaders() {
          var scope = this.getScope();

          if (scope) {
            var span = scope.getSpan();

            if (span) {
              return {
                'sentry-trace': span.toTraceparent()
              };
            }
          }

          return {};
        }
        /**
         * Makes a sampling decision for the given transaction and stores it on the transaction.
         *
         * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be
         * sent to Sentry.
         *
         * @param hub: The hub off of which to read config options
         * @param transaction: The transaction needing a sampling decision
         * @param samplingContext: Default and user-provided data which may be used to help make the decision
         *
         * @returns The given transaction with its `sampled` value set
         */


        function sample(transaction, options, samplingContext) {
          // nothing to do if tracing is not enabled
          if (!Object(_utils__WEBPACK_IMPORTED_MODULE_7__["hasTracingEnabled"])(options)) {
            transaction.sampled = false;
            return transaction;
          } // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that


          if (transaction.sampled !== undefined) {
            transaction.setMetadata({
              transactionSampling: {
                method: _sentry_types__WEBPACK_IMPORTED_MODULE_2__["TransactionSamplingMethod"].Explicit
              }
            });
            return transaction;
          } // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` were defined, so one of these should
          // work; prefer the hook if so


          var sampleRate;

          if (typeof options.tracesSampler === 'function') {
            sampleRate = options.tracesSampler(samplingContext);
            transaction.setMetadata({
              transactionSampling: {
                method: _sentry_types__WEBPACK_IMPORTED_MODULE_2__["TransactionSamplingMethod"].Sampler,
                // cast to number in case it's a boolean
                rate: Number(sampleRate)
              }
            });
          } else if (samplingContext.parentSampled !== undefined) {
            sampleRate = samplingContext.parentSampled;
            transaction.setMetadata({
              transactionSampling: {
                method: _sentry_types__WEBPACK_IMPORTED_MODULE_2__["TransactionSamplingMethod"].Inheritance
              }
            });
          } else {
            sampleRate = options.tracesSampleRate;
            transaction.setMetadata({
              transactionSampling: {
                method: _sentry_types__WEBPACK_IMPORTED_MODULE_2__["TransactionSamplingMethod"].Rate,
                // cast to number in case it's a boolean
                rate: Number(sampleRate)
              }
            });
          } // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The
          // only valid values are booleans or numbers between 0 and 1.)


          if (!isValidSampleRate(sampleRate)) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].warn("[Tracing] Discarding transaction because of invalid sample rate.");

            transaction.sampled = false;
            return transaction;
          } // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped


          if (!sampleRate) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].log("[Tracing] Discarding transaction because " + (typeof options.tracesSampler === 'function' ? 'tracesSampler returned 0 or false' : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'));

            transaction.sampled = false;
            return transaction;
          } // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is
          // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.


          transaction.sampled = Math.random() < sampleRate; // if we're not going to keep it, we're done

          if (!transaction.sampled) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].log("[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = " + Number(sampleRate) + ")");

            return transaction;
          }

          _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].log("[Tracing] starting " + transaction.op + " transaction - " + transaction.name);

          return transaction;
        }
        /**
         * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).
         */


        function isValidSampleRate(rate) {
          // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck
          // eslint-disable-next-line @typescript-eslint/no-explicit-any
          if (isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got " + JSON.stringify(rate) + " of type " + JSON.stringify(typeof rate) + ".");

            return false;
          } // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false


          if (rate < 0 || rate > 1) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].warn("[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got " + rate + ".");

            return false;
          }

          return true;
        }
        /**
         * Creates a new transaction and adds a sampling decision if it doesn't yet have one.
         *
         * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if
         * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an
         * "extension method."
         *
         * @param this: The Hub starting the transaction
         * @param transactionContext: Data used to configure the transaction
         * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)
         *
         * @returns The new transaction
         *
         * @see {@link Hub.startTransaction}
         */


        function _startTransaction(transactionContext, customSamplingContext) {
          var _a, _b;

          var options = ((_a = this.getClient()) === null || _a === void 0 ? void 0 : _a.getOptions()) || {};
          var transaction = new _transaction__WEBPACK_IMPORTED_MODULE_6__["Transaction"](transactionContext, this);
          transaction = sample(transaction, options, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
            parentSampled: transactionContext.parentSampled,
            transactionContext: transactionContext
          }, customSamplingContext));

          if (transaction.sampled) {
            transaction.initSpanRecorder((_b = options._experiments) === null || _b === void 0 ? void 0 : _b.maxSpans);
          }

          return transaction;
        }
        /**
         * Create new idle transaction.
         */


        function startIdleTransaction(hub, transactionContext, idleTimeout, onScope, customSamplingContext) {
          var _a, _b;

          var options = ((_a = hub.getClient()) === null || _a === void 0 ? void 0 : _a.getOptions()) || {};
          var transaction = new _idletransaction__WEBPACK_IMPORTED_MODULE_5__["IdleTransaction"](transactionContext, hub, idleTimeout, onScope);
          transaction = sample(transaction, options, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
            parentSampled: transactionContext.parentSampled,
            transactionContext: transactionContext
          }, customSamplingContext));

          if (transaction.sampled) {
            transaction.initSpanRecorder((_b = options._experiments) === null || _b === void 0 ? void 0 : _b.maxSpans);
          }

          return transaction;
        }
        /**
         * @private
         */


        function _addTracingExtensions() {
          var carrier = Object(_sentry_hub__WEBPACK_IMPORTED_MODULE_1__["getMainCarrier"])();

          if (!carrier.__SENTRY__) {
            return;
          }

          carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};

          if (!carrier.__SENTRY__.extensions.startTransaction) {
            carrier.__SENTRY__.extensions.startTransaction = _startTransaction;
          }

          if (!carrier.__SENTRY__.extensions.traceHeaders) {
            carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;
          }
        }
        /**
         * @private
         */


        function _autoloadDatabaseIntegrations() {
          var carrier = Object(_sentry_hub__WEBPACK_IMPORTED_MODULE_1__["getMainCarrier"])();

          if (!carrier.__SENTRY__) {
            return;
          }

          var packageToIntegrationMapping = {
            mongodb: function mongodb() {
              var integration = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["dynamicRequire"])(module, './integrations/node/mongo');
              return new integration.Mongo();
            },
            mongoose: function mongoose() {
              var integration = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["dynamicRequire"])(module, './integrations/node/mongo');
              return new integration.Mongo({
                mongoose: true
              });
            },
            mysql: function mysql() {
              var integration = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["dynamicRequire"])(module, './integrations/node/mysql');
              return new integration.Mysql();
            },
            pg: function pg() {
              var integration = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["dynamicRequire"])(module, './integrations/node/postgres');
              return new integration.Postgres();
            }
          };
          var mappedPackages = Object.keys(packageToIntegrationMapping).filter(function (moduleName) {
            return !!Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["loadModule"])(moduleName);
          }).map(function (pkg) {
            try {
              return packageToIntegrationMapping[pkg]();
            } catch (e) {
              return undefined;
            }
          }).filter(function (p) {
            return p;
          });

          if (mappedPackages.length > 0) {
            carrier.__SENTRY__.integrations = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(carrier.__SENTRY__.integrations || [], mappedPackages);
          }
        }
        /**
         * This patches the global object and injects the Tracing extensions methods
         */


        function addExtensionMethods() {
          _addTracingExtensions(); // Detect and automatically load specified integrations.


          if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["isNodeEnv"])()) {
            _autoloadDatabaseIntegrations();
          } // If an error happens globally, we should make sure transaction status is set to error.


          Object(_errors__WEBPACK_IMPORTED_MODULE_4__["registerErrorInstrumentation"])();
        } //# sourceMappingURL=hubextensions.js.map

        /* WEBPACK VAR INJECTION */

      }).call(this, __webpack_require__(
      /*! ./../../../webpack/buildin/harmony-module.js */
      "3UD+")(module));
      /***/
    },

    /***/
    "CqXF":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/mapTo.js ***!
      \****************************************************************/

    /*! exports provided: mapTo */

    /***/
    function CqXF(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "mapTo", function () {
        return mapTo;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function mapTo(value) {
        return function (source) {
          return source.lift(new MapToOperator(value));
        };
      }

      var MapToOperator = /*#__PURE__*/function () {
        function MapToOperator(value) {
          _classCallCheck(this, MapToOperator);

          this.value = value;
        }

        _createClass2(MapToOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new MapToSubscriber(subscriber, this.value));
          }
        }]);

        return MapToOperator;
      }();

      var MapToSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_12) {
        _inherits(MapToSubscriber, _Subscriber__WEBPACK_12);

        var _super151 = _createSuper(MapToSubscriber);

        function MapToSubscriber(destination, value) {
          var _this372;

          _classCallCheck(this, MapToSubscriber);

          _this372 = _super151.call(this, destination);
          _this372.value = value;
          return _this372;
        }

        _createClass2(MapToSubscriber, [{
          key: "_next",
          value: function _next(x) {
            this.destination.next(this.value);
          }
        }]);

        return MapToSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=mapTo.js.map

      /***/

    },

    /***/
    "D0XW":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduler/async.js ***!
      \****************************************************************/

    /*! exports provided: asyncScheduler, async */

    /***/
    function D0XW(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "asyncScheduler", function () {
        return asyncScheduler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "async", function () {
        return async;
      });
      /* harmony import */


      var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./AsyncAction */
      "3N8a");
      /* harmony import */


      var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./AsyncScheduler */
      "IjjT");

      var asyncScheduler = new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]);
      var async = asyncScheduler; //# sourceMappingURL=async.js.map

      /***/
    },

    /***/
    "DH7j":
    /*!*************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/isArray.js ***!
      \*************************************************************/

    /*! exports provided: isArray */

    /***/
    function DH7j(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isArray", function () {
        return isArray;
      });

      var isArray = function () {
        return Array.isArray || function (x) {
          return x && typeof x.length === 'number';
        };
      }(); //# sourceMappingURL=isArray.js.map

      /***/

    },

    /***/
    "DTjN":
    /*!*************************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/transports/base.js ***!
      \*************************************************************/

    /*! exports provided: BaseTransport */

    /***/
    function DTjN(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BaseTransport", function () {
        return BaseTransport;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/core */
      "wBhU");
      /* harmony import */


      var _sentry_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/types */
      "PIsB");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./utils */
      "2TjN");

      var CATEGORY_MAPPING = {
        event: 'error',
        transaction: 'transaction',
        session: 'session',
        attachment: 'attachment'
      };
      var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["getGlobalObject"])();
      /** Base Transport class implementation */

      var BaseTransport =
      /** @class */
      function () {
        function BaseTransport(options) {
          var _this = this;

          this.options = options;
          /** A simple buffer holding all requests. */

          this._buffer = new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["PromiseBuffer"](30);
          /** Locks transport after receiving rate limits in a response */

          this._rateLimits = {};
          this._outcomes = {};
          this._api = new _sentry_core__WEBPACK_IMPORTED_MODULE_1__["API"](options.dsn, options._metadata, options.tunnel); // eslint-disable-next-line deprecation/deprecation

          this.url = this._api.getStoreEndpointWithUrlEncodedAuth();

          if (this.options.sendClientReports && global.document) {
            global.document.addEventListener('visibilitychange', function () {
              if (global.document.visibilityState === 'hidden') {
                _this._flushOutcomes();
              }
            });
          }
        }
        /**
         * @inheritDoc
         */


        BaseTransport.prototype.sendEvent = function (_) {
          throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SentryError"]('Transport Class has to implement `sendEvent` method');
        };
        /**
         * @inheritDoc
         */


        BaseTransport.prototype.close = function (timeout) {
          return this._buffer.drain(timeout);
        };
        /**
         * @inheritDoc
         */


        BaseTransport.prototype.recordLostEvent = function (reason, category) {
          var _a;

          if (!this.options.sendClientReports) {
            return;
          } // We want to track each category (event, transaction, session) separately
          // but still keep the distinction between different type of outcomes.
          // We could use nested maps, but it's much easier to read and type this way.
          // A correct type for map-based implementation if we want to go that route
          // would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`


          var key = CATEGORY_MAPPING[category] + ":" + reason;

          _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].log("Adding outcome: " + key);

          this._outcomes[key] = (_a = this._outcomes[key], _a !== null && _a !== void 0 ? _a : 0) + 1;
        };
        /**
         * Send outcomes as an envelope
         */


        BaseTransport.prototype._flushOutcomes = function () {
          if (!this.options.sendClientReports) {
            return;
          }

          var outcomes = this._outcomes;
          this._outcomes = {}; // Nothing to send

          if (!Object.keys(outcomes).length) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].log('No outcomes to flush');

            return;
          }

          _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].log("Flushing outcomes:\n" + JSON.stringify(outcomes, null, 2));

          var url = this._api.getEnvelopeEndpointWithUrlEncodedAuth(); // Envelope header is required to be at least an empty object


          var envelopeHeader = JSON.stringify(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.options.tunnel && {
            dsn: this._api.getDsn().toString()
          }));
          var itemHeaders = JSON.stringify({
            type: 'client_report'
          });
          var item = JSON.stringify({
            timestamp: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["dateTimestampInSeconds"])(),
            discarded_events: Object.keys(outcomes).map(function (key) {
              var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(key.split(':'), 2),
                  category = _a[0],
                  reason = _a[1];

              return {
                reason: reason,
                category: category,
                quantity: outcomes[key]
              };
            })
          });
          var envelope = envelopeHeader + "\n" + itemHeaders + "\n" + item;

          try {
            Object(_utils__WEBPACK_IMPORTED_MODULE_4__["sendReport"])(url, envelope);
          } catch (e) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].error(e);
          }
        };
        /**
         * Handle Sentry repsonse for promise-based transports.
         */


        BaseTransport.prototype._handleResponse = function (_a) {
          var requestType = _a.requestType,
              response = _a.response,
              headers = _a.headers,
              resolve = _a.resolve,
              reject = _a.reject;

          var status = _sentry_types__WEBPACK_IMPORTED_MODULE_2__["Status"].fromHttpCode(response.status);
          /**
           * "The name is case-insensitive."
           * https://developer.mozilla.org/en-US/docs/Web/API/Headers/get
           */


          var limited = this._handleRateLimit(headers);

          if (limited) _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].warn("Too many " + requestType + " requests, backing off until: " + this._disabledUntil(requestType));

          if (status === _sentry_types__WEBPACK_IMPORTED_MODULE_2__["Status"].Success) {
            resolve({
              status: status
            });
            return;
          }

          reject(response);
        };
        /**
         * Gets the time that given category is disabled until for rate limiting
         */


        BaseTransport.prototype._disabledUntil = function (requestType) {
          var category = CATEGORY_MAPPING[requestType];
          return this._rateLimits[category] || this._rateLimits.all;
        };
        /**
         * Checks if a category is rate limited
         */


        BaseTransport.prototype._isRateLimited = function (requestType) {
          return this._disabledUntil(requestType) > new Date(Date.now());
        };
        /**
         * Sets internal _rateLimits from incoming headers. Returns true if headers contains a non-empty rate limiting header.
         */


        BaseTransport.prototype._handleRateLimit = function (headers) {
          var e_1, _a, e_2, _b;

          var now = Date.now();
          var rlHeader = headers['x-sentry-rate-limits'];
          var raHeader = headers['retry-after'];

          if (rlHeader) {
            try {
              // rate limit headers are of the form
              //     <header>,<header>,..
              // where each <header> is of the form
              //     <retry_after>: <categories>: <scope>: <reason_code>
              // where
              //     <retry_after> is a delay in ms
              //     <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form
              //         <category>;<category>;...
              //     <scope> is what's being limited (org, project, or key) - ignored by SDK
              //     <reason_code> is an arbitrary string like "org_quota" - ignored by SDK
              for (var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(rlHeader.trim().split(',')), _d = _c.next(); !_d.done; _d = _c.next()) {
                var limit = _d.value;
                var parameters = limit.split(':', 2);
                var headerDelay = parseInt(parameters[0], 10);
                var delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default

                try {
                  for (var _e = (e_2 = void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(parameters[1].split(';'))), _f = _e.next(); !_f.done; _f = _e.next()) {
                    var category = _f.value;
                    this._rateLimits[category || 'all'] = new Date(now + delay);
                  }
                } catch (e_2_1) {
                  e_2 = {
                    error: e_2_1
                  };
                } finally {
                  try {
                    if (_f && !_f.done && (_b = _e["return"])) _b.call(_e);
                  } finally {
                    if (e_2) throw e_2.error;
                  }
                }
              }
            } catch (e_1_1) {
              e_1 = {
                error: e_1_1
              };
            } finally {
              try {
                if (_d && !_d.done && (_a = _c["return"])) _a.call(_c);
              } finally {
                if (e_1) throw e_1.error;
              }
            }

            return true;
          } else if (raHeader) {
            this._rateLimits.all = new Date(now + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["parseRetryAfterHeader"])(now, raHeader));
            return true;
          }

          return false;
        };

        return BaseTransport;
      }(); //# sourceMappingURL=base.js.map

      /***/

    },

    /***/
    "E/Mt":
    /*!********************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/ionic-global-63a97a32.js ***!
      \********************************************************************/

    /*! exports provided: a, b, c, g, i */

    /***/
    function EMt(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "a", function () {
        return isPlatform;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "b", function () {
        return getIonMode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "c", function () {
        return config;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "g", function () {
        return getPlatforms;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "i", function () {
        return initialize;
      });
      /* harmony import */


      var _index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./index-7a8b7a1c.js */
      "wEJo");

      var getPlatforms = function getPlatforms(win) {
        return setupPlatforms(win);
      };

      var isPlatform = function isPlatform(winOrPlatform, platform) {
        if (typeof winOrPlatform === 'string') {
          platform = winOrPlatform;
          winOrPlatform = undefined;
        }

        return getPlatforms(winOrPlatform).includes(platform);
      };

      var setupPlatforms = function setupPlatforms() {
        var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;

        if (typeof win === 'undefined') {
          return [];
        }

        win.Ionic = win.Ionic || {};
        var platforms = win.Ionic.platforms;

        if (platforms == null) {
          platforms = win.Ionic.platforms = detectPlatforms(win);
          platforms.forEach(function (p) {
            return win.document.documentElement.classList.add("plt-".concat(p));
          });
        }

        return platforms;
      };

      var detectPlatforms = function detectPlatforms(win) {
        return Object.keys(PLATFORMS_MAP).filter(function (p) {
          return PLATFORMS_MAP[p](win);
        });
      };

      var isMobileWeb = function isMobileWeb(win) {
        return isMobile(win) && !isHybrid(win);
      };

      var isIpad = function isIpad(win) {
        // iOS 12 and below
        if (testUserAgent(win, /iPad/i)) {
          return true;
        } // iOS 13+


        if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
          return true;
        }

        return false;
      };

      var isIphone = function isIphone(win) {
        return testUserAgent(win, /iPhone/i);
      };

      var isIOS = function isIOS(win) {
        return testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
      };

      var isAndroid = function isAndroid(win) {
        return testUserAgent(win, /android|sink/i);
      };

      var isAndroidTablet = function isAndroidTablet(win) {
        return isAndroid(win) && !testUserAgent(win, /mobile/i);
      };

      var isPhablet = function isPhablet(win) {
        var width = win.innerWidth;
        var height = win.innerHeight;
        var smallest = Math.min(width, height);
        var largest = Math.max(width, height);
        return smallest > 390 && smallest < 520 && largest > 620 && largest < 800;
      };

      var isTablet = function isTablet(win) {
        var width = win.innerWidth;
        var height = win.innerHeight;
        var smallest = Math.min(width, height);
        var largest = Math.max(width, height);
        return isIpad(win) || isAndroidTablet(win) || smallest > 460 && smallest < 820 && largest > 780 && largest < 1400;
      };

      var isMobile = function isMobile(win) {
        return matchMedia(win, '(any-pointer:coarse)');
      };

      var isDesktop = function isDesktop(win) {
        return !isMobile(win);
      };

      var isHybrid = function isHybrid(win) {
        return isCordova(win) || isCapacitorNative(win);
      };

      var isCordova = function isCordova(win) {
        return !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
      };

      var isCapacitorNative = function isCapacitorNative(win) {
        var capacitor = win['Capacitor'];
        return !!(capacitor && capacitor.isNative);
      };

      var isElectron = function isElectron(win) {
        return testUserAgent(win, /electron/i);
      };

      var isPWA = function isPWA(win) {
        return !!(win.matchMedia('(display-mode: standalone)').matches || win.navigator.standalone);
      };

      var testUserAgent = function testUserAgent(win, expr) {
        return expr.test(win.navigator.userAgent);
      };

      var matchMedia = function matchMedia(win, query) {
        return win.matchMedia(query).matches;
      };

      var PLATFORMS_MAP = {
        'ipad': isIpad,
        'iphone': isIphone,
        'ios': isIOS,
        'android': isAndroid,
        'phablet': isPhablet,
        'tablet': isTablet,
        'cordova': isCordova,
        'capacitor': isCapacitorNative,
        'electron': isElectron,
        'pwa': isPWA,
        'mobile': isMobile,
        'mobileweb': isMobileWeb,
        'desktop': isDesktop,
        'hybrid': isHybrid
      };

      var Config = /*#__PURE__*/function () {
        function Config() {
          _classCallCheck(this, Config);

          this.m = new Map();
        }

        _createClass2(Config, [{
          key: "reset",
          value: function reset(configObj) {
            this.m = new Map(Object.entries(configObj));
          }
        }, {
          key: "get",
          value: function get(key, fallback) {
            var value = this.m.get(key);
            return value !== undefined ? value : fallback;
          }
        }, {
          key: "getBoolean",
          value: function getBoolean(key) {
            var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
            var val = this.m.get(key);

            if (val === undefined) {
              return fallback;
            }

            if (typeof val === 'string') {
              return val === 'true';
            }

            return !!val;
          }
        }, {
          key: "getNumber",
          value: function getNumber(key, fallback) {
            var val = parseFloat(this.m.get(key));
            return isNaN(val) ? fallback !== undefined ? fallback : NaN : val;
          }
        }, {
          key: "set",
          value: function set(key, value) {
            this.m.set(key, value);
          }
        }]);

        return Config;
      }();

      var config = /*@__PURE__*/new Config();

      var configFromSession = function configFromSession(win) {
        try {
          var configStr = win.sessionStorage.getItem(IONIC_SESSION_KEY);
          return configStr !== null ? JSON.parse(configStr) : {};
        } catch (e) {
          return {};
        }
      };

      var saveConfig = function saveConfig(win, c) {
        try {
          win.sessionStorage.setItem(IONIC_SESSION_KEY, JSON.stringify(c));
        } catch (e) {
          return;
        }
      };

      var configFromURL = function configFromURL(win) {
        var configObj = {};
        win.location.search.slice(1).split('&').map(function (entry) {
          return entry.split('=');
        }).map(function (_ref50) {
          var _ref51 = _slicedToArray(_ref50, 2),
              key = _ref51[0],
              value = _ref51[1];

          return [decodeURIComponent(key), decodeURIComponent(value)];
        }).filter(function (_ref52) {
          var _ref53 = _slicedToArray(_ref52, 1),
              key = _ref53[0];

          return startsWith(key, IONIC_PREFIX);
        }).map(function (_ref54) {
          var _ref55 = _slicedToArray(_ref54, 2),
              key = _ref55[0],
              value = _ref55[1];

          return [key.slice(IONIC_PREFIX.length), value];
        }).forEach(function (_ref56) {
          var _ref57 = _slicedToArray(_ref56, 2),
              key = _ref57[0],
              value = _ref57[1];

          configObj[key] = value;
        });
        return configObj;
      };

      var startsWith = function startsWith(input, search) {
        return input.substr(0, search.length) === search;
      };

      var IONIC_PREFIX = 'ionic:';
      var IONIC_SESSION_KEY = 'ionic-persist-config';
      var defaultMode;

      var getIonMode = function getIonMode(ref) {
        return ref && Object(_index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__["g"])(ref) || defaultMode;
      };

      var initialize = function initialize() {
        var userConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

        if (typeof window === 'undefined') {
          return;
        }

        var doc = window.document;
        var win = window;
        var Ionic = win.Ionic = win.Ionic || {}; // Setup platforms

        setupPlatforms(win); // create the Ionic.config from raw config object (if it exists)
        // and convert Ionic.config into a ConfigApi that has a get() fn

        var configObj = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, configFromSession(win)), {
          persistConfig: false
        }), Ionic.config), configFromURL(win)), userConfig);
        config.reset(configObj);

        if (config.getBoolean('persistConfig')) {
          saveConfig(win, configObj);
        } // first see if the mode was set as an attribute on <html>
        // which could have been set by the user, or by pre-rendering
        // otherwise get the mode via config settings, and fallback to md


        Ionic.config = config;
        Ionic.mode = defaultMode = config.get('mode', doc.documentElement.getAttribute('mode') || (isPlatform(win, 'ios') ? 'ios' : 'md'));
        config.set('mode', defaultMode);
        doc.documentElement.setAttribute('mode', defaultMode);
        doc.documentElement.classList.add(defaultMode);

        if (config.getBoolean('_testing')) {
          config.set('animated', false);
        }

        var isIonicElement = function isIonicElement(elm) {
          return elm.tagName && elm.tagName.startsWith('ION-');
        };

        var isAllowedIonicModeValue = function isAllowedIonicModeValue(elmMode) {
          return ['ios', 'md'].includes(elmMode);
        };

        Object(_index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__["s"])(function (elm) {
          while (elm) {
            var elmMode = elm.mode || elm.getAttribute('mode');

            if (elmMode) {
              if (isAllowedIonicModeValue(elmMode)) {
                return elmMode;
              } else if (isIonicElement(elm)) {
                console.warn('Invalid ionic mode: "' + elmMode + '", expected: "ios" or "md"');
              }
            }

            elm = elm.parentElement;
          }

          return defaultMode;
        });
      };
      /***/

    },

    /***/
    "EKAo":
    /*!*****************************************************************************!*\
      !*** ./node_modules/@ionic-native/core/__ivy_ngcc__/ionic-native-plugin.js ***!
      \*****************************************************************************/

    /*! exports provided: IonicNativePlugin */

    /***/
    function EKAo(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonicNativePlugin", function () {
        return IonicNativePlugin;
      });
      /* harmony import */


      var _decorators_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./decorators/common */
      "yR3O");
      /* harmony import */


      var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./util */
      "3uIU");

      var IonicNativePlugin =
      /** @class */
      function () {
        function IonicNativePlugin() {}
        /**
         * Returns a boolean that indicates whether the plugin is installed
         * @return {boolean}
         */


        IonicNativePlugin.installed = function () {
          var isAvailable = Object(_decorators_common__WEBPACK_IMPORTED_MODULE_0__["checkAvailability"])(this.pluginRef) === true;
          return isAvailable;
        };
        /**
         * Returns the original plugin object
         */


        IonicNativePlugin.getPlugin = function () {
          if (typeof window !== 'undefined') {
            return Object(_util__WEBPACK_IMPORTED_MODULE_1__["get"])(window, this.pluginRef);
          }

          return null;
        };
        /**
         * Returns the plugin's name
         */


        IonicNativePlugin.getPluginName = function () {
          var pluginName = this.pluginName;
          return pluginName;
        };
        /**
         * Returns the plugin's reference
         */


        IonicNativePlugin.getPluginRef = function () {
          var pluginRef = this.pluginRef;
          return pluginRef;
        };
        /**
         * Returns the plugin's install name
         */


        IonicNativePlugin.getPluginInstallName = function () {
          var plugin = this.plugin;
          return plugin;
        };
        /**
         * Returns the plugin's supported platforms
         */


        IonicNativePlugin.getSupportedPlatforms = function () {
          var platform = this.platforms;
          return platform;
        };

        IonicNativePlugin.pluginName = '';
        IonicNativePlugin.pluginRef = '';
        IonicNativePlugin.plugin = '';
        IonicNativePlugin.repo = '';
        IonicNativePlugin.platforms = [];
        IonicNativePlugin.install = '';
        return IonicNativePlugin;
      }(); //# sourceMappingURL=ionic-native-plugin.js.map

      /***/

    },

    /***/
    "EQ5u":
    /*!*********************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/ConnectableObservable.js ***!
      \*********************************************************************************/

    /*! exports provided: ConnectableObservable, connectableObservableDescriptor */

    /***/
    function EQ5u(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function () {
        return ConnectableObservable;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "connectableObservableDescriptor", function () {
        return connectableObservableDescriptor;
      });
      /* harmony import */


      var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subject */
      "XNiG");
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../Subscription */
      "quSY");
      /* harmony import */


      var _operators_refCount__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ../operators/refCount */
      "x+ZX");

      var ConnectableObservable = /*#__PURE__*/function (_Observable__WEBPACK_) {
        _inherits(ConnectableObservable, _Observable__WEBPACK_);

        var _super152 = _createSuper(ConnectableObservable);

        function ConnectableObservable(source, subjectFactory) {
          var _this373;

          _classCallCheck(this, ConnectableObservable);

          _this373 = _super152.call(this);
          _this373.source = source;
          _this373.subjectFactory = subjectFactory;
          _this373._refCount = 0;
          _this373._isComplete = false;
          return _this373;
        }

        _createClass2(ConnectableObservable, [{
          key: "_subscribe",
          value: function _subscribe(subscriber) {
            return this.getSubject().subscribe(subscriber);
          }
        }, {
          key: "getSubject",
          value: function getSubject() {
            var subject = this._subject;

            if (!subject || subject.isStopped) {
              this._subject = this.subjectFactory();
            }

            return this._subject;
          }
        }, {
          key: "connect",
          value: function connect() {
            var connection = this._connection;

            if (!connection) {
              this._isComplete = false;
              connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"]();
              connection.add(this.source.subscribe(new ConnectableSubscriber(this.getSubject(), this)));

              if (connection.closed) {
                this._connection = null;
                connection = _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
              }
            }

            return connection;
          }
        }, {
          key: "refCount",
          value: function refCount() {
            return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_4__["refCount"])()(this);
          }
        }]);

        return ConnectableObservable;
      }(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]);

      var connectableObservableDescriptor = function () {
        var connectableProto = ConnectableObservable.prototype;
        return {
          operator: {
            value: null
          },
          _refCount: {
            value: 0,
            writable: true
          },
          _subject: {
            value: null,
            writable: true
          },
          _connection: {
            value: null,
            writable: true
          },
          _subscribe: {
            value: connectableProto._subscribe
          },
          _isComplete: {
            value: connectableProto._isComplete,
            writable: true
          },
          getSubject: {
            value: connectableProto.getSubject
          },
          connect: {
            value: connectableProto.connect
          },
          refCount: {
            value: connectableProto.refCount
          }
        };
      }();

      var ConnectableSubscriber = /*#__PURE__*/function (_Subject__WEBPACK_IMP2) {
        _inherits(ConnectableSubscriber, _Subject__WEBPACK_IMP2);

        var _super153 = _createSuper(ConnectableSubscriber);

        function ConnectableSubscriber(destination, connectable) {
          var _this374;

          _classCallCheck(this, ConnectableSubscriber);

          _this374 = _super153.call(this, destination);
          _this374.connectable = connectable;
          return _this374;
        }

        _createClass2(ConnectableSubscriber, [{
          key: "_error",
          value: function _error(err) {
            this._unsubscribe();

            _get(_getPrototypeOf(ConnectableSubscriber.prototype), "_error", this).call(this, err);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.connectable._isComplete = true;

            this._unsubscribe();

            _get(_getPrototypeOf(ConnectableSubscriber.prototype), "_complete", this).call(this);
          }
        }, {
          key: "_unsubscribe",
          value: function _unsubscribe() {
            var connectable = this.connectable;

            if (connectable) {
              this.connectable = null;
              var connection = connectable._connection;
              connectable._refCount = 0;
              connectable._subject = null;
              connectable._connection = null;

              if (connection) {
                connection.unsubscribe();
              }
            }
          }
        }]);

        return ConnectableSubscriber;
      }(_Subject__WEBPACK_IMPORTED_MODULE_0__["SubjectSubscriber"]);

      var RefCountOperator = /*#__PURE__*/function () {
        function RefCountOperator(connectable) {
          _classCallCheck(this, RefCountOperator);

          this.connectable = connectable;
        }

        _createClass2(RefCountOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            var connectable = this.connectable;
            connectable._refCount++;
            var refCounter = new RefCountSubscriber(subscriber, connectable);
            var subscription = source.subscribe(refCounter);

            if (!refCounter.closed) {
              refCounter.connection = connectable.connect();
            }

            return subscription;
          }
        }]);

        return RefCountOperator;
      }();

      var RefCountSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_13) {
        _inherits(RefCountSubscriber, _Subscriber__WEBPACK_13);

        var _super154 = _createSuper(RefCountSubscriber);

        function RefCountSubscriber(destination, connectable) {
          var _this375;

          _classCallCheck(this, RefCountSubscriber);

          _this375 = _super154.call(this, destination);
          _this375.connectable = connectable;
          return _this375;
        }

        _createClass2(RefCountSubscriber, [{
          key: "_unsubscribe",
          value: function _unsubscribe() {
            var connectable = this.connectable;

            if (!connectable) {
              this.connection = null;
              return;
            }

            this.connectable = null;
            var refCount = connectable._refCount;

            if (refCount <= 0) {
              this.connection = null;
              return;
            }

            connectable._refCount = refCount - 1;

            if (refCount > 1) {
              this.connection = null;
              return;
            }

            var connection = this.connection;
            var sharedConnection = connectable._connection;
            this.connection = null;

            if (sharedConnection && (!connection || sharedConnection === connection)) {
              sharedConnection.unsubscribe();
            }
          }
        }]);

        return RefCountSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]); //# sourceMappingURL=ConnectableObservable.js.map

      /***/

    },

    /***/
    "EY2u":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/empty.js ***!
      \*****************************************************************/

    /*! exports provided: EMPTY, empty */

    /***/
    function EY2u(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "EMPTY", function () {
        return EMPTY;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "empty", function () {
        return empty;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");

      var EMPTY = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
        return subscriber.complete();
      });

      function empty(scheduler) {
        return scheduler ? emptyScheduled(scheduler) : EMPTY;
      }

      function emptyScheduled(scheduler) {
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          return scheduler.schedule(function () {
            return subscriber.complete();
          });
        });
      } //# sourceMappingURL=empty.js.map

      /***/

    },

    /***/
    "EldZ":
    /*!*********************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/transaction.js ***!
      \*********************************************************/

    /*! exports provided: Transaction */

    /***/
    function EldZ(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Transaction", function () {
        return Transaction;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_hub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/hub */
      "uzXi");
      /* harmony import */


      var _sentry_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/types */
      "PIsB");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _span__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./span */
      "SYqL");
      /** JSDoc */


      var Transaction =
      /** @class */
      function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Transaction, _super);
        /**
         * This constructor should never be called manually. Those instrumenting tracing should use
         * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.
         * @internal
         * @hideconstructor
         * @hidden
         */

        function Transaction(transactionContext, hub) {
          var _this = _super.call(this, transactionContext) || this;

          _this._measurements = {};
          /**
           * The reference to the current hub.
           */

          _this._hub = Object(_sentry_hub__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])();

          if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["isInstanceOf"])(hub, _sentry_hub__WEBPACK_IMPORTED_MODULE_1__["Hub"])) {
            _this._hub = hub;
          }

          _this.name = transactionContext.name || '';
          _this.metadata = transactionContext.metadata || {};
          _this._trimEnd = transactionContext.trimEnd; // this is because transactions are also spans, and spans have a transaction pointer

          _this.transaction = _this;
          return _this;
        }
        /**
         * JSDoc
         */


        Transaction.prototype.setName = function (name) {
          this.name = name;
        };
        /**
         * Attaches SpanRecorder to the span itself
         * @param maxlen maximum number of spans that can be recorded
         */


        Transaction.prototype.initSpanRecorder = function (maxlen) {
          if (maxlen === void 0) {
            maxlen = 1000;
          }

          if (!this.spanRecorder) {
            this.spanRecorder = new _span__WEBPACK_IMPORTED_MODULE_4__["SpanRecorder"](maxlen);
          }

          this.spanRecorder.add(this);
        };
        /**
         * Set observed measurements for this transaction.
         * @hidden
         */


        Transaction.prototype.setMeasurements = function (measurements) {
          this._measurements = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, measurements);
        };
        /**
         * Set metadata for this transaction.
         * @hidden
         */


        Transaction.prototype.setMetadata = function (newMetadata) {
          this.metadata = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.metadata), newMetadata);
        };
        /**
         * @inheritDoc
         */


        Transaction.prototype.finish = function (endTimestamp) {
          var _this = this;

          var _a, _b, _c, _d, _e; // This transaction is already finished, so we should not flush it again.


          if (this.endTimestamp !== undefined) {
            return undefined;
          }

          if (!this.name) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].warn('Transaction has no name, falling back to `<unlabeled transaction>`.');

            this.name = '<unlabeled transaction>';
          } // just sets the end timestamp


          _super.prototype.finish.call(this, endTimestamp);

          if (this.sampled !== true) {
            // At this point if `sampled !== true` we want to discard the transaction.
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');

            (_e = (_c = (_a = this._hub.getClient()) === null || _a === void 0 ? void 0 : (_b = _a).getTransport) === null || _c === void 0 ? void 0 : (_d = _c.call(_b)).recordLostEvent) === null || _e === void 0 ? void 0 : _e.call(_d, _sentry_types__WEBPACK_IMPORTED_MODULE_2__["Outcome"].SampleRate, 'transaction');
            return undefined;
          }

          var finishedSpans = this.spanRecorder ? this.spanRecorder.spans.filter(function (s) {
            return s !== _this && s.endTimestamp;
          }) : [];

          if (this._trimEnd && finishedSpans.length > 0) {
            this.endTimestamp = finishedSpans.reduce(function (prev, current) {
              if (prev.endTimestamp && current.endTimestamp) {
                return prev.endTimestamp > current.endTimestamp ? prev : current;
              }

              return prev;
            }).endTimestamp;
          }

          var transaction = {
            contexts: {
              trace: this.getTraceContext()
            },
            spans: finishedSpans,
            start_timestamp: this.startTimestamp,
            tags: this.tags,
            timestamp: this.endTimestamp,
            transaction: this.name,
            type: 'transaction',
            debug_meta: this.metadata
          };
          var hasMeasurements = Object.keys(this._measurements).length > 0;

          if (hasMeasurements) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].log('[Measurements] Adding measurements to transaction', JSON.stringify(this._measurements, undefined, 2));

            transaction.measurements = this._measurements;
          }

          _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].log("[Tracing] Finishing " + this.op + " transaction: " + this.name + ".");

          return this._hub.captureEvent(transaction);
        };
        /**
         * @inheritDoc
         */


        Transaction.prototype.toContext = function () {
          var spanContext = _super.prototype.toContext.call(this);

          return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["dropUndefinedKeys"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, spanContext), {
            name: this.name,
            trimEnd: this._trimEnd
          }));
        };
        /**
         * @inheritDoc
         */


        Transaction.prototype.updateWithContext = function (transactionContext) {
          var _a;

          _super.prototype.updateWithContext.call(this, transactionContext);

          this.name = (_a = transactionContext.name, _a !== null && _a !== void 0 ? _a : '');
          this._trimEnd = transactionContext.trimEnd;
          return this;
        };

        return Transaction;
      }(_span__WEBPACK_IMPORTED_MODULE_4__["Span"]); //# sourceMappingURL=transaction.js.map

      /***/

    },

    /***/
    "F5Lp":
    /*!****************************************************************************!*\
      !*** ./node_modules/@capacitor/push-notifications/dist/esm/definitions.js ***!
      \****************************************************************************/

    /*! no exports provided */

    /***/
    function F5Lp(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__); /// <reference types="@capacitor/cli" />
      //# sourceMappingURL=definitions.js.map

      /***/

    },

    /***/
    "F97/":
    /*!*********************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/not.js ***!
      \*********************************************************/

    /*! exports provided: not */

    /***/
    function F97(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "not", function () {
        return not;
      });

      function not(pred, thisArg) {
        function notPred() {
          return !notPred.pred.apply(notPred.thisArg, arguments);
        }

        notPred.pred = pred;
        notPred.thisArg = thisArg;
        return notPred;
      } //# sourceMappingURL=not.js.map

      /***/

    },

    /***/
    "FBKn":
    /*!*******************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/app-globals-fd807b9a.js ***!
      \*******************************************************************/

    /*! exports provided: g */

    /***/
    function FBKn(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "g", function () {
        return globalScripts;
      });
      /* harmony import */


      var _ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./ionic-global-63a97a32.js */
      "E/Mt");

      var globalScripts = _ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_0__["i"];
      /***/
    },

    /***/
    "FD9M":
    /*!***********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferToggle.js ***!
      \***********************************************************************/

    /*! exports provided: bufferToggle */

    /***/
    function FD9M(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "bufferToggle", function () {
        return bufferToggle;
      });
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscription */
      "quSY");
      /* harmony import */


      var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/subscribeToResult */
      "ZUHj");
      /* harmony import */


      var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../OuterSubscriber */
      "l7GE");

      function bufferToggle(openings, closingSelector) {
        return function bufferToggleOperatorFunction(source) {
          return source.lift(new BufferToggleOperator(openings, closingSelector));
        };
      }

      var BufferToggleOperator = /*#__PURE__*/function () {
        function BufferToggleOperator(openings, closingSelector) {
          _classCallCheck(this, BufferToggleOperator);

          this.openings = openings;
          this.closingSelector = closingSelector;
        }

        _createClass2(BufferToggleOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));
          }
        }]);

        return BufferToggleOperator;
      }();

      var BufferToggleSubscriber = /*#__PURE__*/function (_OuterSubscriber__WEB) {
        _inherits(BufferToggleSubscriber, _OuterSubscriber__WEB);

        var _super155 = _createSuper(BufferToggleSubscriber);

        function BufferToggleSubscriber(destination, openings, closingSelector) {
          var _this376;

          _classCallCheck(this, BufferToggleSubscriber);

          _this376 = _super155.call(this, destination);
          _this376.closingSelector = closingSelector;
          _this376.contexts = [];

          _this376.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(_assertThisInitialized(_this376), openings));

          return _this376;
        }

        _createClass2(BufferToggleSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var contexts = this.contexts;
            var len = contexts.length;

            for (var i = 0; i < len; i++) {
              contexts[i].buffer.push(value);
            }
          }
        }, {
          key: "_error",
          value: function _error(err) {
            var contexts = this.contexts;

            while (contexts.length > 0) {
              var context = contexts.shift();
              context.subscription.unsubscribe();
              context.buffer = null;
              context.subscription = null;
            }

            this.contexts = null;

            _get(_getPrototypeOf(BufferToggleSubscriber.prototype), "_error", this).call(this, err);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var contexts = this.contexts;

            while (contexts.length > 0) {
              var context = contexts.shift();
              this.destination.next(context.buffer);
              context.subscription.unsubscribe();
              context.buffer = null;
              context.subscription = null;
            }

            this.contexts = null;

            _get(_getPrototypeOf(BufferToggleSubscriber.prototype), "_complete", this).call(this);
          }
        }, {
          key: "notifyNext",
          value: function notifyNext(outerValue, innerValue) {
            outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete(innerSub) {
            this.closeBuffer(innerSub.context);
          }
        }, {
          key: "openBuffer",
          value: function openBuffer(value) {
            try {
              var closingSelector = this.closingSelector;
              var closingNotifier = closingSelector.call(this, value);

              if (closingNotifier) {
                this.trySubscribe(closingNotifier);
              }
            } catch (err) {
              this._error(err);
            }
          }
        }, {
          key: "closeBuffer",
          value: function closeBuffer(context) {
            var contexts = this.contexts;

            if (contexts && context) {
              var buffer = context.buffer,
                  subscription = context.subscription;
              this.destination.next(buffer);
              contexts.splice(contexts.indexOf(context), 1);
              this.remove(subscription);
              subscription.unsubscribe();
            }
          }
        }, {
          key: "trySubscribe",
          value: function trySubscribe(closingNotifier) {
            var contexts = this.contexts;
            var buffer = [];
            var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"]();
            var context = {
              buffer: buffer,
              subscription: subscription
            };
            contexts.push(context);
            var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, closingNotifier, context);

            if (!innerSubscription || innerSubscription.closed) {
              this.closeBuffer(context);
            } else {
              innerSubscription.context = context;
              this.add(innerSubscription);
              subscription.add(innerSubscription);
            }
          }
        }]);

        return BufferToggleSubscriber;
      }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]); //# sourceMappingURL=bufferToggle.js.map

      /***/

    },

    /***/
    "FGHR":
    /*!***************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/utils.js ***!
      \***************************************************/

    /*! exports provided: TRACEPARENT_REGEXP, hasTracingEnabled, extractTraceparentData, getActiveTransaction, msToSec, secToMs, stripUrlQueryAndFragment */

    /***/
    function FGHR(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TRACEPARENT_REGEXP", function () {
        return TRACEPARENT_REGEXP;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "hasTracingEnabled", function () {
        return hasTracingEnabled;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "extractTraceparentData", function () {
        return extractTraceparentData;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getActiveTransaction", function () {
        return getActiveTransaction;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "msToSec", function () {
        return msToSec;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "secToMs", function () {
        return secToMs;
      });
      /* harmony import */


      var _sentry_hub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/hub */
      "uzXi");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "stripUrlQueryAndFragment", function () {
        return _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["stripUrlQueryAndFragment"];
      });

      var TRACEPARENT_REGEXP = new RegExp('^[ \\t]*' + // whitespace
      '([0-9a-f]{32})?' + // trace_id
      '-?([0-9a-f]{16})?' + // span_id
      '-?([01])?' + // sampled
      '[ \\t]*$');
      /**
       * Determines if tracing is currently enabled.
       *
       * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.
       */

      function hasTracingEnabled(options) {
        if (options === void 0) {
          options = (_a = Object(_sentry_hub__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().getClient()) === null || _a === void 0 ? void 0 : _a.getOptions();
        }

        var _a;

        if (!options) {
          return false;
        }

        return 'tracesSampleRate' in options || 'tracesSampler' in options;
      }
      /**
       * Extract transaction context data from a `sentry-trace` header.
       *
       * @param traceparent Traceparent string
       *
       * @returns Object containing data from the header, or undefined if traceparent string is malformed
       */


      function extractTraceparentData(traceparent) {
        var matches = traceparent.match(TRACEPARENT_REGEXP);

        if (matches) {
          var parentSampled = void 0;

          if (matches[3] === '1') {
            parentSampled = true;
          } else if (matches[3] === '0') {
            parentSampled = false;
          }

          return {
            traceId: matches[1],
            parentSampled: parentSampled,
            parentSpanId: matches[2]
          };
        }

        return undefined;
      }
      /** Grabs active transaction off scope, if any */


      function getActiveTransaction(hub) {
        if (hub === void 0) {
          hub = Object(_sentry_hub__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])();
        }

        var _a, _b;

        return (_b = (_a = hub) === null || _a === void 0 ? void 0 : _a.getScope()) === null || _b === void 0 ? void 0 : _b.getTransaction();
      }
      /**
       * Converts from milliseconds to seconds
       * @param time time in ms
       */


      function msToSec(time) {
        return time / 1000;
      }
      /**
       * Converts from seconds to milliseconds
       * @param time time in seconds
       */


      function secToMs(time) {
        return time * 1000;
      } // so it can be used in manual instrumentation without necessitating a hard dependency on @sentry/utils
      //# sourceMappingURL=utils.js.map

      /***/

    },

    /***/
    "FQKz":
    /*!*****************************************************!*\
      !*** ./node_modules/@sentry/types/esm/transport.js ***!
      \*****************************************************/

    /*! exports provided: Outcome */

    /***/
    function FQKz(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Outcome", function () {
        return Outcome;
      });

      var Outcome;

      (function (Outcome) {
        Outcome["BeforeSend"] = "before_send";
        Outcome["EventProcessor"] = "event_processor";
        Outcome["NetworkError"] = "network_error";
        Outcome["QueueOverflow"] = "queue_overflow";
        Outcome["RateLimitBackoff"] = "ratelimit_backoff";
        Outcome["SampleRate"] = "sample_rate";
      })(Outcome || (Outcome = {})); //# sourceMappingURL=transport.js.map

      /***/

    },

    /***/
    "FQpF":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/expand.js ***!
      \*****************************************************************/

    /*! exports provided: expand, ExpandOperator, ExpandSubscriber */

    /***/
    function FQpF(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "expand", function () {
        return expand;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ExpandOperator", function () {
        return ExpandOperator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ExpandSubscriber", function () {
        return ExpandSubscriber;
      });
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function expand(project) {
        var concurrent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.POSITIVE_INFINITY;
        var scheduler = arguments.length > 2 ? arguments[2] : undefined;
        concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
        return function (source) {
          return source.lift(new ExpandOperator(project, concurrent, scheduler));
        };
      }

      var ExpandOperator = /*#__PURE__*/function () {
        function ExpandOperator(project, concurrent, scheduler) {
          _classCallCheck(this, ExpandOperator);

          this.project = project;
          this.concurrent = concurrent;
          this.scheduler = scheduler;
        }

        _createClass2(ExpandOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
          }
        }]);

        return ExpandOperator;
      }();

      var ExpandSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP7) {
        _inherits(ExpandSubscriber, _innerSubscribe__WEBP7);

        var _super156 = _createSuper(ExpandSubscriber);

        function ExpandSubscriber(destination, project, concurrent, scheduler) {
          var _this377;

          _classCallCheck(this, ExpandSubscriber);

          _this377 = _super156.call(this, destination);
          _this377.project = project;
          _this377.concurrent = concurrent;
          _this377.scheduler = scheduler;
          _this377.index = 0;
          _this377.active = 0;
          _this377.hasCompleted = false;

          if (concurrent < Number.POSITIVE_INFINITY) {
            _this377.buffer = [];
          }

          return _this377;
        }

        _createClass2(ExpandSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var destination = this.destination;

            if (destination.closed) {
              this._complete();

              return;
            }

            var index = this.index++;

            if (this.active < this.concurrent) {
              destination.next(value);

              try {
                var project = this.project;
                var result = project(value, index);

                if (!this.scheduler) {
                  this.subscribeToProjection(result, value, index);
                } else {
                  var state = {
                    subscriber: this,
                    result: result,
                    value: value,
                    index: index
                  };
                  var _destination = this.destination;

                  _destination.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
                }
              } catch (e) {
                destination.error(e);
              }
            } else {
              this.buffer.push(value);
            }
          }
        }, {
          key: "subscribeToProjection",
          value: function subscribeToProjection(result, value, index) {
            this.active++;
            var destination = this.destination;
            destination.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(result, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this)));
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.hasCompleted = true;

            if (this.hasCompleted && this.active === 0) {
              this.destination.complete();
            }

            this.unsubscribe();
          }
        }, {
          key: "notifyNext",
          value: function notifyNext(innerValue) {
            this._next(innerValue);
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            var buffer = this.buffer;
            this.active--;

            if (buffer && buffer.length > 0) {
              this._next(buffer.shift());
            }

            if (this.hasCompleted && this.active === 0) {
              this.destination.complete();
            }
          }
        }], [{
          key: "dispatch",
          value: function dispatch(arg) {
            var subscriber = arg.subscriber,
                result = arg.result,
                value = arg.value,
                index = arg.index;
            subscriber.subscribeToProjection(result, value, index);
          }
        }]);

        return ExpandSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"]); //# sourceMappingURL=expand.js.map

      /***/

    },

    /***/
    "FUe0":
    /*!****************************************************!*\
      !*** ./node_modules/@capacitor/core/dist/index.js ***!
      \****************************************************/

    /*! exports provided: Capacitor, CapacitorException, CapacitorPlatforms, ExceptionCode, Plugins, WebPlugin, WebView, addPlatform, registerPlugin, registerWebPlugin, setPlatform */

    /***/
    function FUe0(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Capacitor", function () {
        return Capacitor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CapacitorException", function () {
        return CapacitorException;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CapacitorPlatforms", function () {
        return CapacitorPlatforms;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ExceptionCode", function () {
        return ExceptionCode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Plugins", function () {
        return Plugins;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "WebPlugin", function () {
        return WebPlugin;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "WebView", function () {
        return WebView;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "addPlatform", function () {
        return addPlatform;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "registerPlugin", function () {
        return registerPlugin;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "registerWebPlugin", function () {
        return registerWebPlugin;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setPlatform", function () {
        return setPlatform;
      });
      /*! Capacitor: https://capacitorjs.com/ - MIT License */


      var createCapacitorPlatforms = function createCapacitorPlatforms(win) {
        var defaultPlatformMap = new Map();
        defaultPlatformMap.set('web', {
          name: 'web'
        });
        var capPlatforms = win.CapacitorPlatforms || {
          currentPlatform: {
            name: 'web'
          },
          platforms: defaultPlatformMap
        };

        var addPlatform = function addPlatform(name, platform) {
          capPlatforms.platforms.set(name, platform);
        };

        var setPlatform = function setPlatform(name) {
          if (capPlatforms.platforms.has(name)) {
            capPlatforms.currentPlatform = capPlatforms.platforms.get(name);
          }
        };

        capPlatforms.addPlatform = addPlatform;
        capPlatforms.setPlatform = setPlatform;
        return capPlatforms;
      };

      var initPlatforms = function initPlatforms(win) {
        return win.CapacitorPlatforms = createCapacitorPlatforms(win);
      };
      /**
       * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead
       */


      var CapacitorPlatforms = /*#__PURE__*/initPlatforms(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {});
      /**
       * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead
       */

      var addPlatform = CapacitorPlatforms.addPlatform;
      /**
       * @deprecated Set `CapacitorCustomPlatform` on the window object prior to runtime executing in the web app instead
       */

      var setPlatform = CapacitorPlatforms.setPlatform;

      var legacyRegisterWebPlugin = function legacyRegisterWebPlugin(cap, webPlugin) {
        var _a;

        var config = webPlugin.config;
        var Plugins = cap.Plugins;

        if (!config || !config.name) {
          // TODO: add link to upgrade guide
          throw new Error("Capacitor WebPlugin is using the deprecated \"registerWebPlugin()\" function, but without the config. Please use \"registerPlugin()\" instead to register this web plugin.\"");
        } // TODO: add link to upgrade guide


        console.warn("Capacitor plugin \"".concat(config.name, "\" is using the deprecated \"registerWebPlugin()\" function"));

        if (!Plugins[config.name] || ((_a = config === null || config === void 0 ? void 0 : config.platforms) === null || _a === void 0 ? void 0 : _a.includes(cap.getPlatform()))) {
          // Add the web plugin into the plugins registry if there already isn't
          // an existing one. If it doesn't already exist, that means
          // there's no existing native implementation for it.
          // - OR -
          // If we already have a plugin registered (meaning it was defined in the native layer),
          // then we should only overwrite it if the corresponding web plugin activates on
          // a certain platform. For example: Geolocation uses the WebPlugin on Android but not iOS
          Plugins[config.name] = webPlugin;
        }
      };

      var ExceptionCode;

      (function (ExceptionCode) {
        /**
         * API is not implemented.
         *
         * This usually means the API can't be used because it is not implemented for
         * the current platform.
         */
        ExceptionCode["Unimplemented"] = "UNIMPLEMENTED";
        /**
         * API is not available.
         *
         * This means the API can't be used right now because:
         *   - it is currently missing a prerequisite, such as network connectivity
         *   - it requires a particular platform or browser version
         */

        ExceptionCode["Unavailable"] = "UNAVAILABLE";
      })(ExceptionCode || (ExceptionCode = {}));

      var CapacitorException = /*#__PURE__*/function (_Error) {
        _inherits(CapacitorException, _Error);

        var _super157 = _createSuper(CapacitorException);

        function CapacitorException(message, code) {
          var _this378;

          _classCallCheck(this, CapacitorException);

          _this378 = _super157.call(this, message);
          _this378.message = message;
          _this378.code = code;
          return _this378;
        }

        return CapacitorException;
      }( /*#__PURE__*/_wrapNativeSuper(Error));

      var getPlatformId = function getPlatformId(win) {
        var _a, _b;

        if (win === null || win === void 0 ? void 0 : win.androidBridge) {
          return 'android';
        } else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) {
          return 'ios';
        } else {
          return 'web';
        }
      };

      var createCapacitor = function createCapacitor(win) {
        var _a, _b, _c, _d, _e;

        var capCustomPlatform = win.CapacitorCustomPlatform || null;
        var cap = win.Capacitor || {};
        var Plugins = cap.Plugins = cap.Plugins || {};
        /**
         * @deprecated Use `capCustomPlatform` instead, default functions like registerPlugin will function with the new object.
         */

        var capPlatforms = win.CapacitorPlatforms;

        var defaultGetPlatform = function defaultGetPlatform() {
          return capCustomPlatform !== null ? capCustomPlatform.name : getPlatformId(win);
        };

        var getPlatform = ((_a = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _a === void 0 ? void 0 : _a.getPlatform) || defaultGetPlatform;

        var defaultIsNativePlatform = function defaultIsNativePlatform() {
          return getPlatform() !== 'web';
        };

        var isNativePlatform = ((_b = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _b === void 0 ? void 0 : _b.isNativePlatform) || defaultIsNativePlatform;

        var defaultIsPluginAvailable = function defaultIsPluginAvailable(pluginName) {
          var plugin = registeredPlugins.get(pluginName);

          if (plugin === null || plugin === void 0 ? void 0 : plugin.platforms.has(getPlatform())) {
            // JS implementation available for the current platform.
            return true;
          }

          if (getPluginHeader(pluginName)) {
            // Native implementation available.
            return true;
          }

          return false;
        };

        var isPluginAvailable = ((_c = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _c === void 0 ? void 0 : _c.isPluginAvailable) || defaultIsPluginAvailable;

        var defaultGetPluginHeader = function defaultGetPluginHeader(pluginName) {
          var _a;

          return (_a = cap.PluginHeaders) === null || _a === void 0 ? void 0 : _a.find(function (h) {
            return h.name === pluginName;
          });
        };

        var getPluginHeader = ((_d = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _d === void 0 ? void 0 : _d.getPluginHeader) || defaultGetPluginHeader;

        var handleError = function handleError(err) {
          return win.console.error(err);
        };

        var pluginMethodNoop = function pluginMethodNoop(_target, prop, pluginName) {
          return Promise.reject("".concat(pluginName, " does not have an implementation of \"").concat(prop, "\"."));
        };

        var registeredPlugins = new Map();

        var defaultRegisterPlugin = function defaultRegisterPlugin(pluginName) {
          var jsImplementations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
          var registeredPlugin = registeredPlugins.get(pluginName);

          if (registeredPlugin) {
            console.warn("Capacitor plugin \"".concat(pluginName, "\" already registered. Cannot register plugins twice."));
            return registeredPlugin.proxy;
          }

          var platform = getPlatform();
          var pluginHeader = getPluginHeader(pluginName);
          var jsImplementation;

          var loadPluginImplementation = /*#__PURE__*/function () {
            var _ref58 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
              return regeneratorRuntime.wrap(function _callee2$(_context4) {
                while (1) {
                  switch (_context4.prev = _context4.next) {
                    case 0:
                      if (!(!jsImplementation && platform in jsImplementations)) {
                        _context4.next = 11;
                        break;
                      }

                      if (!(typeof jsImplementations[platform] === 'function')) {
                        _context4.next = 7;
                        break;
                      }

                      _context4.next = 4;
                      return jsImplementations[platform]();

                    case 4:
                      _context4.t0 = jsImplementation = _context4.sent;
                      _context4.next = 8;
                      break;

                    case 7:
                      _context4.t0 = jsImplementation = jsImplementations[platform];

                    case 8:
                      jsImplementation = _context4.t0;
                      _context4.next = 20;
                      break;

                    case 11:
                      if (!(capCustomPlatform !== null && !jsImplementation && 'web' in jsImplementations)) {
                        _context4.next = 20;
                        break;
                      }

                      if (!(typeof jsImplementations['web'] === 'function')) {
                        _context4.next = 18;
                        break;
                      }

                      _context4.next = 15;
                      return jsImplementations['web']();

                    case 15:
                      _context4.t1 = jsImplementation = _context4.sent;
                      _context4.next = 19;
                      break;

                    case 18:
                      _context4.t1 = jsImplementation = jsImplementations['web'];

                    case 19:
                      jsImplementation = _context4.t1;

                    case 20:
                      return _context4.abrupt("return", jsImplementation);

                    case 21:
                    case "end":
                      return _context4.stop();
                  }
                }
              }, _callee2);
            }));

            return function loadPluginImplementation() {
              return _ref58.apply(this, arguments);
            };
          }();

          var createPluginMethod = function createPluginMethod(impl, prop) {
            var _a, _b;

            if (pluginHeader) {
              var methodHeader = pluginHeader === null || pluginHeader === void 0 ? void 0 : pluginHeader.methods.find(function (m) {
                return prop === m.name;
              });

              if (methodHeader) {
                if (methodHeader.rtype === 'promise') {
                  return function (options) {
                    return cap.nativePromise(pluginName, prop.toString(), options);
                  };
                } else {
                  return function (options, callback) {
                    return cap.nativeCallback(pluginName, prop.toString(), options, callback);
                  };
                }
              } else if (impl) {
                return (_a = impl[prop]) === null || _a === void 0 ? void 0 : _a.bind(impl);
              }
            } else if (impl) {
              return (_b = impl[prop]) === null || _b === void 0 ? void 0 : _b.bind(impl);
            } else {
              throw new CapacitorException("\"".concat(pluginName, "\" plugin is not implemented on ").concat(platform), ExceptionCode.Unimplemented);
            }
          };

          var createPluginMethodWrapper = function createPluginMethodWrapper(prop) {
            var remove;

            var wrapper = function wrapper() {
              for (var _len16 = arguments.length, args = new Array(_len16), _key17 = 0; _key17 < _len16; _key17++) {
                args[_key17] = arguments[_key17];
              }

              var p = loadPluginImplementation().then(function (impl) {
                var fn = createPluginMethod(impl, prop);

                if (fn) {
                  var _p = fn.apply(void 0, args);

                  remove = _p === null || _p === void 0 ? void 0 : _p.remove;
                  return _p;
                } else {
                  throw new CapacitorException("\"".concat(pluginName, ".").concat(prop, "()\" is not implemented on ").concat(platform), ExceptionCode.Unimplemented);
                }
              });

              if (prop === 'addListener') {
                p.remove = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
                  return regeneratorRuntime.wrap(function _callee3$(_context5) {
                    while (1) {
                      switch (_context5.prev = _context5.next) {
                        case 0:
                          return _context5.abrupt("return", remove());

                        case 1:
                        case "end":
                          return _context5.stop();
                      }
                    }
                  }, _callee3);
                }));
              }

              return p;
            }; // Some flair ✨


            wrapper.toString = function () {
              return "".concat(prop.toString(), "() { [capacitor code] }");
            };

            Object.defineProperty(wrapper, 'name', {
              value: prop,
              writable: false,
              configurable: false
            });
            return wrapper;
          };

          var addListener = createPluginMethodWrapper('addListener');
          var removeListener = createPluginMethodWrapper('removeListener');

          var addListenerNative = function addListenerNative(eventName, callback) {
            var call = addListener({
              eventName: eventName
            }, callback);

            var remove = /*#__PURE__*/function () {
              var _ref60 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
                var callbackId;
                return regeneratorRuntime.wrap(function _callee4$(_context6) {
                  while (1) {
                    switch (_context6.prev = _context6.next) {
                      case 0:
                        _context6.next = 2;
                        return call;

                      case 2:
                        callbackId = _context6.sent;
                        removeListener({
                          eventName: eventName,
                          callbackId: callbackId
                        }, callback);

                      case 4:
                      case "end":
                        return _context6.stop();
                    }
                  }
                }, _callee4);
              }));

              return function remove() {
                return _ref60.apply(this, arguments);
              };
            }();

            var p = new Promise(function (resolve) {
              return call.then(function () {
                return resolve({
                  remove: remove
                });
              });
            });
            p.remove = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
              return regeneratorRuntime.wrap(function _callee5$(_context7) {
                while (1) {
                  switch (_context7.prev = _context7.next) {
                    case 0:
                      console.warn("Using addListener() without 'await' is deprecated.");
                      _context7.next = 3;
                      return remove();

                    case 3:
                    case "end":
                      return _context7.stop();
                  }
                }
              }, _callee5);
            }));
            return p;
          };

          var proxy = new Proxy({}, {
            get: function get(_, prop) {
              switch (prop) {
                // https://github.com/facebook/react/issues/20030
                case '$$typeof':
                  return undefined;

                case 'toJSON':
                  return function () {
                    return {};
                  };

                case 'addListener':
                  return pluginHeader ? addListenerNative : addListener;

                case 'removeListener':
                  return removeListener;

                default:
                  return createPluginMethodWrapper(prop);
              }
            }
          });
          Plugins[pluginName] = proxy;
          registeredPlugins.set(pluginName, {
            name: pluginName,
            proxy: proxy,
            platforms: new Set([].concat(_toConsumableArray(Object.keys(jsImplementations)), _toConsumableArray(pluginHeader ? [platform] : [])))
          });
          return proxy;
        };

        var registerPlugin = ((_e = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _e === void 0 ? void 0 : _e.registerPlugin) || defaultRegisterPlugin; // Add in convertFileSrc for web, it will already be available in native context

        if (!cap.convertFileSrc) {
          cap.convertFileSrc = function (filePath) {
            return filePath;
          };
        }

        cap.getPlatform = getPlatform;
        cap.handleError = handleError;
        cap.isNativePlatform = isNativePlatform;
        cap.isPluginAvailable = isPluginAvailable;
        cap.pluginMethodNoop = pluginMethodNoop;
        cap.registerPlugin = registerPlugin;
        cap.Exception = CapacitorException;
        cap.DEBUG = !!cap.DEBUG;
        cap.isLoggingEnabled = !!cap.isLoggingEnabled; // Deprecated props

        cap.platform = cap.getPlatform();
        cap.isNative = cap.isNativePlatform();
        return cap;
      };

      var initCapacitorGlobal = function initCapacitorGlobal(win) {
        return win.Capacitor = createCapacitor(win);
      };

      var Capacitor = /*#__PURE__*/initCapacitorGlobal(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {});
      var registerPlugin = Capacitor.registerPlugin;
      /**
       * @deprecated Provided for backwards compatibility for Capacitor v2 plugins.
       * Capacitor v3 plugins should import the plugin directly. This "Plugins"
       * export is deprecated in v3, and will be removed in v4.
       */

      var Plugins = Capacitor.Plugins;
      /**
       * Provided for backwards compatibility. Use the registerPlugin() API
       * instead, and provide the web plugin as the "web" implmenetation.
       * For example
       *
       * export const Example = registerPlugin('Example', {
       *   web: () => import('./web').then(m => new m.Example())
       * })
       *
       * @deprecated Deprecated in v3, will be removed from v4.
       */

      var registerWebPlugin = function registerWebPlugin(plugin) {
        return legacyRegisterWebPlugin(Capacitor, plugin);
      };
      /**
       * Base class web plugins should extend.
       */


      var WebPlugin = /*#__PURE__*/function () {
        function WebPlugin(config) {
          _classCallCheck(this, WebPlugin);

          this.listeners = {};
          this.windowListeners = {};

          if (config) {
            // TODO: add link to upgrade guide
            console.warn("Capacitor WebPlugin \"".concat(config.name, "\" config object was deprecated in v3 and will be removed in v4."));
            this.config = config;
          }
        }

        _createClass2(WebPlugin, [{
          key: "addListener",
          value: function addListener(eventName, listenerFunc) {
            var _this379 = this;

            var listeners = this.listeners[eventName];

            if (!listeners) {
              this.listeners[eventName] = [];
            }

            this.listeners[eventName].push(listenerFunc); // If we haven't added a window listener for this event and it requires one,
            // go ahead and add it

            var windowListener = this.windowListeners[eventName];

            if (windowListener && !windowListener.registered) {
              this.addWindowListener(windowListener);
            }

            var remove = /*#__PURE__*/function () {
              var _ref62 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
                return regeneratorRuntime.wrap(function _callee6$(_context8) {
                  while (1) {
                    switch (_context8.prev = _context8.next) {
                      case 0:
                        return _context8.abrupt("return", _this379.removeListener(eventName, listenerFunc));

                      case 1:
                      case "end":
                        return _context8.stop();
                    }
                  }
                }, _callee6);
              }));

              return function remove() {
                return _ref62.apply(this, arguments);
              };
            }();

            var p = Promise.resolve({
              remove: remove
            });
            Object.defineProperty(p, 'remove', {
              value: function () {
                var _value9 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
                  return regeneratorRuntime.wrap(function _callee7$(_context9) {
                    while (1) {
                      switch (_context9.prev = _context9.next) {
                        case 0:
                          console.warn("Using addListener() without 'await' is deprecated.");
                          _context9.next = 3;
                          return remove();

                        case 3:
                        case "end":
                          return _context9.stop();
                      }
                    }
                  }, _callee7);
                }));

                function value() {
                  return _value9.apply(this, arguments);
                }

                return value;
              }()
            });
            return p;
          }
        }, {
          key: "removeAllListeners",
          value: function () {
            var _removeAllListeners = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
              var listener;
              return regeneratorRuntime.wrap(function _callee8$(_context10) {
                while (1) {
                  switch (_context10.prev = _context10.next) {
                    case 0:
                      this.listeners = {};

                      for (listener in this.windowListeners) {
                        this.removeWindowListener(this.windowListeners[listener]);
                      }

                      this.windowListeners = {};

                    case 3:
                    case "end":
                      return _context10.stop();
                  }
                }
              }, _callee8, this);
            }));

            function removeAllListeners() {
              return _removeAllListeners.apply(this, arguments);
            }

            return removeAllListeners;
          }()
        }, {
          key: "notifyListeners",
          value: function notifyListeners(eventName, data) {
            var listeners = this.listeners[eventName];

            if (listeners) {
              listeners.forEach(function (listener) {
                return listener(data);
              });
            }
          }
        }, {
          key: "hasListeners",
          value: function hasListeners(eventName) {
            return !!this.listeners[eventName].length;
          }
        }, {
          key: "registerWindowListener",
          value: function registerWindowListener(windowEventName, pluginEventName) {
            var _this380 = this;

            this.windowListeners[pluginEventName] = {
              registered: false,
              windowEventName: windowEventName,
              pluginEventName: pluginEventName,
              handler: function handler(event) {
                _this380.notifyListeners(pluginEventName, event);
              }
            };
          }
        }, {
          key: "unimplemented",
          value: function unimplemented() {
            var msg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'not implemented';
            return new Capacitor.Exception(msg, ExceptionCode.Unimplemented);
          }
        }, {
          key: "unavailable",
          value: function unavailable() {
            var msg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'not available';
            return new Capacitor.Exception(msg, ExceptionCode.Unavailable);
          }
        }, {
          key: "removeListener",
          value: function () {
            var _removeListener = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(eventName, listenerFunc) {
              var listeners, index;
              return regeneratorRuntime.wrap(function _callee9$(_context11) {
                while (1) {
                  switch (_context11.prev = _context11.next) {
                    case 0:
                      listeners = this.listeners[eventName];

                      if (listeners) {
                        _context11.next = 3;
                        break;
                      }

                      return _context11.abrupt("return");

                    case 3:
                      index = listeners.indexOf(listenerFunc);
                      this.listeners[eventName].splice(index, 1); // If there are no more listeners for this type of event,
                      // remove the window listener

                      if (!this.listeners[eventName].length) {
                        this.removeWindowListener(this.windowListeners[eventName]);
                      }

                    case 6:
                    case "end":
                      return _context11.stop();
                  }
                }
              }, _callee9, this);
            }));

            function removeListener(_x2, _x3) {
              return _removeListener.apply(this, arguments);
            }

            return removeListener;
          }()
        }, {
          key: "addWindowListener",
          value: function addWindowListener(handle) {
            window.addEventListener(handle.windowEventName, handle.handler);
            handle.registered = true;
          }
        }, {
          key: "removeWindowListener",
          value: function removeWindowListener(handle) {
            if (!handle) {
              return;
            }

            window.removeEventListener(handle.windowEventName, handle.handler);
            handle.registered = false;
          }
        }]);

        return WebPlugin;
      }();

      var WebView = /*#__PURE__*/registerPlugin('WebView'); //# sourceMappingURL=index.js.map

      /***/
    },

    /***/
    "FZB8":
    /*!**************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/min.js ***!
      \**************************************************************/

    /*! exports provided: min */

    /***/
    function FZB8(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "min", function () {
        return min;
      });
      /* harmony import */


      var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./reduce */
      "128B");

      function min(comparer) {
        var min = typeof comparer === 'function' ? function (x, y) {
          return comparer(x, y) < 0 ? x : y;
        } : function (x, y) {
          return x < y ? x : y;
        };
        return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(min);
      } //# sourceMappingURL=min.js.map

      /***/

    },

    /***/
    "Fm1u":
    /*!*********************************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/bindReporter.js ***!
      \*********************************************************************************/

    /*! exports provided: bindReporter */

    /***/
    function Fm1u(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "bindReporter", function () {
        return bindReporter;
      });
      /*
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *     https://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var bindReporter = function bindReporter(callback, metric, reportAllChanges) {
        var prevValue;
        return function (forceReport) {
          if (metric.value >= 0) {
            if (forceReport || reportAllChanges) {
              metric.delta = metric.value - (prevValue || 0); // Report the metric if there's a non-zero delta or if no previous
              // value exists (which can happen in the case of the document becoming
              // hidden when the metric value is 0).
              // See: https://github.com/GoogleChrome/web-vitals/issues/14

              if (metric.delta || prevValue === undefined) {
                prevValue = metric.value;
                callback(metric);
              }
            }
          }
        };
      }; //# sourceMappingURL=bindReporter.js.map

      /***/

    },

    /***/
    "GJmQ":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/takeWhile.js ***!
      \********************************************************************/

    /*! exports provided: takeWhile */

    /***/
    function GJmQ(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "takeWhile", function () {
        return takeWhile;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function takeWhile(predicate) {
        var inclusive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
        return function (source) {
          return source.lift(new TakeWhileOperator(predicate, inclusive));
        };
      }

      var TakeWhileOperator = /*#__PURE__*/function () {
        function TakeWhileOperator(predicate, inclusive) {
          _classCallCheck(this, TakeWhileOperator);

          this.predicate = predicate;
          this.inclusive = inclusive;
        }

        _createClass2(TakeWhileOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));
          }
        }]);

        return TakeWhileOperator;
      }();

      var TakeWhileSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_14) {
        _inherits(TakeWhileSubscriber, _Subscriber__WEBPACK_14);

        var _super158 = _createSuper(TakeWhileSubscriber);

        function TakeWhileSubscriber(destination, predicate, inclusive) {
          var _this381;

          _classCallCheck(this, TakeWhileSubscriber);

          _this381 = _super158.call(this, destination);
          _this381.predicate = predicate;
          _this381.inclusive = inclusive;
          _this381.index = 0;
          return _this381;
        }

        _createClass2(TakeWhileSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var destination = this.destination;
            var result;

            try {
              result = this.predicate(value, this.index++);
            } catch (err) {
              destination.error(err);
              return;
            }

            this.nextOrComplete(value, result);
          }
        }, {
          key: "nextOrComplete",
          value: function nextOrComplete(value, predicateResult) {
            var destination = this.destination;

            if (Boolean(predicateResult)) {
              destination.next(value);
            } else {
              if (this.inclusive) {
                destination.next(value);
              }

              destination.complete();
            }
          }
        }]);

        return TakeWhileSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=takeWhile.js.map

      /***/

    },

    /***/
    "Gi4w":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/every.js ***!
      \****************************************************************/

    /*! exports provided: every */

    /***/
    function Gi4w(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "every", function () {
        return every;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function every(predicate, thisArg) {
        return function (source) {
          return source.lift(new EveryOperator(predicate, thisArg, source));
        };
      }

      var EveryOperator = /*#__PURE__*/function () {
        function EveryOperator(predicate, thisArg, source) {
          _classCallCheck(this, EveryOperator);

          this.predicate = predicate;
          this.thisArg = thisArg;
          this.source = source;
        }

        _createClass2(EveryOperator, [{
          key: "call",
          value: function call(observer, source) {
            return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));
          }
        }]);

        return EveryOperator;
      }();

      var EverySubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_15) {
        _inherits(EverySubscriber, _Subscriber__WEBPACK_15);

        var _super159 = _createSuper(EverySubscriber);

        function EverySubscriber(destination, predicate, thisArg, source) {
          var _this382;

          _classCallCheck(this, EverySubscriber);

          _this382 = _super159.call(this, destination);
          _this382.predicate = predicate;
          _this382.thisArg = thisArg;
          _this382.source = source;
          _this382.index = 0;
          _this382.thisArg = thisArg || _assertThisInitialized(_this382);
          return _this382;
        }

        _createClass2(EverySubscriber, [{
          key: "notifyComplete",
          value: function notifyComplete(everyValueMatch) {
            this.destination.next(everyValueMatch);
            this.destination.complete();
          }
        }, {
          key: "_next",
          value: function _next(value) {
            var result = false;

            try {
              result = this.predicate.call(this.thisArg, value, this.index++, this.source);
            } catch (err) {
              this.destination.error(err);
              return;
            }

            if (!result) {
              this.notifyComplete(false);
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.notifyComplete(true);
          }
        }]);

        return EverySubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=every.js.map

      /***/

    },

    /***/
    "GjHo":
    /*!**************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/zip.js ***!
      \**************************************************************/

    /*! exports provided: zip */

    /***/
    function GjHo(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "zip", function () {
        return zip;
      });
      /* harmony import */


      var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../observable/zip */
      "1uah");

      function zip() {
        for (var _len17 = arguments.length, observables = new Array(_len17), _key18 = 0; _key18 < _len17; _key18++) {
          observables[_key18] = arguments[_key18];
        }

        return function zipOperatorFunction(source) {
          return source.lift.call(Object(_observable_zip__WEBPACK_IMPORTED_MODULE_0__["zip"]).apply(void 0, [source].concat(observables)));
        };
      } //# sourceMappingURL=zip.js.map

      /***/

    },

    /***/
    "Gqsl":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/repeatWhen.js ***!
      \*********************************************************************/

    /*! exports provided: repeatWhen */

    /***/
    function Gqsl(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "repeatWhen", function () {
        return repeatWhen;
      });
      /* harmony import */


      var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subject */
      "XNiG");
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function repeatWhen(notifier) {
        return function (source) {
          return source.lift(new RepeatWhenOperator(notifier));
        };
      }

      var RepeatWhenOperator = /*#__PURE__*/function () {
        function RepeatWhenOperator(notifier) {
          _classCallCheck(this, RepeatWhenOperator);

          this.notifier = notifier;
        }

        _createClass2(RepeatWhenOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));
          }
        }]);

        return RepeatWhenOperator;
      }();

      var RepeatWhenSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP8) {
        _inherits(RepeatWhenSubscriber, _innerSubscribe__WEBP8);

        var _super160 = _createSuper(RepeatWhenSubscriber);

        function RepeatWhenSubscriber(destination, notifier, source) {
          var _this383;

          _classCallCheck(this, RepeatWhenSubscriber);

          _this383 = _super160.call(this, destination);
          _this383.notifier = notifier;
          _this383.source = source;
          _this383.sourceIsBeingSubscribedTo = true;
          return _this383;
        }

        _createClass2(RepeatWhenSubscriber, [{
          key: "notifyNext",
          value: function notifyNext() {
            this.sourceIsBeingSubscribedTo = true;
            this.source.subscribe(this);
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            if (this.sourceIsBeingSubscribedTo === false) {
              return _get(_getPrototypeOf(RepeatWhenSubscriber.prototype), "complete", this).call(this);
            }
          }
        }, {
          key: "complete",
          value: function complete() {
            this.sourceIsBeingSubscribedTo = false;

            if (!this.isStopped) {
              if (!this.retries) {
                this.subscribeToRetries();
              }

              if (!this.retriesSubscription || this.retriesSubscription.closed) {
                return _get(_getPrototypeOf(RepeatWhenSubscriber.prototype), "complete", this).call(this);
              }

              this._unsubscribeAndRecycle();

              this.notifications.next(undefined);
            }
          }
        }, {
          key: "_unsubscribe",
          value: function _unsubscribe() {
            var notifications = this.notifications,
                retriesSubscription = this.retriesSubscription;

            if (notifications) {
              notifications.unsubscribe();
              this.notifications = undefined;
            }

            if (retriesSubscription) {
              retriesSubscription.unsubscribe();
              this.retriesSubscription = undefined;
            }

            this.retries = undefined;
          }
        }, {
          key: "_unsubscribeAndRecycle",
          value: function _unsubscribeAndRecycle() {
            var _unsubscribe = this._unsubscribe;
            this._unsubscribe = null;

            _get(_getPrototypeOf(RepeatWhenSubscriber.prototype), "_unsubscribeAndRecycle", this).call(this);

            this._unsubscribe = _unsubscribe;
            return this;
          }
        }, {
          key: "subscribeToRetries",
          value: function subscribeToRetries() {
            this.notifications = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
            var retries;

            try {
              var notifier = this.notifier;
              retries = notifier(this.notifications);
            } catch (e) {
              return _get(_getPrototypeOf(RepeatWhenSubscriber.prototype), "complete", this).call(this);
            }

            this.retries = retries;
            this.retriesSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(retries, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](this));
          }
        }]);

        return RepeatWhenSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"]); //# sourceMappingURL=repeatWhen.js.map

      /***/

    },

    /***/
    "GyhO":
    /*!******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/concat.js ***!
      \******************************************************************/

    /*! exports provided: concat */

    /***/
    function GyhO(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "concat", function () {
        return concat;
      });
      /* harmony import */


      var _of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./of */
      "LRne");
      /* harmony import */


      var _operators_concatAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../operators/concatAll */
      "0EUg");

      function concat() {
        return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_1__["concatAll"])()(Object(_of__WEBPACK_IMPORTED_MODULE_0__["of"]).apply(void 0, arguments));
      } //# sourceMappingURL=concat.js.map

      /***/

    },

    /***/
    "HD7q":
    /*!**************************************************************************************!*\
      !*** ./node_modules/@ionic-native/core/__ivy_ngcc__/decorators/instance-property.js ***!
      \**************************************************************************************/

    /*! exports provided: instancePropertyGet, instancePropertySet */

    /***/
    function HD7q(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "instancePropertyGet", function () {
        return instancePropertyGet;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "instancePropertySet", function () {
        return instancePropertySet;
      });

      function instancePropertyGet(pluginObj, key) {
        if (pluginObj._objectInstance && pluginObj._objectInstance[key]) {
          return pluginObj._objectInstance[key];
        }

        return null;
      }

      function instancePropertySet(pluginObj, key, value) {
        if (pluginObj._objectInstance) {
          pluginObj._objectInstance[key] = value;
        }
      } //# sourceMappingURL=instance-property.js.map

      /***/

    },

    /***/
    "HDdC":
    /*!***********************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/Observable.js ***!
      \***********************************************************/

    /*! exports provided: Observable */

    /***/
    function HDdC(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Observable", function () {
        return Observable;
      });
      /* harmony import */


      var _util_canReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./util/canReportError */
      "8Qeq");
      /* harmony import */


      var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./util/toSubscriber */
      "WyKG");
      /* harmony import */


      var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./symbol/observable */
      "kJWO");
      /* harmony import */


      var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./util/pipe */
      "mCNh");
      /* harmony import */


      var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./config */
      "2fFW");

      var Observable = /*#__PURE__*/function (_symbol_observable__W) {
        function Observable(subscribe) {
          _classCallCheck(this, Observable);

          this._isScalar = false;

          if (subscribe) {
            this._subscribe = subscribe;
          }
        }

        _createClass2(Observable, [{
          key: "lift",
          value: function lift(operator) {
            var observable = new Observable();
            observable.source = this;
            observable.operator = operator;
            return observable;
          }
        }, {
          key: "subscribe",
          value: function subscribe(observerOrNext, error, complete) {
            var operator = this.operator;
            var sink = Object(_util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__["toSubscriber"])(observerOrNext, error, complete);

            if (operator) {
              sink.add(operator.call(sink, this.source));
            } else {
              sink.add(this.source || _config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable ? this._subscribe(sink) : this._trySubscribe(sink));
            }

            if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
              if (sink.syncErrorThrowable) {
                sink.syncErrorThrowable = false;

                if (sink.syncErrorThrown) {
                  throw sink.syncErrorValue;
                }
              }
            }

            return sink;
          }
        }, {
          key: "_trySubscribe",
          value: function _trySubscribe(sink) {
            try {
              return this._subscribe(sink);
            } catch (err) {
              if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
                sink.syncErrorThrown = true;
                sink.syncErrorValue = err;
              }

              if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_0__["canReportError"])(sink)) {
                sink.error(err);
              } else {
                console.warn(err);
              }
            }
          }
        }, {
          key: "forEach",
          value: function forEach(next, promiseCtor) {
            var _this384 = this;

            promiseCtor = getPromiseCtor(promiseCtor);
            return new promiseCtor(function (resolve, reject) {
              var subscription;
              subscription = _this384.subscribe(function (value) {
                try {
                  next(value);
                } catch (err) {
                  reject(err);

                  if (subscription) {
                    subscription.unsubscribe();
                  }
                }
              }, reject, resolve);
            });
          }
        }, {
          key: "_subscribe",
          value: function _subscribe(subscriber) {
            var source = this.source;
            return source && source.subscribe(subscriber);
          }
        }, {
          key: _symbol_observable__W,
          value: function value() {
            return this;
          }
        }, {
          key: "pipe",
          value: function pipe() {
            for (var _len18 = arguments.length, operations = new Array(_len18), _key19 = 0; _key19 < _len18; _key19++) {
              operations[_key19] = arguments[_key19];
            }

            if (operations.length === 0) {
              return this;
            }

            return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipeFromArray"])(operations)(this);
          }
        }, {
          key: "toPromise",
          value: function toPromise(promiseCtor) {
            var _this385 = this;

            promiseCtor = getPromiseCtor(promiseCtor);
            return new promiseCtor(function (resolve, reject) {
              var value;

              _this385.subscribe(function (x) {
                return value = x;
              }, function (err) {
                return reject(err);
              }, function () {
                return resolve(value);
              });
            });
          }
        }]);

        return Observable;
      }(_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]);

      Observable.create = function (subscribe) {
        return new Observable(subscribe);
      };

      function getPromiseCtor(promiseCtor) {
        if (!promiseCtor) {
          promiseCtor = _config__WEBPACK_IMPORTED_MODULE_4__["config"].Promise || Promise;
        }

        if (!promiseCtor) {
          throw new Error('no Promise impl found');
        }

        return promiseCtor;
      } //# sourceMappingURL=Observable.js.map

      /***/

    },

    /***/
    "HR75":
    /*!*******************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/syncpromise.js ***!
      \*******************************************************/

    /*! exports provided: SyncPromise */

    /***/
    function HR75(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SyncPromise", function () {
        return SyncPromise;
      });
      /* harmony import */


      var _is__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./is */
      "9AQC");
      /* eslint-disable @typescript-eslint/explicit-function-return-type */

      /* eslint-disable @typescript-eslint/typedef */

      /* eslint-disable @typescript-eslint/explicit-module-boundary-types */

      /* eslint-disable @typescript-eslint/no-explicit-any */

      /** SyncPromise internal states */


      var States;

      (function (States) {
        /** Pending */
        States["PENDING"] = "PENDING";
        /** Resolved / OK */

        States["RESOLVED"] = "RESOLVED";
        /** Rejected / Error */

        States["REJECTED"] = "REJECTED";
      })(States || (States = {}));
      /**
       * Thenable class that behaves like a Promise and follows it's interface
       * but is not async internally
       */


      var SyncPromise =
      /** @class */
      function () {
        function SyncPromise(executor) {
          var _this = this;

          this._state = States.PENDING;
          this._handlers = [];
          /** JSDoc */

          this._resolve = function (value) {
            _this._setResult(States.RESOLVED, value);
          };
          /** JSDoc */


          this._reject = function (reason) {
            _this._setResult(States.REJECTED, reason);
          };
          /** JSDoc */


          this._setResult = function (state, value) {
            if (_this._state !== States.PENDING) {
              return;
            }

            if (Object(_is__WEBPACK_IMPORTED_MODULE_0__["isThenable"])(value)) {
              void value.then(_this._resolve, _this._reject);
              return;
            }

            _this._state = state;
            _this._value = value;

            _this._executeHandlers();
          }; // TODO: FIXME

          /** JSDoc */


          this._attachHandler = function (handler) {
            _this._handlers = _this._handlers.concat(handler);

            _this._executeHandlers();
          };
          /** JSDoc */


          this._executeHandlers = function () {
            if (_this._state === States.PENDING) {
              return;
            }

            var cachedHandlers = _this._handlers.slice();

            _this._handlers = [];
            cachedHandlers.forEach(function (handler) {
              if (handler.done) {
                return;
              }

              if (_this._state === States.RESOLVED) {
                if (handler.onfulfilled) {
                  // eslint-disable-next-line @typescript-eslint/no-floating-promises
                  handler.onfulfilled(_this._value);
                }
              }

              if (_this._state === States.REJECTED) {
                if (handler.onrejected) {
                  handler.onrejected(_this._value);
                }
              }

              handler.done = true;
            });
          };

          try {
            executor(this._resolve, this._reject);
          } catch (e) {
            this._reject(e);
          }
        }
        /** JSDoc */


        SyncPromise.resolve = function (value) {
          return new SyncPromise(function (resolve) {
            resolve(value);
          });
        };
        /** JSDoc */


        SyncPromise.reject = function (reason) {
          return new SyncPromise(function (_, reject) {
            reject(reason);
          });
        };
        /** JSDoc */


        SyncPromise.all = function (collection) {
          return new SyncPromise(function (resolve, reject) {
            if (!Array.isArray(collection)) {
              reject(new TypeError("Promise.all requires an array as input."));
              return;
            }

            if (collection.length === 0) {
              resolve([]);
              return;
            }

            var counter = collection.length;
            var resolvedCollection = [];
            collection.forEach(function (item, index) {
              void SyncPromise.resolve(item).then(function (value) {
                resolvedCollection[index] = value;
                counter -= 1;

                if (counter !== 0) {
                  return;
                }

                resolve(resolvedCollection);
              }).then(null, reject);
            });
          });
        };
        /** JSDoc */


        SyncPromise.prototype.then = function (_onfulfilled, _onrejected) {
          var _this = this;

          return new SyncPromise(function (resolve, reject) {
            _this._attachHandler({
              done: false,
              onfulfilled: function onfulfilled(result) {
                if (!_onfulfilled) {
                  // TODO: ¯\_(ツ)_/¯
                  // TODO: FIXME
                  resolve(result);
                  return;
                }

                try {
                  resolve(_onfulfilled(result));
                  return;
                } catch (e) {
                  reject(e);
                  return;
                }
              },
              onrejected: function onrejected(reason) {
                if (!_onrejected) {
                  reject(reason);
                  return;
                }

                try {
                  resolve(_onrejected(reason));
                  return;
                } catch (e) {
                  reject(e);
                  return;
                }
              }
            });
          });
        };
        /** JSDoc */


        SyncPromise.prototype["catch"] = function (onrejected) {
          return this.then(function (val) {
            return val;
          }, onrejected);
        };
        /** JSDoc */


        SyncPromise.prototype["finally"] = function (onfinally) {
          var _this = this;

          return new SyncPromise(function (resolve, reject) {
            var val;
            var isRejected;
            return _this.then(function (value) {
              isRejected = false;
              val = value;

              if (onfinally) {
                onfinally();
              }
            }, function (reason) {
              isRejected = true;
              val = reason;

              if (onfinally) {
                onfinally();
              }
            }).then(function () {
              if (isRejected) {
                reject(val);
                return;
              }

              resolve(val);
            });
          });
        };
        /** JSDoc */


        SyncPromise.prototype.toString = function () {
          return '[object SyncPromise]';
        };

        return SyncPromise;
      }(); //# sourceMappingURL=syncpromise.js.map

      /***/

    },

    /***/
    "Hh5Z":
    /*!*************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduler/QueueScheduler.js ***!
      \*************************************************************************/

    /*! exports provided: QueueScheduler */

    /***/
    function Hh5Z(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "QueueScheduler", function () {
        return QueueScheduler;
      });
      /* harmony import */


      var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./AsyncScheduler */
      "IjjT");

      var QueueScheduler = /*#__PURE__*/function (_AsyncScheduler__WEBP) {
        _inherits(QueueScheduler, _AsyncScheduler__WEBP);

        var _super161 = _createSuper(QueueScheduler);

        function QueueScheduler() {
          _classCallCheck(this, QueueScheduler);

          return _super161.apply(this, arguments);
        }

        return QueueScheduler;
      }(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__["AsyncScheduler"]); //# sourceMappingURL=QueueScheduler.js.map

      /***/

    },

    /***/
    "Hkhx":
    /*!*****************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/onErrorResumeNext.js ***!
      \*****************************************************************************/

    /*! exports provided: onErrorResumeNext */

    /***/
    function Hkhx(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function () {
        return onErrorResumeNext;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./from */
      "Cfvw");
      /* harmony import */


      var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../util/isArray */
      "DH7j");
      /* harmony import */


      var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./empty */
      "EY2u");

      function onErrorResumeNext() {
        for (var _len19 = arguments.length, sources = new Array(_len19), _key20 = 0; _key20 < _len19; _key20++) {
          sources[_key20] = arguments[_key20];
        }

        if (sources.length === 0) {
          return _empty__WEBPACK_IMPORTED_MODULE_3__["EMPTY"];
        }

        var first = sources[0],
            remainder = sources.slice(1);

        if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(first)) {
          return onErrorResumeNext.apply(void 0, _toConsumableArray(first));
        }

        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          var subNext = function subNext() {
            return subscriber.add(onErrorResumeNext.apply(void 0, _toConsumableArray(remainder)).subscribe(subscriber));
          };

          return Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(first).subscribe({
            next: function next(value) {
              subscriber.next(value);
            },
            error: subNext,
            complete: subNext
          });
        });
      } //# sourceMappingURL=onErrorResumeNext.js.map

      /***/

    },

    /***/
    "HrJb":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/count.js ***!
      \****************************************************************/

    /*! exports provided: count */

    /***/
    function HrJb(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "count", function () {
        return count;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function count(predicate) {
        return function (source) {
          return source.lift(new CountOperator(predicate, source));
        };
      }

      var CountOperator = /*#__PURE__*/function () {
        function CountOperator(predicate, source) {
          _classCallCheck(this, CountOperator);

          this.predicate = predicate;
          this.source = source;
        }

        _createClass2(CountOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
          }
        }]);

        return CountOperator;
      }();

      var CountSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_16) {
        _inherits(CountSubscriber, _Subscriber__WEBPACK_16);

        var _super162 = _createSuper(CountSubscriber);

        function CountSubscriber(destination, predicate, source) {
          var _this386;

          _classCallCheck(this, CountSubscriber);

          _this386 = _super162.call(this, destination);
          _this386.predicate = predicate;
          _this386.source = source;
          _this386.count = 0;
          _this386.index = 0;
          return _this386;
        }

        _createClass2(CountSubscriber, [{
          key: "_next",
          value: function _next(value) {
            if (this.predicate) {
              this._tryPredicate(value);
            } else {
              this.count++;
            }
          }
        }, {
          key: "_tryPredicate",
          value: function _tryPredicate(value) {
            var result;

            try {
              result = this.predicate(value, this.index++, this.source);
            } catch (err) {
              this.destination.error(err);
              return;
            }

            if (result) {
              this.count++;
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.destination.next(this.count);
            this.destination.complete();
          }
        }]);

        return CountSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=count.js.map

      /***/

    },

    /***/
    "I/3d":
    /*!************************************************************************************!*\
      !*** ./node_modules/@angular/fire/__ivy_ngcc__/fesm2015/angular-fire-firestore.js ***!
      \************************************************************************************/

    /*! exports provided: AngularFirestore, AngularFirestoreCollection, AngularFirestoreCollectionGroup, AngularFirestoreDocument, AngularFirestoreModule, ENABLE_PERSISTENCE, PERSISTENCE_SETTINGS, SETTINGS, USE_EMULATOR, associateQuery, combineChange, combineChanges, docChanges, fromCollectionRef, fromDocRef, fromRef, sortedChanges, validateEventsArray */

    /***/
    function I3d(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AngularFirestore", function () {
        return AngularFirestore;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AngularFirestoreCollection", function () {
        return AngularFirestoreCollection;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AngularFirestoreCollectionGroup", function () {
        return AngularFirestoreCollectionGroup;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AngularFirestoreDocument", function () {
        return AngularFirestoreDocument;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AngularFirestoreModule", function () {
        return AngularFirestoreModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ENABLE_PERSISTENCE", function () {
        return ENABLE_PERSISTENCE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PERSISTENCE_SETTINGS", function () {
        return PERSISTENCE_SETTINGS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SETTINGS", function () {
        return SETTINGS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "USE_EMULATOR", function () {
        return USE_EMULATOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "associateQuery", function () {
        return associateQuery;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "combineChange", function () {
        return combineChange;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "combineChanges", function () {
        return combineChanges;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "docChanges", function () {
        return docChanges;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "fromCollectionRef", function () {
        return fromCollectionRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "fromDocRef", function () {
        return fromDocRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "fromRef", function () {
        return fromRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "sortedChanges", function () {
        return sortedChanges;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "validateEventsArray", function () {
        return validateEventsArray;
      });
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! rxjs */
      "qCKp");
      /* harmony import */


      var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! rxjs/operators */
      "kU1M");
      /* harmony import */


      var _angular_fire__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @angular/fire */
      "spgP");
      /* harmony import */


      var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! @angular/common */
      "ofXK");
      /* harmony import */


      var firebase_app__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! firebase/app */
      "Jgta");
      /* harmony import */


      var firebase_firestore__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! firebase/firestore */
      "5x/H");
      /* harmony import */


      var _angular_fire_auth__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! @angular/fire/auth */
      "UbJi");

      function _fromRef(ref) {
        var scheduler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : rxjs__WEBPACK_IMPORTED_MODULE_1__["asyncScheduler"];
        return new rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"](function (subscriber) {
          var unsubscribe;

          if (scheduler != null) {
            scheduler.schedule(function () {
              unsubscribe = ref.onSnapshot({
                includeMetadataChanges: true
              }, subscriber);
            });
          } else {
            unsubscribe = ref.onSnapshot({
              includeMetadataChanges: true
            }, subscriber);
          }

          return function () {
            if (unsubscribe != null) {
              unsubscribe();
            }
          };
        });
      }

      function fromRef(ref, scheduler) {
        return _fromRef(ref, scheduler);
      }

      function fromDocRef(ref, scheduler) {
        return fromRef(ref, scheduler).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["startWith"])(undefined), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["pairwise"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (_ref63) {
          var _ref64 = _slicedToArray(_ref63, 2),
              priorPayload = _ref64[0],
              payload = _ref64[1];

          if (!payload.exists) {
            return {
              payload: payload,
              type: 'removed'
            };
          }

          if (!(priorPayload === null || priorPayload === void 0 ? void 0 : priorPayload.exists)) {
            return {
              payload: payload,
              type: 'added'
            };
          }

          return {
            payload: payload,
            type: 'modified'
          };
        }));
      }

      function fromCollectionRef(ref, scheduler) {
        return fromRef(ref, scheduler).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (payload) {
          return {
            payload: payload,
            type: 'query'
          };
        }));
      }
      /**
       * Return a stream of document changes on a query. These results are not in sort order but in
       * order of occurence.
       */


      function docChanges(query, scheduler) {
        return fromCollectionRef(query, scheduler).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["startWith"])(undefined), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["pairwise"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (_ref65) {
          var _ref66 = _slicedToArray(_ref65, 2),
              priorAction = _ref66[0],
              action = _ref66[1];

          var docChanges = action.payload.docChanges();
          var actions = docChanges.map(function (change) {
            return {
              type: change.type,
              payload: change
            };
          }); // the metadata has changed from the prior emission

          if (priorAction && JSON.stringify(priorAction.payload.metadata) !== JSON.stringify(action.payload.metadata)) {
            // go through all the docs in payload and figure out which ones changed
            action.payload.docs.forEach(function (currentDoc, currentIndex) {
              var docChange = docChanges.find(function (d) {
                return d.doc.ref.isEqual(currentDoc.ref);
              });
              var priorDoc = priorAction === null || priorAction === void 0 ? void 0 : priorAction.payload.docs.find(function (d) {
                return d.ref.isEqual(currentDoc.ref);
              });

              if (docChange && JSON.stringify(docChange.doc.metadata) === JSON.stringify(currentDoc.metadata) || !docChange && priorDoc && JSON.stringify(priorDoc.metadata) === JSON.stringify(currentDoc.metadata)) {// document doesn't appear to have changed, don't log another action
              } else {
                // since the actions are processed in order just push onto the array
                actions.push({
                  type: 'modified',
                  payload: {
                    oldIndex: currentIndex,
                    newIndex: currentIndex,
                    type: 'modified',
                    doc: currentDoc
                  }
                });
              }
            });
          }

          return actions;
        }));
      }
      /**
       * Return a stream of document changes on a query. These results are in sort order.
       */


      function sortedChanges(query, events, scheduler) {
        return docChanges(query, scheduler).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["scan"])(function (current, changes) {
          return combineChanges(current, changes.map(function (it) {
            return it.payload;
          }), events);
        }, []), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["distinctUntilChanged"])(), // cut down on unneed change cycles
        Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (changes) {
          return changes.map(function (c) {
            return {
              type: c.type,
              payload: c
            };
          });
        }));
      }
      /**
       * Combines the total result set from the current set of changes from an incoming set
       * of changes.
       */


      function combineChanges(current, changes, events) {
        changes.forEach(function (change) {
          // skip unwanted change types
          if (events.indexOf(change.type) > -1) {
            current = combineChange(current, change);
          }
        });
        return current;
      }
      /**
       * Splice arguments on top of a sliced array, to break top-level ===
       * this is useful for change-detection
       */


      function sliceAndSplice(original, start, deleteCount) {
        var returnArray = original.slice();

        for (var _len20 = arguments.length, args = new Array(_len20 > 3 ? _len20 - 3 : 0), _key21 = 3; _key21 < _len20; _key21++) {
          args[_key21 - 3] = arguments[_key21];
        }

        returnArray.splice.apply(returnArray, [start, deleteCount].concat(args));
        return returnArray;
      }
      /**
       * Creates a new sorted array from a new change.
       * Build our own because we allow filtering of action types ('added', 'removed', 'modified') before scanning
       * and so we have greater control over change detection (by breaking ===)
       */


      function combineChange(combined, change) {
        switch (change.type) {
          case 'added':
            if (combined[change.newIndex] && combined[change.newIndex].doc.ref.isEqual(change.doc.ref)) {// Not sure why the duplicates are getting fired
            } else {
              return sliceAndSplice(combined, change.newIndex, 0, change);
            }

            break;

          case 'modified':
            if (combined[change.oldIndex] == null || combined[change.oldIndex].doc.ref.isEqual(change.doc.ref)) {
              // When an item changes position we first remove it
              // and then add it's new position
              if (change.oldIndex !== change.newIndex) {
                var copiedArray = combined.slice();
                copiedArray.splice(change.oldIndex, 1);
                copiedArray.splice(change.newIndex, 0, change);
                return copiedArray;
              } else {
                return sliceAndSplice(combined, change.newIndex, 1, change);
              }
            }

            break;

          case 'removed':
            if (combined[change.oldIndex] && combined[change.oldIndex].doc.ref.isEqual(change.doc.ref)) {
              return sliceAndSplice(combined, change.oldIndex, 1);
            }

            break;
        }

        return combined;
      }

      function validateEventsArray(events) {
        if (!events || events.length === 0) {
          events = ['added', 'removed', 'modified'];
        }

        return events;
      }
      /**
       * AngularFirestoreCollection service
       *
       * This class creates a reference to a Firestore Collection. A reference and a query are provided in
       * in the constructor. The query can be the unqueried reference if no query is desired.The class
       * is generic which gives you type safety for data update methods and data streaming.
       *
       * This class uses Symbol.observable to transform into Observable using Observable.from().
       *
       * This class is rarely used directly and should be created from the AngularFirestore service.
       *
       * Example:
       *
       * const collectionRef = firebase.firestore.collection('stocks');
       * const query = collectionRef.where('price', '>', '0.01');
       * const fakeStock = new AngularFirestoreCollection<Stock>(collectionRef, query);
       *
       * // NOTE!: the updates are performed on the reference not the query
       * await fakeStock.add({ name: 'FAKE', price: 0.01 });
       *
       * // Subscribe to changes as snapshots. This provides you data updates as well as delta updates.
       * fakeStock.valueChanges().subscribe(value => console.log(value));
       */


      var AngularFirestoreCollection = /*#__PURE__*/function () {
        /**
         * The constructor takes in a CollectionReference and Query to provide wrapper methods
         * for data operations and data streaming.
         *
         * Note: Data operation methods are done on the reference not the query. This means
         * when you update data it is not updating data to the window of your query unless
         * the data fits the criteria of the query. See the AssociatedRefence type for details
         * on this implication.
         */
        function AngularFirestoreCollection(ref, query, afs) {
          _classCallCheck(this, AngularFirestoreCollection);

          this.ref = ref;
          this.query = query;
          this.afs = afs;
        }
        /**
         * Listen to the latest change in the stream. This method returns changes
         * as they occur and they are not sorted by query order. This allows you to construct
         * your own data structure.
         */


        _createClass2(AngularFirestoreCollection, [{
          key: "stateChanges",
          value: function stateChanges(events) {
            var source = docChanges(this.query, this.afs.schedulers.outsideAngular);

            if (events && events.length > 0) {
              source = source.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (actions) {
                return actions.filter(function (change) {
                  return events.indexOf(change.type) > -1;
                });
              }));
            }

            return source.pipe( // We want to filter out empty arrays, but always emit at first, so the developer knows
            // that the collection has been resolve; even if it's empty
            Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["startWith"])(undefined), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["pairwise"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["filter"])(function (_ref67) {
              var _ref68 = _slicedToArray(_ref67, 2),
                  prior = _ref68[0],
                  current = _ref68[1];

              return current.length > 0 || !prior;
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (_ref69) {
              var _ref70 = _slicedToArray(_ref69, 2),
                  prior = _ref70[0],
                  current = _ref70[1];

              return current;
            }), this.afs.keepUnstableUntilFirst);
          }
          /**
           * Create a stream of changes as they occur it time. This method is similar to stateChanges()
           * but it collects each event in an array over time.
           */

        }, {
          key: "auditTrail",
          value: function auditTrail(events) {
            return this.stateChanges(events).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["scan"])(function (current, action) {
              return [].concat(_toConsumableArray(current), _toConsumableArray(action));
            }, []));
          }
          /**
           * Create a stream of synchronized changes. This method keeps the local array in sorted
           * query order.
           */

        }, {
          key: "snapshotChanges",
          value: function snapshotChanges(events) {
            var validatedEvents = validateEventsArray(events);
            var scheduledSortedChanges$ = sortedChanges(this.query, validatedEvents, this.afs.schedulers.outsideAngular);
            return scheduledSortedChanges$.pipe(this.afs.keepUnstableUntilFirst);
          }
        }, {
          key: "valueChanges",
          value: function valueChanges() {
            var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            return fromCollectionRef(this.query, this.afs.schedulers.outsideAngular).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (actions) {
              return actions.payload.docs.map(function (a) {
                if (options.idField) {
                  return Object.assign(Object.assign({}, a.data()), _defineProperty({}, options.idField, a.id));
                } else {
                  return a.data();
                }
              });
            }), this.afs.keepUnstableUntilFirst);
          }
          /**
           * Retrieve the results of the query once.
           */

        }, {
          key: "get",
          value: function get(options) {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["from"])(this.query.get(options)).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["observeOn"])(this.afs.schedulers.insideAngular));
          }
          /**
           * Add data to a collection reference.
           *
           * Note: Data operation methods are done on the reference not the query. This means
           * when you update data it is not updating data to the window of your query unless
           * the data fits the criteria of the query.
           */

        }, {
          key: "add",
          value: function add(data) {
            return this.ref.add(data);
          }
          /**
           * Create a reference to a single document in a collection.
           */

        }, {
          key: "doc",
          value: function doc(path) {
            // TODO is there a better way to solve this type issue
            return new AngularFirestoreDocument(this.ref.doc(path), this.afs);
          }
        }]);

        return AngularFirestoreCollection;
      }();
      /**
       * AngularFirestoreDocument service
       *
       * This class creates a reference to a Firestore Document. A reference is provided in
       * in the constructor. The class is generic which gives you type safety for data update
       * methods and data streaming.
       *
       * This class uses Symbol.observable to transform into Observable using Observable.from().
       *
       * This class is rarely used directly and should be created from the AngularFirestore service.
       *
       * Example:
       *
       * const fakeStock = new AngularFirestoreDocument<Stock>(doc('stocks/FAKE'));
       * await fakeStock.set({ name: 'FAKE', price: 0.01 });
       * fakeStock.valueChanges().map(snap => {
       *   if(snap.exists) return snap.data();
       *   return null;
       * }).subscribe(value => console.log(value));
       * // OR! Transform using Observable.from() and the data is unwrapped for you
       * Observable.from(fakeStock).subscribe(value => console.log(value));
       */


      var AngularFirestoreDocument = /*#__PURE__*/function () {
        /**
         * The constructor takes in a DocumentReference to provide wrapper methods
         * for data operations, data streaming, and Symbol.observable.
         */
        function AngularFirestoreDocument(ref, afs) {
          _classCallCheck(this, AngularFirestoreDocument);

          this.ref = ref;
          this.afs = afs;
        }
        /**
         * Create or overwrite a single document.
         */


        _createClass2(AngularFirestoreDocument, [{
          key: "set",
          value: function set(data, options) {
            return this.ref.set(data, options);
          }
          /**
           * Update some fields of a document without overwriting the entire document.
           */

        }, {
          key: "update",
          value: function update(data) {
            return this.ref.update(data);
          }
          /**
           * Delete a document.
           */

        }, {
          key: "delete",
          value: function _delete() {
            return this.ref["delete"]();
          }
          /**
           * Create a reference to a sub-collection given a path and an optional query
           * function.
           */

        }, {
          key: "collection",
          value: function collection(path, queryFn) {
            var collectionRef = this.ref.collection(path);

            var _associateQuery = associateQuery(collectionRef, queryFn),
                ref = _associateQuery.ref,
                query = _associateQuery.query;

            return new AngularFirestoreCollection(ref, query, this.afs);
          }
          /**
           * Listen to snapshot updates from the document.
           */

        }, {
          key: "snapshotChanges",
          value: function snapshotChanges() {
            var scheduledFromDocRef$ = fromDocRef(this.ref, this.afs.schedulers.outsideAngular);
            return scheduledFromDocRef$.pipe(this.afs.keepUnstableUntilFirst);
          }
        }, {
          key: "valueChanges",
          value: function valueChanges() {
            var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            return this.snapshotChanges().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (_ref71) {
              var payload = _ref71.payload;
              return options.idField ? Object.assign(Object.assign({}, payload.data()), _defineProperty({}, options.idField, payload.id)) : payload.data();
            }));
          }
          /**
           * Retrieve the document once.
           */

        }, {
          key: "get",
          value: function get(options) {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["from"])(this.ref.get(options)).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["observeOn"])(this.afs.schedulers.insideAngular));
          }
        }]);

        return AngularFirestoreDocument;
      }();
      /**
       * AngularFirestoreCollectionGroup service
       *
       * This class holds a reference to a Firestore Collection Group Query.
       *
       * This class uses Symbol.observable to transform into Observable using Observable.from().
       *
       * This class is rarely used directly and should be created from the AngularFirestore service.
       *
       * Example:
       *
       * const collectionGroup = firebase.firestore.collectionGroup('stocks');
       * const query = collectionRef.where('price', '>', '0.01');
       * const fakeStock = new AngularFirestoreCollectionGroup<Stock>(query, afs);
       *
       * // Subscribe to changes as snapshots. This provides you data updates as well as delta updates.
       * fakeStock.valueChanges().subscribe(value => console.log(value));
       */


      var AngularFirestoreCollectionGroup = /*#__PURE__*/function () {
        /**
         * The constructor takes in a CollectionGroupQuery to provide wrapper methods
         * for data operations and data streaming.
         */
        function AngularFirestoreCollectionGroup(query, afs) {
          _classCallCheck(this, AngularFirestoreCollectionGroup);

          this.query = query;
          this.afs = afs;
        }
        /**
         * Listen to the latest change in the stream. This method returns changes
         * as they occur and they are not sorted by query order. This allows you to construct
         * your own data structure.
         */


        _createClass2(AngularFirestoreCollectionGroup, [{
          key: "stateChanges",
          value: function stateChanges(events) {
            if (!events || events.length === 0) {
              return docChanges(this.query, this.afs.schedulers.outsideAngular).pipe(this.afs.keepUnstableUntilFirst);
            }

            return docChanges(this.query, this.afs.schedulers.outsideAngular).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (actions) {
              return actions.filter(function (change) {
                return events.indexOf(change.type) > -1;
              });
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["filter"])(function (changes) {
              return changes.length > 0;
            }), this.afs.keepUnstableUntilFirst);
          }
          /**
           * Create a stream of changes as they occur it time. This method is similar to stateChanges()
           * but it collects each event in an array over time.
           */

        }, {
          key: "auditTrail",
          value: function auditTrail(events) {
            return this.stateChanges(events).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["scan"])(function (current, action) {
              return [].concat(_toConsumableArray(current), _toConsumableArray(action));
            }, []));
          }
          /**
           * Create a stream of synchronized changes. This method keeps the local array in sorted
           * query order.
           */

        }, {
          key: "snapshotChanges",
          value: function snapshotChanges(events) {
            var validatedEvents = validateEventsArray(events);
            var scheduledSortedChanges$ = sortedChanges(this.query, validatedEvents, this.afs.schedulers.outsideAngular);
            return scheduledSortedChanges$.pipe(this.afs.keepUnstableUntilFirst);
          }
        }, {
          key: "valueChanges",
          value: function valueChanges() {
            var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            var fromCollectionRefScheduled$ = fromCollectionRef(this.query, this.afs.schedulers.outsideAngular);
            return fromCollectionRefScheduled$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (actions) {
              return actions.payload.docs.map(function (a) {
                if (options.idField) {
                  return Object.assign(_defineProperty({}, options.idField, a.id), a.data());
                } else {
                  return a.data();
                }
              });
            }), this.afs.keepUnstableUntilFirst);
          }
          /**
           * Retrieve the results of the query once.
           */

        }, {
          key: "get",
          value: function get(options) {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["from"])(this.query.get(options)).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["observeOn"])(this.afs.schedulers.insideAngular));
          }
        }]);

        return AngularFirestoreCollectionGroup;
      }();
      /**
       * The value of this token determines whether or not the firestore will have persistance enabled
       */


      var ENABLE_PERSISTENCE = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('angularfire2.enableFirestorePersistence');
      var PERSISTENCE_SETTINGS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('angularfire2.firestore.persistenceSettings');
      var SETTINGS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('angularfire2.firestore.settings');
      var USE_EMULATOR = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('angularfire2.firestore.use-emulator');
      /**
       * A utility methods for associating a collection reference with
       * a query.
       *
       * @param collectionRef - A collection reference to query
       * @param queryFn - The callback to create a query
       *
       * Example:
       * const { query, ref } = associateQuery(docRef.collection('items'), ref => {
       *  return ref.where('age', '<', 200);
       * });
       */

      function associateQuery(collectionRef) {
        var queryFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (ref) {
          return ref;
        };
        var query = queryFn(collectionRef);
        var ref = collectionRef;
        return {
          query: query,
          ref: ref
        };
      }
      /**
       * AngularFirestore Service
       *
       * This service is the main entry point for this feature module. It provides
       * an API for creating Collection and Reference services. These services can
       * then be used to do data updates and observable streams of the data.
       *
       * Example:
       *
       * import { Component } from '@angular/core';
       * import { AngularFirestore, AngularFirestoreCollection, AngularFirestoreDocument } from '@angular/fire/firestore';
       * import { Observable } from 'rxjs/Observable';
       * import { from } from 'rxjs/observable';
       *
       * @Component({
       *   selector: 'app-my-component',
       *   template: `
       *    <h2>Items for {{ (profile | async)?.name }}
       *    <ul>
       *       <li *ngFor="let item of items | async">{{ item.name }}</li>
       *    </ul>
       *    <div class="control-input">
       *       <input type="text" #itemname />
       *       <button (click)="addItem(itemname.value)">Add Item</button>
       *    </div>
       *   `
       * })
       * export class MyComponent implements OnInit {
       *
       *   // services for data operations and data streaming
       *   private readonly itemsRef: AngularFirestoreCollection<Item>;
       *   private readonly profileRef: AngularFirestoreDocument<Profile>;
       *
       *   // observables for template
       *   items: Observable<Item[]>;
       *   profile: Observable<Profile>;
       *
       *   // inject main service
       *   constructor(private readonly afs: AngularFirestore) {}
       *
       *   ngOnInit() {
       *     this.itemsRef = afs.collection('items', ref => ref.where('user', '==', 'davideast').limit(10));
       *     this.items = this.itemsRef.valueChanges().map(snap => snap.docs.map(data => doc.data()));
       *     // this.items = from(this.itemsRef); // you can also do this with no mapping
       *
       *     this.profileRef = afs.doc('users/davideast');
       *     this.profile = this.profileRef.valueChanges();
       *   }
       *
       *   addItem(name: string) {
       *     const user = 'davideast';
       *     this.itemsRef.add({ name, user });
       *   }
       * }
       */


      var AngularFirestore = /*#__PURE__*/function () {
        /**
         * Each Feature of AngularFire has a FirebaseApp injected. This way we
         * don't rely on the main Firebase App instance and we can create named
         * apps and use multiple apps.
         */
        function AngularFirestore(options, nameOrConfig, shouldEnablePersistence, settings, // tslint:disable-next-line:ban-types
        platformId, zone, persistenceSettings, _useEmulator, useAuthEmulator) {
          _classCallCheck(this, AngularFirestore);

          this.schedulers = new _angular_fire__WEBPACK_IMPORTED_MODULE_3__["ɵAngularFireSchedulers"](zone);
          this.keepUnstableUntilFirst = Object(_angular_fire__WEBPACK_IMPORTED_MODULE_3__["ɵkeepUnstableUntilFirstFactory"])(this.schedulers);
          var app = Object(_angular_fire__WEBPACK_IMPORTED_MODULE_3__["ɵfirebaseAppFactory"])(options, zone, nameOrConfig);

          if (!firebase_app__WEBPACK_IMPORTED_MODULE_5__["default"].auth && useAuthEmulator) {
            Object(_angular_fire__WEBPACK_IMPORTED_MODULE_3__["ɵlogAuthEmulatorError"])();
          }

          var useEmulator = _useEmulator;

          var _Object = Object(_angular_fire__WEBPACK_IMPORTED_MODULE_3__["ɵfetchInstance"])("".concat(app.name, ".firestore"), 'AngularFirestore', app, function () {
            var firestore = zone.runOutsideAngular(function () {
              return app.firestore();
            });

            if (settings) {
              firestore.settings(settings);
            }

            if (useEmulator) {
              firestore.useEmulator.apply(firestore, _toConsumableArray(useEmulator));
            }

            if (shouldEnablePersistence && !Object(_angular_common__WEBPACK_IMPORTED_MODULE_4__["isPlatformServer"])(platformId)) {
              // We need to try/catch here because not all enablePersistence() failures are caught
              // https://github.com/firebase/firebase-js-sdk/issues/608
              var enablePersistence = function enablePersistence() {
                try {
                  return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["from"])(firestore.enablePersistence(persistenceSettings || undefined).then(function () {
                    return true;
                  }, function () {
                    return false;
                  }));
                } catch (e) {
                  if (typeof console !== 'undefined') {
                    console.warn(e);
                  }

                  return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(false);
                }
              };

              return [firestore, zone.runOutsideAngular(enablePersistence)];
            } else {
              return [firestore, Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(false)];
            }
          }, [settings, useEmulator, shouldEnablePersistence]);

          var _Object2 = _slicedToArray(_Object, 2);

          this.firestore = _Object2[0];
          this.persistenceEnabled$ = _Object2[1];
        }

        _createClass2(AngularFirestore, [{
          key: "collection",
          value: function collection(pathOrRef, queryFn) {
            var collectionRef;

            if (typeof pathOrRef === 'string') {
              collectionRef = this.firestore.collection(pathOrRef);
            } else {
              collectionRef = pathOrRef;
            }

            var _associateQuery2 = associateQuery(collectionRef, queryFn),
                ref = _associateQuery2.ref,
                query = _associateQuery2.query;

            var refInZone = this.schedulers.ngZone.run(function () {
              return ref;
            });
            return new AngularFirestoreCollection(refInZone, query, this);
          }
          /**
           * Create a reference to a Firestore Collection Group based on a collectionId
           * and an optional query function to narrow the result
           * set.
           */

        }, {
          key: "collectionGroup",
          value: function collectionGroup(collectionId, queryGroupFn) {
            var queryFn = queryGroupFn || function (ref) {
              return ref;
            };

            var collectionGroup = this.firestore.collectionGroup(collectionId);
            return new AngularFirestoreCollectionGroup(queryFn(collectionGroup), this);
          }
        }, {
          key: "doc",
          value: function doc(pathOrRef) {
            var ref;

            if (typeof pathOrRef === 'string') {
              ref = this.firestore.doc(pathOrRef);
            } else {
              ref = pathOrRef;
            }

            var refInZone = this.schedulers.ngZone.run(function () {
              return ref;
            });
            return new AngularFirestoreDocument(refInZone, this);
          }
          /**
           * Returns a generated Firestore Document Id.
           */

        }, {
          key: "createId",
          value: function createId() {
            return this.firestore.collection('_').doc().id;
          }
        }]);

        return AngularFirestore;
      }();

      AngularFirestore.ɵfac = function AngularFirestore_Factory(t) {
        return new (t || AngularFirestore)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_OPTIONS"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_APP_NAME"], 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](ENABLE_PERSISTENCE, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](SETTINGS, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PERSISTENCE_SETTINGS, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](USE_EMULATOR, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_fire_auth__WEBPACK_IMPORTED_MODULE_7__["USE_EMULATOR"], 8));
      };
      /** @nocollapse */


      AngularFirestore.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        factory: function AngularFirestore_Factory() {
          return new AngularFirestore(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_OPTIONS"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_APP_NAME"], 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](ENABLE_PERSISTENCE, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](SETTINGS, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PERSISTENCE_SETTINGS, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](USE_EMULATOR, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_fire_auth__WEBPACK_IMPORTED_MODULE_7__["USE_EMULATOR"], 8));
        },
        token: AngularFirestore,
        providedIn: "any"
      });
      /** @nocollapse */

      AngularFirestore.ctorParameters = function () {
        return [{
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_OPTIONS"]]
          }]
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_APP_NAME"]]
          }]
        }, {
          type: Boolean,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [ENABLE_PERSISTENCE]
          }]
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [SETTINGS]
          }]
        }, {
          type: Object,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]]
          }]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"]
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [PERSISTENCE_SETTINGS]
          }]
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [USE_EMULATOR]
          }]
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_fire_auth__WEBPACK_IMPORTED_MODULE_7__["USE_EMULATOR"]]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AngularFirestore, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"],
          args: [{
            providedIn: 'any'
          }]
        }], function () {
          return [{
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_OPTIONS"]]
            }]
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_APP_NAME"]]
            }]
          }, {
            type: Boolean,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [ENABLE_PERSISTENCE]
            }]
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [SETTINGS]
            }]
          }, {
            type: Object,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]]
            }]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"]
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [PERSISTENCE_SETTINGS]
            }]
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [USE_EMULATOR]
            }]
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_fire_auth__WEBPACK_IMPORTED_MODULE_7__["USE_EMULATOR"]]
            }]
          }];
        }, null);
      })();

      var AngularFirestoreModule = /*#__PURE__*/function () {
        function AngularFirestoreModule() {
          _classCallCheck(this, AngularFirestoreModule);
        }

        _createClass2(AngularFirestoreModule, null, [{
          key: "enablePersistence",
          value:
          /**
           * Attempt to enable persistent storage, if possible
           */
          function enablePersistence(persistenceSettings) {
            return {
              ngModule: AngularFirestoreModule,
              providers: [{
                provide: ENABLE_PERSISTENCE,
                useValue: true
              }, {
                provide: PERSISTENCE_SETTINGS,
                useValue: persistenceSettings
              }]
            };
          }
        }]);

        return AngularFirestoreModule;
      }();

      AngularFirestoreModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
        type: AngularFirestoreModule
      });
      AngularFirestoreModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({
        factory: function AngularFirestoreModule_Factory(t) {
          return new (t || AngularFirestoreModule)();
        },
        providers: [AngularFirestore]
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AngularFirestoreModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
          args: [{
            providers: [AngularFirestore]
          }]
        }], null, null);
      })();
      /**
       * Generated bundle index. Do not edit.
       */
      //# sourceMappingURL=angular-fire-firestore.js.map

      /***/

    },

    /***/
    "I55L":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/isArrayLike.js ***!
      \*****************************************************************/

    /*! exports provided: isArrayLike */

    /***/
    function I55L(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isArrayLike", function () {
        return isArrayLike;
      });

      var isArrayLike = function isArrayLike(x) {
        return x && typeof x.length === 'number' && typeof x !== 'function';
      }; //# sourceMappingURL=isArrayLike.js.map

      /***/

    },

    /***/
    "IAdc":
    /*!******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/toArray.js ***!
      \******************************************************************/

    /*! exports provided: toArray */

    /***/
    function IAdc(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "toArray", function () {
        return toArray;
      });
      /* harmony import */


      var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./reduce */
      "128B");

      function toArrayReducer(arr, item, index) {
        if (index === 0) {
          return [item];
        }

        arr.push(item);
        return arr;
      }

      function toArray() {
        return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(toArrayReducer, []);
      } //# sourceMappingURL=toArray.js.map

      /***/

    },

    /***/
    "IS+8":
    /*!**********************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/eventbuilder.js ***!
      \**********************************************************/

    /*! exports provided: eventFromException, eventFromMessage, eventFromUnknownInput, eventFromString */

    /***/
    function IS8(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "eventFromException", function () {
        return eventFromException;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "eventFromMessage", function () {
        return eventFromMessage;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "eventFromUnknownInput", function () {
        return eventFromUnknownInput;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "eventFromString", function () {
        return eventFromString;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/types */
      "PIsB");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _parsers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./parsers */
      "hj4m");
      /* harmony import */


      var _tracekit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./tracekit */
      "yCKT");
      /**
       * Builds and Event from a Exception
       * @hidden
       */


      function eventFromException(options, exception, hint) {
        var syntheticException = hint && hint.syntheticException || undefined;
        var event = eventFromUnknownInput(exception, syntheticException, {
          attachStacktrace: options.attachStacktrace
        });
        Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["addExceptionMechanism"])(event); // defaults to { type: 'generic', handled: true }

        event.level = _sentry_types__WEBPACK_IMPORTED_MODULE_1__["Severity"].Error;

        if (hint && hint.event_id) {
          event.event_id = hint.event_id;
        }

        return _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["SyncPromise"].resolve(event);
      }
      /**
       * Builds and Event from a Message
       * @hidden
       */


      function eventFromMessage(options, message, level, hint) {
        if (level === void 0) {
          level = _sentry_types__WEBPACK_IMPORTED_MODULE_1__["Severity"].Info;
        }

        var syntheticException = hint && hint.syntheticException || undefined;
        var event = eventFromString(message, syntheticException, {
          attachStacktrace: options.attachStacktrace
        });
        event.level = level;

        if (hint && hint.event_id) {
          event.event_id = hint.event_id;
        }

        return _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["SyncPromise"].resolve(event);
      }
      /**
       * @hidden
       */


      function eventFromUnknownInput(exception, syntheticException, options) {
        if (options === void 0) {
          options = {};
        }

        var event;

        if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["isErrorEvent"])(exception) && exception.error) {
          // If it is an ErrorEvent with `error` property, extract it to get actual Error
          var errorEvent = exception; // eslint-disable-next-line no-param-reassign

          exception = errorEvent.error;
          event = Object(_parsers__WEBPACK_IMPORTED_MODULE_3__["eventFromStacktrace"])(Object(_tracekit__WEBPACK_IMPORTED_MODULE_4__["computeStackTrace"])(exception));
          return event;
        } // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name
        // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be
        // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.
        //
        // https://developer.mozilla.org/en-US/docs/Web/API/DOMError
        // https://developer.mozilla.org/en-US/docs/Web/API/DOMException
        // https://webidl.spec.whatwg.org/#es-DOMException-specialness


        if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["isDOMError"])(exception) || Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["isDOMException"])(exception)) {
          var domException = exception;

          if ('stack' in exception) {
            event = Object(_parsers__WEBPACK_IMPORTED_MODULE_3__["eventFromStacktrace"])(Object(_tracekit__WEBPACK_IMPORTED_MODULE_4__["computeStackTrace"])(exception));
          } else {
            var name_1 = domException.name || (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["isDOMError"])(domException) ? 'DOMError' : 'DOMException');
            var message = domException.message ? name_1 + ": " + domException.message : name_1;
            event = eventFromString(message, syntheticException, options);
            Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["addExceptionTypeValue"])(event, message);
          }

          if ('code' in domException) {
            event.tags = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, event.tags), {
              'DOMException.code': "" + domException.code
            });
          }

          return event;
        }

        if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["isError"])(exception)) {
          // we have a real Error object, do nothing
          event = Object(_parsers__WEBPACK_IMPORTED_MODULE_3__["eventFromStacktrace"])(Object(_tracekit__WEBPACK_IMPORTED_MODULE_4__["computeStackTrace"])(exception));
          return event;
        }

        if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["isPlainObject"])(exception) || Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["isEvent"])(exception)) {
          // If it is plain Object or Event, serialize it manually and extract options
          // This will allow us to group events based on top-level keys
          // which is much better than creating new group when any key/value change
          var objectException = exception;
          event = Object(_parsers__WEBPACK_IMPORTED_MODULE_3__["eventFromPlainObject"])(objectException, syntheticException, options.rejection);
          Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["addExceptionMechanism"])(event, {
            synthetic: true
          });
          return event;
        } // If none of previous checks were valid, then it means that it's not:
        // - an instance of DOMError
        // - an instance of DOMException
        // - an instance of Event
        // - an instance of Error
        // - a valid ErrorEvent (one with an error property)
        // - a plain Object
        //
        // So bail out and capture it as a simple message:


        event = eventFromString(exception, syntheticException, options);
        Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["addExceptionTypeValue"])(event, "" + exception, undefined);
        Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["addExceptionMechanism"])(event, {
          synthetic: true
        });
        return event;
      }
      /**
       * @hidden
       */


      function eventFromString(input, syntheticException, options) {
        if (options === void 0) {
          options = {};
        }

        var event = {
          message: input
        };

        if (options.attachStacktrace && syntheticException) {
          var stacktrace = Object(_tracekit__WEBPACK_IMPORTED_MODULE_4__["computeStackTrace"])(syntheticException);
          var frames_1 = Object(_parsers__WEBPACK_IMPORTED_MODULE_3__["prepareFramesForEvent"])(stacktrace.stack);
          event.stacktrace = {
            frames: frames_1
          };
        }

        return event;
      } //# sourceMappingURL=eventbuilder.js.map

      /***/

    },

    /***/
    "IjjT":
    /*!*************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsyncScheduler.js ***!
      \*************************************************************************/

    /*! exports provided: AsyncScheduler */

    /***/
    function IjjT(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AsyncScheduler", function () {
        return AsyncScheduler;
      });
      /* harmony import */


      var _Scheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Scheduler */
      "Y/cZ");

      var AsyncScheduler = /*#__PURE__*/function (_Scheduler__WEBPACK_I) {
        _inherits(AsyncScheduler, _Scheduler__WEBPACK_I);

        var _super163 = _createSuper(AsyncScheduler);

        function AsyncScheduler(SchedulerAction) {
          var _this387;

          var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Scheduler__WEBPACK_IMPORTED_MODULE_0__["Scheduler"].now;

          _classCallCheck(this, AsyncScheduler);

          _this387 = _super163.call(this, SchedulerAction, function () {
            if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _assertThisInitialized(_this387)) {
              return AsyncScheduler.delegate.now();
            } else {
              return now();
            }
          });
          _this387.actions = [];
          _this387.active = false;
          _this387.scheduled = undefined;
          return _this387;
        }

        _createClass2(AsyncScheduler, [{
          key: "schedule",
          value: function schedule(work) {
            var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
            var state = arguments.length > 2 ? arguments[2] : undefined;

            if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
              return AsyncScheduler.delegate.schedule(work, delay, state);
            } else {
              return _get(_getPrototypeOf(AsyncScheduler.prototype), "schedule", this).call(this, work, delay, state);
            }
          }
        }, {
          key: "flush",
          value: function flush(action) {
            var actions = this.actions;

            if (this.active) {
              actions.push(action);
              return;
            }

            var error;
            this.active = true;

            do {
              if (error = action.execute(action.state, action.delay)) {
                break;
              }
            } while (action = actions.shift());

            this.active = false;

            if (error) {
              while (action = actions.shift()) {
                action.unsubscribe();
              }

              throw error;
            }
          }
        }]);

        return AsyncScheduler;
      }(_Scheduler__WEBPACK_IMPORTED_MODULE_0__["Scheduler"]); //# sourceMappingURL=AsyncScheduler.js.map

      /***/

    },

    /***/
    "IzEk":
    /*!***************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/take.js ***!
      \***************************************************************/

    /*! exports provided: take */

    /***/
    function IzEk(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "take", function () {
        return take;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/ArgumentOutOfRangeError */
      "4I5i");
      /* harmony import */


      var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../observable/empty */
      "EY2u");

      function take(count) {
        return function (source) {
          if (count === 0) {
            return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
          } else {
            return source.lift(new TakeOperator(count));
          }
        };
      }

      var TakeOperator = /*#__PURE__*/function () {
        function TakeOperator(total) {
          _classCallCheck(this, TakeOperator);

          this.total = total;

          if (this.total < 0) {
            throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__["ArgumentOutOfRangeError"]();
          }
        }

        _createClass2(TakeOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new TakeSubscriber(subscriber, this.total));
          }
        }]);

        return TakeOperator;
      }();

      var TakeSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_17) {
        _inherits(TakeSubscriber, _Subscriber__WEBPACK_17);

        var _super164 = _createSuper(TakeSubscriber);

        function TakeSubscriber(destination, total) {
          var _this388;

          _classCallCheck(this, TakeSubscriber);

          _this388 = _super164.call(this, destination);
          _this388.total = total;
          _this388.count = 0;
          return _this388;
        }

        _createClass2(TakeSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var total = this.total;
            var count = ++this.count;

            if (count <= total) {
              this.destination.next(value);

              if (count === total) {
                this.destination.complete();
                this.unsubscribe();
              }
            }
          }
        }]);

        return TakeSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=take.js.map

      /***/

    },

    /***/
    "JIr8":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/catchError.js ***!
      \*********************************************************************/

    /*! exports provided: catchError */

    /***/
    function JIr8(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "catchError", function () {
        return catchError;
      });
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function catchError(selector) {
        return function catchErrorOperatorFunction(source) {
          var operator = new CatchOperator(selector);
          var caught = source.lift(operator);
          return operator.caught = caught;
        };
      }

      var CatchOperator = /*#__PURE__*/function () {
        function CatchOperator(selector) {
          _classCallCheck(this, CatchOperator);

          this.selector = selector;
        }

        _createClass2(CatchOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
          }
        }]);

        return CatchOperator;
      }();

      var CatchSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP9) {
        _inherits(CatchSubscriber, _innerSubscribe__WEBP9);

        var _super165 = _createSuper(CatchSubscriber);

        function CatchSubscriber(destination, selector, caught) {
          var _this389;

          _classCallCheck(this, CatchSubscriber);

          _this389 = _super165.call(this, destination);
          _this389.selector = selector;
          _this389.caught = caught;
          return _this389;
        }

        _createClass2(CatchSubscriber, [{
          key: "error",
          value: function error(err) {
            if (!this.isStopped) {
              var result;

              try {
                result = this.selector(err, this.caught);
              } catch (err2) {
                _get(_getPrototypeOf(CatchSubscriber.prototype), "error", this).call(this, err2);

                return;
              }

              this._unsubscribeAndRecycle();

              var innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this);
              this.add(innerSubscriber);
              var innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(result, innerSubscriber);

              if (innerSubscription !== innerSubscriber) {
                this.add(innerSubscription);
              }
            }
          }
        }]);

        return CatchSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"]); //# sourceMappingURL=catchError.js.map

      /***/

    },

    /***/
    "JX91":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/startWith.js ***!
      \********************************************************************/

    /*! exports provided: startWith */

    /***/
    function JX91(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "startWith", function () {
        return startWith;
      });
      /* harmony import */


      var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../observable/concat */
      "GyhO");
      /* harmony import */


      var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/isScheduler */
      "z+Ro");

      function startWith() {
        for (var _len21 = arguments.length, array = new Array(_len21), _key22 = 0; _key22 < _len21; _key22++) {
          array[_key22] = arguments[_key22];
        }

        var scheduler = array[array.length - 1];

        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(scheduler)) {
          array.pop();
          return function (source) {
            return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source, scheduler);
          };
        } else {
          return function (source) {
            return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source);
          };
        }
      } //# sourceMappingURL=startWith.js.map

      /***/

    },

    /***/
    "Jgta":
    /*!*****************************************************!*\
      !*** ./node_modules/firebase/app/dist/index.esm.js ***!
      \*****************************************************/

    /*! exports provided: default */

    /***/
    function Jgta(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _firebase_app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @firebase/app */
      "zIRd");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "default", function () {
        return _firebase_app__WEBPACK_IMPORTED_MODULE_0__["default"];
      });

      var name = "firebase";
      var version = "8.10.0";
      /**
       * @license
       * Copyright 2018 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      _firebase_app__WEBPACK_IMPORTED_MODULE_0__["default"].registerVersion(name, version, 'app');

      _firebase_app__WEBPACK_IMPORTED_MODULE_0__["default"].SDK_VERSION = version; //# sourceMappingURL=index.esm.js.map

      /***/
    },

    /***/
    "JmF6":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/zipAll.js ***!
      \*****************************************************************/

    /*! exports provided: zipAll */

    /***/
    function JmF6(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "zipAll", function () {
        return zipAll;
      });
      /* harmony import */


      var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../observable/zip */
      "1uah");

      function zipAll(project) {
        return function (source) {
          return source.lift(new _observable_zip__WEBPACK_IMPORTED_MODULE_0__["ZipOperator"](project));
        };
      } //# sourceMappingURL=zipAll.js.map

      /***/

    },

    /***/
    "Js3/":
    /*!*************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/index-931440b1.js ***!
      \*************************************************************/

    /*! exports provided: L, a, b, c, d, e, g, l, s, t */

    /***/
    function Js3(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "L", function () {
        return LIFECYCLE_WILL_ENTER;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "a", function () {
        return LIFECYCLE_DID_ENTER;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "b", function () {
        return LIFECYCLE_WILL_LEAVE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "c", function () {
        return LIFECYCLE_DID_LEAVE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "d", function () {
        return LIFECYCLE_WILL_UNLOAD;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "e", function () {
        return deepReady;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "g", function () {
        return getIonPageElement;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "l", function () {
        return lifecycle;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "s", function () {
        return setPageHidden;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "t", function () {
        return transition;
      });
      /* harmony import */


      var _index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./index-7a8b7a1c.js */
      "wEJo");
      /* harmony import */


      var _helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./helpers-dd7e4b7b.js */
      "1vRN");

      var LIFECYCLE_WILL_ENTER = 'ionViewWillEnter';
      var LIFECYCLE_DID_ENTER = 'ionViewDidEnter';
      var LIFECYCLE_WILL_LEAVE = 'ionViewWillLeave';
      var LIFECYCLE_DID_LEAVE = 'ionViewDidLeave';
      var LIFECYCLE_WILL_UNLOAD = 'ionViewWillUnload';

      var iosTransitionAnimation = function iosTransitionAnimation() {
        return Promise.resolve().then(__webpack_require__.bind(null,
        /*! ./ios.transition-12db6216.js */
        "4IIC"));
      };

      var mdTransitionAnimation = function mdTransitionAnimation() {
        return Promise.resolve().then(__webpack_require__.bind(null,
        /*! ./md.transition-eecd3a67.js */
        "06fX"));
      };

      var transition = function transition(opts) {
        return new Promise(function (resolve, reject) {
          Object(_index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
            beforeTransition(opts);
            runTransition(opts).then(function (result) {
              if (result.animation) {
                result.animation.destroy();
              }

              afterTransition(opts);
              resolve(result);
            }, function (error) {
              afterTransition(opts);
              reject(error);
            });
          });
        });
      };

      var beforeTransition = function beforeTransition(opts) {
        var enteringEl = opts.enteringEl;
        var leavingEl = opts.leavingEl;
        setZIndex(enteringEl, leavingEl, opts.direction);

        if (opts.showGoBack) {
          enteringEl.classList.add('can-go-back');
        } else {
          enteringEl.classList.remove('can-go-back');
        }

        setPageHidden(enteringEl, false);
        /**
         * When transitioning, the page should not
         * respond to click events. This resolves small
         * issues like users double tapping the ion-back-button.
         * These pointer events are removed in `afterTransition`.
         */

        enteringEl.style.setProperty('pointer-events', 'none');

        if (leavingEl) {
          setPageHidden(leavingEl, false);
          leavingEl.style.setProperty('pointer-events', 'none');
        }
      };

      var runTransition = /*#__PURE__*/function () {
        var _ref72 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(opts) {
          var animationBuilder, ani;
          return regeneratorRuntime.wrap(function _callee10$(_context12) {
            while (1) {
              switch (_context12.prev = _context12.next) {
                case 0:
                  _context12.next = 2;
                  return getAnimationBuilder(opts);

                case 2:
                  animationBuilder = _context12.sent;
                  ani = animationBuilder && _index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__["B"].isBrowser ? animation(animationBuilder, opts) : noAnimation(opts); // fast path for no animation

                  return _context12.abrupt("return", ani);

                case 5:
                case "end":
                  return _context12.stop();
              }
            }
          }, _callee10);
        }));

        return function runTransition(_x4) {
          return _ref72.apply(this, arguments);
        };
      }();

      var afterTransition = function afterTransition(opts) {
        var enteringEl = opts.enteringEl;
        var leavingEl = opts.leavingEl;
        enteringEl.classList.remove('ion-page-invisible');
        enteringEl.style.removeProperty('pointer-events');

        if (leavingEl !== undefined) {
          leavingEl.classList.remove('ion-page-invisible');
          leavingEl.style.removeProperty('pointer-events');
        }
      };

      var getAnimationBuilder = /*#__PURE__*/function () {
        var _ref73 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(opts) {
          var getAnimation;
          return regeneratorRuntime.wrap(function _callee11$(_context13) {
            while (1) {
              switch (_context13.prev = _context13.next) {
                case 0:
                  if (!(!opts.leavingEl || !opts.animated || opts.duration === 0)) {
                    _context13.next = 2;
                    break;
                  }

                  return _context13.abrupt("return", undefined);

                case 2:
                  if (!opts.animationBuilder) {
                    _context13.next = 4;
                    break;
                  }

                  return _context13.abrupt("return", opts.animationBuilder);

                case 4:
                  if (!(opts.mode === 'ios')) {
                    _context13.next = 10;
                    break;
                  }

                  _context13.next = 7;
                  return iosTransitionAnimation();

                case 7:
                  _context13.t0 = _context13.sent.iosTransitionAnimation;
                  _context13.next = 13;
                  break;

                case 10:
                  _context13.next = 12;
                  return mdTransitionAnimation();

                case 12:
                  _context13.t0 = _context13.sent.mdTransitionAnimation;

                case 13:
                  getAnimation = _context13.t0;
                  return _context13.abrupt("return", getAnimation);

                case 15:
                case "end":
                  return _context13.stop();
              }
            }
          }, _callee11);
        }));

        return function getAnimationBuilder(_x5) {
          return _ref73.apply(this, arguments);
        };
      }();

      var animation = /*#__PURE__*/function () {
        var _ref74 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(animationBuilder, opts) {
          var trans, didComplete;
          return regeneratorRuntime.wrap(function _callee12$(_context14) {
            while (1) {
              switch (_context14.prev = _context14.next) {
                case 0:
                  _context14.next = 2;
                  return waitForReady(opts, true);

                case 2:
                  trans = animationBuilder(opts.baseEl, opts);
                  fireWillEvents(opts.enteringEl, opts.leavingEl);
                  _context14.next = 6;
                  return playTransition(trans, opts);

                case 6:
                  didComplete = _context14.sent;

                  if (opts.progressCallback) {
                    opts.progressCallback(undefined);
                  }

                  if (didComplete) {
                    fireDidEvents(opts.enteringEl, opts.leavingEl);
                  }

                  return _context14.abrupt("return", {
                    hasCompleted: didComplete,
                    animation: trans
                  });

                case 10:
                case "end":
                  return _context14.stop();
              }
            }
          }, _callee12);
        }));

        return function animation(_x6, _x7) {
          return _ref74.apply(this, arguments);
        };
      }();

      var noAnimation = /*#__PURE__*/function () {
        var _ref75 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(opts) {
          var enteringEl, leavingEl;
          return regeneratorRuntime.wrap(function _callee13$(_context15) {
            while (1) {
              switch (_context15.prev = _context15.next) {
                case 0:
                  enteringEl = opts.enteringEl;
                  leavingEl = opts.leavingEl;
                  _context15.next = 4;
                  return waitForReady(opts, false);

                case 4:
                  fireWillEvents(enteringEl, leavingEl);
                  fireDidEvents(enteringEl, leavingEl);
                  return _context15.abrupt("return", {
                    hasCompleted: true
                  });

                case 7:
                case "end":
                  return _context15.stop();
              }
            }
          }, _callee13);
        }));

        return function noAnimation(_x8) {
          return _ref75.apply(this, arguments);
        };
      }();

      var waitForReady = /*#__PURE__*/function () {
        var _ref76 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(opts, defaultDeep) {
          var deep, promises;
          return regeneratorRuntime.wrap(function _callee14$(_context16) {
            while (1) {
              switch (_context16.prev = _context16.next) {
                case 0:
                  deep = opts.deepWait !== undefined ? opts.deepWait : defaultDeep;
                  promises = deep ? [deepReady(opts.enteringEl), deepReady(opts.leavingEl)] : [shallowReady(opts.enteringEl), shallowReady(opts.leavingEl)];
                  _context16.next = 4;
                  return Promise.all(promises);

                case 4:
                  _context16.next = 6;
                  return notifyViewReady(opts.viewIsReady, opts.enteringEl);

                case 6:
                case "end":
                  return _context16.stop();
              }
            }
          }, _callee14);
        }));

        return function waitForReady(_x9, _x10) {
          return _ref76.apply(this, arguments);
        };
      }();

      var notifyViewReady = /*#__PURE__*/function () {
        var _ref77 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(viewIsReady, enteringEl) {
          return regeneratorRuntime.wrap(function _callee15$(_context17) {
            while (1) {
              switch (_context17.prev = _context17.next) {
                case 0:
                  if (!viewIsReady) {
                    _context17.next = 3;
                    break;
                  }

                  _context17.next = 3;
                  return viewIsReady(enteringEl);

                case 3:
                case "end":
                  return _context17.stop();
              }
            }
          }, _callee15);
        }));

        return function notifyViewReady(_x11, _x12) {
          return _ref77.apply(this, arguments);
        };
      }();

      var playTransition = function playTransition(trans, opts) {
        var progressCallback = opts.progressCallback;
        var promise = new Promise(function (resolve) {
          trans.onFinish(function (currentStep) {
            return resolve(currentStep === 1);
          });
        }); // cool, let's do this, start the transition

        if (progressCallback) {
          // this is a swipe to go back, just get the transition progress ready
          // kick off the swipe animation start
          trans.progressStart(true);
          progressCallback(trans);
        } else {
          // only the top level transition should actually start "play"
          // kick it off and let it play through
          // ******** DOM WRITE ****************
          trans.play();
        } // create a callback for when the animation is done


        return promise;
      };

      var fireWillEvents = function fireWillEvents(enteringEl, leavingEl) {
        lifecycle(leavingEl, LIFECYCLE_WILL_LEAVE);
        lifecycle(enteringEl, LIFECYCLE_WILL_ENTER);
      };

      var fireDidEvents = function fireDidEvents(enteringEl, leavingEl) {
        lifecycle(enteringEl, LIFECYCLE_DID_ENTER);
        lifecycle(leavingEl, LIFECYCLE_DID_LEAVE);
      };

      var lifecycle = function lifecycle(el, eventName) {
        if (el) {
          var ev = new CustomEvent(eventName, {
            bubbles: false,
            cancelable: false
          });
          el.dispatchEvent(ev);
        }
      };

      var shallowReady = function shallowReady(el) {
        if (el) {
          return new Promise(function (resolve) {
            return Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_1__["c"])(el, resolve);
          });
        }

        return Promise.resolve();
      };

      var deepReady = /*#__PURE__*/function () {
        var _ref78 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16(el) {
          var element, stencilEl;
          return regeneratorRuntime.wrap(function _callee16$(_context18) {
            while (1) {
              switch (_context18.prev = _context18.next) {
                case 0:
                  element = el;

                  if (!element) {
                    _context18.next = 10;
                    break;
                  }

                  if (!(element.componentOnReady != null)) {
                    _context18.next = 8;
                    break;
                  }

                  _context18.next = 5;
                  return element.componentOnReady();

                case 5:
                  stencilEl = _context18.sent;

                  if (!(stencilEl != null)) {
                    _context18.next = 8;
                    break;
                  }

                  return _context18.abrupt("return");

                case 8:
                  _context18.next = 10;
                  return Promise.all(Array.from(element.children).map(deepReady));

                case 10:
                case "end":
                  return _context18.stop();
              }
            }
          }, _callee16);
        }));

        return function deepReady(_x13) {
          return _ref78.apply(this, arguments);
        };
      }();

      var setPageHidden = function setPageHidden(el, hidden) {
        if (hidden) {
          el.setAttribute('aria-hidden', 'true');
          el.classList.add('ion-page-hidden');
        } else {
          el.hidden = false;
          el.removeAttribute('aria-hidden');
          el.classList.remove('ion-page-hidden');
        }
      };

      var setZIndex = function setZIndex(enteringEl, leavingEl, direction) {
        if (enteringEl !== undefined) {
          enteringEl.style.zIndex = direction === 'back' ? '99' : '101';
        }

        if (leavingEl !== undefined) {
          leavingEl.style.zIndex = '100';
        }
      };

      var getIonPageElement = function getIonPageElement(element) {
        if (element.classList.contains('ion-page')) {
          return element;
        }

        var ionPage = element.querySelector(':scope > .ion-page, :scope > ion-nav, :scope > ion-tabs');

        if (ionPage) {
          return ionPage;
        } // idk, return the original element so at least something animates and we don't have a null pointer


        return element;
      };
      /***/

    },

    /***/
    "JuT4":
    /*!********************************************************!*\
      !*** ./node_modules/@sentry/hub/esm/sessionflusher.js ***!
      \********************************************************/

    /*! exports provided: SessionFlusher */

    /***/
    function JuT4(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SessionFlusher", function () {
        return SessionFlusher;
      });
      /* harmony import */


      var _sentry_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/types */
      "PIsB");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _hub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./hub */
      "lW6c");
      /**
       * @inheritdoc
       */


      var SessionFlusher =
      /** @class */
      function () {
        function SessionFlusher(transport, attrs) {
          var _this = this;

          this.flushTimeout = 60;
          this._pendingAggregates = {};
          this._isEnabled = true;
          this._transport = transport; // Call to setInterval, so that flush is called every 60 seconds

          this._intervalId = setInterval(function () {
            return _this.flush();
          }, this.flushTimeout * 1000);
          this._sessionAttrs = attrs;
        }
        /** Sends session aggregates to Transport */


        SessionFlusher.prototype.sendSessionAggregates = function (sessionAggregates) {
          if (!this._transport.sendSession) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn("Dropping session because custom transport doesn't implement sendSession");

            return;
          }

          void this._transport.sendSession(sessionAggregates).then(null, function (reason) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error("Error while sending session: " + reason);
          });
        };
        /** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSessions` */


        SessionFlusher.prototype.flush = function () {
          var sessionAggregates = this.getSessionAggregates();

          if (sessionAggregates.aggregates.length === 0) {
            return;
          }

          this._pendingAggregates = {};
          this.sendSessionAggregates(sessionAggregates);
        };
        /** Massages the entries in `pendingAggregates` and returns aggregated sessions */


        SessionFlusher.prototype.getSessionAggregates = function () {
          var _this = this;

          var aggregates = Object.keys(this._pendingAggregates).map(function (key) {
            return _this._pendingAggregates[parseInt(key)];
          });
          var sessionAggregates = {
            attrs: this._sessionAttrs,
            aggregates: aggregates
          };
          return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dropUndefinedKeys"])(sessionAggregates);
        };
        /** JSDoc */


        SessionFlusher.prototype.close = function () {
          clearInterval(this._intervalId);
          this._isEnabled = false;
          this.flush();
        };
        /**
         * Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then
         * fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to
         * `_incrementSessionStatusCount` along with the start date
         */


        SessionFlusher.prototype.incrementSessionStatusCount = function () {
          var _a, _b;

          if (!this._isEnabled) {
            return;
          }

          var scope = Object(_hub__WEBPACK_IMPORTED_MODULE_2__["getCurrentHub"])().getScope();
          var requestSession = (_a = scope) === null || _a === void 0 ? void 0 : _a.getRequestSession();

          if (requestSession && requestSession.status) {
            this._incrementSessionStatusCount(requestSession.status, new Date()); // This is not entirely necessarily but is added as a safe guard to indicate the bounds of a request and so in
            // case captureRequestSession is called more than once to prevent double count


            (_b = scope) === null || _b === void 0 ? void 0 : _b.setRequestSession(undefined);
            /* eslint-enable @typescript-eslint/no-unsafe-member-access */
          }
        };
        /**
         * Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of
         * the session received
         */


        SessionFlusher.prototype._incrementSessionStatusCount = function (status, date) {
          // Truncate minutes and seconds on Session Started attribute to have one minute bucket keys
          var sessionStartedTrunc = new Date(date).setSeconds(0, 0);
          this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {}; // corresponds to aggregated sessions in one specific minute bucket
          // for example, {"started":"2021-03-16T08:00:00.000Z","exited":4, "errored": 1}

          var aggregationCounts = this._pendingAggregates[sessionStartedTrunc];

          if (!aggregationCounts.started) {
            aggregationCounts.started = new Date(sessionStartedTrunc).toISOString();
          }

          switch (status) {
            case _sentry_types__WEBPACK_IMPORTED_MODULE_0__["RequestSessionStatus"].Errored:
              aggregationCounts.errored = (aggregationCounts.errored || 0) + 1;
              return aggregationCounts.errored;

            case _sentry_types__WEBPACK_IMPORTED_MODULE_0__["RequestSessionStatus"].Ok:
              aggregationCounts.exited = (aggregationCounts.exited || 0) + 1;
              return aggregationCounts.exited;

            case _sentry_types__WEBPACK_IMPORTED_MODULE_0__["RequestSessionStatus"].Crashed:
              aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1;
              return aggregationCounts.crashed;
          }
        };

        return SessionFlusher;
      }(); //# sourceMappingURL=sessionflusher.js.map

      /***/

    },

    /***/
    "K7De":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/findIndex.js ***!
      \********************************************************************/

    /*! exports provided: findIndex */

    /***/
    function K7De(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "findIndex", function () {
        return findIndex;
      });
      /* harmony import */


      var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../operators/find */
      "cBqT");

      function findIndex(predicate, thisArg) {
        return function (source) {
          return source.lift(new _operators_find__WEBPACK_IMPORTED_MODULE_0__["FindValueOperator"](predicate, source, true, thisArg));
        };
      } //# sourceMappingURL=findIndex.js.map

      /***/

    },

    /***/
    "KF81":
    /*!*************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/index-34cb2743.js ***!
      \*************************************************************/

    /*! exports provided: GESTURE_CONTROLLER, createGesture */

    /***/
    function KF81(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "createGesture", function () {
        return createGesture;
      });
      /* harmony import */


      var _gesture_controller_31cb6bb9_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./gesture-controller-31cb6bb9.js */
      "y08P");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "GESTURE_CONTROLLER", function () {
        return _gesture_controller_31cb6bb9_js__WEBPACK_IMPORTED_MODULE_0__["G"];
      });

      var addEventListener = function addEventListener(el, eventName, callback, opts) {
        // use event listener options when supported
        // otherwise it's just a boolean for the "capture" arg
        var listenerOpts = supportsPassive(el) ? {
          'capture': !!opts.capture,
          'passive': !!opts.passive
        } : !!opts.capture;
        var add;
        var remove;

        if (el['__zone_symbol__addEventListener']) {
          add = '__zone_symbol__addEventListener';
          remove = '__zone_symbol__removeEventListener';
        } else {
          add = 'addEventListener';
          remove = 'removeEventListener';
        }

        el[add](eventName, callback, listenerOpts);
        return function () {
          el[remove](eventName, callback, listenerOpts);
        };
      };

      var supportsPassive = function supportsPassive(node) {
        if (_sPassive === undefined) {
          try {
            var opts = Object.defineProperty({}, 'passive', {
              get: function get() {
                _sPassive = true;
              }
            });
            node.addEventListener('optsTest', function () {
              return;
            }, opts);
          } catch (e) {
            _sPassive = false;
          }
        }

        return !!_sPassive;
      };

      var _sPassive;

      var MOUSE_WAIT = 2000;

      var createPointerEvents = function createPointerEvents(el, pointerDown, pointerMove, pointerUp, options) {
        var rmTouchStart;
        var rmTouchMove;
        var rmTouchEnd;
        var rmTouchCancel;
        var rmMouseStart;
        var rmMouseMove;
        var rmMouseUp;
        var lastTouchEvent = 0;

        var handleTouchStart = function handleTouchStart(ev) {
          lastTouchEvent = Date.now() + MOUSE_WAIT;

          if (!pointerDown(ev)) {
            return;
          }

          if (!rmTouchMove && pointerMove) {
            rmTouchMove = addEventListener(el, 'touchmove', pointerMove, options);
          }
          /**
           * Events are dispatched on the element that is tapped and bubble up to
           * the reference element in the gesture. In the event that the element this
           * event was first dispatched on is removed from the DOM, the event will no
           * longer bubble up to our reference element. This leaves the gesture in an
           * unusable state. To account for this, the touchend and touchcancel listeners
           * should be added to the event target so that they still fire even if the target
           * is removed from the DOM.
           */


          if (!rmTouchEnd) {
            rmTouchEnd = addEventListener(ev.target, 'touchend', handleTouchEnd, options);
          }

          if (!rmTouchCancel) {
            rmTouchCancel = addEventListener(ev.target, 'touchcancel', handleTouchEnd, options);
          }
        };

        var handleMouseDown = function handleMouseDown(ev) {
          if (lastTouchEvent > Date.now()) {
            return;
          }

          if (!pointerDown(ev)) {
            return;
          }

          if (!rmMouseMove && pointerMove) {
            rmMouseMove = addEventListener(getDocument(el), 'mousemove', pointerMove, options);
          }

          if (!rmMouseUp) {
            rmMouseUp = addEventListener(getDocument(el), 'mouseup', handleMouseUp, options);
          }
        };

        var handleTouchEnd = function handleTouchEnd(ev) {
          stopTouch();

          if (pointerUp) {
            pointerUp(ev);
          }
        };

        var handleMouseUp = function handleMouseUp(ev) {
          stopMouse();

          if (pointerUp) {
            pointerUp(ev);
          }
        };

        var stopTouch = function stopTouch() {
          if (rmTouchMove) {
            rmTouchMove();
          }

          if (rmTouchEnd) {
            rmTouchEnd();
          }

          if (rmTouchCancel) {
            rmTouchCancel();
          }

          rmTouchMove = rmTouchEnd = rmTouchCancel = undefined;
        };

        var stopMouse = function stopMouse() {
          if (rmMouseMove) {
            rmMouseMove();
          }

          if (rmMouseUp) {
            rmMouseUp();
          }

          rmMouseMove = rmMouseUp = undefined;
        };

        var stop = function stop() {
          stopTouch();
          stopMouse();
        };

        var enable = function enable() {
          var isEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;

          if (!isEnabled) {
            if (rmTouchStart) {
              rmTouchStart();
            }

            if (rmMouseStart) {
              rmMouseStart();
            }

            rmTouchStart = rmMouseStart = undefined;
            stop();
          } else {
            if (!rmTouchStart) {
              rmTouchStart = addEventListener(el, 'touchstart', handleTouchStart, options);
            }

            if (!rmMouseStart) {
              rmMouseStart = addEventListener(el, 'mousedown', handleMouseDown, options);
            }
          }
        };

        var destroy = function destroy() {
          enable(false);
          pointerUp = pointerMove = pointerDown = undefined;
        };

        return {
          enable: enable,
          stop: stop,
          destroy: destroy
        };
      };

      var getDocument = function getDocument(node) {
        return node instanceof Document ? node : node.ownerDocument;
      };

      var createPanRecognizer = function createPanRecognizer(direction, thresh, maxAngle) {
        var radians = maxAngle * (Math.PI / 180);
        var isDirX = direction === 'x';
        var maxCosine = Math.cos(radians);
        var threshold = thresh * thresh;
        var startX = 0;
        var startY = 0;
        var dirty = false;
        var isPan = 0;
        return {
          start: function start(x, y) {
            startX = x;
            startY = y;
            isPan = 0;
            dirty = true;
          },
          detect: function detect(x, y) {
            if (!dirty) {
              return false;
            }

            var deltaX = x - startX;
            var deltaY = y - startY;
            var distance = deltaX * deltaX + deltaY * deltaY;

            if (distance < threshold) {
              return false;
            }

            var hypotenuse = Math.sqrt(distance);
            var cosine = (isDirX ? deltaX : deltaY) / hypotenuse;

            if (cosine > maxCosine) {
              isPan = 1;
            } else if (cosine < -maxCosine) {
              isPan = -1;
            } else {
              isPan = 0;
            }

            dirty = false;
            return true;
          },
          isGesture: function isGesture() {
            return isPan !== 0;
          },
          getDirection: function getDirection() {
            return isPan;
          }
        };
      };

      var createGesture = function createGesture(config) {
        var hasCapturedPan = false;
        var hasStartedPan = false;
        var hasFiredStart = true;
        var isMoveQueued = false;
        var finalConfig = Object.assign({
          disableScroll: false,
          direction: 'x',
          gesturePriority: 0,
          passive: true,
          maxAngle: 40,
          threshold: 10
        }, config);
        var canStart = finalConfig.canStart;
        var onWillStart = finalConfig.onWillStart;
        var onStart = finalConfig.onStart;
        var onEnd = finalConfig.onEnd;
        var notCaptured = finalConfig.notCaptured;
        var onMove = finalConfig.onMove;
        var threshold = finalConfig.threshold;
        var passive = finalConfig.passive;
        var blurOnStart = finalConfig.blurOnStart;
        var detail = {
          type: 'pan',
          startX: 0,
          startY: 0,
          startTime: 0,
          currentX: 0,
          currentY: 0,
          velocityX: 0,
          velocityY: 0,
          deltaX: 0,
          deltaY: 0,
          currentTime: 0,
          event: undefined,
          data: undefined
        };
        var pan = createPanRecognizer(finalConfig.direction, finalConfig.threshold, finalConfig.maxAngle);

        var gesture = _gesture_controller_31cb6bb9_js__WEBPACK_IMPORTED_MODULE_0__["G"].createGesture({
          name: config.gestureName,
          priority: config.gesturePriority,
          disableScroll: config.disableScroll
        });

        var pointerDown = function pointerDown(ev) {
          var timeStamp = now(ev);

          if (hasStartedPan || !hasFiredStart) {
            return false;
          }

          updateDetail(ev, detail);
          detail.startX = detail.currentX;
          detail.startY = detail.currentY;
          detail.startTime = detail.currentTime = timeStamp;
          detail.velocityX = detail.velocityY = detail.deltaX = detail.deltaY = 0;
          detail.event = ev; // Check if gesture can start

          if (canStart && canStart(detail) === false) {
            return false;
          } // Release fallback


          gesture.release(); // Start gesture

          if (!gesture.start()) {
            return false;
          }

          hasStartedPan = true;

          if (threshold === 0) {
            return tryToCapturePan();
          }

          pan.start(detail.startX, detail.startY);
          return true;
        };

        var pointerMove = function pointerMove(ev) {
          // fast path, if gesture is currently captured
          // do minimum job to get user-land even dispatched
          if (hasCapturedPan) {
            if (!isMoveQueued && hasFiredStart) {
              isMoveQueued = true;
              calcGestureData(detail, ev);
              requestAnimationFrame(fireOnMove);
            }

            return;
          } // gesture is currently being detected


          calcGestureData(detail, ev);

          if (pan.detect(detail.currentX, detail.currentY)) {
            if (!pan.isGesture() || !tryToCapturePan()) {
              abortGesture();
            }
          }
        };

        var fireOnMove = function fireOnMove() {
          // Since fireOnMove is called inside a RAF, onEnd() might be called,
          // we must double check hasCapturedPan
          if (!hasCapturedPan) {
            return;
          }

          isMoveQueued = false;

          if (onMove) {
            onMove(detail);
          }
        };

        var tryToCapturePan = function tryToCapturePan() {
          if (gesture && !gesture.capture()) {
            return false;
          }

          hasCapturedPan = true;
          hasFiredStart = false; // reset start position since the real user-land event starts here
          // If the pan detector threshold is big, not resetting the start position
          // will cause a jump in the animation equal to the detector threshold.
          // the array of positions used to calculate the gesture velocity does not
          // need to be cleaned, more points in the positions array always results in a
          // more accurate value of the velocity.

          detail.startX = detail.currentX;
          detail.startY = detail.currentY;
          detail.startTime = detail.currentTime;

          if (onWillStart) {
            onWillStart(detail).then(fireOnStart);
          } else {
            fireOnStart();
          }

          return true;
        };

        var blurActiveElement = function blurActiveElement() {
          /* tslint:disable-next-line */
          if (typeof document !== 'undefined') {
            var activeElement = document.activeElement;

            if (activeElement !== null && activeElement.blur) {
              activeElement.blur();
            }
          }
        };

        var fireOnStart = function fireOnStart() {
          if (blurOnStart) {
            blurActiveElement();
          }

          if (onStart) {
            onStart(detail);
          }

          hasFiredStart = true;
        };

        var reset = function reset() {
          hasCapturedPan = false;
          hasStartedPan = false;
          isMoveQueued = false;
          hasFiredStart = true;
          gesture.release();
        }; // END *************************


        var pointerUp = function pointerUp(ev) {
          var tmpHasCaptured = hasCapturedPan;
          var tmpHasFiredStart = hasFiredStart;
          reset();

          if (!tmpHasFiredStart) {
            return;
          }

          calcGestureData(detail, ev); // Try to capture press

          if (tmpHasCaptured) {
            if (onEnd) {
              onEnd(detail);
            }

            return;
          } // Not captured any event


          if (notCaptured) {
            notCaptured(detail);
          }
        };

        var pointerEvents = createPointerEvents(finalConfig.el, pointerDown, pointerMove, pointerUp, {
          capture: false,
          passive: passive
        });

        var abortGesture = function abortGesture() {
          reset();
          pointerEvents.stop();

          if (notCaptured) {
            notCaptured(detail);
          }
        };

        return {
          enable: function enable() {
            var enable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;

            if (!enable) {
              if (hasCapturedPan) {
                pointerUp(undefined);
              }

              reset();
            }

            pointerEvents.enable(enable);
          },
          destroy: function destroy() {
            gesture.destroy();
            pointerEvents.destroy();
          }
        };
      };

      var calcGestureData = function calcGestureData(detail, ev) {
        if (!ev) {
          return;
        }

        var prevX = detail.currentX;
        var prevY = detail.currentY;
        var prevT = detail.currentTime;
        updateDetail(ev, detail);
        var currentX = detail.currentX;
        var currentY = detail.currentY;
        var timestamp = detail.currentTime = now(ev);
        var timeDelta = timestamp - prevT;

        if (timeDelta > 0 && timeDelta < 100) {
          var velocityX = (currentX - prevX) / timeDelta;
          var velocityY = (currentY - prevY) / timeDelta;
          detail.velocityX = velocityX * 0.7 + detail.velocityX * 0.3;
          detail.velocityY = velocityY * 0.7 + detail.velocityY * 0.3;
        }

        detail.deltaX = currentX - detail.startX;
        detail.deltaY = currentY - detail.startY;
        detail.event = ev;
      };

      var updateDetail = function updateDetail(ev, detail) {
        // get X coordinates for either a mouse click
        // or a touch depending on the given event
        var x = 0;
        var y = 0;

        if (ev) {
          var changedTouches = ev.changedTouches;

          if (changedTouches && changedTouches.length > 0) {
            var touch = changedTouches[0];
            x = touch.clientX;
            y = touch.clientY;
          } else if (ev.pageX !== undefined) {
            x = ev.pageX;
            y = ev.pageY;
          }
        }

        detail.currentX = x;
        detail.currentY = y;
      };

      var now = function now(ev) {
        return ev.timeStamp || Date.now();
      };
      /***/

    },

    /***/
    "KRiW":
    /*!**************************************************!*\
      !*** ./node_modules/@sentry/core/esm/request.js ***!
      \**************************************************/

    /*! exports provided: sessionToSentryRequest, eventToSentryRequest */

    /***/
    function KRiW(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "sessionToSentryRequest", function () {
        return sessionToSentryRequest;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "eventToSentryRequest", function () {
        return eventToSentryRequest;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /** Extract sdk info from from the API metadata */


      function getSdkMetadataForEnvelopeHeader(api) {
        if (!api.metadata || !api.metadata.sdk) {
          return;
        }

        var _a = api.metadata.sdk,
            name = _a.name,
            version = _a.version;
        return {
          name: name,
          version: version
        };
      }
      /**
       * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.
       * Merge with existing data if any.
       **/


      function enhanceEventWithSdkInfo(event, sdkInfo) {
        if (!sdkInfo) {
          return event;
        }

        event.sdk = event.sdk || {};
        event.sdk.name = event.sdk.name || sdkInfo.name;
        event.sdk.version = event.sdk.version || sdkInfo.version;
        event.sdk.integrations = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(event.sdk.integrations || [], sdkInfo.integrations || []);
        event.sdk.packages = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(event.sdk.packages || [], sdkInfo.packages || []);
        return event;
      }
      /** Creates a SentryRequest from a Session. */


      function sessionToSentryRequest(session, api) {
        var sdkInfo = getSdkMetadataForEnvelopeHeader(api);
        var envelopeHeaders = JSON.stringify(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
          sent_at: new Date().toISOString()
        }, sdkInfo && {
          sdk: sdkInfo
        }), api.forceEnvelope() && {
          dsn: api.getDsn().toString()
        })); // I know this is hacky but we don't want to add `session` to request type since it's never rate limited

        var type = 'aggregates' in session ? 'sessions' : 'session';
        var itemHeaders = JSON.stringify({
          type: type
        });
        return {
          body: envelopeHeaders + "\n" + itemHeaders + "\n" + JSON.stringify(session),
          type: type,
          url: api.getEnvelopeEndpointWithUrlEncodedAuth()
        };
      }
      /** Creates a SentryRequest from an event. */


      function eventToSentryRequest(event, api) {
        var sdkInfo = getSdkMetadataForEnvelopeHeader(api);
        var eventType = event.type || 'event';
        var useEnvelope = eventType === 'transaction' || api.forceEnvelope();

        var _a = event.debug_meta || {},
            transactionSampling = _a.transactionSampling,
            metadata = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__rest"])(_a, ["transactionSampling"]);

        var _b = transactionSampling || {},
            samplingMethod = _b.method,
            sampleRate = _b.rate;

        if (Object.keys(metadata).length === 0) {
          delete event.debug_meta;
        } else {
          event.debug_meta = metadata;
        }

        var req = {
          body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),
          type: eventType,
          url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth()
        }; // https://develop.sentry.dev/sdk/envelopes/
        // Since we don't need to manipulate envelopes nor store them, there is no
        // exported concept of an Envelope with operations including serialization and
        // deserialization. Instead, we only implement a minimal subset of the spec to
        // serialize events inline here.

        if (useEnvelope) {
          var envelopeHeaders = JSON.stringify(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
            event_id: event.event_id,
            sent_at: new Date().toISOString()
          }, sdkInfo && {
            sdk: sdkInfo
          }), api.forceEnvelope() && {
            dsn: api.getDsn().toString()
          }));
          var itemHeaders = JSON.stringify({
            type: eventType,
            // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and
            // explicitly-set sampling decisions). Are we good with that?
            sample_rates: [{
              id: samplingMethod,
              rate: sampleRate
            }]
          }); // The trailing newline is optional. We intentionally don't send it to avoid
          // sending unnecessary bytes.
          //
          // const envelope = `${envelopeHeaders}\n${itemHeaders}\n${req.body}\n`;

          var envelope = envelopeHeaders + "\n" + itemHeaders + "\n" + req.body;
          req.body = envelope;
        }

        return req;
      } //# sourceMappingURL=request.js.map

      /***/

    },

    /***/
    "Kj3r":
    /*!***********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/debounceTime.js ***!
      \***********************************************************************/

    /*! exports provided: debounceTime */

    /***/
    function Kj3r(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "debounceTime", function () {
        return debounceTime;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../scheduler/async */
      "D0XW");

      function debounceTime(dueTime) {
        var scheduler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
        return function (source) {
          return source.lift(new DebounceTimeOperator(dueTime, scheduler));
        };
      }

      var DebounceTimeOperator = /*#__PURE__*/function () {
        function DebounceTimeOperator(dueTime, scheduler) {
          _classCallCheck(this, DebounceTimeOperator);

          this.dueTime = dueTime;
          this.scheduler = scheduler;
        }

        _createClass2(DebounceTimeOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));
          }
        }]);

        return DebounceTimeOperator;
      }();

      var DebounceTimeSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_18) {
        _inherits(DebounceTimeSubscriber, _Subscriber__WEBPACK_18);

        var _super166 = _createSuper(DebounceTimeSubscriber);

        function DebounceTimeSubscriber(destination, dueTime, scheduler) {
          var _this390;

          _classCallCheck(this, DebounceTimeSubscriber);

          _this390 = _super166.call(this, destination);
          _this390.dueTime = dueTime;
          _this390.scheduler = scheduler;
          _this390.debouncedSubscription = null;
          _this390.lastValue = null;
          _this390.hasValue = false;
          return _this390;
        }

        _createClass2(DebounceTimeSubscriber, [{
          key: "_next",
          value: function _next(value) {
            this.clearDebounce();
            this.lastValue = value;
            this.hasValue = true;
            this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.debouncedNext();
            this.destination.complete();
          }
        }, {
          key: "debouncedNext",
          value: function debouncedNext() {
            this.clearDebounce();

            if (this.hasValue) {
              var lastValue = this.lastValue;
              this.lastValue = null;
              this.hasValue = false;
              this.destination.next(lastValue);
            }
          }
        }, {
          key: "clearDebounce",
          value: function clearDebounce() {
            var debouncedSubscription = this.debouncedSubscription;

            if (debouncedSubscription !== null) {
              this.remove(debouncedSubscription);
              debouncedSubscription.unsubscribe();
              this.debouncedSubscription = null;
            }
          }
        }]);

        return DebounceTimeSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]);

      function dispatchNext(subscriber) {
        subscriber.debouncedNext();
      } //# sourceMappingURL=debounceTime.js.map

      /***/

    },

    /***/
    "KjyA":
    /*!***********************************************!*\
      !*** ./node_modules/@sentry/hub/esm/scope.js ***!
      \***********************************************/

    /*! exports provided: Scope, addGlobalEventProcessor */

    /***/
    function KjyA(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Scope", function () {
        return Scope;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "addGlobalEventProcessor", function () {
        return addGlobalEventProcessor;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /**
       * Absolute maximum number of breadcrumbs added to an event.
       * The `maxBreadcrumbs` option cannot be higher than this value.
       */


      var MAX_BREADCRUMBS = 100;
      /**
       * Holds additional event information. {@link Scope.applyToEvent} will be
       * called by the client before an event will be sent.
       */

      var Scope =
      /** @class */
      function () {
        function Scope() {
          /** Flag if notifying is happening. */
          this._notifyingListeners = false;
          /** Callback for client to receive scope changes. */

          this._scopeListeners = [];
          /** Callback list that will be called after {@link applyToEvent}. */

          this._eventProcessors = [];
          /** Array of breadcrumbs. */

          this._breadcrumbs = [];
          /** User */

          this._user = {};
          /** Tags */

          this._tags = {};
          /** Extra */

          this._extra = {};
          /** Contexts */

          this._contexts = {};
        }
        /**
         * Inherit values from the parent scope.
         * @param scope to clone.
         */


        Scope.clone = function (scope) {
          var newScope = new Scope();

          if (scope) {
            newScope._breadcrumbs = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(scope._breadcrumbs);
            newScope._tags = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, scope._tags);
            newScope._extra = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, scope._extra);
            newScope._contexts = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, scope._contexts);
            newScope._user = scope._user;
            newScope._level = scope._level;
            newScope._span = scope._span;
            newScope._session = scope._session;
            newScope._transactionName = scope._transactionName;
            newScope._fingerprint = scope._fingerprint;
            newScope._eventProcessors = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(scope._eventProcessors);
            newScope._requestSession = scope._requestSession;
          }

          return newScope;
        };
        /**
         * Add internal on change listener. Used for sub SDKs that need to store the scope.
         * @hidden
         */


        Scope.prototype.addScopeListener = function (callback) {
          this._scopeListeners.push(callback);
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.addEventProcessor = function (callback) {
          this._eventProcessors.push(callback);

          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.setUser = function (user) {
          this._user = user || {};

          if (this._session) {
            this._session.update({
              user: user
            });
          }

          this._notifyScopeListeners();

          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.getUser = function () {
          return this._user;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.getRequestSession = function () {
          return this._requestSession;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.setRequestSession = function (requestSession) {
          this._requestSession = requestSession;
          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.setTags = function (tags) {
          this._tags = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._tags), tags);

          this._notifyScopeListeners();

          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.setTag = function (key, value) {
          var _a;

          this._tags = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._tags), (_a = {}, _a[key] = value, _a));

          this._notifyScopeListeners();

          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.setExtras = function (extras) {
          this._extra = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._extra), extras);

          this._notifyScopeListeners();

          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.setExtra = function (key, extra) {
          var _a;

          this._extra = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._extra), (_a = {}, _a[key] = extra, _a));

          this._notifyScopeListeners();

          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.setFingerprint = function (fingerprint) {
          this._fingerprint = fingerprint;

          this._notifyScopeListeners();

          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.setLevel = function (level) {
          this._level = level;

          this._notifyScopeListeners();

          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.setTransactionName = function (name) {
          this._transactionName = name;

          this._notifyScopeListeners();

          return this;
        };
        /**
         * Can be removed in major version.
         * @deprecated in favor of {@link this.setTransactionName}
         */


        Scope.prototype.setTransaction = function (name) {
          return this.setTransactionName(name);
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.setContext = function (key, context) {
          var _a;

          if (context === null) {
            // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
            delete this._contexts[key];
          } else {
            this._contexts = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._contexts), (_a = {}, _a[key] = context, _a));
          }

          this._notifyScopeListeners();

          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.setSpan = function (span) {
          this._span = span;

          this._notifyScopeListeners();

          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.getSpan = function () {
          return this._span;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.getTransaction = function () {
          var _a, _b, _c, _d; // often, this span will be a transaction, but it's not guaranteed to be


          var span = this.getSpan(); // try it the new way first

          if ((_a = span) === null || _a === void 0 ? void 0 : _a.transaction) {
            return (_b = span) === null || _b === void 0 ? void 0 : _b.transaction;
          } // fallback to the old way (known bug: this only finds transactions with sampled = true)


          if ((_d = (_c = span) === null || _c === void 0 ? void 0 : _c.spanRecorder) === null || _d === void 0 ? void 0 : _d.spans[0]) {
            return span.spanRecorder.spans[0];
          } // neither way found a transaction


          return undefined;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.setSession = function (session) {
          if (!session) {
            delete this._session;
          } else {
            this._session = session;
          }

          this._notifyScopeListeners();

          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.getSession = function () {
          return this._session;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.update = function (captureContext) {
          if (!captureContext) {
            return this;
          }

          if (typeof captureContext === 'function') {
            var updatedScope = captureContext(this);
            return updatedScope instanceof Scope ? updatedScope : this;
          }

          if (captureContext instanceof Scope) {
            this._tags = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._tags), captureContext._tags);
            this._extra = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._extra), captureContext._extra);
            this._contexts = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._contexts), captureContext._contexts);

            if (captureContext._user && Object.keys(captureContext._user).length) {
              this._user = captureContext._user;
            }

            if (captureContext._level) {
              this._level = captureContext._level;
            }

            if (captureContext._fingerprint) {
              this._fingerprint = captureContext._fingerprint;
            }

            if (captureContext._requestSession) {
              this._requestSession = captureContext._requestSession;
            }
          } else if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isPlainObject"])(captureContext)) {
            // eslint-disable-next-line no-param-reassign
            captureContext = captureContext;
            this._tags = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._tags), captureContext.tags);
            this._extra = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._extra), captureContext.extra);
            this._contexts = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._contexts), captureContext.contexts);

            if (captureContext.user) {
              this._user = captureContext.user;
            }

            if (captureContext.level) {
              this._level = captureContext.level;
            }

            if (captureContext.fingerprint) {
              this._fingerprint = captureContext.fingerprint;
            }

            if (captureContext.requestSession) {
              this._requestSession = captureContext.requestSession;
            }
          }

          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.clear = function () {
          this._breadcrumbs = [];
          this._tags = {};
          this._extra = {};
          this._user = {};
          this._contexts = {};
          this._level = undefined;
          this._transactionName = undefined;
          this._fingerprint = undefined;
          this._requestSession = undefined;
          this._span = undefined;
          this._session = undefined;

          this._notifyScopeListeners();

          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) {
          var maxCrumbs = typeof maxBreadcrumbs === 'number' ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS; // No data has been changed, so don't notify scope listeners

          if (maxCrumbs <= 0) {
            return this;
          }

          var mergedBreadcrumb = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
            timestamp: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dateTimestampInSeconds"])()
          }, breadcrumb);
          this._breadcrumbs = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxCrumbs);

          this._notifyScopeListeners();

          return this;
        };
        /**
         * @inheritDoc
         */


        Scope.prototype.clearBreadcrumbs = function () {
          this._breadcrumbs = [];

          this._notifyScopeListeners();

          return this;
        };
        /**
         * Applies the current context and fingerprint to the event.
         * Note that breadcrumbs will be added by the client.
         * Also if the event has already breadcrumbs on it, we do not merge them.
         * @param event Event
         * @param hint May contain additional information about the original exception.
         * @hidden
         */


        Scope.prototype.applyToEvent = function (event, hint) {
          var _a;

          if (this._extra && Object.keys(this._extra).length) {
            event.extra = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._extra), event.extra);
          }

          if (this._tags && Object.keys(this._tags).length) {
            event.tags = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._tags), event.tags);
          }

          if (this._user && Object.keys(this._user).length) {
            event.user = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._user), event.user);
          }

          if (this._contexts && Object.keys(this._contexts).length) {
            event.contexts = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._contexts), event.contexts);
          }

          if (this._level) {
            event.level = this._level;
          }

          if (this._transactionName) {
            event.transaction = this._transactionName;
          } // We want to set the trace context for normal events only if there isn't already
          // a trace context on the event. There is a product feature in place where we link
          // errors with transaction and it relies on that.


          if (this._span) {
            event.contexts = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
              trace: this._span.getTraceContext()
            }, event.contexts);
            var transactionName = (_a = this._span.transaction) === null || _a === void 0 ? void 0 : _a.name;

            if (transactionName) {
              event.tags = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
                transaction: transactionName
              }, event.tags);
            }
          }

          this._applyFingerprint(event);

          event.breadcrumbs = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(event.breadcrumbs || [], this._breadcrumbs);
          event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;
          return this._notifyEventProcessors(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(getGlobalEventProcessors(), this._eventProcessors), event, hint);
        };
        /**
         * This will be called after {@link applyToEvent} is finished.
         */


        Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) {
          var _this = this;

          if (index === void 0) {
            index = 0;
          }

          return new _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["SyncPromise"](function (resolve, reject) {
            var processor = processors[index];

            if (event === null || typeof processor !== 'function') {
              resolve(event);
            } else {
              var result = processor(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, event), hint);

              if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isThenable"])(result)) {
                void result.then(function (_final) {
                  return _this._notifyEventProcessors(processors, _final, hint, index + 1).then(resolve);
                }).then(null, reject);
              } else {
                void _this._notifyEventProcessors(processors, result, hint, index + 1).then(resolve).then(null, reject);
              }
            }
          });
        };
        /**
         * This will be called on every set call.
         */


        Scope.prototype._notifyScopeListeners = function () {
          var _this = this; // We need this check for this._notifyingListeners to be able to work on scope during updates
          // If this check is not here we'll produce endless recursion when something is done with the scope
          // during the callback.


          if (!this._notifyingListeners) {
            this._notifyingListeners = true;

            this._scopeListeners.forEach(function (callback) {
              callback(_this);
            });

            this._notifyingListeners = false;
          }
        };
        /**
         * Applies fingerprint from the scope to the event if there's one,
         * uses message if there's one instead or get rid of empty fingerprint
         */


        Scope.prototype._applyFingerprint = function (event) {
          // Make sure it's an array first and we actually have something in place
          event.fingerprint = event.fingerprint ? Array.isArray(event.fingerprint) ? event.fingerprint : [event.fingerprint] : []; // If we have something on the scope, then merge it with event

          if (this._fingerprint) {
            event.fingerprint = event.fingerprint.concat(this._fingerprint);
          } // If we have no data at all, remove empty array default


          if (event.fingerprint && !event.fingerprint.length) {
            delete event.fingerprint;
          }
        };

        return Scope;
      }();
      /**
       * Returns the global event processors.
       */


      function getGlobalEventProcessors() {
        /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access  */
        var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getGlobalObject"])();
        global.__SENTRY__ = global.__SENTRY__ || {};
        global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];
        return global.__SENTRY__.globalEventProcessors;
        /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */
      }
      /**
       * Add a EventProcessor to be kept globally.
       * @param callback EventProcessor to add
       */


      function addGlobalEventProcessor(callback) {
        getGlobalEventProcessors().push(callback);
      } //# sourceMappingURL=scope.js.map

      /***/

    },

    /***/
    "Kqap":
    /*!***************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/scan.js ***!
      \***************************************************************/

    /*! exports provided: scan */

    /***/
    function Kqap(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "scan", function () {
        return scan;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function scan(accumulator, seed) {
        var hasSeed = false;

        if (arguments.length >= 2) {
          hasSeed = true;
        }

        return function scanOperatorFunction(source) {
          return source.lift(new ScanOperator(accumulator, seed, hasSeed));
        };
      }

      var ScanOperator = /*#__PURE__*/function () {
        function ScanOperator(accumulator, seed) {
          var hasSeed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

          _classCallCheck(this, ScanOperator);

          this.accumulator = accumulator;
          this.seed = seed;
          this.hasSeed = hasSeed;
        }

        _createClass2(ScanOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));
          }
        }]);

        return ScanOperator;
      }();

      var ScanSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_19) {
        _inherits(ScanSubscriber, _Subscriber__WEBPACK_19);

        var _super167 = _createSuper(ScanSubscriber);

        function ScanSubscriber(destination, accumulator, _seed, hasSeed) {
          var _this391;

          _classCallCheck(this, ScanSubscriber);

          _this391 = _super167.call(this, destination);
          _this391.accumulator = accumulator;
          _this391._seed = _seed;
          _this391.hasSeed = hasSeed;
          _this391.index = 0;
          return _this391;
        }

        _createClass2(ScanSubscriber, [{
          key: "seed",
          get: function get() {
            return this._seed;
          },
          set: function set(value) {
            this.hasSeed = true;
            this._seed = value;
          }
        }, {
          key: "_next",
          value: function _next(value) {
            if (!this.hasSeed) {
              this.seed = value;
              this.destination.next(value);
            } else {
              return this._tryNext(value);
            }
          }
        }, {
          key: "_tryNext",
          value: function _tryNext(value) {
            var index = this.index++;
            var result;

            try {
              result = this.accumulator(this.seed, value, index);
            } catch (err) {
              this.destination.error(err);
            }

            this.seed = result;
            this.destination.next(result);
          }
        }]);

        return ScanSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=scan.js.map

      /***/

    },

    /***/
    "KqfI":
    /*!**********************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/noop.js ***!
      \**********************************************************/

    /*! exports provided: noop */

    /***/
    function KqfI(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "noop", function () {
        return noop;
      });

      function noop() {} //# sourceMappingURL=noop.js.map

      /***/

    },

    /***/
    "LRne":
    /*!**************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/of.js ***!
      \**************************************************************/

    /*! exports provided: of */

    /***/
    function LRne(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "of", function () {
        return of;
      });
      /* harmony import */


      var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../util/isScheduler */
      "z+Ro");
      /* harmony import */


      var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./fromArray */
      "yCtX");
      /* harmony import */


      var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../scheduled/scheduleArray */
      "jZKg");

      function of() {
        for (var _len22 = arguments.length, args = new Array(_len22), _key23 = 0; _key23 < _len22; _key23++) {
          args[_key23] = arguments[_key23];
        }

        var scheduler = args[args.length - 1];

        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(scheduler)) {
          args.pop();
          return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(args, scheduler);
        } else {
          return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args);
        }
      } //# sourceMappingURL=of.js.map

      /***/

    },

    /***/
    "Lhse":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/symbol/iterator.js ***!
      \****************************************************************/

    /*! exports provided: getSymbolIterator, iterator, $$iterator */

    /***/
    function Lhse(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getSymbolIterator", function () {
        return getSymbolIterator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "iterator", function () {
        return iterator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "$$iterator", function () {
        return $$iterator;
      });

      function getSymbolIterator() {
        if (typeof Symbol !== 'function' || !Symbol.iterator) {
          return '@@iterator';
        }

        return Symbol.iterator;
      }

      var iterator = getSymbolIterator();
      var $$iterator = iterator; //# sourceMappingURL=iterator.js.map

      /***/
    },

    /***/
    "M62x":
    /*!**************************************************!*\
      !*** ./node_modules/@sentry/angular/esm/zone.js ***!
      \**************************************************/

    /*! exports provided: runOutsideAngular */

    /***/
    function M62x(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "runOutsideAngular", function () {
        return runOutsideAngular;
      }); // There're 2 types of Angular applications:
      // 1) zone-full (by default)
      // 2) zone-less
      // The developer can avoid importing the `zone.js` package and tells Angular that
      // he is responsible for running the change detection by himself. This is done by
      // "nooping" the zone through `CompilerOptions` when bootstrapping the root module.
      // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access


      var isNgZoneEnabled = typeof Zone !== 'undefined' && !!Zone.current;
      /**
       * The function that does the same job as `NgZone.runOutsideAngular`.
       */

      function runOutsideAngular(callback) {
        // The `Zone.root.run` basically will run the `callback` in the most parent zone.
        // Any asynchronous API used inside the `callback` won't catch Angular's zone
        // since `Zone.current` will reference `Zone.root`.
        // The Angular's zone is forked from the `Zone.root`. In this case, `zone.js` won't
        // trigger change detection, and `ApplicationRef.tick()` will not be run.
        // Caretaker note: we're using `Zone.root` except `NgZone.runOutsideAngular` since this
        // will require injecting the `NgZone` facade. That will create a breaking change for
        // projects already using the `@sentry/angular`.
        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
        return isNgZoneEnabled ? Zone.root.run(callback) : callback();
      } //# sourceMappingURL=zone.js.map

      /***/

    },

    /***/
    "MBAA":
    /*!***************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduleIterable.js ***!
      \***************************************************************************/

    /*! exports provided: scheduleIterable */

    /***/
    function MBAA(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "scheduleIterable", function () {
        return scheduleIterable;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Subscription */
      "quSY");
      /* harmony import */


      var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../symbol/iterator */
      "Lhse");

      function scheduleIterable(input, scheduler) {
        if (!input) {
          throw new Error('Iterable cannot be null');
        }

        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
          var iterator;
          sub.add(function () {
            if (iterator && typeof iterator["return"] === 'function') {
              iterator["return"]();
            }
          });
          sub.add(scheduler.schedule(function () {
            iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__["iterator"]]();
            sub.add(scheduler.schedule(function () {
              if (subscriber.closed) {
                return;
              }

              var value;
              var done;

              try {
                var result = iterator.next();
                value = result.value;
                done = result.done;
              } catch (err) {
                subscriber.error(err);
                return;
              }

              if (done) {
                subscriber.complete();
              } else {
                subscriber.next(value);
                this.schedule();
              }
            }));
          }));
          return sub;
        });
      } //# sourceMappingURL=scheduleIterable.js.map

      /***/

    },

    /***/
    "MBYv":
    /*!*************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/idletransaction.js ***!
      \*************************************************************/

    /*! exports provided: DEFAULT_IDLE_TIMEOUT, HEARTBEAT_INTERVAL, IdleTransactionSpanRecorder, IdleTransaction */

    /***/
    function MBYv(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DEFAULT_IDLE_TIMEOUT", function () {
        return DEFAULT_IDLE_TIMEOUT;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HEARTBEAT_INTERVAL", function () {
        return HEARTBEAT_INTERVAL;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IdleTransactionSpanRecorder", function () {
        return IdleTransactionSpanRecorder;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IdleTransaction", function () {
        return IdleTransaction;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _span__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./span */
      "SYqL");
      /* harmony import */


      var _spanstatus__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./spanstatus */
      "bju/");
      /* harmony import */


      var _transaction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./transaction */
      "EldZ");

      var DEFAULT_IDLE_TIMEOUT = 1000;
      var HEARTBEAT_INTERVAL = 5000;
      /**
       * @inheritDoc
       */

      var IdleTransactionSpanRecorder =
      /** @class */
      function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(IdleTransactionSpanRecorder, _super);

        function IdleTransactionSpanRecorder(_pushActivity, _popActivity, transactionSpanId, maxlen) {
          if (transactionSpanId === void 0) {
            transactionSpanId = '';
          }

          var _this = _super.call(this, maxlen) || this;

          _this._pushActivity = _pushActivity;
          _this._popActivity = _popActivity;
          _this.transactionSpanId = transactionSpanId;
          return _this;
        }
        /**
         * @inheritDoc
         */


        IdleTransactionSpanRecorder.prototype.add = function (span) {
          var _this = this; // We should make sure we do not push and pop activities for
          // the transaction that this span recorder belongs to.


          if (span.spanId !== this.transactionSpanId) {
            // We patch span.finish() to pop an activity after setting an endTimestamp.
            span.finish = function (endTimestamp) {
              span.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["timestampWithMs"])();

              _this._popActivity(span.spanId);
            }; // We should only push new activities if the span does not have an end timestamp.


            if (span.endTimestamp === undefined) {
              this._pushActivity(span.spanId);
            }
          }

          _super.prototype.add.call(this, span);
        };

        return IdleTransactionSpanRecorder;
      }(_span__WEBPACK_IMPORTED_MODULE_2__["SpanRecorder"]);
      /**
       * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.
       * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will
       * put itself on the scope on creation.
       */


      var IdleTransaction =
      /** @class */
      function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(IdleTransaction, _super);

        function IdleTransaction(transactionContext, _idleHub,
        /**
         * The time to wait in ms until the idle transaction will be finished.
         * @default 1000
         */
        _idleTimeout, // If an idle transaction should be put itself on and off the scope automatically.
        _onScope) {
          if (_idleTimeout === void 0) {
            _idleTimeout = DEFAULT_IDLE_TIMEOUT;
          }

          if (_onScope === void 0) {
            _onScope = false;
          }

          var _this = _super.call(this, transactionContext, _idleHub) || this;

          _this._idleHub = _idleHub;
          _this._idleTimeout = _idleTimeout;
          _this._onScope = _onScope; // Activities store a list of active spans

          _this.activities = {}; // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats.

          _this._heartbeatCounter = 0; // We should not use heartbeat if we finished a transaction

          _this._finished = false;
          _this._beforeFinishCallbacks = [];

          if (_idleHub && _onScope) {
            // There should only be one active transaction on the scope
            clearActiveTransaction(_idleHub); // We set the transaction here on the scope so error events pick up the trace
            // context and attach it to the error.

            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log("Setting idle transaction on scope. Span ID: " + _this.spanId);

            _idleHub.configureScope(function (scope) {
              return scope.setSpan(_this);
            });
          }

          _this._initTimeout = setTimeout(function () {
            if (!_this._finished) {
              _this.finish();
            }
          }, _this._idleTimeout);
          return _this;
        }
        /** {@inheritDoc} */


        IdleTransaction.prototype.finish = function (endTimestamp) {
          var e_1, _a;

          var _this = this;

          if (endTimestamp === void 0) {
            endTimestamp = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["timestampWithMs"])();
          }

          this._finished = true;
          this.activities = {};

          if (this.spanRecorder) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Tracing] finishing IdleTransaction', new Date(endTimestamp * 1000).toISOString(), this.op);

            try {
              for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(this._beforeFinishCallbacks), _c = _b.next(); !_c.done; _c = _b.next()) {
                var callback = _c.value;
                callback(this, endTimestamp);
              }
            } catch (e_1_1) {
              e_1 = {
                error: e_1_1
              };
            } finally {
              try {
                if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
              } finally {
                if (e_1) throw e_1.error;
              }
            }

            this.spanRecorder.spans = this.spanRecorder.spans.filter(function (span) {
              // If we are dealing with the transaction itself, we just return it
              if (span.spanId === _this.spanId) {
                return true;
              } // We cancel all pending spans with status "cancelled" to indicate the idle transaction was finished early


              if (!span.endTimestamp) {
                span.endTimestamp = endTimestamp;
                span.setStatus(_spanstatus__WEBPACK_IMPORTED_MODULE_3__["SpanStatus"].Cancelled);

                _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));
              }

              var keepSpan = span.startTimestamp < endTimestamp;

              if (!keepSpan) {
                _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Tracing] discarding Span since it happened after Transaction was finished', JSON.stringify(span, undefined, 2));
              }

              return keepSpan;
            });

            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Tracing] flushing IdleTransaction');
          } else {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Tracing] No active IdleTransaction');
          } // this._onScope is true if the transaction was previously on the scope.


          if (this._onScope) {
            clearActiveTransaction(this._idleHub);
          }

          return _super.prototype.finish.call(this, endTimestamp);
        };
        /**
         * Register a callback function that gets excecuted before the transaction finishes.
         * Useful for cleanup or if you want to add any additional spans based on current context.
         *
         * This is exposed because users have no other way of running something before an idle transaction
         * finishes.
         */


        IdleTransaction.prototype.registerBeforeFinishCallback = function (callback) {
          this._beforeFinishCallbacks.push(callback);
        };
        /**
         * @inheritDoc
         */


        IdleTransaction.prototype.initSpanRecorder = function (maxlen) {
          var _this = this;

          if (!this.spanRecorder) {
            var pushActivity = function pushActivity(id) {
              if (_this._finished) {
                return;
              }

              _this._pushActivity(id);
            };

            var popActivity = function popActivity(id) {
              if (_this._finished) {
                return;
              }

              _this._popActivity(id);
            };

            this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanId, maxlen); // Start heartbeat so that transactions do not run forever.

            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('Starting heartbeat');

            this._pingHeartbeat();
          }

          this.spanRecorder.add(this);
        };
        /**
         * Start tracking a specific activity.
         * @param spanId The span id that represents the activity
         */


        IdleTransaction.prototype._pushActivity = function (spanId) {
          if (this._initTimeout) {
            clearTimeout(this._initTimeout);
            this._initTimeout = undefined;
          }

          _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log("[Tracing] pushActivity: " + spanId);

          this.activities[spanId] = true;

          _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Tracing] new activities count', Object.keys(this.activities).length);
        };
        /**
         * Remove an activity from usage
         * @param spanId The span id that represents the activity
         */


        IdleTransaction.prototype._popActivity = function (spanId) {
          var _this = this;

          if (this.activities[spanId]) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log("[Tracing] popActivity " + spanId); // eslint-disable-next-line @typescript-eslint/no-dynamic-delete


            delete this.activities[spanId];

            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Tracing] new activities count', Object.keys(this.activities).length);
          }

          if (Object.keys(this.activities).length === 0) {
            var timeout = this._idleTimeout; // We need to add the timeout here to have the real endtimestamp of the transaction
            // Remember timestampWithMs is in seconds, timeout is in ms

            var end_1 = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["timestampWithMs"])() + timeout / 1000;
            setTimeout(function () {
              if (!_this._finished) {
                _this.finish(end_1);
              }
            }, timeout);
          }
        };
        /**
         * Checks when entries of this.activities are not changing for 3 beats.
         * If this occurs we finish the transaction.
         */


        IdleTransaction.prototype._beat = function () {
          // We should not be running heartbeat if the idle transaction is finished.
          if (this._finished) {
            return;
          }

          var heartbeatString = Object.keys(this.activities).join('');

          if (heartbeatString === this._prevHeartbeatString) {
            this._heartbeatCounter += 1;
          } else {
            this._heartbeatCounter = 1;
          }

          this._prevHeartbeatString = heartbeatString;

          if (this._heartbeatCounter >= 3) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log("[Tracing] Transaction finished because of no change for 3 heart beats");

            this.setStatus(_spanstatus__WEBPACK_IMPORTED_MODULE_3__["SpanStatus"].DeadlineExceeded);
            this.setTag('heartbeat', 'failed');
            this.finish();
          } else {
            this._pingHeartbeat();
          }
        };
        /**
         * Pings the heartbeat
         */


        IdleTransaction.prototype._pingHeartbeat = function () {
          var _this = this;

          _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log("pinging Heartbeat -> current counter: " + this._heartbeatCounter);

          setTimeout(function () {
            _this._beat();
          }, HEARTBEAT_INTERVAL);
        };

        return IdleTransaction;
      }(_transaction__WEBPACK_IMPORTED_MODULE_4__["Transaction"]);
      /**
       * Reset active transaction on scope
       */


      function clearActiveTransaction(hub) {
        if (hub) {
          var scope = hub.getScope();

          if (scope) {
            var transaction = scope.getTransaction();

            if (transaction) {
              scope.setSpan(undefined);
            }
          }
        }
      } //# sourceMappingURL=idletransaction.js.map

      /***/

    },

    /***/
    "METY":
    /*!******************************************************!*\
      !*** ./node_modules/@sentry/core/esm/integration.js ***!
      \******************************************************/

    /*! exports provided: installedIntegrations, getIntegrationsToSetup, setupIntegration, setupIntegrations */

    /***/
    function METY(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "installedIntegrations", function () {
        return installedIntegrations;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getIntegrationsToSetup", function () {
        return getIntegrationsToSetup;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setupIntegration", function () {
        return setupIntegration;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setupIntegrations", function () {
        return setupIntegrations;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_hub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/hub */
      "uzXi");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");

      var installedIntegrations = [];
      /**
       * @private
       */

      function filterDuplicates(integrations) {
        return integrations.reduce(function (acc, integrations) {
          if (acc.every(function (accIntegration) {
            return integrations.name !== accIntegration.name;
          })) {
            acc.push(integrations);
          }

          return acc;
        }, []);
      }
      /** Gets integration to install */


      function getIntegrationsToSetup(options) {
        var defaultIntegrations = options.defaultIntegrations && Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(options.defaultIntegrations) || [];
        var userIntegrations = options.integrations;
        var integrations = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(filterDuplicates(defaultIntegrations));

        if (Array.isArray(userIntegrations)) {
          // Filter out integrations that are also included in user options
          integrations = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(integrations.filter(function (integrations) {
            return userIntegrations.every(function (userIntegration) {
              return userIntegration.name !== integrations.name;
            });
          }), filterDuplicates(userIntegrations));
        } else if (typeof userIntegrations === 'function') {
          integrations = userIntegrations(integrations);
          integrations = Array.isArray(integrations) ? integrations : [integrations];
        } // Make sure that if present, `Debug` integration will always run last


        var integrationsNames = integrations.map(function (i) {
          return i.name;
        });
        var alwaysLastToRun = 'Debug';

        if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {
          integrations.push.apply(integrations, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));
        }

        return integrations;
      }
      /** Setup given integration */


      function setupIntegration(integration) {
        if (installedIntegrations.indexOf(integration.name) !== -1) {
          return;
        }

        integration.setupOnce(_sentry_hub__WEBPACK_IMPORTED_MODULE_1__["addGlobalEventProcessor"], _sentry_hub__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"]);
        installedIntegrations.push(integration.name);

        _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].log("Integration installed: " + integration.name);
      }
      /**
       * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default
       * integrations are added unless they were already provided before.
       * @param integrations array of integration instances
       * @param withDefault should enable default integrations
       */


      function setupIntegrations(options) {
        var integrations = {};
        getIntegrationsToSetup(options).forEach(function (integration) {
          integrations[integration.name] = integration;
          setupIntegration(integration);
        }); // set the `initialized` flag so we don't run through the process again unecessarily; use `Object.defineProperty`
        // because by default it creates a property which is nonenumerable, which we want since `initialized` shouldn't be
        // considered a member of the index the way the actual integrations are

        Object.defineProperty(integrations, 'initialized', {
          value: true
        });
        return integrations;
      } //# sourceMappingURL=integration.js.map

      /***/

    },

    /***/
    "MT+3":
    /*!************************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/transports/xhr.js ***!
      \************************************************************/

    /*! exports provided: XHRTransport */

    /***/
    function MT3(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "XHRTransport", function () {
        return XHRTransport;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/core */
      "wBhU");
      /* harmony import */


      var _sentry_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/types */
      "PIsB");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./base */
      "DTjN");
      /** `XHR` based transport */


      var XHRTransport =
      /** @class */
      function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(XHRTransport, _super);

        function XHRTransport() {
          return _super !== null && _super.apply(this, arguments) || this;
        }
        /**
         * @inheritDoc
         */


        XHRTransport.prototype.sendEvent = function (event) {
          return this._sendRequest(Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["eventToSentryRequest"])(event, this._api), event);
        };
        /**
         * @inheritDoc
         */


        XHRTransport.prototype.sendSession = function (session) {
          return this._sendRequest(Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["sessionToSentryRequest"])(session, this._api), session);
        };
        /**
         * @param sentryRequest Prepared SentryRequest to be delivered
         * @param originalPayload Original payload used to create SentryRequest
         */


        XHRTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {
          var _this = this;

          if (this._isRateLimited(sentryRequest.type)) {
            this.recordLostEvent(_sentry_types__WEBPACK_IMPORTED_MODULE_2__["Outcome"].RateLimitBackoff, sentryRequest.type);
            return Promise.reject({
              event: originalPayload,
              type: sentryRequest.type,
              reason: "Transport for " + sentryRequest.type + " requests locked till " + this._disabledUntil(sentryRequest.type) + " due to too many requests.",
              status: 429
            });
          }

          return this._buffer.add(function () {
            return new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SyncPromise"](function (resolve, reject) {
              var request = new XMLHttpRequest();

              request.onreadystatechange = function () {
                if (request.readyState === 4) {
                  var headers = {
                    'x-sentry-rate-limits': request.getResponseHeader('X-Sentry-Rate-Limits'),
                    'retry-after': request.getResponseHeader('Retry-After')
                  };

                  _this._handleResponse({
                    requestType: sentryRequest.type,
                    response: request,
                    headers: headers,
                    resolve: resolve,
                    reject: reject
                  });
                }
              };

              request.open('POST', sentryRequest.url);

              for (var header in _this.options.headers) {
                if (Object.prototype.hasOwnProperty.call(_this.options.headers, header)) {
                  request.setRequestHeader(header, _this.options.headers[header]);
                }
              }

              request.send(sentryRequest.body);
            });
          }).then(undefined, function (reason) {
            // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.
            if (reason instanceof _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SentryError"]) {
              _this.recordLostEvent(_sentry_types__WEBPACK_IMPORTED_MODULE_2__["Outcome"].QueueOverflow, sentryRequest.type);
            } else {
              _this.recordLostEvent(_sentry_types__WEBPACK_IMPORTED_MODULE_2__["Outcome"].NetworkError, sentryRequest.type);
            }

            throw reason;
          });
        };

        return XHRTransport;
      }(_base__WEBPACK_IMPORTED_MODULE_4__["BaseTransport"]); //# sourceMappingURL=xhr.js.map

      /***/

    },

    /***/
    "MaC4":
    /*!****************************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/observe.js ***!
      \****************************************************************************/

    /*! exports provided: observe */

    /***/
    function MaC4(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "observe", function () {
        return observe;
      });
      /*
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *     https://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Takes a performance entry type and a callback function, and creates a
       * `PerformanceObserver` instance that will observe the specified entry type
       * with buffering enabled and call the callback _for each entry_.
       *
       * This function also feature-detects entry support and wraps the logic in a
       * try/catch to avoid errors in unsupporting browsers.
       */


      var observe = function observe(type, callback) {
        try {
          if (PerformanceObserver.supportedEntryTypes.includes(type)) {
            // More extensive feature detect needed for Firefox due to:
            // https://github.com/GoogleChrome/web-vitals/issues/142
            if (type === 'first-input' && !('PerformanceEventTiming' in self)) {
              return;
            }

            var po = new PerformanceObserver(function (l) {
              return l.getEntries().map(callback);
            });
            po.observe({
              type: type,
              buffered: true
            });
            return po;
          }
        } catch (e) {// Do nothing.
        }

        return;
      }; //# sourceMappingURL=observe.js.map

      /***/

    },

    /***/
    "MtjB":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/retryWhen.js ***!
      \********************************************************************/

    /*! exports provided: retryWhen */

    /***/
    function MtjB(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "retryWhen", function () {
        return retryWhen;
      });
      /* harmony import */


      var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subject */
      "XNiG");
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function retryWhen(notifier) {
        return function (source) {
          return source.lift(new RetryWhenOperator(notifier, source));
        };
      }

      var RetryWhenOperator = /*#__PURE__*/function () {
        function RetryWhenOperator(notifier, source) {
          _classCallCheck(this, RetryWhenOperator);

          this.notifier = notifier;
          this.source = source;
        }

        _createClass2(RetryWhenOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));
          }
        }]);

        return RetryWhenOperator;
      }();

      var RetryWhenSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP10) {
        _inherits(RetryWhenSubscriber, _innerSubscribe__WEBP10);

        var _super168 = _createSuper(RetryWhenSubscriber);

        function RetryWhenSubscriber(destination, notifier, source) {
          var _this392;

          _classCallCheck(this, RetryWhenSubscriber);

          _this392 = _super168.call(this, destination);
          _this392.notifier = notifier;
          _this392.source = source;
          return _this392;
        }

        _createClass2(RetryWhenSubscriber, [{
          key: "error",
          value: function error(err) {
            if (!this.isStopped) {
              var errors = this.errors;
              var retries = this.retries;
              var retriesSubscription = this.retriesSubscription;

              if (!retries) {
                errors = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]();

                try {
                  var notifier = this.notifier;
                  retries = notifier(errors);
                } catch (e) {
                  return _get(_getPrototypeOf(RetryWhenSubscriber.prototype), "error", this).call(this, e);
                }

                retriesSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(retries, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](this));
              } else {
                this.errors = undefined;
                this.retriesSubscription = undefined;
              }

              this._unsubscribeAndRecycle();

              this.errors = errors;
              this.retries = retries;
              this.retriesSubscription = retriesSubscription;
              errors.next(err);
            }
          }
        }, {
          key: "_unsubscribe",
          value: function _unsubscribe() {
            var errors = this.errors,
                retriesSubscription = this.retriesSubscription;

            if (errors) {
              errors.unsubscribe();
              this.errors = undefined;
            }

            if (retriesSubscription) {
              retriesSubscription.unsubscribe();
              this.retriesSubscription = undefined;
            }

            this.retries = undefined;
          }
        }, {
          key: "notifyNext",
          value: function notifyNext() {
            var _unsubscribe = this._unsubscribe;
            this._unsubscribe = null;

            this._unsubscribeAndRecycle();

            this._unsubscribe = _unsubscribe;
            this.source.subscribe(this);
          }
        }]);

        return RetryWhenSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"]); //# sourceMappingURL=retryWhen.js.map

      /***/

    },

    /***/
    "NHP+":
    /*!*************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/AsyncSubject.js ***!
      \*************************************************************/

    /*! exports provided: AsyncSubject */

    /***/
    function NHP(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AsyncSubject", function () {
        return AsyncSubject;
      });
      /* harmony import */


      var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./Subject */
      "XNiG");
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./Subscription */
      "quSY");

      var AsyncSubject = /*#__PURE__*/function (_Subject__WEBPACK_IMP3) {
        _inherits(AsyncSubject, _Subject__WEBPACK_IMP3);

        var _super169 = _createSuper(AsyncSubject);

        function AsyncSubject() {
          var _this393;

          _classCallCheck(this, AsyncSubject);

          _this393 = _super169.apply(this, arguments);
          _this393.value = null;
          _this393.hasNext = false;
          _this393.hasCompleted = false;
          return _this393;
        }

        _createClass2(AsyncSubject, [{
          key: "_subscribe",
          value: function _subscribe(subscriber) {
            if (this.hasError) {
              subscriber.error(this.thrownError);
              return _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"].EMPTY;
            } else if (this.hasCompleted && this.hasNext) {
              subscriber.next(this.value);
              subscriber.complete();
              return _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"].EMPTY;
            }

            return _get(_getPrototypeOf(AsyncSubject.prototype), "_subscribe", this).call(this, subscriber);
          }
        }, {
          key: "next",
          value: function next(value) {
            if (!this.hasCompleted) {
              this.value = value;
              this.hasNext = true;
            }
          }
        }, {
          key: "error",
          value: function error(_error3) {
            if (!this.hasCompleted) {
              _get(_getPrototypeOf(AsyncSubject.prototype), "error", this).call(this, _error3);
            }
          }
        }, {
          key: "complete",
          value: function complete() {
            this.hasCompleted = true;

            if (this.hasNext) {
              _get(_getPrototypeOf(AsyncSubject.prototype), "next", this).call(this, this.value);
            }

            _get(_getPrototypeOf(AsyncSubject.prototype), "complete", this).call(this);
          }
        }]);

        return AsyncSubject;
      }(_Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]); //# sourceMappingURL=AsyncSubject.js.map

      /***/

    },

    /***/
    "NJ4a":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/hostReportError.js ***!
      \*********************************************************************/

    /*! exports provided: hostReportError */

    /***/
    function NJ4a(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "hostReportError", function () {
        return hostReportError;
      });

      function hostReportError(err) {
        setTimeout(function () {
          throw err;
        }, 0);
      } //# sourceMappingURL=hostReportError.js.map

      /***/

    },

    /***/
    "NJ9Y":
    /*!***************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/last.js ***!
      \***************************************************************/

    /*! exports provided: last */

    /***/
    function NJ9Y(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "last", function () {
        return last;
      });
      /* harmony import */


      var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../util/EmptyError */
      "sVev");
      /* harmony import */


      var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./filter */
      "pLZG");
      /* harmony import */


      var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./takeLast */
      "BFxc");
      /* harmony import */


      var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./throwIfEmpty */
      "XDbj");
      /* harmony import */


      var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./defaultIfEmpty */
      "xbPD");
      /* harmony import */


      var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ../util/identity */
      "SpAZ");

      function last(predicate, defaultValue) {
        var hasDefaultValue = arguments.length >= 2;
        return function (source) {
          return source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) {
            return predicate(v, i, source);
          }) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_takeLast__WEBPACK_IMPORTED_MODULE_2__["takeLast"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__["throwIfEmpty"])(function () {
            return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"]();
          }));
        };
      } //# sourceMappingURL=last.js.map

      /***/

    },

    /***/
    "NNCq":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/range.js ***!
      \*****************************************************************/

    /*! exports provided: range, dispatch */

    /***/
    function NNCq(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "range", function () {
        return range;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "dispatch", function () {
        return dispatch;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");

      function range() {
        var start = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
        var count = arguments.length > 1 ? arguments[1] : undefined;
        var scheduler = arguments.length > 2 ? arguments[2] : undefined;
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          if (count === undefined) {
            count = start;
            start = 0;
          }

          var index = 0;
          var current = start;

          if (scheduler) {
            return scheduler.schedule(dispatch, 0, {
              index: index,
              count: count,
              start: start,
              subscriber: subscriber
            });
          } else {
            do {
              if (index++ >= count) {
                subscriber.complete();
                break;
              }

              subscriber.next(current++);

              if (subscriber.closed) {
                break;
              }
            } while (true);
          }

          return undefined;
        });
      }

      function dispatch(state) {
        var start = state.start,
            index = state.index,
            count = state.count,
            subscriber = state.subscriber;

        if (index >= count) {
          subscriber.complete();
          return;
        }

        subscriber.next(start);

        if (subscriber.closed) {
          return;
        }

        state.index = index + 1;
        state.start = start + 1;
        this.schedule(state);
      } //# sourceMappingURL=range.js.map

      /***/

    },

    /***/
    "NXyV":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/defer.js ***!
      \*****************************************************************/

    /*! exports provided: defer */

    /***/
    function NXyV(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "defer", function () {
        return defer;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./from */
      "Cfvw");
      /* harmony import */


      var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./empty */
      "EY2u");

      function defer(observableFactory) {
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          var input;

          try {
            input = observableFactory();
          } catch (err) {
            subscriber.error(err);
            return undefined;
          }

          var source = input ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(input) : Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
          return source.subscribe(subscriber);
        });
      } //# sourceMappingURL=defer.js.map

      /***/

    },

    /***/
    "NcYE":
    /*!****************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/polyfill.js ***!
      \****************************************************/

    /*! exports provided: setPrototypeOf */

    /***/
    function NcYE(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setPrototypeOf", function () {
        return setPrototypeOf;
      });

      var setPrototypeOf = Object.setPrototypeOf || ({
        __proto__: []
      } instanceof Array ? setProtoOf : mixinProperties);
      /**
       * setPrototypeOf polyfill using __proto__
       */
      // eslint-disable-next-line @typescript-eslint/ban-types

      function setProtoOf(obj, proto) {
        // @ts-ignore __proto__ does not exist on obj
        obj.__proto__ = proto;
        return obj;
      }
      /**
       * setPrototypeOf polyfill using mixin
       */
      // eslint-disable-next-line @typescript-eslint/ban-types


      function mixinProperties(obj, proto) {
        for (var prop in proto) {
          if (!Object.prototype.hasOwnProperty.call(obj, prop)) {
            // @ts-ignore typescript complains about indexing so we remove
            obj[prop] = proto[prop];
          }
        }

        return obj;
      } //# sourceMappingURL=polyfill.js.map

      /***/

    },

    /***/
    "NfdI":
    /*!******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/publish.js ***!
      \******************************************************************/

    /*! exports provided: publish */

    /***/
    function NfdI(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "publish", function () {
        return publish;
      });
      /* harmony import */


      var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subject */
      "XNiG");
      /* harmony import */


      var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./multicast */
      "oB13");

      function publish(selector) {
        return selector ? Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () {
          return new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
        }, selector) : Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]());
      } //# sourceMappingURL=publish.js.map

      /***/

    },

    /***/
    "Nv8m":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/race.js ***!
      \****************************************************************/

    /*! exports provided: race, RaceOperator, RaceSubscriber */

    /***/
    function Nv8m(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "race", function () {
        return race;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RaceOperator", function () {
        return RaceOperator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RaceSubscriber", function () {
        return RaceSubscriber;
      });
      /* harmony import */


      var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../util/isArray */
      "DH7j");
      /* harmony import */


      var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./fromArray */
      "yCtX");
      /* harmony import */


      var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../OuterSubscriber */
      "l7GE");
      /* harmony import */


      var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../util/subscribeToResult */
      "ZUHj");

      function race() {
        for (var _len23 = arguments.length, observables = new Array(_len23), _key24 = 0; _key24 < _len23; _key24++) {
          observables[_key24] = arguments[_key24];
        }

        if (observables.length === 1) {
          if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
            observables = observables[0];
          } else {
            return observables[0];
          }
        }

        return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(observables, undefined).lift(new RaceOperator());
      }

      var RaceOperator = /*#__PURE__*/function () {
        function RaceOperator() {
          _classCallCheck(this, RaceOperator);
        }

        _createClass2(RaceOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new RaceSubscriber(subscriber));
          }
        }]);

        return RaceOperator;
      }();

      var RaceSubscriber = /*#__PURE__*/function (_OuterSubscriber__WEB2) {
        _inherits(RaceSubscriber, _OuterSubscriber__WEB2);

        var _super170 = _createSuper(RaceSubscriber);

        function RaceSubscriber(destination) {
          var _this394;

          _classCallCheck(this, RaceSubscriber);

          _this394 = _super170.call(this, destination);
          _this394.hasFirst = false;
          _this394.observables = [];
          _this394.subscriptions = [];
          return _this394;
        }

        _createClass2(RaceSubscriber, [{
          key: "_next",
          value: function _next(observable) {
            this.observables.push(observable);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var observables = this.observables;
            var len = observables.length;

            if (len === 0) {
              this.destination.complete();
            } else {
              for (var i = 0; i < len && !this.hasFirst; i++) {
                var observable = observables[i];
                var subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, observable, undefined, i);

                if (this.subscriptions) {
                  this.subscriptions.push(subscription);
                }

                this.add(subscription);
              }

              this.observables = null;
            }
          }
        }, {
          key: "notifyNext",
          value: function notifyNext(_outerValue, innerValue, outerIndex) {
            if (!this.hasFirst) {
              this.hasFirst = true;

              for (var i = 0; i < this.subscriptions.length; i++) {
                if (i !== outerIndex) {
                  var subscription = this.subscriptions[i];
                  subscription.unsubscribe();
                  this.remove(subscription);
                }
              }

              this.subscriptions = null;
            }

            this.destination.next(innerValue);
          }
        }]);

        return RaceSubscriber;
      }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]); //# sourceMappingURL=race.js.map

      /***/

    },

    /***/
    "O2kO":
    /*!*************************************************************************************!*\
      !*** ./node_modules/@ionic-native/core/__ivy_ngcc__/decorators/cordova-property.js ***!
      \*************************************************************************************/

    /*! exports provided: cordovaPropertyGet, cordovaPropertySet */

    /***/
    function O2kO(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "cordovaPropertyGet", function () {
        return cordovaPropertyGet;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "cordovaPropertySet", function () {
        return cordovaPropertySet;
      });
      /* harmony import */


      var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./common */
      "yR3O");

      function cordovaPropertyGet(pluginObj, key) {
        if (Object(_common__WEBPACK_IMPORTED_MODULE_0__["checkAvailability"])(pluginObj, key) === true) {
          return Object(_common__WEBPACK_IMPORTED_MODULE_0__["getPlugin"])(pluginObj.constructor.getPluginRef())[key];
        }

        return null;
      }

      function cordovaPropertySet(pluginObj, key, value) {
        if (Object(_common__WEBPACK_IMPORTED_MODULE_0__["checkAvailability"])(pluginObj, key) === true) {
          Object(_common__WEBPACK_IMPORTED_MODULE_0__["getPlugin"])(pluginObj.constructor.getPluginRef())[key] = value;
        }
      } //# sourceMappingURL=cordova-property.js.map

      /***/

    },

    /***/
    "O4y0":
    /*!*********************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/SubscribeOnObservable.js ***!
      \*********************************************************************************/

    /*! exports provided: SubscribeOnObservable */

    /***/
    function O4y0(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SubscribeOnObservable", function () {
        return SubscribeOnObservable;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../scheduler/asap */
      "7Hc7");
      /* harmony import */


      var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../util/isNumeric */
      "Y7HM");

      var SubscribeOnObservable = /*#__PURE__*/function (_Observable__WEBPACK_2) {
        _inherits(SubscribeOnObservable, _Observable__WEBPACK_2);

        var _super171 = _createSuper(SubscribeOnObservable);

        function SubscribeOnObservable(source) {
          var _this395;

          var delayTime = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
          var scheduler = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__["asap"];

          _classCallCheck(this, SubscribeOnObservable);

          _this395 = _super171.call(this);
          _this395.source = source;
          _this395.delayTime = delayTime;
          _this395.scheduler = scheduler;

          if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(delayTime) || delayTime < 0) {
            _this395.delayTime = 0;
          }

          if (!scheduler || typeof scheduler.schedule !== 'function') {
            _this395.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__["asap"];
          }

          return _this395;
        }

        _createClass2(SubscribeOnObservable, [{
          key: "_subscribe",
          value: function _subscribe(subscriber) {
            var delay = this.delayTime;
            var source = this.source;
            var scheduler = this.scheduler;
            return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
              source: source,
              subscriber: subscriber
            });
          }
        }], [{
          key: "create",
          value: function create(source) {
            var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
            var scheduler = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__["asap"];
            return new SubscribeOnObservable(source, delay, scheduler);
          }
        }, {
          key: "dispatch",
          value: function dispatch(arg) {
            var source = arg.source,
                subscriber = arg.subscriber;
            return this.add(source.subscribe(subscriber));
          }
        }]);

        return SubscribeOnObservable;
      }(_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]); //# sourceMappingURL=SubscribeOnObservable.js.map

      /***/

    },

    /***/
    "O8DA":
    /*!*************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/async.js ***!
      \*************************************************/

    /*! exports provided: forget */

    /***/
    function O8DA(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "forget", function () {
        return forget;
      });
      /**
       * Consumes the promise and logs the error when it rejects.
       * @param promise A promise to forget.
       */
      // eslint-disable-next-line @typescript-eslint/no-explicit-any


      function forget(promise) {
        void promise.then(null, function (e) {
          // TODO: Use a better logging mechanism
          // eslint-disable-next-line no-console
          console.error(e);
        });
      } //# sourceMappingURL=async.js.map

      /***/

    },

    /***/
    "OE48":
    /*!*******************************************************************!*\
      !*** ./node_modules/@ionic-native/core/__ivy_ngcc__/bootstrap.js ***!
      \*******************************************************************/

    /*! exports provided: checkReady */

    /***/
    function OE48(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "checkReady", function () {
        return checkReady;
      });

      function checkReady() {
        if (typeof process === 'undefined') {
          var win_1 = typeof window !== 'undefined' ? window : {};
          var DEVICE_READY_TIMEOUT_1 = 5000; // To help developers using cordova, we listen for the device ready event and
          // log an error if it didn't fire in a reasonable amount of time. Generally,
          // when this happens, developers should remove and reinstall plugins, since
          // an inconsistent plugin is often the culprit.

          var before_1 = Date.now();
          var didFireReady_1 = false;
          win_1.document.addEventListener('deviceready', function () {
            console.log("Ionic Native: deviceready event fired after " + (Date.now() - before_1) + " ms");
            didFireReady_1 = true;
          });
          setTimeout(function () {
            if (!didFireReady_1 && win_1.cordova) {
              console.warn("Ionic Native: deviceready did not fire within " + DEVICE_READY_TIMEOUT_1 + "ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.");
            }
          }, DEVICE_READY_TIMEOUT_1);
        }
      } //# sourceMappingURL=bootstrap.js.map

      /***/

    },

    /***/
    "OQgR":
    /*!******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/groupBy.js ***!
      \******************************************************************/

    /*! exports provided: groupBy, GroupedObservable */

    /***/
    function OQgR(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "groupBy", function () {
        return groupBy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "GroupedObservable", function () {
        return GroupedObservable;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Subscription */
      "quSY");
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _Subject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../Subject */
      "XNiG");

      function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {
        return function (source) {
          return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));
        };
      }

      var GroupByOperator = /*#__PURE__*/function () {
        function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {
          _classCallCheck(this, GroupByOperator);

          this.keySelector = keySelector;
          this.elementSelector = elementSelector;
          this.durationSelector = durationSelector;
          this.subjectSelector = subjectSelector;
        }

        _createClass2(GroupByOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));
          }
        }]);

        return GroupByOperator;
      }();

      var GroupBySubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_20) {
        _inherits(GroupBySubscriber, _Subscriber__WEBPACK_20);

        var _super172 = _createSuper(GroupBySubscriber);

        function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
          var _this396;

          _classCallCheck(this, GroupBySubscriber);

          _this396 = _super172.call(this, destination);
          _this396.keySelector = keySelector;
          _this396.elementSelector = elementSelector;
          _this396.durationSelector = durationSelector;
          _this396.subjectSelector = subjectSelector;
          _this396.groups = null;
          _this396.attemptedToUnsubscribe = false;
          _this396.count = 0;
          return _this396;
        }

        _createClass2(GroupBySubscriber, [{
          key: "_next",
          value: function _next(value) {
            var key;

            try {
              key = this.keySelector(value);
            } catch (err) {
              this.error(err);
              return;
            }

            this._group(value, key);
          }
        }, {
          key: "_group",
          value: function _group(value, key) {
            var groups = this.groups;

            if (!groups) {
              groups = this.groups = new Map();
            }

            var group = groups.get(key);
            var element;

            if (this.elementSelector) {
              try {
                element = this.elementSelector(value);
              } catch (err) {
                this.error(err);
              }
            } else {
              element = value;
            }

            if (!group) {
              group = this.subjectSelector ? this.subjectSelector() : new _Subject__WEBPACK_IMPORTED_MODULE_3__["Subject"]();
              groups.set(key, group);
              var groupedObservable = new GroupedObservable(key, group, this);
              this.destination.next(groupedObservable);

              if (this.durationSelector) {
                var duration;

                try {
                  duration = this.durationSelector(new GroupedObservable(key, group));
                } catch (err) {
                  this.error(err);
                  return;
                }

                this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));
              }
            }

            if (!group.closed) {
              group.next(element);
            }
          }
        }, {
          key: "_error",
          value: function _error(err) {
            var groups = this.groups;

            if (groups) {
              groups.forEach(function (group, key) {
                group.error(err);
              });
              groups.clear();
            }

            this.destination.error(err);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var groups = this.groups;

            if (groups) {
              groups.forEach(function (group, key) {
                group.complete();
              });
              groups.clear();
            }

            this.destination.complete();
          }
        }, {
          key: "removeGroup",
          value: function removeGroup(key) {
            this.groups["delete"](key);
          }
        }, {
          key: "unsubscribe",
          value: function unsubscribe() {
            if (!this.closed) {
              this.attemptedToUnsubscribe = true;

              if (this.count === 0) {
                _get(_getPrototypeOf(GroupBySubscriber.prototype), "unsubscribe", this).call(this);
              }
            }
          }
        }]);

        return GroupBySubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]);

      var GroupDurationSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_21) {
        _inherits(GroupDurationSubscriber, _Subscriber__WEBPACK_21);

        var _super173 = _createSuper(GroupDurationSubscriber);

        function GroupDurationSubscriber(key, group, parent) {
          var _this397;

          _classCallCheck(this, GroupDurationSubscriber);

          _this397 = _super173.call(this, group);
          _this397.key = key;
          _this397.group = group;
          _this397.parent = parent;
          return _this397;
        }

        _createClass2(GroupDurationSubscriber, [{
          key: "_next",
          value: function _next(value) {
            this.complete();
          }
        }, {
          key: "_unsubscribe",
          value: function _unsubscribe() {
            var parent = this.parent,
                key = this.key;
            this.key = this.parent = null;

            if (parent) {
              parent.removeGroup(key);
            }
          }
        }]);

        return GroupDurationSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]);

      var GroupedObservable = /*#__PURE__*/function (_Observable__WEBPACK_3) {
        _inherits(GroupedObservable, _Observable__WEBPACK_3);

        var _super174 = _createSuper(GroupedObservable);

        function GroupedObservable(key, groupSubject, refCountSubscription) {
          var _this398;

          _classCallCheck(this, GroupedObservable);

          _this398 = _super174.call(this);
          _this398.key = key;
          _this398.groupSubject = groupSubject;
          _this398.refCountSubscription = refCountSubscription;
          return _this398;
        }

        _createClass2(GroupedObservable, [{
          key: "_subscribe",
          value: function _subscribe(subscriber) {
            var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
            var refCountSubscription = this.refCountSubscription,
                groupSubject = this.groupSubject;

            if (refCountSubscription && !refCountSubscription.closed) {
              subscription.add(new InnerRefCountSubscription(refCountSubscription));
            }

            subscription.add(groupSubject.subscribe(subscriber));
            return subscription;
          }
        }]);

        return GroupedObservable;
      }(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]);

      var InnerRefCountSubscription = /*#__PURE__*/function (_Subscription__WEBPAC3) {
        _inherits(InnerRefCountSubscription, _Subscription__WEBPAC3);

        var _super175 = _createSuper(InnerRefCountSubscription);

        function InnerRefCountSubscription(parent) {
          var _this399;

          _classCallCheck(this, InnerRefCountSubscription);

          _this399 = _super175.call(this);
          _this399.parent = parent;
          parent.count++;
          return _this399;
        }

        _createClass2(InnerRefCountSubscription, [{
          key: "unsubscribe",
          value: function unsubscribe() {
            var parent = this.parent;

            if (!parent.closed && !this.closed) {
              _get(_getPrototypeOf(InnerRefCountSubscription.prototype), "unsubscribe", this).call(this);

              parent.count -= 1;

              if (parent.count === 0 && parent.attemptedToUnsubscribe) {
                parent.unsubscribe();
              }
            }
          }
        }]);

        return InnerRefCountSubscription;
      }(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]); //# sourceMappingURL=groupBy.js.map

      /***/

    },

    /***/
    "OsX3":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferTime.js ***!
      \*********************************************************************/

    /*! exports provided: bufferTime */

    /***/
    function OsX3(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "bufferTime", function () {
        return bufferTime;
      });
      /* harmony import */


      var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../scheduler/async */
      "D0XW");
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../util/isScheduler */
      "z+Ro");

      function bufferTime(bufferTimeSpan) {
        var length = arguments.length;
        var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];

        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(arguments[arguments.length - 1])) {
          scheduler = arguments[arguments.length - 1];
          length--;
        }

        var bufferCreationInterval = null;

        if (length >= 2) {
          bufferCreationInterval = arguments[1];
        }

        var maxBufferSize = Number.POSITIVE_INFINITY;

        if (length >= 3) {
          maxBufferSize = arguments[2];
        }

        return function bufferTimeOperatorFunction(source) {
          return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));
        };
      }

      var BufferTimeOperator = /*#__PURE__*/function () {
        function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
          _classCallCheck(this, BufferTimeOperator);

          this.bufferTimeSpan = bufferTimeSpan;
          this.bufferCreationInterval = bufferCreationInterval;
          this.maxBufferSize = maxBufferSize;
          this.scheduler = scheduler;
        }

        _createClass2(BufferTimeOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));
          }
        }]);

        return BufferTimeOperator;
      }();

      var Context = function Context() {
        _classCallCheck(this, Context);

        this.buffer = [];
      };

      var BufferTimeSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_22) {
        _inherits(BufferTimeSubscriber, _Subscriber__WEBPACK_22);

        var _super176 = _createSuper(BufferTimeSubscriber);

        function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
          var _this400;

          _classCallCheck(this, BufferTimeSubscriber);

          _this400 = _super176.call(this, destination);
          _this400.bufferTimeSpan = bufferTimeSpan;
          _this400.bufferCreationInterval = bufferCreationInterval;
          _this400.maxBufferSize = maxBufferSize;
          _this400.scheduler = scheduler;
          _this400.contexts = [];

          var context = _this400.openContext();

          _this400.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;

          if (_this400.timespanOnly) {
            var timeSpanOnlyState = {
              subscriber: _assertThisInitialized(_this400),
              context: context,
              bufferTimeSpan: bufferTimeSpan
            };

            _this400.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
          } else {
            var closeState = {
              subscriber: _assertThisInitialized(_this400),
              context: context
            };
            var creationState = {
              bufferTimeSpan: bufferTimeSpan,
              bufferCreationInterval: bufferCreationInterval,
              subscriber: _assertThisInitialized(_this400),
              scheduler: scheduler
            };

            _this400.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));

            _this400.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
          }

          return _this400;
        }

        _createClass2(BufferTimeSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var contexts = this.contexts;
            var len = contexts.length;
            var filledBufferContext;

            for (var i = 0; i < len; i++) {
              var context = contexts[i];
              var buffer = context.buffer;
              buffer.push(value);

              if (buffer.length == this.maxBufferSize) {
                filledBufferContext = context;
              }
            }

            if (filledBufferContext) {
              this.onBufferFull(filledBufferContext);
            }
          }
        }, {
          key: "_error",
          value: function _error(err) {
            this.contexts.length = 0;

            _get(_getPrototypeOf(BufferTimeSubscriber.prototype), "_error", this).call(this, err);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var contexts = this.contexts,
                destination = this.destination;

            while (contexts.length > 0) {
              var context = contexts.shift();
              destination.next(context.buffer);
            }

            _get(_getPrototypeOf(BufferTimeSubscriber.prototype), "_complete", this).call(this);
          }
        }, {
          key: "_unsubscribe",
          value: function _unsubscribe() {
            this.contexts = null;
          }
        }, {
          key: "onBufferFull",
          value: function onBufferFull(context) {
            this.closeContext(context);
            var closeAction = context.closeAction;
            closeAction.unsubscribe();
            this.remove(closeAction);

            if (!this.closed && this.timespanOnly) {
              context = this.openContext();
              var bufferTimeSpan = this.bufferTimeSpan;
              var timeSpanOnlyState = {
                subscriber: this,
                context: context,
                bufferTimeSpan: bufferTimeSpan
              };
              this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
            }
          }
        }, {
          key: "openContext",
          value: function openContext() {
            var context = new Context();
            this.contexts.push(context);
            return context;
          }
        }, {
          key: "closeContext",
          value: function closeContext(context) {
            this.destination.next(context.buffer);
            var contexts = this.contexts;
            var spliceIndex = contexts ? contexts.indexOf(context) : -1;

            if (spliceIndex >= 0) {
              contexts.splice(contexts.indexOf(context), 1);
            }
          }
        }]);

        return BufferTimeSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]);

      function dispatchBufferTimeSpanOnly(state) {
        var subscriber = state.subscriber;
        var prevContext = state.context;

        if (prevContext) {
          subscriber.closeContext(prevContext);
        }

        if (!subscriber.closed) {
          state.context = subscriber.openContext();
          state.context.closeAction = this.schedule(state, state.bufferTimeSpan);
        }
      }

      function dispatchBufferCreation(state) {
        var bufferCreationInterval = state.bufferCreationInterval,
            bufferTimeSpan = state.bufferTimeSpan,
            subscriber = state.subscriber,
            scheduler = state.scheduler;
        var context = subscriber.openContext();
        var action = this;

        if (!subscriber.closed) {
          subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, {
            subscriber: subscriber,
            context: context
          }));
          action.schedule(state, bufferCreationInterval);
        }
      }

      function dispatchBufferClose(arg) {
        var subscriber = arg.subscriber,
            context = arg.context;
        subscriber.closeContext(context);
      } //# sourceMappingURL=bufferTime.js.map

      /***/

    },

    /***/
    "PH02":
    /*!***********************************************************!*\
      !*** ./node_modules/@capacitor/clipboard/dist/esm/web.js ***!
      \***********************************************************/

    /*! exports provided: ClipboardWeb */

    /***/
    function PH02(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ClipboardWeb", function () {
        return ClipboardWeb;
      });
      /* harmony import */


      var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @capacitor/core */
      "FUe0");

      var ClipboardWeb = /*#__PURE__*/function (_capacitor_core__WEBP) {
        _inherits(ClipboardWeb, _capacitor_core__WEBP);

        var _super177 = _createSuper(ClipboardWeb);

        function ClipboardWeb() {
          _classCallCheck(this, ClipboardWeb);

          return _super177.apply(this, arguments);
        }

        _createClass2(ClipboardWeb, [{
          key: "write",
          value: function () {
            var _write = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17(options) {
              var blob, clipboardItemInput;
              return regeneratorRuntime.wrap(function _callee17$(_context19) {
                while (1) {
                  switch (_context19.prev = _context19.next) {
                    case 0:
                      if (!(typeof navigator === 'undefined' || !navigator.clipboard)) {
                        _context19.next = 2;
                        break;
                      }

                      throw this.unavailable('Clipboard API not available in this browser');

                    case 2:
                      if (!(options.string !== undefined)) {
                        _context19.next = 7;
                        break;
                      }

                      _context19.next = 5;
                      return this.writeText(options.string);

                    case 5:
                      _context19.next = 34;
                      break;

                    case 7:
                      if (!options.url) {
                        _context19.next = 12;
                        break;
                      }

                      _context19.next = 10;
                      return this.writeText(options.url);

                    case 10:
                      _context19.next = 34;
                      break;

                    case 12:
                      if (!options.image) {
                        _context19.next = 33;
                        break;
                      }

                      if (!(typeof ClipboardItem !== 'undefined')) {
                        _context19.next = 30;
                        break;
                      }

                      _context19.prev = 14;
                      _context19.next = 17;
                      return fetch(options.image);

                    case 17:
                      _context19.next = 19;
                      return _context19.sent.blob();

                    case 19:
                      blob = _context19.sent;
                      clipboardItemInput = new ClipboardItem(_defineProperty({}, blob.type, blob));
                      _context19.next = 23;
                      return navigator.clipboard.write([clipboardItemInput]);

                    case 23:
                      _context19.next = 28;
                      break;

                    case 25:
                      _context19.prev = 25;
                      _context19.t0 = _context19["catch"](14);
                      throw new Error('Failed to write image');

                    case 28:
                      _context19.next = 31;
                      break;

                    case 30:
                      throw this.unavailable('Writing images to the clipboard is not supported in this browser');

                    case 31:
                      _context19.next = 34;
                      break;

                    case 33:
                      throw new Error('Nothing to write');

                    case 34:
                    case "end":
                      return _context19.stop();
                  }
                }
              }, _callee17, this, [[14, 25]]);
            }));

            function write(_x14) {
              return _write.apply(this, arguments);
            }

            return write;
          }()
        }, {
          key: "read",
          value: function () {
            var _read = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18() {
              var clipboardItems, type, clipboardBlob, data;
              return regeneratorRuntime.wrap(function _callee18$(_context20) {
                while (1) {
                  switch (_context20.prev = _context20.next) {
                    case 0:
                      if (!(typeof navigator === 'undefined' || !navigator.clipboard)) {
                        _context20.next = 2;
                        break;
                      }

                      throw this.unavailable('Clipboard API not available in this browser');

                    case 2:
                      if (!(typeof ClipboardItem !== 'undefined')) {
                        _context20.next = 22;
                        break;
                      }

                      _context20.prev = 3;
                      _context20.next = 6;
                      return navigator.clipboard.read();

                    case 6:
                      clipboardItems = _context20.sent;
                      type = clipboardItems[0].types[0];
                      _context20.next = 10;
                      return clipboardItems[0].getType(type);

                    case 10:
                      clipboardBlob = _context20.sent;
                      _context20.next = 13;
                      return this._getBlobData(clipboardBlob, type);

                    case 13:
                      data = _context20.sent;
                      return _context20.abrupt("return", {
                        value: data,
                        type: type
                      });

                    case 17:
                      _context20.prev = 17;
                      _context20.t0 = _context20["catch"](3);
                      return _context20.abrupt("return", this.readText());

                    case 20:
                      _context20.next = 23;
                      break;

                    case 22:
                      return _context20.abrupt("return", this.readText());

                    case 23:
                    case "end":
                      return _context20.stop();
                  }
                }
              }, _callee18, this, [[3, 17]]);
            }));

            function read() {
              return _read.apply(this, arguments);
            }

            return read;
          }()
        }, {
          key: "readText",
          value: function () {
            var _readText = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19() {
              var text;
              return regeneratorRuntime.wrap(function _callee19$(_context21) {
                while (1) {
                  switch (_context21.prev = _context21.next) {
                    case 0:
                      if (!(typeof navigator === 'undefined' || !navigator.clipboard || !navigator.clipboard.readText)) {
                        _context21.next = 2;
                        break;
                      }

                      throw this.unavailable('Reading from clipboard not supported in this browser');

                    case 2:
                      _context21.next = 4;
                      return navigator.clipboard.readText();

                    case 4:
                      text = _context21.sent;
                      return _context21.abrupt("return", {
                        value: text,
                        type: 'text/plain'
                      });

                    case 6:
                    case "end":
                      return _context21.stop();
                  }
                }
              }, _callee19, this);
            }));

            function readText() {
              return _readText.apply(this, arguments);
            }

            return readText;
          }()
        }, {
          key: "writeText",
          value: function () {
            var _writeText = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20(text) {
              return regeneratorRuntime.wrap(function _callee20$(_context22) {
                while (1) {
                  switch (_context22.prev = _context22.next) {
                    case 0:
                      if (!(typeof navigator === 'undefined' || !navigator.clipboard || !navigator.clipboard.writeText)) {
                        _context22.next = 2;
                        break;
                      }

                      throw this.unavailable('Writting to clipboard not supported in this browser');

                    case 2:
                      _context22.next = 4;
                      return navigator.clipboard.writeText(text);

                    case 4:
                    case "end":
                      return _context22.stop();
                  }
                }
              }, _callee20, this);
            }));

            function writeText(_x15) {
              return _writeText.apply(this, arguments);
            }

            return writeText;
          }()
        }, {
          key: "_getBlobData",
          value: function _getBlobData(clipboardBlob, type) {
            return new Promise(function (resolve, reject) {
              var reader = new FileReader();

              if (type.includes('image')) {
                reader.readAsDataURL(clipboardBlob);
              } else {
                reader.readAsText(clipboardBlob);
              }

              reader.onloadend = function () {
                var r = reader.result;
                resolve(r);
              };

              reader.onerror = function (e) {
                reject(e);
              };
            });
          }
        }]);

        return ClipboardWeb;
      }(_capacitor_core__WEBPACK_IMPORTED_MODULE_0__["WebPlugin"]); //# sourceMappingURL=web.js.map

      /***/

    },

    /***/
    "PIsB":
    /*!*************************************************!*\
      !*** ./node_modules/@sentry/types/esm/index.js ***!
      \*************************************************/

    /*! exports provided: LogLevel, SessionStatus, RequestSessionStatus, Severity, Status, TransactionSamplingMethod, Outcome */

    /***/
    function PIsB(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _loglevel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./loglevel */
      "RRfd");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "LogLevel", function () {
        return _loglevel__WEBPACK_IMPORTED_MODULE_0__["LogLevel"];
      });
      /* harmony import */


      var _session__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./session */
      "yksw");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "SessionStatus", function () {
        return _session__WEBPACK_IMPORTED_MODULE_1__["SessionStatus"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "RequestSessionStatus", function () {
        return _session__WEBPACK_IMPORTED_MODULE_1__["RequestSessionStatus"];
      });
      /* harmony import */


      var _severity__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./severity */
      "1Wj6");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Severity", function () {
        return _severity__WEBPACK_IMPORTED_MODULE_2__["Severity"];
      });
      /* harmony import */


      var _status__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./status */
      "dMW8");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Status", function () {
        return _status__WEBPACK_IMPORTED_MODULE_3__["Status"];
      });
      /* harmony import */


      var _transaction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./transaction */
      "jrpr");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "TransactionSamplingMethod", function () {
        return _transaction__WEBPACK_IMPORTED_MODULE_4__["TransactionSamplingMethod"];
      });
      /* harmony import */


      var _transport__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./transport */
      "FQKz");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Outcome", function () {
        return _transport__WEBPACK_IMPORTED_MODULE_5__["Outcome"];
      }); //# sourceMappingURL=index.js.map

      /***/

    },

    /***/
    "PJjM":
    /*!*************************************************************!*\
      !*** ./node_modules/@capacitor/clipboard/dist/esm/index.js ***!
      \*************************************************************/

    /*! exports provided: Clipboard */

    /***/
    function PJjM(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Clipboard", function () {
        return Clipboard;
      });
      /* harmony import */


      var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @capacitor/core */
      "FUe0");
      /* harmony import */


      var _web__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./web */
      "PH02");
      /* harmony import */


      var _definitions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./definitions */
      "v06m");
      /* empty/unused harmony star reexport */


      var Clipboard = Object(_capacitor_core__WEBPACK_IMPORTED_MODULE_0__["registerPlugin"])('Clipboard', {
        web: function web() {
          return new _web__WEBPACK_IMPORTED_MODULE_1__["ClipboardWeb"]();
        }
      }); //# sourceMappingURL=index.js.map

      /***/
    },

    /***/
    "PZkE":
    /*!**********************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/distinctUntilKeyChanged.js ***!
      \**********************************************************************************/

    /*! exports provided: distinctUntilKeyChanged */

    /***/
    function PZkE(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function () {
        return distinctUntilKeyChanged;
      });
      /* harmony import */


      var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./distinctUntilChanged */
      "/uUt");

      function distinctUntilKeyChanged(key, compare) {
        return Object(_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__["distinctUntilChanged"])(function (x, y) {
          return compare ? compare(x[key], y[key]) : x[key] === y[key];
        });
      } //# sourceMappingURL=distinctUntilKeyChanged.js.map

      /***/

    },

    /***/
    "PfrF":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferWhen.js ***!
      \*********************************************************************/

    /*! exports provided: bufferWhen */

    /***/
    function PfrF(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "bufferWhen", function () {
        return bufferWhen;
      });
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscription */
      "quSY");
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function bufferWhen(closingSelector) {
        return function (source) {
          return source.lift(new BufferWhenOperator(closingSelector));
        };
      }

      var BufferWhenOperator = /*#__PURE__*/function () {
        function BufferWhenOperator(closingSelector) {
          _classCallCheck(this, BufferWhenOperator);

          this.closingSelector = closingSelector;
        }

        _createClass2(BufferWhenOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));
          }
        }]);

        return BufferWhenOperator;
      }();

      var BufferWhenSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP11) {
        _inherits(BufferWhenSubscriber, _innerSubscribe__WEBP11);

        var _super178 = _createSuper(BufferWhenSubscriber);

        function BufferWhenSubscriber(destination, closingSelector) {
          var _this401;

          _classCallCheck(this, BufferWhenSubscriber);

          _this401 = _super178.call(this, destination);
          _this401.closingSelector = closingSelector;
          _this401.subscribing = false;

          _this401.openBuffer();

          return _this401;
        }

        _createClass2(BufferWhenSubscriber, [{
          key: "_next",
          value: function _next(value) {
            this.buffer.push(value);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var buffer = this.buffer;

            if (buffer) {
              this.destination.next(buffer);
            }

            _get(_getPrototypeOf(BufferWhenSubscriber.prototype), "_complete", this).call(this);
          }
        }, {
          key: "_unsubscribe",
          value: function _unsubscribe() {
            this.buffer = undefined;
            this.subscribing = false;
          }
        }, {
          key: "notifyNext",
          value: function notifyNext() {
            this.openBuffer();
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            if (this.subscribing) {
              this.complete();
            } else {
              this.openBuffer();
            }
          }
        }, {
          key: "openBuffer",
          value: function openBuffer() {
            var closingSubscription = this.closingSubscription;

            if (closingSubscription) {
              this.remove(closingSubscription);
              closingSubscription.unsubscribe();
            }

            var buffer = this.buffer;

            if (this.buffer) {
              this.destination.next(buffer);
            }

            this.buffer = [];
            var closingNotifier;

            try {
              var closingSelector = this.closingSelector;
              closingNotifier = closingSelector();
            } catch (err) {
              return this.error(err);
            }

            closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"]();
            this.closingSubscription = closingSubscription;
            this.add(closingSubscription);
            this.subscribing = true;
            closingSubscription.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(closingNotifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](this)));
            this.subscribing = false;
          }
        }]);

        return BufferWhenSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"]); //# sourceMappingURL=bufferWhen.js.map

      /***/

    },

    /***/
    "PjJh":
    /*!*********************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/integrations/node/mysql.js ***!
      \*********************************************************************/

    /*! exports provided: Mysql */

    /***/
    function PjJh(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Mysql", function () {
        return Mysql;
      });
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /** Tracing integration for node-mysql package */


      var Mysql =
      /** @class */
      function () {
        function Mysql() {
          /**
           * @inheritDoc
           */
          this.name = Mysql.id;
        }
        /**
         * @inheritDoc
         */


        Mysql.prototype.setupOnce = function (_, getCurrentHub) {
          var pkg = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["loadModule"])('mysql/lib/Connection.js');

          if (!pkg) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].error('Mysql Integration was unable to require `mysql` package.');

            return;
          } // The original function will have one of these signatures:
          //    function (callback) => void
          //    function (options, callback) => void
          //    function (options, values, callback) => void


          Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["fill"])(pkg, 'createQuery', function (orig) {
            return function (options, values, callback) {
              var _a, _b;

              var scope = getCurrentHub().getScope();
              var parentSpan = (_a = scope) === null || _a === void 0 ? void 0 : _a.getSpan();
              var span = (_b = parentSpan) === null || _b === void 0 ? void 0 : _b.startChild({
                description: typeof options === 'string' ? options : options.sql,
                op: "db"
              });

              if (typeof callback === 'function') {
                return orig.call(this, options, values, function (err, result, fields) {
                  var _a;

                  (_a = span) === null || _a === void 0 ? void 0 : _a.finish();
                  callback(err, result, fields);
                });
              }

              if (typeof values === 'function') {
                return orig.call(this, options, function (err, result, fields) {
                  var _a;

                  (_a = span) === null || _a === void 0 ? void 0 : _a.finish();
                  values(err, result, fields);
                });
              }

              return orig.call(this, options, values, callback);
            };
          });
        };
        /**
         * @inheritDoc
         */


        Mysql.id = 'Mysql';
        return Mysql;
      }(); //# sourceMappingURL=mysql.js.map

      /***/

    },

    /***/
    "PqYM":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/timer.js ***!
      \*****************************************************************/

    /*! exports provided: timer */

    /***/
    function PqYM(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "timer", function () {
        return timer;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../scheduler/async */
      "D0XW");
      /* harmony import */


      var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../util/isNumeric */
      "Y7HM");
      /* harmony import */


      var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../util/isScheduler */
      "z+Ro");

      function timer() {
        var dueTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
        var periodOrScheduler = arguments.length > 1 ? arguments[1] : undefined;
        var scheduler = arguments.length > 2 ? arguments[2] : undefined;
        var period = -1;

        if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(periodOrScheduler)) {
          period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
        } else if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(periodOrScheduler)) {
          scheduler = periodOrScheduler;
        }

        if (!Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(scheduler)) {
          scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
        }

        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          var due = Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(dueTime) ? dueTime : +dueTime - scheduler.now();
          return scheduler.schedule(dispatch, due, {
            index: 0,
            period: period,
            subscriber: subscriber
          });
        });
      }

      function dispatch(state) {
        var index = state.index,
            period = state.period,
            subscriber = state.subscriber;
        subscriber.next(index);

        if (subscriber.closed) {
          return;
        } else if (period === -1) {
          return subscriber.complete();
        }

        state.index = index + 1;
        this.schedule(state, period);
      } //# sourceMappingURL=timer.js.map

      /***/

    },

    /***/
    "Pz8W":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsapAction.js ***!
      \*********************************************************************/

    /*! exports provided: AsapAction */

    /***/
    function Pz8W(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AsapAction", function () {
        return AsapAction;
      });
      /* harmony import */


      var _util_Immediate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../util/Immediate */
      "c7jc");
      /* harmony import */


      var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./AsyncAction */
      "3N8a");

      var AsapAction = /*#__PURE__*/function (_AsyncAction__WEBPACK) {
        _inherits(AsapAction, _AsyncAction__WEBPACK);

        var _super179 = _createSuper(AsapAction);

        function AsapAction(scheduler, work) {
          var _this402;

          _classCallCheck(this, AsapAction);

          _this402 = _super179.call(this, scheduler, work);
          _this402.scheduler = scheduler;
          _this402.work = work;
          return _this402;
        }

        _createClass2(AsapAction, [{
          key: "requestAsyncId",
          value: function requestAsyncId(scheduler, id) {
            var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;

            if (delay !== null && delay > 0) {
              return _get(_getPrototypeOf(AsapAction.prototype), "requestAsyncId", this).call(this, scheduler, id, delay);
            }

            scheduler.actions.push(this);
            return scheduler.scheduled || (scheduler.scheduled = _util_Immediate__WEBPACK_IMPORTED_MODULE_0__["Immediate"].setImmediate(scheduler.flush.bind(scheduler, null)));
          }
        }, {
          key: "recycleAsyncId",
          value: function recycleAsyncId(scheduler, id) {
            var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;

            if (delay !== null && delay > 0 || delay === null && this.delay > 0) {
              return _get(_getPrototypeOf(AsapAction.prototype), "recycleAsyncId", this).call(this, scheduler, id, delay);
            }

            if (scheduler.actions.length === 0) {
              _util_Immediate__WEBPACK_IMPORTED_MODULE_0__["Immediate"].clearImmediate(id);

              scheduler.scheduled = undefined;
            }

            return undefined;
          }
        }]);

        return AsapAction;
      }(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]); //# sourceMappingURL=AsapAction.js.map

      /***/

    },

    /***/
    "QIAL":
    /*!*************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/isInteropObservable.js ***!
      \*************************************************************************/

    /*! exports provided: isInteropObservable */

    /***/
    function QIAL(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isInteropObservable", function () {
        return isInteropObservable;
      });
      /* harmony import */


      var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../symbol/observable */
      "kJWO");

      function isInteropObservable(input) {
        return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]] === 'function';
      } //# sourceMappingURL=isInteropObservable.js.map

      /***/

    },

    /***/
    "QMYr":
    /*!****************************************************************************!*\
      !*** ./node_modules/@ionic-native/core/__ivy_ngcc__/decorators/cordova.js ***!
      \****************************************************************************/

    /*! exports provided: cordova */

    /***/
    function QMYr(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "cordova", function () {
        return cordova;
      });
      /* harmony import */


      var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./common */
      "yR3O");

      function cordova(pluginObj, methodName, config, args) {
        return Object(_common__WEBPACK_IMPORTED_MODULE_0__["wrap"])(pluginObj, methodName, config).apply(this, args);
      } //# sourceMappingURL=cordova.js.map

      /***/

    },

    /***/
    "QQmx":
    /*!**********************************************!*\
      !*** ./node_modules/@sentry/core/esm/sdk.js ***!
      \**********************************************/

    /*! exports provided: initAndBind */

    /***/
    function QQmx(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "initAndBind", function () {
        return initAndBind;
      });
      /* harmony import */


      var _sentry_hub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/hub */
      "uzXi");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /**
       * Internal function to create a new SDK client instance. The client is
       * installed and then bound to the current scope.
       *
       * @param clientClass The client class to instantiate.
       * @param options Options to pass to the client.
       */


      function initAndBind(clientClass, options) {
        var _a;

        if (options.debug === true) {
          _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].enable();
        }

        var hub = Object(_sentry_hub__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])();
        (_a = hub.getScope()) === null || _a === void 0 ? void 0 : _a.update(options.initialScope);
        var client = new clientClass(options);
        hub.bindClient(client);
      } //# sourceMappingURL=sdk.js.map

      /***/

    },

    /***/
    "Qn8I":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/using.js ***!
      \*****************************************************************/

    /*! exports provided: using */

    /***/
    function Qn8I(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "using", function () {
        return using;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./from */
      "Cfvw");
      /* harmony import */


      var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./empty */
      "EY2u");

      function using(resourceFactory, observableFactory) {
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          var resource;

          try {
            resource = resourceFactory();
          } catch (err) {
            subscriber.error(err);
            return undefined;
          }

          var result;

          try {
            result = observableFactory(resource);
          } catch (err) {
            subscriber.error(err);
            return undefined;
          }

          var source = result ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(result) : _empty__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
          var subscription = source.subscribe(subscriber);
          return function () {
            subscription.unsubscribe();

            if (resource) {
              resource.unsubscribe();
            }
          };
        });
      } //# sourceMappingURL=using.js.map

      /***/

    },

    /***/
    "QqCr":
    /*!************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/bindCallback.js ***!
      \************************************************************************/

    /*! exports provided: bindCallback */

    /***/
    function QqCr(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "bindCallback", function () {
        return bindCallback;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../AsyncSubject */
      "NHP+");
      /* harmony import */


      var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../operators/map */
      "lJxs");
      /* harmony import */


      var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../util/canReportError */
      "8Qeq");
      /* harmony import */


      var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ../util/isArray */
      "DH7j");
      /* harmony import */


      var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ../util/isScheduler */
      "z+Ro");

      function bindCallback(callbackFunc, resultSelector, scheduler) {
        if (resultSelector) {
          if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(resultSelector)) {
            scheduler = resultSelector;
          } else {
            return function () {
              return bindCallback(callbackFunc, scheduler).apply(void 0, arguments).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) {
                return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_4__["isArray"])(args) ? resultSelector.apply(void 0, _toConsumableArray(args)) : resultSelector(args);
              }));
            };
          }
        }

        return function () {
          for (var _len24 = arguments.length, args = new Array(_len24), _key25 = 0; _key25 < _len24; _key25++) {
            args[_key25] = arguments[_key25];
          }

          var context = this;
          var subject;
          var params = {
            context: context,
            subject: subject,
            callbackFunc: callbackFunc,
            scheduler: scheduler
          };
          return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
            if (!scheduler) {
              if (!subject) {
                subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();

                var handler = function handler() {
                  for (var _len25 = arguments.length, innerArgs = new Array(_len25), _key26 = 0; _key26 < _len25; _key26++) {
                    innerArgs[_key26] = arguments[_key26];
                  }

                  subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
                  subject.complete();
                };

                try {
                  callbackFunc.apply(context, [].concat(args, [handler]));
                } catch (err) {
                  if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
                    subject.error(err);
                  } else {
                    console.warn(err);
                  }
                }
              }

              return subject.subscribe(subscriber);
            } else {
              var state = {
                args: args,
                subscriber: subscriber,
                params: params
              };
              return scheduler.schedule(dispatch, 0, state);
            }
          });
        };
      }

      function dispatch(state) {
        var _this403 = this;

        var self = this;
        var args = state.args,
            subscriber = state.subscriber,
            params = state.params;
        var callbackFunc = params.callbackFunc,
            context = params.context,
            scheduler = params.scheduler;
        var subject = params.subject;

        if (!subject) {
          subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();

          var handler = function handler() {
            for (var _len26 = arguments.length, innerArgs = new Array(_len26), _key27 = 0; _key27 < _len26; _key27++) {
              innerArgs[_key27] = arguments[_key27];
            }

            var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;

            _this403.add(scheduler.schedule(dispatchNext, 0, {
              value: value,
              subject: subject
            }));
          };

          try {
            callbackFunc.apply(context, [].concat(_toConsumableArray(args), [handler]));
          } catch (err) {
            subject.error(err);
          }
        }

        this.add(subject.subscribe(subscriber));
      }

      function dispatchNext(state) {
        var value = state.value,
            subject = state.subject;
        subject.next(value);
        subject.complete();
      }

      function dispatchError(state) {
        var err = state.err,
            subject = state.subject;
        subject.error(err);
      } //# sourceMappingURL=bindCallback.js.map

      /***/

    },

    /***/
    "RDap":
    /*!************************************************************************!*\
      !*** ./node_modules/@sentry/core/esm/integrations/functiontostring.js ***!
      \************************************************************************/

    /*! exports provided: FunctionToString */

    /***/
    function RDap(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FunctionToString", function () {
        return FunctionToString;
      });

      var originalFunctionToString;
      /** Patch toString calls to return proper name for wrapped functions */

      var FunctionToString =
      /** @class */
      function () {
        function FunctionToString() {
          /**
           * @inheritDoc
           */
          this.name = FunctionToString.id;
        }
        /**
         * @inheritDoc
         */


        FunctionToString.prototype.setupOnce = function () {
          // eslint-disable-next-line @typescript-eslint/unbound-method
          originalFunctionToString = Function.prototype.toString; // eslint-disable-next-line @typescript-eslint/no-explicit-any

          Function.prototype.toString = function () {
            var args = [];

            for (var _i = 0; _i < arguments.length; _i++) {
              args[_i] = arguments[_i];
            }

            var context = this.__sentry_original__ || this;
            return originalFunctionToString.apply(context, args);
          };
        };
        /**
         * @inheritDoc
         */


        FunctionToString.id = 'FunctionToString';
        return FunctionToString;
      }(); //# sourceMappingURL=functiontostring.js.map

      /***/

    },

    /***/
    "RRfd":
    /*!****************************************************!*\
      !*** ./node_modules/@sentry/types/esm/loglevel.js ***!
      \****************************************************/

    /*! exports provided: LogLevel */

    /***/
    function RRfd(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LogLevel", function () {
        return LogLevel;
      });
      /** Console logging verbosity for the SDK. */


      var LogLevel;

      (function (LogLevel) {
        /** No logs will be generated. */
        LogLevel[LogLevel["None"] = 0] = "None";
        /** Only SDK internal errors will be logged. */

        LogLevel[LogLevel["Error"] = 1] = "Error";
        /** Information useful for debugging the SDK will be logged. */

        LogLevel[LogLevel["Debug"] = 2] = "Debug";
        /** All SDK actions will be logged. */

        LogLevel[LogLevel["Verbose"] = 3] = "Verbose";
      })(LogLevel || (LogLevel = {})); //# sourceMappingURL=loglevel.js.map

      /***/

    },

    /***/
    "RUbi":
    /*!************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsapScheduler.js ***!
      \************************************************************************/

    /*! exports provided: AsapScheduler */

    /***/
    function RUbi(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AsapScheduler", function () {
        return AsapScheduler;
      });
      /* harmony import */


      var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./AsyncScheduler */
      "IjjT");

      var AsapScheduler = /*#__PURE__*/function (_AsyncScheduler__WEBP2) {
        _inherits(AsapScheduler, _AsyncScheduler__WEBP2);

        var _super180 = _createSuper(AsapScheduler);

        function AsapScheduler() {
          _classCallCheck(this, AsapScheduler);

          return _super180.apply(this, arguments);
        }

        _createClass2(AsapScheduler, [{
          key: "flush",
          value: function flush(action) {
            this.active = true;
            this.scheduled = undefined;
            var actions = this.actions;
            var error;
            var index = -1;
            var count = actions.length;
            action = action || actions.shift();

            do {
              if (error = action.execute(action.state, action.delay)) {
                break;
              }
            } while (++index < count && (action = actions.shift()));

            this.active = false;

            if (error) {
              while (++index < count && (action = actions.shift())) {
                action.unsubscribe();
              }

              throw error;
            }
          }
        }]);

        return AsapScheduler;
      }(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__["AsyncScheduler"]); //# sourceMappingURL=AsapScheduler.js.map

      /***/

    },

    /***/
    "SOSK":
    /*!****************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/overlays-e9ccff30.js ***!
      \****************************************************************/

    /*! exports provided: B, a, b, c, d, e, f, g, h, i, l, m, p, s, t */

    /***/
    function SOSK(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "B", function () {
        return BACKDROP;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "a", function () {
        return alertController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "b", function () {
        return actionSheetController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "c", function () {
        return popoverController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "d", function () {
        return present;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "e", function () {
        return prepareOverlay;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "f", function () {
        return dismiss;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "g", function () {
        return eventMethod;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "h", function () {
        return activeAnimations;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "i", function () {
        return isCancel;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "l", function () {
        return loadingController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "m", function () {
        return modalController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "p", function () {
        return pickerController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "s", function () {
        return safeCall;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "t", function () {
        return toastController;
      });
      /* harmony import */


      var _ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./ionic-global-63a97a32.js */
      "E/Mt");
      /* harmony import */


      var _hardware_back_button_4a6b37fb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./hardware-back-button-4a6b37fb.js */
      "B4Jq");
      /* harmony import */


      var _helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./helpers-dd7e4b7b.js */
      "1vRN");

      var lastId = 0;
      var activeAnimations = new WeakMap();

      var createController = function createController(tagName) {
        return {
          create: function create(options) {
            return createOverlay(tagName, options);
          },
          dismiss: function dismiss(data, role, id) {
            return dismissOverlay(document, data, role, tagName, id);
          },
          getTop: function getTop() {
            return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee21() {
              return regeneratorRuntime.wrap(function _callee21$(_context23) {
                while (1) {
                  switch (_context23.prev = _context23.next) {
                    case 0:
                      return _context23.abrupt("return", getOverlay(document, tagName));

                    case 1:
                    case "end":
                      return _context23.stop();
                  }
                }
              }, _callee21);
            }))();
          }
        };
      };

      var alertController = /*@__PURE__*/createController('ion-alert');
      var actionSheetController = /*@__PURE__*/createController('ion-action-sheet');
      var loadingController = /*@__PURE__*/createController('ion-loading');
      var modalController = /*@__PURE__*/createController('ion-modal');
      var pickerController = /*@__PURE__*/createController('ion-picker');
      var popoverController = /*@__PURE__*/createController('ion-popover');
      var toastController = /*@__PURE__*/createController('ion-toast');

      var prepareOverlay = function prepareOverlay(el) {
        /* tslint:disable-next-line */
        if (typeof document !== 'undefined') {
          connectListeners(document);
        }

        var overlayIndex = lastId++;
        el.overlayIndex = overlayIndex;

        if (!el.hasAttribute('id')) {
          el.id = "ion-overlay-".concat(overlayIndex);
        }
      };

      var createOverlay = function createOverlay(tagName, opts) {
        /* tslint:disable-next-line */
        if (typeof customElements !== 'undefined') {
          return customElements.whenDefined(tagName).then(function () {
            var element = document.createElement(tagName);
            element.classList.add('overlay-hidden'); // convert the passed in overlay options into props
            // that get passed down into the new overlay

            Object.assign(element, opts); // append the overlay element to the document body

            getAppRoot(document).appendChild(element);
            return new Promise(function (resolve) {
              return Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_2__["c"])(element, resolve);
            });
          });
        }

        return Promise.resolve();
      };

      var focusableQueryString = '[tabindex]:not([tabindex^="-"]), input:not([type=hidden]):not([tabindex^="-"]), textarea:not([tabindex^="-"]), button:not([tabindex^="-"]), select:not([tabindex^="-"]), .ion-focusable:not([tabindex^="-"])';
      var innerFocusableQueryString = 'input:not([type=hidden]), textarea, button, select';

      var focusFirstDescendant = function focusFirstDescendant(ref, overlay) {
        var firstInput = ref.querySelector(focusableQueryString);
        var shadowRoot = firstInput && firstInput.shadowRoot;

        if (shadowRoot) {
          // If there are no inner focusable elements, just focus the host element.
          firstInput = shadowRoot.querySelector(innerFocusableQueryString) || firstInput;
        }

        if (firstInput) {
          firstInput.focus();
        } else {
          // Focus overlay instead of letting focus escape
          overlay.focus();
        }
      };

      var focusLastDescendant = function focusLastDescendant(ref, overlay) {
        var inputs = Array.from(ref.querySelectorAll(focusableQueryString));
        var lastInput = inputs.length > 0 ? inputs[inputs.length - 1] : null;
        var shadowRoot = lastInput && lastInput.shadowRoot;

        if (shadowRoot) {
          // If there are no inner focusable elements, just focus the host element.
          lastInput = shadowRoot.querySelector(innerFocusableQueryString) || lastInput;
        }

        if (lastInput) {
          lastInput.focus();
        } else {
          // Focus overlay instead of letting focus escape
          overlay.focus();
        }
      };
      /**
       * Traps keyboard focus inside of overlay components.
       * Based on https://w3c.github.io/aria-practices/examples/dialog-modal/alertdialog.html
       * This includes the following components: Action Sheet, Alert, Loading, Modal,
       * Picker, and Popover.
       * Should NOT include: Toast
       */


      var trapKeyboardFocus = function trapKeyboardFocus(ev, doc) {
        var lastOverlay = getOverlay(doc);
        var target = ev.target; // If no active overlay, ignore this event

        if (!lastOverlay || !target) {
          return;
        }
        /**
         * If we are focusing the overlay, clear
         * the last focused element so that hitting
         * tab activates the first focusable element
         * in the overlay wrapper.
         */


        if (lastOverlay === target) {
          lastOverlay.lastFocus = undefined;
          /**
           * Otherwise, we must be focusing an element
           * inside of the overlay. The two possible options
           * here are an input/button/etc or the ion-focus-trap
           * element. The focus trap element is used to prevent
           * the keyboard focus from leaving the overlay when
           * using Tab or screen assistants.
           */
        } else {
          /**
           * We do not want to focus the traps, so get the overlay
           * wrapper element as the traps live outside of the wrapper.
           */
          var overlayRoot = Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_2__["g"])(lastOverlay);

          if (!overlayRoot.contains(target)) {
            return;
          }

          var overlayWrapper = overlayRoot.querySelector('.ion-overlay-wrapper');

          if (!overlayWrapper) {
            return;
          }
          /**
           * If the target is inside the wrapper, let the browser
           * focus as normal and keep a log of the last focused element.
           */


          if (overlayWrapper.contains(target)) {
            lastOverlay.lastFocus = target;
          } else {
            /**
             * Otherwise, we must have focused one of the focus traps.
             * We need to wrap the focus to either the first element
             * or the last element.
             */

            /**
             * Once we call `focusFirstDescendant` and focus the first
             * descendant, another focus event will fire which will
             * cause `lastOverlay.lastFocus` to be updated before
             * we can run the code after that. We will cache the value
             * here to avoid that.
             */
            var lastFocus = lastOverlay.lastFocus; // Focus the first element in the overlay wrapper

            focusFirstDescendant(overlayWrapper, lastOverlay);
            /**
             * If the cached last focused element is the
             * same as the active element, then we need
             * to wrap focus to the last descendant. This happens
             * when the first descendant is focused, and the user
             * presses Shift + Tab. The previous line will focus
             * the same descendant again (the first one), causing
             * last focus to equal the active element.
             */

            if (lastFocus === doc.activeElement) {
              focusLastDescendant(overlayWrapper, lastOverlay);
            }

            lastOverlay.lastFocus = doc.activeElement;
          }
        }
      };

      var connectListeners = function connectListeners(doc) {
        if (lastId === 0) {
          lastId = 1;
          doc.addEventListener('focus', function (ev) {
            return trapKeyboardFocus(ev, doc);
          }, true); // handle back-button click

          doc.addEventListener('ionBackButton', function (ev) {
            var lastOverlay = getOverlay(doc);

            if (lastOverlay && lastOverlay.backdropDismiss) {
              ev.detail.register(_hardware_back_button_4a6b37fb_js__WEBPACK_IMPORTED_MODULE_1__["OVERLAY_BACK_BUTTON_PRIORITY"], function () {
                return lastOverlay.dismiss(undefined, BACKDROP);
              });
            }
          }); // handle ESC to close overlay

          doc.addEventListener('keyup', function (ev) {
            if (ev.key === 'Escape') {
              var lastOverlay = getOverlay(doc);

              if (lastOverlay && lastOverlay.backdropDismiss) {
                lastOverlay.dismiss(undefined, BACKDROP);
              }
            }
          });
        }
      };

      var dismissOverlay = function dismissOverlay(doc, data, role, overlayTag, id) {
        var overlay = getOverlay(doc, overlayTag, id);

        if (!overlay) {
          return Promise.reject('overlay does not exist');
        }

        return overlay.dismiss(data, role);
      };

      var getOverlays = function getOverlays(doc, selector) {
        if (selector === undefined) {
          selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover,ion-toast';
        }

        return Array.from(doc.querySelectorAll(selector)).filter(function (c) {
          return c.overlayIndex > 0;
        });
      };

      var getOverlay = function getOverlay(doc, overlayTag, id) {
        var overlays = getOverlays(doc, overlayTag);
        return id === undefined ? overlays[overlays.length - 1] : overlays.find(function (o) {
          return o.id === id;
        });
      };
      /**
       * When an overlay is presented, the main
       * focus is the overlay not the page content.
       * We need to remove the page content from the
       * accessibility tree otherwise when
       * users use "read screen from top" gestures with
       * TalkBack and VoiceOver, the screen reader will begin
       * to read the content underneath the overlay.
       *
       * We need a container where all page components
       * exist that is separate from where the overlays
       * are added in the DOM. For most apps, this element
       * is the top most ion-router-outlet. In the event
       * that devs are not using a router,
       * they will need to add the "ion-view-container-root"
       * id to the element that contains all of their views.
       *
       * TODO: If Framework supports having multiple top
       * level router outlets we would need to update this.
       * Example: One outlet for side menu and one outlet
       * for main content.
       */


      var setRootAriaHidden = function setRootAriaHidden() {
        var hidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
        var root = getAppRoot(document);
        var viewContainer = root.querySelector('ion-router-outlet, ion-nav, #ion-view-container-root');

        if (!viewContainer) {
          return;
        }

        if (hidden) {
          viewContainer.setAttribute('aria-hidden', 'true');
        } else {
          viewContainer.removeAttribute('aria-hidden');
        }
      };

      var present = /*#__PURE__*/function () {
        var _ref79 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee22(overlay, name, iosEnterAnimation, mdEnterAnimation, opts) {
          var mode, animationBuilder, completed;
          return regeneratorRuntime.wrap(function _callee22$(_context24) {
            while (1) {
              switch (_context24.prev = _context24.next) {
                case 0:
                  if (!overlay.presented) {
                    _context24.next = 2;
                    break;
                  }

                  return _context24.abrupt("return");

                case 2:
                  setRootAriaHidden(true);
                  overlay.presented = true;
                  overlay.willPresent.emit();
                  mode = Object(_ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_0__["b"])(overlay); // get the user's animation fn if one was provided

                  animationBuilder = overlay.enterAnimation ? overlay.enterAnimation : _ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_0__["c"].get(name, mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
                  _context24.next = 9;
                  return overlayAnimation(overlay, animationBuilder, overlay.el, opts);

                case 9:
                  completed = _context24.sent;

                  if (completed) {
                    overlay.didPresent.emit();
                  }
                  /**
                   * When an overlay that steals focus
                   * is dismissed, focus should be returned
                   * to the element that was focused
                   * prior to the overlay opening. Toast
                   * does not steal focus and is excluded
                   * from returning focus as a result.
                   */


                  if (overlay.el.tagName !== 'ION-TOAST') {
                    focusPreviousElementOnDismiss(overlay.el);
                  }

                  if (overlay.keyboardClose) {
                    overlay.el.focus();
                  }

                case 13:
                case "end":
                  return _context24.stop();
              }
            }
          }, _callee22);
        }));

        return function present(_x16, _x17, _x18, _x19, _x20) {
          return _ref79.apply(this, arguments);
        };
      }();
      /**
       * When an overlay component is dismissed,
       * focus should be returned to the element
       * that presented the overlay. Otherwise
       * focus will be set on the body which
       * means that people using screen readers
       * or tabbing will need to re-navigate
       * to where they were before they
       * opened the overlay.
       */


      var focusPreviousElementOnDismiss = /*#__PURE__*/function () {
        var _ref80 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee23(overlayEl) {
          var previousElement, shadowRoot;
          return regeneratorRuntime.wrap(function _callee23$(_context25) {
            while (1) {
              switch (_context25.prev = _context25.next) {
                case 0:
                  previousElement = document.activeElement;

                  if (previousElement) {
                    _context25.next = 3;
                    break;
                  }

                  return _context25.abrupt("return");

                case 3:
                  shadowRoot = previousElement && previousElement.shadowRoot;

                  if (shadowRoot) {
                    // If there are no inner focusable elements, just focus the host element.
                    previousElement = shadowRoot.querySelector(innerFocusableQueryString) || previousElement;
                  }

                  _context25.next = 7;
                  return overlayEl.onDidDismiss();

                case 7:
                  previousElement.focus();

                case 8:
                case "end":
                  return _context25.stop();
              }
            }
          }, _callee23);
        }));

        return function focusPreviousElementOnDismiss(_x21) {
          return _ref80.apply(this, arguments);
        };
      }();

      var dismiss = /*#__PURE__*/function () {
        var _ref81 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee24(overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) {
          var mode, animationBuilder;
          return regeneratorRuntime.wrap(function _callee24$(_context26) {
            while (1) {
              switch (_context26.prev = _context26.next) {
                case 0:
                  if (overlay.presented) {
                    _context26.next = 2;
                    break;
                  }

                  return _context26.abrupt("return", false);

                case 2:
                  setRootAriaHidden(false);
                  overlay.presented = false;
                  _context26.prev = 4;
                  // Overlay contents should not be clickable during dismiss
                  overlay.el.style.setProperty('pointer-events', 'none');
                  overlay.willDismiss.emit({
                    data: data,
                    role: role
                  });
                  mode = Object(_ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_0__["b"])(overlay);
                  animationBuilder = overlay.leaveAnimation ? overlay.leaveAnimation : _ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_0__["c"].get(name, mode === 'ios' ? iosLeaveAnimation : mdLeaveAnimation); // If dismissed via gesture, no need to play leaving animation again

                  if (!(role !== 'gesture')) {
                    _context26.next = 12;
                    break;
                  }

                  _context26.next = 12;
                  return overlayAnimation(overlay, animationBuilder, overlay.el, opts);

                case 12:
                  overlay.didDismiss.emit({
                    data: data,
                    role: role
                  });
                  activeAnimations["delete"](overlay);
                  _context26.next = 19;
                  break;

                case 16:
                  _context26.prev = 16;
                  _context26.t0 = _context26["catch"](4);
                  console.error(_context26.t0);

                case 19:
                  overlay.el.remove();
                  return _context26.abrupt("return", true);

                case 21:
                case "end":
                  return _context26.stop();
              }
            }
          }, _callee24, null, [[4, 16]]);
        }));

        return function dismiss(_x22, _x23, _x24, _x25, _x26, _x27, _x28) {
          return _ref81.apply(this, arguments);
        };
      }();

      var getAppRoot = function getAppRoot(doc) {
        return doc.querySelector('ion-app') || doc.body;
      };

      var overlayAnimation = /*#__PURE__*/function () {
        var _ref82 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee25(overlay, animationBuilder, baseEl, opts) {
          var aniRoot, animation, activeAni;
          return regeneratorRuntime.wrap(function _callee25$(_context27) {
            while (1) {
              switch (_context27.prev = _context27.next) {
                case 0:
                  // Make overlay visible in case it's hidden
                  baseEl.classList.remove('overlay-hidden');
                  aniRoot = baseEl.shadowRoot || overlay.el;
                  animation = animationBuilder(aniRoot, opts);

                  if (!overlay.animated || !_ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_0__["c"].getBoolean('animated', true)) {
                    animation.duration(0);
                  }

                  if (overlay.keyboardClose) {
                    animation.beforeAddWrite(function () {
                      var activeElement = baseEl.ownerDocument.activeElement;

                      if (activeElement && activeElement.matches('input, ion-input, ion-textarea')) {
                        activeElement.blur();
                      }
                    });
                  }

                  activeAni = activeAnimations.get(overlay) || [];
                  activeAnimations.set(overlay, [].concat(_toConsumableArray(activeAni), [animation]));
                  _context27.next = 9;
                  return animation.play();

                case 9:
                  return _context27.abrupt("return", true);

                case 10:
                case "end":
                  return _context27.stop();
              }
            }
          }, _callee25);
        }));

        return function overlayAnimation(_x29, _x30, _x31, _x32) {
          return _ref82.apply(this, arguments);
        };
      }();

      var eventMethod = function eventMethod(element, eventName) {
        var resolve;
        var promise = new Promise(function (r) {
          return resolve = r;
        });
        onceEvent(element, eventName, function (event) {
          resolve(event.detail);
        });
        return promise;
      };

      var onceEvent = function onceEvent(element, eventName, callback) {
        var handler = function handler(ev) {
          Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_2__["b"])(element, eventName, handler);
          callback(ev);
        };

        Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_2__["a"])(element, eventName, handler);
      };

      var isCancel = function isCancel(role) {
        return role === 'cancel' || role === BACKDROP;
      };

      var defaultGate = function defaultGate(h) {
        return h();
      };

      var safeCall = function safeCall(handler, arg) {
        if (typeof handler === 'function') {
          var jmp = _ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_0__["c"].get('_zoneGate', defaultGate);

          return jmp(function () {
            try {
              return handler(arg);
            } catch (e) {
              console.error(e);
            }
          });
        }

        return undefined;
      };

      var BACKDROP = 'backdrop';
      /***/
    },

    /***/
    "SOwp":
    /*!**********************************************************************!*\
      !*** ./node_modules/@sentry/tracing/node_modules/tslib/tslib.es6.js ***!
      \**********************************************************************/

    /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet */

    /***/
    function SOwp(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__extends", function () {
        return __extends;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__assign", function () {
        return _assign;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__rest", function () {
        return __rest;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__decorate", function () {
        return __decorate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__param", function () {
        return __param;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__metadata", function () {
        return __metadata;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__awaiter", function () {
        return __awaiter;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__generator", function () {
        return __generator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__createBinding", function () {
        return __createBinding;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__exportStar", function () {
        return __exportStar;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__values", function () {
        return __values;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__read", function () {
        return __read;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__spread", function () {
        return __spread;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__spreadArrays", function () {
        return __spreadArrays;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__await", function () {
        return __await;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function () {
        return __asyncGenerator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function () {
        return __asyncDelegator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__asyncValues", function () {
        return __asyncValues;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function () {
        return __makeTemplateObject;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__importStar", function () {
        return __importStar;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__importDefault", function () {
        return __importDefault;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__classPrivateFieldGet", function () {
        return __classPrivateFieldGet;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__classPrivateFieldSet", function () {
        return __classPrivateFieldSet;
      });
      /*! *****************************************************************************
      Copyright (c) Microsoft Corporation.
      
      Permission to use, copy, modify, and/or distribute this software for any
      purpose with or without fee is hereby granted.
      
      THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
      REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
      AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
      INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
      LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
      OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
      PERFORMANCE OF THIS SOFTWARE.
      ***************************************************************************** */

      /* global Reflect, Promise */


      var _extendStatics = function extendStatics(d, b) {
        _extendStatics = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function (d, b) {
          d.__proto__ = b;
        } || function (d, b) {
          for (var p in b) {
            if (b.hasOwnProperty(p)) d[p] = b[p];
          }
        };

        return _extendStatics(d, b);
      };

      function __extends(d, b) {
        _extendStatics(d, b);

        function __() {
          this.constructor = d;
        }

        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      }

      var _assign = function __assign() {
        _assign = Object.assign || function __assign(t) {
          for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];

            for (var p in s) {
              if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
            }
          }

          return t;
        };

        return _assign.apply(this, arguments);
      };

      function __rest(s, e) {
        var t = {};

        for (var p in s) {
          if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
        }

        if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
          if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
        }
        return t;
      }

      function __decorate(decorators, target, key, desc) {
        var c = arguments.length,
            r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
            d;
        if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
          if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
        }
        return c > 3 && r && Object.defineProperty(target, key, r), r;
      }

      function __param(paramIndex, decorator) {
        return function (target, key) {
          decorator(target, key, paramIndex);
        };
      }

      function __metadata(metadataKey, metadataValue) {
        if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
      }

      function __awaiter(thisArg, _arguments, P, generator) {
        function adopt(value) {
          return value instanceof P ? value : new P(function (resolve) {
            resolve(value);
          });
        }

        return new (P || (P = Promise))(function (resolve, reject) {
          function fulfilled(value) {
            try {
              step(generator.next(value));
            } catch (e) {
              reject(e);
            }
          }

          function rejected(value) {
            try {
              step(generator["throw"](value));
            } catch (e) {
              reject(e);
            }
          }

          function step(result) {
            result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
          }

          step((generator = generator.apply(thisArg, _arguments || [])).next());
        });
      }

      function __generator(thisArg, body) {
        var _ = {
          label: 0,
          sent: function sent() {
            if (t[0] & 1) throw t[1];
            return t[1];
          },
          trys: [],
          ops: []
        },
            f,
            y,
            t,
            g;
        return g = {
          next: verb(0),
          "throw": verb(1),
          "return": verb(2)
        }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
          return this;
        }), g;

        function verb(n) {
          return function (v) {
            return step([n, v]);
          };
        }

        function step(op) {
          if (f) throw new TypeError("Generator is already executing.");

          while (_) {
            try {
              if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
              if (y = 0, t) op = [op[0] & 2, t.value];

              switch (op[0]) {
                case 0:
                case 1:
                  t = op;
                  break;

                case 4:
                  _.label++;
                  return {
                    value: op[1],
                    done: false
                  };

                case 5:
                  _.label++;
                  y = op[1];
                  op = [0];
                  continue;

                case 7:
                  op = _.ops.pop();

                  _.trys.pop();

                  continue;

                default:
                  if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
                    _ = 0;
                    continue;
                  }

                  if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
                    _.label = op[1];
                    break;
                  }

                  if (op[0] === 6 && _.label < t[1]) {
                    _.label = t[1];
                    t = op;
                    break;
                  }

                  if (t && _.label < t[2]) {
                    _.label = t[2];

                    _.ops.push(op);

                    break;
                  }

                  if (t[2]) _.ops.pop();

                  _.trys.pop();

                  continue;
              }

              op = body.call(thisArg, _);
            } catch (e) {
              op = [6, e];
              y = 0;
            } finally {
              f = t = 0;
            }
          }

          if (op[0] & 5) throw op[1];
          return {
            value: op[0] ? op[1] : void 0,
            done: true
          };
        }
      }

      function __createBinding(o, m, k, k2) {
        if (k2 === undefined) k2 = k;
        o[k2] = m[k];
      }

      function __exportStar(m, exports) {
        for (var p in m) {
          if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
        }
      }

      function __values(o) {
        var s = typeof Symbol === "function" && Symbol.iterator,
            m = s && o[s],
            i = 0;
        if (m) return m.call(o);
        if (o && typeof o.length === "number") return {
          next: function next() {
            if (o && i >= o.length) o = void 0;
            return {
              value: o && o[i++],
              done: !o
            };
          }
        };
        throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
      }

      function __read(o, n) {
        var m = typeof Symbol === "function" && o[Symbol.iterator];
        if (!m) return o;
        var i = m.call(o),
            r,
            ar = [],
            e;

        try {
          while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
            ar.push(r.value);
          }
        } catch (error) {
          e = {
            error: error
          };
        } finally {
          try {
            if (r && !r.done && (m = i["return"])) m.call(i);
          } finally {
            if (e) throw e.error;
          }
        }

        return ar;
      }

      function __spread() {
        for (var ar = [], i = 0; i < arguments.length; i++) {
          ar = ar.concat(__read(arguments[i]));
        }

        return ar;
      }

      function __spreadArrays() {
        for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
          s += arguments[i].length;
        }

        for (var r = Array(s), k = 0, i = 0; i < il; i++) {
          for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
            r[k] = a[j];
          }
        }

        return r;
      }

      ;

      function __await(v) {
        return this instanceof __await ? (this.v = v, this) : new __await(v);
      }

      function __asyncGenerator(thisArg, _arguments, generator) {
        if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
        var g = generator.apply(thisArg, _arguments || []),
            i,
            q = [];
        return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
          return this;
        }, i;

        function verb(n) {
          if (g[n]) i[n] = function (v) {
            return new Promise(function (a, b) {
              q.push([n, v, a, b]) > 1 || resume(n, v);
            });
          };
        }

        function resume(n, v) {
          try {
            step(g[n](v));
          } catch (e) {
            settle(q[0][3], e);
          }
        }

        function step(r) {
          r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
        }

        function fulfill(value) {
          resume("next", value);
        }

        function reject(value) {
          resume("throw", value);
        }

        function settle(f, v) {
          if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
        }
      }

      function __asyncDelegator(o) {
        var i, p;
        return i = {}, verb("next"), verb("throw", function (e) {
          throw e;
        }), verb("return"), i[Symbol.iterator] = function () {
          return this;
        }, i;

        function verb(n, f) {
          i[n] = o[n] ? function (v) {
            return (p = !p) ? {
              value: __await(o[n](v)),
              done: n === "return"
            } : f ? f(v) : v;
          } : f;
        }
      }

      function __asyncValues(o) {
        if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
        var m = o[Symbol.asyncIterator],
            i;
        return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
          return this;
        }, i);

        function verb(n) {
          i[n] = o[n] && function (v) {
            return new Promise(function (resolve, reject) {
              v = o[n](v), settle(resolve, reject, v.done, v.value);
            });
          };
        }

        function settle(resolve, reject, d, v) {
          Promise.resolve(v).then(function (v) {
            resolve({
              value: v,
              done: d
            });
          }, reject);
        }
      }

      function __makeTemplateObject(cooked, raw) {
        if (Object.defineProperty) {
          Object.defineProperty(cooked, "raw", {
            value: raw
          });
        } else {
          cooked.raw = raw;
        }

        return cooked;
      }

      ;

      function __importStar(mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k in mod) {
          if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
        }
        result["default"] = mod;
        return result;
      }

      function __importDefault(mod) {
        return mod && mod.__esModule ? mod : {
          "default": mod
        };
      }

      function __classPrivateFieldGet(receiver, privateMap) {
        if (!privateMap.has(receiver)) {
          throw new TypeError("attempted to get private field on non-instance");
        }

        return privateMap.get(receiver);
      }

      function __classPrivateFieldSet(receiver, privateMap, value) {
        if (!privateMap.has(receiver)) {
          throw new TypeError("attempted to set private field on non-instance");
        }

        privateMap.set(receiver, value);
        return value;
      }
      /***/

    },

    /***/
    "SWsU":
    /*!***********************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/web-vitals/getCLS.js ***!
      \***********************************************************************/

    /*! exports provided: getCLS */

    /***/
    function SWsU(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getCLS", function () {
        return getCLS;
      });
      /* harmony import */


      var _lib_bindReporter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./lib/bindReporter */
      "Fm1u");
      /* harmony import */


      var _lib_initMetric__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./lib/initMetric */
      "bjvM");
      /* harmony import */


      var _lib_observe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./lib/observe */
      "MaC4");
      /* harmony import */


      var _lib_onHidden__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./lib/onHidden */
      "6mNm");
      /*
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *     https://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var getCLS = function getCLS(onReport, reportAllChanges) {
        var metric = Object(_lib_initMetric__WEBPACK_IMPORTED_MODULE_1__["initMetric"])('CLS', 0);
        var report;
        var sessionValue = 0;
        var sessionEntries = [];

        var entryHandler = function entryHandler(entry) {
          // Only count layout shifts without recent user input.
          // TODO: Figure out why entry can be undefined
          if (entry && !entry.hadRecentInput) {
            var firstSessionEntry = sessionEntries[0];
            var lastSessionEntry = sessionEntries[sessionEntries.length - 1]; // If the entry occurred less than 1 second after the previous entry and
            // less than 5 seconds after the first entry in the session, include the
            // entry in the current session. Otherwise, start a new session.

            if (sessionValue && sessionEntries.length !== 0 && entry.startTime - lastSessionEntry.startTime < 1000 && entry.startTime - firstSessionEntry.startTime < 5000) {
              sessionValue += entry.value;
              sessionEntries.push(entry);
            } else {
              sessionValue = entry.value;
              sessionEntries = [entry];
            } // If the current session value is larger than the current CLS value,
            // update CLS and the entries contributing to it.


            if (sessionValue > metric.value) {
              metric.value = sessionValue;
              metric.entries = sessionEntries;

              if (report) {
                report();
              }
            }
          }
        };

        var po = Object(_lib_observe__WEBPACK_IMPORTED_MODULE_2__["observe"])('layout-shift', entryHandler);

        if (po) {
          report = Object(_lib_bindReporter__WEBPACK_IMPORTED_MODULE_0__["bindReporter"])(onReport, metric, reportAllChanges);
          Object(_lib_onHidden__WEBPACK_IMPORTED_MODULE_3__["onHidden"])(function () {
            po.takeRecords().map(entryHandler);
            report(true);
          });
        }
      }; //# sourceMappingURL=getCLS.js.map

      /***/

    },

    /***/
    "SXEm":
    /*!************************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/integrations/node/postgres.js ***!
      \************************************************************************/

    /*! exports provided: Postgres */

    /***/
    function SXEm(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Postgres", function () {
        return Postgres;
      });
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /** Tracing integration for node-postgres package */


      var Postgres =
      /** @class */
      function () {
        function Postgres(options) {
          if (options === void 0) {
            options = {};
          }
          /**
           * @inheritDoc
           */


          this.name = Postgres.id;
          this._usePgNative = !!options.usePgNative;
        }
        /**
         * @inheritDoc
         */


        Postgres.prototype.setupOnce = function (_, getCurrentHub) {
          var _a;

          var pkg = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["loadModule"])('pg');

          if (!pkg) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].error('Postgres Integration was unable to require `pg` package.');

            return;
          }

          if (this._usePgNative && !((_a = pkg["native"]) === null || _a === void 0 ? void 0 : _a.Client)) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].error("Postgres Integration was unable to access 'pg-native' bindings.");

            return;
          }

          var Client = (this._usePgNative ? pkg["native"] : pkg).Client;
          /**
           * function (query, callback) => void
           * function (query, params, callback) => void
           * function (query) => Promise
           * function (query, params) => Promise
           * function (pg.Cursor) => pg.Cursor
           */

          Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["fill"])(Client.prototype, 'query', function (orig) {
            return function (config, values, callback) {
              var _a, _b, _c;

              var scope = getCurrentHub().getScope();
              var parentSpan = (_a = scope) === null || _a === void 0 ? void 0 : _a.getSpan();
              var span = (_b = parentSpan) === null || _b === void 0 ? void 0 : _b.startChild({
                description: typeof config === 'string' ? config : config.text,
                op: "db"
              });

              if (typeof callback === 'function') {
                return orig.call(this, config, values, function (err, result) {
                  var _a;

                  (_a = span) === null || _a === void 0 ? void 0 : _a.finish();
                  callback(err, result);
                });
              }

              if (typeof values === 'function') {
                return orig.call(this, config, function (err, result) {
                  var _a;

                  (_a = span) === null || _a === void 0 ? void 0 : _a.finish();
                  values(err, result);
                });
              }

              var rv = typeof values !== 'undefined' ? orig.call(this, config, values) : orig.call(this, config);

              if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["isThenable"])(rv)) {
                return rv.then(function (res) {
                  var _a;

                  (_a = span) === null || _a === void 0 ? void 0 : _a.finish();
                  return res;
                });
              }

              (_c = span) === null || _c === void 0 ? void 0 : _c.finish();
              return rv;
            };
          });
        };
        /**
         * @inheritDoc
         */


        Postgres.id = 'Postgres';
        return Postgres;
      }(); //# sourceMappingURL=postgres.js.map

      /***/

    },

    /***/
    "SYqL":
    /*!**************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/span.js ***!
      \**************************************************/

    /*! exports provided: SpanRecorder, Span */

    /***/
    function SYqL(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SpanRecorder", function () {
        return SpanRecorder;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Span", function () {
        return Span;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _spanstatus__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./spanstatus */
      "bju/");
      /**
       * Keeps track of finished spans for a given transaction
       * @internal
       * @hideconstructor
       * @hidden
       */


      var SpanRecorder =
      /** @class */
      function () {
        function SpanRecorder(maxlen) {
          if (maxlen === void 0) {
            maxlen = 1000;
          }

          this.spans = [];
          this._maxlen = maxlen;
        }
        /**
         * This is just so that we don't run out of memory while recording a lot
         * of spans. At some point we just stop and flush out the start of the
         * trace tree (i.e.the first n spans with the smallest
         * start_timestamp).
         */


        SpanRecorder.prototype.add = function (span) {
          if (this.spans.length > this._maxlen) {
            span.spanRecorder = undefined;
          } else {
            this.spans.push(span);
          }
        };

        return SpanRecorder;
      }();
      /**
       * Span contains all data about a span
       */


      var Span =
      /** @class */
      function () {
        /**
         * You should never call the constructor manually, always use `Sentry.startTransaction()`
         * or call `startChild()` on an existing span.
         * @internal
         * @hideconstructor
         * @hidden
         */
        function Span(spanContext) {
          /**
           * @inheritDoc
           */
          this.traceId = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["uuid4"])();
          /**
           * @inheritDoc
           */

          this.spanId = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["uuid4"])().substring(16);
          /**
           * Timestamp in seconds when the span was created.
           */

          this.startTimestamp = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["timestampWithMs"])();
          /**
           * @inheritDoc
           */

          this.tags = {};
          /**
           * @inheritDoc
           */
          // eslint-disable-next-line @typescript-eslint/no-explicit-any

          this.data = {};

          if (!spanContext) {
            return this;
          }

          if (spanContext.traceId) {
            this.traceId = spanContext.traceId;
          }

          if (spanContext.spanId) {
            this.spanId = spanContext.spanId;
          }

          if (spanContext.parentSpanId) {
            this.parentSpanId = spanContext.parentSpanId;
          } // We want to include booleans as well here


          if ('sampled' in spanContext) {
            this.sampled = spanContext.sampled;
          }

          if (spanContext.op) {
            this.op = spanContext.op;
          }

          if (spanContext.description) {
            this.description = spanContext.description;
          }

          if (spanContext.data) {
            this.data = spanContext.data;
          }

          if (spanContext.tags) {
            this.tags = spanContext.tags;
          }

          if (spanContext.status) {
            this.status = spanContext.status;
          }

          if (spanContext.startTimestamp) {
            this.startTimestamp = spanContext.startTimestamp;
          }

          if (spanContext.endTimestamp) {
            this.endTimestamp = spanContext.endTimestamp;
          }
        }
        /**
         * @inheritDoc
         * @deprecated
         */


        Span.prototype.child = function (spanContext) {
          return this.startChild(spanContext);
        };
        /**
         * @inheritDoc
         */


        Span.prototype.startChild = function (spanContext) {
          var childSpan = new Span(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, spanContext), {
            parentSpanId: this.spanId,
            sampled: this.sampled,
            traceId: this.traceId
          }));
          childSpan.spanRecorder = this.spanRecorder;

          if (childSpan.spanRecorder) {
            childSpan.spanRecorder.add(childSpan);
          }

          childSpan.transaction = this.transaction;
          return childSpan;
        };
        /**
         * @inheritDoc
         */


        Span.prototype.setTag = function (key, value) {
          var _a;

          this.tags = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.tags), (_a = {}, _a[key] = value, _a));
          return this;
        };
        /**
         * @inheritDoc
         */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types


        Span.prototype.setData = function (key, value) {
          var _a;

          this.data = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this.data), (_a = {}, _a[key] = value, _a));
          return this;
        };
        /**
         * @inheritDoc
         */


        Span.prototype.setStatus = function (value) {
          this.status = value;
          return this;
        };
        /**
         * @inheritDoc
         */


        Span.prototype.setHttpStatus = function (httpStatus) {
          this.setTag('http.status_code', String(httpStatus));

          var spanStatus = _spanstatus__WEBPACK_IMPORTED_MODULE_2__["SpanStatus"].fromHttpCode(httpStatus);

          if (spanStatus !== _spanstatus__WEBPACK_IMPORTED_MODULE_2__["SpanStatus"].UnknownError) {
            this.setStatus(spanStatus);
          }

          return this;
        };
        /**
         * @inheritDoc
         */


        Span.prototype.isSuccess = function () {
          return this.status === _spanstatus__WEBPACK_IMPORTED_MODULE_2__["SpanStatus"].Ok;
        };
        /**
         * @inheritDoc
         */


        Span.prototype.finish = function (endTimestamp) {
          this.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["timestampWithMs"])();
        };
        /**
         * @inheritDoc
         */


        Span.prototype.toTraceparent = function () {
          var sampledString = '';

          if (this.sampled !== undefined) {
            sampledString = this.sampled ? '-1' : '-0';
          }

          return this.traceId + "-" + this.spanId + sampledString;
        };
        /**
         * @inheritDoc
         */


        Span.prototype.toContext = function () {
          return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dropUndefinedKeys"])({
            data: this.data,
            description: this.description,
            endTimestamp: this.endTimestamp,
            op: this.op,
            parentSpanId: this.parentSpanId,
            sampled: this.sampled,
            spanId: this.spanId,
            startTimestamp: this.startTimestamp,
            status: this.status,
            tags: this.tags,
            traceId: this.traceId
          });
        };
        /**
         * @inheritDoc
         */


        Span.prototype.updateWithContext = function (spanContext) {
          var _a, _b, _c, _d, _e;

          this.data = (_a = spanContext.data, _a !== null && _a !== void 0 ? _a : {});
          this.description = spanContext.description;
          this.endTimestamp = spanContext.endTimestamp;
          this.op = spanContext.op;
          this.parentSpanId = spanContext.parentSpanId;
          this.sampled = spanContext.sampled;
          this.spanId = (_b = spanContext.spanId, _b !== null && _b !== void 0 ? _b : this.spanId);
          this.startTimestamp = (_c = spanContext.startTimestamp, _c !== null && _c !== void 0 ? _c : this.startTimestamp);
          this.status = spanContext.status;
          this.tags = (_d = spanContext.tags, _d !== null && _d !== void 0 ? _d : {});
          this.traceId = (_e = spanContext.traceId, _e !== null && _e !== void 0 ? _e : this.traceId);
          return this;
        };
        /**
         * @inheritDoc
         */


        Span.prototype.getTraceContext = function () {
          return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dropUndefinedKeys"])({
            data: Object.keys(this.data).length > 0 ? this.data : undefined,
            description: this.description,
            op: this.op,
            parent_span_id: this.parentSpanId,
            span_id: this.spanId,
            status: this.status,
            tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,
            trace_id: this.traceId
          });
        };
        /**
         * @inheritDoc
         */


        Span.prototype.toJSON = function () {
          return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dropUndefinedKeys"])({
            data: Object.keys(this.data).length > 0 ? this.data : undefined,
            description: this.description,
            op: this.op,
            parent_span_id: this.parentSpanId,
            span_id: this.spanId,
            start_timestamp: this.startTimestamp,
            status: this.status,
            tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,
            timestamp: this.endTimestamp,
            trace_id: this.traceId
          });
        };

        return Span;
      }(); //# sourceMappingURL=span.js.map

      /***/

    },

    /***/
    "SeVD":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeTo.js ***!
      \*****************************************************************/

    /*! exports provided: subscribeTo */

    /***/
    function SeVD(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "subscribeTo", function () {
        return subscribeTo;
      });
      /* harmony import */


      var _subscribeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./subscribeToArray */
      "ngJS");
      /* harmony import */


      var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./subscribeToPromise */
      "a7t3");
      /* harmony import */


      var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./subscribeToIterable */
      "pLzU");
      /* harmony import */


      var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./subscribeToObservable */
      "CRDf");
      /* harmony import */


      var _isArrayLike__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./isArrayLike */
      "I55L");
      /* harmony import */


      var _isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./isPromise */
      "c2HN");
      /* harmony import */


      var _isObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ./isObject */
      "XoHu");
      /* harmony import */


      var _symbol_iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! ../symbol/iterator */
      "Lhse");
      /* harmony import */


      var _symbol_observable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
      /*! ../symbol/observable */
      "kJWO");

      var subscribeTo = function subscribeTo(result) {
        if (!!result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_8__["observable"]] === 'function') {
          return Object(_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__["subscribeToObservable"])(result);
        } else if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_4__["isArrayLike"])(result)) {
          return Object(_subscribeToArray__WEBPACK_IMPORTED_MODULE_0__["subscribeToArray"])(result);
        } else if (Object(_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(result)) {
          return Object(_subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__["subscribeToPromise"])(result);
        } else if (!!result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_7__["iterator"]] === 'function') {
          return Object(_subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__["subscribeToIterable"])(result);
        } else {
          var value = Object(_isObject__WEBPACK_IMPORTED_MODULE_6__["isObject"])(result) ? 'an invalid object' : "'".concat(result, "'");
          var msg = "You provided ".concat(value, " where a stream was expected.") + ' You can provide an Observable, Promise, Array, or Iterable.';
          throw new TypeError(msg);
        }
      }; //# sourceMappingURL=subscribeTo.js.map

      /***/

    },

    /***/
    "SpAZ":
    /*!**************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/identity.js ***!
      \**************************************************************/

    /*! exports provided: identity */

    /***/
    function SpAZ(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "identity", function () {
        return identity;
      });

      function identity(x) {
        return x;
      } //# sourceMappingURL=identity.js.map

      /***/

    },

    /***/
    "SxV6":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/first.js ***!
      \****************************************************************/

    /*! exports provided: first */

    /***/
    function SxV6(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "first", function () {
        return first;
      });
      /* harmony import */


      var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../util/EmptyError */
      "sVev");
      /* harmony import */


      var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./filter */
      "pLZG");
      /* harmony import */


      var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./take */
      "IzEk");
      /* harmony import */


      var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./defaultIfEmpty */
      "xbPD");
      /* harmony import */


      var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./throwIfEmpty */
      "XDbj");
      /* harmony import */


      var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ../util/identity */
      "SpAZ");

      function first(predicate, defaultValue) {
        var hasDefaultValue = arguments.length >= 2;
        return function (source) {
          return source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) {
            return predicate(v, i, source);
          }) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_take__WEBPACK_IMPORTED_MODULE_2__["take"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__["throwIfEmpty"])(function () {
            return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"]();
          }));
        };
      } //# sourceMappingURL=first.js.map

      /***/

    },

    /***/
    "TEn/":
    /*!****************************************************************************!*\
      !*** ./node_modules/@ionic/angular/__ivy_ngcc__/fesm2015/ionic-angular.js ***!
      \****************************************************************************/

    /*! exports provided: IonicSafeString, IonicSlides, IonicSwiper, createAnimation, getPlatforms, iosTransitionAnimation, isPlatform, mdTransitionAnimation, ActionSheetController, AlertController, AngularDelegate, AnimationController, BooleanValueAccessor, Config, DomController, GestureController, IonApp, IonAvatar, IonBackButton, IonBackButtonDelegate, IonBackdrop, IonBadge, IonButton, IonButtons, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonCheckbox, IonChip, IonCol, IonContent, IonDatetime, IonFab, IonFabButton, IonFabList, IonFooter, IonGrid, IonHeader, IonIcon, IonImg, IonInfiniteScroll, IonInfiniteScrollContent, IonInput, IonItem, IonItemDivider, IonItemGroup, IonItemOption, IonItemOptions, IonItemSliding, IonLabel, IonList, IonListHeader, IonMenu, IonMenuButton, IonMenuToggle, IonNav, IonNavLink, IonNote, IonProgressBar, IonRadio, IonRadioGroup, IonRange, IonRefresher, IonRefresherContent, IonReorder, IonReorderGroup, IonRippleEffect, IonRouterOutlet, IonRow, IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption, IonSkeletonText, IonSlide, IonSlides, IonSpinner, IonSplitPane, IonTabBar, IonTabButton, IonTabs, IonText, IonTextarea, IonThumbnail, IonTitle, IonToggle, IonToolbar, IonVirtualScroll, IonicModule, IonicRouteStrategy, LoadingController, MenuController, ModalController, NavController, NavDelegate, NavParams, NumericValueAccessor, PickerController, Platform, PopoverController, RadioValueAccessor, RouterLinkDelegate, SelectValueAccessor, TextValueAccessor, ToastController, VirtualFooter, VirtualHeader, VirtualItem, ɵa, ɵb, ɵc, ɵe, ɵf */

    /***/
    function TEn(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ActionSheetController", function () {
        return ActionSheetController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AlertController", function () {
        return AlertController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AngularDelegate", function () {
        return AngularDelegate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AnimationController", function () {
        return AnimationController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BooleanValueAccessor", function () {
        return BooleanValueAccessor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Config", function () {
        return Config;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DomController", function () {
        return DomController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "GestureController", function () {
        return GestureController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonApp", function () {
        return IonApp;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonAvatar", function () {
        return IonAvatar;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonBackButton", function () {
        return IonBackButton;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonBackButtonDelegate", function () {
        return IonBackButtonDelegate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonBackdrop", function () {
        return IonBackdrop;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonBadge", function () {
        return IonBadge;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonButton", function () {
        return IonButton;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonButtons", function () {
        return IonButtons;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonCard", function () {
        return IonCard;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonCardContent", function () {
        return IonCardContent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonCardHeader", function () {
        return IonCardHeader;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonCardSubtitle", function () {
        return IonCardSubtitle;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonCardTitle", function () {
        return IonCardTitle;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonCheckbox", function () {
        return IonCheckbox;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonChip", function () {
        return IonChip;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonCol", function () {
        return IonCol;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonContent", function () {
        return IonContent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonDatetime", function () {
        return IonDatetime;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonFab", function () {
        return IonFab;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonFabButton", function () {
        return IonFabButton;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonFabList", function () {
        return IonFabList;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonFooter", function () {
        return IonFooter;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonGrid", function () {
        return IonGrid;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonHeader", function () {
        return IonHeader;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonIcon", function () {
        return IonIcon;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonImg", function () {
        return IonImg;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonInfiniteScroll", function () {
        return IonInfiniteScroll;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonInfiniteScrollContent", function () {
        return IonInfiniteScrollContent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonInput", function () {
        return IonInput;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonItem", function () {
        return IonItem;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonItemDivider", function () {
        return IonItemDivider;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonItemGroup", function () {
        return IonItemGroup;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonItemOption", function () {
        return IonItemOption;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonItemOptions", function () {
        return IonItemOptions;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonItemSliding", function () {
        return IonItemSliding;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonLabel", function () {
        return IonLabel;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonList", function () {
        return IonList;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonListHeader", function () {
        return IonListHeader;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonMenu", function () {
        return IonMenu;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonMenuButton", function () {
        return IonMenuButton;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonMenuToggle", function () {
        return IonMenuToggle;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonNav", function () {
        return IonNav;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonNavLink", function () {
        return IonNavLink;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonNote", function () {
        return IonNote;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonProgressBar", function () {
        return IonProgressBar;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonRadio", function () {
        return IonRadio;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonRadioGroup", function () {
        return IonRadioGroup;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonRange", function () {
        return IonRange;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonRefresher", function () {
        return IonRefresher;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonRefresherContent", function () {
        return IonRefresherContent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonReorder", function () {
        return IonReorder;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonReorderGroup", function () {
        return IonReorderGroup;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonRippleEffect", function () {
        return IonRippleEffect;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonRouterOutlet", function () {
        return IonRouterOutlet;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonRow", function () {
        return IonRow;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonSearchbar", function () {
        return IonSearchbar;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonSegment", function () {
        return IonSegment;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonSegmentButton", function () {
        return IonSegmentButton;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonSelect", function () {
        return IonSelect;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonSelectOption", function () {
        return IonSelectOption;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonSkeletonText", function () {
        return IonSkeletonText;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonSlide", function () {
        return IonSlide;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonSlides", function () {
        return IonSlides;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonSpinner", function () {
        return IonSpinner;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonSplitPane", function () {
        return IonSplitPane;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonTabBar", function () {
        return IonTabBar;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonTabButton", function () {
        return IonTabButton;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonTabs", function () {
        return IonTabs;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonText", function () {
        return IonText;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonTextarea", function () {
        return IonTextarea;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonThumbnail", function () {
        return IonThumbnail;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonTitle", function () {
        return IonTitle;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonToggle", function () {
        return IonToggle;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonToolbar", function () {
        return IonToolbar;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonVirtualScroll", function () {
        return IonVirtualScroll;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonicModule", function () {
        return IonicModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IonicRouteStrategy", function () {
        return IonicRouteStrategy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LoadingController", function () {
        return LoadingController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MenuController", function () {
        return MenuController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ModalController", function () {
        return ModalController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NavController", function () {
        return NavController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NavDelegate", function () {
        return NavDelegate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NavParams", function () {
        return NavParams;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NumericValueAccessor", function () {
        return NumericValueAccessor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PickerController", function () {
        return PickerController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Platform", function () {
        return Platform;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PopoverController", function () {
        return PopoverController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RadioValueAccessor", function () {
        return RadioValueAccessor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RouterLinkDelegate", function () {
        return RouterLinkDelegate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SelectValueAccessor", function () {
        return SelectValueAccessor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TextValueAccessor", function () {
        return TextValueAccessor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ToastController", function () {
        return ToastController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VirtualFooter", function () {
        return VirtualFooter;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VirtualHeader", function () {
        return VirtualHeader;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VirtualItem", function () {
        return VirtualItem;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵa", function () {
        return ConfigToken;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵb", function () {
        return ValueAccessor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵc", function () {
        return ProxyCmp;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵe", function () {
        return OverlayBaseController;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵf", function () {
        return appInitialize;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @angular/forms */
      "3Pt+");
      /* harmony import */


      var _angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @angular/common */
      "ofXK");
      /* harmony import */


      var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! @angular/router */
      "tyNb");
      /* harmony import */


      var _ionic_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! @ionic/core */
      "1Bn7");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "IonicSafeString", function () {
        return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["IonicSafeString"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "IonicSlides", function () {
        return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["IonicSlides"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "IonicSwiper", function () {
        return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["IonicSwiper"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "createAnimation", function () {
        return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["createAnimation"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getPlatforms", function () {
        return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["getPlatforms"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "iosTransitionAnimation", function () {
        return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["iosTransitionAnimation"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isPlatform", function () {
        return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["isPlatform"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "mdTransitionAnimation", function () {
        return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["mdTransitionAnimation"];
      });
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! rxjs */
      "qCKp");
      /* harmony import */


      var rxjs_operators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! rxjs/operators */
      "kU1M");
      /* harmony import */


      var _ionic_core_loader__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
      /*! @ionic/core/loader */
      "ybVP");

      var _c0 = ["*"];
      var _c1 = ["outlet"];
      var _c2 = [[["", "slot", "top"]], "*"];
      var _c3 = ["[slot=top]", "*"];

      var raf = function raf(h) {
        if (typeof __zone_symbol__requestAnimationFrame === 'function') {
          return __zone_symbol__requestAnimationFrame(h);
        }

        if (typeof requestAnimationFrame === 'function') {
          return requestAnimationFrame(h);
        }

        return setTimeout(h);
      };

      var ValueAccessor = /*#__PURE__*/function () {
        function ValueAccessor(injector, el) {
          _classCallCheck(this, ValueAccessor);

          this.injector = injector;
          this.el = el;

          this.onChange = function () {};

          this.onTouched = function () {};
        }

        _createClass2(ValueAccessor, [{
          key: "writeValue",
          value: function writeValue(value) {
            /**
             * TODO for Ionic 6:
             * Change `value == null ? '' : value;`
             * to `value`. This was a fix for IE9, but IE9
             * is no longer supported; however, this change
             * is potentially a breaking change
             */
            this.el.nativeElement.value = this.lastValue = value == null ? '' : value;
            setIonicClasses(this.el);
          }
        }, {
          key: "handleChangeEvent",
          value: function handleChangeEvent(el, value) {
            if (el === this.el.nativeElement) {
              if (value !== this.lastValue) {
                this.lastValue = value;
                this.onChange(value);
              }

              setIonicClasses(this.el);
            }
          }
        }, {
          key: "_handleBlurEvent",
          value: function _handleBlurEvent(el) {
            if (el === this.el.nativeElement) {
              this.onTouched();
              setIonicClasses(this.el);
            }
          }
        }, {
          key: "registerOnChange",
          value: function registerOnChange(fn) {
            this.onChange = fn;
          }
        }, {
          key: "registerOnTouched",
          value: function registerOnTouched(fn) {
            this.onTouched = fn;
          }
        }, {
          key: "setDisabledState",
          value: function setDisabledState(isDisabled) {
            this.el.nativeElement.disabled = isDisabled;
          }
        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            if (this.statusChanges) {
              this.statusChanges.unsubscribe();
            }
          }
        }, {
          key: "ngAfterViewInit",
          value: function ngAfterViewInit() {
            var _this404 = this;

            var ngControl;

            try {
              ngControl = this.injector.get(_angular_forms__WEBPACK_IMPORTED_MODULE_2__["NgControl"]);
            } catch (
            /* No FormControl or ngModel binding */
            _a) {
              /* No FormControl or ngModel binding */
            }

            if (!ngControl) {
              return;
            } // Listen for changes in validity, disabled, or pending states


            if (ngControl.statusChanges) {
              this.statusChanges = ngControl.statusChanges.subscribe(function () {
                return setIonicClasses(_this404.el);
              });
            }
            /**
             * TODO Remove this in favor of https://github.com/angular/angular/issues/10887
             * whenever it is implemented. Currently, Ionic's form status classes
             * do not react to changes when developers manually call
             * Angular form control methods such as markAsTouched.
             * This results in Ionic's form status classes being out
             * of sync with the ng form status classes.
             * This patches the methods to manually sync
             * the classes until this feature is implemented in Angular.
             */


            var formControl = ngControl.control;

            if (formControl) {
              var methodsToPatch = ['markAsTouched', 'markAllAsTouched', 'markAsUntouched', 'markAsDirty', 'markAsPristine'];
              methodsToPatch.forEach(function (method) {
                if (formControl[method]) {
                  var oldFn = formControl[method].bind(formControl);

                  formControl[method] = function () {
                    oldFn.apply(void 0, arguments);
                    setIonicClasses(_this404.el);
                  };
                }
              });
            }
          }
        }]);

        return ValueAccessor;
      }();

      ValueAccessor.ɵfac = function ValueAccessor_Factory(t) {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinvalidFactory"]();
      };

      ValueAccessor.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: ValueAccessor,
        hostBindings: function ValueAccessor_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("ionBlur", function ValueAccessor_ionBlur_HostBindingHandler($event) {
              return ctx._handleBlurEvent($event.target);
            });
          }
        }
      });
      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('ionBlur', ['$event.target'])], ValueAccessor.prototype, "_handleBlurEvent", null);

      var setIonicClasses = function setIonicClasses(element) {
        raf(function () {
          var input = element.nativeElement;
          var classes = getClasses(input);
          setClasses(input, classes);
          var item = input.closest('ion-item');

          if (item) {
            setClasses(item, classes);
          }
        });
      };

      var getClasses = function getClasses(element) {
        var classList = element.classList;
        var classes = [];

        for (var i = 0; i < classList.length; i++) {
          var item = classList.item(i);

          if (item !== null && startsWith(item, 'ng-')) {
            classes.push("ion-".concat(item.substr(3)));
          }
        }

        return classes;
      };

      var ɵ0 = getClasses;

      var setClasses = function setClasses(element, classes) {
        var classList = element.classList;
        ['ion-valid', 'ion-invalid', 'ion-touched', 'ion-untouched', 'ion-dirty', 'ion-pristine'].forEach(function (c) {
          return classList.remove(c);
        });
        classes.forEach(function (c) {
          return classList.add(c);
        });
      };

      var ɵ1 = setClasses;

      var startsWith = function startsWith(input, search) {
        return input.substr(0, search.length) === search;
      };

      var ɵ2 = startsWith;
      var BooleanValueAccessor_1;

      var BooleanValueAccessor = BooleanValueAccessor_1 = /*#__PURE__*/function (_ValueAccessor) {
        _inherits(BooleanValueAccessor, _ValueAccessor);

        var _super181 = _createSuper(BooleanValueAccessor);

        function BooleanValueAccessor(injector, el) {
          _classCallCheck(this, BooleanValueAccessor);

          return _super181.call(this, injector, el);
        }

        _createClass2(BooleanValueAccessor, [{
          key: "writeValue",
          value: function writeValue(value) {
            this.el.nativeElement.checked = this.lastValue = value == null ? false : value;
            setIonicClasses(this.el);
          }
        }, {
          key: "_handleIonChange",
          value: function _handleIonChange(el) {
            this.handleChangeEvent(el, el.checked);
          }
        }]);

        return BooleanValueAccessor;
      }(ValueAccessor);

      BooleanValueAccessor.ɵfac = function BooleanValueAccessor_Factory(t) {
        return new (t || BooleanValueAccessor)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]));
      };

      BooleanValueAccessor.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: BooleanValueAccessor,
        selectors: [["ion-checkbox"], ["ion-toggle"]],
        hostBindings: function BooleanValueAccessor_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("ionChange", function BooleanValueAccessor_ionChange_HostBindingHandler($event) {
              return ctx._handleIonChange($event.target);
            });
          }
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵProvidersFeature"]([{
          provide: _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NG_VALUE_ACCESSOR"],
          useExisting: BooleanValueAccessor_1,
          multi: true
        }]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵInheritDefinitionFeature"]]
      });

      BooleanValueAccessor.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }];
      };

      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('ionChange', ['$event.target'])], BooleanValueAccessor.prototype, "_handleIonChange", null);
      var NumericValueAccessor_1;

      var NumericValueAccessor = NumericValueAccessor_1 = /*#__PURE__*/function (_ValueAccessor2) {
        _inherits(NumericValueAccessor, _ValueAccessor2);

        var _super182 = _createSuper(NumericValueAccessor);

        function NumericValueAccessor(injector, el) {
          _classCallCheck(this, NumericValueAccessor);

          return _super182.call(this, injector, el);
        }

        _createClass2(NumericValueAccessor, [{
          key: "_handleIonChange",
          value: function _handleIonChange(el) {
            this.handleChangeEvent(el, el.value);
          }
        }, {
          key: "registerOnChange",
          value: function registerOnChange(fn) {
            _get(_getPrototypeOf(NumericValueAccessor.prototype), "registerOnChange", this).call(this, function (value) {
              fn(value === '' ? null : parseFloat(value));
            });
          }
        }]);

        return NumericValueAccessor;
      }(ValueAccessor);

      NumericValueAccessor.ɵfac = function NumericValueAccessor_Factory(t) {
        return new (t || NumericValueAccessor)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]));
      };

      NumericValueAccessor.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: NumericValueAccessor,
        selectors: [["ion-input", "type", "number"]],
        hostBindings: function NumericValueAccessor_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("ionChange", function NumericValueAccessor_ionChange_HostBindingHandler($event) {
              return ctx._handleIonChange($event.target);
            });
          }
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵProvidersFeature"]([{
          provide: _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NG_VALUE_ACCESSOR"],
          useExisting: NumericValueAccessor_1,
          multi: true
        }]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵInheritDefinitionFeature"]]
      });

      NumericValueAccessor.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }];
      };

      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('ionChange', ['$event.target'])], NumericValueAccessor.prototype, "_handleIonChange", null);
      var RadioValueAccessor_1;

      var RadioValueAccessor = RadioValueAccessor_1 = /*#__PURE__*/function (_ValueAccessor3) {
        _inherits(RadioValueAccessor, _ValueAccessor3);

        var _super183 = _createSuper(RadioValueAccessor);

        function RadioValueAccessor(injector, el) {
          _classCallCheck(this, RadioValueAccessor);

          return _super183.call(this, injector, el);
        }

        _createClass2(RadioValueAccessor, [{
          key: "_handleIonSelect",
          value: function _handleIonSelect(el) {
            this.handleChangeEvent(el, el.checked);
          }
        }]);

        return RadioValueAccessor;
      }(ValueAccessor);

      RadioValueAccessor.ɵfac = function RadioValueAccessor_Factory(t) {
        return new (t || RadioValueAccessor)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]));
      };

      RadioValueAccessor.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: RadioValueAccessor,
        selectors: [["ion-radio"]],
        hostBindings: function RadioValueAccessor_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("ionSelect", function RadioValueAccessor_ionSelect_HostBindingHandler($event) {
              return ctx._handleIonSelect($event.target);
            });
          }
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵProvidersFeature"]([{
          provide: _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NG_VALUE_ACCESSOR"],
          useExisting: RadioValueAccessor_1,
          multi: true
        }]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵInheritDefinitionFeature"]]
      });

      RadioValueAccessor.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }];
      };

      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('ionSelect', ['$event.target'])], RadioValueAccessor.prototype, "_handleIonSelect", null);
      var SelectValueAccessor_1;

      var SelectValueAccessor = SelectValueAccessor_1 = /*#__PURE__*/function (_ValueAccessor4) {
        _inherits(SelectValueAccessor, _ValueAccessor4);

        var _super184 = _createSuper(SelectValueAccessor);

        function SelectValueAccessor(injector, el) {
          _classCallCheck(this, SelectValueAccessor);

          return _super184.call(this, injector, el);
        }

        _createClass2(SelectValueAccessor, [{
          key: "_handleChangeEvent",
          value: function _handleChangeEvent(el) {
            this.handleChangeEvent(el, el.value);
          }
        }]);

        return SelectValueAccessor;
      }(ValueAccessor);

      SelectValueAccessor.ɵfac = function SelectValueAccessor_Factory(t) {
        return new (t || SelectValueAccessor)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]));
      };

      SelectValueAccessor.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: SelectValueAccessor,
        selectors: [["ion-range"], ["ion-select"], ["ion-radio-group"], ["ion-segment"], ["ion-datetime"]],
        hostBindings: function SelectValueAccessor_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("ionChange", function SelectValueAccessor_ionChange_HostBindingHandler($event) {
              return ctx._handleChangeEvent($event.target);
            });
          }
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵProvidersFeature"]([{
          provide: _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NG_VALUE_ACCESSOR"],
          useExisting: SelectValueAccessor_1,
          multi: true
        }]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵInheritDefinitionFeature"]]
      });

      SelectValueAccessor.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }];
      };

      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('ionChange', ['$event.target'])], SelectValueAccessor.prototype, "_handleChangeEvent", null);
      var TextValueAccessor_1;

      var TextValueAccessor = TextValueAccessor_1 = /*#__PURE__*/function (_ValueAccessor5) {
        _inherits(TextValueAccessor, _ValueAccessor5);

        var _super185 = _createSuper(TextValueAccessor);

        function TextValueAccessor(injector, el) {
          _classCallCheck(this, TextValueAccessor);

          return _super185.call(this, injector, el);
        }

        _createClass2(TextValueAccessor, [{
          key: "_handleInputEvent",
          value: function _handleInputEvent(el) {
            this.handleChangeEvent(el, el.value);
          }
        }]);

        return TextValueAccessor;
      }(ValueAccessor);

      TextValueAccessor.ɵfac = function TextValueAccessor_Factory(t) {
        return new (t || TextValueAccessor)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]));
      };

      TextValueAccessor.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: TextValueAccessor,
        selectors: [["ion-input", 3, "type", "number"], ["ion-textarea"], ["ion-searchbar"]],
        hostBindings: function TextValueAccessor_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("ionChange", function TextValueAccessor_ionChange_HostBindingHandler($event) {
              return ctx._handleInputEvent($event.target);
            });
          }
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵProvidersFeature"]([{
          provide: _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NG_VALUE_ACCESSOR"],
          useExisting: TextValueAccessor_1,
          multi: true
        }]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵInheritDefinitionFeature"]]
      });

      TextValueAccessor.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }];
      };

      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('ionChange', ['$event.target'])], TextValueAccessor.prototype, "_handleInputEvent", null);

      var Platform = /*#__PURE__*/function () {
        function Platform(doc, zone) {
          var _this405 = this;

          _classCallCheck(this, Platform);

          this.doc = doc;
          /**
           * @hidden
           */

          this.backButton = new rxjs__WEBPACK_IMPORTED_MODULE_6__["Subject"]();
          /**
           * The keyboardDidShow event emits when the
           * on-screen keyboard is presented.
           */

          this.keyboardDidShow = new rxjs__WEBPACK_IMPORTED_MODULE_6__["Subject"]();
          /**
           * The keyboardDidHide event emits when the
           * on-screen keyboard is hidden.
           */

          this.keyboardDidHide = new rxjs__WEBPACK_IMPORTED_MODULE_6__["Subject"]();
          /**
           * The pause event emits when the native platform puts the application
           * into the background, typically when the user switches to a different
           * application. This event would emit when a Cordova app is put into
           * the background, however, it would not fire on a standard web browser.
           */

          this.pause = new rxjs__WEBPACK_IMPORTED_MODULE_6__["Subject"]();
          /**
           * The resume event emits when the native platform pulls the application
           * out from the background. This event would emit when a Cordova app comes
           * out from the background, however, it would not fire on a standard web browser.
           */

          this.resume = new rxjs__WEBPACK_IMPORTED_MODULE_6__["Subject"]();
          /**
           * The resize event emits when the browser window has changed dimensions. This
           * could be from a browser window being physically resized, or from a device
           * changing orientation.
           */

          this.resize = new rxjs__WEBPACK_IMPORTED_MODULE_6__["Subject"]();
          zone.run(function () {
            _this405.win = doc.defaultView;

            _this405.backButton.subscribeWithPriority = function (priority, callback) {
              return this.subscribe(function (ev) {
                return ev.register(priority, function (processNextHandler) {
                  return zone.run(function () {
                    return callback(processNextHandler);
                  });
                });
              });
            };

            proxyEvent(_this405.pause, doc, 'pause');
            proxyEvent(_this405.resume, doc, 'resume');
            proxyEvent(_this405.backButton, doc, 'ionBackButton');
            proxyEvent(_this405.resize, _this405.win, 'resize');
            proxyEvent(_this405.keyboardDidShow, _this405.win, 'ionKeyboardDidShow');
            proxyEvent(_this405.keyboardDidHide, _this405.win, 'ionKeyboardDidHide');
            var readyResolve;
            _this405._readyPromise = new Promise(function (res) {
              readyResolve = res;
            });

            if (_this405.win && _this405.win['cordova']) {
              doc.addEventListener('deviceready', function () {
                readyResolve('cordova');
              }, {
                once: true
              });
            } else {
              readyResolve('dom');
            }
          });
        }
        /**
         * @returns returns true/false based on platform.
         * @description
         * Depending on the platform the user is on, `is(platformName)` will
         * return `true` or `false`. Note that the same app can return `true`
         * for more than one platform name. For example, an app running from
         * an iPad would return `true` for the platform names: `mobile`,
         * `ios`, `ipad`, and `tablet`. Additionally, if the app was running
         * from Cordova then `cordova` would be true, and if it was running
         * from a web browser on the iPad then `mobileweb` would be `true`.
         *
         * ```
         * import { Platform } from 'ionic-angular';
         *
         * @Component({...})
         * export MyPage {
         *   constructor(public platform: Platform) {
         *     if (this.platform.is('ios')) {
         *       // This will only print when on iOS
         *       console.log('I am an iOS device!');
         *     }
         *   }
         * }
         * ```
         *
         * | Platform Name   | Description                        |
         * |-----------------|------------------------------------|
         * | android         | on a device running Android.       |
         * | capacitor       | on a device running Capacitor.     |
         * | cordova         | on a device running Cordova.       |
         * | ios             | on a device running iOS.           |
         * | ipad            | on an iPad device.                 |
         * | iphone          | on an iPhone device.               |
         * | phablet         | on a phablet device.               |
         * | tablet          | on a tablet device.                |
         * | electron        | in Electron on a desktop device.   |
         * | pwa             | as a PWA app.                      |
         * | mobile          | on a mobile device.                |
         * | mobileweb       | on a mobile device in a browser.   |
         * | desktop         | on a desktop device.               |
         * | hybrid          | is a cordova or capacitor app.     |
         *
         */


        _createClass2(Platform, [{
          key: "is",
          value: function is(platformName) {
            return Object(_ionic_core__WEBPACK_IMPORTED_MODULE_5__["isPlatform"])(this.win, platformName);
          }
          /**
           * @returns the array of platforms
           * @description
           * Depending on what device you are on, `platforms` can return multiple values.
           * Each possible value is a hierarchy of platforms. For example, on an iPhone,
           * it would return `mobile`, `ios`, and `iphone`.
           *
           * ```
           * import { Platform } from 'ionic-angular';
           *
           * @Component({...})
           * export MyPage {
           *   constructor(public platform: Platform) {
           *     // This will print an array of the current platforms
           *     console.log(this.platform.platforms());
           *   }
           * }
           * ```
           */

        }, {
          key: "platforms",
          value: function platforms() {
            return Object(_ionic_core__WEBPACK_IMPORTED_MODULE_5__["getPlatforms"])(this.win);
          }
          /**
           * Returns a promise when the platform is ready and native functionality
           * can be called. If the app is running from within a web browser, then
           * the promise will resolve when the DOM is ready. When the app is running
           * from an application engine such as Cordova, then the promise will
           * resolve when Cordova triggers the `deviceready` event.
           *
           * The resolved value is the `readySource`, which states which platform
           * ready was used. For example, when Cordova is ready, the resolved ready
           * source is `cordova`. The default ready source value will be `dom`. The
           * `readySource` is useful if different logic should run depending on the
           * platform the app is running from. For example, only Cordova can execute
           * the status bar plugin, so the web should not run status bar plugin logic.
           *
           * ```
           * import { Component } from '@angular/core';
           * import { Platform } from 'ionic-angular';
           *
           * @Component({...})
           * export MyApp {
           *   constructor(public platform: Platform) {
           *     this.platform.ready().then((readySource) => {
           *       console.log('Platform ready from', readySource);
           *       // Platform now ready, execute any required native code
           *     });
           *   }
           * }
           * ```
           */

        }, {
          key: "ready",
          value: function ready() {
            return this._readyPromise;
          }
          /**
           * Returns if this app is using right-to-left language direction or not.
           * We recommend the app's `index.html` file already has the correct `dir`
           * attribute value set, such as `<html dir="ltr">` or `<html dir="rtl">`.
           * [W3C: Structural markup and right-to-left text in HTML](http://www.w3.org/International/questions/qa-html-dir)
           */

        }, {
          key: "isRTL",
          get: function get() {
            return this.doc.dir === 'rtl';
          }
          /**
           * Get the query string parameter
           */

        }, {
          key: "getQueryParam",
          value: function getQueryParam(key) {
            return readQueryParam(this.win.location.href, key);
          }
          /**
           * Returns `true` if the app is in landscape mode.
           */

        }, {
          key: "isLandscape",
          value: function isLandscape() {
            return !this.isPortrait();
          }
          /**
           * Returns `true` if the app is in portrait mode.
           */

        }, {
          key: "isPortrait",
          value: function isPortrait() {
            return this.win.matchMedia && this.win.matchMedia('(orientation: portrait)').matches;
          }
        }, {
          key: "testUserAgent",
          value: function testUserAgent(expression) {
            var nav = this.win.navigator;
            return !!(nav && nav.userAgent && nav.userAgent.indexOf(expression) >= 0);
          }
          /**
           * Get the current url.
           */

        }, {
          key: "url",
          value: function url() {
            return this.win.location.href;
          }
          /**
           * Gets the width of the platform's viewport using `window.innerWidth`.
           */

        }, {
          key: "width",
          value: function width() {
            return this.win.innerWidth;
          }
          /**
           * Gets the height of the platform's viewport using `window.innerHeight`.
           */

        }, {
          key: "height",
          value: function height() {
            return this.win.innerHeight;
          }
        }]);

        return Platform;
      }();

      Platform.ɵfac = function Platform_Factory(t) {
        return new (t || Platform)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      Platform.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: Platform,
        factory: function factory(t) {
          return Platform.ɵfac(t);
        },
        providedIn: 'root'
      });

      Platform.ctorParameters = function () {
        return [{
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]]
          }]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      Platform.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: function Platform_Factory() {
          return new Platform(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
        },
        token: Platform,
        providedIn: "root"
      });
      Platform = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"])(_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]))], Platform);

      var readQueryParam = function readQueryParam(url, key) {
        key = key.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
        var regex = new RegExp('[\\?&]' + key + '=([^&#]*)');
        var results = regex.exec(url);
        return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
      };

      var ɵ0$1 = readQueryParam;

      var proxyEvent = function proxyEvent(emitter, el, eventName) {
        if (el) {
          el.addEventListener(eventName, function (ev) {
            // ?? cordova might emit "null" events
            emitter.next(ev != null ? ev.detail : undefined);
          });
        }
      };

      var ɵ1$1 = proxyEvent;

      var NavController = /*#__PURE__*/function () {
        function NavController(platform, location, serializer, router) {
          var _this406 = this;

          _classCallCheck(this, NavController);

          this.location = location;
          this.serializer = serializer;
          this.router = router;
          this.direction = DEFAULT_DIRECTION;
          this.animated = DEFAULT_ANIMATED;
          this.guessDirection = 'forward';
          this.lastNavId = -1; // Subscribe to router events to detect direction

          if (router) {
            router.events.subscribe(function (ev) {
              if (ev instanceof _angular_router__WEBPACK_IMPORTED_MODULE_4__["NavigationStart"]) {
                var id = ev.restoredState ? ev.restoredState.navigationId : ev.id;
                _this406.guessDirection = id < _this406.lastNavId ? 'back' : 'forward';
                _this406.guessAnimation = !ev.restoredState ? _this406.guessDirection : undefined;
                _this406.lastNavId = _this406.guessDirection === 'forward' ? ev.id : id;
              }
            });
          } // Subscribe to backButton events


          platform.backButton.subscribeWithPriority(0, function (processNextHandler) {
            _this406.pop();

            processNextHandler();
          });
        }
        /**
         * This method uses Angular's [Router](https://angular.io/api/router/Router) under the hood,
         * it's equivalent to calling `this.router.navigateByUrl()`, but it's explicit about the **direction** of the transition.
         *
         * Going **forward** means that a new page is going to be pushed to the stack of the outlet (ion-router-outlet),
         * and that it will show a "forward" animation by default.
         *
         * Navigating forward can also be triggered in a declarative manner by using the `[routerDirection]` directive:
         *
         * ```html
         * <a routerLink="/path/to/page" routerDirection="forward">Link</a>
         * ```
         */


        _createClass2(NavController, [{
          key: "navigateForward",
          value: function navigateForward(url) {
            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
            this.setDirection('forward', options.animated, options.animationDirection, options.animation);
            return this.navigate(url, options);
          }
          /**
           * This method uses Angular's [Router](https://angular.io/api/router/Router) under the hood,
           * it's equivalent to calling:
           *
           * ```ts
           * this.navController.setDirection('back');
           * this.router.navigateByUrl(path);
           * ```
           *
           * Going **back** means that all the pages in the stack until the navigated page is found will be popped,
           * and that it will show a "back" animation by default.
           *
           * Navigating back can also be triggered in a declarative manner by using the `[routerDirection]` directive:
           *
           * ```html
           * <a routerLink="/path/to/page" routerDirection="back">Link</a>
           * ```
           */

        }, {
          key: "navigateBack",
          value: function navigateBack(url) {
            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
            this.setDirection('back', options.animated, options.animationDirection, options.animation);
            return this.navigate(url, options);
          }
          /**
           * This method uses Angular's [Router](https://angular.io/api/router/Router) under the hood,
           * it's equivalent to calling:
           *
           * ```ts
           * this.navController.setDirection('root');
           * this.router.navigateByUrl(path);
           * ```
           *
           * Going **root** means that all existing pages in the stack will be removed,
           * and the navigated page will become the single page in the stack.
           *
           * Navigating root can also be triggered in a declarative manner by using the `[routerDirection]` directive:
           *
           * ```html
           * <a routerLink="/path/to/page" routerDirection="root">Link</a>
           * ```
           */

        }, {
          key: "navigateRoot",
          value: function navigateRoot(url) {
            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
            this.setDirection('root', options.animated, options.animationDirection, options.animation);
            return this.navigate(url, options);
          }
          /**
           * Same as [Location](https://angular.io/api/common/Location)'s back() method.
           * It will use the standard `window.history.back()` under the hood, but featuring a `back` animation
           * by default.
           */

        }, {
          key: "back",
          value: function back() {
            var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
              animated: true,
              animationDirection: 'back'
            };
            this.setDirection('back', options.animated, options.animationDirection, options.animation);
            return this.location.back();
          }
          /**
           * This methods goes back in the context of Ionic's stack navigation.
           *
           * It recursively finds the top active `ion-router-outlet` and calls `pop()`.
           * This is the recommended way to go back when you are using `ion-router-outlet`.
           */

        }, {
          key: "pop",
          value: function pop() {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee26() {
              var outlet;
              return regeneratorRuntime.wrap(function _callee26$(_context28) {
                while (1) {
                  switch (_context28.prev = _context28.next) {
                    case 0:
                      outlet = this.topOutlet;

                    case 1:
                      if (!outlet) {
                        _context28.next = 11;
                        break;
                      }

                      _context28.next = 4;
                      return outlet.pop();

                    case 4:
                      if (!_context28.sent) {
                        _context28.next = 8;
                        break;
                      }

                      return _context28.abrupt("break", 11);

                    case 8:
                      outlet = outlet.parentOutlet;

                    case 9:
                      _context28.next = 1;
                      break;

                    case 11:
                    case "end":
                      return _context28.stop();
                  }
                }
              }, _callee26, this);
            }));
          }
          /**
           * This methods specifies the direction of the next navigation performed by the Angular router.
           *
           * `setDirection()` does not trigger any transition, it just sets some flags to be consumed by `ion-router-outlet`.
           *
           * It's recommended to use `navigateForward()`, `navigateBack()` and `navigateRoot()` instead of `setDirection()`.
           */

        }, {
          key: "setDirection",
          value: function setDirection(direction, animated, animationDirection, animationBuilder) {
            this.direction = direction;
            this.animated = getAnimation(direction, animated, animationDirection);
            this.animationBuilder = animationBuilder;
          }
          /**
           * @internal
           */

        }, {
          key: "setTopOutlet",
          value: function setTopOutlet(outlet) {
            this.topOutlet = outlet;
          }
          /**
           * @internal
           */

        }, {
          key: "consumeTransition",
          value: function consumeTransition() {
            var direction = 'root';
            var animation;
            var animationBuilder = this.animationBuilder;

            if (this.direction === 'auto') {
              direction = this.guessDirection;
              animation = this.guessAnimation;
            } else {
              animation = this.animated;
              direction = this.direction;
            }

            this.direction = DEFAULT_DIRECTION;
            this.animated = DEFAULT_ANIMATED;
            this.animationBuilder = undefined;
            return {
              direction: direction,
              animation: animation,
              animationBuilder: animationBuilder
            };
          }
        }, {
          key: "navigate",
          value: function navigate(url, options) {
            if (Array.isArray(url)) {
              return this.router.navigate(url, options);
            } else {
              /**
               * navigateByUrl ignores any properties that
               * would change the url, so things like queryParams
               * would be ignored unless we create a url tree
               * More Info: https://github.com/angular/angular/issues/18798
               */
              var urlTree = this.serializer.parse(url.toString());

              if (options.queryParams !== undefined) {
                urlTree.queryParams = Object.assign({}, options.queryParams);
              }

              if (options.fragment !== undefined) {
                urlTree.fragment = options.fragment;
              }
              /**
               * `navigateByUrl` will still apply `NavigationExtras` properties
               * that do not modify the url, such as `replaceUrl` which is why
               * `options` is passed in here.
               */


              return this.router.navigateByUrl(urlTree, options);
            }
          }
        }]);

        return NavController;
      }();

      NavController.ɵfac = function NavController_Factory(t) {
        return new (t || NavController)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](Platform), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_3__["Location"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_router__WEBPACK_IMPORTED_MODULE_4__["UrlSerializer"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"], 8));
      };

      NavController.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: NavController,
        factory: function factory(t) {
          return NavController.ɵfac(t);
        },
        providedIn: 'root'
      });

      NavController.ctorParameters = function () {
        return [{
          type: Platform
        }, {
          type: _angular_common__WEBPACK_IMPORTED_MODULE_3__["Location"]
        }, {
          type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["UrlSerializer"]
        }, {
          type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"],
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
          }]
        }];
      };

      NavController.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: function NavController_Factory() {
          return new NavController(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(Platform), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_common__WEBPACK_IMPORTED_MODULE_3__["Location"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_router__WEBPACK_IMPORTED_MODULE_4__["UrlSerializer"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"], 8));
        },
        token: NavController,
        providedIn: "root"
      });
      NavController = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(3, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"])())], NavController);

      var getAnimation = function getAnimation(direction, animated, animationDirection) {
        if (animated === false) {
          return undefined;
        }

        if (animationDirection !== undefined) {
          return animationDirection;
        }

        if (direction === 'forward' || direction === 'back') {
          return direction;
        } else if (direction === 'root' && animated === true) {
          return 'forward';
        }

        return undefined;
      };

      var ɵ0$2 = getAnimation;
      var DEFAULT_DIRECTION = 'auto';
      var DEFAULT_ANIMATED = undefined;
      /* eslint-disable */

      var proxyInputs = function proxyInputs(Cmp, inputs) {
        var Prototype = Cmp.prototype;
        inputs.forEach(function (item) {
          Object.defineProperty(Prototype, item, {
            get: function get() {
              return this.el[item];
            },
            set: function set(val) {
              var _this407 = this;

              this.z.runOutsideAngular(function () {
                return _this407.el[item] = val;
              });
            }
          });
        });
      };

      var proxyMethods = function proxyMethods(Cmp, methods) {
        var Prototype = Cmp.prototype;
        methods.forEach(function (methodName) {
          Prototype[methodName] = function () {
            var _this408 = this;

            var args = arguments;
            return this.z.runOutsideAngular(function () {
              return _this408.el[methodName].apply(_this408.el, args);
            });
          };
        });
      };

      var proxyOutputs = function proxyOutputs(instance, el, events) {
        events.forEach(function (eventName) {
          return instance[eventName] = Object(rxjs__WEBPACK_IMPORTED_MODULE_6__["fromEvent"])(el, eventName);
        });
      };

      function ProxyCmp(opts) {
        var decorator = function decorator(cls) {
          if (opts.inputs) {
            proxyInputs(cls, opts.inputs);
          }

          if (opts.methods) {
            proxyMethods(cls, opts.methods);
          }

          return cls;
        };

        return decorator;
      }

      var IonApp = function IonApp(c, r, z) {
        _classCallCheck(this, IonApp);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonApp.ɵfac = function IonApp_Factory(t) {
        return new (t || IonApp)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonApp.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonApp,
        selectors: [["ion-app"]],
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonApp_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonApp.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      var IonAvatar = function IonAvatar(c, r, z) {
        _classCallCheck(this, IonAvatar);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonAvatar.ɵfac = function IonAvatar_Factory(t) {
        return new (t || IonAvatar)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonAvatar.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonAvatar,
        selectors: [["ion-avatar"]],
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonAvatar_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonAvatar.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      var IonBackButton = function IonBackButton(c, r, z) {
        _classCallCheck(this, IonBackButton);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonBackButton.ɵfac = function IonBackButton_Factory(t) {
        return new (t || IonBackButton)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonBackButton.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonBackButton,
        selectors: [["ion-back-button"]],
        inputs: {
          color: "color",
          defaultHref: "defaultHref",
          disabled: "disabled",
          icon: "icon",
          mode: "mode",
          routerAnimation: "routerAnimation",
          text: "text",
          type: "type"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonBackButton_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonBackButton.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonBackButton = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "defaultHref", "disabled", "icon", "mode", "routerAnimation", "text", "type"]
      })], IonBackButton);

      var IonBackdrop = function IonBackdrop(c, r, z) {
        _classCallCheck(this, IonBackdrop);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionBackdropTap"]);
      };

      IonBackdrop.ɵfac = function IonBackdrop_Factory(t) {
        return new (t || IonBackdrop)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonBackdrop.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonBackdrop,
        selectors: [["ion-backdrop"]],
        inputs: {
          stopPropagation: "stopPropagation",
          tappable: "tappable",
          visible: "visible"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonBackdrop_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonBackdrop.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonBackdrop = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["stopPropagation", "tappable", "visible"]
      })], IonBackdrop);

      var IonBadge = function IonBadge(c, r, z) {
        _classCallCheck(this, IonBadge);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonBadge.ɵfac = function IonBadge_Factory(t) {
        return new (t || IonBadge)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonBadge.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonBadge,
        selectors: [["ion-badge"]],
        inputs: {
          color: "color",
          mode: "mode"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonBadge_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonBadge.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonBadge = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "mode"]
      })], IonBadge);

      var IonButton = function IonButton(c, r, z) {
        _classCallCheck(this, IonButton);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionFocus", "ionBlur"]);
      };

      IonButton.ɵfac = function IonButton_Factory(t) {
        return new (t || IonButton)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonButton.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonButton,
        selectors: [["ion-button"]],
        inputs: {
          buttonType: "buttonType",
          color: "color",
          disabled: "disabled",
          download: "download",
          expand: "expand",
          fill: "fill",
          href: "href",
          mode: "mode",
          rel: "rel",
          routerAnimation: "routerAnimation",
          routerDirection: "routerDirection",
          shape: "shape",
          size: "size",
          strong: "strong",
          target: "target",
          type: "type"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonButton_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonButton.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonButton = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"]
      })], IonButton);

      var IonButtons = function IonButtons(c, r, z) {
        _classCallCheck(this, IonButtons);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonButtons.ɵfac = function IonButtons_Factory(t) {
        return new (t || IonButtons)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonButtons.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonButtons,
        selectors: [["ion-buttons"]],
        inputs: {
          collapse: "collapse"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonButtons_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonButtons.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonButtons = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["collapse"]
      })], IonButtons);

      var IonCard = function IonCard(c, r, z) {
        _classCallCheck(this, IonCard);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonCard.ɵfac = function IonCard_Factory(t) {
        return new (t || IonCard)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonCard.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonCard,
        selectors: [["ion-card"]],
        inputs: {
          button: "button",
          color: "color",
          disabled: "disabled",
          download: "download",
          href: "href",
          mode: "mode",
          rel: "rel",
          routerAnimation: "routerAnimation",
          routerDirection: "routerDirection",
          target: "target",
          type: "type"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonCard_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonCard.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonCard = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"]
      })], IonCard);

      var IonCardContent = function IonCardContent(c, r, z) {
        _classCallCheck(this, IonCardContent);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonCardContent.ɵfac = function IonCardContent_Factory(t) {
        return new (t || IonCardContent)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonCardContent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonCardContent,
        selectors: [["ion-card-content"]],
        inputs: {
          mode: "mode"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonCardContent_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonCardContent.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonCardContent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["mode"]
      })], IonCardContent);

      var IonCardHeader = function IonCardHeader(c, r, z) {
        _classCallCheck(this, IonCardHeader);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonCardHeader.ɵfac = function IonCardHeader_Factory(t) {
        return new (t || IonCardHeader)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonCardHeader.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonCardHeader,
        selectors: [["ion-card-header"]],
        inputs: {
          color: "color",
          mode: "mode",
          translucent: "translucent"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonCardHeader_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonCardHeader.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonCardHeader = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "mode", "translucent"]
      })], IonCardHeader);

      var IonCardSubtitle = function IonCardSubtitle(c, r, z) {
        _classCallCheck(this, IonCardSubtitle);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonCardSubtitle.ɵfac = function IonCardSubtitle_Factory(t) {
        return new (t || IonCardSubtitle)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonCardSubtitle.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonCardSubtitle,
        selectors: [["ion-card-subtitle"]],
        inputs: {
          color: "color",
          mode: "mode"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonCardSubtitle_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonCardSubtitle.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonCardSubtitle = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "mode"]
      })], IonCardSubtitle);

      var IonCardTitle = function IonCardTitle(c, r, z) {
        _classCallCheck(this, IonCardTitle);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonCardTitle.ɵfac = function IonCardTitle_Factory(t) {
        return new (t || IonCardTitle)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonCardTitle.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonCardTitle,
        selectors: [["ion-card-title"]],
        inputs: {
          color: "color",
          mode: "mode"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonCardTitle_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonCardTitle.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonCardTitle = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "mode"]
      })], IonCardTitle);

      var IonCheckbox = function IonCheckbox(c, r, z) {
        _classCallCheck(this, IonCheckbox);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionChange", "ionFocus", "ionBlur"]);
      };

      IonCheckbox.ɵfac = function IonCheckbox_Factory(t) {
        return new (t || IonCheckbox)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonCheckbox.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonCheckbox,
        selectors: [["ion-checkbox"]],
        inputs: {
          checked: "checked",
          color: "color",
          disabled: "disabled",
          indeterminate: "indeterminate",
          mode: "mode",
          name: "name",
          value: "value"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonCheckbox_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonCheckbox.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonCheckbox = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["checked", "color", "disabled", "indeterminate", "mode", "name", "value"]
      })], IonCheckbox);

      var IonChip = function IonChip(c, r, z) {
        _classCallCheck(this, IonChip);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonChip.ɵfac = function IonChip_Factory(t) {
        return new (t || IonChip)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonChip.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonChip,
        selectors: [["ion-chip"]],
        inputs: {
          color: "color",
          disabled: "disabled",
          mode: "mode",
          outline: "outline"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonChip_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonChip.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonChip = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "disabled", "mode", "outline"]
      })], IonChip);

      var IonCol = function IonCol(c, r, z) {
        _classCallCheck(this, IonCol);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonCol.ɵfac = function IonCol_Factory(t) {
        return new (t || IonCol)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonCol.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonCol,
        selectors: [["ion-col"]],
        inputs: {
          offset: "offset",
          offsetLg: "offsetLg",
          offsetMd: "offsetMd",
          offsetSm: "offsetSm",
          offsetXl: "offsetXl",
          offsetXs: "offsetXs",
          pull: "pull",
          pullLg: "pullLg",
          pullMd: "pullMd",
          pullSm: "pullSm",
          pullXl: "pullXl",
          pullXs: "pullXs",
          push: "push",
          pushLg: "pushLg",
          pushMd: "pushMd",
          pushSm: "pushSm",
          pushXl: "pushXl",
          pushXs: "pushXs",
          size: "size",
          sizeLg: "sizeLg",
          sizeMd: "sizeMd",
          sizeSm: "sizeSm",
          sizeXl: "sizeXl",
          sizeXs: "sizeXs"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonCol_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonCol.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonCol = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"]
      })], IonCol);

      var IonContent = function IonContent(c, r, z) {
        _classCallCheck(this, IonContent);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionScrollStart", "ionScroll", "ionScrollEnd"]);
      };

      IonContent.ɵfac = function IonContent_Factory(t) {
        return new (t || IonContent)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonContent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonContent,
        selectors: [["ion-content"]],
        inputs: {
          color: "color",
          forceOverscroll: "forceOverscroll",
          fullscreen: "fullscreen",
          scrollEvents: "scrollEvents",
          scrollX: "scrollX",
          scrollY: "scrollY"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonContent_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonContent.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonContent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"],
        "methods": ["getScrollElement", "scrollToTop", "scrollToBottom", "scrollByPoint", "scrollToPoint"]
      })], IonContent);

      var IonDatetime = function IonDatetime(c, r, z) {
        _classCallCheck(this, IonDatetime);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionCancel", "ionChange", "ionFocus", "ionBlur"]);
      };

      IonDatetime.ɵfac = function IonDatetime_Factory(t) {
        return new (t || IonDatetime)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonDatetime.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonDatetime,
        selectors: [["ion-datetime"]],
        inputs: {
          cancelText: "cancelText",
          dayNames: "dayNames",
          dayShortNames: "dayShortNames",
          dayValues: "dayValues",
          disabled: "disabled",
          displayFormat: "displayFormat",
          displayTimezone: "displayTimezone",
          doneText: "doneText",
          hourValues: "hourValues",
          max: "max",
          min: "min",
          minuteValues: "minuteValues",
          mode: "mode",
          monthNames: "monthNames",
          monthShortNames: "monthShortNames",
          monthValues: "monthValues",
          name: "name",
          pickerFormat: "pickerFormat",
          pickerOptions: "pickerOptions",
          placeholder: "placeholder",
          readonly: "readonly",
          value: "value",
          yearValues: "yearValues"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonDatetime_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonDatetime.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonDatetime = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["cancelText", "dayNames", "dayShortNames", "dayValues", "disabled", "displayFormat", "displayTimezone", "doneText", "hourValues", "max", "min", "minuteValues", "mode", "monthNames", "monthShortNames", "monthValues", "name", "pickerFormat", "pickerOptions", "placeholder", "readonly", "value", "yearValues"],
        "methods": ["open"]
      })], IonDatetime);

      var IonFab = function IonFab(c, r, z) {
        _classCallCheck(this, IonFab);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonFab.ɵfac = function IonFab_Factory(t) {
        return new (t || IonFab)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonFab.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonFab,
        selectors: [["ion-fab"]],
        inputs: {
          activated: "activated",
          edge: "edge",
          horizontal: "horizontal",
          vertical: "vertical"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonFab_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonFab.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonFab = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["activated", "edge", "horizontal", "vertical"],
        "methods": ["close"]
      })], IonFab);

      var IonFabButton = function IonFabButton(c, r, z) {
        _classCallCheck(this, IonFabButton);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionFocus", "ionBlur"]);
      };

      IonFabButton.ɵfac = function IonFabButton_Factory(t) {
        return new (t || IonFabButton)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonFabButton.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonFabButton,
        selectors: [["ion-fab-button"]],
        inputs: {
          activated: "activated",
          closeIcon: "closeIcon",
          color: "color",
          disabled: "disabled",
          download: "download",
          href: "href",
          mode: "mode",
          rel: "rel",
          routerAnimation: "routerAnimation",
          routerDirection: "routerDirection",
          show: "show",
          size: "size",
          target: "target",
          translucent: "translucent",
          type: "type"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonFabButton_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonFabButton.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonFabButton = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["activated", "closeIcon", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "show", "size", "target", "translucent", "type"]
      })], IonFabButton);

      var IonFabList = function IonFabList(c, r, z) {
        _classCallCheck(this, IonFabList);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonFabList.ɵfac = function IonFabList_Factory(t) {
        return new (t || IonFabList)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonFabList.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonFabList,
        selectors: [["ion-fab-list"]],
        inputs: {
          activated: "activated",
          side: "side"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonFabList_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonFabList.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonFabList = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["activated", "side"]
      })], IonFabList);

      var IonFooter = function IonFooter(c, r, z) {
        _classCallCheck(this, IonFooter);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonFooter.ɵfac = function IonFooter_Factory(t) {
        return new (t || IonFooter)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonFooter.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonFooter,
        selectors: [["ion-footer"]],
        inputs: {
          mode: "mode",
          translucent: "translucent"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonFooter_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonFooter.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonFooter = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["mode", "translucent"]
      })], IonFooter);

      var IonGrid = function IonGrid(c, r, z) {
        _classCallCheck(this, IonGrid);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonGrid.ɵfac = function IonGrid_Factory(t) {
        return new (t || IonGrid)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonGrid.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonGrid,
        selectors: [["ion-grid"]],
        inputs: {
          fixed: "fixed"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonGrid_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonGrid.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonGrid = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["fixed"]
      })], IonGrid);

      var IonHeader = function IonHeader(c, r, z) {
        _classCallCheck(this, IonHeader);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonHeader.ɵfac = function IonHeader_Factory(t) {
        return new (t || IonHeader)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonHeader.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonHeader,
        selectors: [["ion-header"]],
        inputs: {
          collapse: "collapse",
          mode: "mode",
          translucent: "translucent"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonHeader_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonHeader.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonHeader = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["collapse", "mode", "translucent"]
      })], IonHeader);

      var IonIcon = function IonIcon(c, r, z) {
        _classCallCheck(this, IonIcon);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonIcon.ɵfac = function IonIcon_Factory(t) {
        return new (t || IonIcon)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonIcon.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonIcon,
        selectors: [["ion-icon"]],
        inputs: {
          ariaHidden: "ariaHidden",
          ariaLabel: "ariaLabel",
          color: "color",
          flipRtl: "flipRtl",
          icon: "icon",
          ios: "ios",
          lazy: "lazy",
          md: "md",
          mode: "mode",
          name: "name",
          sanitize: "sanitize",
          size: "size",
          src: "src"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonIcon_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonIcon.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonIcon = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["ariaHidden", "ariaLabel", "color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"]
      })], IonIcon);

      var IonImg = function IonImg(c, r, z) {
        _classCallCheck(this, IonImg);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionImgWillLoad", "ionImgDidLoad", "ionError"]);
      };

      IonImg.ɵfac = function IonImg_Factory(t) {
        return new (t || IonImg)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonImg.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonImg,
        selectors: [["ion-img"]],
        inputs: {
          alt: "alt",
          src: "src"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonImg_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonImg.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonImg = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["alt", "src"]
      })], IonImg);

      var IonInfiniteScroll = function IonInfiniteScroll(c, r, z) {
        _classCallCheck(this, IonInfiniteScroll);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionInfinite"]);
      };

      IonInfiniteScroll.ɵfac = function IonInfiniteScroll_Factory(t) {
        return new (t || IonInfiniteScroll)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonInfiniteScroll.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonInfiniteScroll,
        selectors: [["ion-infinite-scroll"]],
        inputs: {
          disabled: "disabled",
          position: "position",
          threshold: "threshold"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonInfiniteScroll_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonInfiniteScroll.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonInfiniteScroll = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["disabled", "position", "threshold"],
        "methods": ["complete"]
      })], IonInfiniteScroll);

      var IonInfiniteScrollContent = function IonInfiniteScrollContent(c, r, z) {
        _classCallCheck(this, IonInfiniteScrollContent);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonInfiniteScrollContent.ɵfac = function IonInfiniteScrollContent_Factory(t) {
        return new (t || IonInfiniteScrollContent)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonInfiniteScrollContent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonInfiniteScrollContent,
        selectors: [["ion-infinite-scroll-content"]],
        inputs: {
          loadingSpinner: "loadingSpinner",
          loadingText: "loadingText"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonInfiniteScrollContent_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonInfiniteScrollContent.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonInfiniteScrollContent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["loadingSpinner", "loadingText"]
      })], IonInfiniteScrollContent);

      var IonInput = function IonInput(c, r, z) {
        _classCallCheck(this, IonInput);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionInput", "ionChange", "ionBlur", "ionFocus"]);
      };

      IonInput.ɵfac = function IonInput_Factory(t) {
        return new (t || IonInput)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonInput.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonInput,
        selectors: [["ion-input"]],
        inputs: {
          accept: "accept",
          autocapitalize: "autocapitalize",
          autocomplete: "autocomplete",
          autocorrect: "autocorrect",
          autofocus: "autofocus",
          clearInput: "clearInput",
          clearOnEdit: "clearOnEdit",
          color: "color",
          debounce: "debounce",
          disabled: "disabled",
          enterkeyhint: "enterkeyhint",
          inputmode: "inputmode",
          max: "max",
          maxlength: "maxlength",
          min: "min",
          minlength: "minlength",
          mode: "mode",
          multiple: "multiple",
          name: "name",
          pattern: "pattern",
          placeholder: "placeholder",
          readonly: "readonly",
          required: "required",
          size: "size",
          spellcheck: "spellcheck",
          step: "step",
          type: "type",
          value: "value"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonInput_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonInput.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonInput = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"],
        "methods": ["setFocus", "getInputElement"]
      })], IonInput);

      var IonItem = function IonItem(c, r, z) {
        _classCallCheck(this, IonItem);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonItem.ɵfac = function IonItem_Factory(t) {
        return new (t || IonItem)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonItem.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonItem,
        selectors: [["ion-item"]],
        inputs: {
          button: "button",
          color: "color",
          detail: "detail",
          detailIcon: "detailIcon",
          disabled: "disabled",
          download: "download",
          href: "href",
          lines: "lines",
          mode: "mode",
          rel: "rel",
          routerAnimation: "routerAnimation",
          routerDirection: "routerDirection",
          target: "target",
          type: "type"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonItem_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonItem.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonItem = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"]
      })], IonItem);

      var IonItemDivider = function IonItemDivider(c, r, z) {
        _classCallCheck(this, IonItemDivider);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonItemDivider.ɵfac = function IonItemDivider_Factory(t) {
        return new (t || IonItemDivider)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonItemDivider.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonItemDivider,
        selectors: [["ion-item-divider"]],
        inputs: {
          color: "color",
          mode: "mode",
          sticky: "sticky"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonItemDivider_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonItemDivider.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonItemDivider = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "mode", "sticky"]
      })], IonItemDivider);

      var IonItemGroup = function IonItemGroup(c, r, z) {
        _classCallCheck(this, IonItemGroup);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonItemGroup.ɵfac = function IonItemGroup_Factory(t) {
        return new (t || IonItemGroup)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonItemGroup.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonItemGroup,
        selectors: [["ion-item-group"]],
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonItemGroup_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonItemGroup.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      var IonItemOption = function IonItemOption(c, r, z) {
        _classCallCheck(this, IonItemOption);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonItemOption.ɵfac = function IonItemOption_Factory(t) {
        return new (t || IonItemOption)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonItemOption.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonItemOption,
        selectors: [["ion-item-option"]],
        inputs: {
          color: "color",
          disabled: "disabled",
          download: "download",
          expandable: "expandable",
          href: "href",
          mode: "mode",
          rel: "rel",
          target: "target",
          type: "type"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonItemOption_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonItemOption.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonItemOption = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "disabled", "download", "expandable", "href", "mode", "rel", "target", "type"]
      })], IonItemOption);

      var IonItemOptions = function IonItemOptions(c, r, z) {
        _classCallCheck(this, IonItemOptions);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionSwipe"]);
      };

      IonItemOptions.ɵfac = function IonItemOptions_Factory(t) {
        return new (t || IonItemOptions)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonItemOptions.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonItemOptions,
        selectors: [["ion-item-options"]],
        inputs: {
          side: "side"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonItemOptions_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonItemOptions.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonItemOptions = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["side"]
      })], IonItemOptions);

      var IonItemSliding = function IonItemSliding(c, r, z) {
        _classCallCheck(this, IonItemSliding);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionDrag"]);
      };

      IonItemSliding.ɵfac = function IonItemSliding_Factory(t) {
        return new (t || IonItemSliding)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonItemSliding.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonItemSliding,
        selectors: [["ion-item-sliding"]],
        inputs: {
          disabled: "disabled"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonItemSliding_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonItemSliding.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonItemSliding = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["disabled"],
        "methods": ["getOpenAmount", "getSlidingRatio", "open", "close", "closeOpened"]
      })], IonItemSliding);

      var IonLabel = function IonLabel(c, r, z) {
        _classCallCheck(this, IonLabel);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonLabel.ɵfac = function IonLabel_Factory(t) {
        return new (t || IonLabel)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonLabel.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonLabel,
        selectors: [["ion-label"]],
        inputs: {
          color: "color",
          mode: "mode",
          position: "position"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonLabel_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonLabel.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonLabel = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "mode", "position"]
      })], IonLabel);

      var IonList = function IonList(c, r, z) {
        _classCallCheck(this, IonList);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonList.ɵfac = function IonList_Factory(t) {
        return new (t || IonList)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonList.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonList,
        selectors: [["ion-list"]],
        inputs: {
          inset: "inset",
          lines: "lines",
          mode: "mode"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonList_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonList.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonList = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["inset", "lines", "mode"],
        "methods": ["closeSlidingItems"]
      })], IonList);

      var IonListHeader = function IonListHeader(c, r, z) {
        _classCallCheck(this, IonListHeader);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonListHeader.ɵfac = function IonListHeader_Factory(t) {
        return new (t || IonListHeader)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonListHeader.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonListHeader,
        selectors: [["ion-list-header"]],
        inputs: {
          color: "color",
          lines: "lines",
          mode: "mode"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonListHeader_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonListHeader.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonListHeader = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "lines", "mode"]
      })], IonListHeader);

      var IonMenu = function IonMenu(c, r, z) {
        _classCallCheck(this, IonMenu);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionWillOpen", "ionWillClose", "ionDidOpen", "ionDidClose"]);
      };

      IonMenu.ɵfac = function IonMenu_Factory(t) {
        return new (t || IonMenu)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonMenu.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonMenu,
        selectors: [["ion-menu"]],
        inputs: {
          contentId: "contentId",
          disabled: "disabled",
          maxEdgeStart: "maxEdgeStart",
          menuId: "menuId",
          side: "side",
          swipeGesture: "swipeGesture",
          type: "type"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonMenu_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonMenu.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonMenu = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["contentId", "disabled", "maxEdgeStart", "menuId", "side", "swipeGesture", "type"],
        "methods": ["isOpen", "isActive", "open", "close", "toggle", "setOpen"]
      })], IonMenu);

      var IonMenuButton = function IonMenuButton(c, r, z) {
        _classCallCheck(this, IonMenuButton);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonMenuButton.ɵfac = function IonMenuButton_Factory(t) {
        return new (t || IonMenuButton)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonMenuButton.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonMenuButton,
        selectors: [["ion-menu-button"]],
        inputs: {
          autoHide: "autoHide",
          color: "color",
          disabled: "disabled",
          menu: "menu",
          mode: "mode",
          type: "type"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonMenuButton_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonMenuButton.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonMenuButton = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["autoHide", "color", "disabled", "menu", "mode", "type"]
      })], IonMenuButton);

      var IonMenuToggle = function IonMenuToggle(c, r, z) {
        _classCallCheck(this, IonMenuToggle);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonMenuToggle.ɵfac = function IonMenuToggle_Factory(t) {
        return new (t || IonMenuToggle)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonMenuToggle.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonMenuToggle,
        selectors: [["ion-menu-toggle"]],
        inputs: {
          autoHide: "autoHide",
          menu: "menu"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonMenuToggle_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonMenuToggle.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonMenuToggle = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["autoHide", "menu"]
      })], IonMenuToggle);

      var IonNav = function IonNav(c, r, z) {
        _classCallCheck(this, IonNav);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionNavWillChange", "ionNavDidChange"]);
      };

      IonNav.ɵfac = function IonNav_Factory(t) {
        return new (t || IonNav)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonNav.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonNav,
        selectors: [["ion-nav"]],
        inputs: {
          animated: "animated",
          animation: "animation",
          root: "root",
          rootParams: "rootParams",
          swipeGesture: "swipeGesture"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonNav_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonNav.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonNav = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["animated", "animation", "root", "rootParams", "swipeGesture"],
        "methods": ["push", "insert", "insertPages", "pop", "popTo", "popToRoot", "removeIndex", "setRoot", "setPages", "getActive", "getByIndex", "canGoBack", "getPrevious"]
      })], IonNav);

      var IonNavLink = function IonNavLink(c, r, z) {
        _classCallCheck(this, IonNavLink);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonNavLink.ɵfac = function IonNavLink_Factory(t) {
        return new (t || IonNavLink)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonNavLink.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonNavLink,
        selectors: [["ion-nav-link"]],
        inputs: {
          component: "component",
          componentProps: "componentProps",
          routerAnimation: "routerAnimation",
          routerDirection: "routerDirection"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonNavLink_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonNavLink.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonNavLink = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["component", "componentProps", "routerAnimation", "routerDirection"]
      })], IonNavLink);

      var IonNote = function IonNote(c, r, z) {
        _classCallCheck(this, IonNote);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonNote.ɵfac = function IonNote_Factory(t) {
        return new (t || IonNote)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonNote.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonNote,
        selectors: [["ion-note"]],
        inputs: {
          color: "color",
          mode: "mode"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonNote_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonNote.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonNote = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "mode"]
      })], IonNote);

      var IonProgressBar = function IonProgressBar(c, r, z) {
        _classCallCheck(this, IonProgressBar);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonProgressBar.ɵfac = function IonProgressBar_Factory(t) {
        return new (t || IonProgressBar)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonProgressBar.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonProgressBar,
        selectors: [["ion-progress-bar"]],
        inputs: {
          buffer: "buffer",
          color: "color",
          mode: "mode",
          reversed: "reversed",
          type: "type",
          value: "value"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonProgressBar_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonProgressBar.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonProgressBar = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["buffer", "color", "mode", "reversed", "type", "value"]
      })], IonProgressBar);

      var IonRadio = function IonRadio(c, r, z) {
        _classCallCheck(this, IonRadio);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionFocus", "ionBlur"]);
      };

      IonRadio.ɵfac = function IonRadio_Factory(t) {
        return new (t || IonRadio)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonRadio.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonRadio,
        selectors: [["ion-radio"]],
        inputs: {
          color: "color",
          disabled: "disabled",
          mode: "mode",
          name: "name",
          value: "value"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonRadio_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonRadio.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonRadio = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "disabled", "mode", "name", "value"]
      })], IonRadio);

      var IonRadioGroup = function IonRadioGroup(c, r, z) {
        _classCallCheck(this, IonRadioGroup);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionChange"]);
      };

      IonRadioGroup.ɵfac = function IonRadioGroup_Factory(t) {
        return new (t || IonRadioGroup)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonRadioGroup.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonRadioGroup,
        selectors: [["ion-radio-group"]],
        inputs: {
          allowEmptySelection: "allowEmptySelection",
          name: "name",
          value: "value"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonRadioGroup_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonRadioGroup.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonRadioGroup = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["allowEmptySelection", "name", "value"]
      })], IonRadioGroup);

      var IonRange = function IonRange(c, r, z) {
        _classCallCheck(this, IonRange);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionChange", "ionFocus", "ionBlur"]);
      };

      IonRange.ɵfac = function IonRange_Factory(t) {
        return new (t || IonRange)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonRange.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonRange,
        selectors: [["ion-range"]],
        inputs: {
          color: "color",
          debounce: "debounce",
          disabled: "disabled",
          dualKnobs: "dualKnobs",
          max: "max",
          min: "min",
          mode: "mode",
          name: "name",
          pin: "pin",
          snaps: "snaps",
          step: "step",
          ticks: "ticks",
          value: "value"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonRange_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonRange.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonRange = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "debounce", "disabled", "dualKnobs", "max", "min", "mode", "name", "pin", "snaps", "step", "ticks", "value"]
      })], IonRange);

      var IonRefresher = function IonRefresher(c, r, z) {
        _classCallCheck(this, IonRefresher);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionRefresh", "ionPull", "ionStart"]);
      };

      IonRefresher.ɵfac = function IonRefresher_Factory(t) {
        return new (t || IonRefresher)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonRefresher.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonRefresher,
        selectors: [["ion-refresher"]],
        inputs: {
          closeDuration: "closeDuration",
          disabled: "disabled",
          pullFactor: "pullFactor",
          pullMax: "pullMax",
          pullMin: "pullMin",
          snapbackDuration: "snapbackDuration"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonRefresher_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonRefresher.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonRefresher = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["closeDuration", "disabled", "pullFactor", "pullMax", "pullMin", "snapbackDuration"],
        "methods": ["complete", "cancel", "getProgress"]
      })], IonRefresher);

      var IonRefresherContent = function IonRefresherContent(c, r, z) {
        _classCallCheck(this, IonRefresherContent);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonRefresherContent.ɵfac = function IonRefresherContent_Factory(t) {
        return new (t || IonRefresherContent)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonRefresherContent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonRefresherContent,
        selectors: [["ion-refresher-content"]],
        inputs: {
          pullingIcon: "pullingIcon",
          pullingText: "pullingText",
          refreshingSpinner: "refreshingSpinner",
          refreshingText: "refreshingText"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonRefresherContent_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonRefresherContent.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonRefresherContent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["pullingIcon", "pullingText", "refreshingSpinner", "refreshingText"]
      })], IonRefresherContent);

      var IonReorder = function IonReorder(c, r, z) {
        _classCallCheck(this, IonReorder);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonReorder.ɵfac = function IonReorder_Factory(t) {
        return new (t || IonReorder)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonReorder.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonReorder,
        selectors: [["ion-reorder"]],
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonReorder_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonReorder.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      var IonReorderGroup = function IonReorderGroup(c, r, z) {
        _classCallCheck(this, IonReorderGroup);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionItemReorder"]);
      };

      IonReorderGroup.ɵfac = function IonReorderGroup_Factory(t) {
        return new (t || IonReorderGroup)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonReorderGroup.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonReorderGroup,
        selectors: [["ion-reorder-group"]],
        inputs: {
          disabled: "disabled"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonReorderGroup_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonReorderGroup.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonReorderGroup = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["disabled"],
        "methods": ["complete"]
      })], IonReorderGroup);

      var IonRippleEffect = function IonRippleEffect(c, r, z) {
        _classCallCheck(this, IonRippleEffect);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonRippleEffect.ɵfac = function IonRippleEffect_Factory(t) {
        return new (t || IonRippleEffect)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonRippleEffect.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonRippleEffect,
        selectors: [["ion-ripple-effect"]],
        inputs: {
          type: "type"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonRippleEffect_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonRippleEffect.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonRippleEffect = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["type"],
        "methods": ["addRipple"]
      })], IonRippleEffect);

      var IonRow = function IonRow(c, r, z) {
        _classCallCheck(this, IonRow);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonRow.ɵfac = function IonRow_Factory(t) {
        return new (t || IonRow)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonRow.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonRow,
        selectors: [["ion-row"]],
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonRow_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonRow.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      var IonSearchbar = function IonSearchbar(c, r, z) {
        _classCallCheck(this, IonSearchbar);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionInput", "ionChange", "ionCancel", "ionClear", "ionBlur", "ionFocus"]);
      };

      IonSearchbar.ɵfac = function IonSearchbar_Factory(t) {
        return new (t || IonSearchbar)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonSearchbar.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonSearchbar,
        selectors: [["ion-searchbar"]],
        inputs: {
          animated: "animated",
          autocomplete: "autocomplete",
          autocorrect: "autocorrect",
          cancelButtonIcon: "cancelButtonIcon",
          cancelButtonText: "cancelButtonText",
          clearIcon: "clearIcon",
          color: "color",
          debounce: "debounce",
          disabled: "disabled",
          enterkeyhint: "enterkeyhint",
          inputmode: "inputmode",
          mode: "mode",
          placeholder: "placeholder",
          searchIcon: "searchIcon",
          showCancelButton: "showCancelButton",
          showClearButton: "showClearButton",
          spellcheck: "spellcheck",
          type: "type",
          value: "value"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonSearchbar_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonSearchbar.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonSearchbar = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"],
        "methods": ["setFocus", "getInputElement"]
      })], IonSearchbar);

      var IonSegment = function IonSegment(c, r, z) {
        _classCallCheck(this, IonSegment);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionChange"]);
      };

      IonSegment.ɵfac = function IonSegment_Factory(t) {
        return new (t || IonSegment)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonSegment.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonSegment,
        selectors: [["ion-segment"]],
        inputs: {
          color: "color",
          disabled: "disabled",
          mode: "mode",
          scrollable: "scrollable",
          swipeGesture: "swipeGesture",
          value: "value"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonSegment_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonSegment.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonSegment = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "disabled", "mode", "scrollable", "swipeGesture", "value"]
      })], IonSegment);

      var IonSegmentButton = function IonSegmentButton(c, r, z) {
        _classCallCheck(this, IonSegmentButton);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonSegmentButton.ɵfac = function IonSegmentButton_Factory(t) {
        return new (t || IonSegmentButton)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonSegmentButton.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonSegmentButton,
        selectors: [["ion-segment-button"]],
        inputs: {
          disabled: "disabled",
          layout: "layout",
          mode: "mode",
          type: "type",
          value: "value"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonSegmentButton_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonSegmentButton.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonSegmentButton = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["disabled", "layout", "mode", "type", "value"]
      })], IonSegmentButton);

      var IonSelect = function IonSelect(c, r, z) {
        _classCallCheck(this, IonSelect);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionChange", "ionCancel", "ionFocus", "ionBlur"]);
      };

      IonSelect.ɵfac = function IonSelect_Factory(t) {
        return new (t || IonSelect)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonSelect.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonSelect,
        selectors: [["ion-select"]],
        inputs: {
          cancelText: "cancelText",
          compareWith: "compareWith",
          disabled: "disabled",
          "interface": "interface",
          interfaceOptions: "interfaceOptions",
          mode: "mode",
          multiple: "multiple",
          name: "name",
          okText: "okText",
          placeholder: "placeholder",
          selectedText: "selectedText",
          value: "value"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonSelect_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonSelect.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonSelect = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["cancelText", "compareWith", "disabled", "interface", "interfaceOptions", "mode", "multiple", "name", "okText", "placeholder", "selectedText", "value"],
        "methods": ["open"]
      })], IonSelect);

      var IonSelectOption = function IonSelectOption(c, r, z) {
        _classCallCheck(this, IonSelectOption);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonSelectOption.ɵfac = function IonSelectOption_Factory(t) {
        return new (t || IonSelectOption)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonSelectOption.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonSelectOption,
        selectors: [["ion-select-option"]],
        inputs: {
          disabled: "disabled",
          value: "value"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonSelectOption_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonSelectOption.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonSelectOption = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["disabled", "value"]
      })], IonSelectOption);

      var IonSkeletonText = function IonSkeletonText(c, r, z) {
        _classCallCheck(this, IonSkeletonText);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonSkeletonText.ɵfac = function IonSkeletonText_Factory(t) {
        return new (t || IonSkeletonText)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonSkeletonText.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonSkeletonText,
        selectors: [["ion-skeleton-text"]],
        inputs: {
          animated: "animated"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonSkeletonText_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonSkeletonText.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonSkeletonText = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["animated"]
      })], IonSkeletonText);

      var IonSlide = function IonSlide(c, r, z) {
        _classCallCheck(this, IonSlide);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonSlide.ɵfac = function IonSlide_Factory(t) {
        return new (t || IonSlide)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonSlide.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonSlide,
        selectors: [["ion-slide"]],
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonSlide_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonSlide.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      var IonSlides = function IonSlides(c, r, z) {
        _classCallCheck(this, IonSlides);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionSlidesDidLoad", "ionSlideTap", "ionSlideDoubleTap", "ionSlideWillChange", "ionSlideDidChange", "ionSlideNextStart", "ionSlidePrevStart", "ionSlideNextEnd", "ionSlidePrevEnd", "ionSlideTransitionStart", "ionSlideTransitionEnd", "ionSlideDrag", "ionSlideReachStart", "ionSlideReachEnd", "ionSlideTouchStart", "ionSlideTouchEnd"]);
      };

      IonSlides.ɵfac = function IonSlides_Factory(t) {
        return new (t || IonSlides)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonSlides.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonSlides,
        selectors: [["ion-slides"]],
        inputs: {
          mode: "mode",
          options: "options",
          pager: "pager",
          scrollbar: "scrollbar"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonSlides_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonSlides.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonSlides = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["mode", "options", "pager", "scrollbar"],
        "methods": ["update", "updateAutoHeight", "slideTo", "slideNext", "slidePrev", "getActiveIndex", "getPreviousIndex", "length", "isEnd", "isBeginning", "startAutoplay", "stopAutoplay", "lockSwipeToNext", "lockSwipeToPrev", "lockSwipes", "getSwiper"]
      })], IonSlides);

      var IonSpinner = function IonSpinner(c, r, z) {
        _classCallCheck(this, IonSpinner);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonSpinner.ɵfac = function IonSpinner_Factory(t) {
        return new (t || IonSpinner)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonSpinner.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonSpinner,
        selectors: [["ion-spinner"]],
        inputs: {
          color: "color",
          duration: "duration",
          name: "name",
          paused: "paused"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonSpinner_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonSpinner.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonSpinner = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "duration", "name", "paused"]
      })], IonSpinner);

      var IonSplitPane = function IonSplitPane(c, r, z) {
        _classCallCheck(this, IonSplitPane);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionSplitPaneVisible"]);
      };

      IonSplitPane.ɵfac = function IonSplitPane_Factory(t) {
        return new (t || IonSplitPane)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonSplitPane.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonSplitPane,
        selectors: [["ion-split-pane"]],
        inputs: {
          contentId: "contentId",
          disabled: "disabled",
          when: "when"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonSplitPane_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonSplitPane.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonSplitPane = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["contentId", "disabled", "when"]
      })], IonSplitPane);

      var IonTabBar = function IonTabBar(c, r, z) {
        _classCallCheck(this, IonTabBar);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonTabBar.ɵfac = function IonTabBar_Factory(t) {
        return new (t || IonTabBar)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonTabBar.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonTabBar,
        selectors: [["ion-tab-bar"]],
        inputs: {
          color: "color",
          mode: "mode",
          selectedTab: "selectedTab",
          translucent: "translucent"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonTabBar_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonTabBar.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonTabBar = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "mode", "selectedTab", "translucent"]
      })], IonTabBar);

      var IonTabButton = function IonTabButton(c, r, z) {
        _classCallCheck(this, IonTabButton);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonTabButton.ɵfac = function IonTabButton_Factory(t) {
        return new (t || IonTabButton)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonTabButton.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonTabButton,
        selectors: [["ion-tab-button"]],
        inputs: {
          disabled: "disabled",
          download: "download",
          href: "href",
          layout: "layout",
          mode: "mode",
          rel: "rel",
          selected: "selected",
          tab: "tab",
          target: "target"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonTabButton_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonTabButton.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonTabButton = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["disabled", "download", "href", "layout", "mode", "rel", "selected", "tab", "target"]
      })], IonTabButton);

      var IonText = function IonText(c, r, z) {
        _classCallCheck(this, IonText);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonText.ɵfac = function IonText_Factory(t) {
        return new (t || IonText)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonText.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonText,
        selectors: [["ion-text"]],
        inputs: {
          color: "color",
          mode: "mode"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonText_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonText.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonText = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "mode"]
      })], IonText);

      var IonTextarea = function IonTextarea(c, r, z) {
        _classCallCheck(this, IonTextarea);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionChange", "ionInput", "ionBlur", "ionFocus"]);
      };

      IonTextarea.ɵfac = function IonTextarea_Factory(t) {
        return new (t || IonTextarea)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonTextarea.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonTextarea,
        selectors: [["ion-textarea"]],
        inputs: {
          autoGrow: "autoGrow",
          autocapitalize: "autocapitalize",
          autofocus: "autofocus",
          clearOnEdit: "clearOnEdit",
          color: "color",
          cols: "cols",
          debounce: "debounce",
          disabled: "disabled",
          enterkeyhint: "enterkeyhint",
          inputmode: "inputmode",
          maxlength: "maxlength",
          minlength: "minlength",
          mode: "mode",
          name: "name",
          placeholder: "placeholder",
          readonly: "readonly",
          required: "required",
          rows: "rows",
          spellcheck: "spellcheck",
          value: "value",
          wrap: "wrap"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonTextarea_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonTextarea.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonTextarea = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["autoGrow", "autocapitalize", "autofocus", "clearOnEdit", "color", "cols", "debounce", "disabled", "enterkeyhint", "inputmode", "maxlength", "minlength", "mode", "name", "placeholder", "readonly", "required", "rows", "spellcheck", "value", "wrap"],
        "methods": ["setFocus", "getInputElement"]
      })], IonTextarea);

      var IonThumbnail = function IonThumbnail(c, r, z) {
        _classCallCheck(this, IonThumbnail);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonThumbnail.ɵfac = function IonThumbnail_Factory(t) {
        return new (t || IonThumbnail)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonThumbnail.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonThumbnail,
        selectors: [["ion-thumbnail"]],
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonThumbnail_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonThumbnail.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      var IonTitle = function IonTitle(c, r, z) {
        _classCallCheck(this, IonTitle);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonTitle.ɵfac = function IonTitle_Factory(t) {
        return new (t || IonTitle)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonTitle.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonTitle,
        selectors: [["ion-title"]],
        inputs: {
          color: "color",
          size: "size"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonTitle_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonTitle.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonTitle = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "size"]
      })], IonTitle);

      var IonToggle = function IonToggle(c, r, z) {
        _classCallCheck(this, IonToggle);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
        proxyOutputs(this, this.el, ["ionChange", "ionFocus", "ionBlur"]);
      };

      IonToggle.ɵfac = function IonToggle_Factory(t) {
        return new (t || IonToggle)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonToggle.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonToggle,
        selectors: [["ion-toggle"]],
        inputs: {
          checked: "checked",
          color: "color",
          disabled: "disabled",
          mode: "mode",
          name: "name",
          value: "value"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonToggle_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonToggle.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonToggle = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["checked", "color", "disabled", "mode", "name", "value"]
      })], IonToggle);

      var IonToolbar = function IonToolbar(c, r, z) {
        _classCallCheck(this, IonToolbar);

        this.z = z;
        c.detach();
        this.el = r.nativeElement;
      };

      IonToolbar.ɵfac = function IonToolbar_Factory(t) {
        return new (t || IonToolbar)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      IonToolbar.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonToolbar,
        selectors: [["ion-toolbar"]],
        inputs: {
          color: "color",
          mode: "mode"
        },
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonToolbar_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonToolbar.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      IonToolbar = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ["color", "mode"]
      })], IonToolbar);

      var Config = /*#__PURE__*/function () {
        function Config() {
          _classCallCheck(this, Config);
        }

        _createClass2(Config, [{
          key: "get",
          value: function get(key, fallback) {
            var c = getConfig();

            if (c) {
              return c.get(key, fallback);
            }

            return null;
          }
        }, {
          key: "getBoolean",
          value: function getBoolean(key, fallback) {
            var c = getConfig();

            if (c) {
              return c.getBoolean(key, fallback);
            }

            return false;
          }
        }, {
          key: "getNumber",
          value: function getNumber(key, fallback) {
            var c = getConfig();

            if (c) {
              return c.getNumber(key, fallback);
            }

            return 0;
          }
        }, {
          key: "set",
          value: function set(key, value) {
            console.warn("[DEPRECATION][Config]: The Config.set() method is deprecated and will be removed in Ionic Framework 6.0. Please see https://ionicframework.com/docs/angular/config for alternatives.");
            var c = getConfig();

            if (c) {
              c.set(key, value);
            }
          }
        }]);

        return Config;
      }();

      Config.ɵfac = function Config_Factory(t) {
        return new (t || Config)();
      };

      Config.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: Config,
        factory: function factory(t) {
          return Config.ɵfac(t);
        },
        providedIn: 'root'
      });
      Config.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: function Config_Factory() {
          return new Config();
        },
        token: Config,
        providedIn: "root"
      });
      var ConfigToken = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('USERCONFIG');

      var getConfig = function getConfig() {
        if (typeof window !== 'undefined') {
          var Ionic = window.Ionic;

          if (Ionic && Ionic.config) {
            return Ionic.config;
          }
        }

        return null;
      };

      var ɵ0$3 = getConfig;
      /**
       * @description
       * NavParams are an object that exists on a page and can contain data for that particular view.
       * Similar to how data was pass to a view in V1 with `$stateParams`, NavParams offer a much more flexible
       * option with a simple `get` method.
       *
       * @usage
       * ```ts
       * import { NavParams } from '@ionic/angular';
       *
       * export class MyClass{
       *
       *  constructor(navParams: NavParams){
       *    // userParams is an object we have in our nav-parameters
       *    navParams.get('userParams');
       *  }
       *
       * }
       * ```
       */

      var NavParams = /*#__PURE__*/function () {
        function NavParams() {
          var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

          _classCallCheck(this, NavParams);

          this.data = data;
        }
        /**
         * Get the value of a nav-parameter for the current view
         *
         * ```ts
         * import { NavParams } from 'ionic-angular';
         *
         * export class MyClass{
         *  constructor(public navParams: NavParams){
         *    // userParams is an object we have in our nav-parameters
         *    this.navParams.get('userParams');
         *  }
         * }
         * ```
         *
         * @param param Which param you want to look up
         */


        _createClass2(NavParams, [{
          key: "get",
          value: function get(param) {
            return this.data[param];
          }
        }]);

        return NavParams;
      }();

      var AngularDelegate = /*#__PURE__*/function () {
        function AngularDelegate(zone, appRef) {
          _classCallCheck(this, AngularDelegate);

          this.zone = zone;
          this.appRef = appRef;
        }

        _createClass2(AngularDelegate, [{
          key: "create",
          value: function create(resolver, injector, location) {
            return new AngularFrameworkDelegate(resolver, injector, location, this.appRef, this.zone);
          }
        }]);

        return AngularDelegate;
      }();

      AngularDelegate.ɵfac = function AngularDelegate_Factory(t) {
        return new (t || AngularDelegate)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"]));
      };

      AngularDelegate.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: AngularDelegate,
        factory: function factory(t) {
          return AngularDelegate.ɵfac(t);
        }
      });

      AngularDelegate.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"]
        }];
      };

      var AngularFrameworkDelegate = /*#__PURE__*/function () {
        function AngularFrameworkDelegate(resolver, injector, location, appRef, zone) {
          _classCallCheck(this, AngularFrameworkDelegate);

          this.resolver = resolver;
          this.injector = injector;
          this.location = location;
          this.appRef = appRef;
          this.zone = zone;
          this.elRefMap = new WeakMap();
          this.elEventsMap = new WeakMap();
        }

        _createClass2(AngularFrameworkDelegate, [{
          key: "attachViewToDom",
          value: function attachViewToDom(container, component, params, cssClasses) {
            var _this409 = this;

            return this.zone.run(function () {
              return new Promise(function (resolve) {
                var el = attachView(_this409.zone, _this409.resolver, _this409.injector, _this409.location, _this409.appRef, _this409.elRefMap, _this409.elEventsMap, container, component, params, cssClasses);
                resolve(el);
              });
            });
          }
        }, {
          key: "removeViewFromDom",
          value: function removeViewFromDom(_container, component) {
            var _this410 = this;

            return this.zone.run(function () {
              return new Promise(function (resolve) {
                var componentRef = _this410.elRefMap.get(component);

                if (componentRef) {
                  componentRef.destroy();

                  _this410.elRefMap["delete"](component);

                  var unbindEvents = _this410.elEventsMap.get(component);

                  if (unbindEvents) {
                    unbindEvents();

                    _this410.elEventsMap["delete"](component);
                  }
                }

                resolve();
              });
            });
          }
        }]);

        return AngularFrameworkDelegate;
      }();

      var attachView = function attachView(zone, resolver, injector, location, appRef, elRefMap, elEventsMap, container, component, params, cssClasses) {
        var factory = resolver.resolveComponentFactory(component);

        var childInjector = _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"].create({
          providers: getProviders(params),
          parent: injector
        });

        var componentRef = location ? location.createComponent(factory, location.length, childInjector) : factory.create(childInjector);
        var instance = componentRef.instance;
        var hostElement = componentRef.location.nativeElement;

        if (params) {
          Object.assign(instance, params);
        }

        if (cssClasses) {
          var _iterator48 = _createForOfIteratorHelper(cssClasses),
              _step47;

          try {
            for (_iterator48.s(); !(_step47 = _iterator48.n()).done;) {
              var clazz = _step47.value;
              hostElement.classList.add(clazz);
            }
          } catch (err) {
            _iterator48.e(err);
          } finally {
            _iterator48.f();
          }
        }

        var unbindEvents = bindLifecycleEvents(zone, instance, hostElement);
        container.appendChild(hostElement);

        if (!location) {
          appRef.attachView(componentRef.hostView);
        }

        componentRef.changeDetectorRef.reattach();
        elRefMap.set(hostElement, componentRef);
        elEventsMap.set(hostElement, unbindEvents);
        return hostElement;
      };

      var LIFECYCLES = [_ionic_core__WEBPACK_IMPORTED_MODULE_5__["LIFECYCLE_WILL_ENTER"], _ionic_core__WEBPACK_IMPORTED_MODULE_5__["LIFECYCLE_DID_ENTER"], _ionic_core__WEBPACK_IMPORTED_MODULE_5__["LIFECYCLE_WILL_LEAVE"], _ionic_core__WEBPACK_IMPORTED_MODULE_5__["LIFECYCLE_DID_LEAVE"], _ionic_core__WEBPACK_IMPORTED_MODULE_5__["LIFECYCLE_WILL_UNLOAD"]];

      var bindLifecycleEvents = function bindLifecycleEvents(zone, instance, element) {
        return zone.run(function () {
          var unregisters = LIFECYCLES.filter(function (eventName) {
            return typeof instance[eventName] === 'function';
          }).map(function (eventName) {
            var handler = function handler(ev) {
              return instance[eventName](ev.detail);
            };

            element.addEventListener(eventName, handler);
            return function () {
              return element.removeEventListener(eventName, handler);
            };
          });
          return function () {
            return unregisters.forEach(function (fn) {
              return fn();
            });
          };
        });
      };

      var NavParamsToken = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('NavParamsToken');

      var getProviders = function getProviders(params) {
        return [{
          provide: NavParamsToken,
          useValue: params
        }, {
          provide: NavParams,
          useFactory: provideNavParamsInjectable,
          deps: [NavParamsToken]
        }];
      };

      var ɵ0$4 = getProviders;

      var provideNavParamsInjectable = function provideNavParamsInjectable(params) {
        return new NavParams(params);
      };

      var ɵ1$2 = provideNavParamsInjectable;

      var _insertView = function insertView(views, view, direction) {
        if (direction === 'root') {
          return setRoot(views, view);
        } else if (direction === 'forward') {
          return setForward(views, view);
        } else {
          return setBack(views, view);
        }
      };

      var setRoot = function setRoot(views, view) {
        views = views.filter(function (v) {
          return v.stackId !== view.stackId;
        });
        views.push(view);
        return views;
      };

      var ɵ0$5 = setRoot;

      var setForward = function setForward(views, view) {
        var index = views.indexOf(view);

        if (index >= 0) {
          views = views.filter(function (v) {
            return v.stackId !== view.stackId || v.id <= view.id;
          });
        } else {
          views.push(view);
        }

        return views;
      };

      var ɵ1$3 = setForward;

      var setBack = function setBack(views, view) {
        var index = views.indexOf(view);

        if (index >= 0) {
          return views.filter(function (v) {
            return v.stackId !== view.stackId || v.id <= view.id;
          });
        } else {
          return setRoot(views, view);
        }
      };

      var ɵ2$1 = setBack;

      var getUrl = function getUrl(router, activatedRoute) {
        var urlTree = router.createUrlTree(['.'], {
          relativeTo: activatedRoute
        });
        return router.serializeUrl(urlTree);
      };

      var isTabSwitch = function isTabSwitch(enteringView, leavingView) {
        if (!leavingView) {
          return true;
        }

        return enteringView.stackId !== leavingView.stackId;
      };

      var computeStackId = function computeStackId(prefixUrl, url) {
        if (!prefixUrl) {
          return undefined;
        }

        var segments = toSegments(url);

        for (var i = 0; i < segments.length; i++) {
          if (i >= prefixUrl.length) {
            return segments[i];
          }

          if (segments[i] !== prefixUrl[i]) {
            return undefined;
          }
        }

        return undefined;
      };

      var toSegments = function toSegments(path) {
        return path.split('/').map(function (s) {
          return s.trim();
        }).filter(function (s) {
          return s !== '';
        });
      };

      var destroyView = function destroyView(view) {
        if (view) {
          // TODO lifecycle event
          view.ref.destroy();
          view.unlistenEvents();
        }
      };

      var StackController = /*#__PURE__*/function () {
        function StackController(tabsPrefix, containerEl, router, navCtrl, zone, location) {
          _classCallCheck(this, StackController);

          this.containerEl = containerEl;
          this.router = router;
          this.navCtrl = navCtrl;
          this.zone = zone;
          this.location = location;
          this.views = [];
          this.skipTransition = false;
          this.nextId = 0;
          this.tabsPrefix = tabsPrefix !== undefined ? toSegments(tabsPrefix) : undefined;
        }

        _createClass2(StackController, [{
          key: "createView",
          value: function createView(ref, activatedRoute) {
            var url = getUrl(this.router, activatedRoute);
            var element = ref && ref.location && ref.location.nativeElement;
            var unlistenEvents = bindLifecycleEvents(this.zone, ref.instance, element);
            return {
              id: this.nextId++,
              stackId: computeStackId(this.tabsPrefix, url),
              unlistenEvents: unlistenEvents,
              element: element,
              ref: ref,
              url: url
            };
          }
        }, {
          key: "getExistingView",
          value: function getExistingView(activatedRoute) {
            var activatedUrlKey = getUrl(this.router, activatedRoute);
            var view = this.views.find(function (vw) {
              return vw.url === activatedUrlKey;
            });

            if (view) {
              view.ref.changeDetectorRef.reattach();
            }

            return view;
          }
        }, {
          key: "setActive",
          value: function setActive(enteringView) {
            var _this411 = this;

            var consumeResult = this.navCtrl.consumeTransition();
            var direction = consumeResult.direction,
                animation = consumeResult.animation,
                animationBuilder = consumeResult.animationBuilder;
            var leavingView = this.activeView;
            var tabSwitch = isTabSwitch(enteringView, leavingView);

            if (tabSwitch) {
              direction = 'back';
              animation = undefined;
            }

            var viewsSnapshot = this.views.slice();
            var currentNavigation;
            var router = this.router; // Angular >= 7.2.0

            if (router.getCurrentNavigation) {
              currentNavigation = router.getCurrentNavigation(); // Angular < 7.2.0
            } else if (router.navigations && router.navigations.value) {
              currentNavigation = router.navigations.value;
            }
            /**
             * If the navigation action
             * sets `replaceUrl: true`
             * then we need to make sure
             * we remove the last item
             * from our views stack
             */


            if (currentNavigation && currentNavigation.extras && currentNavigation.extras.replaceUrl) {
              if (this.views.length > 0) {
                this.views.splice(-1, 1);
              }
            }

            var reused = this.views.includes(enteringView);
            var views = this.insertView(enteringView, direction); // Trigger change detection before transition starts
            // This will call ngOnInit() the first time too, just after the view
            // was attached to the dom, but BEFORE the transition starts

            if (!reused) {
              enteringView.ref.changeDetectorRef.detectChanges();
            }
            /**
             * If we are going back from a page that
             * was presented using a custom animation
             * we should default to using that
             * unless the developer explicitly
             * provided another animation.
             */


            var customAnimation = enteringView.animationBuilder;

            if (animationBuilder === undefined && direction === 'back' && !tabSwitch && customAnimation !== undefined) {
              animationBuilder = customAnimation;
            }
            /**
             * Save any custom animation so that navigating
             * back will use this custom animation by default.
             */


            if (leavingView) {
              leavingView.animationBuilder = animationBuilder;
            } // Wait until previous transitions finish


            return this.zone.runOutsideAngular(function () {
              return _this411.wait(function () {
                // disconnect leaving page from change detection to
                // reduce jank during the page transition
                if (leavingView) {
                  leavingView.ref.changeDetectorRef.detach();
                } // In case the enteringView is the same as the leavingPage we need to reattach()


                enteringView.ref.changeDetectorRef.reattach();
                return _this411.transition(enteringView, leavingView, animation, _this411.canGoBack(1), false, animationBuilder).then(function () {
                  return cleanupAsync(enteringView, views, viewsSnapshot, _this411.location);
                }).then(function () {
                  return {
                    enteringView: enteringView,
                    direction: direction,
                    animation: animation,
                    tabSwitch: tabSwitch
                  };
                });
              });
            });
          }
        }, {
          key: "canGoBack",
          value: function canGoBack(deep) {
            var stackId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getActiveStackId();
            return this.getStack(stackId).length > deep;
          }
        }, {
          key: "pop",
          value: function pop(deep) {
            var _this412 = this;

            var stackId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getActiveStackId();
            return this.zone.run(function () {
              var views = _this412.getStack(stackId);

              if (views.length <= deep) {
                return Promise.resolve(false);
              }

              var view = views[views.length - deep - 1];
              var url = view.url;
              var viewSavedData = view.savedData;

              if (viewSavedData) {
                var primaryOutlet = viewSavedData.get('primary');

                if (primaryOutlet && primaryOutlet.route && primaryOutlet.route._routerState && primaryOutlet.route._routerState.snapshot && primaryOutlet.route._routerState.snapshot.url) {
                  url = primaryOutlet.route._routerState.snapshot.url;
                }
              }

              var _this412$navCtrl$cons = _this412.navCtrl.consumeTransition(),
                  animationBuilder = _this412$navCtrl$cons.animationBuilder;

              return _this412.navCtrl.navigateBack(url, Object.assign({}, view.savedExtras, {
                animation: animationBuilder
              })).then(function () {
                return true;
              });
            });
          }
        }, {
          key: "startBackTransition",
          value: function startBackTransition() {
            var _this413 = this;

            var leavingView = this.activeView;

            if (leavingView) {
              var views = this.getStack(leavingView.stackId);
              var enteringView = views[views.length - 2];
              var customAnimation = enteringView.animationBuilder;
              return this.wait(function () {
                return _this413.transition(enteringView, // entering view
                leavingView, // leaving view
                'back', _this413.canGoBack(2), true, customAnimation);
              });
            }

            return Promise.resolve();
          }
        }, {
          key: "endBackTransition",
          value: function endBackTransition(shouldComplete) {
            if (shouldComplete) {
              this.skipTransition = true;
              this.pop(1);
            } else if (this.activeView) {
              cleanup(this.activeView, this.views, this.views, this.location);
            }
          }
        }, {
          key: "getLastUrl",
          value: function getLastUrl(stackId) {
            var views = this.getStack(stackId);
            return views.length > 0 ? views[views.length - 1] : undefined;
          }
          /**
           * @internal
           */

        }, {
          key: "getRootUrl",
          value: function getRootUrl(stackId) {
            var views = this.getStack(stackId);
            return views.length > 0 ? views[0] : undefined;
          }
        }, {
          key: "getActiveStackId",
          value: function getActiveStackId() {
            return this.activeView ? this.activeView.stackId : undefined;
          }
        }, {
          key: "hasRunningTask",
          value: function hasRunningTask() {
            return this.runningTask !== undefined;
          }
        }, {
          key: "destroy",
          value: function destroy() {
            this.containerEl = undefined;
            this.views.forEach(destroyView);
            this.activeView = undefined;
            this.views = [];
          }
        }, {
          key: "getStack",
          value: function getStack(stackId) {
            return this.views.filter(function (v) {
              return v.stackId === stackId;
            });
          }
        }, {
          key: "insertView",
          value: function insertView(enteringView, direction) {
            this.activeView = enteringView;
            this.views = _insertView(this.views, enteringView, direction);
            return this.views.slice();
          }
        }, {
          key: "transition",
          value: function transition(enteringView, leavingView, direction, showGoBack, progressAnimation, animationBuilder) {
            if (this.skipTransition) {
              this.skipTransition = false;
              return Promise.resolve(false);
            }

            if (leavingView === enteringView) {
              return Promise.resolve(false);
            }

            var enteringEl = enteringView ? enteringView.element : undefined;
            var leavingEl = leavingView ? leavingView.element : undefined;
            var containerEl = this.containerEl;

            if (enteringEl && enteringEl !== leavingEl) {
              enteringEl.classList.add('ion-page');
              enteringEl.classList.add('ion-page-invisible');

              if (enteringEl.parentElement !== containerEl) {
                containerEl.appendChild(enteringEl);
              }

              if (containerEl.commit) {
                return containerEl.commit(enteringEl, leavingEl, {
                  deepWait: true,
                  duration: direction === undefined ? 0 : undefined,
                  direction: direction,
                  showGoBack: showGoBack,
                  progressAnimation: progressAnimation,
                  animationBuilder: animationBuilder
                });
              }
            }

            return Promise.resolve(false);
          }
        }, {
          key: "wait",
          value: function wait(task) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee27() {
              var _this414 = this;

              var promise;
              return regeneratorRuntime.wrap(function _callee27$(_context29) {
                while (1) {
                  switch (_context29.prev = _context29.next) {
                    case 0:
                      if (!(this.runningTask !== undefined)) {
                        _context29.next = 4;
                        break;
                      }

                      _context29.next = 3;
                      return this.runningTask;

                    case 3:
                      this.runningTask = undefined;

                    case 4:
                      promise = this.runningTask = task();
                      promise["finally"](function () {
                        return _this414.runningTask = undefined;
                      });
                      return _context29.abrupt("return", promise);

                    case 7:
                    case "end":
                      return _context29.stop();
                  }
                }
              }, _callee27, this);
            }));
          }
        }]);

        return StackController;
      }();

      var cleanupAsync = function cleanupAsync(activeRoute, views, viewsSnapshot, location) {
        if (typeof requestAnimationFrame === 'function') {
          return new Promise(function (resolve) {
            requestAnimationFrame(function () {
              cleanup(activeRoute, views, viewsSnapshot, location);
              resolve();
            });
          });
        }

        return Promise.resolve();
      };

      var ɵ0$6 = cleanupAsync;

      var cleanup = function cleanup(activeRoute, views, viewsSnapshot, location) {
        viewsSnapshot.filter(function (view) {
          return !views.includes(view);
        }).forEach(destroyView);
        views.forEach(function (view) {
          /**
           * In the event that a user navigated multiple
           * times in rapid succession, we want to make sure
           * we don't pre-emptively detach a view while
           * it is in mid-transition.
           *
           * In this instance we also do not care about query
           * params or fragments as it will be the same view regardless
           */
          var locationWithoutParams = location.path().split('?')[0];
          var locationWithoutFragment = locationWithoutParams.split('#')[0];

          if (view !== activeRoute && view.url !== locationWithoutFragment) {
            var element = view.element;
            element.setAttribute('aria-hidden', 'true');
            element.classList.add('ion-page-hidden');
            view.ref.changeDetectorRef.detach();
          }
        });
      };

      var ɵ1$4 = cleanup;

      var IonRouterOutlet = /*#__PURE__*/function () {
        function IonRouterOutlet(parentContexts, location, resolver, name, tabs, config, navCtrl, commonLocation, elementRef, router, zone, activatedRoute, parentOutlet) {
          _classCallCheck(this, IonRouterOutlet);

          this.parentContexts = parentContexts;
          this.location = location;
          this.resolver = resolver;
          this.config = config;
          this.navCtrl = navCtrl;
          this.parentOutlet = parentOutlet;
          this.activated = null;
          this.activatedView = null;
          this._activatedRoute = null; // Maintain map of activated route proxies for each component instance

          this.proxyMap = new WeakMap(); // Keep the latest activated route in a subject for the proxy routes to switch map to

          this.currentActivatedRoute$ = new rxjs__WEBPACK_IMPORTED_MODULE_6__["BehaviorSubject"](null);
          this.stackEvents = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
          this.activateEvents = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
          this.deactivateEvents = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
          this.nativeEl = elementRef.nativeElement;
          this.name = name || _angular_router__WEBPACK_IMPORTED_MODULE_4__["PRIMARY_OUTLET"];
          this.tabsPrefix = tabs === 'true' ? getUrl(router, activatedRoute) : undefined;
          this.stackCtrl = new StackController(this.tabsPrefix, this.nativeEl, router, navCtrl, zone, commonLocation);
          parentContexts.onChildOutletCreated(this.name, this);
        }

        _createClass2(IonRouterOutlet, [{
          key: "animation",
          set: function set(animation) {
            this.nativeEl.animation = animation;
          }
        }, {
          key: "animated",
          set: function set(animated) {
            this.nativeEl.animated = animated;
          }
        }, {
          key: "swipeGesture",
          set: function set(swipe) {
            var _this415 = this;

            this._swipeGesture = swipe;
            this.nativeEl.swipeHandler = swipe ? {
              canStart: function canStart() {
                return _this415.stackCtrl.canGoBack(1) && !_this415.stackCtrl.hasRunningTask();
              },
              onStart: function onStart() {
                return _this415.stackCtrl.startBackTransition();
              },
              onEnd: function onEnd(shouldContinue) {
                return _this415.stackCtrl.endBackTransition(shouldContinue);
              }
            } : undefined;
          }
        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this.stackCtrl.destroy();
          }
        }, {
          key: "getContext",
          value: function getContext() {
            return this.parentContexts.getContext(this.name);
          }
        }, {
          key: "ngOnInit",
          value: function ngOnInit() {
            var _this416 = this;

            if (!this.activated) {
              // If the outlet was not instantiated at the time the route got activated we need to populate
              // the outlet when it is initialized (ie inside a NgIf)
              var context = this.getContext();

              if (context && context.route) {
                this.activateWith(context.route, context.resolver || null);
              }
            }

            new Promise(function (resolve) {
              return Object(_ionic_core__WEBPACK_IMPORTED_MODULE_5__["componentOnReady"])(_this416.nativeEl, resolve);
            }).then(function () {
              if (_this416._swipeGesture === undefined) {
                _this416.swipeGesture = _this416.config.getBoolean('swipeBackEnabled', _this416.nativeEl.mode === 'ios');
              }
            });
          }
        }, {
          key: "isActivated",
          get: function get() {
            return !!this.activated;
          }
        }, {
          key: "component",
          get: function get() {
            if (!this.activated) {
              throw new Error('Outlet is not activated');
            }

            return this.activated.instance;
          }
        }, {
          key: "activatedRoute",
          get: function get() {
            if (!this.activated) {
              throw new Error('Outlet is not activated');
            }

            return this._activatedRoute;
          }
        }, {
          key: "activatedRouteData",
          get: function get() {
            if (this._activatedRoute) {
              return this._activatedRoute.snapshot.data;
            }

            return {};
          }
          /**
           * Called when the `RouteReuseStrategy` instructs to detach the subtree
           */

        }, {
          key: "detach",
          value: function detach() {
            throw new Error('incompatible reuse strategy');
          }
          /**
           * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
           */

        }, {
          key: "attach",
          value: function attach(_ref, _activatedRoute) {
            throw new Error('incompatible reuse strategy');
          }
        }, {
          key: "deactivate",
          value: function deactivate() {
            if (this.activated) {
              if (this.activatedView) {
                var context = this.getContext();
                this.activatedView.savedData = new Map(context.children['contexts']);
                /**
                 * Angular v11.2.10 introduced a change
                 * where this route context is cleared out when
                 * a router-outlet is deactivated, However,
                 * we need this route information in order to
                 * return a user back to the correct tab when
                 * leaving and then going back to the tab context.
                 */

                var primaryOutlet = this.activatedView.savedData.get('primary');

                if (primaryOutlet && context.route) {
                  primaryOutlet.route = Object.assign({}, context.route);
                }
                /**
                 * Ensure we are saving the NavigationExtras
                 * data otherwise it will be lost
                 */


                this.activatedView.savedExtras = {};

                if (context.route) {
                  var contextSnapshot = context.route.snapshot;
                  this.activatedView.savedExtras.queryParams = contextSnapshot.queryParams;
                  this.activatedView.savedExtras.fragment = contextSnapshot.fragment;
                }
              }

              var c = this.component;
              this.activatedView = null;
              this.activated = null;
              this._activatedRoute = null;
              this.deactivateEvents.emit(c);
            }
          }
        }, {
          key: "activateWith",
          value: function activateWith(activatedRoute, resolver) {
            var _this417 = this;

            if (this.isActivated) {
              throw new Error('Cannot activate an already activated outlet');
            }

            this._activatedRoute = activatedRoute;
            var cmpRef;
            var enteringView = this.stackCtrl.getExistingView(activatedRoute);

            if (enteringView) {
              cmpRef = this.activated = enteringView.ref;
              var saved = enteringView.savedData;

              if (saved) {
                // self-restore
                var context = this.getContext();
                context.children['contexts'] = saved;
              } // Updated activated route proxy for this component


              this.updateActivatedRouteProxy(cmpRef.instance, activatedRoute);
            } else {
              var snapshot = activatedRoute._futureSnapshot;
              var component = snapshot.routeConfig.component;
              resolver = resolver || this.resolver;
              var factory = resolver.resolveComponentFactory(component);
              var childContexts = this.parentContexts.getOrCreateContext(this.name).children; // We create an activated route proxy object that will maintain future updates for this component
              // over its lifecycle in the stack.

              var component$ = new rxjs__WEBPACK_IMPORTED_MODULE_6__["BehaviorSubject"](null);
              var activatedRouteProxy = this.createActivatedRouteProxy(component$, activatedRoute);
              var injector = new OutletInjector(activatedRouteProxy, childContexts, this.location.injector);
              cmpRef = this.activated = this.location.createComponent(factory, this.location.length, injector); // Once the component is created we can push it to our local subject supplied to the proxy

              component$.next(cmpRef.instance); // Calling `markForCheck` to make sure we will run the change detection when the
              // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.

              enteringView = this.stackCtrl.createView(this.activated, activatedRoute); // Store references to the proxy by component

              this.proxyMap.set(cmpRef.instance, activatedRouteProxy);
              this.currentActivatedRoute$.next({
                component: cmpRef.instance,
                activatedRoute: activatedRoute
              });
            }

            this.activatedView = enteringView;
            this.stackCtrl.setActive(enteringView).then(function (data) {
              _this417.navCtrl.setTopOutlet(_this417);

              _this417.activateEvents.emit(cmpRef.instance);

              _this417.stackEvents.emit(data);
            });
          }
          /**
           * Returns `true` if there are pages in the stack to go back.
           */

        }, {
          key: "canGoBack",
          value: function canGoBack() {
            var deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
            var stackId = arguments.length > 1 ? arguments[1] : undefined;
            return this.stackCtrl.canGoBack(deep, stackId);
          }
          /**
           * Resolves to `true` if it the outlet was able to sucessfully pop the last N pages.
           */

        }, {
          key: "pop",
          value: function pop() {
            var deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
            var stackId = arguments.length > 1 ? arguments[1] : undefined;
            return this.stackCtrl.pop(deep, stackId);
          }
          /**
           * Returns the URL of the active page of each stack.
           */

        }, {
          key: "getLastUrl",
          value: function getLastUrl(stackId) {
            var active = this.stackCtrl.getLastUrl(stackId);
            return active ? active.url : undefined;
          }
          /**
           * Returns the RouteView of the active page of each stack.
           * @internal
           */

        }, {
          key: "getLastRouteView",
          value: function getLastRouteView(stackId) {
            return this.stackCtrl.getLastUrl(stackId);
          }
          /**
           * Returns the root view in the tab stack.
           * @internal
           */

        }, {
          key: "getRootView",
          value: function getRootView(stackId) {
            return this.stackCtrl.getRootUrl(stackId);
          }
          /**
           * Returns the active stack ID. In the context of ion-tabs, it means the active tab.
           */

        }, {
          key: "getActiveStackId",
          value: function getActiveStackId() {
            return this.stackCtrl.getActiveStackId();
          }
          /**
           * Since the activated route can change over the life time of a component in an ion router outlet, we create
           * a proxy so that we can update the values over time as a user navigates back to components already in the stack.
           */

        }, {
          key: "createActivatedRouteProxy",
          value: function createActivatedRouteProxy(component$, activatedRoute) {
            var proxy = new _angular_router__WEBPACK_IMPORTED_MODULE_4__["ActivatedRoute"]();
            proxy._futureSnapshot = activatedRoute._futureSnapshot;
            proxy._routerState = activatedRoute._routerState;
            proxy.snapshot = activatedRoute.snapshot;
            proxy.outlet = activatedRoute.outlet;
            proxy.component = activatedRoute.component; // Setup wrappers for the observables so consumers don't have to worry about switching to new observables as the state updates

            proxy._paramMap = this.proxyObservable(component$, 'paramMap');
            proxy._queryParamMap = this.proxyObservable(component$, 'queryParamMap');
            proxy.url = this.proxyObservable(component$, 'url');
            proxy.params = this.proxyObservable(component$, 'params');
            proxy.queryParams = this.proxyObservable(component$, 'queryParams');
            proxy.fragment = this.proxyObservable(component$, 'fragment');
            proxy.data = this.proxyObservable(component$, 'data');
            return proxy;
          }
          /**
           * Create a wrapped observable that will switch to the latest activated route matched by the given component
           */

        }, {
          key: "proxyObservable",
          value: function proxyObservable(component$, path) {
            var _this418 = this;

            return component$.pipe( // First wait until the component instance is pushed
            Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["filter"])(function (component) {
              return !!component;
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["switchMap"])(function (component) {
              return _this418.currentActivatedRoute$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["filter"])(function (current) {
                return current !== null && current.component === component;
              }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["switchMap"])(function (current) {
                return current && current.activatedRoute[path];
              }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["distinctUntilChanged"])());
            }));
          }
          /**
           * Updates the activated route proxy for the given component to the new incoming router state
           */

        }, {
          key: "updateActivatedRouteProxy",
          value: function updateActivatedRouteProxy(component, activatedRoute) {
            var proxy = this.proxyMap.get(component);

            if (!proxy) {
              throw new Error("Could not find activated route proxy for view");
            }

            proxy._futureSnapshot = activatedRoute._futureSnapshot;
            proxy._routerState = activatedRoute._routerState;
            proxy.snapshot = activatedRoute.snapshot;
            proxy.outlet = activatedRoute.outlet;
            proxy.component = activatedRoute.component;
            this.currentActivatedRoute$.next({
              component: component,
              activatedRoute: activatedRoute
            });
          }
        }]);

        return IonRouterOutlet;
      }();

      IonRouterOutlet.ɵfac = function IonRouterOutlet_Factory(t) {
        return new (t || IonRouterOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_4__["ChildrenOutletContexts"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinjectAttribute"]('name'), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinjectAttribute"]('tabs'), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](Config), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](NavController), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_common__WEBPACK_IMPORTED_MODULE_3__["Location"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_4__["ActivatedRoute"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](IonRouterOutlet, 12));
      };

      IonRouterOutlet.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: IonRouterOutlet,
        selectors: [["ion-router-outlet"]],
        inputs: {
          animated: "animated",
          animation: "animation",
          swipeGesture: "swipeGesture"
        },
        outputs: {
          stackEvents: "stackEvents",
          activateEvents: "activate",
          deactivateEvents: "deactivate"
        },
        exportAs: ["outlet"]
      });

      IonRouterOutlet.ctorParameters = function () {
        return [{
          type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["ChildrenOutletContexts"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"],
            args: ['name']
          }]
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"],
            args: ['tabs']
          }]
        }, {
          type: Config
        }, {
          type: NavController
        }, {
          type: _angular_common__WEBPACK_IMPORTED_MODULE_3__["Location"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }, {
          type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["ActivatedRoute"]
        }, {
          type: IonRouterOutlet,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
          }]
        }];
      };

      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])()], IonRouterOutlet.prototype, "stackEvents", void 0);
      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])('activate')], IonRouterOutlet.prototype, "activateEvents", void 0);
      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])('deactivate')], IonRouterOutlet.prototype, "deactivateEvents", void 0);
      IonRouterOutlet = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(3, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"])('name')), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(4, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"])()), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(4, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"])('tabs')), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(12, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"])()), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(12, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"])())], IonRouterOutlet);

      var OutletInjector = /*#__PURE__*/function () {
        function OutletInjector(route, childContexts, parent) {
          _classCallCheck(this, OutletInjector);

          this.route = route;
          this.childContexts = childContexts;
          this.parent = parent;
        }

        _createClass2(OutletInjector, [{
          key: "get",
          value: function get(token, notFoundValue) {
            if (token === _angular_router__WEBPACK_IMPORTED_MODULE_4__["ActivatedRoute"]) {
              return this.route;
            }

            if (token === _angular_router__WEBPACK_IMPORTED_MODULE_4__["ChildrenOutletContexts"]) {
              return this.childContexts;
            } // tslint:disable-next-line


            return this.parent.get(token, notFoundValue);
          }
        }]);

        return OutletInjector;
      }();

      var IonTabs = /*#__PURE__*/function () {
        function IonTabs(navCtrl) {
          _classCallCheck(this, IonTabs);

          this.navCtrl = navCtrl;
          this.ionTabsWillChange = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
          this.ionTabsDidChange = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        }
        /**
         * @internal
         */


        _createClass2(IonTabs, [{
          key: "onPageSelected",
          value: function onPageSelected(detail) {
            var stackId = detail.enteringView.stackId;

            if (detail.tabSwitch && stackId !== undefined) {
              if (this.tabBar) {
                this.tabBar.selectedTab = stackId;
              }

              this.ionTabsWillChange.emit({
                tab: stackId
              });
              this.ionTabsDidChange.emit({
                tab: stackId
              });
            }
          }
          /**
           * When a tab button is clicked, there are several scenarios:
           * 1. If the selected tab is currently active (the tab button has been clicked
           *    again), then it should go to the root view for that tab.
           *
           *   a. Get the saved root view from the router outlet. If the saved root view
           *      matches the tabRootUrl, set the route view to this view including the
           *      navigation extras.
           *   b. If the saved root view from the router outlet does
           *      not match, navigate to the tabRootUrl. No navigation extras are
           *      included.
           *
           * 2. If the current tab tab is not currently selected, get the last route
           *    view from the router outlet.
           *
           *   a. If the last route view exists, navigate to that view including any
           *      navigation extras
           *   b. If the last route view doesn't exist, then navigate
           *      to the default tabRootUrl
           */

        }, {
          key: "select",
          value: function select(tabOrEvent) {
            var isTabString = typeof tabOrEvent === 'string';
            var tab = isTabString ? tabOrEvent : tabOrEvent.detail.tab;
            var alreadySelected = this.outlet.getActiveStackId() === tab;
            var tabRootUrl = "".concat(this.outlet.tabsPrefix, "/").concat(tab);
            /**
             * If this is a nested tab, prevent the event
             * from bubbling otherwise the outer tabs
             * will respond to this event too, causing
             * the app to get directed to the wrong place.
             */

            if (!isTabString) {
              tabOrEvent.stopPropagation();
            }

            if (alreadySelected) {
              var activeStackId = this.outlet.getActiveStackId();
              var activeView = this.outlet.getLastRouteView(activeStackId); // If on root tab, do not navigate to root tab again

              if (activeView.url === tabRootUrl) {
                return;
              }

              var rootView = this.outlet.getRootView(tab);
              var navigationExtras = rootView && tabRootUrl === rootView.url && rootView.savedExtras;
              return this.navCtrl.navigateRoot(tabRootUrl, Object.assign({}, navigationExtras, {
                animated: true,
                animationDirection: 'back'
              }));
            } else {
              var lastRoute = this.outlet.getLastRouteView(tab);
              /**
               * If there is a lastRoute, goto that, otherwise goto the fallback url of the
               * selected tab
               */

              var url = lastRoute && lastRoute.url || tabRootUrl;

              var _navigationExtras = lastRoute && lastRoute.savedExtras;

              return this.navCtrl.navigateRoot(url, Object.assign({}, _navigationExtras, {
                animated: true,
                animationDirection: 'back'
              }));
            }
          }
        }, {
          key: "getSelected",
          value: function getSelected() {
            return this.outlet.getActiveStackId();
          }
        }]);

        return IonTabs;
      }();

      IonTabs.ɵfac = function IonTabs_Factory(t) {
        return new (t || IonTabs)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](NavController));
      };

      IonTabs.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonTabs,
        selectors: [["ion-tabs"]],
        contentQueries: function IonTabs_ContentQueries(rf, ctx, dirIndex) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](dirIndex, IonTabBar, true);
          }

          if (rf & 2) {
            var _t;

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.tabBar = _t.first);
          }
        },
        viewQuery: function IonTabs_Query(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵviewQuery"](_c1, true, IonRouterOutlet);
          }

          if (rf & 2) {
            var _t;

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.outlet = _t.first);
          }
        },
        hostBindings: function IonTabs_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("ionTabButtonClick", function IonTabs_ionTabButtonClick_HostBindingHandler($event) {
              return ctx.select($event);
            });
          }
        },
        outputs: {
          ionTabsWillChange: "ionTabsWillChange",
          ionTabsDidChange: "ionTabsDidChange"
        },
        ngContentSelectors: _c3,
        decls: 5,
        vars: 0,
        consts: [[1, "tabs-inner"], ["tabs", "true", 3, "stackEvents"], ["outlet", ""]],
        template: function IonTabs_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"](_c2);

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](1, "div", 0);

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](2, "ion-router-outlet", 1, 2);

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("stackEvents", function IonTabs_Template_ion_router_outlet_stackEvents_2_listener($event) {
              return ctx.onPageSelected($event);
            });

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](4, 1);
          }
        },
        directives: [IonRouterOutlet],
        styles: ["[_nghost-%COMP%] {\n      display: flex;\n      position: absolute;\n      top: 0;\n      left: 0;\n      right: 0;\n      bottom: 0;\n\n      flex-direction: column;\n\n      width: 100%;\n      height: 100%;\n\n      contain: layout size style;\n      z-index: $z-index-page-container;\n    }\n    .tabs-inner[_ngcontent-%COMP%] {\n      position: relative;\n\n      flex: 1;\n\n      contain: layout size style;\n    }"]
      });

      IonTabs.ctorParameters = function () {
        return [{
          type: NavController
        }];
      };

      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('outlet', {
        read: IonRouterOutlet,
        "static": false
      })], IonTabs.prototype, "outlet", void 0);
      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChild"])(IonTabBar, {
        "static": false
      })], IonTabs.prototype, "tabBar", void 0);
      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])()], IonTabs.prototype, "ionTabsWillChange", void 0);
      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])()], IonTabs.prototype, "ionTabsDidChange", void 0);
      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('ionTabButtonClick', ['$event'])], IonTabs.prototype, "select", null);

      var IonBackButtonDelegate = /*#__PURE__*/function () {
        function IonBackButtonDelegate(routerOutlet, navCtrl, config) {
          _classCallCheck(this, IonBackButtonDelegate);

          this.routerOutlet = routerOutlet;
          this.navCtrl = navCtrl;
          this.config = config;
        }
        /**
         * @internal
         */


        _createClass2(IonBackButtonDelegate, [{
          key: "onClick",
          value: function onClick(ev) {
            var defaultHref = this.defaultHref || this.config.get('backButtonDefaultHref');

            if (this.routerOutlet && this.routerOutlet.canGoBack()) {
              this.navCtrl.setDirection('back', undefined, undefined, this.routerAnimation);
              this.routerOutlet.pop();
              ev.preventDefault();
            } else if (defaultHref != null) {
              this.navCtrl.navigateBack(defaultHref, {
                animation: this.routerAnimation
              });
              ev.preventDefault();
            }
          }
        }]);

        return IonBackButtonDelegate;
      }();

      IonBackButtonDelegate.ɵfac = function IonBackButtonDelegate_Factory(t) {
        return new (t || IonBackButtonDelegate)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](IonRouterOutlet, 8), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](NavController), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](Config));
      };

      IonBackButtonDelegate.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: IonBackButtonDelegate,
        selectors: [["ion-back-button"]],
        hostBindings: function IonBackButtonDelegate_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function IonBackButtonDelegate_click_HostBindingHandler($event) {
              return ctx.onClick($event);
            });
          }
        },
        inputs: {
          defaultHref: "defaultHref",
          routerAnimation: "routerAnimation"
        }
      });

      IonBackButtonDelegate.ctorParameters = function () {
        return [{
          type: IonRouterOutlet,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
          }]
        }, {
          type: NavController
        }, {
          type: Config
        }];
      };

      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('click', ['$event'])], IonBackButtonDelegate.prototype, "onClick", null);
      IonBackButtonDelegate = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"])())], IonBackButtonDelegate);

      var NavDelegate = function NavDelegate(ref, resolver, injector, angularDelegate, location) {
        _classCallCheck(this, NavDelegate);

        this.el = ref.nativeElement;
        ref.nativeElement.delegate = angularDelegate.create(resolver, injector, location);
        proxyOutputs(this, this.el, ['ionNavDidChange', 'ionNavWillChange']);
      };

      NavDelegate.ɵfac = function NavDelegate_Factory(t) {
        return new (t || NavDelegate)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](AngularDelegate), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]));
      };

      NavDelegate.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: NavDelegate,
        selectors: [["ion-nav"]]
      });

      NavDelegate.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
        }, {
          type: AngularDelegate
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]
        }];
      };

      NavDelegate = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ['animated', 'animation', 'root', 'rootParams', 'swipeGesture'],
        methods: ['push', 'insert', 'insertPages', 'pop', 'popTo', 'popToRoot', 'removeIndex', 'setRoot', 'setPages', 'getActive', 'getByIndex', 'canGoBack', 'getPrevious']
      })], NavDelegate);

      var RouterLinkDelegate = /*#__PURE__*/function () {
        function RouterLinkDelegate(locationStrategy, navCtrl, elementRef, router, routerLink) {
          _classCallCheck(this, RouterLinkDelegate);

          this.locationStrategy = locationStrategy;
          this.navCtrl = navCtrl;
          this.elementRef = elementRef;
          this.router = router;
          this.routerLink = routerLink;
          this.routerDirection = 'forward';
        }

        _createClass2(RouterLinkDelegate, [{
          key: "ngOnInit",
          value: function ngOnInit() {
            this.updateTargetUrlAndHref();
          }
        }, {
          key: "ngOnChanges",
          value: function ngOnChanges() {
            this.updateTargetUrlAndHref();
          }
        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            if (this.subscription) {
              this.subscription.unsubscribe();
            }
          }
        }, {
          key: "updateTargetUrlAndHref",
          value: function updateTargetUrlAndHref() {
            if (this.routerLink) {
              var href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLink.urlTree));
              this.elementRef.nativeElement.href = href;
            }
          }
          /**
           * @internal
           */

        }, {
          key: "onClick",
          value: function onClick(ev) {
            this.navCtrl.setDirection(this.routerDirection, undefined, undefined, this.routerAnimation);
            ev.preventDefault();
          }
        }]);

        return RouterLinkDelegate;
      }();

      RouterLinkDelegate.ɵfac = function RouterLinkDelegate_Factory(t) {
        return new (t || RouterLinkDelegate)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_common__WEBPACK_IMPORTED_MODULE_3__["LocationStrategy"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](NavController), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterLink"], 8));
      };

      RouterLinkDelegate.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: RouterLinkDelegate,
        selectors: [["", "routerLink", ""]],
        hostBindings: function RouterLinkDelegate_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function RouterLinkDelegate_click_HostBindingHandler($event) {
              return ctx.onClick($event);
            });
          }
        },
        inputs: {
          routerDirection: "routerDirection",
          routerAnimation: "routerAnimation"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]]
      });

      RouterLinkDelegate.ctorParameters = function () {
        return [{
          type: _angular_common__WEBPACK_IMPORTED_MODULE_3__["LocationStrategy"]
        }, {
          type: NavController
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"]
        }, {
          type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterLink"],
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
          }]
        }];
      };

      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"])('click', ['$event'])], RouterLinkDelegate.prototype, "onClick", null);
      RouterLinkDelegate = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__param"])(4, Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"])())], RouterLinkDelegate);
      /**
       * @hidden
       */

      var VirtualFooter = function VirtualFooter(templateRef) {
        _classCallCheck(this, VirtualFooter);

        this.templateRef = templateRef;
      };

      VirtualFooter.ɵfac = function VirtualFooter_Factory(t) {
        return new (t || VirtualFooter)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"]));
      };

      VirtualFooter.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: VirtualFooter,
        selectors: [["", "virtualFooter", ""]]
      });

      VirtualFooter.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"]
        }];
      };
      /**
       * @hidden
       */


      var VirtualHeader = function VirtualHeader(templateRef) {
        _classCallCheck(this, VirtualHeader);

        this.templateRef = templateRef;
      };

      VirtualHeader.ɵfac = function VirtualHeader_Factory(t) {
        return new (t || VirtualHeader)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"]));
      };

      VirtualHeader.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: VirtualHeader,
        selectors: [["", "virtualHeader", ""]]
      });

      VirtualHeader.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"]
        }];
      };
      /**
       * @hidden
       */


      var VirtualItem = function VirtualItem(templateRef, viewContainer) {
        _classCallCheck(this, VirtualItem);

        this.templateRef = templateRef;
        this.viewContainer = viewContainer;
      };

      VirtualItem.ɵfac = function VirtualItem_Factory(t) {
        return new (t || VirtualItem)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]));
      };

      VirtualItem.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: VirtualItem,
        selectors: [["", "virtualItem", ""]]
      });

      VirtualItem.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]
        }];
      };

      var IonVirtualScroll = /*#__PURE__*/function () {
        function IonVirtualScroll(z, iterableDiffers, elementRef) {
          _classCallCheck(this, IonVirtualScroll);

          this.z = z;
          this.iterableDiffers = iterableDiffers;
          this.refMap = new WeakMap();
          this.el = elementRef.nativeElement;
          this.el.nodeRender = this.nodeRender.bind(this);
        }

        _createClass2(IonVirtualScroll, [{
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            if (this.trackBy && 'items' in changes) {
              // React on virtualScroll changes only once all inputs have been initialized
              var value = changes['items'].currentValue;

              if (this.differ === undefined && value != null) {
                try {
                  this.differ = this.iterableDiffers.find(value).create(this.trackBy);
                } catch (e) {
                  throw new Error("Cannot find a differ supporting object '".concat(value, "'. VirtualScroll only supports binding to Iterables such as Arrays."));
                }
              }
            }
          }
        }, {
          key: "ngDoCheck",
          value: function ngDoCheck() {
            // and if there actually are changes
            var changes = this.differ !== undefined && this.items ? this.differ.diff(this.items) : null;

            if (changes === null) {
              return;
            } // TODO: optimize


            this.checkRange(0);
          }
        }, {
          key: "nodeRender",
          value: function nodeRender(el, cell, index) {
            var _this419 = this;

            return this.z.run(function () {
              var node;

              if (!el) {
                node = _this419.itmTmp.viewContainer.createEmbeddedView(_this419.getComponent(cell.type), {
                  $implicit: cell.value,
                  index: index
                }, index);
                el = getElement(node);

                _this419.refMap.set(el, node);
              } else {
                node = _this419.refMap.get(el);
                var ctx = node.context;
                ctx.$implicit = cell.value;
                ctx.index = cell.index;
              } // run sync change detections


              node.detectChanges();
              return el;
            });
          }
        }, {
          key: "getComponent",
          value: function getComponent(type) {
            switch (type) {
              case 'item':
                return this.itmTmp.templateRef;

              case 'header':
                return this.hdrTmp.templateRef;

              case 'footer':
                return this.ftrTmp.templateRef;
            }

            throw new Error('template for virtual item was not provided');
          }
        }]);

        return IonVirtualScroll;
      }();

      IonVirtualScroll.ɵfac = function IonVirtualScroll_Factory(t) {
        return new (t || IonVirtualScroll)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["IterableDiffers"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]));
      };

      IonVirtualScroll.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: IonVirtualScroll,
        selectors: [["ion-virtual-scroll"]],
        contentQueries: function IonVirtualScroll_ContentQueries(rf, ctx, dirIndex) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](dirIndex, VirtualItem, true);

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](dirIndex, VirtualHeader, true);

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](dirIndex, VirtualFooter, true);
          }

          if (rf & 2) {
            var _t;

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.itmTmp = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.hdrTmp = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.ftrTmp = _t.first);
          }
        },
        inputs: {
          approxItemHeight: "approxItemHeight",
          approxHeaderHeight: "approxHeaderHeight",
          approxFooterHeight: "approxFooterHeight",
          headerFn: "headerFn",
          footerFn: "footerFn",
          items: "items",
          itemHeight: "itemHeight",
          headerHeight: "headerHeight",
          footerHeight: "footerHeight",
          trackBy: "trackBy"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]],
        ngContentSelectors: _c0,
        decls: 1,
        vars: 0,
        template: function IonVirtualScroll_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      IonVirtualScroll.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["IterableDiffers"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }];
      };

      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChild"])(VirtualItem, {
        "static": false
      })], IonVirtualScroll.prototype, "itmTmp", void 0);
      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChild"])(VirtualHeader, {
        "static": false
      })], IonVirtualScroll.prototype, "hdrTmp", void 0);
      Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChild"])(VirtualFooter, {
        "static": false
      })], IonVirtualScroll.prototype, "ftrTmp", void 0);
      IonVirtualScroll = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ProxyCmp({
        inputs: ['approxItemHeight', 'approxHeaderHeight', 'approxFooterHeight', 'headerFn', 'footerFn', 'items', 'itemHeight', 'headerHeight', 'footerHeight'],
        methods: ['checkEnd', 'checkRange', 'positionForItem']
      })], IonVirtualScroll);

      var getElement = function getElement(view) {
        var rootNodes = view.rootNodes;

        for (var i = 0; i < rootNodes.length; i++) {
          if (rootNodes[i].nodeType === 1) {
            return rootNodes[i];
          }
        }

        throw new Error('virtual element was not created');
      };

      var ɵ0$7 = getElement;

      var OverlayBaseController = /*#__PURE__*/function () {
        function OverlayBaseController(ctrl) {
          _classCallCheck(this, OverlayBaseController);

          this.ctrl = ctrl;
        }
        /**
         * Creates a new overlay
         */


        _createClass2(OverlayBaseController, [{
          key: "create",
          value: function create(opts) {
            // TODO: next major release opts is not optional
            return this.ctrl.create(opts || {});
          }
          /**
           * When `id` is not provided, it dismisses the top overlay.
           */

        }, {
          key: "dismiss",
          value: function dismiss(data, role, id) {
            return this.ctrl.dismiss(data, role, id);
          }
          /**
           * Returns the top overlay.
           */

        }, {
          key: "getTop",
          value: function getTop() {
            return this.ctrl.getTop();
          }
        }]);

        return OverlayBaseController;
      }();

      var ActionSheetController = /*#__PURE__*/function (_OverlayBaseControlle) {
        _inherits(ActionSheetController, _OverlayBaseControlle);

        var _super186 = _createSuper(ActionSheetController);

        function ActionSheetController() {
          _classCallCheck(this, ActionSheetController);

          return _super186.call(this, _ionic_core__WEBPACK_IMPORTED_MODULE_5__["actionSheetController"]);
        }

        return ActionSheetController;
      }(OverlayBaseController);

      ActionSheetController.ɵfac = function ActionSheetController_Factory(t) {
        return new (t || ActionSheetController)();
      };

      ActionSheetController.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: ActionSheetController,
        factory: function factory(t) {
          return ActionSheetController.ɵfac(t);
        },
        providedIn: 'root'
      });
      ActionSheetController.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: function ActionSheetController_Factory() {
          return new ActionSheetController();
        },
        token: ActionSheetController,
        providedIn: "root"
      });

      var AlertController = /*#__PURE__*/function (_OverlayBaseControlle2) {
        _inherits(AlertController, _OverlayBaseControlle2);

        var _super187 = _createSuper(AlertController);

        function AlertController() {
          _classCallCheck(this, AlertController);

          return _super187.call(this, _ionic_core__WEBPACK_IMPORTED_MODULE_5__["alertController"]);
        }

        return AlertController;
      }(OverlayBaseController);

      AlertController.ɵfac = function AlertController_Factory(t) {
        return new (t || AlertController)();
      };

      AlertController.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: AlertController,
        factory: function factory(t) {
          return AlertController.ɵfac(t);
        },
        providedIn: 'root'
      });
      AlertController.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: function AlertController_Factory() {
          return new AlertController();
        },
        token: AlertController,
        providedIn: "root"
      });

      var LoadingController = /*#__PURE__*/function (_OverlayBaseControlle3) {
        _inherits(LoadingController, _OverlayBaseControlle3);

        var _super188 = _createSuper(LoadingController);

        function LoadingController() {
          _classCallCheck(this, LoadingController);

          return _super188.call(this, _ionic_core__WEBPACK_IMPORTED_MODULE_5__["loadingController"]);
        }

        return LoadingController;
      }(OverlayBaseController);

      LoadingController.ɵfac = function LoadingController_Factory(t) {
        return new (t || LoadingController)();
      };

      LoadingController.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: LoadingController,
        factory: function factory(t) {
          return LoadingController.ɵfac(t);
        },
        providedIn: 'root'
      });
      LoadingController.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: function LoadingController_Factory() {
          return new LoadingController();
        },
        token: LoadingController,
        providedIn: "root"
      });

      var MenuController = /*#__PURE__*/function () {
        function MenuController() {
          _classCallCheck(this, MenuController);
        }

        _createClass2(MenuController, [{
          key: "open",
          value:
          /**
           * Programmatically open the Menu.
           * @param [menuId]  Optionally get the menu by its id, or side.
           * @return returns a promise when the menu is fully opened
           */
          function open(menuId) {
            return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["menuController"].open(menuId);
          }
          /**
           * Programmatically close the Menu. If no `menuId` is given as the first
           * argument then it'll close any menu which is open. If a `menuId`
           * is given then it'll close that exact menu.
           * @param [menuId]  Optionally get the menu by its id, or side.
           * @return returns a promise when the menu is fully closed
           */

        }, {
          key: "close",
          value: function close(menuId) {
            return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["menuController"].close(menuId);
          }
          /**
           * Toggle the menu. If it's closed, it will open, and if opened, it
           * will close.
           * @param [menuId]  Optionally get the menu by its id, or side.
           * @return returns a promise when the menu has been toggled
           */

        }, {
          key: "toggle",
          value: function toggle(menuId) {
            return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["menuController"].toggle(menuId);
          }
          /**
           * Used to enable or disable a menu. For example, there could be multiple
           * left menus, but only one of them should be able to be opened at the same
           * time. If there are multiple menus on the same side, then enabling one menu
           * will also automatically disable all the others that are on the same side.
           * @param [menuId]  Optionally get the menu by its id, or side.
           * @return Returns the instance of the menu, which is useful for chaining.
           */

        }, {
          key: "enable",
          value: function enable(shouldEnable, menuId) {
            return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["menuController"].enable(shouldEnable, menuId);
          }
          /**
           * Used to enable or disable the ability to swipe open the menu.
           * @param shouldEnable  True if it should be swipe-able, false if not.
           * @param [menuId]  Optionally get the menu by its id, or side.
           * @return Returns the instance of the menu, which is useful for chaining.
           */

        }, {
          key: "swipeGesture",
          value: function swipeGesture(shouldEnable, menuId) {
            return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["menuController"].swipeGesture(shouldEnable, menuId);
          }
          /**
           * @param [menuId] Optionally get the menu by its id, or side.
           * @return Returns true if the specified menu is currently open, otherwise false.
           * If the menuId is not specified, it returns true if ANY menu is currenly open.
           */

        }, {
          key: "isOpen",
          value: function isOpen(menuId) {
            return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["menuController"].isOpen(menuId);
          }
          /**
           * @param [menuId]  Optionally get the menu by its id, or side.
           * @return Returns true if the menu is currently enabled, otherwise false.
           */

        }, {
          key: "isEnabled",
          value: function isEnabled(menuId) {
            return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["menuController"].isEnabled(menuId);
          }
          /**
           * Used to get a menu instance. If a `menuId` is not provided then it'll
           * return the first menu found. If a `menuId` is `left` or `right`, then
           * it'll return the enabled menu on that side. Otherwise, if a `menuId` is
           * provided, then it'll try to find the menu using the menu's `id`
           * property. If a menu is not found then it'll return `null`.
           * @param [menuId]  Optionally get the menu by its id, or side.
           * @return Returns the instance of the menu if found, otherwise `null`.
           */

        }, {
          key: "get",
          value: function get(menuId) {
            return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["menuController"].get(menuId);
          }
          /**
           * @return Returns the instance of the menu already opened, otherwise `null`.
           */

        }, {
          key: "getOpen",
          value: function getOpen() {
            return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["menuController"].getOpen();
          }
          /**
           * @return Returns an array of all menu instances.
           */

        }, {
          key: "getMenus",
          value: function getMenus() {
            return _ionic_core__WEBPACK_IMPORTED_MODULE_5__["menuController"].getMenus();
          }
        }]);

        return MenuController;
      }();

      MenuController.ɵfac = function MenuController_Factory(t) {
        return new (t || MenuController)();
      };

      MenuController.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: MenuController,
        factory: function factory(t) {
          return MenuController.ɵfac(t);
        },
        providedIn: 'root'
      });
      MenuController.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: function MenuController_Factory() {
          return new MenuController();
        },
        token: MenuController,
        providedIn: "root"
      });

      var PickerController = /*#__PURE__*/function (_OverlayBaseControlle4) {
        _inherits(PickerController, _OverlayBaseControlle4);

        var _super189 = _createSuper(PickerController);

        function PickerController() {
          _classCallCheck(this, PickerController);

          return _super189.call(this, _ionic_core__WEBPACK_IMPORTED_MODULE_5__["pickerController"]);
        }

        return PickerController;
      }(OverlayBaseController);

      PickerController.ɵfac = function PickerController_Factory(t) {
        return new (t || PickerController)();
      };

      PickerController.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: PickerController,
        factory: function factory(t) {
          return PickerController.ɵfac(t);
        },
        providedIn: 'root'
      });
      PickerController.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: function PickerController_Factory() {
          return new PickerController();
        },
        token: PickerController,
        providedIn: "root"
      });

      var ModalController = /*#__PURE__*/function (_OverlayBaseControlle5) {
        _inherits(ModalController, _OverlayBaseControlle5);

        var _super190 = _createSuper(ModalController);

        function ModalController(angularDelegate, resolver, injector) {
          var _this420;

          _classCallCheck(this, ModalController);

          _this420 = _super190.call(this, _ionic_core__WEBPACK_IMPORTED_MODULE_5__["modalController"]);
          _this420.angularDelegate = angularDelegate;
          _this420.resolver = resolver;
          _this420.injector = injector;
          return _this420;
        }

        _createClass2(ModalController, [{
          key: "create",
          value: function create(opts) {
            return _get(_getPrototypeOf(ModalController.prototype), "create", this).call(this, Object.assign({}, opts, {
              delegate: this.angularDelegate.create(this.resolver, this.injector)
            }));
          }
        }]);

        return ModalController;
      }(OverlayBaseController);

      ModalController.ɵfac = function ModalController_Factory(t) {
        return new (t || ModalController)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](AngularDelegate), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]));
      };

      ModalController.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: ModalController,
        factory: function factory(t) {
          return ModalController.ɵfac(t);
        }
      });

      ModalController.ctorParameters = function () {
        return [{
          type: AngularDelegate
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
        }];
      };

      var PopoverController = /*#__PURE__*/function (_OverlayBaseControlle6) {
        _inherits(PopoverController, _OverlayBaseControlle6);

        var _super191 = _createSuper(PopoverController);

        function PopoverController(angularDelegate, resolver, injector) {
          var _this421;

          _classCallCheck(this, PopoverController);

          _this421 = _super191.call(this, _ionic_core__WEBPACK_IMPORTED_MODULE_5__["popoverController"]);
          _this421.angularDelegate = angularDelegate;
          _this421.resolver = resolver;
          _this421.injector = injector;
          return _this421;
        }

        _createClass2(PopoverController, [{
          key: "create",
          value: function create(opts) {
            return _get(_getPrototypeOf(PopoverController.prototype), "create", this).call(this, Object.assign({}, opts, {
              delegate: this.angularDelegate.create(this.resolver, this.injector)
            }));
          }
        }]);

        return PopoverController;
      }(OverlayBaseController);

      PopoverController.ɵfac = function PopoverController_Factory(t) {
        return new (t || PopoverController)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](AngularDelegate), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]));
      };

      PopoverController.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: PopoverController,
        factory: function factory(t) {
          return PopoverController.ɵfac(t);
        }
      });

      PopoverController.ctorParameters = function () {
        return [{
          type: AngularDelegate
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
        }];
      };

      var ToastController = /*#__PURE__*/function (_OverlayBaseControlle7) {
        _inherits(ToastController, _OverlayBaseControlle7);

        var _super192 = _createSuper(ToastController);

        function ToastController() {
          _classCallCheck(this, ToastController);

          return _super192.call(this, _ionic_core__WEBPACK_IMPORTED_MODULE_5__["toastController"]);
        }

        return ToastController;
      }(OverlayBaseController);

      ToastController.ɵfac = function ToastController_Factory(t) {
        return new (t || ToastController)();
      };

      ToastController.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: ToastController,
        factory: function factory(t) {
          return ToastController.ɵfac(t);
        },
        providedIn: 'root'
      });
      ToastController.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: function ToastController_Factory() {
          return new ToastController();
        },
        token: ToastController,
        providedIn: "root"
      });

      var DomController = /*#__PURE__*/function () {
        function DomController() {
          _classCallCheck(this, DomController);
        }

        _createClass2(DomController, [{
          key: "read",
          value:
          /**
           * Schedules a task to run during the READ phase of the next frame.
           * This task should only read the DOM, but never modify it.
           */
          function read(cb) {
            getQueue().read(cb);
          }
          /**
           * Schedules a task to run during the WRITE phase of the next frame.
           * This task should write the DOM, but never READ it.
           */

        }, {
          key: "write",
          value: function write(cb) {
            getQueue().write(cb);
          }
        }]);

        return DomController;
      }();

      DomController.ɵfac = function DomController_Factory(t) {
        return new (t || DomController)();
      };

      DomController.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: DomController,
        factory: function factory(t) {
          return DomController.ɵfac(t);
        },
        providedIn: 'root'
      });
      DomController.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: function DomController_Factory() {
          return new DomController();
        },
        token: DomController,
        providedIn: "root"
      });

      var getQueue = function getQueue() {
        var win = typeof window !== 'undefined' ? window : null;

        if (win != null) {
          var Ionic = win.Ionic;

          if (Ionic && Ionic.queue) {
            return Ionic.queue;
          }

          return {
            read: function read(cb) {
              return win.requestAnimationFrame(cb);
            },
            write: function write(cb) {
              return win.requestAnimationFrame(cb);
            }
          };
        }

        return {
          read: function read(cb) {
            return cb();
          },
          write: function write(cb) {
            return cb();
          }
        };
      };

      var ɵ0$8 = getQueue;

      var AnimationController = /*#__PURE__*/function () {
        function AnimationController() {
          _classCallCheck(this, AnimationController);
        }

        _createClass2(AnimationController, [{
          key: "create",
          value:
          /**
           * Create a new animation
           */
          function create(animationId) {
            return Object(_ionic_core__WEBPACK_IMPORTED_MODULE_5__["createAnimation"])(animationId);
          }
          /**
           * EXPERIMENTAL
           *
           * Given a progression and a cubic bezier function,
           * this utility returns the time value(s) at which the
           * cubic bezier reaches the given time progression.
           *
           * If the cubic bezier never reaches the progression
           * the result will be an empty array.
           *
           * This is most useful for switching between easing curves
           * when doing a gesture animation (i.e. going from linear easing
           * during a drag, to another easing when `progressEnd` is called)
           */

        }, {
          key: "easingTime",
          value: function easingTime(p0, p1, p2, p3, progression) {
            return Object(_ionic_core__WEBPACK_IMPORTED_MODULE_5__["getTimeGivenProgression"])(p0, p1, p2, p3, progression);
          }
        }]);

        return AnimationController;
      }();

      AnimationController.ɵfac = function AnimationController_Factory(t) {
        return new (t || AnimationController)();
      };

      AnimationController.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: AnimationController,
        factory: function factory(t) {
          return AnimationController.ɵfac(t);
        },
        providedIn: 'root'
      });
      AnimationController.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: function AnimationController_Factory() {
          return new AnimationController();
        },
        token: AnimationController,
        providedIn: "root"
      });

      var GestureController = /*#__PURE__*/function () {
        function GestureController(zone) {
          _classCallCheck(this, GestureController);

          this.zone = zone;
        }
        /**
         * Create a new gesture
         */


        _createClass2(GestureController, [{
          key: "create",
          value: function create(opts) {
            var _this422 = this;

            var runInsideAngularZone = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

            if (runInsideAngularZone) {
              Object.getOwnPropertyNames(opts).forEach(function (key) {
                if (typeof opts[key] === 'function') {
                  var fn = opts[key];

                  opts[key] = function () {
                    for (var _len27 = arguments.length, props = new Array(_len27), _key28 = 0; _key28 < _len27; _key28++) {
                      props[_key28] = arguments[_key28];
                    }

                    return _this422.zone.run(function () {
                      return fn.apply(void 0, props);
                    });
                  };
                }
              });
            }

            return Object(_ionic_core__WEBPACK_IMPORTED_MODULE_5__["createGesture"])(opts);
          }
        }]);

        return GestureController;
      }();

      GestureController.ɵfac = function GestureController_Factory(t) {
        return new (t || GestureController)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      GestureController.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: GestureController,
        factory: function factory(t) {
          return GestureController.ɵfac(t);
        },
        providedIn: 'root'
      });

      GestureController.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };

      GestureController.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: function GestureController_Factory() {
          return new GestureController(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
        },
        token: GestureController,
        providedIn: "root"
      });

      var IonicRouteStrategy = /*#__PURE__*/function () {
        function IonicRouteStrategy() {
          _classCallCheck(this, IonicRouteStrategy);
        }

        _createClass2(IonicRouteStrategy, [{
          key: "shouldDetach",
          value: function shouldDetach(_route) {
            return false;
          }
        }, {
          key: "shouldAttach",
          value: function shouldAttach(_route) {
            return false;
          }
        }, {
          key: "store",
          value: function store(_route, _detachedTree) {
            return;
          }
        }, {
          key: "retrieve",
          value: function retrieve(_route) {
            return null;
          }
        }, {
          key: "shouldReuseRoute",
          value: function shouldReuseRoute(future, curr) {
            if (future.routeConfig !== curr.routeConfig) {
              return false;
            } // checking router params


            var futureParams = future.params;
            var currentParams = curr.params;
            var keysA = Object.keys(futureParams);
            var keysB = Object.keys(currentParams);

            if (keysA.length !== keysB.length) {
              return false;
            } // Test for A's keys different from B.


            for (var _i18 = 0, _keysA = keysA; _i18 < _keysA.length; _i18++) {
              var key = _keysA[_i18];

              if (currentParams[key] !== futureParams[key]) {
                return false;
              }
            }

            return true;
          }
        }]);

        return IonicRouteStrategy;
      }();

      var appInitialize = function appInitialize(config, doc, zone) {
        return function () {
          var win = doc.defaultView;

          if (win && typeof window !== 'undefined') {
            Object(_ionic_core__WEBPACK_IMPORTED_MODULE_5__["setupConfig"])(Object.assign({}, config, {
              _zoneGate: function _zoneGate(h) {
                return zone.run(h);
              }
            }));
            var aelFn = '__zone_symbol__addEventListener' in doc.body ? '__zone_symbol__addEventListener' : 'addEventListener';
            return Object(_ionic_core_loader__WEBPACK_IMPORTED_MODULE_8__["applyPolyfills"])().then(function () {
              return Object(_ionic_core_loader__WEBPACK_IMPORTED_MODULE_8__["defineCustomElements"])(win, {
                exclude: ['ion-tabs', 'ion-tab'],
                syncQueue: true,
                raf: raf,
                jmp: function jmp(h) {
                  return zone.runOutsideAngular(h);
                },
                ael: function ael(elm, eventName, cb, opts) {
                  elm[aelFn](eventName, cb, opts);
                },
                rel: function rel(elm, eventName, cb, opts) {
                  elm.removeEventListener(eventName, cb, opts);
                }
              });
            });
          }
        };
      };

      var IonicModule_1;
      var DECLARATIONS = [// proxies
      IonApp, IonAvatar, IonBackButton, IonBackdrop, IonBadge, IonButton, IonButtons, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonCheckbox, IonChip, IonCol, IonContent, IonDatetime, IonFab, IonFabButton, IonFabList, IonFooter, IonGrid, IonHeader, IonIcon, IonImg, IonInfiniteScroll, IonInfiniteScrollContent, IonInput, IonItem, IonItemDivider, IonItemGroup, IonItemOption, IonItemOptions, IonItemSliding, IonLabel, IonList, IonListHeader, IonMenu, IonMenuButton, IonMenuToggle, IonNav, IonNavLink, IonNote, IonProgressBar, IonRadio, IonRadioGroup, IonRange, IonRefresher, IonRefresherContent, IonReorder, IonReorderGroup, IonRippleEffect, IonRow, IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption, IonSkeletonText, IonSlide, IonSlides, IonSpinner, IonSplitPane, IonTabBar, IonTabButton, IonText, IonTextarea, IonThumbnail, IonToggle, IonToolbar, IonTitle, IonTabs, // ngModel accessors
      BooleanValueAccessor, NumericValueAccessor, RadioValueAccessor, SelectValueAccessor, TextValueAccessor, // navigation
      IonRouterOutlet, IonBackButtonDelegate, NavDelegate, RouterLinkDelegate, // virtual scroll
      VirtualFooter, VirtualHeader, VirtualItem, IonVirtualScroll];

      var IonicModule = IonicModule_1 = /*#__PURE__*/function () {
        function IonicModule() {
          _classCallCheck(this, IonicModule);
        }

        _createClass2(IonicModule, null, [{
          key: "forRoot",
          value: function forRoot(config) {
            return {
              ngModule: IonicModule_1,
              providers: [{
                provide: ConfigToken,
                useValue: config
              }, {
                provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_INITIALIZER"],
                useFactory: appInitialize,
                multi: true,
                deps: [ConfigToken, _angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]]
              }]
            };
          }
        }]);

        return IonicModule;
      }();

      IonicModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({
        type: IonicModule
      });
      IonicModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({
        factory: function IonicModule_Factory(t) {
          return new (t || IonicModule)();
        },
        providers: [AngularDelegate, ModalController, PopoverController],
        imports: [[_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"]]]
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](BooleanValueAccessor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            /* tslint:disable-next-line:directive-selector */
            selector: 'ion-checkbox,ion-toggle',
            providers: [{
              provide: _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NG_VALUE_ACCESSOR"],
              useExisting: BooleanValueAccessor_1,
              multi: true
            }]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }];
        }, {
          _handleIonChange: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"],
            args: ['ionChange', ['$event.target']]
          }]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](NumericValueAccessor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            /* tslint:disable-next-line:directive-selector */
            selector: 'ion-input[type=number]',
            providers: [{
              provide: _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NG_VALUE_ACCESSOR"],
              useExisting: NumericValueAccessor_1,
              multi: true
            }]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }];
        }, {
          _handleIonChange: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"],
            args: ['ionChange', ['$event.target']]
          }]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RadioValueAccessor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            /* tslint:disable-next-line:directive-selector */
            selector: 'ion-radio',
            providers: [{
              provide: _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NG_VALUE_ACCESSOR"],
              useExisting: RadioValueAccessor_1,
              multi: true
            }]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }];
        }, {
          _handleIonSelect: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"],
            args: ['ionSelect', ['$event.target']]
          }]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](SelectValueAccessor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            /* tslint:disable-next-line:directive-selector */
            selector: 'ion-range, ion-select, ion-radio-group, ion-segment, ion-datetime',
            providers: [{
              provide: _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NG_VALUE_ACCESSOR"],
              useExisting: SelectValueAccessor_1,
              multi: true
            }]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }];
        }, {
          _handleChangeEvent: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"],
            args: ['ionChange', ['$event.target']]
          }]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](TextValueAccessor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            /* tslint:disable-next-line:directive-selector */
            selector: 'ion-input:not([type=number]),ion-textarea,ion-searchbar',
            providers: [{
              provide: _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NG_VALUE_ACCESSOR"],
              useExisting: TextValueAccessor_1,
              multi: true
            }]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }];
        }, {
          _handleInputEvent: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"],
            args: ['ionChange', ['$event.target']]
          }]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](Platform, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], function () {
          return [{
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]]
            }]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](NavController, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], function () {
          return [{
            type: Platform
          }, {
            type: _angular_common__WEBPACK_IMPORTED_MODULE_3__["Location"]
          }, {
            type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["UrlSerializer"]
          }, {
            type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"],
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
            }]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonApp, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-app",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>"
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonAvatar, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-avatar",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>"
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonBackButton, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-back-button",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "defaultHref", "disabled", "icon", "mode", "routerAnimation", "text", "type"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonBackdrop, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-backdrop",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["stopPropagation", "tappable", "visible"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonBadge, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-badge",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "mode"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonButton, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-button",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonButtons, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-buttons",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["collapse"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonCard, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-card",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonCardContent, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-card-content",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["mode"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonCardHeader, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-card-header",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "mode", "translucent"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonCardSubtitle, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-card-subtitle",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "mode"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonCardTitle, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-card-title",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "mode"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonCheckbox, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-checkbox",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["checked", "color", "disabled", "indeterminate", "mode", "name", "value"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonChip, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-chip",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "disabled", "mode", "outline"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonCol, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-col",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonContent, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-content",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonDatetime, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-datetime",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["cancelText", "dayNames", "dayShortNames", "dayValues", "disabled", "displayFormat", "displayTimezone", "doneText", "hourValues", "max", "min", "minuteValues", "mode", "monthNames", "monthShortNames", "monthValues", "name", "pickerFormat", "pickerOptions", "placeholder", "readonly", "value", "yearValues"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonFab, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-fab",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["activated", "edge", "horizontal", "vertical"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonFabButton, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-fab-button",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["activated", "closeIcon", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "show", "size", "target", "translucent", "type"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonFabList, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-fab-list",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["activated", "side"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonFooter, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-footer",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["mode", "translucent"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonGrid, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-grid",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["fixed"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonHeader, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-header",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["collapse", "mode", "translucent"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonIcon, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-icon",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["ariaHidden", "ariaLabel", "color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonImg, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-img",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["alt", "src"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonInfiniteScroll, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-infinite-scroll",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["disabled", "position", "threshold"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonInfiniteScrollContent, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-infinite-scroll-content",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["loadingSpinner", "loadingText"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonInput, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-input",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonItem, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-item",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonItemDivider, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-item-divider",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "mode", "sticky"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonItemGroup, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-item-group",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>"
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonItemOption, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-item-option",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "disabled", "download", "expandable", "href", "mode", "rel", "target", "type"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonItemOptions, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-item-options",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["side"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonItemSliding, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-item-sliding",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["disabled"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonLabel, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-label",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "mode", "position"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonList, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-list",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["inset", "lines", "mode"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonListHeader, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-list-header",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "lines", "mode"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonMenu, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-menu",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["contentId", "disabled", "maxEdgeStart", "menuId", "side", "swipeGesture", "type"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonMenuButton, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-menu-button",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["autoHide", "color", "disabled", "menu", "mode", "type"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonMenuToggle, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-menu-toggle",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["autoHide", "menu"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonNav, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-nav",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["animated", "animation", "root", "rootParams", "swipeGesture"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonNavLink, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-nav-link",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["component", "componentProps", "routerAnimation", "routerDirection"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonNote, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-note",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "mode"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonProgressBar, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-progress-bar",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["buffer", "color", "mode", "reversed", "type", "value"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonRadio, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-radio",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "disabled", "mode", "name", "value"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonRadioGroup, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-radio-group",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["allowEmptySelection", "name", "value"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonRange, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-range",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "debounce", "disabled", "dualKnobs", "max", "min", "mode", "name", "pin", "snaps", "step", "ticks", "value"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonRefresher, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-refresher",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["closeDuration", "disabled", "pullFactor", "pullMax", "pullMin", "snapbackDuration"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonRefresherContent, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-refresher-content",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["pullingIcon", "pullingText", "refreshingSpinner", "refreshingText"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonReorder, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-reorder",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>"
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonReorderGroup, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-reorder-group",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["disabled"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonRippleEffect, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-ripple-effect",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["type"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonRow, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-row",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>"
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonSearchbar, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-searchbar",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonSegment, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-segment",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "disabled", "mode", "scrollable", "swipeGesture", "value"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonSegmentButton, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-segment-button",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["disabled", "layout", "mode", "type", "value"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonSelect, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-select",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["cancelText", "compareWith", "disabled", "interface", "interfaceOptions", "mode", "multiple", "name", "okText", "placeholder", "selectedText", "value"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonSelectOption, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-select-option",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["disabled", "value"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonSkeletonText, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-skeleton-text",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["animated"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonSlide, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-slide",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>"
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonSlides, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-slides",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["mode", "options", "pager", "scrollbar"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonSpinner, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-spinner",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "duration", "name", "paused"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonSplitPane, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-split-pane",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["contentId", "disabled", "when"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonTabBar, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-tab-bar",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "mode", "selectedTab", "translucent"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonTabButton, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-tab-button",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["disabled", "download", "href", "layout", "mode", "rel", "selected", "tab", "target"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonText, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-text",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "mode"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonTextarea, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-textarea",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["autoGrow", "autocapitalize", "autofocus", "clearOnEdit", "color", "cols", "debounce", "disabled", "enterkeyhint", "inputmode", "maxlength", "minlength", "mode", "name", "placeholder", "readonly", "required", "rows", "spellcheck", "value", "wrap"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonThumbnail, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-thumbnail",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>"
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonTitle, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-title",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "size"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonToggle, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-toggle",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["checked", "color", "disabled", "mode", "name", "value"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonToolbar, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: "ion-toolbar",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>",
            inputs: ["color", "mode"]
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](Config, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], null, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](AngularDelegate, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonRouterOutlet, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            selector: 'ion-router-outlet',
            exportAs: 'outlet',
            inputs: ['animated', 'animation', 'swipeGesture']
          }]
        }], function () {
          return [{
            type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["ChildrenOutletContexts"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"],
              args: ['name']
            }]
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"],
              args: ['tabs']
            }]
          }, {
            type: Config
          }, {
            type: NavController
          }, {
            type: _angular_common__WEBPACK_IMPORTED_MODULE_3__["Location"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }, {
            type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["ActivatedRoute"]
          }, {
            type: IonRouterOutlet,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
            }]
          }];
        }, {
          stackEvents: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"]
          }],
          activateEvents: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"],
            args: ['activate']
          }],
          deactivateEvents: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"],
            args: ['deactivate']
          }]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonTabs, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: 'ion-tabs',
            template: "\n    <ng-content select=\"[slot=top]\"></ng-content>\n    <div class=\"tabs-inner\">\n      <ion-router-outlet #outlet tabs=\"true\" (stackEvents)=\"onPageSelected($event)\"></ion-router-outlet>\n    </div>\n    <ng-content></ng-content>",
            styles: ["\n    :host {\n      display: flex;\n      position: absolute;\n      top: 0;\n      left: 0;\n      right: 0;\n      bottom: 0;\n\n      flex-direction: column;\n\n      width: 100%;\n      height: 100%;\n\n      contain: layout size style;\n      z-index: $z-index-page-container;\n    }\n    .tabs-inner {\n      position: relative;\n\n      flex: 1;\n\n      contain: layout size style;\n    }"]
          }]
        }], function () {
          return [{
            type: NavController
          }];
        }, {
          ionTabsWillChange: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"]
          }],
          ionTabsDidChange: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"]
          }],

          /**
           * When a tab button is clicked, there are several scenarios:
           * 1. If the selected tab is currently active (the tab button has been clicked
           *    again), then it should go to the root view for that tab.
           *
           *   a. Get the saved root view from the router outlet. If the saved root view
           *      matches the tabRootUrl, set the route view to this view including the
           *      navigation extras.
           *   b. If the saved root view from the router outlet does
           *      not match, navigate to the tabRootUrl. No navigation extras are
           *      included.
           *
           * 2. If the current tab tab is not currently selected, get the last route
           *    view from the router outlet.
           *
           *   a. If the last route view exists, navigate to that view including any
           *      navigation extras
           *   b. If the last route view doesn't exist, then navigate
           *      to the default tabRootUrl
           */
          select: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"],
            args: ['ionTabButtonClick', ['$event']]
          }],
          outlet: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"],
            args: ['outlet', {
              read: IonRouterOutlet,
              "static": false
            }]
          }],
          tabBar: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChild"],
            args: [IonTabBar, {
              "static": false
            }]
          }]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonBackButtonDelegate, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            selector: 'ion-back-button',
            inputs: ['defaultHref', 'routerAnimation']
          }]
        }], function () {
          return [{
            type: IonRouterOutlet,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
            }]
          }, {
            type: NavController
          }, {
            type: Config
          }];
        }, {
          /**
           * @internal
           */
          onClick: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"],
            args: ['click', ['$event']]
          }]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](NavDelegate, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            selector: 'ion-nav'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
          }, {
            type: AngularDelegate
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterLinkDelegate, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            selector: '[routerLink]',
            inputs: ['routerDirection', 'routerAnimation']
          }]
        }], function () {
          return [{
            type: _angular_common__WEBPACK_IMPORTED_MODULE_3__["LocationStrategy"]
          }, {
            type: NavController
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"]
          }, {
            type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterLink"],
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
            }]
          }];
        }, {
          /**
           * @internal
           */
          onClick: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"],
            args: ['click', ['$event']]
          }]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](VirtualFooter, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            selector: '[virtualFooter]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](VirtualHeader, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            selector: '[virtualHeader]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](VirtualItem, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            selector: '[virtualItem]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonVirtualScroll, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: 'ion-virtual-scroll',
            template: '<ng-content></ng-content>',
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
            inputs: ['approxItemHeight', 'approxHeaderHeight', 'approxFooterHeight', 'headerFn', 'footerFn', 'items', 'itemHeight', 'headerHeight', 'footerHeight', 'trackBy']
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["IterableDiffers"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }];
        }, {
          itmTmp: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChild"],
            args: [VirtualItem, {
              "static": false
            }]
          }],
          hdrTmp: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChild"],
            args: [VirtualHeader, {
              "static": false
            }]
          }],
          ftrTmp: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChild"],
            args: [VirtualFooter, {
              "static": false
            }]
          }]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](ActionSheetController, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], function () {
          return [];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](AlertController, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], function () {
          return [];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](LoadingController, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], function () {
          return [];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](MenuController, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], null, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](PickerController, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], function () {
          return [];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](ModalController, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [{
            type: AngularDelegate
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](PopoverController, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [{
            type: AngularDelegate
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
          }];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](ToastController, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], function () {
          return [];
        }, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomController, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], null, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](AnimationController, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], null, null);
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](GestureController, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();

      (function () {
        (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsetNgModuleScope"](IonicModule, {
          declarations: function declarations() {
            return [IonApp, IonAvatar, IonBackButton, IonBackdrop, IonBadge, IonButton, IonButtons, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonCheckbox, IonChip, IonCol, IonContent, IonDatetime, IonFab, IonFabButton, IonFabList, IonFooter, IonGrid, IonHeader, IonIcon, IonImg, IonInfiniteScroll, IonInfiniteScrollContent, IonInput, IonItem, IonItemDivider, IonItemGroup, IonItemOption, IonItemOptions, IonItemSliding, IonLabel, IonList, IonListHeader, IonMenu, IonMenuButton, IonMenuToggle, IonNav, IonNavLink, IonNote, IonProgressBar, IonRadio, IonRadioGroup, IonRange, IonRefresher, IonRefresherContent, IonReorder, IonReorderGroup, IonRippleEffect, IonRow, IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption, IonSkeletonText, IonSlide, IonSlides, IonSpinner, IonSplitPane, IonTabBar, IonTabButton, IonText, IonTextarea, IonThumbnail, IonToggle, IonToolbar, IonTitle, IonTabs, BooleanValueAccessor, NumericValueAccessor, RadioValueAccessor, SelectValueAccessor, TextValueAccessor, IonRouterOutlet, IonBackButtonDelegate, NavDelegate, RouterLinkDelegate, VirtualFooter, VirtualHeader, VirtualItem, IonVirtualScroll];
          },
          imports: function imports() {
            return [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"]];
          },
          exports: function exports() {
            return [IonApp, IonAvatar, IonBackButton, IonBackdrop, IonBadge, IonButton, IonButtons, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonCheckbox, IonChip, IonCol, IonContent, IonDatetime, IonFab, IonFabButton, IonFabList, IonFooter, IonGrid, IonHeader, IonIcon, IonImg, IonInfiniteScroll, IonInfiniteScrollContent, IonInput, IonItem, IonItemDivider, IonItemGroup, IonItemOption, IonItemOptions, IonItemSliding, IonLabel, IonList, IonListHeader, IonMenu, IonMenuButton, IonMenuToggle, IonNav, IonNavLink, IonNote, IonProgressBar, IonRadio, IonRadioGroup, IonRange, IonRefresher, IonRefresherContent, IonReorder, IonReorderGroup, IonRippleEffect, IonRow, IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption, IonSkeletonText, IonSlide, IonSlides, IonSpinner, IonSplitPane, IonTabBar, IonTabButton, IonText, IonTextarea, IonThumbnail, IonToggle, IonToolbar, IonTitle, IonTabs, BooleanValueAccessor, NumericValueAccessor, RadioValueAccessor, SelectValueAccessor, TextValueAccessor, IonRouterOutlet, IonBackButtonDelegate, NavDelegate, RouterLinkDelegate, VirtualFooter, VirtualHeader, VirtualItem, IonVirtualScroll];
          }
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](IonicModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"],
          args: [{
            declarations: DECLARATIONS,
            exports: DECLARATIONS,
            providers: [AngularDelegate, ModalController, PopoverController],
            imports: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"]]
          }]
        }], null, null);
      })(); // DIRECTIVES

      /**
       * Generated bundle index. Do not edit.
       */
      //# sourceMappingURL=ionic-angular.js.map

      /***/

    },

    /***/
    "TwdF":
    /*!*************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/index.js ***!
      \*************************************************/

    /*! exports provided: forget, htmlTreeAsString, getLocationHref, Dsn, SentryError, getGlobalObject, addInstrumentationHandler, isError, isErrorEvent, isDOMError, isDOMException, isString, isPrimitive, isPlainObject, isEvent, isElement, isRegExp, isThenable, isSyntheticEvent, isInstanceOf, consoleSandbox, logger, Memo, uuid4, parseUrl, getEventDescription, addExceptionTypeValue, addExceptionMechanism, parseSemver, parseRetryAfterHeader, addContextToFrame, stripUrlQueryAndFragment, checkOrSetAlreadyCaught, isNodeEnv, dynamicRequire, loadModule, fill, urlEncode, normalizeToSize, walk, normalize, extractExceptionKeysForMessage, dropUndefinedKeys, objectify, resolve, relative, normalizePath, isAbsolute, join, dirname, basename, PromiseBuffer, getFunctionName, truncate, snipLine, safeJoin, isMatchingPattern, escapeStringForRegex, supportsErrorEvent, supportsDOMError, supportsDOMException, supportsFetch, isNativeFetch, supportsNativeFetch, supportsReportingObserver, supportsReferrerPolicy, supportsHistory, SyncPromise, dateTimestampInSeconds, timestampInSeconds, timestampWithMs, usingPerformanceAPI, _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin */

    /***/
    function TwdF(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./async */
      "O8DA");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "forget", function () {
        return _async__WEBPACK_IMPORTED_MODULE_0__["forget"];
      });
      /* harmony import */


      var _browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./browser */
      "vFt6");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "htmlTreeAsString", function () {
        return _browser__WEBPACK_IMPORTED_MODULE_1__["htmlTreeAsString"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getLocationHref", function () {
        return _browser__WEBPACK_IMPORTED_MODULE_1__["getLocationHref"];
      });
      /* harmony import */


      var _dsn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./dsn */
      "UJ/E");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Dsn", function () {
        return _dsn__WEBPACK_IMPORTED_MODULE_2__["Dsn"];
      });
      /* harmony import */


      var _error__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./error */
      "9Pyj");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "SentryError", function () {
        return _error__WEBPACK_IMPORTED_MODULE_3__["SentryError"];
      });
      /* harmony import */


      var _global__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./global */
      "z+RT");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getGlobalObject", function () {
        return _global__WEBPACK_IMPORTED_MODULE_4__["getGlobalObject"];
      });
      /* harmony import */


      var _instrument__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./instrument */
      "6hSO");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "addInstrumentationHandler", function () {
        return _instrument__WEBPACK_IMPORTED_MODULE_5__["addInstrumentationHandler"];
      });
      /* harmony import */


      var _is__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ./is */
      "9AQC");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isError", function () {
        return _is__WEBPACK_IMPORTED_MODULE_6__["isError"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isErrorEvent", function () {
        return _is__WEBPACK_IMPORTED_MODULE_6__["isErrorEvent"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isDOMError", function () {
        return _is__WEBPACK_IMPORTED_MODULE_6__["isDOMError"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isDOMException", function () {
        return _is__WEBPACK_IMPORTED_MODULE_6__["isDOMException"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isString", function () {
        return _is__WEBPACK_IMPORTED_MODULE_6__["isString"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isPrimitive", function () {
        return _is__WEBPACK_IMPORTED_MODULE_6__["isPrimitive"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isPlainObject", function () {
        return _is__WEBPACK_IMPORTED_MODULE_6__["isPlainObject"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isEvent", function () {
        return _is__WEBPACK_IMPORTED_MODULE_6__["isEvent"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isElement", function () {
        return _is__WEBPACK_IMPORTED_MODULE_6__["isElement"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isRegExp", function () {
        return _is__WEBPACK_IMPORTED_MODULE_6__["isRegExp"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isThenable", function () {
        return _is__WEBPACK_IMPORTED_MODULE_6__["isThenable"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isSyntheticEvent", function () {
        return _is__WEBPACK_IMPORTED_MODULE_6__["isSyntheticEvent"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isInstanceOf", function () {
        return _is__WEBPACK_IMPORTED_MODULE_6__["isInstanceOf"];
      });
      /* harmony import */


      var _logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! ./logger */
      "8LbN");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "consoleSandbox", function () {
        return _logger__WEBPACK_IMPORTED_MODULE_7__["consoleSandbox"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "logger", function () {
        return _logger__WEBPACK_IMPORTED_MODULE_7__["logger"];
      });
      /* harmony import */


      var _memo__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
      /*! ./memo */
      "wCA9");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Memo", function () {
        return _memo__WEBPACK_IMPORTED_MODULE_8__["Memo"];
      });
      /* harmony import */


      var _misc__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
      /*! ./misc */
      "9/Zf");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "uuid4", function () {
        return _misc__WEBPACK_IMPORTED_MODULE_9__["uuid4"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "parseUrl", function () {
        return _misc__WEBPACK_IMPORTED_MODULE_9__["parseUrl"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getEventDescription", function () {
        return _misc__WEBPACK_IMPORTED_MODULE_9__["getEventDescription"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "addExceptionTypeValue", function () {
        return _misc__WEBPACK_IMPORTED_MODULE_9__["addExceptionTypeValue"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "addExceptionMechanism", function () {
        return _misc__WEBPACK_IMPORTED_MODULE_9__["addExceptionMechanism"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "parseSemver", function () {
        return _misc__WEBPACK_IMPORTED_MODULE_9__["parseSemver"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "parseRetryAfterHeader", function () {
        return _misc__WEBPACK_IMPORTED_MODULE_9__["parseRetryAfterHeader"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "addContextToFrame", function () {
        return _misc__WEBPACK_IMPORTED_MODULE_9__["addContextToFrame"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "stripUrlQueryAndFragment", function () {
        return _misc__WEBPACK_IMPORTED_MODULE_9__["stripUrlQueryAndFragment"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "checkOrSetAlreadyCaught", function () {
        return _misc__WEBPACK_IMPORTED_MODULE_9__["checkOrSetAlreadyCaught"];
      });
      /* harmony import */


      var _node__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
      /*! ./node */
      "+A1k");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isNodeEnv", function () {
        return _node__WEBPACK_IMPORTED_MODULE_10__["isNodeEnv"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "dynamicRequire", function () {
        return _node__WEBPACK_IMPORTED_MODULE_10__["dynamicRequire"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "loadModule", function () {
        return _node__WEBPACK_IMPORTED_MODULE_10__["loadModule"];
      });
      /* harmony import */


      var _object__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
      /*! ./object */
      "6PXS");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "fill", function () {
        return _object__WEBPACK_IMPORTED_MODULE_11__["fill"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "urlEncode", function () {
        return _object__WEBPACK_IMPORTED_MODULE_11__["urlEncode"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "normalizeToSize", function () {
        return _object__WEBPACK_IMPORTED_MODULE_11__["normalizeToSize"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "walk", function () {
        return _object__WEBPACK_IMPORTED_MODULE_11__["walk"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "normalize", function () {
        return _object__WEBPACK_IMPORTED_MODULE_11__["normalize"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "extractExceptionKeysForMessage", function () {
        return _object__WEBPACK_IMPORTED_MODULE_11__["extractExceptionKeysForMessage"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "dropUndefinedKeys", function () {
        return _object__WEBPACK_IMPORTED_MODULE_11__["dropUndefinedKeys"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "objectify", function () {
        return _object__WEBPACK_IMPORTED_MODULE_11__["objectify"];
      });
      /* harmony import */


      var _path__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
      /*! ./path */
      "pZxY");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "resolve", function () {
        return _path__WEBPACK_IMPORTED_MODULE_12__["resolve"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "relative", function () {
        return _path__WEBPACK_IMPORTED_MODULE_12__["relative"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "normalizePath", function () {
        return _path__WEBPACK_IMPORTED_MODULE_12__["normalizePath"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isAbsolute", function () {
        return _path__WEBPACK_IMPORTED_MODULE_12__["isAbsolute"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "join", function () {
        return _path__WEBPACK_IMPORTED_MODULE_12__["join"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "dirname", function () {
        return _path__WEBPACK_IMPORTED_MODULE_12__["dirname"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "basename", function () {
        return _path__WEBPACK_IMPORTED_MODULE_12__["basename"];
      });
      /* harmony import */


      var _promisebuffer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(
      /*! ./promisebuffer */
      "XsXS");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "PromiseBuffer", function () {
        return _promisebuffer__WEBPACK_IMPORTED_MODULE_13__["PromiseBuffer"];
      });
      /* harmony import */


      var _stacktrace__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(
      /*! ./stacktrace */
      "pRiV");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getFunctionName", function () {
        return _stacktrace__WEBPACK_IMPORTED_MODULE_14__["getFunctionName"];
      });
      /* harmony import */


      var _string__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(
      /*! ./string */
      "+924");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "truncate", function () {
        return _string__WEBPACK_IMPORTED_MODULE_15__["truncate"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "snipLine", function () {
        return _string__WEBPACK_IMPORTED_MODULE_15__["snipLine"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "safeJoin", function () {
        return _string__WEBPACK_IMPORTED_MODULE_15__["safeJoin"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isMatchingPattern", function () {
        return _string__WEBPACK_IMPORTED_MODULE_15__["isMatchingPattern"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "escapeStringForRegex", function () {
        return _string__WEBPACK_IMPORTED_MODULE_15__["escapeStringForRegex"];
      });
      /* harmony import */


      var _supports__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(
      /*! ./supports */
      "4Ssk");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "supportsErrorEvent", function () {
        return _supports__WEBPACK_IMPORTED_MODULE_16__["supportsErrorEvent"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "supportsDOMError", function () {
        return _supports__WEBPACK_IMPORTED_MODULE_16__["supportsDOMError"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "supportsDOMException", function () {
        return _supports__WEBPACK_IMPORTED_MODULE_16__["supportsDOMException"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "supportsFetch", function () {
        return _supports__WEBPACK_IMPORTED_MODULE_16__["supportsFetch"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isNativeFetch", function () {
        return _supports__WEBPACK_IMPORTED_MODULE_16__["isNativeFetch"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "supportsNativeFetch", function () {
        return _supports__WEBPACK_IMPORTED_MODULE_16__["supportsNativeFetch"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "supportsReportingObserver", function () {
        return _supports__WEBPACK_IMPORTED_MODULE_16__["supportsReportingObserver"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "supportsReferrerPolicy", function () {
        return _supports__WEBPACK_IMPORTED_MODULE_16__["supportsReferrerPolicy"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "supportsHistory", function () {
        return _supports__WEBPACK_IMPORTED_MODULE_16__["supportsHistory"];
      });
      /* harmony import */


      var _syncpromise__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(
      /*! ./syncpromise */
      "HR75");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "SyncPromise", function () {
        return _syncpromise__WEBPACK_IMPORTED_MODULE_17__["SyncPromise"];
      });
      /* harmony import */


      var _time__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(
      /*! ./time */
      "kdvv");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "dateTimestampInSeconds", function () {
        return _time__WEBPACK_IMPORTED_MODULE_18__["dateTimestampInSeconds"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "timestampInSeconds", function () {
        return _time__WEBPACK_IMPORTED_MODULE_18__["timestampInSeconds"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "timestampWithMs", function () {
        return _time__WEBPACK_IMPORTED_MODULE_18__["timestampWithMs"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "usingPerformanceAPI", function () {
        return _time__WEBPACK_IMPORTED_MODULE_18__["usingPerformanceAPI"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "_browserPerformanceTimeOriginMode", function () {
        return _time__WEBPACK_IMPORTED_MODULE_18__["_browserPerformanceTimeOriginMode"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "browserPerformanceTimeOrigin", function () {
        return _time__WEBPACK_IMPORTED_MODULE_18__["browserPerformanceTimeOrigin"];
      }); //# sourceMappingURL=index.js.map

      /***/

    },

    /***/
    "UBq+":
    /*!*************************************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/integrations/globalhandlers.js ***!
      \*************************************************************************/

    /*! exports provided: GlobalHandlers */

    /***/
    function UBq(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "GlobalHandlers", function () {
        return GlobalHandlers;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/core */
      "wBhU");
      /* harmony import */


      var _sentry_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/types */
      "PIsB");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _eventbuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ../eventbuilder */
      "IS+8");
      /* harmony import */


      var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ../helpers */
      "vzc1");
      /* eslint-disable @typescript-eslint/no-unsafe-member-access */

      /** Global handlers */


      var GlobalHandlers =
      /** @class */
      function () {
        /** JSDoc */
        function GlobalHandlers(options) {
          /**
           * @inheritDoc
           */
          this.name = GlobalHandlers.id;
          /** JSDoc */

          this._onErrorHandlerInstalled = false;
          /** JSDoc */

          this._onUnhandledRejectionHandlerInstalled = false;
          this._options = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
            onerror: true,
            onunhandledrejection: true
          }, options);
        }
        /**
         * @inheritDoc
         */


        GlobalHandlers.prototype.setupOnce = function () {
          Error.stackTraceLimit = 50;

          if (this._options.onerror) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].log('Global Handler attached: onerror');

            this._installGlobalOnErrorHandler();
          }

          if (this._options.onunhandledrejection) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].log('Global Handler attached: onunhandledrejection');

            this._installGlobalOnUnhandledRejectionHandler();
          }
        };
        /** JSDoc */


        GlobalHandlers.prototype._installGlobalOnErrorHandler = function () {
          var _this = this;

          if (this._onErrorHandlerInstalled) {
            return;
          }

          Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["addInstrumentationHandler"])({
            // eslint-disable-next-line @typescript-eslint/no-explicit-any
            callback: function callback(data) {
              var error = data.error;
              var currentHub = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])();
              var hasIntegration = currentHub.getIntegration(GlobalHandlers);
              var isFailedOwnDelivery = error && error.__sentry_own_request__ === true;

              if (!hasIntegration || Object(_helpers__WEBPACK_IMPORTED_MODULE_5__["shouldIgnoreOnError"])() || isFailedOwnDelivery) {
                return;
              }

              var client = currentHub.getClient();
              var event = error === undefined && Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["isString"])(data.msg) ? _this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column) : _this._enhanceEventWithInitialFrame(Object(_eventbuilder__WEBPACK_IMPORTED_MODULE_4__["eventFromUnknownInput"])(error || data.msg, undefined, {
                attachStacktrace: client && client.getOptions().attachStacktrace,
                rejection: false
              }), data.url, data.line, data.column);
              Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["addExceptionMechanism"])(event, {
                handled: false,
                type: 'onerror'
              });
              currentHub.captureEvent(event, {
                originalException: error
              });
            },
            type: 'error'
          });
          this._onErrorHandlerInstalled = true;
        };
        /** JSDoc */


        GlobalHandlers.prototype._installGlobalOnUnhandledRejectionHandler = function () {
          var _this = this;

          if (this._onUnhandledRejectionHandlerInstalled) {
            return;
          }

          Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["addInstrumentationHandler"])({
            // eslint-disable-next-line @typescript-eslint/no-explicit-any
            callback: function callback(e) {
              var error = e; // dig the object of the rejection out of known event types

              try {
                // PromiseRejectionEvents store the object of the rejection under 'reason'
                // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent
                if ('reason' in e) {
                  error = e.reason;
                } // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents
                // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into
                // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec
                // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and
                // https://github.com/getsentry/sentry-javascript/issues/2380
                else if ('detail' in e && 'reason' in e.detail) {
                  error = e.detail.reason;
                }
              } catch (_oO) {// no-empty
              }

              var currentHub = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])();
              var hasIntegration = currentHub.getIntegration(GlobalHandlers);
              var isFailedOwnDelivery = error && error.__sentry_own_request__ === true;

              if (!hasIntegration || Object(_helpers__WEBPACK_IMPORTED_MODULE_5__["shouldIgnoreOnError"])() || isFailedOwnDelivery) {
                return true;
              }

              var client = currentHub.getClient();
              var event = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["isPrimitive"])(error) ? _this._eventFromRejectionWithPrimitive(error) : Object(_eventbuilder__WEBPACK_IMPORTED_MODULE_4__["eventFromUnknownInput"])(error, undefined, {
                attachStacktrace: client && client.getOptions().attachStacktrace,
                rejection: true
              });
              event.level = _sentry_types__WEBPACK_IMPORTED_MODULE_2__["Severity"].Error;
              Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["addExceptionMechanism"])(event, {
                handled: false,
                type: 'onunhandledrejection'
              });
              currentHub.captureEvent(event, {
                originalException: error
              });
              return;
            },
            type: 'unhandledrejection'
          });
          this._onUnhandledRejectionHandlerInstalled = true;
        };
        /**
         * This function creates a stack from an old, error-less onerror handler.
         */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any


        GlobalHandlers.prototype._eventFromIncompleteOnError = function (msg, url, line, column) {
          var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i; // If 'message' is ErrorEvent, get real message from inside

          var message = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["isErrorEvent"])(msg) ? msg.message : msg;
          var name;
          var groups = message.match(ERROR_TYPES_RE);

          if (groups) {
            name = groups[1];
            message = groups[2];
          }

          var event = {
            exception: {
              values: [{
                type: name || 'Error',
                value: message
              }]
            }
          };
          return this._enhanceEventWithInitialFrame(event, url, line, column);
        };
        /**
         * Create an event from a promise rejection where the `reason` is a primitive.
         *
         * @param reason: The `reason` property of the promise rejection
         * @returns An Event object with an appropriate `exception` value
         */


        GlobalHandlers.prototype._eventFromRejectionWithPrimitive = function (reason) {
          return {
            exception: {
              values: [{
                type: 'UnhandledRejection',
                // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)
                value: "Non-Error promise rejection captured with value: " + String(reason)
              }]
            }
          };
        };
        /** JSDoc */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any


        GlobalHandlers.prototype._enhanceEventWithInitialFrame = function (event, url, line, column) {
          event.exception = event.exception || {};
          event.exception.values = event.exception.values || [];
          event.exception.values[0] = event.exception.values[0] || {};
          event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {};
          event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || [];
          var colno = isNaN(parseInt(column, 10)) ? undefined : column;
          var lineno = isNaN(parseInt(line, 10)) ? undefined : line;
          var filename = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["isString"])(url) && url.length > 0 ? url : Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["getLocationHref"])();

          if (event.exception.values[0].stacktrace.frames.length === 0) {
            event.exception.values[0].stacktrace.frames.push({
              colno: colno,
              filename: filename,
              "function": '?',
              in_app: true,
              lineno: lineno
            });
          }

          return event;
        };
        /**
         * @inheritDoc
         */


        GlobalHandlers.id = 'GlobalHandlers';
        return GlobalHandlers;
      }(); //# sourceMappingURL=globalhandlers.js.map

      /***/

    },

    /***/
    "UGaM":
    /*!**************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/publishBehavior.js ***!
      \**************************************************************************/

    /*! exports provided: publishBehavior */

    /***/
    function UGaM(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "publishBehavior", function () {
        return publishBehavior;
      });
      /* harmony import */


      var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../BehaviorSubject */
      "2Vo4");
      /* harmony import */


      var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./multicast */
      "oB13");

      function publishBehavior(value) {
        return function (source) {
          return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__["BehaviorSubject"](value))(source);
        };
      } //# sourceMappingURL=publishBehavior.js.map

      /***/

    },

    /***/
    "UH2p":
    /*!***************************************************!*\
      !*** ./node_modules/@sentry/angular/esm/index.js ***!
      \***************************************************/

    /*! exports provided: Severity, Status, addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, makeMain, Scope, startTransaction, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, BrowserClient, injectReportDialog, eventFromException, eventFromMessage, defaultIntegrations, forceLoad, lastEventId, onLoad, showReportDialog, flush, close, wrap, SDK_NAME, Integrations, Transports, init, createErrorHandler, SentryErrorHandler, getActiveTransaction, instrumentAngularRouting, routingInstrumentation, TraceClassDecorator, TraceMethodDecorator, TraceDirective, TraceModule, TraceService */

    /***/
    function UH2p(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _sentry_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/browser */
      "WSEr");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Severity", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["Severity"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Status", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["Status"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "addGlobalEventProcessor", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["addGlobalEventProcessor"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "addBreadcrumb", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["addBreadcrumb"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "captureException", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["captureException"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "captureEvent", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["captureEvent"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "captureMessage", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["captureMessage"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "configureScope", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["configureScope"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getHubFromCarrier", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["getHubFromCarrier"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getCurrentHub", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Hub", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["Hub"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "makeMain", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["makeMain"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Scope", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["Scope"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "startTransaction", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["startTransaction"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "SDK_VERSION", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["SDK_VERSION"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setContext", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["setContext"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setExtra", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["setExtra"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setExtras", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["setExtras"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setTag", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["setTag"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setTags", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["setTags"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setUser", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["setUser"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "withScope", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["withScope"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "BrowserClient", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["BrowserClient"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "injectReportDialog", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["injectReportDialog"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "eventFromException", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["eventFromException"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "eventFromMessage", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["eventFromMessage"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "defaultIntegrations", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["defaultIntegrations"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "forceLoad", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["forceLoad"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "lastEventId", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["lastEventId"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "onLoad", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["onLoad"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "showReportDialog", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["showReportDialog"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "flush", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["flush"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "close", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["close"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "wrap", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["wrap"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "SDK_NAME", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["SDK_NAME"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Integrations", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["Integrations"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Transports", function () {
        return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["Transports"];
      });
      /* harmony import */


      var _sdk__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./sdk */
      "hxh6");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "init", function () {
        return _sdk__WEBPACK_IMPORTED_MODULE_1__["init"];
      });
      /* harmony import */


      var _errorhandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./errorhandler */
      "8w4p");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "createErrorHandler", function () {
        return _errorhandler__WEBPACK_IMPORTED_MODULE_2__["createErrorHandler"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "SentryErrorHandler", function () {
        return _errorhandler__WEBPACK_IMPORTED_MODULE_2__["SentryErrorHandler"];
      });
      /* harmony import */


      var _tracing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./tracing */
      "rgd1");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getActiveTransaction", function () {
        return _tracing__WEBPACK_IMPORTED_MODULE_3__["getActiveTransaction"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "instrumentAngularRouting", function () {
        return _tracing__WEBPACK_IMPORTED_MODULE_3__["instrumentAngularRouting"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "routingInstrumentation", function () {
        return _tracing__WEBPACK_IMPORTED_MODULE_3__["routingInstrumentation"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "TraceClassDecorator", function () {
        return _tracing__WEBPACK_IMPORTED_MODULE_3__["TraceClassDecorator"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "TraceMethodDecorator", function () {
        return _tracing__WEBPACK_IMPORTED_MODULE_3__["TraceMethodDecorator"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "TraceDirective", function () {
        return _tracing__WEBPACK_IMPORTED_MODULE_3__["TraceDirective"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "TraceModule", function () {
        return _tracing__WEBPACK_IMPORTED_MODULE_3__["TraceModule"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "TraceService", function () {
        return _tracing__WEBPACK_IMPORTED_MODULE_3__["TraceService"];
      }); //# sourceMappingURL=index.js.map

      /***/

    },

    /***/
    "UHp3":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/windowTime.js ***!
      \*********************************************************************/

    /*! exports provided: windowTime */

    /***/
    function UHp3(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "windowTime", function () {
        return windowTime;
      });
      /* harmony import */


      var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subject */
      "XNiG");
      /* harmony import */


      var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../scheduler/async */
      "D0XW");
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../util/isNumeric */
      "Y7HM");
      /* harmony import */


      var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ../util/isScheduler */
      "z+Ro");

      function windowTime(windowTimeSpan) {
        var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
        var windowCreationInterval = null;
        var maxWindowSize = Number.POSITIVE_INFINITY;

        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(arguments[3])) {
          scheduler = arguments[3];
        }

        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(arguments[2])) {
          scheduler = arguments[2];
        } else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(arguments[2])) {
          maxWindowSize = Number(arguments[2]);
        }

        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(arguments[1])) {
          scheduler = arguments[1];
        } else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(arguments[1])) {
          windowCreationInterval = Number(arguments[1]);
        }

        return function windowTimeOperatorFunction(source) {
          return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));
        };
      }

      var WindowTimeOperator = /*#__PURE__*/function () {
        function WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
          _classCallCheck(this, WindowTimeOperator);

          this.windowTimeSpan = windowTimeSpan;
          this.windowCreationInterval = windowCreationInterval;
          this.maxWindowSize = maxWindowSize;
          this.scheduler = scheduler;
        }

        _createClass2(WindowTimeOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));
          }
        }]);

        return WindowTimeOperator;
      }();

      var CountedSubject = /*#__PURE__*/function (_Subject__WEBPACK_IMP4) {
        _inherits(CountedSubject, _Subject__WEBPACK_IMP4);

        var _super193 = _createSuper(CountedSubject);

        function CountedSubject() {
          var _this423;

          _classCallCheck(this, CountedSubject);

          _this423 = _super193.apply(this, arguments);
          _this423._numberOfNextedValues = 0;
          return _this423;
        }

        _createClass2(CountedSubject, [{
          key: "next",
          value: function next(value) {
            this._numberOfNextedValues++;

            _get(_getPrototypeOf(CountedSubject.prototype), "next", this).call(this, value);
          }
        }, {
          key: "numberOfNextedValues",
          get: function get() {
            return this._numberOfNextedValues;
          }
        }]);

        return CountedSubject;
      }(_Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]);

      var WindowTimeSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_23) {
        _inherits(WindowTimeSubscriber, _Subscriber__WEBPACK_23);

        var _super194 = _createSuper(WindowTimeSubscriber);

        function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
          var _this424;

          _classCallCheck(this, WindowTimeSubscriber);

          _this424 = _super194.call(this, destination);
          _this424.destination = destination;
          _this424.windowTimeSpan = windowTimeSpan;
          _this424.windowCreationInterval = windowCreationInterval;
          _this424.maxWindowSize = maxWindowSize;
          _this424.scheduler = scheduler;
          _this424.windows = [];

          var window = _this424.openWindow();

          if (windowCreationInterval !== null && windowCreationInterval >= 0) {
            var closeState = {
              subscriber: _assertThisInitialized(_this424),
              window: window,
              context: null
            };
            var creationState = {
              windowTimeSpan: windowTimeSpan,
              windowCreationInterval: windowCreationInterval,
              subscriber: _assertThisInitialized(_this424),
              scheduler: scheduler
            };

            _this424.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));

            _this424.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));
          } else {
            var timeSpanOnlyState = {
              subscriber: _assertThisInitialized(_this424),
              window: window,
              windowTimeSpan: windowTimeSpan
            };

            _this424.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));
          }

          return _this424;
        }

        _createClass2(WindowTimeSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var windows = this.windows;
            var len = windows.length;

            for (var i = 0; i < len; i++) {
              var _window2 = windows[i];

              if (!_window2.closed) {
                _window2.next(value);

                if (_window2.numberOfNextedValues >= this.maxWindowSize) {
                  this.closeWindow(_window2);
                }
              }
            }
          }
        }, {
          key: "_error",
          value: function _error(err) {
            var windows = this.windows;

            while (windows.length > 0) {
              windows.shift().error(err);
            }

            this.destination.error(err);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var windows = this.windows;

            while (windows.length > 0) {
              var _window3 = windows.shift();

              if (!_window3.closed) {
                _window3.complete();
              }
            }

            this.destination.complete();
          }
        }, {
          key: "openWindow",
          value: function openWindow() {
            var window = new CountedSubject();
            this.windows.push(window);
            var destination = this.destination;
            destination.next(window);
            return window;
          }
        }, {
          key: "closeWindow",
          value: function closeWindow(window) {
            window.complete();
            var windows = this.windows;
            windows.splice(windows.indexOf(window), 1);
          }
        }]);

        return WindowTimeSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]);

      function dispatchWindowTimeSpanOnly(state) {
        var subscriber = state.subscriber,
            windowTimeSpan = state.windowTimeSpan,
            window = state.window;

        if (window) {
          subscriber.closeWindow(window);
        }

        state.window = subscriber.openWindow();
        this.schedule(state, windowTimeSpan);
      }

      function dispatchWindowCreation(state) {
        var windowTimeSpan = state.windowTimeSpan,
            subscriber = state.subscriber,
            scheduler = state.scheduler,
            windowCreationInterval = state.windowCreationInterval;
        var window = subscriber.openWindow();
        var action = this;
        var context = {
          action: action,
          subscription: null
        };
        var timeSpanState = {
          subscriber: subscriber,
          window: window,
          context: context
        };
        context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);
        action.add(context.subscription);
        action.schedule(state, windowCreationInterval);
      }

      function dispatchWindowClose(state) {
        var subscriber = state.subscriber,
            window = state.window,
            context = state.context;

        if (context && context.action && context.subscription) {
          context.action.remove(context.subscription);
        }

        subscriber.closeWindow(window);
      } //# sourceMappingURL=windowTime.js.map

      /***/

    },

    /***/
    "UJ/E":
    /*!***********************************************!*\
      !*** ./node_modules/@sentry/utils/esm/dsn.js ***!
      \***********************************************/

    /*! exports provided: Dsn */

    /***/
    function UJE(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Dsn", function () {
        return Dsn;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _error__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./error */
      "9Pyj");
      /** Regular expression used to parse a Dsn. */


      var DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;
      /** Error message */

      var ERROR_MESSAGE = 'Invalid Dsn';
      /** The Sentry Dsn, identifying a Sentry instance and project. */

      var Dsn =
      /** @class */
      function () {
        /** Creates a new Dsn component */
        function Dsn(from) {
          if (typeof from === 'string') {
            this._fromString(from);
          } else {
            this._fromComponents(from);
          }

          this._validate();
        }
        /**
         * Renders the string representation of this Dsn.
         *
         * By default, this will render the public representation without the password
         * component. To get the deprecated private representation, set `withPassword`
         * to true.
         *
         * @param withPassword When set to true, the password will be included.
         */


        Dsn.prototype.toString = function (withPassword) {
          if (withPassword === void 0) {
            withPassword = false;
          }

          var _a = this,
              host = _a.host,
              path = _a.path,
              pass = _a.pass,
              port = _a.port,
              projectId = _a.projectId,
              protocol = _a.protocol,
              publicKey = _a.publicKey;

          return protocol + "://" + publicKey + (withPassword && pass ? ":" + pass : '') + ("@" + host + (port ? ":" + port : '') + "/" + (path ? path + "/" : path) + projectId);
        };
        /** Parses a string into this Dsn. */


        Dsn.prototype._fromString = function (str) {
          var match = DSN_REGEX.exec(str);

          if (!match) {
            throw new _error__WEBPACK_IMPORTED_MODULE_1__["SentryError"](ERROR_MESSAGE);
          }

          var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(match.slice(1), 6),
              protocol = _a[0],
              publicKey = _a[1],
              _b = _a[2],
              pass = _b === void 0 ? '' : _b,
              host = _a[3],
              _c = _a[4],
              port = _c === void 0 ? '' : _c,
              lastPath = _a[5];

          var path = '';
          var projectId = lastPath;
          var split = projectId.split('/');

          if (split.length > 1) {
            path = split.slice(0, -1).join('/');
            projectId = split.pop();
          }

          if (projectId) {
            var projectMatch = projectId.match(/^\d+/);

            if (projectMatch) {
              projectId = projectMatch[0];
            }
          }

          this._fromComponents({
            host: host,
            pass: pass,
            path: path,
            projectId: projectId,
            port: port,
            protocol: protocol,
            publicKey: publicKey
          });
        };
        /** Maps Dsn components into this instance. */


        Dsn.prototype._fromComponents = function (components) {
          // TODO this is for backwards compatibility, and can be removed in a future version
          if ('user' in components && !('publicKey' in components)) {
            components.publicKey = components.user;
          }

          this.user = components.publicKey || '';
          this.protocol = components.protocol;
          this.publicKey = components.publicKey || '';
          this.pass = components.pass || '';
          this.host = components.host;
          this.port = components.port || '';
          this.path = components.path || '';
          this.projectId = components.projectId;
        };
        /** Validates this Dsn and throws on error. */


        Dsn.prototype._validate = function () {
          var _this = this;

          ['protocol', 'publicKey', 'host', 'projectId'].forEach(function (component) {
            if (!_this[component]) {
              throw new _error__WEBPACK_IMPORTED_MODULE_1__["SentryError"](ERROR_MESSAGE + ": " + component + " missing");
            }
          });

          if (!this.projectId.match(/^\d+$/)) {
            throw new _error__WEBPACK_IMPORTED_MODULE_1__["SentryError"](ERROR_MESSAGE + ": Invalid projectId " + this.projectId);
          }

          if (this.protocol !== 'http' && this.protocol !== 'https') {
            throw new _error__WEBPACK_IMPORTED_MODULE_1__["SentryError"](ERROR_MESSAGE + ": Invalid protocol " + this.protocol);
          }

          if (this.port && isNaN(parseInt(this.port, 10))) {
            throw new _error__WEBPACK_IMPORTED_MODULE_1__["SentryError"](ERROR_MESSAGE + ": Invalid port " + this.port);
          }
        };

        return Dsn;
      }(); //# sourceMappingURL=dsn.js.map

      /***/

    },

    /***/
    "UXbc":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeMapTo.js ***!
      \*********************************************************************/

    /*! exports provided: mergeMapTo */

    /***/
    function UXbc(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "mergeMapTo", function () {
        return mergeMapTo;
      });
      /* harmony import */


      var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./mergeMap */
      "5+tZ");

      function mergeMapTo(innerObservable, resultSelector) {
        var concurrent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.POSITIVE_INFINITY;

        if (typeof resultSelector === 'function') {
          return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () {
            return innerObservable;
          }, resultSelector, concurrent);
        }

        if (typeof resultSelector === 'number') {
          concurrent = resultSelector;
        }

        return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () {
          return innerObservable;
        }, concurrent);
      } //# sourceMappingURL=mergeMapTo.js.map

      /***/

    },

    /***/
    "UXun":
    /*!**********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/shareReplay.js ***!
      \**********************************************************************/

    /*! exports provided: shareReplay */

    /***/
    function UXun(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "shareReplay", function () {
        return shareReplay;
      });
      /* harmony import */


      var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../ReplaySubject */
      "jtHE");

      function shareReplay(configOrBufferSize, windowTime, scheduler) {
        var config;

        if (configOrBufferSize && typeof configOrBufferSize === 'object') {
          config = configOrBufferSize;
        } else {
          config = {
            bufferSize: configOrBufferSize,
            windowTime: windowTime,
            refCount: false,
            scheduler: scheduler
          };
        }

        return function (source) {
          return source.lift(shareReplayOperator(config));
        };
      }

      function shareReplayOperator(_ref83) {
        var _ref83$bufferSize = _ref83.bufferSize,
            bufferSize = _ref83$bufferSize === void 0 ? Number.POSITIVE_INFINITY : _ref83$bufferSize,
            _ref83$windowTime = _ref83.windowTime,
            windowTime = _ref83$windowTime === void 0 ? Number.POSITIVE_INFINITY : _ref83$windowTime,
            useRefCount = _ref83.refCount,
            scheduler = _ref83.scheduler;
        var subject;
        var refCount = 0;
        var subscription;
        var hasError = false;
        var isComplete = false;
        return function shareReplayOperation(source) {
          refCount++;
          var innerSub;

          if (!subject || hasError) {
            hasError = false;
            subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
            innerSub = subject.subscribe(this);
            subscription = source.subscribe({
              next: function next(value) {
                subject.next(value);
              },
              error: function error(err) {
                hasError = true;
                subject.error(err);
              },
              complete: function complete() {
                isComplete = true;
                subscription = undefined;
                subject.complete();
              }
            });

            if (isComplete) {
              subscription = undefined;
            }
          } else {
            innerSub = subject.subscribe(this);
          }

          this.add(function () {
            refCount--;
            innerSub.unsubscribe();
            innerSub = undefined;

            if (subscription && !isComplete && useRefCount && refCount === 0) {
              subscription.unsubscribe();
              subscription = undefined;
              subject = undefined;
            }
          });
        };
      } //# sourceMappingURL=shareReplay.js.map

      /***/

    },

    /***/
    "UbJi":
    /*!*******************************************************************************!*\
      !*** ./node_modules/@angular/fire/__ivy_ngcc__/fesm2015/angular-fire-auth.js ***!
      \*******************************************************************************/

    /*! exports provided: AngularFireAuth, AngularFireAuthModule, LANGUAGE_CODE, PERSISTENCE, SETTINGS, TENANT_ID, USE_DEVICE_LANGUAGE, USE_EMULATOR */

    /***/
    function UbJi(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AngularFireAuth", function () {
        return AngularFireAuth;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AngularFireAuthModule", function () {
        return AngularFireAuthModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LANGUAGE_CODE", function () {
        return LANGUAGE_CODE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PERSISTENCE", function () {
        return PERSISTENCE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SETTINGS", function () {
        return SETTINGS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TENANT_ID", function () {
        return TENANT_ID;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "USE_DEVICE_LANGUAGE", function () {
        return USE_DEVICE_LANGUAGE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "USE_EMULATOR", function () {
        return USE_EMULATOR;
      });
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! rxjs */
      "qCKp");
      /* harmony import */


      var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! rxjs/operators */
      "kU1M");
      /* harmony import */


      var _angular_fire__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @angular/fire */
      "spgP");
      /* harmony import */


      var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! @angular/common */
      "ofXK");

      var proxyPolyfillCompat = {
        app: null,
        applyActionCode: null,
        checkActionCode: null,
        confirmPasswordReset: null,
        createUserWithEmailAndPassword: null,
        currentUser: null,
        fetchSignInMethodsForEmail: null,
        isSignInWithEmailLink: null,
        getRedirectResult: null,
        languageCode: null,
        settings: null,
        onAuthStateChanged: null,
        onIdTokenChanged: null,
        sendSignInLinkToEmail: null,
        sendPasswordResetEmail: null,
        setPersistence: null,
        signInAndRetrieveDataWithCredential: null,
        signInAnonymously: null,
        signInWithCredential: null,
        signInWithCustomToken: null,
        signInWithEmailAndPassword: null,
        signInWithPhoneNumber: null,
        signInWithEmailLink: null,
        signInWithPopup: null,
        signInWithRedirect: null,
        signOut: null,
        tenantId: null,
        updateCurrentUser: null,
        useDeviceLanguage: null,
        useEmulator: null,
        verifyPasswordResetCode: null
      };
      var USE_EMULATOR = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('angularfire2.auth.use-emulator');
      var SETTINGS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('angularfire2.auth.settings');
      var TENANT_ID = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('angularfire2.auth.tenant-id');
      var LANGUAGE_CODE = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('angularfire2.auth.langugage-code');
      var USE_DEVICE_LANGUAGE = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('angularfire2.auth.use-device-language');
      var PERSISTENCE = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('angularfire.auth.persistence');

      var AngularFireAuth = function AngularFireAuth(options, nameOrConfig, // tslint:disable-next-line:ban-types
      platformId, zone, _useEmulator, // can't use the tuple here
      _settings, // can't use firebase.auth.AuthSettings here
      tenantId, languageCode, useDeviceLanguage, persistence) {
        _classCallCheck(this, AngularFireAuth);

        var schedulers = new _angular_fire__WEBPACK_IMPORTED_MODULE_3__["ɵAngularFireSchedulers"](zone);
        var keepUnstableUntilFirst = Object(_angular_fire__WEBPACK_IMPORTED_MODULE_3__["ɵkeepUnstableUntilFirstFactory"])(schedulers);
        var logins = new rxjs__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
        var auth = Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(undefined).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["observeOn"])(schedulers.outsideAngular), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["switchMap"])(function () {
          return zone.runOutsideAngular(function () {
            return __webpack_require__.e(
            /*! import() | firebase-auth */
            "firebase-auth").then(__webpack_require__.bind(null,
            /*! firebase/auth */
            "6nsN"));
          });
        }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function () {
          return Object(_angular_fire__WEBPACK_IMPORTED_MODULE_3__["ɵfirebaseAppFactory"])(options, zone, nameOrConfig);
        }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (app) {
          return zone.runOutsideAngular(function () {
            var useEmulator = _useEmulator;
            var settings = _settings;
            return Object(_angular_fire__WEBPACK_IMPORTED_MODULE_3__["ɵfetchInstance"])("".concat(app.name, ".auth"), 'AngularFireAuth', app, function () {
              var auth = zone.runOutsideAngular(function () {
                return app.auth();
              });

              if (useEmulator) {
                // Firebase Auth doesn't conform to the useEmulator convention, let's smooth that over
                auth.useEmulator("http://".concat(useEmulator.join(':')));
              }

              if (tenantId) {
                auth.tenantId = tenantId;
              }

              auth.languageCode = languageCode;

              if (useDeviceLanguage) {
                auth.useDeviceLanguage();
              }

              if (settings) {
                for (var _i19 = 0, _Object$entries = Object.entries(settings); _i19 < _Object$entries.length; _i19++) {
                  var _Object$entries$_i = _slicedToArray(_Object$entries[_i19], 2),
                      k = _Object$entries$_i[0],
                      v = _Object$entries$_i[1];

                  auth.settings[k] = v;
                }
              }

              if (persistence) {
                auth.setPersistence(persistence);
              }

              return auth;
            }, [useEmulator, tenantId, languageCode, useDeviceLanguage, settings, persistence]);
          });
        }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["shareReplay"])({
          bufferSize: 1,
          refCount: false
        }));

        if (Object(_angular_common__WEBPACK_IMPORTED_MODULE_4__["isPlatformServer"])(platformId)) {
          this.authState = this.user = this.idToken = this.idTokenResult = this.credential = Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(null);
        } else {
          // HACK, as we're exporting auth.Auth, rather than auth, developers importing firebase.auth
          //       (e.g, `import { auth } from 'firebase/app'`) are getting an undefined auth object unexpectedly
          //       as we're completely lazy. Let's eagerly load the Auth SDK here.
          //       There could potentially be race conditions still... but this greatly decreases the odds while
          //       we reevaluate the API.
          var _ = auth.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["first"])()).subscribe();

          var redirectResult = auth.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["switchMap"])(function (auth) {
            return auth.getRedirectResult().then(function (it) {
              return it;
            }, function () {
              return null;
            });
          }), keepUnstableUntilFirst, Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["shareReplay"])({
            bufferSize: 1,
            refCount: false
          }));

          var fromCallback = function fromCallback(cb) {
            return new rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"](function (subscriber) {
              return {
                unsubscribe: zone.runOutsideAngular(function () {
                  return cb(subscriber);
                })
              };
            });
          };

          var authStateChanged = auth.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["switchMap"])(function (auth) {
            return fromCallback(auth.onAuthStateChanged.bind(auth));
          }));
          var idTokenChanged = auth.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["switchMap"])(function (auth) {
            return fromCallback(auth.onIdTokenChanged.bind(auth));
          }));
          this.authState = redirectResult.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["switchMapTo"])(authStateChanged), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["subscribeOn"])(schedulers.outsideAngular), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["observeOn"])(schedulers.insideAngular));
          this.user = redirectResult.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["switchMapTo"])(idTokenChanged), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["subscribeOn"])(schedulers.outsideAngular), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["observeOn"])(schedulers.insideAngular));
          this.idToken = this.user.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["switchMap"])(function (user) {
            return user ? Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["from"])(user.getIdToken()) : Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(null);
          }));
          this.idTokenResult = this.user.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["switchMap"])(function (user) {
            return user ? Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["from"])(user.getIdTokenResult()) : Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(null);
          }));
          this.credential = Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["merge"])(redirectResult, logins, // pipe in null authState to make credential zipable, just a weird devexp if
          // authState and user go null to still have a credential
          this.authState.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["filter"])(function (it) {
            return !it;
          }))).pipe( // handle the { user: { } } when a user is already logged in, rather have null
          // TODO handle the type corcersion better
          Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (credential) {
            return (credential === null || credential === void 0 ? void 0 : credential.user) ? credential : null;
          }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["subscribeOn"])(schedulers.outsideAngular), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["observeOn"])(schedulers.insideAngular));
        }

        return Object(_angular_fire__WEBPACK_IMPORTED_MODULE_3__["ɵlazySDKProxy"])(this, auth, zone, {
          spy: {
            apply: function apply(name, _, val) {
              // If they call a signIn or createUser function listen into the promise
              // this will give us the user credential, push onto the logins Subject
              // to be consumed in .credential
              if (name.startsWith('signIn') || name.startsWith('createUser')) {
                // TODO fix the types, the trouble is UserCredential has everything optional
                val.then(function (user) {
                  return logins.next(user);
                });
              }
            }
          }
        });
      };

      AngularFireAuth.ɵfac = function AngularFireAuth_Factory(t) {
        return new (t || AngularFireAuth)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_OPTIONS"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_APP_NAME"], 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](USE_EMULATOR, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](SETTINGS, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](TENANT_ID, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](LANGUAGE_CODE, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](USE_DEVICE_LANGUAGE, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PERSISTENCE, 8));
      };
      /** @nocollapse */


      AngularFireAuth.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        factory: function AngularFireAuth_Factory() {
          return new AngularFireAuth(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_OPTIONS"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_APP_NAME"], 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](USE_EMULATOR, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](SETTINGS, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](TENANT_ID, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](LANGUAGE_CODE, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](USE_DEVICE_LANGUAGE, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PERSISTENCE, 8));
        },
        token: AngularFireAuth,
        providedIn: "any"
      });
      /** @nocollapse */

      AngularFireAuth.ctorParameters = function () {
        return [{
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_OPTIONS"]]
          }]
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_APP_NAME"]]
          }]
        }, {
          type: Object,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]]
          }]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"]
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [USE_EMULATOR]
          }]
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [SETTINGS]
          }]
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [TENANT_ID]
          }]
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [LANGUAGE_CODE]
          }]
        }, {
          type: Boolean,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [USE_DEVICE_LANGUAGE]
          }]
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [PERSISTENCE]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AngularFireAuth, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"],
          args: [{
            providedIn: 'any'
          }]
        }], function () {
          return [{
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_OPTIONS"]]
            }]
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_fire__WEBPACK_IMPORTED_MODULE_3__["FIREBASE_APP_NAME"]]
            }]
          }, {
            type: Object,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]]
            }]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"]
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [USE_EMULATOR]
            }]
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [SETTINGS]
            }]
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [TENANT_ID]
            }]
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [LANGUAGE_CODE]
            }]
          }, {
            type: Boolean,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [USE_DEVICE_LANGUAGE]
            }]
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [PERSISTENCE]
            }]
          }];
        }, null);
      })();

      Object(_angular_fire__WEBPACK_IMPORTED_MODULE_3__["ɵapplyMixins"])(AngularFireAuth, [proxyPolyfillCompat]);

      var AngularFireAuthModule = function AngularFireAuthModule() {
        _classCallCheck(this, AngularFireAuthModule);
      };

      AngularFireAuthModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
        type: AngularFireAuthModule
      });
      AngularFireAuthModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({
        factory: function AngularFireAuthModule_Factory(t) {
          return new (t || AngularFireAuthModule)();
        },
        providers: [AngularFireAuth]
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AngularFireAuthModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
          args: [{
            providers: [AngularFireAuth]
          }]
        }], null, null);
      })();
      /**
       * Generated bundle index. Do not edit.
       */
      //# sourceMappingURL=angular-fire-auth.js.map

      /***/

    },

    /***/
    "VRyK":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/merge.js ***!
      \*****************************************************************/

    /*! exports provided: merge */

    /***/
    function VRyK(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "merge", function () {
        return merge;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/isScheduler */
      "z+Ro");
      /* harmony import */


      var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../operators/mergeAll */
      "bHdf");
      /* harmony import */


      var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./fromArray */
      "yCtX");

      function merge() {
        var concurrent = Number.POSITIVE_INFINITY;
        var scheduler = null;

        for (var _len28 = arguments.length, observables = new Array(_len28), _key29 = 0; _key29 < _len28; _key29++) {
          observables[_key29] = arguments[_key29];
        }

        var last = observables[observables.length - 1];

        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(last)) {
          scheduler = observables.pop();

          if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
            concurrent = observables.pop();
          }
        } else if (typeof last === 'number') {
          concurrent = observables.pop();
        }

        if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
          return observables[0];
        }

        return Object(_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__["mergeAll"])(concurrent)(Object(_fromArray__WEBPACK_IMPORTED_MODULE_3__["fromArray"])(observables, scheduler));
      } //# sourceMappingURL=merge.js.map

      /***/

    },

    /***/
    "VYYF":
    /*!*************************************************************************!*\
      !*** ./node_modules/@ionic-native/status-bar/__ivy_ngcc__/ngx/index.js ***!
      \*************************************************************************/

    /*! exports provided: StatusBar */

    /***/
    function VYYF(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "StatusBar", function () {
        return StatusBar;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _ionic_native_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @ionic-native/core */
      "C6fG");

      var StatusBar =
      /** @class */
      function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(StatusBar, _super);

        function StatusBar() {
          return _super !== null && _super.apply(this, arguments) || this;
        }

        StatusBar.prototype.overlaysWebView = function (doesOverlay) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "overlaysWebView", {
            "sync": true
          }, arguments);
        };

        StatusBar.prototype.styleDefault = function () {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "styleDefault", {
            "sync": true
          }, arguments);
        };

        StatusBar.prototype.styleLightContent = function () {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "styleLightContent", {
            "sync": true
          }, arguments);
        };

        StatusBar.prototype.styleBlackTranslucent = function () {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "styleBlackTranslucent", {
            "sync": true
          }, arguments);
        };

        StatusBar.prototype.styleBlackOpaque = function () {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "styleBlackOpaque", {
            "sync": true
          }, arguments);
        };

        StatusBar.prototype.backgroundColorByName = function (colorName) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "backgroundColorByName", {
            "sync": true
          }, arguments);
        };

        StatusBar.prototype.backgroundColorByHexString = function (hexString) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "backgroundColorByHexString", {
            "sync": true
          }, arguments);
        };

        StatusBar.prototype.hide = function () {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "hide", {
            "sync": true
          }, arguments);
        };

        StatusBar.prototype.show = function () {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "show", {
            "sync": true
          }, arguments);
        };

        Object.defineProperty(StatusBar.prototype, "isVisible", {
          get: function get() {
            return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordovaPropertyGet"])(this, "isVisible");
          },
          set: function set(value) {
            Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordovaPropertySet"])(this, "isVisible", value);
          },
          enumerable: false,
          configurable: true
        });
        StatusBar.pluginName = "StatusBar";
        StatusBar.plugin = "cordova-plugin-statusbar";
        StatusBar.pluginRef = "StatusBar";
        StatusBar.repo = "https://github.com/apache/cordova-plugin-statusbar";
        StatusBar.platforms = ["Android", "iOS", "Windows"];

        StatusBar.ɵfac = function StatusBar_Factory(t) {
          return ɵStatusBar_BaseFactory(t || StatusBar);
        };

        StatusBar.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
          token: StatusBar,
          factory: function factory(t) {
            return StatusBar.ɵfac(t);
          }
        });

        var ɵStatusBar_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetInheritedFactory"](StatusBar);
        /*@__PURE__*/


        (function () {
          _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](StatusBar, [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
          }], null, null);
        })();

        return StatusBar;
      }(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["IonicNativePlugin"]); //# sourceMappingURL=data:application/json;charset=utf-8;base64, 

      /***/

    },

    /***/
    "Vpsf":
    /*!*******************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameAction.js ***!
      \*******************************************************************************/

    /*! exports provided: AnimationFrameAction */

    /***/
    function Vpsf(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AnimationFrameAction", function () {
        return AnimationFrameAction;
      });
      /* harmony import */


      var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./AsyncAction */
      "3N8a");

      var AnimationFrameAction = /*#__PURE__*/function (_AsyncAction__WEBPACK2) {
        _inherits(AnimationFrameAction, _AsyncAction__WEBPACK2);

        var _super195 = _createSuper(AnimationFrameAction);

        function AnimationFrameAction(scheduler, work) {
          var _this425;

          _classCallCheck(this, AnimationFrameAction);

          _this425 = _super195.call(this, scheduler, work);
          _this425.scheduler = scheduler;
          _this425.work = work;
          return _this425;
        }

        _createClass2(AnimationFrameAction, [{
          key: "requestAsyncId",
          value: function requestAsyncId(scheduler, id) {
            var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;

            if (delay !== null && delay > 0) {
              return _get(_getPrototypeOf(AnimationFrameAction.prototype), "requestAsyncId", this).call(this, scheduler, id, delay);
            }

            scheduler.actions.push(this);
            return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () {
              return scheduler.flush(null);
            }));
          }
        }, {
          key: "recycleAsyncId",
          value: function recycleAsyncId(scheduler, id) {
            var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;

            if (delay !== null && delay > 0 || delay === null && this.delay > 0) {
              return _get(_getPrototypeOf(AnimationFrameAction.prototype), "recycleAsyncId", this).call(this, scheduler, id, delay);
            }

            if (scheduler.actions.length === 0) {
              cancelAnimationFrame(id);
              scheduler.scheduled = undefined;
            }

            return undefined;
          }
        }]);

        return AnimationFrameAction;
      }(_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]); //# sourceMappingURL=AnimationFrameAction.js.map

      /***/

    },

    /***/
    "WBcU":
    /*!*****************************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/integrations/dedupe.js ***!
      \*****************************************************************/

    /*! exports provided: Dedupe */

    /***/
    function WBcU(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Dedupe", function () {
        return Dedupe;
      });
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /** Deduplication filter */


      var Dedupe =
      /** @class */
      function () {
        function Dedupe() {
          /**
           * @inheritDoc
           */
          this.name = Dedupe.id;
        }
        /**
         * @inheritDoc
         */


        Dedupe.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) {
          addGlobalEventProcessor(function (currentEvent) {
            var self = getCurrentHub().getIntegration(Dedupe);

            if (self) {
              // Juuust in case something goes wrong
              try {
                if (self._shouldDropEvent(currentEvent, self._previousEvent)) {
                  _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn("Event dropped due to being a duplicate of previously captured event.");

                  return null;
                }
              } catch (_oO) {
                return self._previousEvent = currentEvent;
              }

              return self._previousEvent = currentEvent;
            }

            return currentEvent;
          });
        };
        /** JSDoc */


        Dedupe.prototype._shouldDropEvent = function (currentEvent, previousEvent) {
          if (!previousEvent) {
            return false;
          }

          if (this._isSameMessageEvent(currentEvent, previousEvent)) {
            return true;
          }

          if (this._isSameExceptionEvent(currentEvent, previousEvent)) {
            return true;
          }

          return false;
        };
        /** JSDoc */


        Dedupe.prototype._isSameMessageEvent = function (currentEvent, previousEvent) {
          var currentMessage = currentEvent.message;
          var previousMessage = previousEvent.message; // If neither event has a message property, they were both exceptions, so bail out

          if (!currentMessage && !previousMessage) {
            return false;
          } // If only one event has a stacktrace, but not the other one, they are not the same


          if (currentMessage && !previousMessage || !currentMessage && previousMessage) {
            return false;
          }

          if (currentMessage !== previousMessage) {
            return false;
          }

          if (!this._isSameFingerprint(currentEvent, previousEvent)) {
            return false;
          }

          if (!this._isSameStacktrace(currentEvent, previousEvent)) {
            return false;
          }

          return true;
        };
        /** JSDoc */


        Dedupe.prototype._getFramesFromEvent = function (event) {
          var exception = event.exception;

          if (exception) {
            try {
              // @ts-ignore Object could be undefined
              return exception.values[0].stacktrace.frames;
            } catch (_oO) {
              return undefined;
            }
          } else if (event.stacktrace) {
            return event.stacktrace.frames;
          }

          return undefined;
        };
        /** JSDoc */


        Dedupe.prototype._isSameStacktrace = function (currentEvent, previousEvent) {
          var currentFrames = this._getFramesFromEvent(currentEvent);

          var previousFrames = this._getFramesFromEvent(previousEvent); // If neither event has a stacktrace, they are assumed to be the same


          if (!currentFrames && !previousFrames) {
            return true;
          } // If only one event has a stacktrace, but not the other one, they are not the same


          if (currentFrames && !previousFrames || !currentFrames && previousFrames) {
            return false;
          }

          currentFrames = currentFrames;
          previousFrames = previousFrames; // If number of frames differ, they are not the same

          if (previousFrames.length !== currentFrames.length) {
            return false;
          } // Otherwise, compare the two


          for (var i = 0; i < previousFrames.length; i++) {
            var frameA = previousFrames[i];
            var frameB = currentFrames[i];

            if (frameA.filename !== frameB.filename || frameA.lineno !== frameB.lineno || frameA.colno !== frameB.colno || frameA["function"] !== frameB["function"]) {
              return false;
            }
          }

          return true;
        };
        /** JSDoc */


        Dedupe.prototype._getExceptionFromEvent = function (event) {
          return event.exception && event.exception.values && event.exception.values[0];
        };
        /** JSDoc */


        Dedupe.prototype._isSameExceptionEvent = function (currentEvent, previousEvent) {
          var previousException = this._getExceptionFromEvent(previousEvent);

          var currentException = this._getExceptionFromEvent(currentEvent);

          if (!previousException || !currentException) {
            return false;
          }

          if (previousException.type !== currentException.type || previousException.value !== currentException.value) {
            return false;
          }

          if (!this._isSameFingerprint(currentEvent, previousEvent)) {
            return false;
          }

          if (!this._isSameStacktrace(currentEvent, previousEvent)) {
            return false;
          }

          return true;
        };
        /** JSDoc */


        Dedupe.prototype._isSameFingerprint = function (currentEvent, previousEvent) {
          var currentFingerprint = currentEvent.fingerprint;
          var previousFingerprint = previousEvent.fingerprint; // If neither event has a fingerprint, they are assumed to be the same

          if (!currentFingerprint && !previousFingerprint) {
            return true;
          } // If only one event has a fingerprint, but not the other one, they are not the same


          if (currentFingerprint && !previousFingerprint || !currentFingerprint && previousFingerprint) {
            return false;
          }

          currentFingerprint = currentFingerprint;
          previousFingerprint = previousFingerprint; // Otherwise, compare the two

          try {
            return !!(currentFingerprint.join('') === previousFingerprint.join(''));
          } catch (_oO) {
            return false;
          }
        };
        /**
         * @inheritDoc
         */


        Dedupe.id = 'Dedupe';
        return Dedupe;
      }(); //# sourceMappingURL=dedupe.js.map

      /***/

    },

    /***/
    "WMd4":
    /*!*************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/Notification.js ***!
      \*************************************************************/

    /*! exports provided: NotificationKind, Notification */

    /***/
    function WMd4(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NotificationKind", function () {
        return NotificationKind;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Notification", function () {
        return Notification;
      });
      /* harmony import */


      var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./observable/empty */
      "EY2u");
      /* harmony import */


      var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./observable/of */
      "LRne");
      /* harmony import */


      var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./observable/throwError */
      "z6cu");

      var NotificationKind;

      (function (NotificationKind) {
        NotificationKind["NEXT"] = "N";
        NotificationKind["ERROR"] = "E";
        NotificationKind["COMPLETE"] = "C";
      })(NotificationKind || (NotificationKind = {}));

      var Notification = /*#__PURE__*/function () {
        function Notification(kind, value, error) {
          _classCallCheck(this, Notification);

          this.kind = kind;
          this.value = value;
          this.error = error;
          this.hasValue = kind === 'N';
        }

        _createClass2(Notification, [{
          key: "observe",
          value: function observe(observer) {
            switch (this.kind) {
              case 'N':
                return observer.next && observer.next(this.value);

              case 'E':
                return observer.error && observer.error(this.error);

              case 'C':
                return observer.complete && observer.complete();
            }
          }
        }, {
          key: "do",
          value: function _do(next, error, complete) {
            var kind = this.kind;

            switch (kind) {
              case 'N':
                return next && next(this.value);

              case 'E':
                return error && error(this.error);

              case 'C':
                return complete && complete();
            }
          }
        }, {
          key: "accept",
          value: function accept(nextOrObserver, error, complete) {
            if (nextOrObserver && typeof nextOrObserver.next === 'function') {
              return this.observe(nextOrObserver);
            } else {
              return this["do"](nextOrObserver, error, complete);
            }
          }
        }, {
          key: "toObservable",
          value: function toObservable() {
            var kind = this.kind;

            switch (kind) {
              case 'N':
                return Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(this.value);

              case 'E':
                return Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_2__["throwError"])(this.error);

              case 'C':
                return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_0__["empty"])();
            }

            throw new Error('unexpected notification kind value');
          }
        }], [{
          key: "createNext",
          value: function createNext(value) {
            if (typeof value !== 'undefined') {
              return new Notification('N', value);
            }

            return Notification.undefinedValueNotification;
          }
        }, {
          key: "createError",
          value: function createError(err) {
            return new Notification('E', undefined, err);
          }
        }, {
          key: "createComplete",
          value: function createComplete() {
            return Notification.completeNotification;
          }
        }]);

        return Notification;
      }();

      Notification.completeNotification = new Notification('C');
      Notification.undefinedValueNotification = new Notification('N', undefined); //# sourceMappingURL=Notification.js.map

      /***/
    },

    /***/
    "WPMC":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/generate.js ***!
      \********************************************************************/

    /*! exports provided: generate */

    /***/
    function WPMC(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "generate", function () {
        return generate;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/identity */
      "SpAZ");
      /* harmony import */


      var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../util/isScheduler */
      "z+Ro");

      function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {
        var resultSelector;
        var initialState;

        if (arguments.length == 1) {
          var options = initialStateOrOptions;
          initialState = options.initialState;
          condition = options.condition;
          iterate = options.iterate;
          resultSelector = options.resultSelector || _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
          scheduler = options.scheduler;
        } else if (resultSelectorOrObservable === undefined || Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(resultSelectorOrObservable)) {
          initialState = initialStateOrOptions;
          resultSelector = _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
          scheduler = resultSelectorOrObservable;
        } else {
          initialState = initialStateOrOptions;
          resultSelector = resultSelectorOrObservable;
        }

        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          var state = initialState;

          if (scheduler) {
            return scheduler.schedule(dispatch, 0, {
              subscriber: subscriber,
              iterate: iterate,
              condition: condition,
              resultSelector: resultSelector,
              state: state
            });
          }

          do {
            if (condition) {
              var conditionResult = void 0;

              try {
                conditionResult = condition(state);
              } catch (err) {
                subscriber.error(err);
                return undefined;
              }

              if (!conditionResult) {
                subscriber.complete();
                break;
              }
            }

            var value = void 0;

            try {
              value = resultSelector(state);
            } catch (err) {
              subscriber.error(err);
              return undefined;
            }

            subscriber.next(value);

            if (subscriber.closed) {
              break;
            }

            try {
              state = iterate(state);
            } catch (err) {
              subscriber.error(err);
              return undefined;
            }
          } while (true);

          return undefined;
        });
      }

      function dispatch(state) {
        var subscriber = state.subscriber,
            condition = state.condition;

        if (subscriber.closed) {
          return undefined;
        }

        if (state.needIterate) {
          try {
            state.state = state.iterate(state.state);
          } catch (err) {
            subscriber.error(err);
            return undefined;
          }
        } else {
          state.needIterate = true;
        }

        if (condition) {
          var conditionResult;

          try {
            conditionResult = condition(state.state);
          } catch (err) {
            subscriber.error(err);
            return undefined;
          }

          if (!conditionResult) {
            subscriber.complete();
            return undefined;
          }

          if (subscriber.closed) {
            return undefined;
          }
        }

        var value;

        try {
          value = state.resultSelector(state.state);
        } catch (err) {
          subscriber.error(err);
          return undefined;
        }

        if (subscriber.closed) {
          return undefined;
        }

        subscriber.next(value);

        if (subscriber.closed) {
          return undefined;
        }

        return this.schedule(state);
      } //# sourceMappingURL=generate.js.map

      /***/

    },

    /***/
    "WSEr":
    /*!***************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/index.js ***!
      \***************************************************/

    /*! exports provided: Severity, Status, addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, makeMain, Scope, startTransaction, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, BrowserClient, injectReportDialog, eventFromException, eventFromMessage, defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog, flush, close, wrap, SDK_NAME, Integrations, Transports */

    /***/
    function WSEr(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Integrations", function () {
        return INTEGRATIONS;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _exports__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./exports */
      "9fYY");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Severity", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["Severity"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Status", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["Status"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "addGlobalEventProcessor", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["addGlobalEventProcessor"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "addBreadcrumb", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["addBreadcrumb"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "captureException", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["captureException"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "captureEvent", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["captureEvent"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "captureMessage", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["captureMessage"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "configureScope", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["configureScope"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getHubFromCarrier", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["getHubFromCarrier"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getCurrentHub", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Hub", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["Hub"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "makeMain", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["makeMain"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Scope", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["Scope"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "startTransaction", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["startTransaction"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "SDK_VERSION", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["SDK_VERSION"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setContext", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["setContext"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setExtra", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["setExtra"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setExtras", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["setExtras"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setTag", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["setTag"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setTags", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["setTags"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setUser", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["setUser"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "withScope", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["withScope"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "BrowserClient", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["BrowserClient"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "injectReportDialog", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["injectReportDialog"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "eventFromException", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["eventFromException"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "eventFromMessage", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["eventFromMessage"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "defaultIntegrations", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["defaultIntegrations"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "forceLoad", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["forceLoad"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "init", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["init"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "lastEventId", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["lastEventId"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "onLoad", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["onLoad"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "showReportDialog", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["showReportDialog"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "flush", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["flush"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "close", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["close"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "wrap", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["wrap"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "SDK_NAME", function () {
        return _exports__WEBPACK_IMPORTED_MODULE_1__["SDK_NAME"];
      });
      /* harmony import */


      var _sentry_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/core */
      "wBhU");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _integrations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./integrations */
      "4kjc");
      /* harmony import */


      var _transports__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./transports */
      "nXHh");
      /* harmony reexport (module object) */


      __webpack_require__.d(__webpack_exports__, "Transports", function () {
        return _transports__WEBPACK_IMPORTED_MODULE_5__;
      });

      var windowIntegrations = {}; // This block is needed to add compatibility with the integrations packages when used with a CDN

      var _window = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["getGlobalObject"])();

      if (_window.Sentry && _window.Sentry.Integrations) {
        windowIntegrations = _window.Sentry.Integrations;
      }

      var INTEGRATIONS = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, windowIntegrations), _sentry_core__WEBPACK_IMPORTED_MODULE_2__["Integrations"]), _integrations__WEBPACK_IMPORTED_MODULE_4__); //# sourceMappingURL=index.js.map

      /***/
    },

    /***/
    "WjI+":
    /*!****************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/integrations/index.js ***!
      \****************************************************************/

    /*! exports provided: Express, Postgres, Mysql, Mongo */

    /***/
    function WjI(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _node_express__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./node/express */
      "mvbY");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Express", function () {
        return _node_express__WEBPACK_IMPORTED_MODULE_0__["Express"];
      });
      /* harmony import */


      var _node_postgres__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./node/postgres */
      "SXEm");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Postgres", function () {
        return _node_postgres__WEBPACK_IMPORTED_MODULE_1__["Postgres"];
      });
      /* harmony import */


      var _node_mysql__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./node/mysql */
      "PjJh");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Mysql", function () {
        return _node_mysql__WEBPACK_IMPORTED_MODULE_2__["Mysql"];
      });
      /* harmony import */


      var _node_mongo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./node/mongo */
      "0G76");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Mongo", function () {
        return _node_mongo__WEBPACK_IMPORTED_MODULE_3__["Mongo"];
      }); //# sourceMappingURL=index.js.map

      /***/

    },

    /***/
    "WyKG":
    /*!******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/toSubscriber.js ***!
      \******************************************************************/

    /*! exports provided: toSubscriber */

    /***/
    function WyKG(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "toSubscriber", function () {
        return toSubscriber;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../symbol/rxSubscriber */
      "2QA8");
      /* harmony import */


      var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../Observer */
      "gRHU");

      function toSubscriber(nextOrObserver, error, complete) {
        if (nextOrObserver) {
          if (nextOrObserver instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
            return nextOrObserver;
          }

          if (nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]) {
            return nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]();
          }
        }

        if (!nextOrObserver && !error && !complete) {
          return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](_Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]);
        }

        return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](nextOrObserver, error, complete);
      } //# sourceMappingURL=toSubscriber.js.map

      /***/

    },

    /***/
    "XDbj":
    /*!***********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/throwIfEmpty.js ***!
      \***********************************************************************/

    /*! exports provided: throwIfEmpty */

    /***/
    function XDbj(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function () {
        return throwIfEmpty;
      });
      /* harmony import */


      var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../util/EmptyError */
      "sVev");
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function throwIfEmpty() {
        var errorFactory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultErrorFactory;
        return function (source) {
          return source.lift(new ThrowIfEmptyOperator(errorFactory));
        };
      }

      var ThrowIfEmptyOperator = /*#__PURE__*/function () {
        function ThrowIfEmptyOperator(errorFactory) {
          _classCallCheck(this, ThrowIfEmptyOperator);

          this.errorFactory = errorFactory;
        }

        _createClass2(ThrowIfEmptyOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));
          }
        }]);

        return ThrowIfEmptyOperator;
      }();

      var ThrowIfEmptySubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_24) {
        _inherits(ThrowIfEmptySubscriber, _Subscriber__WEBPACK_24);

        var _super196 = _createSuper(ThrowIfEmptySubscriber);

        function ThrowIfEmptySubscriber(destination, errorFactory) {
          var _this426;

          _classCallCheck(this, ThrowIfEmptySubscriber);

          _this426 = _super196.call(this, destination);
          _this426.errorFactory = errorFactory;
          _this426.hasValue = false;
          return _this426;
        }

        _createClass2(ThrowIfEmptySubscriber, [{
          key: "_next",
          value: function _next(value) {
            this.hasValue = true;
            this.destination.next(value);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            if (!this.hasValue) {
              var err;

              try {
                err = this.errorFactory();
              } catch (e) {
                err = e;
              }

              this.destination.error(err);
            } else {
              return this.destination.complete();
            }
          }
        }]);

        return ThrowIfEmptySubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]);

      function defaultErrorFactory() {
        return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"]();
      } //# sourceMappingURL=throwIfEmpty.js.map

      /***/

    },

    /***/
    "XNiG":
    /*!********************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/Subject.js ***!
      \********************************************************/

    /*! exports provided: SubjectSubscriber, Subject, AnonymousSubject */

    /***/
    function XNiG(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SubjectSubscriber", function () {
        return SubjectSubscriber;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Subject", function () {
        return Subject;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AnonymousSubject", function () {
        return AnonymousSubject;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./Observable */
      "HDdC");
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./Subscriber */
      "7o/Q");
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./Subscription */
      "quSY");
      /* harmony import */


      var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./util/ObjectUnsubscribedError */
      "9ppp");
      /* harmony import */


      var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./SubjectSubscription */
      "Ylt2");
      /* harmony import */


      var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ../internal/symbol/rxSubscriber */
      "2QA8");

      var SubjectSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_25) {
        _inherits(SubjectSubscriber, _Subscriber__WEBPACK_25);

        var _super197 = _createSuper(SubjectSubscriber);

        function SubjectSubscriber(destination) {
          var _this427;

          _classCallCheck(this, SubjectSubscriber);

          _this427 = _super197.call(this, destination);
          _this427.destination = destination;
          return _this427;
        }

        return SubjectSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]);

      var Subject = /*#__PURE__*/function (_Observable__WEBPACK_4, _internal_symbol_rxSu2) {
        _inherits(Subject, _Observable__WEBPACK_4);

        var _super198 = _createSuper(Subject);

        function Subject() {
          var _this428;

          _classCallCheck(this, Subject);

          _this428 = _super198.call(this);
          _this428.observers = [];
          _this428.closed = false;
          _this428.isStopped = false;
          _this428.hasError = false;
          _this428.thrownError = null;
          return _this428;
        }

        _createClass2(Subject, [{
          key: _internal_symbol_rxSu2,
          value: function value() {
            return new SubjectSubscriber(this);
          }
        }, {
          key: "lift",
          value: function lift(operator) {
            var subject = new AnonymousSubject(this, this);
            subject.operator = operator;
            return subject;
          }
        }, {
          key: "next",
          value: function next(value) {
            if (this.closed) {
              throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"]();
            }

            if (!this.isStopped) {
              var observers = this.observers;
              var len = observers.length;
              var copy = observers.slice();

              for (var i = 0; i < len; i++) {
                copy[i].next(value);
              }
            }
          }
        }, {
          key: "error",
          value: function error(err) {
            if (this.closed) {
              throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"]();
            }

            this.hasError = true;
            this.thrownError = err;
            this.isStopped = true;
            var observers = this.observers;
            var len = observers.length;
            var copy = observers.slice();

            for (var i = 0; i < len; i++) {
              copy[i].error(err);
            }

            this.observers.length = 0;
          }
        }, {
          key: "complete",
          value: function complete() {
            if (this.closed) {
              throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"]();
            }

            this.isStopped = true;
            var observers = this.observers;
            var len = observers.length;
            var copy = observers.slice();

            for (var i = 0; i < len; i++) {
              copy[i].complete();
            }

            this.observers.length = 0;
          }
        }, {
          key: "unsubscribe",
          value: function unsubscribe() {
            this.isStopped = true;
            this.closed = true;
            this.observers = null;
          }
        }, {
          key: "_trySubscribe",
          value: function _trySubscribe(subscriber) {
            if (this.closed) {
              throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"]();
            } else {
              return _get(_getPrototypeOf(Subject.prototype), "_trySubscribe", this).call(this, subscriber);
            }
          }
        }, {
          key: "_subscribe",
          value: function _subscribe(subscriber) {
            if (this.closed) {
              throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"]();
            } else if (this.hasError) {
              subscriber.error(this.thrownError);
              return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
            } else if (this.isStopped) {
              subscriber.complete();
              return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
            } else {
              this.observers.push(subscriber);
              return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_4__["SubjectSubscription"](this, subscriber);
            }
          }
        }, {
          key: "asObservable",
          value: function asObservable() {
            var observable = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]();
            observable.source = this;
            return observable;
          }
        }]);

        return Subject;
      }(_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"], _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_5__["rxSubscriber"]);

      Subject.create = function (destination, source) {
        return new AnonymousSubject(destination, source);
      };

      var AnonymousSubject = /*#__PURE__*/function (_Subject) {
        _inherits(AnonymousSubject, _Subject);

        var _super199 = _createSuper(AnonymousSubject);

        function AnonymousSubject(destination, source) {
          var _this429;

          _classCallCheck(this, AnonymousSubject);

          _this429 = _super199.call(this);
          _this429.destination = destination;
          _this429.source = source;
          return _this429;
        }

        _createClass2(AnonymousSubject, [{
          key: "next",
          value: function next(value) {
            var destination = this.destination;

            if (destination && destination.next) {
              destination.next(value);
            }
          }
        }, {
          key: "error",
          value: function error(err) {
            var destination = this.destination;

            if (destination && destination.error) {
              this.destination.error(err);
            }
          }
        }, {
          key: "complete",
          value: function complete() {
            var destination = this.destination;

            if (destination && destination.complete) {
              this.destination.complete();
            }
          }
        }, {
          key: "_subscribe",
          value: function _subscribe(subscriber) {
            var source = this.source;

            if (source) {
              return this.source.subscribe(subscriber);
            } else {
              return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
            }
          }
        }]);

        return AnonymousSubject;
      }(Subject); //# sourceMappingURL=Subject.js.map

      /***/

    },

    /***/
    "XoHu":
    /*!**************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/isObject.js ***!
      \**************************************************************/

    /*! exports provided: isObject */

    /***/
    function XoHu(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isObject", function () {
        return isObject;
      });

      function isObject(x) {
        return x !== null && typeof x === 'object';
      } //# sourceMappingURL=isObject.js.map

      /***/

    },

    /***/
    "XqQ8":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/exhaustMap.js ***!
      \*********************************************************************/

    /*! exports provided: exhaustMap */

    /***/
    function XqQ8(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "exhaustMap", function () {
        return exhaustMap;
      });
      /* harmony import */


      var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./map */
      "lJxs");
      /* harmony import */


      var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../observable/from */
      "Cfvw");
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function exhaustMap(project, resultSelector) {
        if (resultSelector) {
          return function (source) {
            return source.pipe(exhaustMap(function (a, i) {
              return Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])(function (b, ii) {
                return resultSelector(a, b, i, ii);
              }));
            }));
          };
        }

        return function (source) {
          return source.lift(new ExhaustMapOperator(project));
        };
      }

      var ExhaustMapOperator = /*#__PURE__*/function () {
        function ExhaustMapOperator(project) {
          _classCallCheck(this, ExhaustMapOperator);

          this.project = project;
        }

        _createClass2(ExhaustMapOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));
          }
        }]);

        return ExhaustMapOperator;
      }();

      var ExhaustMapSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP12) {
        _inherits(ExhaustMapSubscriber, _innerSubscribe__WEBP12);

        var _super200 = _createSuper(ExhaustMapSubscriber);

        function ExhaustMapSubscriber(destination, project) {
          var _this430;

          _classCallCheck(this, ExhaustMapSubscriber);

          _this430 = _super200.call(this, destination);
          _this430.project = project;
          _this430.hasSubscription = false;
          _this430.hasCompleted = false;
          _this430.index = 0;
          return _this430;
        }

        _createClass2(ExhaustMapSubscriber, [{
          key: "_next",
          value: function _next(value) {
            if (!this.hasSubscription) {
              this.tryNext(value);
            }
          }
        }, {
          key: "tryNext",
          value: function tryNext(value) {
            var result;
            var index = this.index++;

            try {
              result = this.project(value, index);
            } catch (err) {
              this.destination.error(err);
              return;
            }

            this.hasSubscription = true;

            this._innerSub(result);
          }
        }, {
          key: "_innerSub",
          value: function _innerSub(result) {
            var innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this);
            var destination = this.destination;
            destination.add(innerSubscriber);
            var innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(result, innerSubscriber);

            if (innerSubscription !== innerSubscriber) {
              destination.add(innerSubscription);
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.hasCompleted = true;

            if (!this.hasSubscription) {
              this.destination.complete();
            }

            this.unsubscribe();
          }
        }, {
          key: "notifyNext",
          value: function notifyNext(innerValue) {
            this.destination.next(innerValue);
          }
        }, {
          key: "notifyError",
          value: function notifyError(err) {
            this.destination.error(err);
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            this.hasSubscription = false;

            if (this.hasCompleted) {
              this.destination.complete();
            }
          }
        }]);

        return ExhaustMapSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"]); //# sourceMappingURL=exhaustMap.js.map

      /***/

    },

    /***/
    "XsXS":
    /*!*********************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/promisebuffer.js ***!
      \*********************************************************/

    /*! exports provided: PromiseBuffer */

    /***/
    function XsXS(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PromiseBuffer", function () {
        return PromiseBuffer;
      });
      /* harmony import */


      var _error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./error */
      "9Pyj");
      /* harmony import */


      var _syncpromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./syncpromise */
      "HR75");
      /** A simple queue that holds promises. */


      var PromiseBuffer =
      /** @class */
      function () {
        function PromiseBuffer(_limit) {
          this._limit = _limit;
          /** Internal set of queued Promises */

          this._buffer = [];
        }
        /**
         * Says if the buffer is ready to take more requests
         */


        PromiseBuffer.prototype.isReady = function () {
          return this._limit === undefined || this.length() < this._limit;
        };
        /**
         * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.
         *
         * @param taskProducer A function producing any PromiseLike<T>; In previous versions this used to be `task:
         *        PromiseLike<T>`, but under that model, Promises were instantly created on the call-site and their executor
         *        functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By
         *        requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer
         *        limit check.
         * @returns The original promise.
         */


        PromiseBuffer.prototype.add = function (taskProducer) {
          var _this = this;

          if (!this.isReady()) {
            return _syncpromise__WEBPACK_IMPORTED_MODULE_1__["SyncPromise"].reject(new _error__WEBPACK_IMPORTED_MODULE_0__["SentryError"]('Not adding Promise due to buffer limit reached.'));
          } // start the task and add its promise to the queue


          var task = taskProducer();

          if (this._buffer.indexOf(task) === -1) {
            this._buffer.push(task);
          }

          void task.then(function () {
            return _this.remove(task);
          }) // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`
          // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't
          // have promises, so TS has to polyfill when down-compiling.)
          .then(null, function () {
            return _this.remove(task).then(null, function () {// We have to add another catch here because `this.remove()` starts a new promise chain.
            });
          });
          return task;
        };
        /**
         * Remove a promise from the queue.
         *
         * @param task Can be any PromiseLike<T>
         * @returns Removed promise.
         */


        PromiseBuffer.prototype.remove = function (task) {
          var removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];

          return removedTask;
        };
        /**
         * This function returns the number of unresolved promises in the queue.
         */


        PromiseBuffer.prototype.length = function () {
          return this._buffer.length;
        };
        /**
         * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.
         *
         * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or
         * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to
         * `true`.
         * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and
         * `false` otherwise
         */


        PromiseBuffer.prototype.drain = function (timeout) {
          var _this = this;

          return new _syncpromise__WEBPACK_IMPORTED_MODULE_1__["SyncPromise"](function (resolve) {
            // wait for `timeout` ms and then resolve to `false` (if not cancelled first)
            var capturedSetTimeout = setTimeout(function () {
              if (timeout && timeout > 0) {
                resolve(false);
              }
            }, timeout); // if all promises resolve in time, cancel the timer and resolve to `true`

            void _syncpromise__WEBPACK_IMPORTED_MODULE_1__["SyncPromise"].all(_this._buffer).then(function () {
              clearTimeout(capturedSetTimeout);
              resolve(true);
            }).then(null, function () {
              resolve(true);
            });
          });
        };

        return PromiseBuffer;
      }(); //# sourceMappingURL=promisebuffer.js.map

      /***/

    },

    /***/
    "Y/cZ":
    /*!**********************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/Scheduler.js ***!
      \**********************************************************/

    /*! exports provided: Scheduler */

    /***/
    function YCZ(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Scheduler", function () {
        return Scheduler;
      });

      var Scheduler = /*#__PURE__*/function () {
        function Scheduler(SchedulerAction) {
          var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Scheduler.now;

          _classCallCheck(this, Scheduler);

          this.SchedulerAction = SchedulerAction;
          this.now = now;
        }

        _createClass2(Scheduler, [{
          key: "schedule",
          value: function schedule(work) {
            var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
            var state = arguments.length > 2 ? arguments[2] : undefined;
            return new this.SchedulerAction(this, work).schedule(state, delay);
          }
        }]);

        return Scheduler;
      }();

      Scheduler.now = function () {
        return Date.now();
      }; //# sourceMappingURL=Scheduler.js.map

      /***/

    },

    /***/
    "Y47q":
    /*!****************************************************************!*\
      !*** ./node_modules/@capacitor/device/dist/esm/definitions.js ***!
      \****************************************************************/

    /*! no exports provided */

    /***/
    function Y47q(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=definitions.js.map

      /***/

    },

    /***/
    "Y6u4":
    /*!******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/TimeoutError.js ***!
      \******************************************************************/

    /*! exports provided: TimeoutError */

    /***/
    function Y6u4(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TimeoutError", function () {
        return TimeoutError;
      });

      var TimeoutErrorImpl = function () {
        function TimeoutErrorImpl() {
          Error.call(this);
          this.message = 'Timeout has occurred';
          this.name = 'TimeoutError';
          return this;
        }

        TimeoutErrorImpl.prototype = Object.create(Error.prototype);
        return TimeoutErrorImpl;
      }();

      var TimeoutError = TimeoutErrorImpl; //# sourceMappingURL=TimeoutError.js.map

      /***/
    },

    /***/
    "Y6wi":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/switchAll.js ***!
      \********************************************************************/

    /*! exports provided: switchAll */

    /***/
    function Y6wi(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "switchAll", function () {
        return switchAll;
      });
      /* harmony import */


      var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./switchMap */
      "eIep");
      /* harmony import */


      var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/identity */
      "SpAZ");

      function switchAll() {
        return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]);
      } //# sourceMappingURL=switchAll.js.map

      /***/

    },

    /***/
    "Y7HM":
    /*!***************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/isNumeric.js ***!
      \***************************************************************/

    /*! exports provided: isNumeric */

    /***/
    function Y7HM(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isNumeric", function () {
        return isNumeric;
      });
      /* harmony import */


      var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./isArray */
      "DH7j");

      function isNumeric(val) {
        return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(val) && val - parseFloat(val) + 1 >= 0;
      } //# sourceMappingURL=isNumeric.js.map

      /***/

    },

    /***/
    "Ylt2":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/SubjectSubscription.js ***!
      \********************************************************************/

    /*! exports provided: SubjectSubscription */

    /***/
    function Ylt2(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SubjectSubscription", function () {
        return SubjectSubscription;
      });
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./Subscription */
      "quSY");

      var SubjectSubscription = /*#__PURE__*/function (_Subscription__WEBPAC4) {
        _inherits(SubjectSubscription, _Subscription__WEBPAC4);

        var _super201 = _createSuper(SubjectSubscription);

        function SubjectSubscription(subject, subscriber) {
          var _this431;

          _classCallCheck(this, SubjectSubscription);

          _this431 = _super201.call(this);
          _this431.subject = subject;
          _this431.subscriber = subscriber;
          _this431.closed = false;
          return _this431;
        }

        _createClass2(SubjectSubscription, [{
          key: "unsubscribe",
          value: function unsubscribe() {
            if (this.closed) {
              return;
            }

            this.closed = true;
            var subject = this.subject;
            var observers = subject.observers;
            this.subject = null;

            if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
              return;
            }

            var subscriberIndex = observers.indexOf(this.subscriber);

            if (subscriberIndex !== -1) {
              observers.splice(subscriberIndex, 1);
            }
          }
        }]);

        return SubjectSubscription;
      }(_Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"]); //# sourceMappingURL=SubjectSubscription.js.map

      /***/

    },

    /***/
    "YuR2":
    /*!**********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduler/QueueAction.js ***!
      \**********************************************************************/

    /*! exports provided: QueueAction */

    /***/
    function YuR2(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "QueueAction", function () {
        return QueueAction;
      });
      /* harmony import */


      var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./AsyncAction */
      "3N8a");

      var QueueAction = /*#__PURE__*/function (_AsyncAction__WEBPACK3) {
        _inherits(QueueAction, _AsyncAction__WEBPACK3);

        var _super202 = _createSuper(QueueAction);

        function QueueAction(scheduler, work) {
          var _this432;

          _classCallCheck(this, QueueAction);

          _this432 = _super202.call(this, scheduler, work);
          _this432.scheduler = scheduler;
          _this432.work = work;
          return _this432;
        }

        _createClass2(QueueAction, [{
          key: "schedule",
          value: function schedule(state) {
            var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;

            if (delay > 0) {
              return _get(_getPrototypeOf(QueueAction.prototype), "schedule", this).call(this, state, delay);
            }

            this.delay = delay;
            this.state = state;
            this.scheduler.flush(this);
            return this;
          }
        }, {
          key: "execute",
          value: function execute(state, delay) {
            return delay > 0 || this.closed ? _get(_getPrototypeOf(QueueAction.prototype), "execute", this).call(this, state, delay) : this._execute(state, delay);
          }
        }, {
          key: "requestAsyncId",
          value: function requestAsyncId(scheduler, id) {
            var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;

            if (delay !== null && delay > 0 || delay === null && this.delay > 0) {
              return _get(_getPrototypeOf(QueueAction.prototype), "requestAsyncId", this).call(this, scheduler, id, delay);
            }

            return scheduler.flush(this);
          }
        }]);

        return QueueAction;
      }(_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]); //# sourceMappingURL=QueueAction.js.map

      /***/

    },

    /***/
    "ZAf6":
    /*!***********************************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/integrations/linkederrors.js ***!
      \***********************************************************************/

    /*! exports provided: LinkedErrors */

    /***/
    function ZAf6(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LinkedErrors", function () {
        return LinkedErrors;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/core */
      "wBhU");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _parsers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../parsers */
      "hj4m");
      /* harmony import */


      var _tracekit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ../tracekit */
      "yCKT");

      var DEFAULT_KEY = 'cause';
      var DEFAULT_LIMIT = 5;
      /** Adds SDK info to an event. */

      var LinkedErrors =
      /** @class */
      function () {
        /**
         * @inheritDoc
         */
        function LinkedErrors(options) {
          if (options === void 0) {
            options = {};
          }
          /**
           * @inheritDoc
           */


          this.name = LinkedErrors.id;
          this._key = options.key || DEFAULT_KEY;
          this._limit = options.limit || DEFAULT_LIMIT;
        }
        /**
         * @inheritDoc
         */


        LinkedErrors.prototype.setupOnce = function () {
          Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["addGlobalEventProcessor"])(function (event, hint) {
            var self = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])().getIntegration(LinkedErrors);

            if (self) {
              var handler = self._handler && self._handler.bind(self);

              return typeof handler === 'function' ? handler(event, hint) : event;
            }

            return event;
          });
        };
        /**
         * @inheritDoc
         */


        LinkedErrors.prototype._handler = function (event, hint) {
          if (!event.exception || !event.exception.values || !hint || !Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["isInstanceOf"])(hint.originalException, Error)) {
            return event;
          }

          var linkedErrors = this._walkErrorTree(hint.originalException, this._key);

          event.exception.values = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(linkedErrors, event.exception.values);
          return event;
        };
        /**
         * @inheritDoc
         */


        LinkedErrors.prototype._walkErrorTree = function (error, key, stack) {
          if (stack === void 0) {
            stack = [];
          }

          if (!Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["isInstanceOf"])(error[key], Error) || stack.length + 1 >= this._limit) {
            return stack;
          }

          var stacktrace = Object(_tracekit__WEBPACK_IMPORTED_MODULE_4__["computeStackTrace"])(error[key]);
          var exception = Object(_parsers__WEBPACK_IMPORTED_MODULE_3__["exceptionFromStacktrace"])(stacktrace);
          return this._walkErrorTree(error[key], key, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([exception], stack));
        };
        /**
         * @inheritDoc
         */


        LinkedErrors.id = 'LinkedErrors';
        return LinkedErrors;
      }(); //# sourceMappingURL=linkederrors.js.map

      /***/

    },

    /***/
    "ZOsW":
    /*!****************************************************************************************!*\
      !*** ./node_modules/@ng-select/ng-select/__ivy_ngcc__/fesm2015/ng-select-ng-select.js ***!
      \****************************************************************************************/

    /*! exports provided: NgSelectComponent, NgSelectConfig, NgSelectModule, SELECTION_MODEL_FACTORY, ɵb, ɵc, ɵd, ɵe, ɵf, ɵg, ɵh, ɵi, ɵj, ɵk, ɵl, ɵm, ɵn, ɵo, ɵp, ɵq, ɵr, ɵs */

    /***/
    function ZOsW(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgSelectComponent", function () {
        return NgSelectComponent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgSelectConfig", function () {
        return NgSelectConfig;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgSelectModule", function () {
        return NgSelectModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SELECTION_MODEL_FACTORY", function () {
        return SELECTION_MODEL_FACTORY;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵb", function () {
        return DefaultSelectionModelFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵc", function () {
        return DefaultSelectionModel;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵd", function () {
        return NgDropdownPanelService;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵe", function () {
        return NgItemLabelDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵf", function () {
        return NgOptionTemplateDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵg", function () {
        return NgOptgroupTemplateDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵh", function () {
        return NgLabelTemplateDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵi", function () {
        return NgMultiLabelTemplateDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵj", function () {
        return NgHeaderTemplateDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵk", function () {
        return NgFooterTemplateDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵl", function () {
        return NgNotFoundTemplateDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵm", function () {
        return NgTypeToSearchTemplateDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵn", function () {
        return NgLoadingTextTemplateDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵo", function () {
        return NgTagTemplateDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵp", function () {
        return NgLoadingSpinnerTemplateDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵq", function () {
        return NgDropdownPanelComponent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵr", function () {
        return NgOptionComponent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵs", function () {
        return ConsoleService;
      });
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/forms */
      "3Pt+");
      /* harmony import */


      var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! rxjs/operators */
      "kU1M");
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! rxjs */
      "qCKp");
      /* harmony import */


      var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! @angular/common */
      "ofXK");

      var _c0 = ["content"];
      var _c1 = ["scroll"];
      var _c2 = ["padding"];

      var _c3 = function _c3(a0) {
        return {
          searchTerm: a0
        };
      };

      function NgDropdownPanelComponent_div_0_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 6);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainer"](1, 7);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngTemplateOutlet", ctx_r0.headerTemplate)("ngTemplateOutletContext", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction1"](2, _c3, ctx_r0.filterValue));
        }
      }

      function NgDropdownPanelComponent_div_8_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 8);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainer"](1, 7);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngTemplateOutlet", ctx_r4.footerTemplate)("ngTemplateOutletContext", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction1"](2, _c3, ctx_r4.filterValue));
        }
      }

      var _c4 = ["*"];
      var _c5 = ["searchInput"];

      function NgSelectComponent_ng_container_4_div_1_ng_template_1_Template(rf, ctx) {
        if (rf & 1) {
          var _r13 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "span", 15);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function NgSelectComponent_ng_container_4_div_1_ng_template_1_Template_span_click_0_listener() {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r13);

            var item_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]().$implicit;

            var ctx_r11 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);

            return ctx_r11.unselect(item_r7);
          });

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1, "\xD7");

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](2, "span", 16);
        }

        if (rf & 2) {
          var item_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]().$implicit;

          var ctx_r9 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngItemLabel", item_r7.label)("escape", ctx_r9.escapeHTML);
        }
      }

      function NgSelectComponent_ng_container_4_div_1_ng_template_3_Template(rf, ctx) {}

      var _c6 = function _c6(a0, a1, a2) {
        return {
          item: a0,
          clear: a1,
          label: a2
        };
      };

      function NgSelectComponent_ng_container_4_div_1_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 12);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, NgSelectComponent_ng_container_4_div_1_ng_template_1_Template, 3, 2, "ng-template", null, 13, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplateRefExtractor"]);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](3, NgSelectComponent_ng_container_4_div_1_ng_template_3_Template, 0, 0, "ng-template", 14);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var item_r7 = ctx.$implicit;

          var _r8 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](2);

          var ctx_r6 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("ng-value-disabled", item_r7.disabled);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngTemplateOutlet", ctx_r6.labelTemplate || _r8)("ngTemplateOutletContext", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction3"](4, _c6, item_r7.value, ctx_r6.clearItem, item_r7.label));
        }
      }

      function NgSelectComponent_ng_container_4_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerStart"](0);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, NgSelectComponent_ng_container_4_div_1_Template, 4, 8, "div", 11);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerEnd"]();
        }

        if (rf & 2) {
          var ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngForOf", ctx_r0.selectedItems)("ngForTrackBy", ctx_r0.trackByOption);
        }
      }

      function NgSelectComponent_5_ng_template_0_Template(rf, ctx) {}

      var _c7 = function _c7(a0, a1) {
        return {
          items: a0,
          clear: a1
        };
      };

      function NgSelectComponent_5_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](0, NgSelectComponent_5_ng_template_0_Template, 0, 0, "ng-template", 14);
        }

        if (rf & 2) {
          var ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngTemplateOutlet", ctx_r1.multiLabelTemplate)("ngTemplateOutletContext", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction2"](2, _c7, ctx_r1.selectedValues, ctx_r1.clearItem));
        }
      }

      function NgSelectComponent_ng_container_9_ng_template_1_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](0, "div", 19);
        }
      }

      function NgSelectComponent_ng_container_9_ng_template_3_Template(rf, ctx) {}

      function NgSelectComponent_ng_container_9_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerStart"](0);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, NgSelectComponent_ng_container_9_ng_template_1_Template, 1, 0, "ng-template", null, 17, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplateRefExtractor"]);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](3, NgSelectComponent_ng_container_9_ng_template_3_Template, 0, 0, "ng-template", 18);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerEnd"]();
        }

        if (rf & 2) {
          var _r16 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](2);

          var ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngTemplateOutlet", ctx_r3.loadingSpinnerTemplate || _r16);
        }
      }

      function NgSelectComponent_span_10_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "span", 20);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "span", 21);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](2, "\xD7");

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpropertyInterpolate"]("title", ctx_r4.clearAllText);
        }
      }

      function NgSelectComponent_ng_dropdown_panel_13_div_2_ng_template_1_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](0, "span", 27);
        }

        if (rf & 2) {
          var item_r24 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]().$implicit;

          var ctx_r26 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngItemLabel", item_r24.label)("escape", ctx_r26.escapeHTML);
        }
      }

      function NgSelectComponent_ng_dropdown_panel_13_div_2_ng_template_3_Template(rf, ctx) {}

      var _c8 = function _c8(a0, a1, a2, a3) {
        return {
          item: a0,
          item$: a1,
          index: a2,
          searchTerm: a3
        };
      };

      function NgSelectComponent_ng_dropdown_panel_13_div_2_Template(rf, ctx) {
        if (rf & 1) {
          var _r30 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 25);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function NgSelectComponent_ng_dropdown_panel_13_div_2_Template_div_click_0_listener() {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r30);

            var item_r24 = ctx.$implicit;

            var ctx_r29 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);

            return ctx_r29.toggleItem(item_r24);
          })("mouseover", function NgSelectComponent_ng_dropdown_panel_13_div_2_Template_div_mouseover_0_listener() {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r30);

            var item_r24 = ctx.$implicit;

            var ctx_r31 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);

            return ctx_r31.onItemHover(item_r24);
          });

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, NgSelectComponent_ng_dropdown_panel_13_div_2_ng_template_1_Template, 1, 2, "ng-template", null, 26, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplateRefExtractor"]);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](3, NgSelectComponent_ng_dropdown_panel_13_div_2_ng_template_3_Template, 0, 0, "ng-template", 14);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var item_r24 = ctx.$implicit;

          var _r25 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](2);

          var ctx_r19 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("ng-option-disabled", item_r24.disabled)("ng-option-selected", item_r24.selected)("ng-optgroup", item_r24.children)("ng-option", !item_r24.children)("ng-option-child", !!item_r24.parent)("ng-option-marked", item_r24 === ctx_r19.itemsList.markedItem);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("role", item_r24.children ? "group" : "option")("aria-selected", item_r24.selected)("id", item_r24 == null ? null : item_r24.htmlId);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngTemplateOutlet", item_r24.children ? ctx_r19.optgroupTemplate || _r25 : ctx_r19.optionTemplate || _r25)("ngTemplateOutletContext", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction4"](17, _c8, item_r24.value, item_r24, item_r24.index, ctx_r19.searchTerm));
        }
      }

      function NgSelectComponent_ng_dropdown_panel_13_div_3_ng_template_1_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "span");

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "span", 30);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](2);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var ctx_r33 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](ctx_r33.addTagText);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"]("\"", ctx_r33.searchTerm, "\"");
        }
      }

      function NgSelectComponent_ng_dropdown_panel_13_div_3_ng_template_3_Template(rf, ctx) {}

      function NgSelectComponent_ng_dropdown_panel_13_div_3_Template(rf, ctx) {
        if (rf & 1) {
          var _r36 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 28);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("mouseover", function NgSelectComponent_ng_dropdown_panel_13_div_3_Template_div_mouseover_0_listener() {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r36);

            var ctx_r35 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);

            return ctx_r35.itemsList.unmarkItem();
          })("click", function NgSelectComponent_ng_dropdown_panel_13_div_3_Template_div_click_0_listener() {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r36);

            var ctx_r37 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);

            return ctx_r37.selectTag();
          });

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, NgSelectComponent_ng_dropdown_panel_13_div_3_ng_template_1_Template, 4, 2, "ng-template", null, 29, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplateRefExtractor"]);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](3, NgSelectComponent_ng_dropdown_panel_13_div_3_ng_template_3_Template, 0, 0, "ng-template", 14);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var _r32 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](2);

          var ctx_r20 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("ng-option-marked", !ctx_r20.itemsList.markedItem);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngTemplateOutlet", ctx_r20.tagTemplate || _r32)("ngTemplateOutletContext", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction1"](4, _c3, ctx_r20.searchTerm));
        }
      }

      function NgSelectComponent_ng_dropdown_panel_13_ng_container_4_ng_template_1_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 32);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var ctx_r39 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](ctx_r39.notFoundText);
        }
      }

      function NgSelectComponent_ng_dropdown_panel_13_ng_container_4_ng_template_3_Template(rf, ctx) {}

      function NgSelectComponent_ng_dropdown_panel_13_ng_container_4_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerStart"](0);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, NgSelectComponent_ng_dropdown_panel_13_ng_container_4_ng_template_1_Template, 2, 1, "ng-template", null, 31, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplateRefExtractor"]);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](3, NgSelectComponent_ng_dropdown_panel_13_ng_container_4_ng_template_3_Template, 0, 0, "ng-template", 14);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerEnd"]();
        }

        if (rf & 2) {
          var _r38 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](2);

          var ctx_r21 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngTemplateOutlet", ctx_r21.notFoundTemplate || _r38)("ngTemplateOutletContext", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction1"](2, _c3, ctx_r21.searchTerm));
        }
      }

      function NgSelectComponent_ng_dropdown_panel_13_ng_container_5_ng_template_1_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 32);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var ctx_r42 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](ctx_r42.typeToSearchText);
        }
      }

      function NgSelectComponent_ng_dropdown_panel_13_ng_container_5_ng_template_3_Template(rf, ctx) {}

      function NgSelectComponent_ng_dropdown_panel_13_ng_container_5_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerStart"](0);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, NgSelectComponent_ng_dropdown_panel_13_ng_container_5_ng_template_1_Template, 2, 1, "ng-template", null, 33, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplateRefExtractor"]);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](3, NgSelectComponent_ng_dropdown_panel_13_ng_container_5_ng_template_3_Template, 0, 0, "ng-template", 18);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerEnd"]();
        }

        if (rf & 2) {
          var _r41 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](2);

          var ctx_r22 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngTemplateOutlet", ctx_r22.typeToSearchTemplate || _r41);
        }
      }

      function NgSelectComponent_ng_dropdown_panel_13_ng_container_6_ng_template_1_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 32);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var ctx_r45 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](ctx_r45.loadingText);
        }
      }

      function NgSelectComponent_ng_dropdown_panel_13_ng_container_6_ng_template_3_Template(rf, ctx) {}

      function NgSelectComponent_ng_dropdown_panel_13_ng_container_6_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerStart"](0);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, NgSelectComponent_ng_dropdown_panel_13_ng_container_6_ng_template_1_Template, 2, 1, "ng-template", null, 34, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplateRefExtractor"]);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](3, NgSelectComponent_ng_dropdown_panel_13_ng_container_6_ng_template_3_Template, 0, 0, "ng-template", 14);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerEnd"]();
        }

        if (rf & 2) {
          var _r44 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](2);

          var ctx_r23 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngTemplateOutlet", ctx_r23.loadingTextTemplate || _r44)("ngTemplateOutletContext", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction1"](2, _c3, ctx_r23.searchTerm));
        }
      }

      function NgSelectComponent_ng_dropdown_panel_13_Template(rf, ctx) {
        if (rf & 1) {
          var _r48 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "ng-dropdown-panel", 22);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("update", function NgSelectComponent_ng_dropdown_panel_13_Template_ng_dropdown_panel_update_0_listener($event) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r48);

            var ctx_r47 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();

            return ctx_r47.viewPortItems = $event;
          })("scroll", function NgSelectComponent_ng_dropdown_panel_13_Template_ng_dropdown_panel_scroll_0_listener($event) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r48);

            var ctx_r49 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();

            return ctx_r49.scroll.emit($event);
          })("scrollToEnd", function NgSelectComponent_ng_dropdown_panel_13_Template_ng_dropdown_panel_scrollToEnd_0_listener($event) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r48);

            var ctx_r50 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();

            return ctx_r50.scrollToEnd.emit($event);
          })("outsideClick", function NgSelectComponent_ng_dropdown_panel_13_Template_ng_dropdown_panel_outsideClick_0_listener() {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r48);

            var ctx_r51 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();

            return ctx_r51.close();
          });

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerStart"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](2, NgSelectComponent_ng_dropdown_panel_13_div_2_Template, 4, 22, "div", 23);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](3, NgSelectComponent_ng_dropdown_panel_13_div_3_Template, 4, 6, "div", 24);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerEnd"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](4, NgSelectComponent_ng_dropdown_panel_13_ng_container_4_Template, 4, 4, "ng-container", 3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](5, NgSelectComponent_ng_dropdown_panel_13_ng_container_5_Template, 4, 1, "ng-container", 3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](6, NgSelectComponent_ng_dropdown_panel_13_ng_container_6_Template, 4, 4, "ng-container", 3);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var ctx_r5 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("ng-select-multiple", ctx_r5.multiple);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("virtualScroll", ctx_r5.virtualScroll)("bufferAmount", ctx_r5.bufferAmount)("appendTo", ctx_r5.appendTo)("position", ctx_r5.dropdownPosition)("headerTemplate", ctx_r5.headerTemplate)("footerTemplate", ctx_r5.footerTemplate)("filterValue", ctx_r5.searchTerm)("items", ctx_r5.itemsList.filteredItems)("markedItem", ctx_r5.itemsList.markedItem)("ngClass", ctx_r5.appendTo ? ctx_r5.classes : null)("id", ctx_r5.dropdownId);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngForOf", ctx_r5.viewPortItems)("ngForTrackBy", ctx_r5.trackByOption);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx_r5.showAddTag);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx_r5.showNoItemsFound());

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx_r5.showTypeToSearch());

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx_r5.loading && ctx_r5.itemsList.filteredItems.length === 0);
        }
      }

      var unescapedHTMLExp = /[&<>"']/g;
      var hasUnescapedHTMLExp = RegExp(unescapedHTMLExp.source);
      var htmlEscapes = {
        '&': '&amp;',
        '<': '&lt;',
        '>': '&gt;',
        '"': '&quot;',
        '\'': '&#39;'
      };

      function escapeHTML(string) {
        return string && hasUnescapedHTMLExp.test(string) ? string.replace(unescapedHTMLExp, function (chr) {
          return htmlEscapes[chr];
        }) : string;
      }

      function isDefined(value) {
        return value !== undefined && value !== null;
      }

      function isObject(value) {
        return typeof value === 'object' && isDefined(value);
      }

      function isPromise(value) {
        return value instanceof Promise;
      }

      function isFunction(value) {
        return value instanceof Function;
      }

      var NgItemLabelDirective = /*#__PURE__*/function () {
        function NgItemLabelDirective(element) {
          _classCallCheck(this, NgItemLabelDirective);

          this.element = element;
          this.escape = true;
        }

        _createClass2(NgItemLabelDirective, [{
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            this.element.nativeElement.innerHTML = this.escape ? escapeHTML(this.ngItemLabel) : this.ngItemLabel;
          }
        }]);

        return NgItemLabelDirective;
      }();

      NgItemLabelDirective.ɵfac = function NgItemLabelDirective_Factory(t) {
        return new (t || NgItemLabelDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]));
      };

      NgItemLabelDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgItemLabelDirective,
        selectors: [["", "ngItemLabel", ""]],
        inputs: {
          escape: "escape",
          ngItemLabel: "ngItemLabel"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]]
      });

      NgItemLabelDirective.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }];
      };

      NgItemLabelDirective.propDecorators = {
        ngItemLabel: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        escape: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgItemLabelDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ngItemLabel]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }];
        }, {
          escape: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          ngItemLabel: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();

      var NgOptionTemplateDirective = function NgOptionTemplateDirective(template) {
        _classCallCheck(this, NgOptionTemplateDirective);

        this.template = template;
      };

      NgOptionTemplateDirective.ɵfac = function NgOptionTemplateDirective_Factory(t) {
        return new (t || NgOptionTemplateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]));
      };

      NgOptionTemplateDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgOptionTemplateDirective,
        selectors: [["", "ng-option-tmp", ""]]
      });

      NgOptionTemplateDirective.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgOptionTemplateDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ng-option-tmp]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }];
        }, null);
      })();

      var NgOptgroupTemplateDirective = function NgOptgroupTemplateDirective(template) {
        _classCallCheck(this, NgOptgroupTemplateDirective);

        this.template = template;
      };

      NgOptgroupTemplateDirective.ɵfac = function NgOptgroupTemplateDirective_Factory(t) {
        return new (t || NgOptgroupTemplateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]));
      };

      NgOptgroupTemplateDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgOptgroupTemplateDirective,
        selectors: [["", "ng-optgroup-tmp", ""]]
      });

      NgOptgroupTemplateDirective.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgOptgroupTemplateDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ng-optgroup-tmp]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }];
        }, null);
      })();

      var NgLabelTemplateDirective = function NgLabelTemplateDirective(template) {
        _classCallCheck(this, NgLabelTemplateDirective);

        this.template = template;
      };

      NgLabelTemplateDirective.ɵfac = function NgLabelTemplateDirective_Factory(t) {
        return new (t || NgLabelTemplateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]));
      };

      NgLabelTemplateDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgLabelTemplateDirective,
        selectors: [["", "ng-label-tmp", ""]]
      });

      NgLabelTemplateDirective.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgLabelTemplateDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ng-label-tmp]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }];
        }, null);
      })();

      var NgMultiLabelTemplateDirective = function NgMultiLabelTemplateDirective(template) {
        _classCallCheck(this, NgMultiLabelTemplateDirective);

        this.template = template;
      };

      NgMultiLabelTemplateDirective.ɵfac = function NgMultiLabelTemplateDirective_Factory(t) {
        return new (t || NgMultiLabelTemplateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]));
      };

      NgMultiLabelTemplateDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgMultiLabelTemplateDirective,
        selectors: [["", "ng-multi-label-tmp", ""]]
      });

      NgMultiLabelTemplateDirective.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgMultiLabelTemplateDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ng-multi-label-tmp]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }];
        }, null);
      })();

      var NgHeaderTemplateDirective = function NgHeaderTemplateDirective(template) {
        _classCallCheck(this, NgHeaderTemplateDirective);

        this.template = template;
      };

      NgHeaderTemplateDirective.ɵfac = function NgHeaderTemplateDirective_Factory(t) {
        return new (t || NgHeaderTemplateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]));
      };

      NgHeaderTemplateDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgHeaderTemplateDirective,
        selectors: [["", "ng-header-tmp", ""]]
      });

      NgHeaderTemplateDirective.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgHeaderTemplateDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ng-header-tmp]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }];
        }, null);
      })();

      var NgFooterTemplateDirective = function NgFooterTemplateDirective(template) {
        _classCallCheck(this, NgFooterTemplateDirective);

        this.template = template;
      };

      NgFooterTemplateDirective.ɵfac = function NgFooterTemplateDirective_Factory(t) {
        return new (t || NgFooterTemplateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]));
      };

      NgFooterTemplateDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgFooterTemplateDirective,
        selectors: [["", "ng-footer-tmp", ""]]
      });

      NgFooterTemplateDirective.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgFooterTemplateDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ng-footer-tmp]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }];
        }, null);
      })();

      var NgNotFoundTemplateDirective = function NgNotFoundTemplateDirective(template) {
        _classCallCheck(this, NgNotFoundTemplateDirective);

        this.template = template;
      };

      NgNotFoundTemplateDirective.ɵfac = function NgNotFoundTemplateDirective_Factory(t) {
        return new (t || NgNotFoundTemplateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]));
      };

      NgNotFoundTemplateDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgNotFoundTemplateDirective,
        selectors: [["", "ng-notfound-tmp", ""]]
      });

      NgNotFoundTemplateDirective.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgNotFoundTemplateDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ng-notfound-tmp]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }];
        }, null);
      })();

      var NgTypeToSearchTemplateDirective = function NgTypeToSearchTemplateDirective(template) {
        _classCallCheck(this, NgTypeToSearchTemplateDirective);

        this.template = template;
      };

      NgTypeToSearchTemplateDirective.ɵfac = function NgTypeToSearchTemplateDirective_Factory(t) {
        return new (t || NgTypeToSearchTemplateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]));
      };

      NgTypeToSearchTemplateDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgTypeToSearchTemplateDirective,
        selectors: [["", "ng-typetosearch-tmp", ""]]
      });

      NgTypeToSearchTemplateDirective.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgTypeToSearchTemplateDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ng-typetosearch-tmp]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }];
        }, null);
      })();

      var NgLoadingTextTemplateDirective = function NgLoadingTextTemplateDirective(template) {
        _classCallCheck(this, NgLoadingTextTemplateDirective);

        this.template = template;
      };

      NgLoadingTextTemplateDirective.ɵfac = function NgLoadingTextTemplateDirective_Factory(t) {
        return new (t || NgLoadingTextTemplateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]));
      };

      NgLoadingTextTemplateDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgLoadingTextTemplateDirective,
        selectors: [["", "ng-loadingtext-tmp", ""]]
      });

      NgLoadingTextTemplateDirective.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgLoadingTextTemplateDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ng-loadingtext-tmp]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }];
        }, null);
      })();

      var NgTagTemplateDirective = function NgTagTemplateDirective(template) {
        _classCallCheck(this, NgTagTemplateDirective);

        this.template = template;
      };

      NgTagTemplateDirective.ɵfac = function NgTagTemplateDirective_Factory(t) {
        return new (t || NgTagTemplateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]));
      };

      NgTagTemplateDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgTagTemplateDirective,
        selectors: [["", "ng-tag-tmp", ""]]
      });

      NgTagTemplateDirective.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgTagTemplateDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ng-tag-tmp]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }];
        }, null);
      })();

      var NgLoadingSpinnerTemplateDirective = function NgLoadingSpinnerTemplateDirective(template) {
        _classCallCheck(this, NgLoadingSpinnerTemplateDirective);

        this.template = template;
      };

      NgLoadingSpinnerTemplateDirective.ɵfac = function NgLoadingSpinnerTemplateDirective_Factory(t) {
        return new (t || NgLoadingSpinnerTemplateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]));
      };

      NgLoadingSpinnerTemplateDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgLoadingSpinnerTemplateDirective,
        selectors: [["", "ng-loadingspinner-tmp", ""]]
      });

      NgLoadingSpinnerTemplateDirective.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgLoadingSpinnerTemplateDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ng-loadingspinner-tmp]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }];
        }, null);
      })();

      var ConsoleService = /*#__PURE__*/function () {
        function ConsoleService() {
          _classCallCheck(this, ConsoleService);
        }

        _createClass2(ConsoleService, [{
          key: "warn",
          value: function warn(message) {
            console.warn(message);
          }
        }]);

        return ConsoleService;
      }();

      ConsoleService.ɵfac = function ConsoleService_Factory(t) {
        return new (t || ConsoleService)();
      };

      ConsoleService.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        factory: function ConsoleService_Factory() {
          return new ConsoleService();
        },
        token: ConsoleService,
        providedIn: "root"
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ConsoleService, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], null, null);
      })();

      function newId() {
        // First character is an 'a', it's good practice to tag id to begin with a letter
        return 'axxxxxxxxxxx'.replace(/[x]/g, function (_) {
          // tslint:disable-next-line:no-bitwise
          var val = Math.random() * 16 | 0;
          return val.toString(16);
        });
      }

      var diacritics = {
        "\u24B6": 'A',
        "\uFF21": 'A',
        "\xC0": 'A',
        "\xC1": 'A',
        "\xC2": 'A',
        "\u1EA6": 'A',
        "\u1EA4": 'A',
        "\u1EAA": 'A',
        "\u1EA8": 'A',
        "\xC3": 'A',
        "\u0100": 'A',
        "\u0102": 'A',
        "\u1EB0": 'A',
        "\u1EAE": 'A',
        "\u1EB4": 'A',
        "\u1EB2": 'A',
        "\u0226": 'A',
        "\u01E0": 'A',
        "\xC4": 'A',
        "\u01DE": 'A',
        "\u1EA2": 'A',
        "\xC5": 'A',
        "\u01FA": 'A',
        "\u01CD": 'A',
        "\u0200": 'A',
        "\u0202": 'A',
        "\u1EA0": 'A',
        "\u1EAC": 'A',
        "\u1EB6": 'A',
        "\u1E00": 'A',
        "\u0104": 'A',
        "\u023A": 'A',
        "\u2C6F": 'A',
        "\uA732": 'AA',
        "\xC6": 'AE',
        "\u01FC": 'AE',
        "\u01E2": 'AE',
        "\uA734": 'AO',
        "\uA736": 'AU',
        "\uA738": 'AV',
        "\uA73A": 'AV',
        "\uA73C": 'AY',
        "\u24B7": 'B',
        "\uFF22": 'B',
        "\u1E02": 'B',
        "\u1E04": 'B',
        "\u1E06": 'B',
        "\u0243": 'B',
        "\u0182": 'B',
        "\u0181": 'B',
        "\u24B8": 'C',
        "\uFF23": 'C',
        "\u0106": 'C',
        "\u0108": 'C',
        "\u010A": 'C',
        "\u010C": 'C',
        "\xC7": 'C',
        "\u1E08": 'C',
        "\u0187": 'C',
        "\u023B": 'C',
        "\uA73E": 'C',
        "\u24B9": 'D',
        "\uFF24": 'D',
        "\u1E0A": 'D',
        "\u010E": 'D',
        "\u1E0C": 'D',
        "\u1E10": 'D',
        "\u1E12": 'D',
        "\u1E0E": 'D',
        "\u0110": 'D',
        "\u018B": 'D',
        "\u018A": 'D',
        "\u0189": 'D',
        "\uA779": 'D',
        "\u01F1": 'DZ',
        "\u01C4": 'DZ',
        "\u01F2": 'Dz',
        "\u01C5": 'Dz',
        "\u24BA": 'E',
        "\uFF25": 'E',
        "\xC8": 'E',
        "\xC9": 'E',
        "\xCA": 'E',
        "\u1EC0": 'E',
        "\u1EBE": 'E',
        "\u1EC4": 'E',
        "\u1EC2": 'E',
        "\u1EBC": 'E',
        "\u0112": 'E',
        "\u1E14": 'E',
        "\u1E16": 'E',
        "\u0114": 'E',
        "\u0116": 'E',
        "\xCB": 'E',
        "\u1EBA": 'E',
        "\u011A": 'E',
        "\u0204": 'E',
        "\u0206": 'E',
        "\u1EB8": 'E',
        "\u1EC6": 'E',
        "\u0228": 'E',
        "\u1E1C": 'E',
        "\u0118": 'E',
        "\u1E18": 'E',
        "\u1E1A": 'E',
        "\u0190": 'E',
        "\u018E": 'E',
        "\u24BB": 'F',
        "\uFF26": 'F',
        "\u1E1E": 'F',
        "\u0191": 'F',
        "\uA77B": 'F',
        "\u24BC": 'G',
        "\uFF27": 'G',
        "\u01F4": 'G',
        "\u011C": 'G',
        "\u1E20": 'G',
        "\u011E": 'G',
        "\u0120": 'G',
        "\u01E6": 'G',
        "\u0122": 'G',
        "\u01E4": 'G',
        "\u0193": 'G',
        "\uA7A0": 'G',
        "\uA77D": 'G',
        "\uA77E": 'G',
        "\u24BD": 'H',
        "\uFF28": 'H',
        "\u0124": 'H',
        "\u1E22": 'H',
        "\u1E26": 'H',
        "\u021E": 'H',
        "\u1E24": 'H',
        "\u1E28": 'H',
        "\u1E2A": 'H',
        "\u0126": 'H',
        "\u2C67": 'H',
        "\u2C75": 'H',
        "\uA78D": 'H',
        "\u24BE": 'I',
        "\uFF29": 'I',
        "\xCC": 'I',
        "\xCD": 'I',
        "\xCE": 'I',
        "\u0128": 'I',
        "\u012A": 'I',
        "\u012C": 'I',
        "\u0130": 'I',
        "\xCF": 'I',
        "\u1E2E": 'I',
        "\u1EC8": 'I',
        "\u01CF": 'I',
        "\u0208": 'I',
        "\u020A": 'I',
        "\u1ECA": 'I',
        "\u012E": 'I',
        "\u1E2C": 'I',
        "\u0197": 'I',
        "\u24BF": 'J',
        "\uFF2A": 'J',
        "\u0134": 'J',
        "\u0248": 'J',
        "\u24C0": 'K',
        "\uFF2B": 'K',
        "\u1E30": 'K',
        "\u01E8": 'K',
        "\u1E32": 'K',
        "\u0136": 'K',
        "\u1E34": 'K',
        "\u0198": 'K',
        "\u2C69": 'K',
        "\uA740": 'K',
        "\uA742": 'K',
        "\uA744": 'K',
        "\uA7A2": 'K',
        "\u24C1": 'L',
        "\uFF2C": 'L',
        "\u013F": 'L',
        "\u0139": 'L',
        "\u013D": 'L',
        "\u1E36": 'L',
        "\u1E38": 'L',
        "\u013B": 'L',
        "\u1E3C": 'L',
        "\u1E3A": 'L',
        "\u0141": 'L',
        "\u023D": 'L',
        "\u2C62": 'L',
        "\u2C60": 'L',
        "\uA748": 'L',
        "\uA746": 'L',
        "\uA780": 'L',
        "\u01C7": 'LJ',
        "\u01C8": 'Lj',
        "\u24C2": 'M',
        "\uFF2D": 'M',
        "\u1E3E": 'M',
        "\u1E40": 'M',
        "\u1E42": 'M',
        "\u2C6E": 'M',
        "\u019C": 'M',
        "\u24C3": 'N',
        "\uFF2E": 'N',
        "\u01F8": 'N',
        "\u0143": 'N',
        "\xD1": 'N',
        "\u1E44": 'N',
        "\u0147": 'N',
        "\u1E46": 'N',
        "\u0145": 'N',
        "\u1E4A": 'N',
        "\u1E48": 'N',
        "\u0220": 'N',
        "\u019D": 'N',
        "\uA790": 'N',
        "\uA7A4": 'N',
        "\u01CA": 'NJ',
        "\u01CB": 'Nj',
        "\u24C4": 'O',
        "\uFF2F": 'O',
        "\xD2": 'O',
        "\xD3": 'O',
        "\xD4": 'O',
        "\u1ED2": 'O',
        "\u1ED0": 'O',
        "\u1ED6": 'O',
        "\u1ED4": 'O',
        "\xD5": 'O',
        "\u1E4C": 'O',
        "\u022C": 'O',
        "\u1E4E": 'O',
        "\u014C": 'O',
        "\u1E50": 'O',
        "\u1E52": 'O',
        "\u014E": 'O',
        "\u022E": 'O',
        "\u0230": 'O',
        "\xD6": 'O',
        "\u022A": 'O',
        "\u1ECE": 'O',
        "\u0150": 'O',
        "\u01D1": 'O',
        "\u020C": 'O',
        "\u020E": 'O',
        "\u01A0": 'O',
        "\u1EDC": 'O',
        "\u1EDA": 'O',
        "\u1EE0": 'O',
        "\u1EDE": 'O',
        "\u1EE2": 'O',
        "\u1ECC": 'O',
        "\u1ED8": 'O',
        "\u01EA": 'O',
        "\u01EC": 'O',
        "\xD8": 'O',
        "\u01FE": 'O',
        "\u0186": 'O',
        "\u019F": 'O',
        "\uA74A": 'O',
        "\uA74C": 'O',
        "\u01A2": 'OI',
        "\uA74E": 'OO',
        "\u0222": 'OU',
        "\u24C5": 'P',
        "\uFF30": 'P',
        "\u1E54": 'P',
        "\u1E56": 'P',
        "\u01A4": 'P',
        "\u2C63": 'P',
        "\uA750": 'P',
        "\uA752": 'P',
        "\uA754": 'P',
        "\u24C6": 'Q',
        "\uFF31": 'Q',
        "\uA756": 'Q',
        "\uA758": 'Q',
        "\u024A": 'Q',
        "\u24C7": 'R',
        "\uFF32": 'R',
        "\u0154": 'R',
        "\u1E58": 'R',
        "\u0158": 'R',
        "\u0210": 'R',
        "\u0212": 'R',
        "\u1E5A": 'R',
        "\u1E5C": 'R',
        "\u0156": 'R',
        "\u1E5E": 'R',
        "\u024C": 'R',
        "\u2C64": 'R',
        "\uA75A": 'R',
        "\uA7A6": 'R',
        "\uA782": 'R',
        "\u24C8": 'S',
        "\uFF33": 'S',
        "\u1E9E": 'S',
        "\u015A": 'S',
        "\u1E64": 'S',
        "\u015C": 'S',
        "\u1E60": 'S',
        "\u0160": 'S',
        "\u1E66": 'S',
        "\u1E62": 'S',
        "\u1E68": 'S',
        "\u0218": 'S',
        "\u015E": 'S',
        "\u2C7E": 'S',
        "\uA7A8": 'S',
        "\uA784": 'S',
        "\u24C9": 'T',
        "\uFF34": 'T',
        "\u1E6A": 'T',
        "\u0164": 'T',
        "\u1E6C": 'T',
        "\u021A": 'T',
        "\u0162": 'T',
        "\u1E70": 'T',
        "\u1E6E": 'T',
        "\u0166": 'T',
        "\u01AC": 'T',
        "\u01AE": 'T',
        "\u023E": 'T',
        "\uA786": 'T',
        "\uA728": 'TZ',
        "\u24CA": 'U',
        "\uFF35": 'U',
        "\xD9": 'U',
        "\xDA": 'U',
        "\xDB": 'U',
        "\u0168": 'U',
        "\u1E78": 'U',
        "\u016A": 'U',
        "\u1E7A": 'U',
        "\u016C": 'U',
        "\xDC": 'U',
        "\u01DB": 'U',
        "\u01D7": 'U',
        "\u01D5": 'U',
        "\u01D9": 'U',
        "\u1EE6": 'U',
        "\u016E": 'U',
        "\u0170": 'U',
        "\u01D3": 'U',
        "\u0214": 'U',
        "\u0216": 'U',
        "\u01AF": 'U',
        "\u1EEA": 'U',
        "\u1EE8": 'U',
        "\u1EEE": 'U',
        "\u1EEC": 'U',
        "\u1EF0": 'U',
        "\u1EE4": 'U',
        "\u1E72": 'U',
        "\u0172": 'U',
        "\u1E76": 'U',
        "\u1E74": 'U',
        "\u0244": 'U',
        "\u24CB": 'V',
        "\uFF36": 'V',
        "\u1E7C": 'V',
        "\u1E7E": 'V',
        "\u01B2": 'V',
        "\uA75E": 'V',
        "\u0245": 'V',
        "\uA760": 'VY',
        "\u24CC": 'W',
        "\uFF37": 'W',
        "\u1E80": 'W',
        "\u1E82": 'W',
        "\u0174": 'W',
        "\u1E86": 'W',
        "\u1E84": 'W',
        "\u1E88": 'W',
        "\u2C72": 'W',
        "\u24CD": 'X',
        "\uFF38": 'X',
        "\u1E8A": 'X',
        "\u1E8C": 'X',
        "\u24CE": 'Y',
        "\uFF39": 'Y',
        "\u1EF2": 'Y',
        "\xDD": 'Y',
        "\u0176": 'Y',
        "\u1EF8": 'Y',
        "\u0232": 'Y',
        "\u1E8E": 'Y',
        "\u0178": 'Y',
        "\u1EF6": 'Y',
        "\u1EF4": 'Y',
        "\u01B3": 'Y',
        "\u024E": 'Y',
        "\u1EFE": 'Y',
        "\u24CF": 'Z',
        "\uFF3A": 'Z',
        "\u0179": 'Z',
        "\u1E90": 'Z',
        "\u017B": 'Z',
        "\u017D": 'Z',
        "\u1E92": 'Z',
        "\u1E94": 'Z',
        "\u01B5": 'Z',
        "\u0224": 'Z',
        "\u2C7F": 'Z',
        "\u2C6B": 'Z',
        "\uA762": 'Z',
        "\u24D0": 'a',
        "\uFF41": 'a',
        "\u1E9A": 'a',
        "\xE0": 'a',
        "\xE1": 'a',
        "\xE2": 'a',
        "\u1EA7": 'a',
        "\u1EA5": 'a',
        "\u1EAB": 'a',
        "\u1EA9": 'a',
        "\xE3": 'a',
        "\u0101": 'a',
        "\u0103": 'a',
        "\u1EB1": 'a',
        "\u1EAF": 'a',
        "\u1EB5": 'a',
        "\u1EB3": 'a',
        "\u0227": 'a',
        "\u01E1": 'a',
        "\xE4": 'a',
        "\u01DF": 'a',
        "\u1EA3": 'a',
        "\xE5": 'a',
        "\u01FB": 'a',
        "\u01CE": 'a',
        "\u0201": 'a',
        "\u0203": 'a',
        "\u1EA1": 'a',
        "\u1EAD": 'a',
        "\u1EB7": 'a',
        "\u1E01": 'a',
        "\u0105": 'a',
        "\u2C65": 'a',
        "\u0250": 'a',
        "\uA733": 'aa',
        "\xE6": 'ae',
        "\u01FD": 'ae',
        "\u01E3": 'ae',
        "\uA735": 'ao',
        "\uA737": 'au',
        "\uA739": 'av',
        "\uA73B": 'av',
        "\uA73D": 'ay',
        "\u24D1": 'b',
        "\uFF42": 'b',
        "\u1E03": 'b',
        "\u1E05": 'b',
        "\u1E07": 'b',
        "\u0180": 'b',
        "\u0183": 'b',
        "\u0253": 'b',
        "\u24D2": 'c',
        "\uFF43": 'c',
        "\u0107": 'c',
        "\u0109": 'c',
        "\u010B": 'c',
        "\u010D": 'c',
        "\xE7": 'c',
        "\u1E09": 'c',
        "\u0188": 'c',
        "\u023C": 'c',
        "\uA73F": 'c',
        "\u2184": 'c',
        "\u24D3": 'd',
        "\uFF44": 'd',
        "\u1E0B": 'd',
        "\u010F": 'd',
        "\u1E0D": 'd',
        "\u1E11": 'd',
        "\u1E13": 'd',
        "\u1E0F": 'd',
        "\u0111": 'd',
        "\u018C": 'd',
        "\u0256": 'd',
        "\u0257": 'd',
        "\uA77A": 'd',
        "\u01F3": 'dz',
        "\u01C6": 'dz',
        "\u24D4": 'e',
        "\uFF45": 'e',
        "\xE8": 'e',
        "\xE9": 'e',
        "\xEA": 'e',
        "\u1EC1": 'e',
        "\u1EBF": 'e',
        "\u1EC5": 'e',
        "\u1EC3": 'e',
        "\u1EBD": 'e',
        "\u0113": 'e',
        "\u1E15": 'e',
        "\u1E17": 'e',
        "\u0115": 'e',
        "\u0117": 'e',
        "\xEB": 'e',
        "\u1EBB": 'e',
        "\u011B": 'e',
        "\u0205": 'e',
        "\u0207": 'e',
        "\u1EB9": 'e',
        "\u1EC7": 'e',
        "\u0229": 'e',
        "\u1E1D": 'e',
        "\u0119": 'e',
        "\u1E19": 'e',
        "\u1E1B": 'e',
        "\u0247": 'e',
        "\u025B": 'e',
        "\u01DD": 'e',
        "\u24D5": 'f',
        "\uFF46": 'f',
        "\u1E1F": 'f',
        "\u0192": 'f',
        "\uA77C": 'f',
        "\u24D6": 'g',
        "\uFF47": 'g',
        "\u01F5": 'g',
        "\u011D": 'g',
        "\u1E21": 'g',
        "\u011F": 'g',
        "\u0121": 'g',
        "\u01E7": 'g',
        "\u0123": 'g',
        "\u01E5": 'g',
        "\u0260": 'g',
        "\uA7A1": 'g',
        "\u1D79": 'g',
        "\uA77F": 'g',
        "\u24D7": 'h',
        "\uFF48": 'h',
        "\u0125": 'h',
        "\u1E23": 'h',
        "\u1E27": 'h',
        "\u021F": 'h',
        "\u1E25": 'h',
        "\u1E29": 'h',
        "\u1E2B": 'h',
        "\u1E96": 'h',
        "\u0127": 'h',
        "\u2C68": 'h',
        "\u2C76": 'h',
        "\u0265": 'h',
        "\u0195": 'hv',
        "\u24D8": 'i',
        "\uFF49": 'i',
        "\xEC": 'i',
        "\xED": 'i',
        "\xEE": 'i',
        "\u0129": 'i',
        "\u012B": 'i',
        "\u012D": 'i',
        "\xEF": 'i',
        "\u1E2F": 'i',
        "\u1EC9": 'i',
        "\u01D0": 'i',
        "\u0209": 'i',
        "\u020B": 'i',
        "\u1ECB": 'i',
        "\u012F": 'i',
        "\u1E2D": 'i',
        "\u0268": 'i',
        "\u0131": 'i',
        "\u24D9": 'j',
        "\uFF4A": 'j',
        "\u0135": 'j',
        "\u01F0": 'j',
        "\u0249": 'j',
        "\u24DA": 'k',
        "\uFF4B": 'k',
        "\u1E31": 'k',
        "\u01E9": 'k',
        "\u1E33": 'k',
        "\u0137": 'k',
        "\u1E35": 'k',
        "\u0199": 'k',
        "\u2C6A": 'k',
        "\uA741": 'k',
        "\uA743": 'k',
        "\uA745": 'k',
        "\uA7A3": 'k',
        "\u24DB": 'l',
        "\uFF4C": 'l',
        "\u0140": 'l',
        "\u013A": 'l',
        "\u013E": 'l',
        "\u1E37": 'l',
        "\u1E39": 'l',
        "\u013C": 'l',
        "\u1E3D": 'l',
        "\u1E3B": 'l',
        "\u017F": 'l',
        "\u0142": 'l',
        "\u019A": 'l',
        "\u026B": 'l',
        "\u2C61": 'l',
        "\uA749": 'l',
        "\uA781": 'l',
        "\uA747": 'l',
        "\u01C9": 'lj',
        "\u24DC": 'm',
        "\uFF4D": 'm',
        "\u1E3F": 'm',
        "\u1E41": 'm',
        "\u1E43": 'm',
        "\u0271": 'm',
        "\u026F": 'm',
        "\u24DD": 'n',
        "\uFF4E": 'n',
        "\u01F9": 'n',
        "\u0144": 'n',
        "\xF1": 'n',
        "\u1E45": 'n',
        "\u0148": 'n',
        "\u1E47": 'n',
        "\u0146": 'n',
        "\u1E4B": 'n',
        "\u1E49": 'n',
        "\u019E": 'n',
        "\u0272": 'n',
        "\u0149": 'n',
        "\uA791": 'n',
        "\uA7A5": 'n',
        "\u01CC": 'nj',
        "\u24DE": 'o',
        "\uFF4F": 'o',
        "\xF2": 'o',
        "\xF3": 'o',
        "\xF4": 'o',
        "\u1ED3": 'o',
        "\u1ED1": 'o',
        "\u1ED7": 'o',
        "\u1ED5": 'o',
        "\xF5": 'o',
        "\u1E4D": 'o',
        "\u022D": 'o',
        "\u1E4F": 'o',
        "\u014D": 'o',
        "\u1E51": 'o',
        "\u1E53": 'o',
        "\u014F": 'o',
        "\u022F": 'o',
        "\u0231": 'o',
        "\xF6": 'o',
        "\u022B": 'o',
        "\u1ECF": 'o',
        "\u0151": 'o',
        "\u01D2": 'o',
        "\u020D": 'o',
        "\u020F": 'o',
        "\u01A1": 'o',
        "\u1EDD": 'o',
        "\u1EDB": 'o',
        "\u1EE1": 'o',
        "\u1EDF": 'o',
        "\u1EE3": 'o',
        "\u1ECD": 'o',
        "\u1ED9": 'o',
        "\u01EB": 'o',
        "\u01ED": 'o',
        "\xF8": 'o',
        "\u01FF": 'o',
        "\u0254": 'o',
        "\uA74B": 'o',
        "\uA74D": 'o',
        "\u0275": 'o',
        "\u01A3": 'oi',
        "\u0223": 'ou',
        "\uA74F": 'oo',
        "\u24DF": 'p',
        "\uFF50": 'p',
        "\u1E55": 'p',
        "\u1E57": 'p',
        "\u01A5": 'p',
        "\u1D7D": 'p',
        "\uA751": 'p',
        "\uA753": 'p',
        "\uA755": 'p',
        "\u24E0": 'q',
        "\uFF51": 'q',
        "\u024B": 'q',
        "\uA757": 'q',
        "\uA759": 'q',
        "\u24E1": 'r',
        "\uFF52": 'r',
        "\u0155": 'r',
        "\u1E59": 'r',
        "\u0159": 'r',
        "\u0211": 'r',
        "\u0213": 'r',
        "\u1E5B": 'r',
        "\u1E5D": 'r',
        "\u0157": 'r',
        "\u1E5F": 'r',
        "\u024D": 'r',
        "\u027D": 'r',
        "\uA75B": 'r',
        "\uA7A7": 'r',
        "\uA783": 'r',
        "\u24E2": 's',
        "\uFF53": 's',
        "\xDF": 's',
        "\u015B": 's',
        "\u1E65": 's',
        "\u015D": 's',
        "\u1E61": 's',
        "\u0161": 's',
        "\u1E67": 's',
        "\u1E63": 's',
        "\u1E69": 's',
        "\u0219": 's',
        "\u015F": 's',
        "\u023F": 's',
        "\uA7A9": 's',
        "\uA785": 's',
        "\u1E9B": 's',
        "\u24E3": 't',
        "\uFF54": 't',
        "\u1E6B": 't',
        "\u1E97": 't',
        "\u0165": 't',
        "\u1E6D": 't',
        "\u021B": 't',
        "\u0163": 't',
        "\u1E71": 't',
        "\u1E6F": 't',
        "\u0167": 't',
        "\u01AD": 't',
        "\u0288": 't',
        "\u2C66": 't',
        "\uA787": 't',
        "\uA729": 'tz',
        "\u24E4": 'u',
        "\uFF55": 'u',
        "\xF9": 'u',
        "\xFA": 'u',
        "\xFB": 'u',
        "\u0169": 'u',
        "\u1E79": 'u',
        "\u016B": 'u',
        "\u1E7B": 'u',
        "\u016D": 'u',
        "\xFC": 'u',
        "\u01DC": 'u',
        "\u01D8": 'u',
        "\u01D6": 'u',
        "\u01DA": 'u',
        "\u1EE7": 'u',
        "\u016F": 'u',
        "\u0171": 'u',
        "\u01D4": 'u',
        "\u0215": 'u',
        "\u0217": 'u',
        "\u01B0": 'u',
        "\u1EEB": 'u',
        "\u1EE9": 'u',
        "\u1EEF": 'u',
        "\u1EED": 'u',
        "\u1EF1": 'u',
        "\u1EE5": 'u',
        "\u1E73": 'u',
        "\u0173": 'u',
        "\u1E77": 'u',
        "\u1E75": 'u',
        "\u0289": 'u',
        "\u24E5": 'v',
        "\uFF56": 'v',
        "\u1E7D": 'v',
        "\u1E7F": 'v',
        "\u028B": 'v',
        "\uA75F": 'v',
        "\u028C": 'v',
        "\uA761": 'vy',
        "\u24E6": 'w',
        "\uFF57": 'w',
        "\u1E81": 'w',
        "\u1E83": 'w',
        "\u0175": 'w',
        "\u1E87": 'w',
        "\u1E85": 'w',
        "\u1E98": 'w',
        "\u1E89": 'w',
        "\u2C73": 'w',
        "\u24E7": 'x',
        "\uFF58": 'x',
        "\u1E8B": 'x',
        "\u1E8D": 'x',
        "\u24E8": 'y',
        "\uFF59": 'y',
        "\u1EF3": 'y',
        "\xFD": 'y',
        "\u0177": 'y',
        "\u1EF9": 'y',
        "\u0233": 'y',
        "\u1E8F": 'y',
        "\xFF": 'y',
        "\u1EF7": 'y',
        "\u1E99": 'y',
        "\u1EF5": 'y',
        "\u01B4": 'y',
        "\u024F": 'y',
        "\u1EFF": 'y',
        "\u24E9": 'z',
        "\uFF5A": 'z',
        "\u017A": 'z',
        "\u1E91": 'z',
        "\u017C": 'z',
        "\u017E": 'z',
        "\u1E93": 'z',
        "\u1E95": 'z',
        "\u01B6": 'z',
        "\u0225": 'z',
        "\u0240": 'z',
        "\u2C6C": 'z',
        "\uA763": 'z',
        "\u0386": "\u0391",
        "\u0388": "\u0395",
        "\u0389": "\u0397",
        "\u038A": "\u0399",
        "\u03AA": "\u0399",
        "\u038C": "\u039F",
        "\u038E": "\u03A5",
        "\u03AB": "\u03A5",
        "\u038F": "\u03A9",
        "\u03AC": "\u03B1",
        "\u03AD": "\u03B5",
        "\u03AE": "\u03B7",
        "\u03AF": "\u03B9",
        "\u03CA": "\u03B9",
        "\u0390": "\u03B9",
        "\u03CC": "\u03BF",
        "\u03CD": "\u03C5",
        "\u03CB": "\u03C5",
        "\u03B0": "\u03C5",
        "\u03C9": "\u03C9",
        "\u03C2": "\u03C3"
      };

      function stripSpecialChars(text) {
        var match = function match(a) {
          return diacritics[a] || a;
        };

        return text.replace(/[^\u0000-\u007E]/g, match);
      }

      var ItemsList = /*#__PURE__*/function () {
        function ItemsList(_ngSelect, _selectionModel) {
          _classCallCheck(this, ItemsList);

          this._ngSelect = _ngSelect;
          this._selectionModel = _selectionModel;
          this._items = [];
          this._filteredItems = [];
          this._markedIndex = -1;
        }

        _createClass2(ItemsList, [{
          key: "items",
          get: function get() {
            return this._items;
          }
        }, {
          key: "filteredItems",
          get: function get() {
            return this._filteredItems;
          }
        }, {
          key: "markedIndex",
          get: function get() {
            return this._markedIndex;
          }
        }, {
          key: "selectedItems",
          get: function get() {
            return this._selectionModel.value;
          }
        }, {
          key: "markedItem",
          get: function get() {
            return this._filteredItems[this._markedIndex];
          }
        }, {
          key: "noItemsToSelect",
          get: function get() {
            return this._ngSelect.hideSelected && this._items.length === this.selectedItems.length;
          }
        }, {
          key: "maxItemsSelected",
          get: function get() {
            return this._ngSelect.multiple && this._ngSelect.maxSelectedItems <= this.selectedItems.length;
          }
        }, {
          key: "lastSelectedItem",
          get: function get() {
            var i = this.selectedItems.length - 1;

            for (; i >= 0; i--) {
              var item = this.selectedItems[i];

              if (!item.disabled) {
                return item;
              }
            }

            return null;
          }
        }, {
          key: "setItems",
          value: function setItems(items) {
            var _this433 = this;

            this._items = items.map(function (item, index) {
              return _this433.mapItem(item, index);
            });

            if (this._ngSelect.groupBy) {
              this._groups = this._groupBy(this._items, this._ngSelect.groupBy);
              this._items = this._flatten(this._groups);
            } else {
              this._groups = new Map();

              this._groups.set(undefined, this._items);
            }

            this._filteredItems = _toConsumableArray(this._items);
          }
        }, {
          key: "select",
          value: function select(item) {
            if (item.selected || this.maxItemsSelected) {
              return;
            }

            var multiple = this._ngSelect.multiple;

            if (!multiple) {
              this.clearSelected();
            }

            this._selectionModel.select(item, multiple, this._ngSelect.selectableGroupAsModel);

            if (this._ngSelect.hideSelected) {
              this._hideSelected(item);
            }
          }
        }, {
          key: "unselect",
          value: function unselect(item) {
            if (!item.selected) {
              return;
            }

            this._selectionModel.unselect(item, this._ngSelect.multiple);

            if (this._ngSelect.hideSelected && isDefined(item.index) && this._ngSelect.multiple) {
              this._showSelected(item);
            }
          }
        }, {
          key: "findItem",
          value: function findItem(value) {
            var _this434 = this;

            var findBy;

            if (this._ngSelect.compareWith) {
              findBy = function findBy(item) {
                return _this434._ngSelect.compareWith(item.value, value);
              };
            } else if (this._ngSelect.bindValue) {
              findBy = function findBy(item) {
                return !item.children && _this434.resolveNested(item.value, _this434._ngSelect.bindValue) === value;
              };
            } else {
              findBy = function findBy(item) {
                return item.value === value || !item.children && item.label && item.label === _this434.resolveNested(value, _this434._ngSelect.bindLabel);
              };
            }

            return this._items.find(function (item) {
              return findBy(item);
            });
          }
        }, {
          key: "addItem",
          value: function addItem(item) {
            var option = this.mapItem(item, this._items.length);

            this._items.push(option);

            this._filteredItems.push(option);

            return option;
          }
        }, {
          key: "clearSelected",
          value: function clearSelected() {
            var keepDisabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;

            this._selectionModel.clear(keepDisabled);

            this._items.forEach(function (item) {
              item.selected = keepDisabled && item.selected && item.disabled;
              item.marked = false;
            });

            if (this._ngSelect.hideSelected) {
              this.resetFilteredItems();
            }
          }
        }, {
          key: "findByLabel",
          value: function findByLabel(term) {
            term = stripSpecialChars(term).toLocaleLowerCase();
            return this.filteredItems.find(function (item) {
              var label = stripSpecialChars(item.label).toLocaleLowerCase();
              return label.substr(0, term.length) === term;
            });
          }
        }, {
          key: "filter",
          value: function filter(term) {
            var _this435 = this;

            if (!term) {
              this.resetFilteredItems();
              return;
            }

            this._filteredItems = [];
            term = this._ngSelect.searchFn ? term : stripSpecialChars(term).toLocaleLowerCase();
            var match = this._ngSelect.searchFn || this._defaultSearchFn;
            var hideSelected = this._ngSelect.hideSelected;

            for (var _i20 = 0, _Array$from3 = Array.from(this._groups.keys()); _i20 < _Array$from3.length; _i20++) {
              var key = _Array$from3[_i20];
              var matchedItems = [];

              var _iterator49 = _createForOfIteratorHelper(this._groups.get(key)),
                  _step48;

              try {
                for (_iterator49.s(); !(_step48 = _iterator49.n()).done;) {
                  var item = _step48.value;

                  if (hideSelected && (item.parent && item.parent.selected || item.selected)) {
                    continue;
                  }

                  var searchItem = this._ngSelect.searchFn ? item.value : item;

                  if (match(term, searchItem)) {
                    matchedItems.push(item);
                  }
                }
              } catch (err) {
                _iterator49.e(err);
              } finally {
                _iterator49.f();
              }

              if (matchedItems.length > 0) {
                (function () {
                  var _this435$_filteredIte;

                  var _matchedItems$slice = matchedItems.slice(-1),
                      _matchedItems$slice2 = _slicedToArray(_matchedItems$slice, 1),
                      last = _matchedItems$slice2[0];

                  if (last.parent) {
                    var head = _this435._items.find(function (x) {
                      return x === last.parent;
                    });

                    _this435._filteredItems.push(head);
                  }

                  (_this435$_filteredIte = _this435._filteredItems).push.apply(_this435$_filteredIte, matchedItems);
                })();
              }
            }
          }
        }, {
          key: "resetFilteredItems",
          value: function resetFilteredItems() {
            if (this._filteredItems.length === this._items.length) {
              return;
            }

            if (this._ngSelect.hideSelected && this.selectedItems.length > 0) {
              this._filteredItems = this._items.filter(function (x) {
                return !x.selected;
              });
            } else {
              this._filteredItems = this._items;
            }
          }
        }, {
          key: "unmarkItem",
          value: function unmarkItem() {
            this._markedIndex = -1;
          }
        }, {
          key: "markNextItem",
          value: function markNextItem() {
            this._stepToItem(+1);
          }
        }, {
          key: "markPreviousItem",
          value: function markPreviousItem() {
            this._stepToItem(-1);
          }
        }, {
          key: "markItem",
          value: function markItem(item) {
            this._markedIndex = this._filteredItems.indexOf(item);
          }
        }, {
          key: "markSelectedOrDefault",
          value: function markSelectedOrDefault(markDefault) {
            if (this._filteredItems.length === 0) {
              return;
            }

            var lastMarkedIndex = this._getLastMarkedIndex();

            if (lastMarkedIndex > -1) {
              this._markedIndex = lastMarkedIndex;
            } else {
              this._markedIndex = markDefault ? this.filteredItems.findIndex(function (x) {
                return !x.disabled;
              }) : -1;
            }
          }
        }, {
          key: "resolveNested",
          value: function resolveNested(option, key) {
            if (!isObject(option)) {
              return option;
            }

            if (key.indexOf('.') === -1) {
              return option[key];
            } else {
              var keys = key.split('.');
              var value = option;

              for (var i = 0, len = keys.length; i < len; ++i) {
                if (value == null) {
                  return null;
                }

                value = value[keys[i]];
              }

              return value;
            }
          }
        }, {
          key: "mapItem",
          value: function mapItem(item, index) {
            var label = isDefined(item.$ngOptionLabel) ? item.$ngOptionLabel : this.resolveNested(item, this._ngSelect.bindLabel);
            var value = isDefined(item.$ngOptionValue) ? item.$ngOptionValue : item;
            return {
              index: index,
              label: isDefined(label) ? label.toString() : '',
              value: value,
              disabled: item.disabled,
              htmlId: "".concat(this._ngSelect.dropdownId, "-").concat(index)
            };
          }
        }, {
          key: "mapSelectedItems",
          value: function mapSelectedItems() {
            var _this436 = this;

            var multiple = this._ngSelect.multiple;

            var _iterator50 = _createForOfIteratorHelper(this.selectedItems),
                _step49;

            try {
              for (_iterator50.s(); !(_step49 = _iterator50.n()).done;) {
                var selected = _step49.value;
                var value = this._ngSelect.bindValue ? this.resolveNested(selected.value, this._ngSelect.bindValue) : selected.value;
                var item = isDefined(value) ? this.findItem(value) : null;

                this._selectionModel.unselect(selected, multiple);

                this._selectionModel.select(item || selected, multiple, this._ngSelect.selectableGroupAsModel);
              }
            } catch (err) {
              _iterator50.e(err);
            } finally {
              _iterator50.f();
            }

            if (this._ngSelect.hideSelected) {
              this._filteredItems = this.filteredItems.filter(function (x) {
                return _this436.selectedItems.indexOf(x) === -1;
              });
            }
          }
        }, {
          key: "_showSelected",
          value: function _showSelected(item) {
            this._filteredItems.push(item);

            if (item.parent) {
              var parent = item.parent;

              var parentExists = this._filteredItems.find(function (x) {
                return x === parent;
              });

              if (!parentExists) {
                this._filteredItems.push(parent);
              }
            } else if (item.children) {
              var _iterator51 = _createForOfIteratorHelper(item.children),
                  _step50;

              try {
                for (_iterator51.s(); !(_step50 = _iterator51.n()).done;) {
                  var child = _step50.value;
                  child.selected = false;

                  this._filteredItems.push(child);
                }
              } catch (err) {
                _iterator51.e(err);
              } finally {
                _iterator51.f();
              }
            }

            this._filteredItems = _toConsumableArray(this._filteredItems.sort(function (a, b) {
              return a.index - b.index;
            }));
          }
        }, {
          key: "_hideSelected",
          value: function _hideSelected(item) {
            this._filteredItems = this._filteredItems.filter(function (x) {
              return x !== item;
            });

            if (item.parent) {
              var children = item.parent.children;

              if (children.every(function (x) {
                return x.selected;
              })) {
                this._filteredItems = this._filteredItems.filter(function (x) {
                  return x !== item.parent;
                });
              }
            } else if (item.children) {
              this._filteredItems = this.filteredItems.filter(function (x) {
                return x.parent !== item;
              });
            }
          }
        }, {
          key: "_defaultSearchFn",
          value: function _defaultSearchFn(search, opt) {
            var label = stripSpecialChars(opt.label).toLocaleLowerCase();
            return label.indexOf(search) > -1;
          }
        }, {
          key: "_getNextItemIndex",
          value: function _getNextItemIndex(steps) {
            if (steps > 0) {
              return this._markedIndex >= this._filteredItems.length - 1 ? 0 : this._markedIndex + 1;
            }

            return this._markedIndex <= 0 ? this._filteredItems.length - 1 : this._markedIndex - 1;
          }
        }, {
          key: "_stepToItem",
          value: function _stepToItem(steps) {
            if (this._filteredItems.length === 0 || this._filteredItems.every(function (x) {
              return x.disabled;
            })) {
              return;
            }

            this._markedIndex = this._getNextItemIndex(steps);

            if (this.markedItem.disabled) {
              this._stepToItem(steps);
            }
          }
        }, {
          key: "_getLastMarkedIndex",
          value: function _getLastMarkedIndex() {
            if (this._ngSelect.hideSelected) {
              return -1;
            }

            if (this._markedIndex > -1 && this.markedItem === undefined) {
              return -1;
            }

            var selectedIndex = this._filteredItems.indexOf(this.lastSelectedItem);

            if (this.lastSelectedItem && selectedIndex < 0) {
              return -1;
            }

            return Math.max(this.markedIndex, selectedIndex);
          }
        }, {
          key: "_groupBy",
          value: function _groupBy(items, prop) {
            var _this437 = this;

            var groups = new Map();

            if (items.length === 0) {
              return groups;
            } // Check if items are already grouped by given key.


            if (Array.isArray(items[0].value[prop])) {
              var _iterator52 = _createForOfIteratorHelper(items),
                  _step51;

              try {
                for (_iterator52.s(); !(_step51 = _iterator52.n()).done;) {
                  var item = _step51.value;
                  var children = (item.value[prop] || []).map(function (x, index) {
                    return _this437.mapItem(x, index);
                  });
                  groups.set(item, children);
                }
              } catch (err) {
                _iterator52.e(err);
              } finally {
                _iterator52.f();
              }

              return groups;
            }

            var isFnKey = isFunction(this._ngSelect.groupBy);

            var keyFn = function keyFn(item) {
              var key = isFnKey ? prop(item.value) : item.value[prop];
              return isDefined(key) ? key : undefined;
            }; // Group items by key.


            var _iterator53 = _createForOfIteratorHelper(items),
                _step52;

            try {
              for (_iterator53.s(); !(_step52 = _iterator53.n()).done;) {
                var _item = _step52.value;
                var key = keyFn(_item);
                var group = groups.get(key);

                if (group) {
                  group.push(_item);
                } else {
                  groups.set(key, [_item]);
                }
              }
            } catch (err) {
              _iterator53.e(err);
            } finally {
              _iterator53.f();
            }

            return groups;
          }
        }, {
          key: "_flatten",
          value: function _flatten(groups) {
            var _this438 = this;

            var isGroupByFn = isFunction(this._ngSelect.groupBy);
            var items = [];

            var _loop4 = function _loop4() {
              var key = _Array$from4[_i21];
              var i = items.length;

              if (key === undefined) {
                var withoutGroup = groups.get(undefined) || [];
                items.push.apply(items, _toConsumableArray(withoutGroup.map(function (x) {
                  x.index = i++;
                  return x;
                })));
                return "continue";
              }

              var isObjectKey = isObject(key);
              var parent = {
                label: isObjectKey ? '' : String(key),
                children: undefined,
                parent: null,
                index: i++,
                disabled: !_this438._ngSelect.selectableGroup,
                htmlId: newId()
              };
              var groupKey = isGroupByFn ? _this438._ngSelect.bindLabel : _this438._ngSelect.groupBy;

              var groupValue = _this438._ngSelect.groupValue || function () {
                if (isObjectKey) {
                  return key.value;
                }

                return _defineProperty({}, groupKey, key);
              };

              var children = groups.get(key).map(function (x) {
                x.parent = parent;
                x.children = undefined;
                x.index = i++;
                return x;
              });
              parent.children = children;
              parent.value = groupValue(key, children.map(function (x) {
                return x.value;
              }));
              items.push(parent);
              items.push.apply(items, _toConsumableArray(children));
            };

            for (var _i21 = 0, _Array$from4 = Array.from(groups.keys()); _i21 < _Array$from4.length; _i21++) {
              var _ret = _loop4();

              if (_ret === "continue") continue;
            }

            return items;
          }
        }]);

        return ItemsList;
      }();

      var KeyCode;

      (function (KeyCode) {
        KeyCode[KeyCode["Tab"] = 9] = "Tab";
        KeyCode[KeyCode["Enter"] = 13] = "Enter";
        KeyCode[KeyCode["Esc"] = 27] = "Esc";
        KeyCode[KeyCode["Space"] = 32] = "Space";
        KeyCode[KeyCode["ArrowUp"] = 38] = "ArrowUp";
        KeyCode[KeyCode["ArrowDown"] = 40] = "ArrowDown";
        KeyCode[KeyCode["Backspace"] = 8] = "Backspace";
      })(KeyCode || (KeyCode = {}));

      var NgDropdownPanelService = /*#__PURE__*/function () {
        function NgDropdownPanelService() {
          _classCallCheck(this, NgDropdownPanelService);

          this._dimensions = {
            itemHeight: 0,
            panelHeight: 0,
            itemsPerViewport: 0
          };
        }

        _createClass2(NgDropdownPanelService, [{
          key: "dimensions",
          get: function get() {
            return this._dimensions;
          }
        }, {
          key: "calculateItems",
          value: function calculateItems(scrollPos, itemsLength, buffer) {
            var d = this._dimensions;
            var scrollHeight = d.itemHeight * itemsLength;
            var scrollTop = Math.max(0, scrollPos);
            var indexByScrollTop = scrollTop / scrollHeight * itemsLength;
            var end = Math.min(itemsLength, Math.ceil(indexByScrollTop) + (d.itemsPerViewport + 1));
            var maxStartEnd = end;
            var maxStart = Math.max(0, maxStartEnd - d.itemsPerViewport);
            var start = Math.min(maxStart, Math.floor(indexByScrollTop));
            var topPadding = d.itemHeight * Math.ceil(start) - d.itemHeight * Math.min(start, buffer);
            topPadding = !isNaN(topPadding) ? topPadding : 0;
            start = !isNaN(start) ? start : -1;
            end = !isNaN(end) ? end : -1;
            start -= buffer;
            start = Math.max(0, start);
            end += buffer;
            end = Math.min(itemsLength, end);
            return {
              topPadding: topPadding,
              scrollHeight: scrollHeight,
              start: start,
              end: end
            };
          }
        }, {
          key: "setDimensions",
          value: function setDimensions(itemHeight, panelHeight) {
            var itemsPerViewport = Math.max(1, Math.floor(panelHeight / itemHeight));
            this._dimensions = {
              itemHeight: itemHeight,
              panelHeight: panelHeight,
              itemsPerViewport: itemsPerViewport
            };
          }
        }, {
          key: "getScrollTo",
          value: function getScrollTo(itemTop, itemHeight, lastScroll) {
            var panelHeight = this.dimensions.panelHeight;
            var itemBottom = itemTop + itemHeight;
            var top = lastScroll;
            var bottom = top + panelHeight;

            if (panelHeight >= itemBottom && lastScroll === itemTop) {
              return null;
            }

            if (itemBottom > bottom) {
              return top + itemBottom - bottom;
            } else if (itemTop <= top) {
              return itemTop;
            }

            return null;
          }
        }]);

        return NgDropdownPanelService;
      }();

      NgDropdownPanelService.ɵfac = function NgDropdownPanelService_Factory(t) {
        return new (t || NgDropdownPanelService)();
      };

      NgDropdownPanelService.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: NgDropdownPanelService,
        factory: NgDropdownPanelService.ɵfac
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgDropdownPanelService, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], function () {
          return [];
        }, null);
      })();

      var CSS_POSITIONS = ['top', 'right', 'bottom', 'left'];
      var SCROLL_SCHEDULER = typeof requestAnimationFrame !== 'undefined' ? rxjs__WEBPACK_IMPORTED_MODULE_3__["animationFrameScheduler"] : rxjs__WEBPACK_IMPORTED_MODULE_3__["asapScheduler"];

      var NgDropdownPanelComponent = /*#__PURE__*/function () {
        function NgDropdownPanelComponent(_renderer, _zone, _panelService, _elementRef, _document) {
          _classCallCheck(this, NgDropdownPanelComponent);

          this._renderer = _renderer;
          this._zone = _zone;
          this._panelService = _panelService;
          this._document = _document;
          this.items = [];
          this.position = 'auto';
          this.virtualScroll = false;
          this.filterValue = null;
          this.update = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this.scroll = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this.scrollToEnd = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this.outsideClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this._destroy$ = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subject"]();
          this._scrollToEndFired = false;
          this._updateScrollHeight = false;
          this._lastScrollPosition = 0;
          this._dropdown = _elementRef.nativeElement;
        }

        _createClass2(NgDropdownPanelComponent, [{
          key: "currentPosition",
          get: function get() {
            return this._currentPosition;
          }
        }, {
          key: "itemsLength",
          get: function get() {
            return this._itemsLength;
          },
          set: function set(value) {
            if (value !== this._itemsLength) {
              this._itemsLength = value;

              this._onItemsLengthChanged();
            }
          }
        }, {
          key: "_startOffset",
          get: function get() {
            if (this.markedItem) {
              var _this$_panelService$d = this._panelService.dimensions,
                  itemHeight = _this$_panelService$d.itemHeight,
                  panelHeight = _this$_panelService$d.panelHeight;
              var offset = this.markedItem.index * itemHeight;
              return panelHeight > offset ? 0 : offset;
            }

            return 0;
          }
        }, {
          key: "ngOnInit",
          value: function ngOnInit() {
            this._select = this._dropdown.parentElement;
            this._virtualPadding = this.paddingElementRef.nativeElement;
            this._scrollablePanel = this.scrollElementRef.nativeElement;
            this._contentPanel = this.contentElementRef.nativeElement;

            this._handleScroll();

            this._handleOutsideClick();

            this._appendDropdown();

            this._setupMousedownListener();
          }
        }, {
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            if (changes.items) {
              var change = changes.items;

              this._onItemsChange(change.currentValue, change.firstChange);
            }
          }
        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this._destroy$.next();

            this._destroy$.complete();

            this._destroy$.unsubscribe();

            if (this.appendTo) {
              this._renderer.removeChild(this._dropdown.parentNode, this._dropdown);
            }
          }
        }, {
          key: "scrollTo",
          value: function scrollTo(option) {
            var startFromOption = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

            if (!option) {
              return;
            }

            var index = this.items.indexOf(option);

            if (index < 0 || index >= this.itemsLength) {
              return;
            }

            var scrollTo;

            if (this.virtualScroll) {
              var itemHeight = this._panelService.dimensions.itemHeight;
              scrollTo = this._panelService.getScrollTo(index * itemHeight, itemHeight, this._lastScrollPosition);
            } else {
              var item = this._dropdown.querySelector("#".concat(option.htmlId));

              var lastScroll = startFromOption ? item.offsetTop : this._lastScrollPosition;
              scrollTo = this._panelService.getScrollTo(item.offsetTop, item.clientHeight, lastScroll);
            }

            if (isDefined(scrollTo)) {
              this._scrollablePanel.scrollTop = scrollTo;
            }
          }
        }, {
          key: "scrollToTag",
          value: function scrollToTag() {
            var panel = this._scrollablePanel;
            panel.scrollTop = panel.scrollHeight - panel.clientHeight;
          }
        }, {
          key: "adjustPosition",
          value: function adjustPosition() {
            this._updateYPosition();
          }
        }, {
          key: "_handleDropdownPosition",
          value: function _handleDropdownPosition() {
            this._currentPosition = this._calculateCurrentPosition(this._dropdown);

            if (CSS_POSITIONS.includes(this._currentPosition)) {
              this._updateDropdownClass(this._currentPosition);
            } else {
              this._updateDropdownClass('bottom');
            }

            if (this.appendTo) {
              this._updateYPosition();
            }

            this._dropdown.style.opacity = '1';
          }
        }, {
          key: "_updateDropdownClass",
          value: function _updateDropdownClass(currentPosition) {
            var _this439 = this;

            CSS_POSITIONS.forEach(function (position) {
              var REMOVE_CSS_CLASS = "ng-select-".concat(position);

              _this439._renderer.removeClass(_this439._dropdown, REMOVE_CSS_CLASS);

              _this439._renderer.removeClass(_this439._select, REMOVE_CSS_CLASS);
            });
            var ADD_CSS_CLASS = "ng-select-".concat(currentPosition);

            this._renderer.addClass(this._dropdown, ADD_CSS_CLASS);

            this._renderer.addClass(this._select, ADD_CSS_CLASS);
          }
        }, {
          key: "_handleScroll",
          value: function _handleScroll() {
            var _this440 = this;

            this._zone.runOutsideAngular(function () {
              Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["fromEvent"])(_this440.scrollElementRef.nativeElement, 'scroll').pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["takeUntil"])(_this440._destroy$), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["auditTime"])(0, SCROLL_SCHEDULER)).subscribe(function (e) {
                var path = e.path || e.composedPath && e.composedPath();
                var scrollTop = !path || path.length === 0 ? e.target.scrollTop : path[0].scrollTop;

                _this440._onContentScrolled(scrollTop);
              });
            });
          }
        }, {
          key: "_handleOutsideClick",
          value: function _handleOutsideClick() {
            var _this441 = this;

            if (!this._document) {
              return;
            }

            this._zone.runOutsideAngular(function () {
              Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["merge"])(Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["fromEvent"])(_this441._document, 'touchstart', {
                capture: true
              }), Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["fromEvent"])(_this441._document, 'mousedown', {
                capture: true
              })).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["takeUntil"])(_this441._destroy$)).subscribe(function ($event) {
                return _this441._checkToClose($event);
              });
            });
          }
        }, {
          key: "_checkToClose",
          value: function _checkToClose($event) {
            var _this442 = this;

            if (this._select.contains($event.target) || this._dropdown.contains($event.target)) {
              return;
            }

            var path = $event.path || $event.composedPath && $event.composedPath();

            if ($event.target && $event.target.shadowRoot && path && path[0] && this._select.contains(path[0])) {
              return;
            }

            this._zone.run(function () {
              return _this442.outsideClick.emit();
            });
          }
        }, {
          key: "_onItemsChange",
          value: function _onItemsChange(items, firstChange) {
            this.items = items || [];
            this._scrollToEndFired = false;
            this.itemsLength = items.length;

            if (this.virtualScroll) {
              this._updateItemsRange(firstChange);
            } else {
              this._setVirtualHeight();

              this._updateItems(firstChange);
            }
          }
        }, {
          key: "_updateItems",
          value: function _updateItems(firstChange) {
            var _this443 = this;

            this.update.emit(this.items);

            if (firstChange === false) {
              return;
            }

            this._zone.runOutsideAngular(function () {
              Promise.resolve().then(function () {
                var panelHeight = _this443._scrollablePanel.clientHeight;

                _this443._panelService.setDimensions(0, panelHeight);

                _this443._handleDropdownPosition();

                _this443.scrollTo(_this443.markedItem, firstChange);
              });
            });
          }
        }, {
          key: "_updateItemsRange",
          value: function _updateItemsRange(firstChange) {
            var _this444 = this;

            this._zone.runOutsideAngular(function () {
              _this444._measureDimensions().then(function () {
                if (firstChange) {
                  _this444._renderItemsRange(_this444._startOffset);

                  _this444._handleDropdownPosition();
                } else {
                  _this444._renderItemsRange();
                }
              });
            });
          }
        }, {
          key: "_onContentScrolled",
          value: function _onContentScrolled(scrollTop) {
            if (this.virtualScroll) {
              this._renderItemsRange(scrollTop);
            }

            this._lastScrollPosition = scrollTop;

            this._fireScrollToEnd(scrollTop);
          }
        }, {
          key: "_updateVirtualHeight",
          value: function _updateVirtualHeight(height) {
            if (this._updateScrollHeight) {
              this._virtualPadding.style.height = "".concat(height, "px");
              this._updateScrollHeight = false;
            }
          }
        }, {
          key: "_setVirtualHeight",
          value: function _setVirtualHeight() {
            if (!this._virtualPadding) {
              return;
            }

            this._virtualPadding.style.height = "0px";
          }
        }, {
          key: "_onItemsLengthChanged",
          value: function _onItemsLengthChanged() {
            this._updateScrollHeight = true;
          }
        }, {
          key: "_renderItemsRange",
          value: function _renderItemsRange() {
            var _this445 = this;

            var scrollTop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;

            if (scrollTop && this._lastScrollPosition === scrollTop) {
              return;
            }

            scrollTop = scrollTop || this._scrollablePanel.scrollTop;

            var range = this._panelService.calculateItems(scrollTop, this.itemsLength, this.bufferAmount);

            this._updateVirtualHeight(range.scrollHeight);

            this._contentPanel.style.transform = "translateY(".concat(range.topPadding, "px)");

            this._zone.run(function () {
              _this445.update.emit(_this445.items.slice(range.start, range.end));

              _this445.scroll.emit({
                start: range.start,
                end: range.end
              });
            });

            if (isDefined(scrollTop) && this._lastScrollPosition === 0) {
              this._scrollablePanel.scrollTop = scrollTop;
              this._lastScrollPosition = scrollTop;
            }
          }
        }, {
          key: "_measureDimensions",
          value: function _measureDimensions() {
            var _this446 = this;

            if (this._panelService.dimensions.itemHeight > 0 || this.itemsLength === 0) {
              return Promise.resolve(this._panelService.dimensions);
            }

            var _this$items = _slicedToArray(this.items, 1),
                first = _this$items[0];

            this.update.emit([first]);
            return Promise.resolve().then(function () {
              var option = _this446._dropdown.querySelector("#".concat(first.htmlId));

              var optionHeight = option.clientHeight;
              _this446._virtualPadding.style.height = "".concat(optionHeight * _this446.itemsLength, "px");
              var panelHeight = _this446._scrollablePanel.clientHeight;

              _this446._panelService.setDimensions(optionHeight, panelHeight);

              return _this446._panelService.dimensions;
            });
          }
        }, {
          key: "_fireScrollToEnd",
          value: function _fireScrollToEnd(scrollTop) {
            var _this447 = this;

            if (this._scrollToEndFired || scrollTop === 0) {
              return;
            }

            var padding = this.virtualScroll ? this._virtualPadding : this._contentPanel;

            if (scrollTop + this._dropdown.clientHeight >= padding.clientHeight - 1) {
              this._zone.run(function () {
                return _this447.scrollToEnd.emit();
              });

              this._scrollToEndFired = true;
            }
          }
        }, {
          key: "_calculateCurrentPosition",
          value: function _calculateCurrentPosition(dropdownEl) {
            if (this.position !== 'auto') {
              return this.position;
            }

            var selectRect = this._select.getBoundingClientRect();

            var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
            var offsetTop = selectRect.top + window.pageYOffset;
            var height = selectRect.height;
            var dropdownHeight = dropdownEl.getBoundingClientRect().height;

            if (offsetTop + height + dropdownHeight > scrollTop + document.documentElement.clientHeight) {
              return 'top';
            } else {
              return 'bottom';
            }
          }
        }, {
          key: "_appendDropdown",
          value: function _appendDropdown() {
            if (!this.appendTo) {
              return;
            }

            this._parent = document.querySelector(this.appendTo);

            if (!this._parent) {
              throw new Error("appendTo selector ".concat(this.appendTo, " did not found any parent element"));
            }

            this._updateXPosition();

            this._parent.appendChild(this._dropdown);
          }
        }, {
          key: "_updateXPosition",
          value: function _updateXPosition() {
            var select = this._select.getBoundingClientRect();

            var parent = this._parent.getBoundingClientRect();

            var offsetLeft = select.left - parent.left;
            this._dropdown.style.left = offsetLeft + 'px';
            this._dropdown.style.width = select.width + 'px';
            this._dropdown.style.minWidth = select.width + 'px';
          }
        }, {
          key: "_updateYPosition",
          value: function _updateYPosition() {
            var select = this._select.getBoundingClientRect();

            var parent = this._parent.getBoundingClientRect();

            var delta = select.height;

            if (this._currentPosition === 'top') {
              var offsetBottom = parent.bottom - select.bottom;
              this._dropdown.style.bottom = offsetBottom + delta + 'px';
              this._dropdown.style.top = 'auto';
            } else if (this._currentPosition === 'bottom') {
              var offsetTop = select.top - parent.top;
              this._dropdown.style.top = offsetTop + delta + 'px';
              this._dropdown.style.bottom = 'auto';
            }
          }
        }, {
          key: "_setupMousedownListener",
          value: function _setupMousedownListener() {
            var _this448 = this;

            this._zone.runOutsideAngular(function () {
              Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["fromEvent"])(_this448._dropdown, 'mousedown').pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["takeUntil"])(_this448._destroy$)).subscribe(function (event) {
                var target = event.target;

                if (target.tagName === 'INPUT') {
                  return;
                }

                event.preventDefault();
              });
            });
          }
        }]);

        return NgDropdownPanelComponent;
      }();

      NgDropdownPanelComponent.ɵfac = function NgDropdownPanelComponent_Factory(t) {
        return new (t || NgDropdownPanelComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgDropdownPanelService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_common__WEBPACK_IMPORTED_MODULE_4__["DOCUMENT"], 8));
      };

      NgDropdownPanelComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({
        type: NgDropdownPanelComponent,
        selectors: [["ng-dropdown-panel"]],
        viewQuery: function NgDropdownPanelComponent_Query(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstaticViewQuery"](_c0, true, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstaticViewQuery"](_c1, true, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstaticViewQuery"](_c2, true, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]);
          }

          if (rf & 2) {
            var _t;

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.contentElementRef = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.scrollElementRef = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.paddingElementRef = _t.first);
          }
        },
        inputs: {
          items: "items",
          position: "position",
          virtualScroll: "virtualScroll",
          filterValue: "filterValue",
          markedItem: "markedItem",
          appendTo: "appendTo",
          bufferAmount: "bufferAmount",
          headerTemplate: "headerTemplate",
          footerTemplate: "footerTemplate"
        },
        outputs: {
          update: "update",
          scroll: "scroll",
          scrollToEnd: "scrollToEnd",
          outsideClick: "outsideClick"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]],
        ngContentSelectors: _c4,
        decls: 9,
        vars: 6,
        consts: [["class", "ng-dropdown-header", 4, "ngIf"], [1, "ng-dropdown-panel-items", "scroll-host"], ["scroll", ""], ["padding", ""], ["content", ""], ["class", "ng-dropdown-footer", 4, "ngIf"], [1, "ng-dropdown-header"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "ng-dropdown-footer"]],
        template: function NgDropdownPanelComponent_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](0, NgDropdownPanelComponent_div_0_Template, 2, 4, "div", 0);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "div", 1, 2);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](3, "div", null, 3);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](5, "div", null, 4);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojection"](7);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](8, NgDropdownPanelComponent_div_8_Template, 2, 4, "div", 5);
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.headerTemplate);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("total-padding", ctx.virtualScroll);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("scrollable-content", ctx.virtualScroll && ctx.items.length);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.footerTemplate);
          }
        },
        directives: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["NgIf"], _angular_common__WEBPACK_IMPORTED_MODULE_4__["NgTemplateOutlet"]],
        encapsulation: 2,
        changeDetection: 0
      });

      NgDropdownPanelComponent.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"]
        }, {
          type: NgDropdownPanelService
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["DOCUMENT"]]
          }]
        }];
      };

      NgDropdownPanelComponent.propDecorators = {
        items: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        markedItem: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        position: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        appendTo: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        bufferAmount: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        virtualScroll: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        headerTemplate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        footerTemplate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        filterValue: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        update: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"]
        }],
        scroll: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"]
        }],
        scrollToEnd: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"]
        }],
        outsideClick: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"]
        }],
        contentElementRef: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"],
          args: ['content', {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
            "static": true
          }]
        }],
        scrollElementRef: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"],
          args: ['scroll', {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
            "static": true
          }]
        }],
        paddingElementRef: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"],
          args: ['padding', {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
            "static": true
          }]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgDropdownPanelComponent, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"],
          args: [{
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            selector: 'ng-dropdown-panel',
            template: "\n        <div *ngIf=\"headerTemplate\" class=\"ng-dropdown-header\">\n            <ng-container [ngTemplateOutlet]=\"headerTemplate\" [ngTemplateOutletContext]=\"{ searchTerm: filterValue }\"></ng-container>\n        </div>\n        <div #scroll class=\"ng-dropdown-panel-items scroll-host\">\n            <div #padding [class.total-padding]=\"virtualScroll\"></div>\n            <div #content [class.scrollable-content]=\"virtualScroll && items.length\">\n                <ng-content></ng-content>\n            </div>\n        </div>\n        <div *ngIf=\"footerTemplate\" class=\"ng-dropdown-footer\">\n            <ng-container [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{ searchTerm: filterValue }\"></ng-container>\n        </div>\n    "
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"]
          }, {
            type: NgDropdownPanelService
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["DOCUMENT"]]
            }]
          }];
        }, {
          items: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          position: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          virtualScroll: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          filterValue: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          update: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"]
          }],
          scroll: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"]
          }],
          scrollToEnd: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"]
          }],
          outsideClick: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"]
          }],
          markedItem: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          appendTo: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          bufferAmount: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          headerTemplate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          footerTemplate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          contentElementRef: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"],
            args: ['content', {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
              "static": true
            }]
          }],
          scrollElementRef: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"],
            args: ['scroll', {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
              "static": true
            }]
          }],
          paddingElementRef: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"],
            args: ['padding', {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"],
              "static": true
            }]
          }]
        });
      })();

      var NgOptionComponent = /*#__PURE__*/function () {
        function NgOptionComponent(elementRef) {
          _classCallCheck(this, NgOptionComponent);

          this.elementRef = elementRef;
          this.stateChange$ = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subject"]();
          this._disabled = false;
        }

        _createClass2(NgOptionComponent, [{
          key: "disabled",
          get: function get() {
            return this._disabled;
          },
          set: function set(value) {
            this._disabled = this._isDisabled(value);
          }
        }, {
          key: "label",
          get: function get() {
            return (this.elementRef.nativeElement.textContent || '').trim();
          }
        }, {
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            if (changes.disabled) {
              this.stateChange$.next({
                value: this.value,
                disabled: this._disabled
              });
            }
          }
        }, {
          key: "ngAfterViewChecked",
          value: function ngAfterViewChecked() {
            if (this.label !== this._previousLabel) {
              this._previousLabel = this.label;
              this.stateChange$.next({
                value: this.value,
                disabled: this._disabled,
                label: this.elementRef.nativeElement.innerHTML
              });
            }
          }
        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this.stateChange$.complete();
          }
        }, {
          key: "_isDisabled",
          value: function _isDisabled(value) {
            return value != null && "".concat(value) !== 'false';
          }
        }]);

        return NgOptionComponent;
      }();

      NgOptionComponent.ɵfac = function NgOptionComponent_Factory(t) {
        return new (t || NgOptionComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]));
      };

      NgOptionComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({
        type: NgOptionComponent,
        selectors: [["ng-option"]],
        inputs: {
          disabled: "disabled",
          value: "value"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]],
        ngContentSelectors: _c4,
        decls: 1,
        vars: 0,
        template: function NgOptionComponent_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojection"](0);
          }
        },
        encapsulation: 2,
        changeDetection: 0
      });

      NgOptionComponent.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }];
      };

      NgOptionComponent.propDecorators = {
        value: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        disabled: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgOptionComponent, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"],
          args: [{
            selector: 'ng-option',
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
            template: "<ng-content></ng-content>"
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }];
        }, {
          disabled: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          value: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();

      var NgSelectConfig = function NgSelectConfig() {
        _classCallCheck(this, NgSelectConfig);

        this.notFoundText = 'No items found';
        this.typeToSearchText = 'Type to search';
        this.addTagText = 'Add item';
        this.loadingText = 'Loading...';
        this.clearAllText = 'Clear all';
        this.disableVirtualScroll = true;
        this.openOnEnter = true;
        this.appearance = 'underline';
      };

      NgSelectConfig.ɵfac = function NgSelectConfig_Factory(t) {
        return new (t || NgSelectConfig)();
      };

      NgSelectConfig.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        factory: function NgSelectConfig_Factory() {
          return new NgSelectConfig();
        },
        token: NgSelectConfig,
        providedIn: "root"
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSelectConfig, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], function () {
          return [];
        }, null);
      })();

      var SELECTION_MODEL_FACTORY = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('ng-select-selection-model');

      var NgSelectComponent = /*#__PURE__*/function () {
        function NgSelectComponent(classes, autoFocus, config, newSelectionModel, _elementRef, _cd, _console) {
          var _this449 = this;

          _classCallCheck(this, NgSelectComponent);

          this.classes = classes;
          this.autoFocus = autoFocus;
          this.config = config;
          this._cd = _cd;
          this._console = _console;
          this.markFirst = true;
          this.dropdownPosition = 'auto';
          this.loading = false;
          this.closeOnSelect = true;
          this.hideSelected = false;
          this.selectOnTab = false;
          this.bufferAmount = 4;
          this.selectableGroup = false;
          this.selectableGroupAsModel = true;
          this.searchFn = null;
          this.trackByFn = null;
          this.clearOnBackspace = true;
          this.labelForId = null;
          this.inputAttrs = {};
          this.readonly = false;
          this.searchWhileComposing = true;
          this.minTermLength = 0;
          this.editableSearchTerm = false;

          this.keyDownFn = function (_) {
            return true;
          };

          this.multiple = false;
          this.addTag = false;
          this.searchable = true;
          this.clearable = true;
          this.isOpen = false; // output events

          this.blurEvent = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this.focusEvent = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this.changeEvent = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this.openEvent = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this.closeEvent = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this.searchEvent = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this.clearEvent = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this.addEvent = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this.removeEvent = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this.scroll = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this.scrollToEnd = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this.viewPortItems = [];
          this.searchTerm = null;
          this.dropdownId = newId();
          this.escapeHTML = true;
          this.useDefaultClass = true;
          this._items = [];
          this._defaultLabel = 'label';
          this._pressedKeys = [];
          this._isComposing = false;
          this._destroy$ = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subject"]();
          this._keyPress$ = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subject"]();

          this._onChange = function (_) {};

          this._onTouched = function () {};

          this.clearItem = function (item) {
            var option = _this449.selectedItems.find(function (x) {
              return x.value === item;
            });

            _this449.unselect(option);
          };

          this.trackByOption = function (_, item) {
            if (_this449.trackByFn) {
              return _this449.trackByFn(item.value);
            }

            return item;
          };

          this._mergeGlobalConfig(config);

          this.itemsList = new ItemsList(this, newSelectionModel());
          this.element = _elementRef.nativeElement;
        }

        _createClass2(NgSelectComponent, [{
          key: "items",
          get: function get() {
            return this._items;
          },
          set: function set(value) {
            if (value === null) {
              value = [];
            }

            this._itemsAreUsed = true;
            this._items = value;
          }
        }, {
          key: "compareWith",
          get: function get() {
            return this._compareWith;
          },
          set: function set(fn) {
            if (fn !== undefined && fn !== null && !isFunction(fn)) {
              throw Error('`compareWith` must be a function.');
            }

            this._compareWith = fn;
          }
        }, {
          key: "clearSearchOnAdd",
          get: function get() {
            if (isDefined(this._clearSearchOnAdd)) {
              return this._clearSearchOnAdd;
            } else if (isDefined(this.config.clearSearchOnAdd)) {
              return this.config.clearSearchOnAdd;
            }

            return this.closeOnSelect;
          },
          set: function set(value) {
            this._clearSearchOnAdd = value;
          }
        }, {
          key: "disabled",
          get: function get() {
            return this.readonly || this._disabled;
          }
        }, {
          key: "filtered",
          get: function get() {
            return !!this.searchTerm && this.searchable || this._isComposing;
          }
        }, {
          key: "_editableSearchTerm",
          get: function get() {
            return this.editableSearchTerm && !this.multiple;
          }
        }, {
          key: "selectedItems",
          get: function get() {
            return this.itemsList.selectedItems;
          }
        }, {
          key: "selectedValues",
          get: function get() {
            return this.selectedItems.map(function (x) {
              return x.value;
            });
          }
        }, {
          key: "hasValue",
          get: function get() {
            return this.selectedItems.length > 0;
          }
        }, {
          key: "currentPanelPosition",
          get: function get() {
            if (this.dropdownPanel) {
              return this.dropdownPanel.currentPosition;
            }

            return undefined;
          }
        }, {
          key: "ngOnInit",
          value: function ngOnInit() {
            this._handleKeyPresses();

            this._setInputAttributes();
          }
        }, {
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            if (changes.multiple) {
              this.itemsList.clearSelected();
            }

            if (changes.items) {
              this._setItems(changes.items.currentValue || []);
            }

            if (changes.isOpen) {
              this._manualOpen = isDefined(changes.isOpen.currentValue);
            }
          }
        }, {
          key: "ngAfterViewInit",
          value: function ngAfterViewInit() {
            if (!this._itemsAreUsed) {
              this.escapeHTML = false;

              this._setItemsFromNgOptions();
            }

            if (isDefined(this.autoFocus)) {
              this.focus();
            }
          }
        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this._destroy$.next();

            this._destroy$.complete();
          }
        }, {
          key: "handleKeyDown",
          value: function handleKeyDown($event) {
            var keyCode = KeyCode[$event.which];

            if (keyCode) {
              if (this.keyDownFn($event) === false) {
                return;
              }

              this.handleKeyCode($event);
            } else if ($event.key && $event.key.length === 1) {
              this._keyPress$.next($event.key.toLocaleLowerCase());
            }
          }
        }, {
          key: "handleKeyCode",
          value: function handleKeyCode($event) {
            switch ($event.which) {
              case KeyCode.ArrowDown:
                this._handleArrowDown($event);

                break;

              case KeyCode.ArrowUp:
                this._handleArrowUp($event);

                break;

              case KeyCode.Space:
                this._handleSpace($event);

                break;

              case KeyCode.Enter:
                this._handleEnter($event);

                break;

              case KeyCode.Tab:
                this._handleTab($event);

                break;

              case KeyCode.Esc:
                this.close();
                $event.preventDefault();
                break;

              case KeyCode.Backspace:
                this._handleBackspace();

                break;
            }
          }
        }, {
          key: "handleMousedown",
          value: function handleMousedown($event) {
            var target = $event.target;

            if (target.tagName !== 'INPUT') {
              $event.preventDefault();
            }

            if (target.classList.contains('ng-clear-wrapper')) {
              this.handleClearClick();
              return;
            }

            if (target.classList.contains('ng-arrow-wrapper')) {
              this.handleArrowClick();
              return;
            }

            if (target.classList.contains('ng-value-icon')) {
              return;
            }

            if (!this.focused) {
              this.focus();
            }

            if (this.searchable) {
              this.open();
            } else {
              this.toggle();
            }
          }
        }, {
          key: "handleArrowClick",
          value: function handleArrowClick() {
            if (this.isOpen) {
              this.close();
            } else {
              this.open();
            }
          }
        }, {
          key: "handleClearClick",
          value: function handleClearClick() {
            if (this.hasValue) {
              this.itemsList.clearSelected(true);

              this._updateNgModel();
            }

            this._clearSearch();

            this.focus();
            this.clearEvent.emit();

            this._onSelectionChanged();
          }
        }, {
          key: "clearModel",
          value: function clearModel() {
            if (!this.clearable) {
              return;
            }

            this.itemsList.clearSelected();

            this._updateNgModel();
          }
        }, {
          key: "writeValue",
          value: function writeValue(value) {
            this.itemsList.clearSelected();

            this._handleWriteValue(value);

            this._cd.markForCheck();
          }
        }, {
          key: "registerOnChange",
          value: function registerOnChange(fn) {
            this._onChange = fn;
          }
        }, {
          key: "registerOnTouched",
          value: function registerOnTouched(fn) {
            this._onTouched = fn;
          }
        }, {
          key: "setDisabledState",
          value: function setDisabledState(state) {
            this._disabled = state;

            this._cd.markForCheck();
          }
        }, {
          key: "toggle",
          value: function toggle() {
            if (!this.isOpen) {
              this.open();
            } else {
              this.close();
            }
          }
        }, {
          key: "open",
          value: function open() {
            if (this.disabled || this.isOpen || this.itemsList.maxItemsSelected || this._manualOpen) {
              return;
            }

            if (!this._isTypeahead && !this.addTag && this.itemsList.noItemsToSelect) {
              return;
            }

            this.isOpen = true;
            this.itemsList.markSelectedOrDefault(this.markFirst);
            this.openEvent.emit();

            if (!this.searchTerm) {
              this.focus();
            }

            this.detectChanges();
          }
        }, {
          key: "close",
          value: function close() {
            if (!this.isOpen || this._manualOpen) {
              return;
            }

            this.isOpen = false;
            this._isComposing = false;

            if (!this._editableSearchTerm) {
              this._clearSearch();
            } else {
              this.itemsList.resetFilteredItems();
            }

            this.itemsList.unmarkItem();

            this._onTouched();

            this.closeEvent.emit();

            this._cd.markForCheck();
          }
        }, {
          key: "toggleItem",
          value: function toggleItem(item) {
            if (!item || item.disabled || this.disabled) {
              return;
            }

            if (this.multiple && item.selected) {
              this.unselect(item);
            } else {
              this.select(item);
            }

            if (this._editableSearchTerm) {
              this._setSearchTermFromItems();
            }

            this._onSelectionChanged();
          }
        }, {
          key: "select",
          value: function select(item) {
            if (!item.selected) {
              this.itemsList.select(item);

              if (this.clearSearchOnAdd && !this._editableSearchTerm) {
                this._clearSearch();
              }

              this._updateNgModel();

              if (this.multiple) {
                this.addEvent.emit(item.value);
              }
            }

            if (this.closeOnSelect || this.itemsList.noItemsToSelect) {
              this.close();
            }
          }
        }, {
          key: "focus",
          value: function focus() {
            this.searchInput.nativeElement.focus();
          }
        }, {
          key: "blur",
          value: function blur() {
            this.searchInput.nativeElement.blur();
          }
        }, {
          key: "unselect",
          value: function unselect(item) {
            if (!item) {
              return;
            }

            this.itemsList.unselect(item);
            this.focus();

            this._updateNgModel();

            this.removeEvent.emit(item);
          }
        }, {
          key: "selectTag",
          value: function selectTag() {
            var _this450 = this;

            var tag;

            if (isFunction(this.addTag)) {
              tag = this.addTag(this.searchTerm);
            } else {
              tag = this._primitive ? this.searchTerm : _defineProperty({}, this.bindLabel, this.searchTerm);
            }

            var handleTag = function handleTag(item) {
              return _this450._isTypeahead || !_this450.isOpen ? _this450.itemsList.mapItem(item, null) : _this450.itemsList.addItem(item);
            };

            if (isPromise(tag)) {
              tag.then(function (item) {
                return _this450.select(handleTag(item));
              })["catch"](function () {});
            } else if (tag) {
              this.select(handleTag(tag));
            }
          }
        }, {
          key: "showClear",
          value: function showClear() {
            return this.clearable && (this.hasValue || this.searchTerm) && !this.disabled;
          }
        }, {
          key: "showAddTag",
          get: function get() {
            if (!this._validTerm) {
              return false;
            }

            var term = this.searchTerm.toLowerCase().trim();
            return this.addTag && !this.itemsList.filteredItems.some(function (x) {
              return x.label.toLowerCase() === term;
            }) && (!this.hideSelected && this.isOpen || !this.selectedItems.some(function (x) {
              return x.label.toLowerCase() === term;
            })) && !this.loading;
          }
        }, {
          key: "showNoItemsFound",
          value: function showNoItemsFound() {
            var empty = this.itemsList.filteredItems.length === 0;
            return (empty && !this._isTypeahead && !this.loading || empty && this._isTypeahead && this._validTerm && !this.loading) && !this.showAddTag;
          }
        }, {
          key: "showTypeToSearch",
          value: function showTypeToSearch() {
            var empty = this.itemsList.filteredItems.length === 0;
            return empty && this._isTypeahead && !this._validTerm && !this.loading;
          }
        }, {
          key: "onCompositionStart",
          value: function onCompositionStart() {
            this._isComposing = true;
          }
        }, {
          key: "onCompositionEnd",
          value: function onCompositionEnd(term) {
            this._isComposing = false;

            if (this.searchWhileComposing) {
              return;
            }

            this.filter(term);
          }
        }, {
          key: "filter",
          value: function filter(term) {
            if (this._isComposing && !this.searchWhileComposing) {
              return;
            }

            this.searchTerm = term;

            if (this._isTypeahead && (this._validTerm || this.minTermLength === 0)) {
              this.typeahead.next(term);
            }

            if (!this._isTypeahead) {
              this.itemsList.filter(this.searchTerm);

              if (this.isOpen) {
                this.itemsList.markSelectedOrDefault(this.markFirst);
              }
            }

            this.searchEvent.emit({
              term: term,
              items: this.itemsList.filteredItems.map(function (x) {
                return x.value;
              })
            });
            this.open();
          }
        }, {
          key: "onInputFocus",
          value: function onInputFocus($event) {
            if (this.focused) {
              return;
            }

            if (this._editableSearchTerm) {
              this._setSearchTermFromItems();
            }

            this.element.classList.add('ng-select-focused');
            this.focusEvent.emit($event);
            this.focused = true;
          }
        }, {
          key: "onInputBlur",
          value: function onInputBlur($event) {
            this.element.classList.remove('ng-select-focused');
            this.blurEvent.emit($event);

            if (!this.isOpen && !this.disabled) {
              this._onTouched();
            }

            if (this._editableSearchTerm) {
              this._setSearchTermFromItems();
            }

            this.focused = false;
          }
        }, {
          key: "onItemHover",
          value: function onItemHover(item) {
            if (item.disabled) {
              return;
            }

            this.itemsList.markItem(item);
          }
        }, {
          key: "detectChanges",
          value: function detectChanges() {
            if (!this._cd.destroyed) {
              this._cd.detectChanges();
            }
          }
        }, {
          key: "_setSearchTermFromItems",
          value: function _setSearchTermFromItems() {
            var selected = this.selectedItems && this.selectedItems[0];
            this.searchTerm = selected && selected.label || null;
          }
        }, {
          key: "_setItems",
          value: function _setItems(items) {
            var firstItem = items[0];
            this.bindLabel = this.bindLabel || this._defaultLabel;
            this._primitive = isDefined(firstItem) ? !isObject(firstItem) : this._primitive || this.bindLabel === this._defaultLabel;
            this.itemsList.setItems(items);

            if (items.length > 0 && this.hasValue) {
              this.itemsList.mapSelectedItems();
            }

            if (this.isOpen && isDefined(this.searchTerm) && !this._isTypeahead) {
              this.itemsList.filter(this.searchTerm);
            }

            if (this._isTypeahead || this.isOpen) {
              this.itemsList.markSelectedOrDefault(this.markFirst);
            }
          }
        }, {
          key: "_setItemsFromNgOptions",
          value: function _setItemsFromNgOptions() {
            var _this451 = this;

            var mapNgOptions = function mapNgOptions(options) {
              _this451.items = options.map(function (option) {
                return {
                  $ngOptionValue: option.value,
                  $ngOptionLabel: option.elementRef.nativeElement.innerHTML,
                  disabled: option.disabled
                };
              });

              _this451.itemsList.setItems(_this451.items);

              if (_this451.hasValue) {
                _this451.itemsList.mapSelectedItems();
              }

              _this451.detectChanges();
            };

            var handleOptionChange = function handleOptionChange() {
              var changedOrDestroyed = Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["merge"])(_this451.ngOptions.changes, _this451._destroy$);
              Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["merge"]).apply(void 0, _toConsumableArray(_this451.ngOptions.map(function (option) {
                return option.stateChange$;
              }))).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["takeUntil"])(changedOrDestroyed)).subscribe(function (option) {
                var item = _this451.itemsList.findItem(option.value);

                item.disabled = option.disabled;
                item.label = option.label || item.label;

                _this451._cd.detectChanges();
              });
            };

            this.ngOptions.changes.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["startWith"])(this.ngOptions), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["takeUntil"])(this._destroy$)).subscribe(function (options) {
              _this451.bindLabel = _this451._defaultLabel;
              mapNgOptions(options);
              handleOptionChange();
            });
          }
        }, {
          key: "_isValidWriteValue",
          value: function _isValidWriteValue(value) {
            var _this452 = this;

            if (!isDefined(value) || this.multiple && value === '' || Array.isArray(value) && value.length === 0) {
              return false;
            }

            var validateBinding = function validateBinding(item) {
              if (!isDefined(_this452.compareWith) && isObject(item) && _this452.bindValue) {
                _this452._console.warn("Setting object(".concat(JSON.stringify(item), ") as your model with bindValue is not allowed unless [compareWith] is used."));

                return false;
              }

              return true;
            };

            if (this.multiple) {
              if (!Array.isArray(value)) {
                this._console.warn('Multiple select ngModel should be array.');

                return false;
              }

              return value.every(function (item) {
                return validateBinding(item);
              });
            } else {
              return validateBinding(value);
            }
          }
        }, {
          key: "_handleWriteValue",
          value: function _handleWriteValue(ngModel) {
            var _this453 = this;

            if (!this._isValidWriteValue(ngModel)) {
              return;
            }

            var select = function select(val) {
              var item = _this453.itemsList.findItem(val);

              if (item) {
                _this453.itemsList.select(item);
              } else {
                var isValObject = isObject(val);
                var isPrimitive = !isValObject && !_this453.bindValue;

                if (isValObject || isPrimitive) {
                  _this453.itemsList.select(_this453.itemsList.mapItem(val, null));
                } else if (_this453.bindValue) {
                  var _item2;

                  item = (_item2 = {}, _defineProperty(_item2, _this453.bindLabel, null), _defineProperty(_item2, _this453.bindValue, val), _item2);

                  _this453.itemsList.select(_this453.itemsList.mapItem(item, null));
                }
              }
            };

            if (this.multiple) {
              ngModel.forEach(function (item) {
                return select(item);
              });
            } else {
              select(ngModel);
            }
          }
        }, {
          key: "_handleKeyPresses",
          value: function _handleKeyPresses() {
            var _this454 = this;

            if (this.searchable) {
              return;
            }

            this._keyPress$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["takeUntil"])(this._destroy$), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["tap"])(function (letter) {
              return _this454._pressedKeys.push(letter);
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["debounceTime"])(200), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["filter"])(function () {
              return _this454._pressedKeys.length > 0;
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function () {
              return _this454._pressedKeys.join('');
            })).subscribe(function (term) {
              var item = _this454.itemsList.findByLabel(term);

              if (item) {
                if (_this454.isOpen) {
                  _this454.itemsList.markItem(item);

                  _this454._scrollToMarked();

                  _this454._cd.markForCheck();
                } else {
                  _this454.select(item);
                }
              }

              _this454._pressedKeys = [];
            });
          }
        }, {
          key: "_setInputAttributes",
          value: function _setInputAttributes() {
            var input = this.searchInput.nativeElement;
            var attributes = Object.assign({
              type: 'text',
              autocorrect: 'off',
              autocapitalize: 'off',
              autocomplete: this.labelForId ? 'off' : this.dropdownId
            }, this.inputAttrs);

            for (var _i22 = 0, _Object$keys5 = Object.keys(attributes); _i22 < _Object$keys5.length; _i22++) {
              var key = _Object$keys5[_i22];
              input.setAttribute(key, attributes[key]);
            }
          }
        }, {
          key: "_updateNgModel",
          value: function _updateNgModel() {
            var model = [];

            var _iterator54 = _createForOfIteratorHelper(this.selectedItems),
                _step53;

            try {
              for (_iterator54.s(); !(_step53 = _iterator54.n()).done;) {
                var item = _step53.value;

                if (this.bindValue) {
                  var value = null;

                  if (item.children) {
                    var groupKey = this.groupValue ? this.bindValue : this.groupBy;
                    value = item.value[groupKey || this.groupBy];
                  } else {
                    value = this.itemsList.resolveNested(item.value, this.bindValue);
                  }

                  model.push(value);
                } else {
                  model.push(item.value);
                }
              }
            } catch (err) {
              _iterator54.e(err);
            } finally {
              _iterator54.f();
            }

            var selected = this.selectedItems.map(function (x) {
              return x.value;
            });

            if (this.multiple) {
              this._onChange(model);

              this.changeEvent.emit(selected);
            } else {
              this._onChange(isDefined(model[0]) ? model[0] : null);

              this.changeEvent.emit(selected[0]);
            }

            this._cd.markForCheck();
          }
        }, {
          key: "_clearSearch",
          value: function _clearSearch() {
            if (!this.searchTerm) {
              return;
            }

            this._changeSearch(null);

            this.itemsList.resetFilteredItems();
          }
        }, {
          key: "_changeSearch",
          value: function _changeSearch(searchTerm) {
            this.searchTerm = searchTerm;

            if (this._isTypeahead) {
              this.typeahead.next(searchTerm);
            }
          }
        }, {
          key: "_scrollToMarked",
          value: function _scrollToMarked() {
            if (!this.isOpen || !this.dropdownPanel) {
              return;
            }

            this.dropdownPanel.scrollTo(this.itemsList.markedItem);
          }
        }, {
          key: "_scrollToTag",
          value: function _scrollToTag() {
            if (!this.isOpen || !this.dropdownPanel) {
              return;
            }

            this.dropdownPanel.scrollToTag();
          }
        }, {
          key: "_onSelectionChanged",
          value: function _onSelectionChanged() {
            if (this.isOpen && this.multiple && this.appendTo) {
              // Make sure items are rendered.
              this._cd.detectChanges();

              this.dropdownPanel.adjustPosition();
            }
          }
        }, {
          key: "_handleTab",
          value: function _handleTab($event) {
            if (this.isOpen === false && !this.addTag) {
              return;
            }

            if (this.selectOnTab) {
              if (this.itemsList.markedItem) {
                this.toggleItem(this.itemsList.markedItem);
                $event.preventDefault();
              } else if (this.showAddTag) {
                this.selectTag();
                $event.preventDefault();
              } else {
                this.close();
              }
            } else {
              this.close();
            }
          }
        }, {
          key: "_handleEnter",
          value: function _handleEnter($event) {
            if (this.isOpen || this._manualOpen) {
              if (this.itemsList.markedItem) {
                this.toggleItem(this.itemsList.markedItem);
              } else if (this.showAddTag) {
                this.selectTag();
              }
            } else if (this.openOnEnter) {
              this.open();
            } else {
              return;
            }

            $event.preventDefault();
          }
        }, {
          key: "_handleSpace",
          value: function _handleSpace($event) {
            if (this.isOpen || this._manualOpen) {
              return;
            }

            this.open();
            $event.preventDefault();
          }
        }, {
          key: "_handleArrowDown",
          value: function _handleArrowDown($event) {
            if (this._nextItemIsTag(+1)) {
              this.itemsList.unmarkItem();

              this._scrollToTag();
            } else {
              this.itemsList.markNextItem();

              this._scrollToMarked();
            }

            this.open();
            $event.preventDefault();
          }
        }, {
          key: "_handleArrowUp",
          value: function _handleArrowUp($event) {
            if (!this.isOpen) {
              return;
            }

            if (this._nextItemIsTag(-1)) {
              this.itemsList.unmarkItem();

              this._scrollToTag();
            } else {
              this.itemsList.markPreviousItem();

              this._scrollToMarked();
            }

            $event.preventDefault();
          }
        }, {
          key: "_nextItemIsTag",
          value: function _nextItemIsTag(nextStep) {
            var nextIndex = this.itemsList.markedIndex + nextStep;
            return this.addTag && this.searchTerm && this.itemsList.markedItem && (nextIndex < 0 || nextIndex === this.itemsList.filteredItems.length);
          }
        }, {
          key: "_handleBackspace",
          value: function _handleBackspace() {
            if (this.searchTerm || !this.clearable || !this.clearOnBackspace || !this.hasValue) {
              return;
            }

            if (this.multiple) {
              this.unselect(this.itemsList.lastSelectedItem);
            } else {
              this.clearModel();
            }
          }
        }, {
          key: "_isTypeahead",
          get: function get() {
            return this.typeahead && this.typeahead.observers.length > 0;
          }
        }, {
          key: "_validTerm",
          get: function get() {
            var term = this.searchTerm && this.searchTerm.trim();
            return term && term.length >= this.minTermLength;
          }
        }, {
          key: "_mergeGlobalConfig",
          value: function _mergeGlobalConfig(config) {
            this.placeholder = this.placeholder || config.placeholder;
            this.notFoundText = this.notFoundText || config.notFoundText;
            this.typeToSearchText = this.typeToSearchText || config.typeToSearchText;
            this.addTagText = this.addTagText || config.addTagText;
            this.loadingText = this.loadingText || config.loadingText;
            this.clearAllText = this.clearAllText || config.clearAllText;
            this.virtualScroll = isDefined(this.virtualScroll) ? this.virtualScroll : isDefined(config.disableVirtualScroll) ? !config.disableVirtualScroll : false;
            this.openOnEnter = isDefined(this.openOnEnter) ? this.openOnEnter : config.openOnEnter;
            this.appendTo = this.appendTo || config.appendTo;
            this.bindValue = this.bindValue || config.bindValue;
            this.bindLabel = this.bindLabel || config.bindLabel;
            this.appearance = this.appearance || config.appearance;
          }
        }]);

        return NgSelectComponent;
      }();

      NgSelectComponent.ɵfac = function NgSelectComponent_Factory(t) {
        return new (t || NgSelectComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinjectAttribute"]('class'), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinjectAttribute"]('autofocus'), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgSelectConfig), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](SELECTION_MODEL_FACTORY), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ConsoleService));
      };

      NgSelectComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({
        type: NgSelectComponent,
        selectors: [["ng-select"]],
        contentQueries: function NgSelectComponent_ContentQueries(rf, ctx, dirIndex) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, NgOptionTemplateDirective, true, _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, NgOptgroupTemplateDirective, true, _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, NgLabelTemplateDirective, true, _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, NgMultiLabelTemplateDirective, true, _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, NgHeaderTemplateDirective, true, _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, NgFooterTemplateDirective, true, _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, NgNotFoundTemplateDirective, true, _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, NgTypeToSearchTemplateDirective, true, _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, NgLoadingTextTemplateDirective, true, _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, NgTagTemplateDirective, true, _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, NgLoadingSpinnerTemplateDirective, true, _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, NgOptionComponent, true);
          }

          if (rf & 2) {
            var _t;

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.optionTemplate = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.optgroupTemplate = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.labelTemplate = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.multiLabelTemplate = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.headerTemplate = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.footerTemplate = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.notFoundTemplate = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.typeToSearchTemplate = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.loadingTextTemplate = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.tagTemplate = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.loadingSpinnerTemplate = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.ngOptions = _t);
          }
        },
        viewQuery: function NgSelectComponent_Query(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵviewQuery"](NgDropdownPanelComponent, true);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstaticViewQuery"](_c5, true);
          }

          if (rf & 2) {
            var _t;

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.dropdownPanel = _t.first);
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.searchInput = _t.first);
          }
        },
        hostVars: 20,
        hostBindings: function NgSelectComponent_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("keydown", function NgSelectComponent_keydown_HostBindingHandler($event) {
              return ctx.handleKeyDown($event);
            });
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("ng-select", ctx.useDefaultClass)("ng-select-single", !ctx.multiple)("ng-select-multiple", ctx.multiple)("ng-select-taggable", ctx.addTag)("ng-select-searchable", ctx.searchable)("ng-select-clearable", ctx.clearable)("ng-select-opened", ctx.isOpen)("ng-select-disabled", ctx.disabled)("ng-select-filtered", ctx.filtered)("ng-select-typeahead", ctx.typeahead);
          }
        },
        inputs: {
          markFirst: "markFirst",
          dropdownPosition: "dropdownPosition",
          loading: "loading",
          closeOnSelect: "closeOnSelect",
          hideSelected: "hideSelected",
          selectOnTab: "selectOnTab",
          bufferAmount: "bufferAmount",
          selectableGroup: "selectableGroup",
          selectableGroupAsModel: "selectableGroupAsModel",
          searchFn: "searchFn",
          trackByFn: "trackByFn",
          clearOnBackspace: "clearOnBackspace",
          labelForId: "labelForId",
          inputAttrs: "inputAttrs",
          readonly: "readonly",
          searchWhileComposing: "searchWhileComposing",
          minTermLength: "minTermLength",
          editableSearchTerm: "editableSearchTerm",
          keyDownFn: "keyDownFn",
          multiple: "multiple",
          addTag: "addTag",
          searchable: "searchable",
          clearable: "clearable",
          isOpen: "isOpen",
          items: "items",
          compareWith: "compareWith",
          clearSearchOnAdd: "clearSearchOnAdd",
          bindLabel: "bindLabel",
          placeholder: "placeholder",
          notFoundText: "notFoundText",
          typeToSearchText: "typeToSearchText",
          addTagText: "addTagText",
          loadingText: "loadingText",
          clearAllText: "clearAllText",
          virtualScroll: "virtualScroll",
          openOnEnter: "openOnEnter",
          appendTo: "appendTo",
          bindValue: "bindValue",
          appearance: "appearance",
          maxSelectedItems: "maxSelectedItems",
          groupBy: "groupBy",
          groupValue: "groupValue",
          tabIndex: "tabIndex",
          typeahead: "typeahead"
        },
        outputs: {
          blurEvent: "blur",
          focusEvent: "focus",
          changeEvent: "change",
          openEvent: "open",
          closeEvent: "close",
          searchEvent: "search",
          clearEvent: "clear",
          addEvent: "add",
          removeEvent: "remove",
          scroll: "scroll",
          scrollToEnd: "scrollToEnd"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([{
          provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
          useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
            return NgSelectComponent;
          }),
          multi: true
        }, NgDropdownPanelService]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]],
        decls: 14,
        vars: 19,
        consts: [[1, "ng-select-container", 3, "mousedown"], [1, "ng-value-container"], [1, "ng-placeholder"], [4, "ngIf"], ["role", "combobox", "aria-haspopup", "listbox", 1, "ng-input"], ["aria-autocomplete", "list", 3, "readOnly", "disabled", "value", "input", "compositionstart", "compositionend", "focus", "blur", "change"], ["searchInput", ""], ["class", "ng-clear-wrapper", 3, "title", 4, "ngIf"], [1, "ng-arrow-wrapper"], [1, "ng-arrow"], ["class", "ng-dropdown-panel", "role", "listbox", "aria-label", "Options list", 3, "virtualScroll", "bufferAmount", "appendTo", "position", "headerTemplate", "footerTemplate", "filterValue", "items", "markedItem", "ng-select-multiple", "ngClass", "id", "update", "scroll", "scrollToEnd", "outsideClick", 4, "ngIf"], ["class", "ng-value", 3, "ng-value-disabled", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "ng-value"], ["defaultLabelTemplate", ""], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], ["aria-hidden", "true", 1, "ng-value-icon", "left", 3, "click"], [1, "ng-value-label", 3, "ngItemLabel", "escape"], ["defaultLoadingSpinnerTemplate", ""], [3, "ngTemplateOutlet"], [1, "ng-spinner-loader"], [1, "ng-clear-wrapper", 3, "title"], ["aria-hidden", "true", 1, "ng-clear"], ["role", "listbox", "aria-label", "Options list", 1, "ng-dropdown-panel", 3, "virtualScroll", "bufferAmount", "appendTo", "position", "headerTemplate", "footerTemplate", "filterValue", "items", "markedItem", "ngClass", "id", "update", "scroll", "scrollToEnd", "outsideClick"], ["class", "ng-option", 3, "ng-option-disabled", "ng-option-selected", "ng-optgroup", "ng-option", "ng-option-child", "ng-option-marked", "click", "mouseover", 4, "ngFor", "ngForOf", "ngForTrackBy"], ["class", "ng-option", "role", "option", 3, "ng-option-marked", "mouseover", "click", 4, "ngIf"], [1, "ng-option", 3, "click", "mouseover"], ["defaultOptionTemplate", ""], [1, "ng-option-label", 3, "ngItemLabel", "escape"], ["role", "option", 1, "ng-option", 3, "mouseover", "click"], ["defaultTagTemplate", ""], [1, "ng-tag-label"], ["defaultNotFoundTemplate", ""], [1, "ng-option", "ng-option-disabled"], ["defaultTypeToSearchTemplate", ""], ["defaultLoadingTextTemplate", ""]],
        template: function NgSelectComponent_Template(rf, ctx) {
          if (rf & 1) {
            var _r52 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 0);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("mousedown", function NgSelectComponent_Template_div_mousedown_0_listener($event) {
              return ctx.handleMousedown($event);
            });

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "div", 1);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "div", 2);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](3);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](4, NgSelectComponent_ng_container_4_Template, 2, 2, "ng-container", 3);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](5, NgSelectComponent_5_Template, 1, 5, undefined, 3);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](6, "div", 4);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](7, "input", 5, 6);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("input", function NgSelectComponent_Template_input_input_7_listener() {
              _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r52);

              var _r2 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](8);

              return ctx.filter(_r2.value);
            })("compositionstart", function NgSelectComponent_Template_input_compositionstart_7_listener() {
              return ctx.onCompositionStart();
            })("compositionend", function NgSelectComponent_Template_input_compositionend_7_listener() {
              _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r52);

              var _r2 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](8);

              return ctx.onCompositionEnd(_r2.value);
            })("focus", function NgSelectComponent_Template_input_focus_7_listener($event) {
              return ctx.onInputFocus($event);
            })("blur", function NgSelectComponent_Template_input_blur_7_listener($event) {
              return ctx.onInputBlur($event);
            })("change", function NgSelectComponent_Template_input_change_7_listener($event) {
              return $event.stopPropagation();
            });

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](9, NgSelectComponent_ng_container_9_Template, 4, 1, "ng-container", 3);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](10, NgSelectComponent_span_10_Template, 3, 1, "span", 7);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](11, "span", 8);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](12, "span", 9);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](13, NgSelectComponent_ng_dropdown_panel_13_Template, 7, 19, "ng-dropdown-panel", 10);
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("ng-appearance-outline", ctx.appearance === "outline")("ng-has-value", ctx.hasValue);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](ctx.placeholder);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", (!ctx.multiLabelTemplate || !ctx.multiple) && ctx.selectedItems.length > 0);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.multiple && ctx.multiLabelTemplate && ctx.selectedValues.length > 0);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("aria-expanded", ctx.isOpen)("aria-owns", ctx.isOpen ? ctx.dropdownId : null);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("readOnly", !ctx.searchable || ctx.itemsList.maxItemsSelected)("disabled", ctx.disabled)("value", ctx.searchTerm ? ctx.searchTerm : "");

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("id", ctx.labelForId)("tabindex", ctx.tabIndex)("aria-activedescendant", ctx.isOpen ? ctx.itemsList == null ? null : ctx.itemsList.markedItem == null ? null : ctx.itemsList.markedItem.htmlId : null)("aria-controls", ctx.isOpen ? ctx.dropdownId : null);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.loading);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.showClear());

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);

            _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.isOpen);
          }
        },
        directives: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["NgIf"], _angular_common__WEBPACK_IMPORTED_MODULE_4__["NgForOf"], _angular_common__WEBPACK_IMPORTED_MODULE_4__["NgTemplateOutlet"], NgItemLabelDirective, NgDropdownPanelComponent, _angular_common__WEBPACK_IMPORTED_MODULE_4__["NgClass"]],
        styles: [".ng-select{position:relative;display:block;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:\"\\200b\"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:bold;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}\n"],
        encapsulation: 2,
        changeDetection: 0
      });

      NgSelectComponent.ctorParameters = function () {
        return [{
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"],
            args: ['class']
          }]
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"],
            args: ['autofocus']
          }]
        }, {
          type: NgSelectConfig
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [SELECTION_MODEL_FACTORY]
          }]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]
        }, {
          type: ConsoleService
        }];
      };

      NgSelectComponent.propDecorators = {
        bindLabel: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        bindValue: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        markFirst: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        placeholder: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        notFoundText: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        typeToSearchText: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        addTagText: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        loadingText: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        clearAllText: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        appearance: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        dropdownPosition: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        appendTo: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        loading: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        closeOnSelect: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        hideSelected: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        selectOnTab: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        openOnEnter: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        maxSelectedItems: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        groupBy: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        groupValue: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        bufferAmount: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        virtualScroll: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        selectableGroup: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        selectableGroupAsModel: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        searchFn: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        trackByFn: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        clearOnBackspace: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        labelForId: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        inputAttrs: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        tabIndex: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        readonly: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        searchWhileComposing: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        minTermLength: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        editableSearchTerm: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        keyDownFn: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        typeahead: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
          args: ['class.ng-select-typeahead']
        }],
        multiple: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
          args: ['class.ng-select-multiple']
        }],
        addTag: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
          args: ['class.ng-select-taggable']
        }],
        searchable: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
          args: ['class.ng-select-searchable']
        }],
        clearable: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
          args: ['class.ng-select-clearable']
        }],
        isOpen: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
          args: ['class.ng-select-opened']
        }],
        items: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        compareWith: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        clearSearchOnAdd: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        blurEvent: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
          args: ['blur']
        }],
        focusEvent: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
          args: ['focus']
        }],
        changeEvent: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
          args: ['change']
        }],
        openEvent: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
          args: ['open']
        }],
        closeEvent: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
          args: ['close']
        }],
        searchEvent: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
          args: ['search']
        }],
        clearEvent: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
          args: ['clear']
        }],
        addEvent: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
          args: ['add']
        }],
        removeEvent: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
          args: ['remove']
        }],
        scroll: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
          args: ['scroll']
        }],
        scrollToEnd: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
          args: ['scrollToEnd']
        }],
        optionTemplate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
          args: [NgOptionTemplateDirective, {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }]
        }],
        optgroupTemplate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
          args: [NgOptgroupTemplateDirective, {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }]
        }],
        labelTemplate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
          args: [NgLabelTemplateDirective, {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }]
        }],
        multiLabelTemplate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
          args: [NgMultiLabelTemplateDirective, {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }]
        }],
        headerTemplate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
          args: [NgHeaderTemplateDirective, {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }]
        }],
        footerTemplate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
          args: [NgFooterTemplateDirective, {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }]
        }],
        notFoundTemplate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
          args: [NgNotFoundTemplateDirective, {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }]
        }],
        typeToSearchTemplate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
          args: [NgTypeToSearchTemplateDirective, {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }]
        }],
        loadingTextTemplate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
          args: [NgLoadingTextTemplateDirective, {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }]
        }],
        tagTemplate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
          args: [NgTagTemplateDirective, {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }]
        }],
        loadingSpinnerTemplate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
          args: [NgLoadingSpinnerTemplateDirective, {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }]
        }],
        dropdownPanel: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"],
          args: [Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
            return NgDropdownPanelComponent;
          })]
        }],
        searchInput: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"],
          args: ['searchInput', {
            "static": true
          }]
        }],
        ngOptions: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"],
          args: [NgOptionComponent, {
            descendants: true
          }]
        }],
        disabled: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
          args: ['class.ng-select-disabled']
        }],
        filtered: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
          args: ['class.ng-select-filtered']
        }],
        handleKeyDown: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"],
          args: ['keydown', ['$event']]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSelectComponent, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"],
          args: [{
            selector: 'ng-select',
            template: "<div\n    (mousedown)=\"handleMousedown($event)\"\n    [class.ng-appearance-outline]=\"appearance === 'outline'\"\n    [class.ng-has-value]=\"hasValue\"\n    class=\"ng-select-container\">\n\n    <div class=\"ng-value-container\">\n        <div class=\"ng-placeholder\">{{placeholder}}</div>\n\n        <ng-container *ngIf=\"(!multiLabelTemplate  || !multiple ) && selectedItems.length > 0\">\n            <div [class.ng-value-disabled]=\"item.disabled\" class=\"ng-value\" *ngFor=\"let item of selectedItems; trackBy: trackByOption\">\n                <ng-template #defaultLabelTemplate>\n                    <span class=\"ng-value-icon left\" (click)=\"unselect(item);\" aria-hidden=\"true\">\xD7</span>\n                    <span class=\"ng-value-label\" [ngItemLabel]=\"item.label\" [escape]=\"escapeHTML\"></span>\n                </ng-template>\n\n                <ng-template\n                    [ngTemplateOutlet]=\"labelTemplate || defaultLabelTemplate\"\n                    [ngTemplateOutletContext]=\"{ item: item.value, clear: clearItem, label: item.label }\">\n                </ng-template>\n            </div>\n        </ng-container>\n\n        <ng-template *ngIf=\"multiple && multiLabelTemplate && selectedValues.length > 0\"\n                [ngTemplateOutlet]=\"multiLabelTemplate\"\n                [ngTemplateOutletContext]=\"{ items: selectedValues, clear: clearItem }\">\n        </ng-template>\n\n        <div class=\"ng-input\"\n            role=\"combobox\" \n            [attr.aria-expanded]=\"isOpen\" \n            [attr.aria-owns]=\"isOpen ? dropdownId : null\" \n            aria-haspopup=\"listbox\">\n\n            <input #searchInput\n                   [attr.id]=\"labelForId\"\n                   [attr.tabindex]=\"tabIndex\"\n                   [readOnly]=\"!searchable || itemsList.maxItemsSelected\"\n                   [disabled]=\"disabled\"\n                   [value]=\"searchTerm ? searchTerm : ''\"\n                   (input)=\"filter(searchInput.value)\"\n                   (compositionstart)=\"onCompositionStart()\"\n                   (compositionend)=\"onCompositionEnd(searchInput.value)\"\n                   (focus)=\"onInputFocus($event)\"\n                   (blur)=\"onInputBlur($event)\"\n                   (change)=\"$event.stopPropagation()\"\n                   [attr.aria-activedescendant]=\"isOpen ? itemsList?.markedItem?.htmlId : null\"\n                   aria-autocomplete=\"list\"\n                   [attr.aria-controls]=\"isOpen ? dropdownId : null\">\n        </div>\n    </div>\n\n    <ng-container *ngIf=\"loading\">\n        <ng-template #defaultLoadingSpinnerTemplate>\n            <div class=\"ng-spinner-loader\"></div>\n        </ng-template>\n\n        <ng-template\n            [ngTemplateOutlet]=\"loadingSpinnerTemplate || defaultLoadingSpinnerTemplate\">\n        </ng-template>\n    </ng-container>\n\n    <span *ngIf=\"showClear()\" class=\"ng-clear-wrapper\" title=\"{{clearAllText}}\">\n        <span class=\"ng-clear\" aria-hidden=\"true\">\xD7</span>\n    </span>\n\n    <span class=\"ng-arrow-wrapper\">\n        <span class=\"ng-arrow\"></span>\n    </span>\n</div>\n\n<ng-dropdown-panel *ngIf=\"isOpen\"\n                   class=\"ng-dropdown-panel\"\n                   [virtualScroll]=\"virtualScroll\"\n                   [bufferAmount]=\"bufferAmount\"\n                   [appendTo]=\"appendTo\"\n                   [position]=\"dropdownPosition\"\n                   [headerTemplate]=\"headerTemplate\"\n                   [footerTemplate]=\"footerTemplate\"\n                   [filterValue]=\"searchTerm\"\n                   [items]=\"itemsList.filteredItems\"\n                   [markedItem]=\"itemsList.markedItem\"\n                   (update)=\"viewPortItems = $event\"\n                   (scroll)=\"scroll.emit($event)\"\n                   (scrollToEnd)=\"scrollToEnd.emit($event)\"\n                   (outsideClick)=\"close()\"\n                   [class.ng-select-multiple]=\"multiple\"\n                   [ngClass]=\"appendTo ? classes : null\"\n                   [id]=\"dropdownId\"\n                   role=\"listbox\"\n                   aria-label=\"Options list\">\n\n    <ng-container>\n        <div class=\"ng-option\" [attr.role]=\"item.children ? 'group' : 'option'\" (click)=\"toggleItem(item)\" (mouseover)=\"onItemHover(item)\"\n                *ngFor=\"let item of viewPortItems; trackBy: trackByOption\"\n                [class.ng-option-disabled]=\"item.disabled\"\n                [class.ng-option-selected]=\"item.selected\"\n                [class.ng-optgroup]=\"item.children\"\n                [class.ng-option]=\"!item.children\"\n                [class.ng-option-child]=\"!!item.parent\"\n                [class.ng-option-marked]=\"item === itemsList.markedItem\"\n                [attr.aria-selected]=\"item.selected\"\n                [attr.id]=\"item?.htmlId\">\n\n            <ng-template #defaultOptionTemplate>\n                <span class=\"ng-option-label\" [ngItemLabel]=\"item.label\" [escape]=\"escapeHTML\"></span>\n            </ng-template>\n\n            <ng-template\n                [ngTemplateOutlet]=\"item.children ? (optgroupTemplate || defaultOptionTemplate) : (optionTemplate || defaultOptionTemplate)\"\n                [ngTemplateOutletContext]=\"{ item: item.value, item$:item, index: item.index, searchTerm: searchTerm }\">\n            </ng-template>\n        </div>\n\n        <div class=\"ng-option\" [class.ng-option-marked]=\"!itemsList.markedItem\" (mouseover)=\"itemsList.unmarkItem()\" role=\"option\" (click)=\"selectTag()\" *ngIf=\"showAddTag\">\n            <ng-template #defaultTagTemplate>\n                <span><span class=\"ng-tag-label\">{{addTagText}}</span>\"{{searchTerm}}\"</span>\n            </ng-template>\n\n            <ng-template\n                [ngTemplateOutlet]=\"tagTemplate || defaultTagTemplate\"\n                [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n            </ng-template>\n        </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"showNoItemsFound()\">\n        <ng-template #defaultNotFoundTemplate>\n            <div class=\"ng-option ng-option-disabled\">{{notFoundText}}</div>\n        </ng-template>\n\n        <ng-template\n            [ngTemplateOutlet]=\"notFoundTemplate || defaultNotFoundTemplate\"\n            [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n        </ng-template>\n    </ng-container>\n\n    <ng-container *ngIf=\"showTypeToSearch()\">\n        <ng-template #defaultTypeToSearchTemplate>\n            <div class=\"ng-option ng-option-disabled\">{{typeToSearchText}}</div>\n        </ng-template>\n\n        <ng-template\n            [ngTemplateOutlet]=\"typeToSearchTemplate || defaultTypeToSearchTemplate\">\n        </ng-template>\n    </ng-container>\n\n    <ng-container *ngIf=\"loading && itemsList.filteredItems.length === 0\">\n        <ng-template #defaultLoadingTextTemplate>\n            <div class=\"ng-option ng-option-disabled\">{{loadingText}}</div>\n        </ng-template>\n\n        <ng-template\n            [ngTemplateOutlet]=\"loadingTextTemplate || defaultLoadingTextTemplate\"\n            [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\">\n        </ng-template>\n    </ng-container>\n\n</ng-dropdown-panel>\n",
            providers: [{
              provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
              useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
                return NgSelectComponent;
              }),
              multi: true
            }, NgDropdownPanelService],
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
            host: {
              '[class.ng-select]': 'useDefaultClass',
              '[class.ng-select-single]': '!multiple'
            },
            styles: [".ng-select{position:relative;display:block;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:\"\\200b\"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:bold;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}\n"]
          }]
        }], function () {
          return [{
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"],
              args: ['class']
            }]
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"],
              args: ['autofocus']
            }]
          }, {
            type: NgSelectConfig
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [SELECTION_MODEL_FACTORY]
            }]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]
          }, {
            type: ConsoleService
          }];
        }, {
          markFirst: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          dropdownPosition: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          loading: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          closeOnSelect: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          hideSelected: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          selectOnTab: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          bufferAmount: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          selectableGroup: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          selectableGroupAsModel: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          searchFn: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          trackByFn: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          clearOnBackspace: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          labelForId: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          inputAttrs: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          readonly: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          searchWhileComposing: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          minTermLength: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          editableSearchTerm: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          keyDownFn: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          multiple: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
            args: ['class.ng-select-multiple']
          }],
          addTag: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
            args: ['class.ng-select-taggable']
          }],
          searchable: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
            args: ['class.ng-select-searchable']
          }],
          clearable: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
            args: ['class.ng-select-clearable']
          }],
          isOpen: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
            args: ['class.ng-select-opened']
          }],
          blurEvent: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
            args: ['blur']
          }],
          focusEvent: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
            args: ['focus']
          }],
          changeEvent: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
            args: ['change']
          }],
          openEvent: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
            args: ['open']
          }],
          closeEvent: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
            args: ['close']
          }],
          searchEvent: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
            args: ['search']
          }],
          clearEvent: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
            args: ['clear']
          }],
          addEvent: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
            args: ['add']
          }],
          removeEvent: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
            args: ['remove']
          }],
          scroll: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
            args: ['scroll']
          }],
          scrollToEnd: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"],
            args: ['scrollToEnd']
          }],
          items: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          compareWith: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          clearSearchOnAdd: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          disabled: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
            args: ['class.ng-select-disabled']
          }],
          filtered: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
            args: ['class.ng-select-filtered']
          }],
          handleKeyDown: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"],
            args: ['keydown', ['$event']]
          }],
          bindLabel: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          placeholder: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          notFoundText: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          typeToSearchText: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          addTagText: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          loadingText: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          clearAllText: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          virtualScroll: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          openOnEnter: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          appendTo: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          bindValue: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          appearance: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          maxSelectedItems: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          groupBy: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          groupValue: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          tabIndex: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          typeahead: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"],
            args: ['class.ng-select-typeahead']
          }],
          optionTemplate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
            args: [NgOptionTemplateDirective, {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
            }]
          }],
          optgroupTemplate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
            args: [NgOptgroupTemplateDirective, {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
            }]
          }],
          labelTemplate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
            args: [NgLabelTemplateDirective, {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
            }]
          }],
          multiLabelTemplate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
            args: [NgMultiLabelTemplateDirective, {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
            }]
          }],
          headerTemplate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
            args: [NgHeaderTemplateDirective, {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
            }]
          }],
          footerTemplate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
            args: [NgFooterTemplateDirective, {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
            }]
          }],
          notFoundTemplate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
            args: [NgNotFoundTemplateDirective, {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
            }]
          }],
          typeToSearchTemplate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
            args: [NgTypeToSearchTemplateDirective, {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
            }]
          }],
          loadingTextTemplate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
            args: [NgLoadingTextTemplateDirective, {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
            }]
          }],
          tagTemplate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
            args: [NgTagTemplateDirective, {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
            }]
          }],
          loadingSpinnerTemplate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
            args: [NgLoadingSpinnerTemplateDirective, {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
            }]
          }],
          dropdownPanel: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"],
            args: [Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
              return NgDropdownPanelComponent;
            })]
          }],
          searchInput: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"],
            args: ['searchInput', {
              "static": true
            }]
          }],
          ngOptions: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"],
            args: [NgOptionComponent, {
              descendants: true
            }]
          }]
        });
      })();

      function DefaultSelectionModelFactory() {
        return new DefaultSelectionModel();
      }

      var DefaultSelectionModel = /*#__PURE__*/function () {
        function DefaultSelectionModel() {
          _classCallCheck(this, DefaultSelectionModel);

          this._selected = [];
        }

        _createClass2(DefaultSelectionModel, [{
          key: "value",
          get: function get() {
            return this._selected;
          }
        }, {
          key: "select",
          value: function select(item, multiple, groupAsModel) {
            item.selected = true;

            if (!item.children || !multiple && groupAsModel) {
              this._selected.push(item);
            }

            if (multiple) {
              if (item.parent) {
                var childrenCount = item.parent.children.length;
                var selectedCount = item.parent.children.filter(function (x) {
                  return x.selected;
                }).length;
                item.parent.selected = childrenCount === selectedCount;
              } else if (item.children) {
                this._setChildrenSelectedState(item.children, true);

                this._removeChildren(item);

                if (groupAsModel && this._activeChildren(item)) {
                  this._selected = [].concat(_toConsumableArray(this._selected.filter(function (x) {
                    return x.parent !== item;
                  })), [item]);
                } else {
                  this._selected = [].concat(_toConsumableArray(this._selected), _toConsumableArray(item.children.filter(function (x) {
                    return !x.disabled;
                  })));
                }
              }
            }
          }
        }, {
          key: "unselect",
          value: function unselect(item, multiple) {
            this._selected = this._selected.filter(function (x) {
              return x !== item;
            });
            item.selected = false;

            if (multiple) {
              if (item.parent && item.parent.selected) {
                var _this$_selected;

                var children = item.parent.children;

                this._removeParent(item.parent);

                this._removeChildren(item.parent);

                (_this$_selected = this._selected).push.apply(_this$_selected, _toConsumableArray(children.filter(function (x) {
                  return x !== item && !x.disabled;
                })));

                item.parent.selected = false;
              } else if (item.children) {
                this._setChildrenSelectedState(item.children, false);

                this._removeChildren(item);
              }
            }
          }
        }, {
          key: "clear",
          value: function clear(keepDisabled) {
            this._selected = keepDisabled ? this._selected.filter(function (x) {
              return x.disabled;
            }) : [];
          }
        }, {
          key: "_setChildrenSelectedState",
          value: function _setChildrenSelectedState(children, selected) {
            var _iterator55 = _createForOfIteratorHelper(children),
                _step54;

            try {
              for (_iterator55.s(); !(_step54 = _iterator55.n()).done;) {
                var child = _step54.value;

                if (child.disabled) {
                  continue;
                }

                child.selected = selected;
              }
            } catch (err) {
              _iterator55.e(err);
            } finally {
              _iterator55.f();
            }
          }
        }, {
          key: "_removeChildren",
          value: function _removeChildren(parent) {
            this._selected = [].concat(_toConsumableArray(this._selected.filter(function (x) {
              return x.parent !== parent;
            })), _toConsumableArray(parent.children.filter(function (x) {
              return x.parent === parent && x.disabled && x.selected;
            })));
          }
        }, {
          key: "_removeParent",
          value: function _removeParent(parent) {
            this._selected = this._selected.filter(function (x) {
              return x !== parent;
            });
          }
        }, {
          key: "_activeChildren",
          value: function _activeChildren(item) {
            return item.children.every(function (x) {
              return !x.disabled || x.selected;
            });
          }
        }]);

        return DefaultSelectionModel;
      }();

      var ɵ0 = DefaultSelectionModelFactory;

      var NgSelectModule = function NgSelectModule() {
        _classCallCheck(this, NgSelectModule);
      };

      NgSelectModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
        type: NgSelectModule
      });
      NgSelectModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({
        factory: function NgSelectModule_Factory(t) {
          return new (t || NgSelectModule)();
        },
        providers: [{
          provide: SELECTION_MODEL_FACTORY,
          useValue: ɵ0
        }],
        imports: [[_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"]]]
      });

      (function () {
        (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](NgSelectModule, {
          declarations: function declarations() {
            return [NgDropdownPanelComponent, NgOptionComponent, NgSelectComponent, NgOptgroupTemplateDirective, NgOptionTemplateDirective, NgLabelTemplateDirective, NgMultiLabelTemplateDirective, NgHeaderTemplateDirective, NgFooterTemplateDirective, NgNotFoundTemplateDirective, NgTypeToSearchTemplateDirective, NgLoadingTextTemplateDirective, NgTagTemplateDirective, NgLoadingSpinnerTemplateDirective, NgItemLabelDirective];
          },
          imports: function imports() {
            return [_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"]];
          },
          exports: function exports() {
            return [NgSelectComponent, NgOptionComponent, NgOptgroupTemplateDirective, NgOptionTemplateDirective, NgLabelTemplateDirective, NgMultiLabelTemplateDirective, NgHeaderTemplateDirective, NgFooterTemplateDirective, NgNotFoundTemplateDirective, NgTypeToSearchTemplateDirective, NgLoadingTextTemplateDirective, NgTagTemplateDirective, NgLoadingSpinnerTemplateDirective];
          }
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSelectModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
          args: [{
            declarations: [NgDropdownPanelComponent, NgOptionComponent, NgSelectComponent, NgOptgroupTemplateDirective, NgOptionTemplateDirective, NgLabelTemplateDirective, NgMultiLabelTemplateDirective, NgHeaderTemplateDirective, NgFooterTemplateDirective, NgNotFoundTemplateDirective, NgTypeToSearchTemplateDirective, NgLoadingTextTemplateDirective, NgTagTemplateDirective, NgLoadingSpinnerTemplateDirective, NgItemLabelDirective],
            imports: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"]],
            exports: [NgSelectComponent, NgOptionComponent, NgOptgroupTemplateDirective, NgOptionTemplateDirective, NgLabelTemplateDirective, NgMultiLabelTemplateDirective, NgHeaderTemplateDirective, NgFooterTemplateDirective, NgNotFoundTemplateDirective, NgTypeToSearchTemplateDirective, NgLoadingTextTemplateDirective, NgTagTemplateDirective, NgLoadingSpinnerTemplateDirective],
            providers: [{
              provide: SELECTION_MODEL_FACTORY,
              useValue: ɵ0
            }]
          }]
        }], null, null);
      })();
      /*
       * Public API Surface of ng-select
       */

      /**
       * Generated bundle index. Do not edit.
       */
      //# sourceMappingURL=ng-select-ng-select.js.map

      /***/

    },

    /***/
    "ZUHj":
    /*!***********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js ***!
      \***********************************************************************/

    /*! exports provided: subscribeToResult */

    /***/
    function ZUHj(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "subscribeToResult", function () {
        return subscribeToResult;
      });
      /* harmony import */


      var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../InnerSubscriber */
      "51Dv");
      /* harmony import */


      var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./subscribeTo */
      "SeVD");
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");

      function subscribeToResult(outerSubscriber, result, outerValue, outerIndex) {
        var innerSubscriber = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__["InnerSubscriber"](outerSubscriber, outerValue, outerIndex);

        if (innerSubscriber.closed) {
          return undefined;
        }

        if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]) {
          return result.subscribe(innerSubscriber);
        }

        return Object(_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(result)(innerSubscriber);
      } //# sourceMappingURL=subscribeToResult.js.map

      /***/

    },

    /***/
    "Zy1z":
    /*!*******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/pairwise.js ***!
      \*******************************************************************/

    /*! exports provided: pairwise */

    /***/
    function Zy1z(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "pairwise", function () {
        return pairwise;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function pairwise() {
        return function (source) {
          return source.lift(new PairwiseOperator());
        };
      }

      var PairwiseOperator = /*#__PURE__*/function () {
        function PairwiseOperator() {
          _classCallCheck(this, PairwiseOperator);
        }

        _createClass2(PairwiseOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new PairwiseSubscriber(subscriber));
          }
        }]);

        return PairwiseOperator;
      }();

      var PairwiseSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_26) {
        _inherits(PairwiseSubscriber, _Subscriber__WEBPACK_26);

        var _super203 = _createSuper(PairwiseSubscriber);

        function PairwiseSubscriber(destination) {
          var _this455;

          _classCallCheck(this, PairwiseSubscriber);

          _this455 = _super203.call(this, destination);
          _this455.hasPrev = false;
          return _this455;
        }

        _createClass2(PairwiseSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var pair;

            if (this.hasPrev) {
              pair = [this.prev, value];
            } else {
              this.hasPrev = true;
            }

            this.prev = value;

            if (pair) {
              this.destination.next(pair);
            }
          }
        }]);

        return PairwiseSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=pairwise.js.map

      /***/

    },

    /***/
    "Zyez":
    /*!************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/sequenceEqual.js ***!
      \************************************************************************/

    /*! exports provided: sequenceEqual, SequenceEqualOperator, SequenceEqualSubscriber */

    /***/
    function Zyez(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "sequenceEqual", function () {
        return sequenceEqual;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SequenceEqualOperator", function () {
        return SequenceEqualOperator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SequenceEqualSubscriber", function () {
        return SequenceEqualSubscriber;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function sequenceEqual(compareTo, comparator) {
        return function (source) {
          return source.lift(new SequenceEqualOperator(compareTo, comparator));
        };
      }

      var SequenceEqualOperator = /*#__PURE__*/function () {
        function SequenceEqualOperator(compareTo, comparator) {
          _classCallCheck(this, SequenceEqualOperator);

          this.compareTo = compareTo;
          this.comparator = comparator;
        }

        _createClass2(SequenceEqualOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));
          }
        }]);

        return SequenceEqualOperator;
      }();

      var SequenceEqualSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_27) {
        _inherits(SequenceEqualSubscriber, _Subscriber__WEBPACK_27);

        var _super204 = _createSuper(SequenceEqualSubscriber);

        function SequenceEqualSubscriber(destination, compareTo, comparator) {
          var _this456;

          _classCallCheck(this, SequenceEqualSubscriber);

          _this456 = _super204.call(this, destination);
          _this456.compareTo = compareTo;
          _this456.comparator = comparator;
          _this456._a = [];
          _this456._b = [];
          _this456._oneComplete = false;

          _this456.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _assertThisInitialized(_this456))));

          return _this456;
        }

        _createClass2(SequenceEqualSubscriber, [{
          key: "_next",
          value: function _next(value) {
            if (this._oneComplete && this._b.length === 0) {
              this.emit(false);
            } else {
              this._a.push(value);

              this.checkValues();
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            if (this._oneComplete) {
              this.emit(this._a.length === 0 && this._b.length === 0);
            } else {
              this._oneComplete = true;
            }

            this.unsubscribe();
          }
        }, {
          key: "checkValues",
          value: function checkValues() {
            var _a = this._a,
                _b = this._b,
                comparator = this.comparator;

            while (_a.length > 0 && _b.length > 0) {
              var a = _a.shift();

              var b = _b.shift();

              var areEqual = false;

              try {
                areEqual = comparator ? comparator(a, b) : a === b;
              } catch (e) {
                this.destination.error(e);
              }

              if (!areEqual) {
                this.emit(false);
              }
            }
          }
        }, {
          key: "emit",
          value: function emit(value) {
            var destination = this.destination;
            destination.next(value);
            destination.complete();
          }
        }, {
          key: "nextB",
          value: function nextB(value) {
            if (this._oneComplete && this._a.length === 0) {
              this.emit(false);
            } else {
              this._b.push(value);

              this.checkValues();
            }
          }
        }, {
          key: "completeB",
          value: function completeB() {
            if (this._oneComplete) {
              this.emit(this._a.length === 0 && this._b.length === 0);
            } else {
              this._oneComplete = true;
            }
          }
        }]);

        return SequenceEqualSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]);

      var SequenceEqualCompareToSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_28) {
        _inherits(SequenceEqualCompareToSubscriber, _Subscriber__WEBPACK_28);

        var _super205 = _createSuper(SequenceEqualCompareToSubscriber);

        function SequenceEqualCompareToSubscriber(destination, parent) {
          var _this457;

          _classCallCheck(this, SequenceEqualCompareToSubscriber);

          _this457 = _super205.call(this, destination);
          _this457.parent = parent;
          return _this457;
        }

        _createClass2(SequenceEqualCompareToSubscriber, [{
          key: "_next",
          value: function _next(value) {
            this.parent.nextB(value);
          }
        }, {
          key: "_error",
          value: function _error(err) {
            this.parent.error(err);
            this.unsubscribe();
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.parent.completeB();
            this.unsubscribe();
          }
        }]);

        return SequenceEqualCompareToSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=sequenceEqual.js.map

      /***/

    },

    /***/
    "a3Wg":
    /*!**********************************************************************************************************!*\
      !*** ./node_modules/@angular/platform-browser-dynamic/__ivy_ngcc__/fesm2015/platform-browser-dynamic.js ***!
      \**********************************************************************************************************/

    /*! exports provided: JitCompilerFactory, RESOURCE_CACHE_PROVIDER, VERSION, platformBrowserDynamic, ɵCOMPILER_PROVIDERS__POST_R3__, ɵCompilerImpl, ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, ɵResourceLoaderImpl, ɵangular_packages_platform_browser_dynamic_platform_browser_dynamic_a, ɵplatformCoreDynamic */

    /***/
    function a3Wg(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "JitCompilerFactory", function () {
        return JitCompilerFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RESOURCE_CACHE_PROVIDER", function () {
        return RESOURCE_CACHE_PROVIDER;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VERSION", function () {
        return VERSION;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "platformBrowserDynamic", function () {
        return platformBrowserDynamic;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵCOMPILER_PROVIDERS__POST_R3__", function () {
        return COMPILER_PROVIDERS__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵCompilerImpl", function () {
        return CompilerImpl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS", function () {
        return INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵResourceLoaderImpl", function () {
        return ResourceLoaderImpl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_dynamic_platform_browser_dynamic_a", function () {
        return CachedResourceLoader;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵplatformCoreDynamic", function () {
        return platformCoreDynamic;
      });
      /* harmony import */


      var _angular_compiler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @angular/compiler */
      "1uSB");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @angular/common */
      "ofXK");
      /* harmony import */


      var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @angular/platform-browser */
      "jhN1");
      /**
       * @license Angular v11.0.9
       * (c) 2010-2020 Google LLC. https://angular.io/
       * License: MIT
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var MODULE_SUFFIX = '';
      var builtinExternalReferences = createBuiltinExternalReferencesMap();

      var JitReflector = /*#__PURE__*/function () {
        function JitReflector() {
          _classCallCheck(this, JitReflector);

          this.reflectionCapabilities = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵReflectionCapabilities"]();
        }

        _createClass2(JitReflector, [{
          key: "componentModuleUrl",
          value: function componentModuleUrl(type, cmpMetadata) {
            var moduleId = cmpMetadata.moduleId;

            if (typeof moduleId === 'string') {
              var scheme = Object(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["getUrlScheme"])(moduleId);
              return scheme ? moduleId : "package:".concat(moduleId).concat(MODULE_SUFFIX);
            } else if (moduleId !== null && moduleId !== void 0) {
              throw Object(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["syntaxError"])("moduleId should be a string in \"".concat(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵstringify"])(type), "\". See https://goo.gl/wIDDiL for more information.\n") + "If you're using Webpack you should inline the template and the styles, see https://goo.gl/X2J8zc.");
            }

            return "./".concat(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵstringify"])(type));
          }
        }, {
          key: "parameters",
          value: function parameters(typeOrFunc) {
            return this.reflectionCapabilities.parameters(typeOrFunc);
          }
        }, {
          key: "tryAnnotations",
          value: function tryAnnotations(typeOrFunc) {
            return this.annotations(typeOrFunc);
          }
        }, {
          key: "annotations",
          value: function annotations(typeOrFunc) {
            return this.reflectionCapabilities.annotations(typeOrFunc);
          }
        }, {
          key: "shallowAnnotations",
          value: function shallowAnnotations(typeOrFunc) {
            throw new Error('Not supported in JIT mode');
          }
        }, {
          key: "propMetadata",
          value: function propMetadata(typeOrFunc) {
            return this.reflectionCapabilities.propMetadata(typeOrFunc);
          }
        }, {
          key: "hasLifecycleHook",
          value: function hasLifecycleHook(type, lcProperty) {
            return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);
          }
        }, {
          key: "guards",
          value: function guards(type) {
            return this.reflectionCapabilities.guards(type);
          }
        }, {
          key: "resolveExternalReference",
          value: function resolveExternalReference(ref) {
            return builtinExternalReferences.get(ref) || ref.runtime;
          }
        }]);

        return JitReflector;
      }();

      function createBuiltinExternalReferencesMap() {
        var map = new Map();
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ANALYZE_FOR_ENTRY_COMPONENTS, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ANALYZE_FOR_ENTRY_COMPONENTS"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ElementRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].NgModuleRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ViewContainerRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ChangeDetectorRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].Renderer2, _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].QueryList, _angular_core__WEBPACK_IMPORTED_MODULE_1__["QueryList"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].TemplateRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].CodegenComponentFactoryResolver, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵCodegenComponentFactoryResolver"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ComponentFactoryResolver, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ComponentFactory, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactory"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ComponentRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentRef"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].NgModuleFactory, _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactory"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].createModuleFactory, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵcmf"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].moduleDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵmod"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].moduleProviderDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵmpd"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].RegisterModuleFactoryFn, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵregisterModuleFactory"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].Injector, _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ViewEncapsulation, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ChangeDetectionStrategy, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].SecurityContext, _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].LOCALE_ID, _angular_core__WEBPACK_IMPORTED_MODULE_1__["LOCALE_ID"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].TRANSLATIONS_FORMAT, _angular_core__WEBPACK_IMPORTED_MODULE_1__["TRANSLATIONS_FORMAT"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].inlineInterpolate, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵinlineInterpolate"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].interpolate, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵinterpolate"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].EMPTY_ARRAY, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵEMPTY_ARRAY"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].EMPTY_MAP, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵEMPTY_MAP"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].viewDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵvid"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].elementDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵeld"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].anchorDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵand"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].textDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵted"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].directiveDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵdid"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].providerDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵprd"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].queryDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵqud"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].pureArrayDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵpad"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].pureObjectDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵpod"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].purePipeDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵppd"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].pipeDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵpid"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].nodeValue, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵnov"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ngContentDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵncd"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].unwrapValue, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunv"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].createRendererType2, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵcrt"]);
        map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].createComponentFactory, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵccf"]);
        return map;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ERROR_COLLECTOR_TOKEN = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ErrorCollector');
      /**
       * A default provider for {@link PACKAGE_ROOT_URL} that maps to '/'.
       */

      var DEFAULT_PACKAGE_URL_PROVIDER = {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PACKAGE_ROOT_URL"],
        useValue: '/'
      };
      var _NO_RESOURCE_LOADER = {
        get: function get(url) {
          throw new Error("No ResourceLoader implementation has been provided. Can't read the url \"".concat(url, "\""));
        }
      };
      var baseHtmlParser = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('HtmlParser');

      var CompilerImpl = /*#__PURE__*/function () {
        function CompilerImpl(injector, _metadataResolver, templateParser, styleCompiler, viewCompiler, ngModuleCompiler, summaryResolver, compileReflector, jitEvaluator, compilerConfig, console) {
          _classCallCheck(this, CompilerImpl);

          this._metadataResolver = _metadataResolver;
          this._delegate = new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["JitCompiler"](_metadataResolver, templateParser, styleCompiler, viewCompiler, ngModuleCompiler, summaryResolver, compileReflector, jitEvaluator, compilerConfig, console, this.getExtraNgModuleProviders.bind(this));
          this.injector = injector;
        }

        _createClass2(CompilerImpl, [{
          key: "getExtraNgModuleProviders",
          value: function getExtraNgModuleProviders() {
            return [this._metadataResolver.getProviderMetadata(new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ProviderMeta"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"], {
              useValue: this
            }))];
          }
        }, {
          key: "compileModuleSync",
          value: function compileModuleSync(moduleType) {
            return this._delegate.compileModuleSync(moduleType);
          }
        }, {
          key: "compileModuleAsync",
          value: function compileModuleAsync(moduleType) {
            return this._delegate.compileModuleAsync(moduleType);
          }
        }, {
          key: "compileModuleAndAllComponentsSync",
          value: function compileModuleAndAllComponentsSync(moduleType) {
            var result = this._delegate.compileModuleAndAllComponentsSync(moduleType);

            return {
              ngModuleFactory: result.ngModuleFactory,
              componentFactories: result.componentFactories
            };
          }
        }, {
          key: "compileModuleAndAllComponentsAsync",
          value: function compileModuleAndAllComponentsAsync(moduleType) {
            return this._delegate.compileModuleAndAllComponentsAsync(moduleType).then(function (result) {
              return {
                ngModuleFactory: result.ngModuleFactory,
                componentFactories: result.componentFactories
              };
            });
          }
        }, {
          key: "loadAotSummaries",
          value: function loadAotSummaries(summaries) {
            this._delegate.loadAotSummaries(summaries);
          }
        }, {
          key: "hasAotSummary",
          value: function hasAotSummary(ref) {
            return this._delegate.hasAotSummary(ref);
          }
        }, {
          key: "getComponentFactory",
          value: function getComponentFactory(component) {
            return this._delegate.getComponentFactory(component);
          }
        }, {
          key: "clearCache",
          value: function clearCache() {
            this._delegate.clearCache();
          }
        }, {
          key: "clearCacheFor",
          value: function clearCacheFor(type) {
            this._delegate.clearCacheFor(type);
          }
        }, {
          key: "getModuleId",
          value: function getModuleId(moduleType) {
            var meta = this._metadataResolver.getNgModuleMetadata(moduleType);

            return meta && meta.id || undefined;
          }
        }]);

        return CompilerImpl;
      }();

      var ɵ0 = new JitReflector(),
          ɵ1 = _NO_RESOURCE_LOADER,
          ɵ2 = function ɵ2(parser, translations, format, config, console) {
        translations = translations || '';
        var missingTranslation = translations ? config.missingTranslation : _angular_core__WEBPACK_IMPORTED_MODULE_1__["MissingTranslationStrategy"].Ignore;
        return new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["I18NHtmlParser"](parser, translations, format, missingTranslation, console);
      },
          ɵ3 = new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"]();
      /**
       * A set of providers that provide `JitCompiler` and its dependencies to use for
       * template compilation.
       */


      var COMPILER_PROVIDERS__PRE_R3__ = [{
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"],
        useValue: ɵ0
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"],
        useValue: ɵ1
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["JitSummaryResolver"],
        deps: []
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["SummaryResolver"],
        useExisting: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["JitSummaryResolver"]
      }, {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"],
        deps: []
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Lexer"],
        deps: []
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Parser"],
        deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Lexer"]]
      }, {
        provide: baseHtmlParser,
        useClass: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["HtmlParser"],
        deps: []
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["I18NHtmlParser"],
        useFactory: ɵ2,
        deps: [baseHtmlParser, [new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["TRANSLATIONS"])], [new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["TRANSLATIONS_FORMAT"])], [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"]], [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]]]
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["HtmlParser"],
        useExisting: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["I18NHtmlParser"]
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["TemplateParser"],
        deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Parser"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ElementSchemaRegistry"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["I18NHtmlParser"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]]
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["JitEvaluator"],
        useClass: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["JitEvaluator"],
        deps: []
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["DirectiveNormalizer"],
        deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["UrlResolver"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["HtmlParser"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"]]
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileMetadataResolver"],
        deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["HtmlParser"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["NgModuleResolver"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["DirectiveResolver"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["PipeResolver"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["SummaryResolver"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ElementSchemaRegistry"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["DirectiveNormalizer"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"], [_angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["StaticSymbolCache"]], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"], [_angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"], ERROR_COLLECTOR_TOKEN]]
      }, DEFAULT_PACKAGE_URL_PROVIDER, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["StyleCompiler"],
        deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["UrlResolver"]]
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ViewCompiler"],
        deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"]]
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["NgModuleCompiler"],
        deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"]]
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"],
        useValue: ɵ3
      }, {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"],
        useClass: CompilerImpl,
        deps: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileMetadataResolver"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["TemplateParser"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["StyleCompiler"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ViewCompiler"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["NgModuleCompiler"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["SummaryResolver"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["JitEvaluator"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]]
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["DomElementSchemaRegistry"],
        deps: []
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ElementSchemaRegistry"],
        useExisting: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["DomElementSchemaRegistry"]
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["UrlResolver"],
        deps: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["PACKAGE_ROOT_URL"]]
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["DirectiveResolver"],
        deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"]]
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["PipeResolver"],
        deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"]]
      }, {
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["NgModuleResolver"],
        deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"]]
      }];
      var COMPILER_PROVIDERS__POST_R3__ = [{
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"],
        useFactory: function useFactory() {
          return new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]();
        }
      }];
      var COMPILER_PROVIDERS = COMPILER_PROVIDERS__POST_R3__;
      /**
       * @publicApi
       */

      var JitCompilerFactory = /*#__PURE__*/function () {
        /* @internal */
        function JitCompilerFactory(defaultOptions) {
          _classCallCheck(this, JitCompilerFactory);

          var compilerOptions = {
            useJit: true,
            defaultEncapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].Emulated,
            missingTranslation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["MissingTranslationStrategy"].Warning
          };
          this._defaultOptions = [compilerOptions].concat(_toConsumableArray(defaultOptions));
        }

        _createClass2(JitCompilerFactory, [{
          key: "createCompiler",
          value: function createCompiler() {
            var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];

            var opts = _mergeOptions(this._defaultOptions.concat(options));

            var injector = _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"].create([COMPILER_PROVIDERS, {
              provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"],
              useFactory: function useFactory() {
                return new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"]({
                  // let explicit values from the compiler options overwrite options
                  // from the app providers
                  useJit: opts.useJit,
                  jitDevMode: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["isDevMode"])(),
                  // let explicit values from the compiler options overwrite options
                  // from the app providers
                  defaultEncapsulation: opts.defaultEncapsulation,
                  missingTranslation: opts.missingTranslation,
                  preserveWhitespaces: opts.preserveWhitespaces
                });
              },
              deps: []
            }, opts.providers]);

            return injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]);
          }
        }]);

        return JitCompilerFactory;
      }();

      function _mergeOptions(optionsArr) {
        return {
          useJit: _lastDefined(optionsArr.map(function (options) {
            return options.useJit;
          })),
          defaultEncapsulation: _lastDefined(optionsArr.map(function (options) {
            return options.defaultEncapsulation;
          })),
          providers: _mergeArrays(optionsArr.map(function (options) {
            return options.providers;
          })),
          missingTranslation: _lastDefined(optionsArr.map(function (options) {
            return options.missingTranslation;
          })),
          preserveWhitespaces: _lastDefined(optionsArr.map(function (options) {
            return options.preserveWhitespaces;
          }))
        };
      }

      function _lastDefined(args) {
        for (var i = args.length - 1; i >= 0; i--) {
          if (args[i] !== undefined) {
            return args[i];
          }
        }

        return undefined;
      }

      function _mergeArrays(parts) {
        var result = [];
        parts.forEach(function (part) {
          return part && result.push.apply(result, _toConsumableArray(part));
        });
        return result;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ɵ0$1 = {};
      /**
       * A platform that included corePlatform and the compiler.
       *
       * @publicApi
       */

      var platformCoreDynamic = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["createPlatformFactory"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["platformCore"], 'coreDynamic', [{
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["COMPILER_OPTIONS"],
        useValue: ɵ0$1,
        multi: true
      }, {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["CompilerFactory"],
        useClass: JitCompilerFactory,
        deps: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["COMPILER_OPTIONS"]]
      }]);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var ResourceLoaderImpl = /*#__PURE__*/function (_angular_compiler__WE) {
        _inherits(ResourceLoaderImpl, _angular_compiler__WE);

        var _super206 = _createSuper(ResourceLoaderImpl);

        function ResourceLoaderImpl() {
          _classCallCheck(this, ResourceLoaderImpl);

          return _super206.apply(this, arguments);
        }

        _createClass2(ResourceLoaderImpl, [{
          key: "get",
          value: function get(url) {
            var resolve;
            var reject;
            var promise = new Promise(function (res, rej) {
              resolve = res;
              reject = rej;
            });
            var xhr = new XMLHttpRequest();
            xhr.open('GET', url, true);
            xhr.responseType = 'text';

            xhr.onload = function () {
              // responseText is the old-school way of retrieving response (supported by IE8 & 9)
              // response/responseType properties were introduced in ResourceLoader Level2 spec (supported
              // by IE10)
              var response = xhr.response || xhr.responseText; // normalize IE9 bug (https://bugs.jquery.com/ticket/1450)

              var status = xhr.status === 1223 ? 204 : xhr.status; // fix status code when it is 0 (0 status is undocumented).
              // Occurs when accessing file resources or on Android 4.1 stock browser
              // while retrieving files from application cache.

              if (status === 0) {
                status = response ? 200 : 0;
              }

              if (200 <= status && status <= 300) {
                resolve(response);
              } else {
                reject("Failed to load ".concat(url));
              }
            };

            xhr.onerror = function () {
              reject("Failed to load ".concat(url));
            };

            xhr.send();
            return promise;
          }
        }]);

        return ResourceLoaderImpl;
      }(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"]);

      ResourceLoaderImpl.ɵfac = function ResourceLoaderImpl_Factory(t) {
        return ɵResourceLoaderImpl_BaseFactory(t || ResourceLoaderImpl);
      };

      ResourceLoaderImpl.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: ResourceLoaderImpl,
        factory: ResourceLoaderImpl.ɵfac
      });

      var ɵResourceLoaderImpl_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetInheritedFactory"](ResourceLoaderImpl);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](ResourceLoaderImpl, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ɵ0$2 = {
        providers: [{
          provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"],
          useClass: ResourceLoaderImpl,
          deps: []
        }]
      },
          ɵ1$1 = _angular_common__WEBPACK_IMPORTED_MODULE_2__["ɵPLATFORM_BROWSER_ID"];
      /**
       * @publicApi
       */

      var INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS = [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__["ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS"], {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["COMPILER_OPTIONS"],
        useValue: ɵ0$2,
        multi: true
      }, {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"],
        useValue: ɵ1$1
      }];
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * An implementation of ResourceLoader that uses a template cache to avoid doing an actual
       * ResourceLoader.
       *
       * The template cache needs to be built and loaded into window.$templateCache
       * via a separate mechanism.
       *
       * @publicApi
       */

      var CachedResourceLoader = /*#__PURE__*/function (_angular_compiler__WE2) {
        _inherits(CachedResourceLoader, _angular_compiler__WE2);

        var _super207 = _createSuper(CachedResourceLoader);

        function CachedResourceLoader() {
          var _this458;

          _classCallCheck(this, CachedResourceLoader);

          _this458 = _super207.call(this);
          _this458._cache = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"].$templateCache;

          if (_this458._cache == null) {
            throw new Error('CachedResourceLoader: Template cache was not found in $templateCache.');
          }

          return _this458;
        }

        _createClass2(CachedResourceLoader, [{
          key: "get",
          value: function get(url) {
            if (this._cache.hasOwnProperty(url)) {
              return Promise.resolve(this._cache[url]);
            } else {
              return Promise.reject('CachedResourceLoader: Did not find cached template for ' + url);
            }
          }
        }]);

        return CachedResourceLoader;
      }(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"]);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @publicApi
       */


      var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Version"]('11.0.9');
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @publicApi
       */

      var RESOURCE_CACHE_PROVIDER = [{
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"],
        useClass: CachedResourceLoader,
        deps: []
      }];
      /**
       * @publicApi
       */

      var platformBrowserDynamic = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["createPlatformFactory"])(platformCoreDynamic, 'browserDynamic', INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // This file only reexports content of the `src` folder. Keep it that way.

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Generated bundle index. Do not edit.
       */
      //# sourceMappingURL=platform-browser-dynamic.js.map

      /***/
    },

    /***/
    "a7t3":
    /*!************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToPromise.js ***!
      \************************************************************************/

    /*! exports provided: subscribeToPromise */

    /***/
    function a7t3(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "subscribeToPromise", function () {
        return subscribeToPromise;
      });
      /* harmony import */


      var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./hostReportError */
      "NJ4a");

      var subscribeToPromise = function subscribeToPromise(promise) {
        return function (subscriber) {
          promise.then(function (value) {
            if (!subscriber.closed) {
              subscriber.next(value);
              subscriber.complete();
            }
          }, function (err) {
            return subscriber.error(err);
          }).then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__["hostReportError"]);
          return subscriber;
        };
      }; //# sourceMappingURL=subscribeToPromise.js.map

      /***/

    },

    /***/
    "aGrj":
    /*!**********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/switchMapTo.js ***!
      \**********************************************************************/

    /*! exports provided: switchMapTo */

    /***/
    function aGrj(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "switchMapTo", function () {
        return switchMapTo;
      });
      /* harmony import */


      var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./switchMap */
      "eIep");

      function switchMapTo(innerObservable, resultSelector) {
        return resultSelector ? Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () {
          return innerObservable;
        }, resultSelector) : Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () {
          return innerObservable;
        });
      } //# sourceMappingURL=switchMapTo.js.map

      /***/

    },

    /***/
    "aI3+":
    /*!***************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/index.js ***!
      \***************************************************/

    /*! exports provided: Integrations, Span, Transaction, registerRequestInstrumentation, defaultRequestInstrumentationOptions, SpanStatus, IdleTransaction, startIdleTransaction, addExtensionMethods, extractTraceparentData, getActiveTransaction, hasTracingEnabled, stripUrlQueryAndFragment, TRACEPARENT_REGEXP */

    /***/
    function aI3(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Integrations", function () {
        return Integrations;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./browser */
      "lk7i");
      /* harmony import */


      var _hubextensions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./hubextensions */
      "Cpvd");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "addExtensionMethods", function () {
        return _hubextensions__WEBPACK_IMPORTED_MODULE_2__["addExtensionMethods"];
      });
      /* harmony import */


      var _integrations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./integrations */
      "WjI+");
      /* harmony import */


      var _span__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./span */
      "SYqL");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Span", function () {
        return _span__WEBPACK_IMPORTED_MODULE_4__["Span"];
      });
      /* harmony import */


      var _transaction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./transaction */
      "EldZ");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Transaction", function () {
        return _transaction__WEBPACK_IMPORTED_MODULE_5__["Transaction"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "registerRequestInstrumentation", function () {
        return _browser__WEBPACK_IMPORTED_MODULE_1__["instrumentOutgoingRequests"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "defaultRequestInstrumentationOptions", function () {
        return _browser__WEBPACK_IMPORTED_MODULE_1__["defaultRequestInstrumentationOptions"];
      });
      /* harmony import */


      var _spanstatus__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ./spanstatus */
      "bju/");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "SpanStatus", function () {
        return _spanstatus__WEBPACK_IMPORTED_MODULE_6__["SpanStatus"];
      });
      /* harmony import */


      var _idletransaction__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! ./idletransaction */
      "MBYv");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "IdleTransaction", function () {
        return _idletransaction__WEBPACK_IMPORTED_MODULE_7__["IdleTransaction"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "startIdleTransaction", function () {
        return _hubextensions__WEBPACK_IMPORTED_MODULE_2__["startIdleTransaction"];
      });
      /* harmony import */


      var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
      /*! ./utils */
      "FGHR");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "extractTraceparentData", function () {
        return _utils__WEBPACK_IMPORTED_MODULE_8__["extractTraceparentData"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getActiveTransaction", function () {
        return _utils__WEBPACK_IMPORTED_MODULE_8__["getActiveTransaction"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "hasTracingEnabled", function () {
        return _utils__WEBPACK_IMPORTED_MODULE_8__["hasTracingEnabled"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "stripUrlQueryAndFragment", function () {
        return _utils__WEBPACK_IMPORTED_MODULE_8__["stripUrlQueryAndFragment"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "TRACEPARENT_REGEXP", function () {
        return _utils__WEBPACK_IMPORTED_MODULE_8__["TRACEPARENT_REGEXP"];
      });

      var Integrations = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, _integrations__WEBPACK_IMPORTED_MODULE_3__), {
        BrowserTracing: _browser__WEBPACK_IMPORTED_MODULE_1__["BrowserTracing"]
      }); // We are patching the global object with our hub extension methods

      Object(_hubextensions__WEBPACK_IMPORTED_MODULE_2__["addExtensionMethods"])(); //# sourceMappingURL=index.js.map

      /***/
    },

    /***/
    "aJZl":
    /*!**********************************************************************************************!*\
      !*** ./node_modules/@ionic-native/core/__ivy_ngcc__/decorators/cordova-function-override.js ***!
      \**********************************************************************************************/

    /*! exports provided: cordovaFunctionOverride */

    /***/
    function aJZl(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "cordovaFunctionOverride", function () {
        return cordovaFunctionOverride;
      });
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! rxjs */
      "qCKp");
      /* harmony import */


      var _common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./common */
      "yR3O");

      function overrideFunction(pluginObj, methodName) {
        return new rxjs__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (observer) {
          var availabilityCheck = Object(_common__WEBPACK_IMPORTED_MODULE_1__["checkAvailability"])(pluginObj, methodName);

          if (availabilityCheck === true) {
            var pluginInstance_1 = Object(_common__WEBPACK_IMPORTED_MODULE_1__["getPlugin"])(pluginObj.constructor.getPluginRef());
            pluginInstance_1[methodName] = observer.next.bind(observer);
            return function () {
              return pluginInstance_1[methodName] = function () {};
            };
          } else {
            observer.error(availabilityCheck);
            observer.complete();
          }
        });
      }

      function cordovaFunctionOverride(pluginObj, methodName, args) {
        if (args === void 0) {
          args = [];
        }

        return overrideFunction(pluginObj, methodName);
      } //# sourceMappingURL=cordova-function-override.js.map

      /***/

    },

    /***/
    "asNa":
    /*!**********************************************************************!*\
      !*** ./node_modules/@capacitor/push-notifications/dist/esm/index.js ***!
      \**********************************************************************/

    /*! exports provided: PushNotifications */

    /***/
    function asNa(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PushNotifications", function () {
        return PushNotifications;
      });
      /* harmony import */


      var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @capacitor/core */
      "FUe0");
      /* harmony import */


      var _definitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./definitions */
      "F5Lp");
      /* empty/unused harmony star reexport */


      var PushNotifications = Object(_capacitor_core__WEBPACK_IMPORTED_MODULE_0__["registerPlugin"])('PushNotifications', {}); //# sourceMappingURL=index.js.map

      /***/
    },

    /***/
    "b1qR":
    /*!**************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/polyfills/index.js ***!
      \**************************************************************/

    /*! exports provided: applyPolyfills */

    /***/
    function b1qR(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "applyPolyfills", function () {
        return applyPolyfills;
      });

      function applyPolyfills() {
        var promises = [];

        if (typeof window !== 'undefined') {
          var win = window;

          if (!win.customElements || win.Element && (!win.Element.prototype.closest || !win.Element.prototype.matches || !win.Element.prototype.remove || !win.Element.prototype.getRootNode)) {
            promises.push(__webpack_require__.e(
            /*! import() | polyfills-dom */
            "polyfills-dom").then(__webpack_require__.t.bind(null,
            /*! ./dom.js */
            "QdDj", 7)));
          }

          var checkIfURLIsSupported = function checkIfURLIsSupported() {
            try {
              var u = new URL('b', 'http://a');
              u.pathname = 'c%20d';
              return u.href === 'http://a/c%20d' && u.searchParams;
            } catch (e) {
              return false;
            }
          };

          if ('function' !== typeof Object.assign || !Object.entries || !Array.prototype.find || !Array.prototype.includes || !String.prototype.startsWith || !String.prototype.endsWith || win.NodeList && !win.NodeList.prototype.forEach || !win.fetch || !checkIfURLIsSupported() || typeof WeakMap == 'undefined') {
            promises.push(__webpack_require__.e(
            /*! import() | polyfills-core-js */
            "polyfills-core-js").then(__webpack_require__.t.bind(null,
            /*! ./core-js.js */
            "t6o4", 7)));
          }
        }

        return Promise.all(promises);
      }
      /***/

    },

    /***/
    "bC4P":
    /*!********************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/cubic-bezier-eea9a7a9.js ***!
      \********************************************************************/

    /*! exports provided: g */

    /***/
    function bC4P(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "g", function () {
        return getTimeGivenProgression;
      });
      /**
       * Based on:
       * https://stackoverflow.com/questions/7348009/y-coordinate-for-a-given-x-cubic-bezier
       * https://math.stackexchange.com/questions/26846/is-there-an-explicit-form-for-cubic-b%C3%A9zier-curves
       * TODO: Reduce rounding error
       */

      /**
       * EXPERIMENTAL
       * Given a cubic-bezier curve, get the x value (time) given
       * the y value (progression).
       * Ex: cubic-bezier(0.32, 0.72, 0, 1);
       * P0: (0, 0)
       * P1: (0.32, 0.72)
       * P2: (0, 1)
       * P3: (1, 1)
       *
       * If you give a cubic bezier curve that never reaches the
       * provided progression, this function will return an empty array.
       */


      var getTimeGivenProgression = function getTimeGivenProgression(p0, p1, p2, p3, progression) {
        return solveCubicBezier(p0[1], p1[1], p2[1], p3[1], progression).map(function (tValue) {
          return solveCubicParametricEquation(p0[0], p1[0], p2[0], p3[0], tValue);
        });
      };
      /**
       * Solve a cubic equation in one dimension (time)
       */


      var solveCubicParametricEquation = function solveCubicParametricEquation(p0, p1, p2, p3, t) {
        var partA = 3 * p1 * Math.pow(t - 1, 2);
        var partB = -3 * p2 * t + 3 * p2 + p3 * t;
        var partC = p0 * Math.pow(t - 1, 3);
        return t * (partA + t * partB) - partC;
      };
      /**
       * Find the `t` value for a cubic bezier using Cardano's formula
       */


      var solveCubicBezier = function solveCubicBezier(p0, p1, p2, p3, refPoint) {
        p0 -= refPoint;
        p1 -= refPoint;
        p2 -= refPoint;
        p3 -= refPoint;
        var roots = solveCubicEquation(p3 - 3 * p2 + 3 * p1 - p0, 3 * p2 - 6 * p1 + 3 * p0, 3 * p1 - 3 * p0, p0);
        return roots.filter(function (root) {
          return root >= 0 && root <= 1;
        });
      };

      var solveQuadraticEquation = function solveQuadraticEquation(a, b, c) {
        var discriminant = b * b - 4 * a * c;

        if (discriminant < 0) {
          return [];
        } else {
          return [(-b + Math.sqrt(discriminant)) / (2 * a), (-b - Math.sqrt(discriminant)) / (2 * a)];
        }
      };

      var solveCubicEquation = function solveCubicEquation(a, b, c, d) {
        if (a === 0) {
          return solveQuadraticEquation(b, c, d);
        }

        b /= a;
        c /= a;
        d /= a;
        var p = (3 * c - b * b) / 3;
        var q = (2 * b * b * b - 9 * b * c + 27 * d) / 27;

        if (p === 0) {
          return [Math.pow(-q, 1 / 3)];
        } else if (q === 0) {
          return [Math.sqrt(-p), -Math.sqrt(-p)];
        }

        var discriminant = Math.pow(q / 2, 2) + Math.pow(p / 3, 3);

        if (discriminant === 0) {
          return [Math.pow(q / 2, 1 / 2) - b / 3];
        } else if (discriminant > 0) {
          return [Math.pow(-(q / 2) + Math.sqrt(discriminant), 1 / 3) - Math.pow(q / 2 + Math.sqrt(discriminant), 1 / 3) - b / 3];
        }

        var r = Math.sqrt(Math.pow(-(p / 3), 3));
        var phi = Math.acos(-(q / (2 * Math.sqrt(Math.pow(-(p / 3), 3)))));
        var s = 2 * Math.pow(r, 1 / 3);
        return [s * Math.cos(phi / 3) - b / 3, s * Math.cos((phi + 2 * Math.PI) / 3) - b / 3, s * Math.cos((phi + 4 * Math.PI) / 3) - b / 3];
      };
      /***/

    },

    /***/
    "bHdf":
    /*!*******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeAll.js ***!
      \*******************************************************************/

    /*! exports provided: mergeAll */

    /***/
    function bHdf(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "mergeAll", function () {
        return mergeAll;
      });
      /* harmony import */


      var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./mergeMap */
      "5+tZ");
      /* harmony import */


      var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/identity */
      "SpAZ");

      function mergeAll() {
        var concurrent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.POSITIVE_INFINITY;
        return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"], concurrent);
      } //# sourceMappingURL=mergeAll.js.map

      /***/

    },

    /***/
    "bOdf":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/concatMap.js ***!
      \********************************************************************/

    /*! exports provided: concatMap */

    /***/
    function bOdf(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "concatMap", function () {
        return concatMap;
      });
      /* harmony import */


      var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./mergeMap */
      "5+tZ");

      function concatMap(project, resultSelector) {
        return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(project, resultSelector, 1);
      } //# sourceMappingURL=concatMap.js.map

      /***/

    },

    /***/
    "bju/":
    /*!********************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/spanstatus.js ***!
      \********************************************************/

    /*! exports provided: SpanStatus */

    /***/
    function bju(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SpanStatus", function () {
        return SpanStatus;
      });
      /** The status of an Span. */
      // eslint-disable-next-line import/export


      var SpanStatus;

      (function (SpanStatus) {
        /** The operation completed successfully. */
        SpanStatus["Ok"] = "ok";
        /** Deadline expired before operation could complete. */

        SpanStatus["DeadlineExceeded"] = "deadline_exceeded";
        /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */

        SpanStatus["Unauthenticated"] = "unauthenticated";
        /** 403 Forbidden */

        SpanStatus["PermissionDenied"] = "permission_denied";
        /** 404 Not Found. Some requested entity (file or directory) was not found. */

        SpanStatus["NotFound"] = "not_found";
        /** 429 Too Many Requests */

        SpanStatus["ResourceExhausted"] = "resource_exhausted";
        /** Client specified an invalid argument. 4xx. */

        SpanStatus["InvalidArgument"] = "invalid_argument";
        /** 501 Not Implemented */

        SpanStatus["Unimplemented"] = "unimplemented";
        /** 503 Service Unavailable */

        SpanStatus["Unavailable"] = "unavailable";
        /** Other/generic 5xx. */

        SpanStatus["InternalError"] = "internal_error";
        /** Unknown. Any non-standard HTTP status code. */

        SpanStatus["UnknownError"] = "unknown_error";
        /** The operation was cancelled (typically by the user). */

        SpanStatus["Cancelled"] = "cancelled";
        /** Already exists (409) */

        SpanStatus["AlreadyExists"] = "already_exists";
        /** Operation was rejected because the system is not in a state required for the operation's */

        SpanStatus["FailedPrecondition"] = "failed_precondition";
        /** The operation was aborted, typically due to a concurrency issue. */

        SpanStatus["Aborted"] = "aborted";
        /** Operation was attempted past the valid range. */

        SpanStatus["OutOfRange"] = "out_of_range";
        /** Unrecoverable data loss or corruption */

        SpanStatus["DataLoss"] = "data_loss";
      })(SpanStatus || (SpanStatus = {})); // eslint-disable-next-line @typescript-eslint/no-namespace, import/export


      (function (SpanStatus) {
        /**
         * Converts a HTTP status code into a {@link SpanStatus}.
         *
         * @param httpStatus The HTTP response status code.
         * @returns The span status or {@link SpanStatus.UnknownError}.
         */
        function fromHttpCode(httpStatus) {
          if (httpStatus < 400) {
            return SpanStatus.Ok;
          }

          if (httpStatus >= 400 && httpStatus < 500) {
            switch (httpStatus) {
              case 401:
                return SpanStatus.Unauthenticated;

              case 403:
                return SpanStatus.PermissionDenied;

              case 404:
                return SpanStatus.NotFound;

              case 409:
                return SpanStatus.AlreadyExists;

              case 413:
                return SpanStatus.FailedPrecondition;

              case 429:
                return SpanStatus.ResourceExhausted;

              default:
                return SpanStatus.InvalidArgument;
            }
          }

          if (httpStatus >= 500 && httpStatus < 600) {
            switch (httpStatus) {
              case 501:
                return SpanStatus.Unimplemented;

              case 503:
                return SpanStatus.Unavailable;

              case 504:
                return SpanStatus.DeadlineExceeded;

              default:
                return SpanStatus.InternalError;
            }
          }

          return SpanStatus.UnknownError;
        }

        SpanStatus.fromHttpCode = fromHttpCode;
      })(SpanStatus || (SpanStatus = {})); //# sourceMappingURL=spanstatus.js.map

      /***/

    },

    /***/
    "bjvM":
    /*!*******************************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/initMetric.js ***!
      \*******************************************************************************/

    /*! exports provided: initMetric */

    /***/
    function bjvM(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "initMetric", function () {
        return initMetric;
      });
      /* harmony import */


      var _generateUniqueID__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./generateUniqueID */
      "fJOi");
      /*
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *     https://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var initMetric = function initMetric(name, value) {
        return {
          name: name,
          value: value !== null && value !== void 0 ? value : -1,
          delta: 0,
          entries: [],
          id: Object(_generateUniqueID__WEBPACK_IMPORTED_MODULE_0__["generateUniqueID"])()
        };
      }; //# sourceMappingURL=initMetric.js.map

      /***/

    },

    /***/
    "c2HN":
    /*!***************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/isPromise.js ***!
      \***************************************************************/

    /*! exports provided: isPromise */

    /***/
    function c2HN(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isPromise", function () {
        return isPromise;
      });

      function isPromise(value) {
        return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
      } //# sourceMappingURL=isPromise.js.map

      /***/

    },

    /***/
    "c6ID":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/sample.js ***!
      \*****************************************************************/

    /*! exports provided: sample */

    /***/
    function c6ID(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "sample", function () {
        return sample;
      });
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function sample(notifier) {
        return function (source) {
          return source.lift(new SampleOperator(notifier));
        };
      }

      var SampleOperator = /*#__PURE__*/function () {
        function SampleOperator(notifier) {
          _classCallCheck(this, SampleOperator);

          this.notifier = notifier;
        }

        _createClass2(SampleOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            var sampleSubscriber = new SampleSubscriber(subscriber);
            var subscription = source.subscribe(sampleSubscriber);
            subscription.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(this.notifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](sampleSubscriber)));
            return subscription;
          }
        }]);

        return SampleOperator;
      }();

      var SampleSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP13) {
        _inherits(SampleSubscriber, _innerSubscribe__WEBP13);

        var _super208 = _createSuper(SampleSubscriber);

        function SampleSubscriber() {
          var _this459;

          _classCallCheck(this, SampleSubscriber);

          _this459 = _super208.apply(this, arguments);
          _this459.hasValue = false;
          return _this459;
        }

        _createClass2(SampleSubscriber, [{
          key: "_next",
          value: function _next(value) {
            this.value = value;
            this.hasValue = true;
          }
        }, {
          key: "notifyNext",
          value: function notifyNext() {
            this.emitValue();
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            this.emitValue();
          }
        }, {
          key: "emitValue",
          value: function emitValue() {
            if (this.hasValue) {
              this.hasValue = false;
              this.destination.next(this.value);
            }
          }
        }]);

        return SampleSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"]); //# sourceMappingURL=sample.js.map

      /***/

    },

    /***/
    "c7jc":
    /*!***************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/Immediate.js ***!
      \***************************************************************/

    /*! exports provided: Immediate, TestTools */

    /***/
    function c7jc(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Immediate", function () {
        return Immediate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TestTools", function () {
        return TestTools;
      });

      var nextHandle = 1;

      var RESOLVED = function () {
        return Promise.resolve();
      }();

      var activeHandles = {};

      function findAndClearHandle(handle) {
        if (handle in activeHandles) {
          delete activeHandles[handle];
          return true;
        }

        return false;
      }

      var Immediate = {
        setImmediate: function setImmediate(cb) {
          var handle = nextHandle++;
          activeHandles[handle] = true;
          RESOLVED.then(function () {
            return findAndClearHandle(handle) && cb();
          });
          return handle;
        },
        clearImmediate: function clearImmediate(handle) {
          findAndClearHandle(handle);
        }
      };
      var TestTools = {
        pending: function pending() {
          return Object.keys(activeHandles).length;
        }
      }; //# sourceMappingURL=Immediate.js.map

      /***/
    },

    /***/
    "cBqT":
    /*!***************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/find.js ***!
      \***************************************************************/

    /*! exports provided: find, FindValueOperator, FindValueSubscriber */

    /***/
    function cBqT(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "find", function () {
        return find;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FindValueOperator", function () {
        return FindValueOperator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FindValueSubscriber", function () {
        return FindValueSubscriber;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function find(predicate, thisArg) {
        if (typeof predicate !== 'function') {
          throw new TypeError('predicate is not a function');
        }

        return function (source) {
          return source.lift(new FindValueOperator(predicate, source, false, thisArg));
        };
      }

      var FindValueOperator = /*#__PURE__*/function () {
        function FindValueOperator(predicate, source, yieldIndex, thisArg) {
          _classCallCheck(this, FindValueOperator);

          this.predicate = predicate;
          this.source = source;
          this.yieldIndex = yieldIndex;
          this.thisArg = thisArg;
        }

        _createClass2(FindValueOperator, [{
          key: "call",
          value: function call(observer, source) {
            return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));
          }
        }]);

        return FindValueOperator;
      }();

      var FindValueSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_29) {
        _inherits(FindValueSubscriber, _Subscriber__WEBPACK_29);

        var _super209 = _createSuper(FindValueSubscriber);

        function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
          var _this460;

          _classCallCheck(this, FindValueSubscriber);

          _this460 = _super209.call(this, destination);
          _this460.predicate = predicate;
          _this460.source = source;
          _this460.yieldIndex = yieldIndex;
          _this460.thisArg = thisArg;
          _this460.index = 0;
          return _this460;
        }

        _createClass2(FindValueSubscriber, [{
          key: "notifyComplete",
          value: function notifyComplete(value) {
            var destination = this.destination;
            destination.next(value);
            destination.complete();
            this.unsubscribe();
          }
        }, {
          key: "_next",
          value: function _next(value) {
            var predicate = this.predicate,
                thisArg = this.thisArg;
            var index = this.index++;

            try {
              var result = predicate.call(thisArg || this, value, index, this.source);

              if (result) {
                this.notifyComplete(this.yieldIndex ? index : value);
              }
            } catch (err) {
              this.destination.error(err);
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.notifyComplete(this.yieldIndex ? -1 : undefined);
          }
        }]);

        return FindValueSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=find.js.map

      /***/

    },

    /***/
    "coGc":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/delayWhen.js ***!
      \********************************************************************/

    /*! exports provided: delayWhen */

    /***/
    function coGc(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "delayWhen", function () {
        return delayWhen;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../OuterSubscriber */
      "l7GE");
      /* harmony import */


      var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../util/subscribeToResult */
      "ZUHj");

      function delayWhen(delayDurationSelector, subscriptionDelay) {
        if (subscriptionDelay) {
          return function (source) {
            return new SubscriptionDelayObservable(source, subscriptionDelay).lift(new DelayWhenOperator(delayDurationSelector));
          };
        }

        return function (source) {
          return source.lift(new DelayWhenOperator(delayDurationSelector));
        };
      }

      var DelayWhenOperator = /*#__PURE__*/function () {
        function DelayWhenOperator(delayDurationSelector) {
          _classCallCheck(this, DelayWhenOperator);

          this.delayDurationSelector = delayDurationSelector;
        }

        _createClass2(DelayWhenOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));
          }
        }]);

        return DelayWhenOperator;
      }();

      var DelayWhenSubscriber = /*#__PURE__*/function (_OuterSubscriber__WEB3) {
        _inherits(DelayWhenSubscriber, _OuterSubscriber__WEB3);

        var _super210 = _createSuper(DelayWhenSubscriber);

        function DelayWhenSubscriber(destination, delayDurationSelector) {
          var _this461;

          _classCallCheck(this, DelayWhenSubscriber);

          _this461 = _super210.call(this, destination);
          _this461.delayDurationSelector = delayDurationSelector;
          _this461.completed = false;
          _this461.delayNotifierSubscriptions = [];
          _this461.index = 0;
          return _this461;
        }

        _createClass2(DelayWhenSubscriber, [{
          key: "notifyNext",
          value: function notifyNext(outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) {
            this.destination.next(outerValue);
            this.removeSubscription(innerSub);
            this.tryComplete();
          }
        }, {
          key: "notifyError",
          value: function notifyError(error, innerSub) {
            this._error(error);
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete(innerSub) {
            var value = this.removeSubscription(innerSub);

            if (value) {
              this.destination.next(value);
            }

            this.tryComplete();
          }
        }, {
          key: "_next",
          value: function _next(value) {
            var index = this.index++;

            try {
              var delayNotifier = this.delayDurationSelector(value, index);

              if (delayNotifier) {
                this.tryDelay(delayNotifier, value);
              }
            } catch (err) {
              this.destination.error(err);
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.completed = true;
            this.tryComplete();
            this.unsubscribe();
          }
        }, {
          key: "removeSubscription",
          value: function removeSubscription(subscription) {
            subscription.unsubscribe();
            var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);

            if (subscriptionIdx !== -1) {
              this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);
            }

            return subscription.outerValue;
          }
        }, {
          key: "tryDelay",
          value: function tryDelay(delayNotifier, value) {
            var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, delayNotifier, value);

            if (notifierSubscription && !notifierSubscription.closed) {
              var destination = this.destination;
              destination.add(notifierSubscription);
              this.delayNotifierSubscriptions.push(notifierSubscription);
            }
          }
        }, {
          key: "tryComplete",
          value: function tryComplete() {
            if (this.completed && this.delayNotifierSubscriptions.length === 0) {
              this.destination.complete();
            }
          }
        }]);

        return DelayWhenSubscriber;
      }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]);

      var SubscriptionDelayObservable = /*#__PURE__*/function (_Observable__WEBPACK_5) {
        _inherits(SubscriptionDelayObservable, _Observable__WEBPACK_5);

        var _super211 = _createSuper(SubscriptionDelayObservable);

        function SubscriptionDelayObservable(source, subscriptionDelay) {
          var _this462;

          _classCallCheck(this, SubscriptionDelayObservable);

          _this462 = _super211.call(this);
          _this462.source = source;
          _this462.subscriptionDelay = subscriptionDelay;
          return _this462;
        }

        _createClass2(SubscriptionDelayObservable, [{
          key: "_subscribe",
          value: function _subscribe(subscriber) {
            this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));
          }
        }]);

        return SubscriptionDelayObservable;
      }(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]);

      var SubscriptionDelaySubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_30) {
        _inherits(SubscriptionDelaySubscriber, _Subscriber__WEBPACK_30);

        var _super212 = _createSuper(SubscriptionDelaySubscriber);

        function SubscriptionDelaySubscriber(parent, source) {
          var _this463;

          _classCallCheck(this, SubscriptionDelaySubscriber);

          _this463 = _super212.call(this);
          _this463.parent = parent;
          _this463.source = source;
          _this463.sourceSubscribed = false;
          return _this463;
        }

        _createClass2(SubscriptionDelaySubscriber, [{
          key: "_next",
          value: function _next(unused) {
            this.subscribeToSource();
          }
        }, {
          key: "_error",
          value: function _error(err) {
            this.unsubscribe();
            this.parent.error(err);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.unsubscribe();
            this.subscribeToSource();
          }
        }, {
          key: "subscribeToSource",
          value: function subscribeToSource() {
            if (!this.sourceSubscribed) {
              this.sourceSubscribed = true;
              this.unsubscribe();
              this.source.subscribe(this.parent);
            }
          }
        }]);

        return SubscriptionDelaySubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=delayWhen.js.map

      /***/

    },

    /***/
    "cp0P":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/forkJoin.js ***!
      \********************************************************************/

    /*! exports provided: forkJoin */

    /***/
    function cp0P(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "forkJoin", function () {
        return forkJoin;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/isArray */
      "DH7j");
      /* harmony import */


      var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../operators/map */
      "lJxs");
      /* harmony import */


      var _util_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../util/isObject */
      "XoHu");
      /* harmony import */


      var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./from */
      "Cfvw");

      function forkJoin() {
        for (var _len29 = arguments.length, sources = new Array(_len29), _key30 = 0; _key30 < _len29; _key30++) {
          sources[_key30] = arguments[_key30];
        }

        if (sources.length === 1) {
          var first = sources[0];

          if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(first)) {
            return forkJoinInternal(first, null);
          }

          if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_3__["isObject"])(first) && Object.getPrototypeOf(first) === Object.prototype) {
            var keys = Object.keys(first);
            return forkJoinInternal(keys.map(function (key) {
              return first[key];
            }), keys);
          }
        }

        if (typeof sources[sources.length - 1] === 'function') {
          var resultSelector = sources.pop();
          sources = sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(sources[0]) ? sources[0] : sources;
          return forkJoinInternal(sources, null).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) {
            return resultSelector.apply(void 0, _toConsumableArray(args));
          }));
        }

        return forkJoinInternal(sources, null);
      }

      function forkJoinInternal(sources, keys) {
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          var len = sources.length;

          if (len === 0) {
            subscriber.complete();
            return;
          }

          var values = new Array(len);
          var completed = 0;
          var emitted = 0;

          var _loop5 = function _loop5(i) {
            var source = Object(_from__WEBPACK_IMPORTED_MODULE_4__["from"])(sources[i]);
            var hasValue = false;
            subscriber.add(source.subscribe({
              next: function next(value) {
                if (!hasValue) {
                  hasValue = true;
                  emitted++;
                }

                values[i] = value;
              },
              error: function error(err) {
                return subscriber.error(err);
              },
              complete: function complete() {
                completed++;

                if (completed === len || !hasValue) {
                  if (emitted === len) {
                    subscriber.next(keys ? keys.reduce(function (result, key, i) {
                      return result[key] = values[i], result;
                    }, {}) : values);
                  }

                  subscriber.complete();
                }
              }
            }));
          };

          for (var i = 0; i < len; i++) {
            _loop5(i);
          }
        });
      } //# sourceMappingURL=forkJoin.js.map

      /***/

    },

    /***/
    "crS0":
    /*!*************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/request.js ***!
      \*************************************************************/

    /*! exports provided: DEFAULT_TRACING_ORIGINS, defaultRequestInstrumentationOptions, instrumentOutgoingRequests, fetchCallback, xhrCallback */

    /***/
    function crS0(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DEFAULT_TRACING_ORIGINS", function () {
        return DEFAULT_TRACING_ORIGINS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "defaultRequestInstrumentationOptions", function () {
        return defaultRequestInstrumentationOptions;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "instrumentOutgoingRequests", function () {
        return instrumentOutgoingRequests;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "fetchCallback", function () {
        return fetchCallback;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "xhrCallback", function () {
        return xhrCallback;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _spanstatus__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../spanstatus */
      "bju/");
      /* harmony import */


      var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../utils */
      "FGHR");

      var DEFAULT_TRACING_ORIGINS = ['localhost', /^\//];
      var defaultRequestInstrumentationOptions = {
        traceFetch: true,
        traceXHR: true,
        tracingOrigins: DEFAULT_TRACING_ORIGINS
      };
      /** Registers span creators for xhr and fetch requests  */

      function instrumentOutgoingRequests(_options) {
        // eslint-disable-next-line @typescript-eslint/unbound-method
        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, defaultRequestInstrumentationOptions), _options),
            traceFetch = _a.traceFetch,
            traceXHR = _a.traceXHR,
            tracingOrigins = _a.tracingOrigins,
            shouldCreateSpanForRequest = _a.shouldCreateSpanForRequest; // We should cache url -> decision so that we don't have to compute
        // regexp everytime we create a request.


        var urlMap = {};

        var defaultShouldCreateSpan = function defaultShouldCreateSpan(url) {
          if (urlMap[url]) {
            return urlMap[url];
          }

          var origins = tracingOrigins;
          urlMap[url] = origins.some(function (origin) {
            return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isMatchingPattern"])(url, origin);
          }) && !Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isMatchingPattern"])(url, 'sentry_key');
          return urlMap[url];
        }; // We want that our users don't have to re-implement shouldCreateSpanForRequest themselves
        // That's why we filter out already unwanted Spans from tracingOrigins


        var shouldCreateSpan = defaultShouldCreateSpan;

        if (typeof shouldCreateSpanForRequest === 'function') {
          shouldCreateSpan = function shouldCreateSpan(url) {
            return defaultShouldCreateSpan(url) && shouldCreateSpanForRequest(url);
          };
        }

        var spans = {};

        if (traceFetch) {
          Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addInstrumentationHandler"])({
            callback: function callback(handlerData) {
              fetchCallback(handlerData, shouldCreateSpan, spans);
            },
            type: 'fetch'
          });
        }

        if (traceXHR) {
          Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addInstrumentationHandler"])({
            callback: function callback(handlerData) {
              xhrCallback(handlerData, shouldCreateSpan, spans);
            },
            type: 'xhr'
          });
        }
      }
      /**
       * Create and track fetch request spans
       */


      function fetchCallback(handlerData, shouldCreateSpan, spans) {
        if (!Object(_utils__WEBPACK_IMPORTED_MODULE_3__["hasTracingEnabled"])() || !(handlerData.fetchData && shouldCreateSpan(handlerData.fetchData.url))) {
          return;
        }

        if (handlerData.endTimestamp && handlerData.fetchData.__span) {
          var span = spans[handlerData.fetchData.__span];

          if (span) {
            if (handlerData.response) {
              // TODO (kmclb) remove this once types PR goes through
              // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
              span.setHttpStatus(handlerData.response.status);
            } else if (handlerData.error) {
              span.setStatus(_spanstatus__WEBPACK_IMPORTED_MODULE_2__["SpanStatus"].InternalError);
            }

            span.finish(); // eslint-disable-next-line @typescript-eslint/no-dynamic-delete

            delete spans[handlerData.fetchData.__span];
          }

          return;
        }

        var activeTransaction = Object(_utils__WEBPACK_IMPORTED_MODULE_3__["getActiveTransaction"])();

        if (activeTransaction) {
          var span = activeTransaction.startChild({
            data: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, handlerData.fetchData), {
              type: 'fetch'
            }),
            description: handlerData.fetchData.method + " " + handlerData.fetchData.url,
            op: 'http.client'
          });
          handlerData.fetchData.__span = span.spanId;
          spans[span.spanId] = span;
          var request = handlerData.args[0] = handlerData.args[0]; // eslint-disable-next-line @typescript-eslint/no-explicit-any

          var options = handlerData.args[1] = handlerData.args[1] || {};
          var headers = options.headers;

          if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isInstanceOf"])(request, Request)) {
            headers = request.headers;
          }

          if (headers) {
            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
            if (typeof headers.append === 'function') {
              // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
              headers.append('sentry-trace', span.toTraceparent());
            } else if (Array.isArray(headers)) {
              headers = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(headers, [['sentry-trace', span.toTraceparent()]]);
            } else {
              headers = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, headers), {
                'sentry-trace': span.toTraceparent()
              });
            }
          } else {
            headers = {
              'sentry-trace': span.toTraceparent()
            };
          }

          options.headers = headers;
        }
      }
      /**
       * Create and track xhr request spans
       */


      function xhrCallback(handlerData, shouldCreateSpan, spans) {
        var _a, _b;

        if (!Object(_utils__WEBPACK_IMPORTED_MODULE_3__["hasTracingEnabled"])() || ((_a = handlerData.xhr) === null || _a === void 0 ? void 0 : _a.__sentry_own_request__) || !(((_b = handlerData.xhr) === null || _b === void 0 ? void 0 : _b.__sentry_xhr__) && shouldCreateSpan(handlerData.xhr.__sentry_xhr__.url))) {
          return;
        }

        var xhr = handlerData.xhr.__sentry_xhr__; // check first if the request has finished and is tracked by an existing span which should now end

        if (handlerData.endTimestamp && handlerData.xhr.__sentry_xhr_span_id__) {
          var span = spans[handlerData.xhr.__sentry_xhr_span_id__];

          if (span) {
            span.setHttpStatus(xhr.status_code);
            span.finish(); // eslint-disable-next-line @typescript-eslint/no-dynamic-delete

            delete spans[handlerData.xhr.__sentry_xhr_span_id__];
          }

          return;
        } // if not, create a new span to track it


        var activeTransaction = Object(_utils__WEBPACK_IMPORTED_MODULE_3__["getActiveTransaction"])();

        if (activeTransaction) {
          var span = activeTransaction.startChild({
            data: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, xhr.data), {
              type: 'xhr',
              method: xhr.method,
              url: xhr.url
            }),
            description: xhr.method + " " + xhr.url,
            op: 'http.client'
          });
          handlerData.xhr.__sentry_xhr_span_id__ = span.spanId;
          spans[handlerData.xhr.__sentry_xhr_span_id__] = span;

          if (handlerData.xhr.setRequestHeader) {
            try {
              handlerData.xhr.setRequestHeader('sentry-trace', span.toTraceparent());
            } catch (_) {// Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.
            }
          }
        }
      } //# sourceMappingURL=request.js.map

      /***/

    },

    /***/
    "cx9U":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/single.js ***!
      \*****************************************************************/

    /*! exports provided: single */

    /***/
    function cx9U(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "single", function () {
        return single;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/EmptyError */
      "sVev");

      function single(predicate) {
        return function (source) {
          return source.lift(new SingleOperator(predicate, source));
        };
      }

      var SingleOperator = /*#__PURE__*/function () {
        function SingleOperator(predicate, source) {
          _classCallCheck(this, SingleOperator);

          this.predicate = predicate;
          this.source = source;
        }

        _createClass2(SingleOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));
          }
        }]);

        return SingleOperator;
      }();

      var SingleSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_31) {
        _inherits(SingleSubscriber, _Subscriber__WEBPACK_31);

        var _super213 = _createSuper(SingleSubscriber);

        function SingleSubscriber(destination, predicate, source) {
          var _this464;

          _classCallCheck(this, SingleSubscriber);

          _this464 = _super213.call(this, destination);
          _this464.predicate = predicate;
          _this464.source = source;
          _this464.seenValue = false;
          _this464.index = 0;
          return _this464;
        }

        _createClass2(SingleSubscriber, [{
          key: "applySingleValue",
          value: function applySingleValue(value) {
            if (this.seenValue) {
              this.destination.error('Sequence contains more than one element');
            } else {
              this.seenValue = true;
              this.singleValue = value;
            }
          }
        }, {
          key: "_next",
          value: function _next(value) {
            var index = this.index++;

            if (this.predicate) {
              this.tryNext(value, index);
            } else {
              this.applySingleValue(value);
            }
          }
        }, {
          key: "tryNext",
          value: function tryNext(value, index) {
            try {
              if (this.predicate(value, index, this.source)) {
                this.applySingleValue(value);
              }
            } catch (err) {
              this.destination.error(err);
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var destination = this.destination;

            if (this.index > 0) {
              destination.next(this.seenValue ? this.singleValue : undefined);
              destination.complete();
            } else {
              destination.error(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__["EmptyError"]());
            }
          }
        }]);

        return SingleSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=single.js.map

      /***/

    },

    /***/
    "dMW8":
    /*!**************************************************!*\
      !*** ./node_modules/@sentry/types/esm/status.js ***!
      \**************************************************/

    /*! exports provided: Status */

    /***/
    function dMW8(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Status", function () {
        return Status;
      });
      /** The status of an event. */
      // eslint-disable-next-line import/export


      var Status;

      (function (Status) {
        /** The status could not be determined. */
        Status["Unknown"] = "unknown";
        /** The event was skipped due to configuration or callbacks. */

        Status["Skipped"] = "skipped";
        /** The event was sent to Sentry successfully. */

        Status["Success"] = "success";
        /** The client is currently rate limited and will try again later. */

        Status["RateLimit"] = "rate_limit";
        /** The event could not be processed. */

        Status["Invalid"] = "invalid";
        /** A server-side error occurred during submission. */

        Status["Failed"] = "failed";
      })(Status || (Status = {})); // eslint-disable-next-line @typescript-eslint/no-namespace, import/export


      (function (Status) {
        /**
         * Converts a HTTP status code into a {@link Status}.
         *
         * @param code The HTTP response status code.
         * @returns The send status or {@link Status.Unknown}.
         */
        function fromHttpCode(code) {
          if (code >= 200 && code < 300) {
            return Status.Success;
          }

          if (code === 429) {
            return Status.RateLimit;
          }

          if (code >= 400 && code < 500) {
            return Status.Invalid;
          }

          if (code >= 500) {
            return Status.Failed;
          }

          return Status.Unknown;
        }

        Status.fromHttpCode = fromHttpCode;
      })(Status || (Status = {})); //# sourceMappingURL=status.js.map

      /***/

    },

    /***/
    "dkDA":
    /*!**********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/materialize.js ***!
      \**********************************************************************/

    /*! exports provided: materialize */

    /***/
    function dkDA(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "materialize", function () {
        return materialize;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _Notification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Notification */
      "WMd4");

      function materialize() {
        return function materializeOperatorFunction(source) {
          return source.lift(new MaterializeOperator());
        };
      }

      var MaterializeOperator = /*#__PURE__*/function () {
        function MaterializeOperator() {
          _classCallCheck(this, MaterializeOperator);
        }

        _createClass2(MaterializeOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new MaterializeSubscriber(subscriber));
          }
        }]);

        return MaterializeOperator;
      }();

      var MaterializeSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_32) {
        _inherits(MaterializeSubscriber, _Subscriber__WEBPACK_32);

        var _super214 = _createSuper(MaterializeSubscriber);

        function MaterializeSubscriber(destination) {
          _classCallCheck(this, MaterializeSubscriber);

          return _super214.call(this, destination);
        }

        _createClass2(MaterializeSubscriber, [{
          key: "_next",
          value: function _next(value) {
            this.destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createNext(value));
          }
        }, {
          key: "_error",
          value: function _error(err) {
            var destination = this.destination;
            destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createError(err));
            destination.complete();
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var destination = this.destination;
            destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createComplete());
            destination.complete();
          }
        }]);

        return MaterializeSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=materialize.js.map

      /***/

    },

    /***/
    "eIep":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/switchMap.js ***!
      \********************************************************************/

    /*! exports provided: switchMap */

    /***/
    function eIep(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "switchMap", function () {
        return switchMap;
      });
      /* harmony import */


      var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./map */
      "lJxs");
      /* harmony import */


      var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../observable/from */
      "Cfvw");
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function switchMap(project, resultSelector) {
        if (typeof resultSelector === 'function') {
          return function (source) {
            return source.pipe(switchMap(function (a, i) {
              return Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])(function (b, ii) {
                return resultSelector(a, b, i, ii);
              }));
            }));
          };
        }

        return function (source) {
          return source.lift(new SwitchMapOperator(project));
        };
      }

      var SwitchMapOperator = /*#__PURE__*/function () {
        function SwitchMapOperator(project) {
          _classCallCheck(this, SwitchMapOperator);

          this.project = project;
        }

        _createClass2(SwitchMapOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));
          }
        }]);

        return SwitchMapOperator;
      }();

      var SwitchMapSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP14) {
        _inherits(SwitchMapSubscriber, _innerSubscribe__WEBP14);

        var _super215 = _createSuper(SwitchMapSubscriber);

        function SwitchMapSubscriber(destination, project) {
          var _this465;

          _classCallCheck(this, SwitchMapSubscriber);

          _this465 = _super215.call(this, destination);
          _this465.project = project;
          _this465.index = 0;
          return _this465;
        }

        _createClass2(SwitchMapSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var result;
            var index = this.index++;

            try {
              result = this.project(value, index);
            } catch (error) {
              this.destination.error(error);
              return;
            }

            this._innerSub(result);
          }
        }, {
          key: "_innerSub",
          value: function _innerSub(result) {
            var innerSubscription = this.innerSubscription;

            if (innerSubscription) {
              innerSubscription.unsubscribe();
            }

            var innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this);
            var destination = this.destination;
            destination.add(innerSubscriber);
            this.innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(result, innerSubscriber);

            if (this.innerSubscription !== innerSubscriber) {
              destination.add(this.innerSubscription);
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var innerSubscription = this.innerSubscription;

            if (!innerSubscription || innerSubscription.closed) {
              _get(_getPrototypeOf(SwitchMapSubscriber.prototype), "_complete", this).call(this);
            }

            this.unsubscribe();
          }
        }, {
          key: "_unsubscribe",
          value: function _unsubscribe() {
            this.innerSubscription = undefined;
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            this.innerSubscription = undefined;

            if (this.isStopped) {
              _get(_getPrototypeOf(SwitchMapSubscriber.prototype), "_complete", this).call(this);
            }
          }
        }, {
          key: "notifyNext",
          value: function notifyNext(innerValue) {
            this.destination.next(innerValue);
          }
        }]);

        return SwitchMapSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"]); //# sourceMappingURL=switchMap.js.map

      /***/

    },

    /***/
    "eNwd":
    /*!*************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduler/animationFrame.js ***!
      \*************************************************************************/

    /*! exports provided: animationFrameScheduler, animationFrame */

    /***/
    function eNwd(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function () {
        return animationFrameScheduler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "animationFrame", function () {
        return animationFrame;
      });
      /* harmony import */


      var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./AnimationFrameAction */
      "Vpsf");
      /* harmony import */


      var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./AnimationFrameScheduler */
      "znLP");

      var animationFrameScheduler = new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__["AnimationFrameScheduler"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__["AnimationFrameAction"]);
      var animationFrame = animationFrameScheduler; //# sourceMappingURL=animationFrame.js.map

      /***/
    },

    /***/
    "f29J":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/concat.js ***!
      \*****************************************************************/

    /*! exports provided: concat */

    /***/
    function f29J(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "concat", function () {
        return concat;
      });
      /* harmony import */


      var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../observable/concat */
      "GyhO");

      function concat() {
        for (var _len30 = arguments.length, observables = new Array(_len30), _key31 = 0; _key31 < _len30; _key31++) {
          observables[_key31] = arguments[_key31];
        }

        return function (source) {
          return source.lift.call(Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"]).apply(void 0, [source].concat(observables)));
        };
      } //# sourceMappingURL=concat.js.map

      /***/

    },

    /***/
    "fFD9":
    /*!************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/combineLatest.js ***!
      \************************************************************************/

    /*! exports provided: combineLatest */

    /***/
    function fFD9(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "combineLatest", function () {
        return combineLatest;
      });
      /* harmony import */


      var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../util/isArray */
      "DH7j");
      /* harmony import */


      var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../observable/combineLatest */
      "itXk");
      /* harmony import */


      var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../observable/from */
      "Cfvw");

      var none = {};

      function combineLatest() {
        for (var _len31 = arguments.length, observables = new Array(_len31), _key32 = 0; _key32 < _len31; _key32++) {
          observables[_key32] = arguments[_key32];
        }

        var project = null;

        if (typeof observables[observables.length - 1] === 'function') {
          project = observables.pop();
        }

        if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
          observables = observables[0].slice();
        }

        return function (source) {
          return source.lift.call(Object(_observable_from__WEBPACK_IMPORTED_MODULE_2__["from"])([source].concat(_toConsumableArray(observables))), new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__["CombineLatestOperator"](project));
        };
      } //# sourceMappingURL=combineLatest.js.map

      /***/

    },

    /***/
    "fJOi":
    /*!*************************************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/generateUniqueID.js ***!
      \*************************************************************************************/

    /*! exports provided: generateUniqueID */

    /***/
    function fJOi(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "generateUniqueID", function () {
        return generateUniqueID;
      });
      /*
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *     https://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Performantly generate a unique, 30-char string by combining a version
       * number, the current timestamp with a 13-digit number integer.
       * @return {string}
       */


      var generateUniqueID = function generateUniqueID() {
        return "v2-" + Date.now() + "-" + (Math.floor(Math.random() * (9e12 - 1)) + 1e12);
      }; //# sourceMappingURL=generateUniqueID.js.map

      /***/

    },

    /***/
    "fXoL":
    /*!******************************************************************!*\
      !*** ./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js ***!
      \******************************************************************/

    /*! exports provided: 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, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, 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, WrappedValue, asNativeElements, assertPlatform, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ɵ0, ɵALLOW_MULTIPLE_PLATFORMS, ɵAPP_ID_RANDOM_PROVIDER, ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__, ɵChangeDetectorStatus, ɵCodegenComponentFactoryResolver, ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__, ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__, ɵCompiler_compileModuleAsync__POST_R3__, ɵCompiler_compileModuleSync__POST_R3__, ɵComponentFactory, ɵConsole, ɵDEFAULT_LOCALE_ID, ɵEMPTY_ARRAY, ɵEMPTY_MAP, ɵINJECTOR_IMPL__POST_R3__, ɵINJECTOR_SCOPE, ɵLifecycleHooksFeature, ɵLocaleDataIndex, ɵNG_COMP_DEF, ɵNG_DIR_DEF, ɵNG_ELEMENT_ID, ɵNG_INJ_DEF, ɵNG_MOD_DEF, ɵNG_PIPE_DEF, ɵNG_PROV_DEF, ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, ɵNO_CHANGE, ɵNgModuleFactory, ɵNoopNgZone, ɵReflectionCapabilities, ɵRender3ComponentFactory, ɵRender3ComponentRef, ɵRender3NgModuleRef, ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__, ɵSWITCH_COMPILE_COMPONENT__POST_R3__, ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__, ɵSWITCH_COMPILE_INJECTABLE__POST_R3__, ɵSWITCH_COMPILE_NGMODULE__POST_R3__, ɵSWITCH_COMPILE_PIPE__POST_R3__, ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__, ɵSWITCH_IVY_ENABLED__POST_R3__, ɵSWITCH_RENDERER2_FACTORY__POST_R3__, ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__, ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__, ɵ_sanitizeHtml, ɵ_sanitizeUrl, ɵallowSanitizationBypassAndThrow, ɵand, ɵangular_packages_core_core_a, ɵangular_packages_core_core_b, ɵangular_packages_core_core_ba, ɵangular_packages_core_core_bb, ɵangular_packages_core_core_bc, ɵangular_packages_core_core_bd, ɵangular_packages_core_core_be, ɵangular_packages_core_core_bf, ɵangular_packages_core_core_bg, ɵangular_packages_core_core_bi, ɵangular_packages_core_core_bj, ɵangular_packages_core_core_bk, ɵangular_packages_core_core_bl, ɵangular_packages_core_core_bm, ɵangular_packages_core_core_bn, ɵangular_packages_core_core_bo, ɵangular_packages_core_core_bp, ɵangular_packages_core_core_bq, ɵangular_packages_core_core_br, ɵangular_packages_core_core_bs, ɵangular_packages_core_core_bu, ɵangular_packages_core_core_bw, ɵangular_packages_core_core_bx, ɵangular_packages_core_core_by, ɵangular_packages_core_core_bz, ɵangular_packages_core_core_c, ɵangular_packages_core_core_ca, ɵangular_packages_core_core_d, ɵangular_packages_core_core_e, ɵangular_packages_core_core_f, ɵangular_packages_core_core_g, ɵangular_packages_core_core_h, ɵangular_packages_core_core_i, ɵangular_packages_core_core_j, ɵangular_packages_core_core_k, ɵangular_packages_core_core_l, ɵangular_packages_core_core_m, ɵangular_packages_core_core_n, ɵangular_packages_core_core_o, ɵangular_packages_core_core_p, ɵangular_packages_core_core_q, ɵangular_packages_core_core_r, ɵangular_packages_core_core_s, ɵangular_packages_core_core_t, ɵangular_packages_core_core_u, ɵangular_packages_core_core_v, ɵangular_packages_core_core_w, ɵangular_packages_core_core_x, ɵangular_packages_core_core_y, ɵangular_packages_core_core_z, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustResourceUrl, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustUrl, ɵccf, ɵclearOverrides, ɵclearResolutionOfComponentResourcesQueue, ɵcmf, ɵcompileComponent, ɵcompileDirective, ɵcompileNgModule, ɵcompileNgModuleDefs, ɵcompileNgModuleFactory__POST_R3__, ɵcompilePipe, ɵcreateInjector, ɵcrt, ɵdefaultIterableDiffers, ɵdefaultKeyValueDiffers, ɵdetectChanges, ɵdevModeEqual, ɵdid, ɵeld, ɵfindLocaleData, ɵflushModuleScopingQueueAsMuchAsPossible, ɵgetComponentViewDefinitionFactory, ɵgetDebugNodeR2, ɵgetDebugNode__POST_R3__, ɵgetDirectives, ɵgetHostElement, ɵgetInjectableDef, ɵgetLContext, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, ɵgetModuleFactory__POST_R3__, ɵgetSanitizationBypassType, ɵglobal, ɵinitServicesIfNeeded, ɵinlineInterpolate, ɵinterpolate, ɵisBoundToModule__POST_R3__, ɵisDefaultChangeDetectionStrategy, ɵisListLikeIterable, ɵisObservable, ɵisPromise, ɵivyEnabled, ɵmakeDecorator, ɵmarkDirty, ɵmod, ɵmpd, ɵncd, ɵnoSideEffects, ɵnov, ɵoverrideComponentView, ɵoverrideProvider, ɵpad, ɵpatchComponentDefWithScope, ɵpid, ɵpod, ɵppd, ɵprd, ɵpublishDefaultGlobalUtils, ɵpublishGlobalUtil, ɵqud, ɵregisterLocaleData, ɵregisterModuleFactory, ɵregisterNgModuleType, ɵrenderComponent, ɵresetCompiledComponents, ɵresetJitOptions, ɵresolveComponentResources, ɵsetClassMetadata, ɵsetCurrentInjector, ɵsetDocument, ɵsetLocaleId, ɵstore, ɵstringify, ɵted, ɵtransitiveScopesFor, ɵunregisterLocaleData, ɵunv, ɵunwrapSafeValue, ɵvid, ɵwhenRendered, ɵɵCopyDefinitionFeature, ɵɵ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, ɵɵgetFactoryOf, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinjectPipeChangeDetectorRef, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵ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, ɵɵstaticContentQuery, ɵɵstaticViewQuery, ɵɵ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, ɵɵtrustConstantScript, ɵɵviewQuery */

    /***/
    function fXoL(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ANALYZE_FOR_ENTRY_COMPONENTS", function () {
        return ANALYZE_FOR_ENTRY_COMPONENTS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "APP_BOOTSTRAP_LISTENER", function () {
        return APP_BOOTSTRAP_LISTENER;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "APP_ID", function () {
        return APP_ID;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "APP_INITIALIZER", function () {
        return APP_INITIALIZER;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ApplicationInitStatus", function () {
        return ApplicationInitStatus;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ApplicationModule", function () {
        return ApplicationModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ApplicationRef", function () {
        return ApplicationRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Attribute", function () {
        return Attribute;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "COMPILER_OPTIONS", function () {
        return COMPILER_OPTIONS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CUSTOM_ELEMENTS_SCHEMA", function () {
        return CUSTOM_ELEMENTS_SCHEMA;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ChangeDetectionStrategy", function () {
        return ChangeDetectionStrategy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ChangeDetectorRef", function () {
        return ChangeDetectorRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Compiler", function () {
        return Compiler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CompilerFactory", function () {
        return CompilerFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Component", function () {
        return Component;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ComponentFactory", function () {
        return ComponentFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ComponentFactoryResolver", function () {
        return ComponentFactoryResolver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ComponentRef", function () {
        return ComponentRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ContentChild", function () {
        return ContentChild;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ContentChildren", function () {
        return ContentChildren;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DEFAULT_CURRENCY_CODE", function () {
        return DEFAULT_CURRENCY_CODE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DebugElement", function () {
        return DebugElement;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DebugEventListener", function () {
        return DebugEventListener;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DebugNode", function () {
        return DebugNode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DefaultIterableDiffer", function () {
        return DefaultIterableDiffer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Directive", function () {
        return Directive;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ElementRef", function () {
        return ElementRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "EmbeddedViewRef", function () {
        return EmbeddedViewRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ErrorHandler", function () {
        return ErrorHandler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "EventEmitter", function () {
        return EventEmitter;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Host", function () {
        return Host;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HostBinding", function () {
        return HostBinding;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HostListener", function () {
        return HostListener;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "INJECTOR", function () {
        return INJECTOR$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Inject", function () {
        return Inject;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "InjectFlags", function () {
        return InjectFlags;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Injectable", function () {
        return Injectable;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "InjectionToken", function () {
        return InjectionToken;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Injector", function () {
        return Injector;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Input", function () {
        return Input;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "IterableDiffers", function () {
        return IterableDiffers;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "KeyValueDiffers", function () {
        return KeyValueDiffers;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LOCALE_ID", function () {
        return LOCALE_ID$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MissingTranslationStrategy", function () {
        return MissingTranslationStrategy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ModuleWithComponentFactories", function () {
        return ModuleWithComponentFactories;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NO_ERRORS_SCHEMA", function () {
        return NO_ERRORS_SCHEMA;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgModule", function () {
        return NgModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgModuleFactory", function () {
        return NgModuleFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgModuleFactoryLoader", function () {
        return NgModuleFactoryLoader;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgModuleRef", function () {
        return NgModuleRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgProbeToken", function () {
        return NgProbeToken;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgZone", function () {
        return NgZone;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Optional", function () {
        return Optional;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Output", function () {
        return Output;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PACKAGE_ROOT_URL", function () {
        return PACKAGE_ROOT_URL;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PLATFORM_ID", function () {
        return PLATFORM_ID;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PLATFORM_INITIALIZER", function () {
        return PLATFORM_INITIALIZER;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Pipe", function () {
        return Pipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PlatformRef", function () {
        return PlatformRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Query", function () {
        return Query;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "QueryList", function () {
        return QueryList;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ReflectiveInjector", function () {
        return ReflectiveInjector;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ReflectiveKey", function () {
        return ReflectiveKey;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Renderer2", function () {
        return Renderer2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RendererFactory2", function () {
        return RendererFactory2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RendererStyleFlags2", function () {
        return RendererStyleFlags2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ResolvedReflectiveFactory", function () {
        return ResolvedReflectiveFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Sanitizer", function () {
        return Sanitizer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SecurityContext", function () {
        return SecurityContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Self", function () {
        return Self;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SimpleChange", function () {
        return SimpleChange;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SkipSelf", function () {
        return SkipSelf;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SystemJsNgModuleLoader", function () {
        return SystemJsNgModuleLoader;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SystemJsNgModuleLoaderConfig", function () {
        return SystemJsNgModuleLoaderConfig;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TRANSLATIONS", function () {
        return TRANSLATIONS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TRANSLATIONS_FORMAT", function () {
        return TRANSLATIONS_FORMAT;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TemplateRef", function () {
        return TemplateRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Testability", function () {
        return Testability;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TestabilityRegistry", function () {
        return TestabilityRegistry;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Type", function () {
        return Type;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VERSION", function () {
        return VERSION;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Version", function () {
        return Version;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ViewChild", function () {
        return ViewChild;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ViewChildren", function () {
        return ViewChildren;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ViewContainerRef", function () {
        return ViewContainerRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ViewEncapsulation", function () {
        return ViewEncapsulation;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ViewRef", function () {
        return ViewRef$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "WrappedValue", function () {
        return WrappedValue;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "asNativeElements", function () {
        return asNativeElements;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "assertPlatform", function () {
        return assertPlatform;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "createPlatform", function () {
        return createPlatform;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "createPlatformFactory", function () {
        return createPlatformFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "defineInjectable", function () {
        return defineInjectable;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "destroyPlatform", function () {
        return destroyPlatform;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "enableProdMode", function () {
        return enableProdMode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "forwardRef", function () {
        return forwardRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getDebugNode", function () {
        return getDebugNode$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getModuleFactory", function () {
        return getModuleFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getPlatform", function () {
        return getPlatform;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "inject", function () {
        return inject;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isDevMode", function () {
        return isDevMode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "platformCore", function () {
        return platformCore;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "resolveForwardRef", function () {
        return resolveForwardRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setTestabilityGetter", function () {
        return setTestabilityGetter;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵ0", function () {
        return ɵ0$2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵALLOW_MULTIPLE_PLATFORMS", function () {
        return ALLOW_MULTIPLE_PLATFORMS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵAPP_ID_RANDOM_PROVIDER", function () {
        return APP_ID_RANDOM_PROVIDER;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__", function () {
        return CREATE_ATTRIBUTE_DECORATOR__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵChangeDetectorStatus", function () {
        return ChangeDetectorStatus;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵCodegenComponentFactoryResolver", function () {
        return CodegenComponentFactoryResolver;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__", function () {
        return Compiler_compileModuleAndAllComponentsAsync__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__", function () {
        return Compiler_compileModuleAndAllComponentsSync__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleAsync__POST_R3__", function () {
        return Compiler_compileModuleAsync__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleSync__POST_R3__", function () {
        return Compiler_compileModuleSync__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵComponentFactory", function () {
        return ComponentFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵConsole", function () {
        return Console;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵDEFAULT_LOCALE_ID", function () {
        return DEFAULT_LOCALE_ID;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵEMPTY_ARRAY", function () {
        return EMPTY_ARRAY$4;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵEMPTY_MAP", function () {
        return EMPTY_MAP;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵINJECTOR_IMPL__POST_R3__", function () {
        return INJECTOR_IMPL__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵINJECTOR_SCOPE", function () {
        return INJECTOR_SCOPE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵLifecycleHooksFeature", function () {
        return LifecycleHooksFeature;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵLocaleDataIndex", function () {
        return LocaleDataIndex;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNG_COMP_DEF", function () {
        return NG_COMP_DEF;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNG_DIR_DEF", function () {
        return NG_DIR_DEF;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNG_ELEMENT_ID", function () {
        return NG_ELEMENT_ID;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNG_INJ_DEF", function () {
        return NG_INJ_DEF;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNG_MOD_DEF", function () {
        return NG_MOD_DEF;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNG_PIPE_DEF", function () {
        return NG_PIPE_DEF;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNG_PROV_DEF", function () {
        return NG_PROV_DEF;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR", function () {
        return NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNO_CHANGE", function () {
        return NO_CHANGE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNgModuleFactory", function () {
        return NgModuleFactory$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNoopNgZone", function () {
        return NoopNgZone;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵReflectionCapabilities", function () {
        return ReflectionCapabilities;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵRender3ComponentFactory", function () {
        return ComponentFactory$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵRender3ComponentRef", function () {
        return ComponentRef$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵRender3NgModuleRef", function () {
        return NgModuleRef$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__", function () {
        return SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_COMPONENT__POST_R3__", function () {
        return SWITCH_COMPILE_COMPONENT__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__", function () {
        return SWITCH_COMPILE_DIRECTIVE__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_INJECTABLE__POST_R3__", function () {
        return SWITCH_COMPILE_INJECTABLE__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_NGMODULE__POST_R3__", function () {
        return SWITCH_COMPILE_NGMODULE__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_PIPE__POST_R3__", function () {
        return SWITCH_COMPILE_PIPE__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__", function () {
        return SWITCH_ELEMENT_REF_FACTORY__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵSWITCH_IVY_ENABLED__POST_R3__", function () {
        return SWITCH_IVY_ENABLED__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵSWITCH_RENDERER2_FACTORY__POST_R3__", function () {
        return SWITCH_RENDERER2_FACTORY__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__", function () {
        return SWITCH_TEMPLATE_REF_FACTORY__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__", function () {
        return SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵ_sanitizeHtml", function () {
        return _sanitizeHtml;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵ_sanitizeUrl", function () {
        return _sanitizeUrl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵallowSanitizationBypassAndThrow", function () {
        return allowSanitizationBypassAndThrow;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵand", function () {
        return anchorDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_a", function () {
        return isForwardRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_b", function () {
        return injectInjectorOnly;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_ba", function () {
        return DebugContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bb", function () {
        return NgOnChangesFeatureImpl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bc", function () {
        return SCHEDULER;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bd", function () {
        return injectAttributeImpl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_be", function () {
        return getLView;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bf", function () {
        return getBindingRoot;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bg", function () {
        return nextContextImpl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bi", function () {
        return pureFunction1Internal;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bj", function () {
        return pureFunction2Internal;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bk", function () {
        return pureFunction3Internal;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bl", function () {
        return pureFunction4Internal;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bm", function () {
        return pureFunctionVInternal;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bn", function () {
        return getUrlSanitizer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bo", function () {
        return makePropDecorator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bp", function () {
        return makeParamDecorator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bq", function () {
        return getClosureSafeProperty;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_br", function () {
        return NullInjector;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bs", function () {
        return getInjectImplementation;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bu", function () {
        return getNativeByTNode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bw", function () {
        return getRootContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bx", function () {
        return i18nPostprocess;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_by", function () {
        return trustedHTMLFromString;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bz", function () {
        return trustedScriptURLFromString;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_c", function () {
        return ReflectiveInjector_;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_ca", function () {
        return trustedScriptFromString;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_d", function () {
        return ReflectiveDependency;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_e", function () {
        return resolveReflectiveProviders;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_f", function () {
        return _appIdRandomProviderFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_g", function () {
        return injectRenderer2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_h", function () {
        return injectElementRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_i", function () {
        return createElementRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_j", function () {
        return getModuleFactory__PRE_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_k", function () {
        return injectTemplateRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_l", function () {
        return createTemplateRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_m", function () {
        return injectViewContainerRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_n", function () {
        return DebugNode__PRE_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_o", function () {
        return DebugElement__PRE_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_p", function () {
        return getDebugNodeR2__PRE_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_q", function () {
        return injectChangeDetectorRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_r", function () {
        return DefaultIterableDifferFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_s", function () {
        return DefaultKeyValueDifferFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_t", function () {
        return _iterableDiffersFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_u", function () {
        return _keyValueDiffersFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_v", function () {
        return _localeFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_w", function () {
        return APPLICATION_MODULE_PROVIDERS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_x", function () {
        return zoneSchedulerFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_y", function () {
        return USD_CURRENCY_CODE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_z", function () {
        return _def;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustHtml", function () {
        return bypassSanitizationTrustHtml;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustResourceUrl", function () {
        return bypassSanitizationTrustResourceUrl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustScript", function () {
        return bypassSanitizationTrustScript;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustStyle", function () {
        return bypassSanitizationTrustStyle;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustUrl", function () {
        return bypassSanitizationTrustUrl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵccf", function () {
        return createComponentFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵclearOverrides", function () {
        return clearOverrides;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵclearResolutionOfComponentResourcesQueue", function () {
        return clearResolutionOfComponentResourcesQueue;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵcmf", function () {
        return createNgModuleFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵcompileComponent", function () {
        return compileComponent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵcompileDirective", function () {
        return compileDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵcompileNgModule", function () {
        return compileNgModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵcompileNgModuleDefs", function () {
        return compileNgModuleDefs;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵcompileNgModuleFactory__POST_R3__", function () {
        return compileNgModuleFactory__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵcompilePipe", function () {
        return compilePipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵcreateInjector", function () {
        return createInjector;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵcrt", function () {
        return createRendererType2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵdefaultIterableDiffers", function () {
        return defaultIterableDiffers;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵdefaultKeyValueDiffers", function () {
        return defaultKeyValueDiffers;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵdetectChanges", function () {
        return detectChanges;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵdevModeEqual", function () {
        return devModeEqual;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵdid", function () {
        return directiveDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵeld", function () {
        return elementDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵfindLocaleData", function () {
        return findLocaleData;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵflushModuleScopingQueueAsMuchAsPossible", function () {
        return flushModuleScopingQueueAsMuchAsPossible;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵgetComponentViewDefinitionFactory", function () {
        return getComponentViewDefinitionFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵgetDebugNodeR2", function () {
        return getDebugNodeR2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵgetDebugNode__POST_R3__", function () {
        return getDebugNode__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵgetDirectives", function () {
        return getDirectives;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵgetHostElement", function () {
        return getHostElement;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵgetInjectableDef", function () {
        return getInjectableDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵgetLContext", function () {
        return getLContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵgetLocaleCurrencyCode", function () {
        return getLocaleCurrencyCode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵgetLocalePluralCase", function () {
        return getLocalePluralCase;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵgetModuleFactory__POST_R3__", function () {
        return getModuleFactory__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵgetSanitizationBypassType", function () {
        return getSanitizationBypassType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵglobal", function () {
        return _global;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵinitServicesIfNeeded", function () {
        return initServicesIfNeeded;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵinlineInterpolate", function () {
        return inlineInterpolate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵinterpolate", function () {
        return interpolate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵisBoundToModule__POST_R3__", function () {
        return isBoundToModule__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵisDefaultChangeDetectionStrategy", function () {
        return isDefaultChangeDetectionStrategy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵisListLikeIterable", function () {
        return isListLikeIterable;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵisObservable", function () {
        return isObservable;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵisPromise", function () {
        return isPromise;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵivyEnabled", function () {
        return ivyEnabled;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵmakeDecorator", function () {
        return makeDecorator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵmarkDirty", function () {
        return markDirty;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵmod", function () {
        return moduleDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵmpd", function () {
        return moduleProvideDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵncd", function () {
        return ngContentDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵnoSideEffects", function () {
        return noSideEffects;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵnov", function () {
        return nodeValue;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵoverrideComponentView", function () {
        return overrideComponentView;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵoverrideProvider", function () {
        return overrideProvider;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵpad", function () {
        return pureArrayDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵpatchComponentDefWithScope", function () {
        return patchComponentDefWithScope;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵpid", function () {
        return pipeDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵpod", function () {
        return pureObjectDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵppd", function () {
        return purePipeDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵprd", function () {
        return providerDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵpublishDefaultGlobalUtils", function () {
        return publishDefaultGlobalUtils;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵpublishGlobalUtil", function () {
        return publishGlobalUtil;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵqud", function () {
        return queryDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵregisterLocaleData", function () {
        return registerLocaleData;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵregisterModuleFactory", function () {
        return registerModuleFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵregisterNgModuleType", function () {
        return registerNgModuleType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵrenderComponent", function () {
        return renderComponent$1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵresetCompiledComponents", function () {
        return resetCompiledComponents;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵresetJitOptions", function () {
        return resetJitOptions;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵresolveComponentResources", function () {
        return resolveComponentResources;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵsetClassMetadata", function () {
        return setClassMetadata;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵsetCurrentInjector", function () {
        return setCurrentInjector;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵsetDocument", function () {
        return setDocument;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵsetLocaleId", function () {
        return setLocaleId;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵstore", function () {
        return store;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵstringify", function () {
        return stringify;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵted", function () {
        return textDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵtransitiveScopesFor", function () {
        return transitiveScopesFor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵunregisterLocaleData", function () {
        return unregisterAllLocaleData;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵunv", function () {
        return unwrapValue;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵunwrapSafeValue", function () {
        return unwrapSafeValue;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵvid", function () {
        return viewDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵwhenRendered", function () {
        return whenRendered;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵCopyDefinitionFeature", function () {
        return ɵɵCopyDefinitionFeature;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵInheritDefinitionFeature", function () {
        return ɵɵInheritDefinitionFeature;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵNgOnChangesFeature", function () {
        return ɵɵNgOnChangesFeature;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵProvidersFeature", function () {
        return ɵɵProvidersFeature;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵadvance", function () {
        return ɵɵadvance;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵattribute", function () {
        return ɵɵattribute;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate1", function () {
        return ɵɵattributeInterpolate1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate2", function () {
        return ɵɵattributeInterpolate2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate3", function () {
        return ɵɵattributeInterpolate3;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate4", function () {
        return ɵɵattributeInterpolate4;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate5", function () {
        return ɵɵattributeInterpolate5;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate6", function () {
        return ɵɵattributeInterpolate6;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate7", function () {
        return ɵɵattributeInterpolate7;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate8", function () {
        return ɵɵattributeInterpolate8;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolateV", function () {
        return ɵɵattributeInterpolateV;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵclassMap", function () {
        return ɵɵclassMap;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate1", function () {
        return ɵɵclassMapInterpolate1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate2", function () {
        return ɵɵclassMapInterpolate2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate3", function () {
        return ɵɵclassMapInterpolate3;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate4", function () {
        return ɵɵclassMapInterpolate4;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate5", function () {
        return ɵɵclassMapInterpolate5;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate6", function () {
        return ɵɵclassMapInterpolate6;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate7", function () {
        return ɵɵclassMapInterpolate7;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate8", function () {
        return ɵɵclassMapInterpolate8;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolateV", function () {
        return ɵɵclassMapInterpolateV;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵclassProp", function () {
        return ɵɵclassProp;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵcontentQuery", function () {
        return ɵɵcontentQuery;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵdefineComponent", function () {
        return ɵɵdefineComponent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵdefineDirective", function () {
        return ɵɵdefineDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵdefineInjectable", function () {
        return ɵɵdefineInjectable;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵdefineInjector", function () {
        return ɵɵdefineInjector;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵdefineNgModule", function () {
        return ɵɵdefineNgModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵdefinePipe", function () {
        return ɵɵdefinePipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵdirectiveInject", function () {
        return ɵɵdirectiveInject;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵdisableBindings", function () {
        return ɵɵdisableBindings;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵelement", function () {
        return ɵɵelement;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵelementContainer", function () {
        return ɵɵelementContainer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵelementContainerEnd", function () {
        return ɵɵelementContainerEnd;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵelementContainerStart", function () {
        return ɵɵelementContainerStart;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵelementEnd", function () {
        return ɵɵelementEnd;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵelementStart", function () {
        return ɵɵelementStart;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵenableBindings", function () {
        return ɵɵenableBindings;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵgetCurrentView", function () {
        return ɵɵgetCurrentView;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵgetFactoryOf", function () {
        return ɵɵgetFactoryOf;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵgetInheritedFactory", function () {
        return ɵɵgetInheritedFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵhostProperty", function () {
        return ɵɵhostProperty;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵi18n", function () {
        return ɵɵi18n;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵi18nApply", function () {
        return ɵɵi18nApply;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵi18nAttributes", function () {
        return ɵɵi18nAttributes;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵi18nEnd", function () {
        return ɵɵi18nEnd;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵi18nExp", function () {
        return ɵɵi18nExp;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵi18nPostprocess", function () {
        return ɵɵi18nPostprocess;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵi18nStart", function () {
        return ɵɵi18nStart;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵinject", function () {
        return ɵɵinject;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵinjectAttribute", function () {
        return ɵɵinjectAttribute;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵinjectPipeChangeDetectorRef", function () {
        return ɵɵinjectPipeChangeDetectorRef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵinvalidFactory", function () {
        return ɵɵinvalidFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵinvalidFactoryDep", function () {
        return ɵɵinvalidFactoryDep;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵlistener", function () {
        return ɵɵlistener;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵloadQuery", function () {
        return ɵɵloadQuery;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵnamespaceHTML", function () {
        return ɵɵnamespaceHTML;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵnamespaceMathML", function () {
        return ɵɵnamespaceMathML;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵnamespaceSVG", function () {
        return ɵɵnamespaceSVG;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵnextContext", function () {
        return ɵɵnextContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpipe", function () {
        return ɵɵpipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind1", function () {
        return ɵɵpipeBind1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind2", function () {
        return ɵɵpipeBind2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind3", function () {
        return ɵɵpipeBind3;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind4", function () {
        return ɵɵpipeBind4;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpipeBindV", function () {
        return ɵɵpipeBindV;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵprojection", function () {
        return ɵɵprojection;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵprojectionDef", function () {
        return ɵɵprojectionDef;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵproperty", function () {
        return ɵɵproperty;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate", function () {
        return ɵɵpropertyInterpolate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate1", function () {
        return ɵɵpropertyInterpolate1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate2", function () {
        return ɵɵpropertyInterpolate2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate3", function () {
        return ɵɵpropertyInterpolate3;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate4", function () {
        return ɵɵpropertyInterpolate4;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate5", function () {
        return ɵɵpropertyInterpolate5;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate6", function () {
        return ɵɵpropertyInterpolate6;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate7", function () {
        return ɵɵpropertyInterpolate7;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate8", function () {
        return ɵɵpropertyInterpolate8;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolateV", function () {
        return ɵɵpropertyInterpolateV;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction0", function () {
        return ɵɵpureFunction0;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction1", function () {
        return ɵɵpureFunction1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction2", function () {
        return ɵɵpureFunction2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction3", function () {
        return ɵɵpureFunction3;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction4", function () {
        return ɵɵpureFunction4;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction5", function () {
        return ɵɵpureFunction5;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction6", function () {
        return ɵɵpureFunction6;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction7", function () {
        return ɵɵpureFunction7;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction8", function () {
        return ɵɵpureFunction8;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵpureFunctionV", function () {
        return ɵɵpureFunctionV;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵqueryRefresh", function () {
        return ɵɵqueryRefresh;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵreference", function () {
        return ɵɵreference;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵresolveBody", function () {
        return ɵɵresolveBody;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵresolveDocument", function () {
        return ɵɵresolveDocument;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵresolveWindow", function () {
        return ɵɵresolveWindow;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵrestoreView", function () {
        return ɵɵrestoreView;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeHtml", function () {
        return ɵɵsanitizeHtml;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeResourceUrl", function () {
        return ɵɵsanitizeResourceUrl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeScript", function () {
        return ɵɵsanitizeScript;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeStyle", function () {
        return ɵɵsanitizeStyle;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeUrl", function () {
        return ɵɵsanitizeUrl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeUrlOrResourceUrl", function () {
        return ɵɵsanitizeUrlOrResourceUrl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵsetComponentScope", function () {
        return ɵɵsetComponentScope;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵsetNgModuleScope", function () {
        return ɵɵsetNgModuleScope;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstaticContentQuery", function () {
        return ɵɵstaticContentQuery;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstaticViewQuery", function () {
        return ɵɵstaticViewQuery;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstyleMap", function () {
        return ɵɵstyleMap;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate1", function () {
        return ɵɵstyleMapInterpolate1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate2", function () {
        return ɵɵstyleMapInterpolate2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate3", function () {
        return ɵɵstyleMapInterpolate3;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate4", function () {
        return ɵɵstyleMapInterpolate4;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate5", function () {
        return ɵɵstyleMapInterpolate5;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate6", function () {
        return ɵɵstyleMapInterpolate6;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate7", function () {
        return ɵɵstyleMapInterpolate7;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate8", function () {
        return ɵɵstyleMapInterpolate8;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolateV", function () {
        return ɵɵstyleMapInterpolateV;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstyleProp", function () {
        return ɵɵstyleProp;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate1", function () {
        return ɵɵstylePropInterpolate1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate2", function () {
        return ɵɵstylePropInterpolate2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate3", function () {
        return ɵɵstylePropInterpolate3;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate4", function () {
        return ɵɵstylePropInterpolate4;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate5", function () {
        return ɵɵstylePropInterpolate5;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate6", function () {
        return ɵɵstylePropInterpolate6;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate7", function () {
        return ɵɵstylePropInterpolate7;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate8", function () {
        return ɵɵstylePropInterpolate8;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolateV", function () {
        return ɵɵstylePropInterpolateV;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵsyntheticHostListener", function () {
        return ɵɵsyntheticHostListener;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵsyntheticHostProperty", function () {
        return ɵɵsyntheticHostProperty;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtemplate", function () {
        return ɵɵtemplate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtemplateRefExtractor", function () {
        return ɵɵtemplateRefExtractor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtext", function () {
        return ɵɵtext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate", function () {
        return ɵɵtextInterpolate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate1", function () {
        return ɵɵtextInterpolate1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate2", function () {
        return ɵɵtextInterpolate2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate3", function () {
        return ɵɵtextInterpolate3;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate4", function () {
        return ɵɵtextInterpolate4;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate5", function () {
        return ɵɵtextInterpolate5;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate6", function () {
        return ɵɵtextInterpolate6;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate7", function () {
        return ɵɵtextInterpolate7;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate8", function () {
        return ɵɵtextInterpolate8;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolateV", function () {
        return ɵɵtextInterpolateV;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtrustConstantHtml", function () {
        return ɵɵtrustConstantHtml;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtrustConstantResourceUrl", function () {
        return ɵɵtrustConstantResourceUrl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵtrustConstantScript", function () {
        return ɵɵtrustConstantScript;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵɵviewQuery", function () {
        return ɵɵviewQuery;
      });
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! rxjs */
      "qCKp");
      /* harmony import */


      var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! rxjs/operators */
      "kU1M");
      /**
       * @license Angular v11.0.9
       * (c) 2010-2020 Google LLC. https://angular.io/
       * License: MIT
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function getClosureSafeProperty(objWithPropertyToExtract) {
        for (var key in objWithPropertyToExtract) {
          if (objWithPropertyToExtract[key] === getClosureSafeProperty) {
            return key;
          }
        }

        throw Error('Could not find renamed property on target object.');
      }
      /**
       * Sets properties on a target object from a source object, but only if
       * the property doesn't already exist on the target object.
       * @param target The target to set properties on
       * @param source The source of the property keys and values to set
       */


      function fillProperties(target, source) {
        for (var key in source) {
          if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {
            target[key] = source[key];
          }
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function stringify(token) {
        if (typeof token === 'string') {
          return token;
        }

        if (Array.isArray(token)) {
          return '[' + token.map(stringify).join(', ') + ']';
        }

        if (token == null) {
          return '' + token;
        }

        if (token.overriddenName) {
          return "".concat(token.overriddenName);
        }

        if (token.name) {
          return "".concat(token.name);
        }

        var res = token.toString();

        if (res == null) {
          return '' + res;
        }

        var newLineIndex = res.indexOf('\n');
        return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
      }
      /**
       * Concatenates two strings with separator, allocating new strings only when necessary.
       *
       * @param before before string.
       * @param separator separator string.
       * @param after after string.
       * @returns concatenated string.
       */


      function concatStringsWithSpace(before, after) {
        return before == null || before === '' ? after === null ? '' : after : after == null || after === '' ? before : before + ' ' + after;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var __forward_ref__ = getClosureSafeProperty({
        __forward_ref__: getClosureSafeProperty
      });
      /**
       * Allows to refer to references which are not yet defined.
       *
       * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
       * DI is declared, but not yet defined. It is also used when the `token` which we use when creating
       * a query is not yet defined.
       *
       * @usageNotes
       * ### Example
       * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
       * @publicApi
       */


      function forwardRef(forwardRefFn) {
        forwardRefFn.__forward_ref__ = forwardRef;

        forwardRefFn.toString = function () {
          return stringify(this());
        };

        return forwardRefFn;
      }
      /**
       * Lazily retrieves the reference value from a forwardRef.
       *
       * Acts as the identity function when given a non-forward-ref value.
       *
       * @usageNotes
       * ### Example
       *
       * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
       *
       * @see `forwardRef`
       * @publicApi
       */


      function resolveForwardRef(type) {
        return isForwardRef(type) ? type() : type;
      }
      /** Checks whether a function is wrapped by a `forwardRef`. */


      function isForwardRef(fn) {
        return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) && fn.__forward_ref__ === forwardRef;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function assertNumber(actual, msg) {
        if (!(typeof actual === 'number')) {
          throwError(msg, typeof actual, 'number', '===');
        }
      }

      function assertNumberInRange(actual, minInclusive, maxInclusive) {
        assertNumber(actual, 'Expected a number');
        assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');
        assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');
      }

      function assertString(actual, msg) {
        if (!(typeof actual === 'string')) {
          throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');
        }
      }

      function assertFunction(actual, msg) {
        if (!(typeof actual === 'function')) {
          throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');
        }
      }

      function assertEqual(actual, expected, msg) {
        if (!(actual == expected)) {
          throwError(msg, actual, expected, '==');
        }
      }

      function assertNotEqual(actual, expected, msg) {
        if (!(actual != expected)) {
          throwError(msg, actual, expected, '!=');
        }
      }

      function assertSame(actual, expected, msg) {
        if (!(actual === expected)) {
          throwError(msg, actual, expected, '===');
        }
      }

      function assertNotSame(actual, expected, msg) {
        if (!(actual !== expected)) {
          throwError(msg, actual, expected, '!==');
        }
      }

      function assertLessThan(actual, expected, msg) {
        if (!(actual < expected)) {
          throwError(msg, actual, expected, '<');
        }
      }

      function assertLessThanOrEqual(actual, expected, msg) {
        if (!(actual <= expected)) {
          throwError(msg, actual, expected, '<=');
        }
      }

      function assertGreaterThan(actual, expected, msg) {
        if (!(actual > expected)) {
          throwError(msg, actual, expected, '>');
        }
      }

      function assertGreaterThanOrEqual(actual, expected, msg) {
        if (!(actual >= expected)) {
          throwError(msg, actual, expected, '>=');
        }
      }

      function assertNotDefined(actual, msg) {
        if (actual != null) {
          throwError(msg, actual, null, '==');
        }
      }

      function assertDefined(actual, msg) {
        if (actual == null) {
          throwError(msg, actual, null, '!=');
        }
      }

      function throwError(msg, actual, expected, comparison) {
        throw new Error("ASSERTION ERROR: ".concat(msg) + (comparison == null ? '' : " [Expected=> ".concat(expected, " ").concat(comparison, " ").concat(actual, " <=Actual]")));
      }

      function assertDomNode(node) {
        // If we're in a worker, `Node` will not be defined.
        if (!(typeof Node !== 'undefined' && node instanceof Node) && !(typeof node === 'object' && node != null && node.constructor.name === 'WebWorkerRenderNode')) {
          throwError("The provided value must be an instance of a DOM Node but got ".concat(stringify(node)));
        }
      }

      function assertIndexInRange(arr, index) {
        assertDefined(arr, 'Array must be defined.');
        var maxLen = arr.length;

        if (index < 0 || index >= maxLen) {
          throwError("Index expected to be less than ".concat(maxLen, " but got ").concat(index));
        }
      }

      function assertOneOf(value) {
        for (var _len32 = arguments.length, validValues = new Array(_len32 > 1 ? _len32 - 1 : 0), _key33 = 1; _key33 < _len32; _key33++) {
          validValues[_key33 - 1] = arguments[_key33];
        }

        if (validValues.indexOf(value) !== -1) return true;
        throwError("Expected value to be one of ".concat(JSON.stringify(validValues), " but was ").concat(JSON.stringify(value), "."));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Construct an `InjectableDef` which defines how a token will be constructed by the DI system, and
       * in which injectors (if any) it will be available.
       *
       * This should be assigned to a static `ɵprov` field on a type, which will then be an
       * `InjectableType`.
       *
       * Options:
       * * `providedIn` determines which injectors will include the injectable, by either associating it
       *   with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be
       *   provided in the `'root'` injector, which will be the application-level injector in most apps.
       * * `factory` gives the zero argument function which will create an instance of the injectable.
       *   The factory can call `inject` to access the `Injector` and request injection of dependencies.
       *
       * @codeGenApi
       * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
       */


      function ɵɵdefineInjectable(opts) {
        return {
          token: opts.token,
          providedIn: opts.providedIn || null,
          factory: opts.factory,
          value: undefined
        };
      }
      /**
       * @deprecated in v8, delete after v10. This API should be used only by generated code, and that
       * code should now use ɵɵdefineInjectable instead.
       * @publicApi
       */


      var defineInjectable = ɵɵdefineInjectable;
      /**
       * Construct an `InjectorDef` which configures an injector.
       *
       * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an
       * `InjectorType`.
       *
       * Options:
       *
       * * `factory`: an `InjectorType` is an instantiable type, so a zero argument `factory` function to
       *   create the type must be provided. If that factory function needs to inject arguments, it can
       *   use the `inject` function.
       * * `providers`: an optional array of providers to add to the injector. Each provider must
       *   either have a factory or point to a type which has a `ɵprov` static property (the
       *   type must be an `InjectableType`).
       * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s
       *   whose providers will also be added to the injector. Locally provided types will override
       *   providers from imports.
       *
       * @codeGenApi
       */

      function ɵɵdefineInjector(options) {
        return {
          factory: options.factory,
          providers: options.providers || [],
          imports: options.imports || []
        };
      }
      /**
       * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading
       * inherited value.
       *
       * @param type A type which may have its own (non-inherited) `ɵprov`.
       */


      function getInjectableDef(type) {
        return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);
      }
      /**
       * Return definition only if it is defined directly on `type` and is not inherited from a base
       * class of `type`.
       */


      function getOwnDefinition(type, field) {
        return type.hasOwnProperty(field) ? type[field] : null;
      }
      /**
       * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.
       *
       * @param type A type which may have `ɵprov`, via inheritance.
       *
       * @deprecated Will be removed in a future version of Angular, where an error will occur in the
       *     scenario if we find the `ɵprov` on an ancestor only.
       */


      function getInheritedInjectableDef(type) {
        var def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);

        if (def) {
          var typeName = getTypeName(type); // TODO(FW-1307): Re-add ngDevMode when closure can handle it
          // ngDevMode &&

          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."));
          return def;
        } else {
          return null;
        }
      }
      /** Gets the name of a type, accounting for some cross-browser differences. */


      function getTypeName(type) {
        // `Function.prototype.name` behaves differently between IE and other browsers. In most browsers
        // it'll always return the name of the function itself, no matter how many other functions it
        // inherits from. On IE the function doesn't have its own `name` property, but it takes it from
        // the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most
        // browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around
        // the issue by converting the function to a string and parsing its name out that way via a regex.
        if (type.hasOwnProperty('name')) {
          return type.name;
        }

        var match = ('' + type).match(/^function\s*([^\s(]+)/);
        return match === null ? '' : match[1];
      }
      /**
       * Read the injector def type in a way which is immune to accidentally reading inherited value.
       *
       * @param type type which may have an injector def (`ɵinj`)
       */


      function getInjectorDef(type) {
        return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ? type[NG_INJ_DEF] : null;
      }

      var NG_PROV_DEF = getClosureSafeProperty({
        ɵprov: getClosureSafeProperty
      });
      var NG_INJ_DEF = getClosureSafeProperty({
        ɵinj: getClosureSafeProperty
      }); // We need to keep these around so we can read off old defs if new defs are unavailable

      var NG_INJECTABLE_DEF = getClosureSafeProperty({
        ngInjectableDef: getClosureSafeProperty
      });
      var NG_INJECTOR_DEF = getClosureSafeProperty({
        ngInjectorDef: getClosureSafeProperty
      });
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Injection flags for DI.
       *
       * @publicApi
       */

      var InjectFlags;

      (function (InjectFlags) {
        // TODO(alxhub): make this 'const' when ngc no longer writes exports of it into ngfactory files.

        /** Check self and check parent injector if needed */
        InjectFlags[InjectFlags["Default"] = 0] = "Default";
        /**
         * Specifies that an injector should retrieve a dependency from any injector until reaching the
         * host element of the current component. (Only used with Element Injector)
         */

        InjectFlags[InjectFlags["Host"] = 1] = "Host";
        /** Don't ascend to ancestors of the node requesting injection. */

        InjectFlags[InjectFlags["Self"] = 2] = "Self";
        /** Skip the node that is requesting injection. */

        InjectFlags[InjectFlags["SkipSelf"] = 4] = "SkipSelf";
        /** Inject `defaultValue` instead if token not found. */

        InjectFlags[InjectFlags["Optional"] = 8] = "Optional";
      })(InjectFlags || (InjectFlags = {}));
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Current implementation of inject.
       *
       * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed
       * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this
       * way for two reasons:
       *  1. `Injector` should not depend on ivy logic.
       *  2. To maintain tree shake-ability we don't want to bring in unnecessary code.
       */


      var _injectImplementation;

      function getInjectImplementation() {
        return _injectImplementation;
      }
      /**
       * Sets the current inject implementation.
       */


      function setInjectImplementation(impl) {
        var previous = _injectImplementation;
        _injectImplementation = impl;
        return previous;
      }
      /**
       * Injects `root` tokens in limp mode.
       *
       * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to
       * `"root"`. This is known as the limp mode injection. In such case the value is stored in the
       * `InjectableDef`.
       */


      function injectRootLimpMode(token, notFoundValue, flags) {
        var injectableDef = getInjectableDef(token);

        if (injectableDef && injectableDef.providedIn == 'root') {
          return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() : injectableDef.value;
        }

        if (flags & InjectFlags.Optional) return null;
        if (notFoundValue !== undefined) return notFoundValue;
        throw new Error("Injector: NOT_FOUND [".concat(stringify(token), "]"));
      }
      /**
       * Assert that `_injectImplementation` is not `fn`.
       *
       * This is useful, to prevent infinite recursion.
       *
       * @param fn Function which it should not equal to
       */


      function assertInjectImplementationNotEqual(fn) {
        ngDevMode && assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Convince closure compiler that the wrapped function has no side-effects.
       *
       * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to
       * allow us to execute a function but have closure compiler mark the call as no-side-effects.
       * It is important that the return value for the `noSideEffects` function be assigned
       * to something which is retained otherwise the call to `noSideEffects` will be removed by closure
       * compiler.
       */


      function noSideEffects(fn) {
        return {
          toString: fn
        }.toString();
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * The strategy that the default change detector uses to detect changes.
       * When set, takes effect the next time change detection is triggered.
       *
       * @see {@link ChangeDetectorRef#usage-notes Change detection usage}
       *
       * @publicApi
       */


      var ChangeDetectionStrategy;

      (function (ChangeDetectionStrategy) {
        /**
         * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated
         * until reactivated by setting the strategy to `Default` (`CheckAlways`).
         * Change detection can still be explicitly invoked.
         * This strategy applies to all child directives and cannot be overridden.
         */
        ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush";
        /**
         * Use the default `CheckAlways` strategy, in which change detection is automatic until
         * explicitly deactivated.
         */

        ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
      })(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));
      /**
       * Defines the possible states of the default change detector.
       * @see `ChangeDetectorRef`
       */


      var ChangeDetectorStatus;

      (function (ChangeDetectorStatus) {
        /**
         * A state in which, after calling `detectChanges()`, the change detector
         * state becomes `Checked`, and must be explicitly invoked or reactivated.
         */
        ChangeDetectorStatus[ChangeDetectorStatus["CheckOnce"] = 0] = "CheckOnce";
        /**
         * A state in which change detection is skipped until the change detector mode
         * becomes `CheckOnce`.
         */

        ChangeDetectorStatus[ChangeDetectorStatus["Checked"] = 1] = "Checked";
        /**
         * A state in which change detection continues automatically until explicitly
         * deactivated.
         */

        ChangeDetectorStatus[ChangeDetectorStatus["CheckAlways"] = 2] = "CheckAlways";
        /**
         * A state in which a change detector sub tree is not a part of the main tree and
         * should be skipped.
         */

        ChangeDetectorStatus[ChangeDetectorStatus["Detached"] = 3] = "Detached";
        /**
         * Indicates that the change detector encountered an error checking a binding
         * or calling a directive lifecycle method and is now in an inconsistent state. Change
         * detectors in this state do not detect changes.
         */

        ChangeDetectorStatus[ChangeDetectorStatus["Errored"] = 4] = "Errored";
        /**
         * Indicates that the change detector has been destroyed.
         */

        ChangeDetectorStatus[ChangeDetectorStatus["Destroyed"] = 5] = "Destroyed";
      })(ChangeDetectorStatus || (ChangeDetectorStatus = {}));
      /**
       * Reports whether a given strategy is currently the default for change detection.
       * @param changeDetectionStrategy The strategy to check.
       * @returns True if the given strategy is the current default, false otherwise.
       * @see `ChangeDetectorStatus`
       * @see `ChangeDetectorRef`
       */


      function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {
        return changeDetectionStrategy == null || changeDetectionStrategy === ChangeDetectionStrategy.Default;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Defines template and style encapsulation options available for Component's {@link Component}.
       *
       * See {@link Component#encapsulation encapsulation}.
       *
       * @usageNotes
       * ### Example
       *
       * {@example core/ts/metadata/encapsulation.ts region='longform'}
       *
       * @publicApi
       */


      var ViewEncapsulation;

      (function (ViewEncapsulation) {
        /**
         * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
         * Element and pre-processing the style rules provided via {@link Component#styles styles} or
         * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all
         * selectors.
         *
         * This is the default option.
         */
        ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated"; // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.

        /**
         * Don't provide any template or style encapsulation.
         */

        ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None";
        /**
         * Use Shadow DOM to encapsulate styles.
         *
         * For the DOM this means using modern [Shadow
         * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
         * creating a ShadowRoot for Component's Host Element.
         */

        ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom";
      })(ViewEncapsulation || (ViewEncapsulation = {}));
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var __globalThis = typeof globalThis !== 'undefined' && globalThis;

      var __window = typeof window !== 'undefined' && window;

      var __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && self;

      var __global = typeof global !== 'undefined' && global; // Always use __globalThis if available, which is the spec-defined global variable across all
      // environments, then fallback to __global first, because in Node tests both __global and
      // __window may be defined and _global should be __global in that case.


      var _global = __globalThis || __global || __window || __self;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function ngDevModeResetPerfCounters() {
        var locationString = typeof location !== 'undefined' ? location.toString() : '';
        var newCounters = {
          namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,
          firstCreatePass: 0,
          tNode: 0,
          tView: 0,
          rendererCreateTextNode: 0,
          rendererSetText: 0,
          rendererCreateElement: 0,
          rendererAddEventListener: 0,
          rendererSetAttribute: 0,
          rendererRemoveAttribute: 0,
          rendererSetProperty: 0,
          rendererSetClassName: 0,
          rendererAddClass: 0,
          rendererRemoveClass: 0,
          rendererSetStyle: 0,
          rendererRemoveStyle: 0,
          rendererDestroy: 0,
          rendererDestroyNode: 0,
          rendererMoveNode: 0,
          rendererRemoveNode: 0,
          rendererAppendChild: 0,
          rendererInsertBefore: 0,
          rendererCreateComment: 0
        }; // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.

        var allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;
        _global['ngDevMode'] = allowNgDevModeTrue && newCounters;
        return newCounters;
      }
      /**
       * This function checks to see if the `ngDevMode` has been set. If yes,
       * then we honor it, otherwise we default to dev mode with additional checks.
       *
       * The idea is that unless we are doing production build where we explicitly
       * set `ngDevMode == false` we should be helping the developer by providing
       * as much early warning and errors as possible.
       *
       * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions
       * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode
       * is defined for the entire instruction set.
       *
       * When checking `ngDevMode` on toplevel, always init it before referencing it
       * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can
       *  get a `ReferenceError` like in https://github.com/angular/angular/issues/31595.
       *
       * Details on possible values for `ngDevMode` can be found on its docstring.
       *
       * NOTE:
       * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.
       */


      function initNgDevMode() {
        // The below checks are to ensure that calling `initNgDevMode` multiple times does not
        // reset the counters.
        // If the `ngDevMode` is not an object, then it means we have not created the perf counters
        // yet.
        if (typeof ngDevMode === 'undefined' || ngDevMode) {
          if (typeof ngDevMode !== 'object') {
            ngDevModeResetPerfCounters();
          }

          return typeof ngDevMode !== 'undefined' && !!ngDevMode;
        }

        return false;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * This file contains reuseable "empty" symbols that can be used as default return values
       * in different parts of the rendering code. Because the same symbols are returned, this
       * allows for identity checks against these values to be consistently used by the framework
       * code.
       */


      var EMPTY_OBJ = {};
      var EMPTY_ARRAY = []; // freezing the values prevents any code from accidentally inserting new values in

      if ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) {
        // These property accesses can be ignored because ngDevMode will be set to false
        // when optimizing code and the whole if statement will be dropped.
        // tslint:disable-next-line:no-toplevel-property-access
        Object.freeze(EMPTY_OBJ); // tslint:disable-next-line:no-toplevel-property-access

        Object.freeze(EMPTY_ARRAY);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var NG_COMP_DEF = getClosureSafeProperty({
        ɵcmp: getClosureSafeProperty
      });
      var NG_DIR_DEF = getClosureSafeProperty({
        ɵdir: getClosureSafeProperty
      });
      var NG_PIPE_DEF = getClosureSafeProperty({
        ɵpipe: getClosureSafeProperty
      });
      var NG_MOD_DEF = getClosureSafeProperty({
        ɵmod: getClosureSafeProperty
      });
      var NG_LOC_ID_DEF = getClosureSafeProperty({
        ɵloc: getClosureSafeProperty
      });
      var NG_FACTORY_DEF = getClosureSafeProperty({
        ɵfac: getClosureSafeProperty
      });
      /**
       * If a directive is diPublic, bloomAdd sets a property on the type with this constant as
       * the key and the directive's unique ID as the value. This allows us to map directives to their
       * bloom filter bit for DI.
       */
      // TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.

      var NG_ELEMENT_ID = getClosureSafeProperty({
        __NG_ELEMENT_ID__: getClosureSafeProperty
      });
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var _renderCompCount = 0;
      /**
       * Create a component definition object.
       *
       *
       * # Example
       * ```
       * class MyDirective {
       *   // Generated by Angular Template Compiler
       *   // [Symbol] syntax will not be supported by TypeScript until v2.7
       *   static ɵcmp = defineComponent({
       *     ...
       *   });
       * }
       * ```
       * @codeGenApi
       */

      function ɵɵdefineComponent(componentDefinition) {
        return noSideEffects(function () {
          // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.
          // See the `initNgDevMode` docstring for more information.
          (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();
          var type = componentDefinition.type;
          var typePrototype = type.prototype;
          var declaredInputs = {};
          var def = {
            type: type,
            providersResolver: null,
            decls: componentDefinition.decls,
            vars: componentDefinition.vars,
            factory: null,
            template: componentDefinition.template || null,
            consts: componentDefinition.consts || null,
            ngContentSelectors: componentDefinition.ngContentSelectors,
            hostBindings: componentDefinition.hostBindings || null,
            hostVars: componentDefinition.hostVars || 0,
            hostAttrs: componentDefinition.hostAttrs || null,
            contentQueries: componentDefinition.contentQueries || null,
            declaredInputs: declaredInputs,
            inputs: null,
            outputs: null,
            exportAs: componentDefinition.exportAs || null,
            onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,
            directiveDefs: null,
            pipeDefs: null,
            selectors: componentDefinition.selectors || EMPTY_ARRAY,
            viewQuery: componentDefinition.viewQuery || null,
            features: componentDefinition.features || null,
            data: componentDefinition.data || {},
            // TODO(misko): convert ViewEncapsulation into const enum so that it can be used
            // directly in the next line. Also `None` should be 0 not 2.
            encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,
            id: 'c',
            styles: componentDefinition.styles || EMPTY_ARRAY,
            _: null,
            setInput: null,
            schemas: componentDefinition.schemas || null,
            tView: null
          };
          var directiveTypes = componentDefinition.directives;
          var feature = componentDefinition.features;
          var pipeTypes = componentDefinition.pipes;
          def.id += _renderCompCount++;
          def.inputs = invertObject(componentDefinition.inputs, declaredInputs), def.outputs = invertObject(componentDefinition.outputs), feature && feature.forEach(function (fn) {
            return fn(def);
          });
          def.directiveDefs = directiveTypes ? function () {
            return (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes).map(extractDirectiveDef);
          } : null;
          def.pipeDefs = pipeTypes ? function () {
            return (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef);
          } : null;
          return def;
        });
      }
      /**
       * Generated next to NgModules to monkey-patch directive and pipe references onto a component's
       * definition, when generating a direct reference in the component file would otherwise create an
       * import cycle.
       *
       * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.
       *
       * @codeGenApi
       */


      function ɵɵsetComponentScope(type, directives, pipes) {
        var def = type.ɵcmp;

        def.directiveDefs = function () {
          return directives.map(extractDirectiveDef);
        };

        def.pipeDefs = function () {
          return pipes.map(extractPipeDef);
        };
      }

      function extractDirectiveDef(type) {
        var def = getComponentDef(type) || getDirectiveDef(type);

        if (ngDevMode && !def) {
          throw new Error("'".concat(type.name, "' is neither 'ComponentType' or 'DirectiveType'."));
        }

        return def;
      }

      function extractPipeDef(type) {
        var def = getPipeDef(type);

        if (ngDevMode && !def) {
          throw new Error("'".concat(type.name, "' is not a 'PipeType'."));
        }

        return def;
      }

      var autoRegisterModuleById = {};
      /**
       * @codeGenApi
       */

      function ɵɵdefineNgModule(def) {
        var res = {
          type: def.type,
          bootstrap: def.bootstrap || EMPTY_ARRAY,
          declarations: def.declarations || EMPTY_ARRAY,
          imports: def.imports || EMPTY_ARRAY,
          exports: def.exports || EMPTY_ARRAY,
          transitiveCompileScopes: null,
          schemas: def.schemas || null,
          id: def.id || null
        };

        if (def.id != null) {
          noSideEffects(function () {
            autoRegisterModuleById[def.id] = def.type;
          });
        }

        return res;
      }
      /**
       * Adds the module metadata that is necessary to compute the module's transitive scope to an
       * existing module definition.
       *
       * Scope metadata of modules is not used in production builds, so calls to this function can be
       * marked pure to tree-shake it from the bundle, allowing for all referenced declarations
       * to become eligible for tree-shaking as well.
       *
       * @codeGenApi
       */


      function ɵɵsetNgModuleScope(type, scope) {
        return noSideEffects(function () {
          var ngModuleDef = getNgModuleDef(type, true);
          ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY;
          ngModuleDef.imports = scope.imports || EMPTY_ARRAY;
          ngModuleDef.exports = scope.exports || EMPTY_ARRAY;
        });
      }
      /**
       * Inverts an inputs or outputs lookup such that the keys, which were the
       * minified keys, are part of the values, and the values are parsed so that
       * the publicName of the property is the new key
       *
       * e.g. for
       *
       * ```
       * class Comp {
       *   @Input()
       *   propName1: string;
       *
       *   @Input('publicName2')
       *   declaredPropName2: number;
       * }
       * ```
       *
       * will be serialized as
       *
       * ```
       * {
       *   propName1: 'propName1',
       *   declaredPropName2: ['publicName2', 'declaredPropName2'],
       * }
       * ```
       *
       * which is than translated by the minifier as:
       *
       * ```
       * {
       *   minifiedPropName1: 'propName1',
       *   minifiedPropName2: ['publicName2', 'declaredPropName2'],
       * }
       * ```
       *
       * becomes: (public name => minifiedName)
       *
       * ```
       * {
       *  'propName1': 'minifiedPropName1',
       *  'publicName2': 'minifiedPropName2',
       * }
       * ```
       *
       * Optionally the function can take `secondary` which will result in: (public name => declared name)
       *
       * ```
       * {
       *  'propName1': 'propName1',
       *  'publicName2': 'declaredPropName2',
       * }
       * ```
       *
      
       */


      function invertObject(obj, secondary) {
        if (obj == null) return EMPTY_OBJ;
        var newLookup = {};

        for (var minifiedKey in obj) {
          if (obj.hasOwnProperty(minifiedKey)) {
            var publicName = obj[minifiedKey];
            var declaredName = publicName;

            if (Array.isArray(publicName)) {
              declaredName = publicName[1];
              publicName = publicName[0];
            }

            newLookup[publicName] = minifiedKey;

            if (secondary) {
              secondary[publicName] = declaredName;
            }
          }
        }

        return newLookup;
      }
      /**
       * Create a directive definition object.
       *
       * # Example
       * ```ts
       * class MyDirective {
       *   // Generated by Angular Template Compiler
       *   // [Symbol] syntax will not be supported by TypeScript until v2.7
       *   static ɵdir = ɵɵdefineDirective({
       *     ...
       *   });
       * }
       * ```
       *
       * @codeGenApi
       */


      var ɵɵdefineDirective = ɵɵdefineComponent;
      /**
       * Create a pipe definition object.
       *
       * # Example
       * ```
       * class MyPipe implements PipeTransform {
       *   // Generated by Angular Template Compiler
       *   static ɵpipe = definePipe({
       *     ...
       *   });
       * }
       * ```
       * @param pipeDef Pipe definition generated by the compiler
       *
       * @codeGenApi
       */

      function ɵɵdefinePipe(pipeDef) {
        return {
          type: pipeDef.type,
          name: pipeDef.name,
          factory: null,
          pure: pipeDef.pure !== false,
          onDestroy: pipeDef.type.prototype.ngOnDestroy || null
        };
      }
      /**
       * The following getter methods retrieve the definition from the type. Currently the retrieval
       * honors inheritance, but in the future we may change the rule to require that definitions are
       * explicit. This would require some sort of migration strategy.
       */


      function getComponentDef(type) {
        return type[NG_COMP_DEF] || null;
      }

      function getDirectiveDef(type) {
        return type[NG_DIR_DEF] || null;
      }

      function getPipeDef(type) {
        return type[NG_PIPE_DEF] || null;
      }

      function getNgModuleDef(type, throwNotFound) {
        var ngModuleDef = type[NG_MOD_DEF] || null;

        if (!ngModuleDef && throwNotFound === true) {
          throw new Error("Type ".concat(stringify(type), " does not have '\u0275mod' property."));
        }

        return ngModuleDef;
      }

      function getNgLocaleIdDef(type) {
        return type[NG_LOC_ID_DEF] || null;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // Below are constants for LView indices to help us look up LView members
      // without having to remember the specific indices.
      // Uglify will inline these when minifying so there shouldn't be a cost.


      var HOST = 0;
      var TVIEW = 1;
      var FLAGS = 2;
      var PARENT = 3;
      var NEXT = 4;
      var TRANSPLANTED_VIEWS_TO_REFRESH = 5;
      var T_HOST = 6;
      var CLEANUP = 7;
      var CONTEXT = 8;
      var INJECTOR = 9;
      var RENDERER_FACTORY = 10;
      var RENDERER = 11;
      var SANITIZER = 12;
      var CHILD_HEAD = 13;
      var CHILD_TAIL = 14; // FIXME(misko): Investigate if the three declarations aren't all same thing.

      var DECLARATION_VIEW = 15;
      var DECLARATION_COMPONENT_VIEW = 16;
      var DECLARATION_LCONTAINER = 17;
      var PREORDER_HOOK_FLAGS = 18;
      var QUERIES = 19;
      /**
       * Size of LView's header. Necessary to adjust for it when setting slots.
       *
       * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate
       * instruction index into `LView` index. All other indexes should be in the `LView` index space and
       * there should be no need to refer to `HEADER_OFFSET` anywhere else.
       */

      var HEADER_OFFSET = 20;
      /**
       * Converts `TViewType` into human readable text.
       * Make sure this matches with `TViewType`
       */

      var TViewTypeAsString = ['Root', 'Component', 'Embedded']; // Note: This hack is necessary so we don't erroneously get a circular dependency
      // failure based on types.

      var unusedValueExportToPlacateAjd = 1;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Special location which allows easy identification of type. If we have an array which was
       * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is
       * `LContainer`.
       */

      var TYPE = 1;
      /**
       * Below are constants for LContainer indices to help us look up LContainer members
       * without having to remember the specific indices.
       * Uglify will inline these when minifying so there shouldn't be a cost.
       */

      /**
       * Flag to signify that this `LContainer` may have transplanted views which need to be change
       * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.
       *
       * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip
       * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify
       * that the `MOVED_VIEWS` are transplanted and on-push.
       */

      var HAS_TRANSPLANTED_VIEWS = 2; // PARENT, NEXT, TRANSPLANTED_VIEWS_TO_REFRESH are indices 3, 4, and 5
      // As we already have these constants in LView, we don't need to re-create them.
      // T_HOST is index 6
      // We already have this constants in LView, we don't need to re-create it.

      var NATIVE = 7;
      var VIEW_REFS = 8;
      var MOVED_VIEWS = 9;
      /**
       * Size of LContainer's header. Represents the index after which all views in the
       * container will be inserted. We need to keep a record of current views so we know
       * which views are already in the DOM (and don't need to be re-added) and so we can
       * remove views from the DOM when they are no longer required.
       */

      var CONTAINER_HEADER_OFFSET = 10; // Note: This hack is necessary so we don't erroneously get a circular dependency
      // failure based on types.

      var unusedValueExportToPlacateAjd$1 = 1;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * True if `value` is `LView`.
       * @param value wrapped value of `RNode`, `LView`, `LContainer`
       */

      function isLView(value) {
        return Array.isArray(value) && typeof value[TYPE] === 'object';
      }
      /**
       * True if `value` is `LContainer`.
       * @param value wrapped value of `RNode`, `LView`, `LContainer`
       */


      function isLContainer(value) {
        return Array.isArray(value) && value[TYPE] === true;
      }

      function isContentQueryHost(tNode) {
        return (tNode.flags & 8
        /* hasContentQuery */
        ) !== 0;
      }

      function isComponentHost(tNode) {
        return (tNode.flags & 2
        /* isComponentHost */
        ) === 2
        /* isComponentHost */
        ;
      }

      function isDirectiveHost(tNode) {
        return (tNode.flags & 1
        /* isDirectiveHost */
        ) === 1
        /* isDirectiveHost */
        ;
      }

      function isComponentDef(def) {
        return def.template !== null;
      }

      function isRootView(target) {
        return (target[FLAGS] & 512
        /* IsRoot */
        ) !== 0;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // [Assert functions do not constraint type when they are guarded by a truthy
      // expression.](https://github.com/microsoft/TypeScript/issues/37295)


      function assertTNodeForLView(tNode, lView) {
        assertTNodeForTView(tNode, lView[TVIEW]);
      }

      function assertTNodeForTView(tNode, tView) {
        assertTNode(tNode);
        tNode.hasOwnProperty('tView_') && assertEqual(tNode.tView_, tView, 'This TNode does not belong to this TView.');
      }

      function assertTNode(tNode) {
        assertDefined(tNode, 'TNode must be defined');

        if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) {
          throwError('Not of type TNode, got: ' + tNode);
        }
      }

      function assertTIcu(tIcu) {
        assertDefined(tIcu, 'Expected TIcu to be defined');

        if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {
          throwError('Object is not of TIcu type.');
        }
      }

      function assertComponentType(actual) {
        var msg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Type passed in is not ComponentType, it does not have \'ɵcmp\' property.';

        if (!getComponentDef(actual)) {
          throwError(msg);
        }
      }

      function assertNgModuleType(actual) {
        var msg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Type passed in is not NgModuleType, it does not have \'ɵmod\' property.';

        if (!getNgModuleDef(actual)) {
          throwError(msg);
        }
      }

      function assertCurrentTNodeIsParent(isParent) {
        assertEqual(isParent, true, 'currentTNode should be a parent');
      }

      function assertHasParent(tNode) {
        assertDefined(tNode, 'currentTNode should exist!');
        assertDefined(tNode.parent, 'currentTNode should have a parent');
      }

      function assertDataNext(lView, index, arr) {
        if (arr == null) arr = lView;
        assertEqual(arr.length, index, "index ".concat(index, " expected to be at the end of arr (length ").concat(arr.length, ")"));
      }

      function assertLContainer(value) {
        assertDefined(value, 'LContainer must be defined');
        assertEqual(isLContainer(value), true, 'Expecting LContainer');
      }

      function assertLViewOrUndefined(value) {
        value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');
      }

      function assertLView(value) {
        assertDefined(value, 'LView must be defined');
        assertEqual(isLView(value), true, 'Expecting LView');
      }

      function assertFirstCreatePass(tView, errMessage) {
        assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');
      }

      function assertFirstUpdatePass(tView, errMessage) {
        assertEqual(tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.');
      }
      /**
       * This is a basic sanity check that an object is probably a directive def. DirectiveDef is
       * an interface, so we can't do a direct instanceof check.
       */


      function assertDirectiveDef(obj) {
        if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {
          throwError("Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.");
        }
      }

      function assertIndexInDeclRange(lView, index) {
        var tView = lView[1];
        assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);
      }

      function assertIndexInVarsRange(lView, index) {
        var tView = lView[1];
        assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index);
      }

      function assertIndexInExpandoRange(lView, index) {
        var tView = lView[1];
        assertBetween(tView.expandoStartIndex, lView.length, index);
      }

      function assertBetween(lower, upper, index) {
        if (!(lower <= index && index < upper)) {
          throwError("Index out of range (expecting ".concat(lower, " <= ").concat(index, " < ").concat(upper, ")"));
        }
      }
      /**
       * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a
       * NodeInjector data structure.
       *
       * @param lView `LView` which should be checked.
       * @param injectorIndex index into the `LView` where the `NodeInjector` is expected.
       */


      function assertNodeInjector(lView, injectorIndex) {
        assertIndexInExpandoRange(lView, injectorIndex);
        assertIndexInExpandoRange(lView, injectorIndex + 8
        /* PARENT */
        );
        assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter');
        assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter');
        assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter');
        assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter');
        assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter');
        assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter');
        assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter');
        assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter');
        assertNumber(lView[injectorIndex + 8
        /* PARENT */
        ], 'injectorIndex should point to parent injector');
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function getFactoryDef(type, throwNotFound) {
        var hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);

        if (!hasFactoryDef && throwNotFound === true && ngDevMode) {
          throw new Error("Type ".concat(stringify(type), " does not have '\u0275fac' property."));
        }

        return hasFactoryDef ? type[NG_FACTORY_DEF] : null;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var RuntimeError = /*#__PURE__*/function (_Error2) {
        _inherits(RuntimeError, _Error2);

        var _super216 = _createSuper(RuntimeError);

        function RuntimeError(code, message) {
          var _this466;

          _classCallCheck(this, RuntimeError);

          _this466 = _super216.call(this, formatRuntimeError(code, message));
          _this466.code = code;
          return _this466;
        }

        return RuntimeError;
      }( /*#__PURE__*/_wrapNativeSuper(Error));
      /** Called to format a runtime error */


      function formatRuntimeError(code, message) {
        var fullCode = code ? "NG0".concat(code, ": ") : '';
        return "".concat(fullCode).concat(message);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Used for stringify render output in Ivy.
       * Important! This function is very performance-sensitive and we should
       * be extra careful not to introduce megamorphic reads in it.
       * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.
       */


      function renderStringify(value) {
        if (typeof value === 'string') return value;
        if (value == null) return ''; // Use `String` so that it invokes the `toString` method of the value. Note that this
        // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).

        return String(value);
      }
      /**
       * Used to stringify a value so that it can be displayed in an error message.
       * Important! This function contains a megamorphic read and should only be
       * used for error messages.
       */


      function stringifyForError(value) {
        if (typeof value === 'function') return value.name || value.toString();

        if (typeof value === 'object' && value != null && typeof value.type === 'function') {
          return value.type.name || value.type.toString();
        }

        return renderStringify(value);
      }
      /** Called when directives inject each other (creating a circular dependency) */


      function throwCyclicDependencyError(token, path) {
        var depPath = path ? ". Dependency path: ".concat(path.join(' > '), " > ").concat(token) : '';
        throw new RuntimeError("200"
        /* CYCLIC_DI_DEPENDENCY */
        , "Circular dependency in DI detected for ".concat(token).concat(depPath));
      }

      function throwMixedMultiProviderError() {
        throw new Error("Cannot mix multi providers and regular providers");
      }

      function throwInvalidProviderError(ngModuleType, providers, provider) {
        var ngModuleDetail = '';

        if (ngModuleType && providers) {
          var providerDetail = providers.map(function (v) {
            return v == provider ? '?' + provider + '?' : '...';
          });
          ngModuleDetail = " - only instances of Provider and Type are allowed, got: [".concat(providerDetail.join(', '), "]");
        }

        throw new Error("Invalid provider for the NgModule '".concat(stringify(ngModuleType), "'") + ngModuleDetail);
      }
      /** Throws an error when a token is not found in DI. */


      function throwProviderNotFoundError(token, injectorName) {
        var injectorDetails = injectorName ? " in ".concat(injectorName) : '';
        throw new RuntimeError("201"
        /* PROVIDER_NOT_FOUND */
        , "No provider for ".concat(stringifyForError(token), " found").concat(injectorDetails));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Represents a basic change from a previous to a new value for a single
       * property on a directive instance. Passed as a value in a
       * {@link SimpleChanges} object to the `ngOnChanges` hook.
       *
       * @see `OnChanges`
       *
       * @publicApi
       */


      var SimpleChange = /*#__PURE__*/function () {
        function SimpleChange(previousValue, currentValue, firstChange) {
          _classCallCheck(this, SimpleChange);

          this.previousValue = previousValue;
          this.currentValue = currentValue;
          this.firstChange = firstChange;
        }
        /**
         * Check whether the new value is the first value assigned.
         */


        _createClass2(SimpleChange, [{
          key: "isFirstChange",
          value: function isFirstChange() {
            return this.firstChange;
          }
        }]);

        return SimpleChange;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * The NgOnChangesFeature decorates a component with support for the ngOnChanges
       * lifecycle hook, so it should be included in any component that implements
       * that hook.
       *
       * If the component or directive uses inheritance, the NgOnChangesFeature MUST
       * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise
       * inherited properties will not be propagated to the ngOnChanges lifecycle
       * hook.
       *
       * Example usage:
       *
       * ```
       * static ɵcmp = defineComponent({
       *   ...
       *   inputs: {name: 'publicName'},
       *   features: [NgOnChangesFeature]
       * });
       * ```
       *
       * @codeGenApi
       */


      function ɵɵNgOnChangesFeature() {
        return NgOnChangesFeatureImpl;
      }

      function NgOnChangesFeatureImpl(definition) {
        if (definition.type.prototype.ngOnChanges) {
          definition.setInput = ngOnChangesSetInput;
        }

        return rememberChangeHistoryAndInvokeOnChangesHook;
      } // This option ensures that the ngOnChanges lifecycle hook will be inherited
      // from superclasses (in InheritDefinitionFeature).

      /** @nocollapse */
      // tslint:disable-next-line:no-toplevel-property-access


      ɵɵNgOnChangesFeature.ngInherit = true;
      /**
       * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate
       * `ngOnChanges`.
       *
       * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are
       * found it invokes `ngOnChanges` on the component instance.
       *
       * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,
       *     it is guaranteed to be called with component instance.
       */

      function rememberChangeHistoryAndInvokeOnChangesHook() {
        var simpleChangesStore = getSimpleChangesStore(this);
        var current = simpleChangesStore === null || simpleChangesStore === void 0 ? void 0 : simpleChangesStore.current;

        if (current) {
          var previous = simpleChangesStore.previous;

          if (previous === EMPTY_OBJ) {
            simpleChangesStore.previous = current;
          } else {
            // New changes are copied to the previous store, so that we don't lose history for inputs
            // which were not changed this time
            for (var key in current) {
              previous[key] = current[key];
            }
          }

          simpleChangesStore.current = null;
          this.ngOnChanges(current);
        }
      }

      function ngOnChangesSetInput(instance, value, publicName, privateName) {
        var simpleChangesStore = getSimpleChangesStore(instance) || setSimpleChangesStore(instance, {
          previous: EMPTY_OBJ,
          current: null
        });
        var current = simpleChangesStore.current || (simpleChangesStore.current = {});
        var previous = simpleChangesStore.previous;
        var declaredName = this.declaredInputs[publicName];
        var previousChange = previous[declaredName];
        current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);
        instance[privateName] = value;
      }

      var SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';

      function getSimpleChangesStore(instance) {
        return instance[SIMPLE_CHANGES_STORE] || null;
      }

      function setSimpleChangesStore(instance, store) {
        return instance[SIMPLE_CHANGES_STORE] = store;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
      var MATH_ML_NAMESPACE = 'http://www.w3.org/1998/MathML/';
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * This property will be monkey-patched on elements, components and directives
       */

      var MONKEY_PATCH_KEY_NAME = '__ngContext__';
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Most of the use of `document` in Angular is from within the DI system so it is possible to simply
       * inject the `DOCUMENT` token and are done.
       *
       * Ivy is special because it does not rely upon the DI and must get hold of the document some other
       * way.
       *
       * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy.
       * Wherever ivy needs the global document, it calls `getDocument()` instead.
       *
       * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to
       * tell ivy what the global `document` is.
       *
       * Angular does this for us in each of the standard platforms (`Browser`, `Server`, and `WebWorker`)
       * by calling `setDocument()` when providing the `DOCUMENT` token.
       */

      var DOCUMENT = undefined;
      /**
       * Tell ivy what the `document` is for this platform.
       *
       * It is only necessary to call this if the current platform is not a browser.
       *
       * @param document The object representing the global `document` in this environment.
       */

      function setDocument(document) {
        DOCUMENT = document;
      }
      /**
       * Access the object that represents the `document` for this platform.
       *
       * Ivy calls this whenever it needs to access the `document` object.
       * For example to create the renderer or to do sanitization.
       */


      function getDocument() {
        if (DOCUMENT !== undefined) {
          return DOCUMENT;
        } else if (typeof document !== 'undefined') {
          return document;
        } // No "document" can be found. This should only happen if we are running ivy outside Angular and
        // the current platform is not a browser. Since this is not a supported scenario at the moment
        // this should not happen in Angular apps.
        // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a
        // public API. Meanwhile we just return `undefined` and let the application fail.


        return undefined;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // TODO: cleanup once the code is merged in angular/angular


      var RendererStyleFlags3;

      (function (RendererStyleFlags3) {
        RendererStyleFlags3[RendererStyleFlags3["Important"] = 1] = "Important";
        RendererStyleFlags3[RendererStyleFlags3["DashCase"] = 2] = "DashCase";
      })(RendererStyleFlags3 || (RendererStyleFlags3 = {}));
      /** Returns whether the `renderer` is a `ProceduralRenderer3` */


      function isProceduralRenderer(renderer) {
        return !!renderer.listen;
      }

      var ɵ0 = function ɵ0(hostElement, rendererType) {
        return getDocument();
      };

      var domRendererFactory3 = {
        createRenderer: ɵ0
      }; // Note: This hack is necessary so we don't erroneously get a circular dependency
      // failure based on types.

      var unusedValueExportToPlacateAjd$2 = 1;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)
       * in same location in `LView`. This is because we don't want to pre-allocate space for it
       * because the storage is sparse. This file contains utilities for dealing with such data types.
       *
       * How do we know what is stored at a given location in `LView`.
       * - `Array.isArray(value) === false` => `RNode` (The normal storage value)
       * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.
       *   - `typeof value[TYPE] === 'object'` => `LView`
       *      - This happens when we have a component at a given location
       *   - `typeof value[TYPE] === true` => `LContainer`
       *      - This happens when we have `LContainer` binding at a given location.
       *
       *
       * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.
       */

      /**
       * Returns `RNode`.
       * @param value wrapped value of `RNode`, `LView`, `LContainer`
       */

      function unwrapRNode(value) {
        while (Array.isArray(value)) {
          value = value[HOST];
        }

        return value;
      }
      /**
       * Returns `LView` or `null` if not found.
       * @param value wrapped value of `RNode`, `LView`, `LContainer`
       */


      function unwrapLView(value) {
        while (Array.isArray(value)) {
          // This check is same as `isLView()` but we don't call at as we don't want to call
          // `Array.isArray()` twice and give JITer more work for inlining.
          if (typeof value[TYPE] === 'object') return value;
          value = value[HOST];
        }

        return null;
      }
      /**
       * Returns `LContainer` or `null` if not found.
       * @param value wrapped value of `RNode`, `LView`, `LContainer`
       */


      function unwrapLContainer(value) {
        while (Array.isArray(value)) {
          // This check is same as `isLContainer()` but we don't call at as we don't want to call
          // `Array.isArray()` twice and give JITer more work for inlining.
          if (value[TYPE] === true) return value;
          value = value[HOST];
        }

        return null;
      }
      /**
       * Retrieves an element value from the provided `viewData`, by unwrapping
       * from any containers, component views, or style contexts.
       */


      function getNativeByIndex(index, lView) {
        ngDevMode && assertIndexInRange(lView, index);
        ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET');
        return unwrapRNode(lView[index]);
      }
      /**
       * Retrieve an `RNode` for a given `TNode` and `LView`.
       *
       * This function guarantees in dev mode to retrieve a non-null `RNode`.
       *
       * @param tNode
       * @param lView
       */


      function getNativeByTNode(tNode, lView) {
        ngDevMode && assertTNodeForLView(tNode, lView);
        ngDevMode && assertIndexInRange(lView, tNode.index);
        var node = unwrapRNode(lView[tNode.index]);
        ngDevMode && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);
        return node;
      }
      /**
       * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.
       *
       * Some `TNode`s don't have associated `RNode`s. For example `Projection`
       *
       * @param tNode
       * @param lView
       */


      function getNativeByTNodeOrNull(tNode, lView) {
        var index = tNode === null ? -1 : tNode.index;

        if (index !== -1) {
          ngDevMode && assertTNodeForLView(tNode, lView);
          var node = unwrapRNode(lView[index]);
          ngDevMode && node !== null && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);
          return node;
        }

        return null;
      } // fixme(misko): The return Type should be `TNode|null`


      function getTNode(tView, index) {
        ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');
        ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');
        var tNode = tView.data[index];
        ngDevMode && tNode !== null && assertTNode(tNode);
        return tNode;
      }
      /** Retrieves a value from any `LView` or `TData`. */


      function load(view, index) {
        ngDevMode && assertIndexInRange(view, index);
        return view[index];
      }

      function getComponentLViewByIndex(nodeIndex, hostView) {
        // Could be an LView or an LContainer. If LContainer, unwrap to find LView.
        ngDevMode && assertIndexInRange(hostView, nodeIndex);
        var slotValue = hostView[nodeIndex];
        var lView = isLView(slotValue) ? slotValue : slotValue[HOST];
        return lView;
      }
      /**
       * Returns the monkey-patch value data present on the target (which could be
       * a component, directive or a DOM node).
       */


      function readPatchedData(target) {
        ngDevMode && assertDefined(target, 'Target expected');
        return target[MONKEY_PATCH_KEY_NAME] || null;
      }

      function readPatchedLView(target) {
        var value = readPatchedData(target);

        if (value) {
          return Array.isArray(value) ? value : value.lView;
        }

        return null;
      }
      /** Checks whether a given view is in creation mode */


      function isCreationMode(view) {
        return (view[FLAGS] & 4
        /* CreationMode */
        ) === 4
        /* CreationMode */
        ;
      }
      /**
       * Returns a boolean for whether the view is attached to the change detection tree.
       *
       * Note: This determines whether a view should be checked, not whether it's inserted
       * into a container. For that, you'll want `viewAttachedToContainer` below.
       */


      function viewAttachedToChangeDetector(view) {
        return (view[FLAGS] & 128
        /* Attached */
        ) === 128
        /* Attached */
        ;
      }
      /** Returns a boolean for whether the view is attached to a container. */


      function viewAttachedToContainer(view) {
        return isLContainer(view[PARENT]);
      }

      function getConstant(consts, index) {
        if (index === null || index === undefined) return null;
        ngDevMode && assertIndexInRange(consts, index);
        return consts[index];
      }
      /**
       * Resets the pre-order hook flags of the view.
       * @param lView the LView on which the flags are reset
       */


      function resetPreOrderHookFlags(lView) {
        lView[PREORDER_HOOK_FLAGS] = 0;
      }
      /**
       * Updates the `TRANSPLANTED_VIEWS_TO_REFRESH` counter on the `LContainer` as well as the parents
       * whose
       *  1. counter goes from 0 to 1, indicating that there is a new child that has a view to refresh
       *  or
       *  2. counter goes from 1 to 0, indicating there are no more descendant views to refresh
       */


      function updateTransplantedViewCount(lContainer, amount) {
        lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;
        var viewOrContainer = lContainer;
        var parent = lContainer[PARENT];

        while (parent !== null && (amount === 1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 1 || amount === -1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 0)) {
          parent[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;
          viewOrContainer = parent;
          parent = parent[PARENT];
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var instructionState = {
        lFrame: createLFrame(null),
        bindingsEnabled: true,
        isInCheckNoChangesMode: false
      };
      /**
       * Returns true if the instruction state stack is empty.
       *
       * Intended to be called from tests only (tree shaken otherwise).
       */

      function specOnlyIsInstructionStateEmpty() {
        return instructionState.lFrame.parent === null;
      }

      function getElementDepthCount() {
        return instructionState.lFrame.elementDepthCount;
      }

      function increaseElementDepthCount() {
        instructionState.lFrame.elementDepthCount++;
      }

      function decreaseElementDepthCount() {
        instructionState.lFrame.elementDepthCount--;
      }

      function getBindingsEnabled() {
        return instructionState.bindingsEnabled;
      }
      /**
       * Enables directive matching on elements.
       *
       *  * Example:
       * ```
       * <my-comp my-directive>
       *   Should match component / directive.
       * </my-comp>
       * <div ngNonBindable>
       *   <!-- ɵɵdisableBindings() -->
       *   <my-comp my-directive>
       *     Should not match component / directive because we are in ngNonBindable.
       *   </my-comp>
       *   <!-- ɵɵenableBindings() -->
       * </div>
       * ```
       *
       * @codeGenApi
       */


      function ɵɵenableBindings() {
        instructionState.bindingsEnabled = true;
      }
      /**
       * Disables directive matching on element.
       *
       *  * Example:
       * ```
       * <my-comp my-directive>
       *   Should match component / directive.
       * </my-comp>
       * <div ngNonBindable>
       *   <!-- ɵɵdisableBindings() -->
       *   <my-comp my-directive>
       *     Should not match component / directive because we are in ngNonBindable.
       *   </my-comp>
       *   <!-- ɵɵenableBindings() -->
       * </div>
       * ```
       *
       * @codeGenApi
       */


      function ɵɵdisableBindings() {
        instructionState.bindingsEnabled = false;
      }
      /**
       * Return the current `LView`.
       */


      function getLView() {
        return instructionState.lFrame.lView;
      }
      /**
       * Return the current `TView`.
       */


      function getTView() {
        return instructionState.lFrame.tView;
      }
      /**
       * Restores `contextViewData` to the given OpaqueViewState instance.
       *
       * Used in conjunction with the getCurrentView() instruction to save a snapshot
       * of the current view and restore it when listeners are invoked. This allows
       * walking the declaration view tree in listeners to get vars from parent views.
       *
       * @param viewToRestore The OpaqueViewState instance to restore.
       *
       * @codeGenApi
       */


      function ɵɵrestoreView(viewToRestore) {
        instructionState.lFrame.contextLView = viewToRestore;
      }

      function getCurrentTNode() {
        var currentTNode = getCurrentTNodePlaceholderOk();

        while (currentTNode !== null && currentTNode.type === 64
        /* Placeholder */
        ) {
          currentTNode = currentTNode.parent;
        }

        return currentTNode;
      }

      function getCurrentTNodePlaceholderOk() {
        return instructionState.lFrame.currentTNode;
      }

      function getCurrentParentTNode() {
        var lFrame = instructionState.lFrame;
        var currentTNode = lFrame.currentTNode;
        return lFrame.isParent ? currentTNode : currentTNode.parent;
      }

      function setCurrentTNode(tNode, isParent) {
        ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);
        var lFrame = instructionState.lFrame;
        lFrame.currentTNode = tNode;
        lFrame.isParent = isParent;
      }

      function isCurrentTNodeParent() {
        return instructionState.lFrame.isParent;
      }

      function setCurrentTNodeAsNotParent() {
        instructionState.lFrame.isParent = false;
      }

      function setCurrentTNodeAsParent() {
        instructionState.lFrame.isParent = true;
      }

      function getContextLView() {
        return instructionState.lFrame.contextLView;
      }

      function isInCheckNoChangesMode() {
        // TODO(misko): remove this from the LView since it is ngDevMode=true mode only.
        return instructionState.isInCheckNoChangesMode;
      }

      function setIsInCheckNoChangesMode(mode) {
        instructionState.isInCheckNoChangesMode = mode;
      } // top level variables should not be exported for performance reasons (PERF_NOTES.md)


      function getBindingRoot() {
        var lFrame = instructionState.lFrame;
        var index = lFrame.bindingRootIndex;

        if (index === -1) {
          index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;
        }

        return index;
      }

      function getBindingIndex() {
        return instructionState.lFrame.bindingIndex;
      }

      function setBindingIndex(value) {
        return instructionState.lFrame.bindingIndex = value;
      }

      function nextBindingIndex() {
        return instructionState.lFrame.bindingIndex++;
      }

      function incrementBindingIndex(count) {
        var lFrame = instructionState.lFrame;
        var index = lFrame.bindingIndex;
        lFrame.bindingIndex = lFrame.bindingIndex + count;
        return index;
      }

      function isInI18nBlock() {
        return instructionState.lFrame.inI18n;
      }

      function setInI18nBlock(isInI18nBlock) {
        instructionState.lFrame.inI18n = isInI18nBlock;
      }
      /**
       * Set a new binding root index so that host template functions can execute.
       *
       * Bindings inside the host template are 0 index. But because we don't know ahead of time
       * how many host bindings we have we can't pre-compute them. For this reason they are all
       * 0 index and we just shift the root so that they match next available location in the LView.
       *
       * @param bindingRootIndex Root index for `hostBindings`
       * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive
       *        whose `hostBindings` are being processed.
       */


      function setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) {
        var lFrame = instructionState.lFrame;
        lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;
        setCurrentDirectiveIndex(currentDirectiveIndex);
      }
      /**
       * When host binding is executing this points to the directive index.
       * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef`
       * `LView[getCurrentDirectiveIndex()]` is directive instance.
       */


      function getCurrentDirectiveIndex() {
        return instructionState.lFrame.currentDirectiveIndex;
      }
      /**
       * Sets an index of a directive whose `hostBindings` are being processed.
       *
       * @param currentDirectiveIndex `TData` index where current directive instance can be found.
       */


      function setCurrentDirectiveIndex(currentDirectiveIndex) {
        instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;
      }
      /**
       * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being
       * executed.
       *
       * @param tData Current `TData` where the `DirectiveDef` will be looked up at.
       */


      function getCurrentDirectiveDef(tData) {
        var currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;
        return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex];
      }

      function getCurrentQueryIndex() {
        return instructionState.lFrame.currentQueryIndex;
      }

      function setCurrentQueryIndex(value) {
        instructionState.lFrame.currentQueryIndex = value;
      }
      /**
       * Returns a `TNode` of the location where the current `LView` is declared at.
       *
       * @param lView an `LView` that we want to find parent `TNode` for.
       */


      function getDeclarationTNode(lView) {
        var tView = lView[TVIEW]; // Return the declaration parent for embedded views

        if (tView.type === 2
        /* Embedded */
        ) {
          ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');
          return tView.declTNode;
        } // Components don't have `TView.declTNode` because each instance of component could be
        // inserted in different location, hence `TView.declTNode` is meaningless.
        // Falling back to `T_HOST` in case we cross component boundary.


        if (tView.type === 1
        /* Component */
        ) {
          return lView[T_HOST];
        } // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.


        return null;
      }
      /**
       * This is a light weight version of the `enterView` which is needed by the DI system.
       *
       * @param lView `LView` location of the DI context.
       * @param tNode `TNode` for DI context
       * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration
       *     tree from `tNode`  until we find parent declared `TElementNode`.
       * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared
       *     `TNode` if `flags` has  `SkipSelf`). Failing to enter DI implies that no associated
       *     `NodeInjector` can be found and we should instead use `ModuleInjector`.
       *     - If `true` than this call must be fallowed by `leaveDI`
       *     - If `false` than this call failed and we should NOT call `leaveDI`
       */


      function enterDI(lView, tNode, flags) {
        ngDevMode && assertLViewOrUndefined(lView);

        if (flags & InjectFlags.SkipSelf) {
          ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);
          var parentTNode = tNode;
          var parentLView = lView;

          while (true) {
            ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');
            parentTNode = parentTNode.parent;

            if (parentTNode === null && !(flags & InjectFlags.Host)) {
              parentTNode = getDeclarationTNode(parentLView);
              if (parentTNode === null) break; // In this case, a parent exists and is definitely an element. So it will definitely
              // have an existing lView as the declaration view, which is why we can assume it's defined.

              ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');
              parentLView = parentLView[DECLARATION_VIEW]; // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives
              // We want to skip those and look only at Elements and ElementContainers to ensure
              // we're looking at true parent nodes, and not content or other types.

              if (parentTNode.type & (2
              /* Element */
              | 8
              /* ElementContainer */
              )) {
                break;
              }
            } else {
              break;
            }
          }

          if (parentTNode === null) {
            // If we failed to find a parent TNode this means that we should use module injector.
            return false;
          } else {
            tNode = parentTNode;
            lView = parentLView;
          }
        }

        ngDevMode && assertTNodeForLView(tNode, lView);
        var lFrame = instructionState.lFrame = allocLFrame();
        lFrame.currentTNode = tNode;
        lFrame.lView = lView;
        return true;
      }
      /**
       * Swap the current lView with a new lView.
       *
       * For performance reasons we store the lView in the top level of the module.
       * This way we minimize the number of properties to read. Whenever a new view
       * is entered we have to store the lView for later, and when the view is
       * exited the state has to be restored
       *
       * @param newView New lView to become active
       * @returns the previously active lView;
       */


      function enterView(newView) {
        ngDevMode && assertNotEqual(newView[0], newView[1], '????');
        ngDevMode && assertLViewOrUndefined(newView);
        var newLFrame = allocLFrame();

        if (ngDevMode) {
          assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');
          assertEqual(newLFrame.lView, null, 'Expected clean LFrame');
          assertEqual(newLFrame.tView, null, 'Expected clean LFrame');
          assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame');
          assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');
          assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');
          assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');
          assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');
          assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');
        }

        var tView = newView[TVIEW];
        instructionState.lFrame = newLFrame;
        ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);
        newLFrame.currentTNode = tView.firstChild;
        newLFrame.lView = newView;
        newLFrame.tView = tView;
        newLFrame.contextLView = newView;
        newLFrame.bindingIndex = tView.bindingStartIndex;
        newLFrame.inI18n = false;
      }
      /**
       * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.
       */


      function allocLFrame() {
        var currentLFrame = instructionState.lFrame;
        var childLFrame = currentLFrame === null ? null : currentLFrame.child;
        var newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;
        return newLFrame;
      }

      function createLFrame(parent) {
        var lFrame = {
          currentTNode: null,
          isParent: true,
          lView: null,
          tView: null,
          selectedIndex: -1,
          contextLView: null,
          elementDepthCount: 0,
          currentNamespace: null,
          currentDirectiveIndex: -1,
          bindingRootIndex: -1,
          bindingIndex: -1,
          currentQueryIndex: 0,
          parent: parent,
          child: null,
          inI18n: false
        };
        parent !== null && (parent.child = lFrame); // link the new LFrame for reuse.

        return lFrame;
      }
      /**
       * A lightweight version of leave which is used with DI.
       *
       * This function only resets `currentTNode` and `LView` as those are the only properties
       * used with DI (`enterDI()`).
       *
       * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where
       * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`.
       */


      function leaveViewLight() {
        var oldLFrame = instructionState.lFrame;
        instructionState.lFrame = oldLFrame.parent;
        oldLFrame.currentTNode = null;
        oldLFrame.lView = null;
        return oldLFrame;
      }
      /**
       * This is a lightweight version of the `leaveView` which is needed by the DI system.
       *
       * NOTE: this function is an alias so that we can change the type of the function to have `void`
       * return type.
       */


      var leaveDI = leaveViewLight;
      /**
       * Leave the current `LView`
       *
       * This pops the `LFrame` with the associated `LView` from the stack.
       *
       * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is
       * because for performance reasons we don't release `LFrame` but rather keep it for next use.
       */

      function leaveView() {
        var oldLFrame = leaveViewLight();
        oldLFrame.isParent = true;
        oldLFrame.tView = null;
        oldLFrame.selectedIndex = -1;
        oldLFrame.contextLView = null;
        oldLFrame.elementDepthCount = 0;
        oldLFrame.currentDirectiveIndex = -1;
        oldLFrame.currentNamespace = null;
        oldLFrame.bindingRootIndex = -1;
        oldLFrame.bindingIndex = -1;
        oldLFrame.currentQueryIndex = 0;
      }

      function nextContextImpl(level) {
        var contextLView = instructionState.lFrame.contextLView = walkUpViews(level, instructionState.lFrame.contextLView);
        return contextLView[CONTEXT];
      }

      function walkUpViews(nestingLevel, currentView) {
        while (nestingLevel > 0) {
          ngDevMode && assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.');
          currentView = currentView[DECLARATION_VIEW];
          nestingLevel--;
        }

        return currentView;
      }
      /**
       * Gets the currently selected element index.
       *
       * Used with {@link property} instruction (and more in the future) to identify the index in the
       * current `LView` to act on.
       */


      function getSelectedIndex() {
        return instructionState.lFrame.selectedIndex;
      }
      /**
       * Sets the most recent index passed to {@link select}
       *
       * Used with {@link property} instruction (and more in the future) to identify the index in the
       * current `LView` to act on.
       *
       * (Note that if an "exit function" was set earlier (via `setElementExitFn()`) then that will be
       * run if and when the provided `index` value is different from the current selected index value.)
       */


      function setSelectedIndex(index) {
        ngDevMode && index !== -1 && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');
        ngDevMode && assertLessThan(index, instructionState.lFrame.lView.length, 'Can\'t set index passed end of LView');
        instructionState.lFrame.selectedIndex = index;
      }
      /**
       * Gets the `tNode` that represents currently selected element.
       */


      function getSelectedTNode() {
        var lFrame = instructionState.lFrame;
        return getTNode(lFrame.tView, lFrame.selectedIndex);
      }
      /**
       * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.
       *
       * @codeGenApi
       */


      function ɵɵnamespaceSVG() {
        instructionState.lFrame.currentNamespace = SVG_NAMESPACE;
      }
      /**
       * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.
       *
       * @codeGenApi
       */


      function ɵɵnamespaceMathML() {
        instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;
      }
      /**
       * Sets the namespace used to create elements to `null`, which forces element creation to use
       * `createElement` rather than `createElementNS`.
       *
       * @codeGenApi
       */


      function ɵɵnamespaceHTML() {
        namespaceHTMLInternal();
      }
      /**
       * Sets the namespace used to create elements to `null`, which forces element creation to use
       * `createElement` rather than `createElementNS`.
       */


      function namespaceHTMLInternal() {
        instructionState.lFrame.currentNamespace = null;
      }

      function getNamespace() {
        return instructionState.lFrame.currentNamespace;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.
       *
       * Must be run *only* on the first template pass.
       *
       * Sets up the pre-order hooks on the provided `tView`,
       * see {@link HookData} for details about the data structure.
       *
       * @param directiveIndex The index of the directive in LView
       * @param directiveDef The definition containing the hooks to setup in tView
       * @param tView The current TView
       */


      function registerPreOrderHooks(directiveIndex, directiveDef, tView) {
        ngDevMode && assertFirstCreatePass(tView);
        var _directiveDef$type$pr = directiveDef.type.prototype,
            ngOnChanges = _directiveDef$type$pr.ngOnChanges,
            ngOnInit = _directiveDef$type$pr.ngOnInit,
            ngDoCheck = _directiveDef$type$pr.ngDoCheck;

        if (ngOnChanges) {
          var wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);
          (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges);
          (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, wrappedOnChanges);
        }

        if (ngOnInit) {
          (tView.preOrderHooks || (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit);
        }

        if (ngDoCheck) {
          (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck);
          (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck);
        }
      }
      /**
       *
       * Loops through the directives on the provided `tNode` and queues hooks to be
       * run that are not initialization hooks.
       *
       * Should be executed during `elementEnd()` and similar to
       * preserve hook execution order. Content, view, and destroy hooks for projected
       * components and directives must be called *before* their hosts.
       *
       * Sets up the content, view, and destroy hooks on the provided `tView`,
       * see {@link HookData} for details about the data structure.
       *
       * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up
       * separately at `elementStart`.
       *
       * @param tView The current TView
       * @param tNode The TNode whose directives are to be searched for hooks to queue
       */


      function registerPostOrderHooks(tView, tNode) {
        ngDevMode && assertFirstCreatePass(tView); // It's necessary to loop through the directives at elementEnd() (rather than processing in
        // directiveCreate) so we can preserve the current hook order. Content, view, and destroy
        // hooks for projected components and directives must be called *before* their hosts.

        for (var i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {
          var _directiveDef = tView.data[i];
          ngDevMode && assertDefined(_directiveDef, 'Expecting DirectiveDef');
          var lifecycleHooks = _directiveDef.type.prototype;
          var ngAfterContentInit = lifecycleHooks.ngAfterContentInit,
              ngAfterContentChecked = lifecycleHooks.ngAfterContentChecked,
              ngAfterViewInit = lifecycleHooks.ngAfterViewInit,
              ngAfterViewChecked = lifecycleHooks.ngAfterViewChecked,
              ngOnDestroy = lifecycleHooks.ngOnDestroy;

          if (ngAfterContentInit) {
            (tView.contentHooks || (tView.contentHooks = [])).push(-i, ngAfterContentInit);
          }

          if (ngAfterContentChecked) {
            (tView.contentHooks || (tView.contentHooks = [])).push(i, ngAfterContentChecked);
            (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked);
          }

          if (ngAfterViewInit) {
            (tView.viewHooks || (tView.viewHooks = [])).push(-i, ngAfterViewInit);
          }

          if (ngAfterViewChecked) {
            (tView.viewHooks || (tView.viewHooks = [])).push(i, ngAfterViewChecked);
            (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked);
          }

          if (ngOnDestroy != null) {
            (tView.destroyHooks || (tView.destroyHooks = [])).push(i, ngOnDestroy);
          }
        }
      }
      /**
       * Executing hooks requires complex logic as we need to deal with 2 constraints.
       *
       * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only
       * once, across many change detection cycles. This must be true even if some hooks throw, or if
       * some recursively trigger a change detection cycle.
       * To solve that, it is required to track the state of the execution of these init hooks.
       * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},
       * and the index within that phase. They can be seen as a cursor in the following structure:
       * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]
       * They are are stored as flags in LView[FLAGS].
       *
       * 2. Pre-order hooks can be executed in batches, because of the select instruction.
       * To be able to pause and resume their execution, we also need some state about the hook's array
       * that is being processed:
       * - the index of the next hook to be executed
       * - the number of init hooks already found in the processed part of the  array
       * They are are stored as flags in LView[PREORDER_HOOK_FLAGS].
       */

      /**
       * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were
       * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read
       * / write of the init-hooks related flags.
       * @param lView The LView where hooks are defined
       * @param hooks Hooks to be run
       * @param nodeIndex 3 cases depending on the value:
       * - undefined: all hooks from the array should be executed (post-order case)
       * - null: execute hooks only from the saved index until the end of the array (pre-order case, when
       * flushing the remaining hooks)
       * - number: execute hooks only from the saved index until that node index exclusive (pre-order
       * case, when executing select(number))
       */


      function executeCheckHooks(lView, hooks, nodeIndex) {
        callHooks(lView, hooks, 3
        /* InitPhaseCompleted */
        , nodeIndex);
      }
      /**
       * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,
       * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.
       * @param lView The LView where hooks are defined
       * @param hooks Hooks to be run
       * @param initPhase A phase for which hooks should be run
       * @param nodeIndex 3 cases depending on the value:
       * - undefined: all hooks from the array should be executed (post-order case)
       * - null: execute hooks only from the saved index until the end of the array (pre-order case, when
       * flushing the remaining hooks)
       * - number: execute hooks only from the saved index until that node index exclusive (pre-order
       * case, when executing select(number))
       */


      function executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {
        ngDevMode && assertNotEqual(initPhase, 3
        /* InitPhaseCompleted */
        , 'Init pre-order hooks should not be called more than once');

        if ((lView[FLAGS] & 3
        /* InitPhaseStateMask */
        ) === initPhase) {
          callHooks(lView, hooks, initPhase, nodeIndex);
        }
      }

      function incrementInitPhaseFlags(lView, initPhase) {
        ngDevMode && assertNotEqual(initPhase, 3
        /* InitPhaseCompleted */
        , 'Init hooks phase should not be incremented after all init hooks have been run.');
        var flags = lView[FLAGS];

        if ((flags & 3
        /* InitPhaseStateMask */
        ) === initPhase) {
          flags &= 2047
          /* IndexWithinInitPhaseReset */
          ;
          flags += 1
          /* InitPhaseStateIncrementer */
          ;
          lView[FLAGS] = flags;
        }
      }
      /**
       * Calls lifecycle hooks with their contexts, skipping init hooks if it's not
       * the first LView pass
       *
       * @param currentView The current view
       * @param arr The array in which the hooks are found
       * @param initPhaseState the current state of the init phase
       * @param currentNodeIndex 3 cases depending on the value:
       * - undefined: all hooks from the array should be executed (post-order case)
       * - null: execute hooks only from the saved index until the end of the array (pre-order case, when
       * flushing the remaining hooks)
       * - number: execute hooks only from the saved index until that node index exclusive (pre-order
       * case, when executing select(number))
       */


      function callHooks(currentView, arr, initPhase, currentNodeIndex) {
        ngDevMode && assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.');
        var startIndex = currentNodeIndex !== undefined ? currentView[PREORDER_HOOK_FLAGS] & 65535
        /* IndexOfTheNextPreOrderHookMaskMask */
        : 0;
        var nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;
        var max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1

        var lastNodeIndexFound = 0;

        for (var i = startIndex; i < max; i++) {
          var hook = arr[i + 1];

          if (typeof hook === 'number') {
            lastNodeIndexFound = arr[i];

            if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {
              break;
            }
          } else {
            var isInitHook = arr[i] < 0;
            if (isInitHook) currentView[PREORDER_HOOK_FLAGS] += 65536
            /* NumberOfInitHooksCalledIncrementer */
            ;

            if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {
              callHook(currentView, initPhase, arr, i);
              currentView[PREORDER_HOOK_FLAGS] = (currentView[PREORDER_HOOK_FLAGS] & 4294901760
              /* NumberOfInitHooksCalledMask */
              ) + i + 2;
            }

            i++;
          }
        }
      }
      /**
       * Execute one hook against the current `LView`.
       *
       * @param currentView The current view
       * @param initPhaseState the current state of the init phase
       * @param arr The array in which the hooks are found
       * @param i The current index within the hook data array
       */


      function callHook(currentView, initPhase, arr, i) {
        var isInitHook = arr[i] < 0;
        var hook = arr[i + 1];
        var directiveIndex = isInitHook ? -arr[i] : arr[i];
        var directive = currentView[directiveIndex];

        if (isInitHook) {
          var indexWithintInitPhase = currentView[FLAGS] >> 11
          /* IndexWithinInitPhaseShift */
          ; // The init phase state must be always checked here as it may have been recursively updated.

          if (indexWithintInitPhase < currentView[PREORDER_HOOK_FLAGS] >> 16
          /* NumberOfInitHooksCalledShift */
          && (currentView[FLAGS] & 3
          /* InitPhaseStateMask */
          ) === initPhase) {
            currentView[FLAGS] += 2048
            /* IndexWithinInitPhaseIncrementer */
            ;
            hook.call(directive);
          }
        } else {
          hook.call(directive);
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var NO_PARENT_INJECTOR = -1;
      /**
       * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in
       * `TView.data`. This allows us to store information about the current node's tokens (which
       * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be
       * shared, so they live in `LView`).
       *
       * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter
       * determines whether a directive is available on the associated node or not. This prevents us
       * from searching the directives array at this level unless it's probable the directive is in it.
       *
       * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.
       *
       * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed
       * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`
       * will differ based on where it is flattened into the main array, so it's not possible to know
       * the indices ahead of time and save their types here. The interfaces are still included here
       * for documentation purposes.
       *
       * export interface LInjector extends Array<any> {
       *
       *    // Cumulative bloom for directive IDs 0-31  (IDs are % BLOOM_SIZE)
       *    [0]: number;
       *
       *    // Cumulative bloom for directive IDs 32-63
       *    [1]: number;
       *
       *    // Cumulative bloom for directive IDs 64-95
       *    [2]: number;
       *
       *    // Cumulative bloom for directive IDs 96-127
       *    [3]: number;
       *
       *    // Cumulative bloom for directive IDs 128-159
       *    [4]: number;
       *
       *    // Cumulative bloom for directive IDs 160 - 191
       *    [5]: number;
       *
       *    // Cumulative bloom for directive IDs 192 - 223
       *    [6]: number;
       *
       *    // Cumulative bloom for directive IDs 224 - 255
       *    [7]: number;
       *
       *    // We need to store a reference to the injector's parent so DI can keep looking up
       *    // the injector tree until it finds the dependency it's looking for.
       *    [PARENT_INJECTOR]: number;
       * }
       *
       * export interface TInjector extends Array<any> {
       *
       *    // Shared node bloom for directive IDs 0-31  (IDs are % BLOOM_SIZE)
       *    [0]: number;
       *
       *    // Shared node bloom for directive IDs 32-63
       *    [1]: number;
       *
       *    // Shared node bloom for directive IDs 64-95
       *    [2]: number;
       *
       *    // Shared node bloom for directive IDs 96-127
       *    [3]: number;
       *
       *    // Shared node bloom for directive IDs 128-159
       *    [4]: number;
       *
       *    // Shared node bloom for directive IDs 160 - 191
       *    [5]: number;
       *
       *    // Shared node bloom for directive IDs 192 - 223
       *    [6]: number;
       *
       *    // Shared node bloom for directive IDs 224 - 255
       *    [7]: number;
       *
       *    // Necessary to find directive indices for a particular node.
       *    [TNODE]: TElementNode|TElementContainerNode|TContainerNode;
       *  }
       */

      /**
       * Factory for creating instances of injectors in the NodeInjector.
       *
       * This factory is complicated by the fact that it can resolve `multi` factories as well.
       *
       * NOTE: Some of the fields are optional which means that this class has two hidden classes.
       * - One without `multi` support (most common)
       * - One with `multi` values, (rare).
       *
       * Since VMs can cache up to 4 inline hidden classes this is OK.
       *
       * - Single factory: Only `resolving` and `factory` is defined.
       * - `providers` factory: `componentProviders` is a number and `index = -1`.
       * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.
       */

      var NodeInjectorFactory = function NodeInjectorFactory(
      /**
       * Factory to invoke in order to create a new instance.
       */
      factory,
      /**
       * Set to `true` if the token is declared in `viewProviders` (or if it is component).
       */
      isViewProvider, injectImplementation) {
        _classCallCheck(this, NodeInjectorFactory);

        this.factory = factory;
        /**
         * Marker set to true during factory invocation to see if we get into recursive loop.
         * Recursive loop causes an error to be displayed.
         */

        this.resolving = false;
        ngDevMode && assertDefined(factory, 'Factory not specified');
        ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.');
        this.canSeeViewProviders = isViewProvider;
        this.injectImpl = injectImplementation;
      };

      function isFactory(obj) {
        return obj instanceof NodeInjectorFactory;
      } // Note: This hack is necessary so we don't erroneously get a circular dependency
      // failure based on types.


      var unusedValueExportToPlacateAjd$3 = 1;
      /**
       * Converts `TNodeType` into human readable text.
       * Make sure this matches with `TNodeType`
       */

      function toTNodeTypeAsString(tNodeType) {
        var text = '';
        tNodeType & 1
        /* Text */
        && (text += '|Text');
        tNodeType & 2
        /* Element */
        && (text += '|Element');
        tNodeType & 4
        /* Container */
        && (text += '|Container');
        tNodeType & 8
        /* ElementContainer */
        && (text += '|ElementContainer');
        tNodeType & 16
        /* Projection */
        && (text += '|Projection');
        tNodeType & 32
        /* Icu */
        && (text += '|IcuContainer');
        tNodeType & 64
        /* Placeholder */
        && (text += '|Placeholder');
        return text.length > 0 ? text.substring(1) : text;
      } // Note: This hack is necessary so we don't erroneously get a circular dependency
      // failure based on types.


      var unusedValueExportToPlacateAjd$4 = 1;
      /**
       * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.
       *
       * ```
       * <div my-dir [class]="exp"></div>
       * ```
       * and
       * ```
       * @Directive({
       * })
       * class MyDirective {
       *   @Input()
       *   class: string;
       * }
       * ```
       *
       * In the above case it is necessary to write the reconciled styling information into the
       * directive's input.
       *
       * @param tNode
       */

      function hasClassInput(tNode) {
        return (tNode.flags & 16
        /* hasClassInput */
        ) !== 0;
      }
      /**
       * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.
       *
       * ```
       * <div my-dir [style]="exp"></div>
       * ```
       * and
       * ```
       * @Directive({
       * })
       * class MyDirective {
       *   @Input()
       *   class: string;
       * }
       * ```
       *
       * In the above case it is necessary to write the reconciled styling information into the
       * directive's input.
       *
       * @param tNode
       */


      function hasStyleInput(tNode) {
        return (tNode.flags & 32
        /* hasStyleInput */
        ) !== 0;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function assertTNodeType(tNode, expectedTypes, message) {
        assertDefined(tNode, 'should be called with a TNode');

        if ((tNode.type & expectedTypes) === 0) {
          throwError(message || "Expected [".concat(toTNodeTypeAsString(expectedTypes), "] but got ").concat(toTNodeTypeAsString(tNode.type), "."));
        }
      }

      function assertPureTNodeType(type) {
        if (!(type === 2
        /* Element */
        || //
        type === 1
        /* Text */
        || //
        type === 4
        /* Container */
        || //
        type === 8
        /* ElementContainer */
        || //
        type === 32
        /* Icu */
        || //
        type === 16
        /* Projection */
        || //
        type === 64
        /* Placeholder */
        )) {
          throwError("Expected TNodeType to have only a single type selected, but got ".concat(toTNodeTypeAsString(type), "."));
        }
      }
      /**
       * Assigns all attribute values to the provided element via the inferred renderer.
       *
       * This function accepts two forms of attribute entries:
       *
       * default: (key, value):
       *  attrs = [key1, value1, key2, value2]
       *
       * namespaced: (NAMESPACE_MARKER, uri, name, value)
       *  attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]
       *
       * The `attrs` array can contain a mix of both the default and namespaced entries.
       * The "default" values are set without a marker, but if the function comes across
       * a marker value then it will attempt to set a namespaced value. If the marker is
       * not of a namespaced value then the function will quit and return the index value
       * where it stopped during the iteration of the attrs array.
       *
       * See [AttributeMarker] to understand what the namespace marker value is.
       *
       * Note that this instruction does not support assigning style and class values to
       * an element. See `elementStart` and `elementHostAttrs` to learn how styling values
       * are applied to an element.
       * @param renderer The renderer to be used
       * @param native The element that the attributes will be assigned to
       * @param attrs The attribute array of values that will be assigned to the element
       * @returns the index value that was last accessed in the attributes array
       */


      function setUpAttributes(renderer, _native, attrs) {
        var isProc = isProceduralRenderer(renderer);
        var i = 0;

        while (i < attrs.length) {
          var value = attrs[i];

          if (typeof value === 'number') {
            // only namespaces are supported. Other value types (such as style/class
            // entries) are not supported in this function.
            if (value !== 0
            /* NamespaceURI */
            ) {
              break;
            } // we just landed on the marker value ... therefore
            // we should skip to the next entry


            i++;
            var namespaceURI = attrs[i++];
            var attrName = attrs[i++];
            var attrVal = attrs[i++];
            ngDevMode && ngDevMode.rendererSetAttribute++;
            isProc ? renderer.setAttribute(_native, attrName, attrVal, namespaceURI) : _native.setAttributeNS(namespaceURI, attrName, attrVal);
          } else {
            // attrName is string;
            var _attrName = value;
            var _attrVal = attrs[++i]; // Standard attributes

            ngDevMode && ngDevMode.rendererSetAttribute++;

            if (isAnimationProp(_attrName)) {
              if (isProc) {
                renderer.setProperty(_native, _attrName, _attrVal);
              }
            } else {
              isProc ? renderer.setAttribute(_native, _attrName, _attrVal) : _native.setAttribute(_attrName, _attrVal);
            }

            i++;
          }
        } // another piece of code may iterate over the same attributes array. Therefore
        // it may be helpful to return the exact spot where the attributes array exited
        // whether by running into an unsupported marker or if all the static values were
        // iterated over.


        return i;
      }
      /**
       * Test whether the given value is a marker that indicates that the following
       * attribute values in a `TAttributes` array are only the names of attributes,
       * and not name-value pairs.
       * @param marker The attribute marker to test.
       * @returns true if the marker is a "name-only" marker (e.g. `Bindings`, `Template` or `I18n`).
       */


      function isNameOnlyAttributeMarker(marker) {
        return marker === 3
        /* Bindings */
        || marker === 4
        /* Template */
        || marker === 6
        /* I18n */
        ;
      }

      function isAnimationProp(name) {
        // Perf note: accessing charCodeAt to check for the first character of a string is faster as
        // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that
        // charCodeAt doesn't allocate memory to return a substring.
        return name.charCodeAt(0) === 64
        /* AT_SIGN */
        ;
      }
      /**
       * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process.
       *
       * This merge function keeps the order of attrs same.
       *
       * @param dst Location of where the merged `TAttributes` should end up.
       * @param src `TAttributes` which should be appended to `dst`
       */


      function mergeHostAttrs(dst, src) {
        if (src === null || src.length === 0) {// do nothing
        } else if (dst === null || dst.length === 0) {
          // We have source, but dst is empty, just make a copy.
          dst = src.slice();
        } else {
          var srcMarker = -1
          /* ImplicitAttributes */
          ;

          for (var i = 0; i < src.length; i++) {
            var item = src[i];

            if (typeof item === 'number') {
              srcMarker = item;
            } else {
              if (srcMarker === 0
              /* NamespaceURI */
              ) {// Case where we need to consume `key1`, `key2`, `value` items.
              } else if (srcMarker === -1
              /* ImplicitAttributes */
              || srcMarker === 2
              /* Styles */
              ) {
                // Case where we have to consume `key1` and `value` only.
                mergeHostAttribute(dst, srcMarker, item, null, src[++i]);
              } else {
                // Case where we have to consume `key1` only.
                mergeHostAttribute(dst, srcMarker, item, null, null);
              }
            }
          }
        }

        return dst;
      }
      /**
       * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account.
       *
       * @param dst `TAttributes` to append to.
       * @param marker Region where the `key`/`value` should be added.
       * @param key1 Key to add to `TAttributes`
       * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`)
       * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class.
       */


      function mergeHostAttribute(dst, marker, key1, key2, value) {
        var i = 0; // Assume that new markers will be inserted at the end.

        var markerInsertPosition = dst.length; // scan until correct type.

        if (marker === -1
        /* ImplicitAttributes */
        ) {
          markerInsertPosition = -1;
        } else {
          while (i < dst.length) {
            var dstValue = dst[i++];

            if (typeof dstValue === 'number') {
              if (dstValue === marker) {
                markerInsertPosition = -1;
                break;
              } else if (dstValue > marker) {
                // We need to save this as we want the markers to be inserted in specific order.
                markerInsertPosition = i - 1;
                break;
              }
            }
          }
        } // search until you find place of insertion


        while (i < dst.length) {
          var item = dst[i];

          if (typeof item === 'number') {
            // since `i` started as the index after the marker, we did not find it if we are at the next
            // marker
            break;
          } else if (item === key1) {
            // We already have same token
            if (key2 === null) {
              if (value !== null) {
                dst[i + 1] = value;
              }

              return;
            } else if (key2 === dst[i + 1]) {
              dst[i + 2] = value;
              return;
            }
          } // Increment counter.


          i++;
          if (key2 !== null) i++;
          if (value !== null) i++;
        } // insert at location.


        if (markerInsertPosition !== -1) {
          dst.splice(markerInsertPosition, 0, marker);
          i = markerInsertPosition + 1;
        }

        dst.splice(i++, 0, key1);

        if (key2 !== null) {
          dst.splice(i++, 0, key2);
        }

        if (value !== null) {
          dst.splice(i++, 0, value);
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      /// Parent Injector Utils ///////////////////////////////////////////////////////////////


      function hasParentInjector(parentLocation) {
        return parentLocation !== NO_PARENT_INJECTOR;
      }

      function getParentInjectorIndex(parentLocation) {
        ngDevMode && assertNumber(parentLocation, 'Number expected');
        ngDevMode && assertNotEqual(parentLocation, -1, 'Not a valid state.');
        var parentInjectorIndex = parentLocation & 32767
        /* InjectorIndexMask */
        ;
        ngDevMode && assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.');
        return parentLocation & 32767
        /* InjectorIndexMask */
        ;
      }

      function getParentInjectorViewOffset(parentLocation) {
        return parentLocation >> 16
        /* ViewOffsetShift */
        ;
      }
      /**
       * Unwraps a parent injector location number to find the view offset from the current injector,
       * then walks up the declaration view tree until the view is found that contains the parent
       * injector.
       *
       * @param location The location of the parent injector, which contains the view offset
       * @param startView The LView instance from which to start walking up the view tree
       * @returns The LView instance that contains the parent injector
       */


      function getParentInjectorView(location, startView) {
        var viewOffset = getParentInjectorViewOffset(location);
        var parentView = startView; // For most cases, the parent injector can be found on the host node (e.g. for component
        // or container), but we must keep the loop here to support the rarer case of deeply nested
        // <ng-template> tags or inline views, where the parent injector might live many views
        // above the child injector.

        while (viewOffset > 0) {
          parentView = parentView[DECLARATION_VIEW];
          viewOffset--;
        }

        return parentView;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Defines if the call to `inject` should include `viewProviders` in its resolution.
       *
       * This is set to true when we try to instantiate a component. This value is reset in
       * `getNodeInjectable` to a value which matches the declaration location of the token about to be
       * instantiated. This is done so that if we are injecting a token which was declared outside of
       * `viewProviders` we don't accidentally pull `viewProviders` in.
       *
       * Example:
       *
       * ```
       * @Injectable()
       * class MyService {
       *   constructor(public value: String) {}
       * }
       *
       * @Component({
       *   providers: [
       *     MyService,
       *     {provide: String, value: 'providers' }
       *   ]
       *   viewProviders: [
       *     {provide: String, value: 'viewProviders'}
       *   ]
       * })
       * class MyComponent {
       *   constructor(myService: MyService, value: String) {
       *     // We expect that Component can see into `viewProviders`.
       *     expect(value).toEqual('viewProviders');
       *     // `MyService` was not declared in `viewProviders` hence it can't see it.
       *     expect(myService.value).toEqual('providers');
       *   }
       * }
       *
       * ```
       */


      var includeViewProviders = true;

      function setIncludeViewProviders(v) {
        var oldValue = includeViewProviders;
        includeViewProviders = v;
        return oldValue;
      }
      /**
       * The number of slots in each bloom filter (used by DI). The larger this number, the fewer
       * directives that will share slots, and thus, the fewer false positives when checking for
       * the existence of a directive.
       */


      var BLOOM_SIZE = 256;
      var BLOOM_MASK = BLOOM_SIZE - 1;
      /** Counter used to generate unique IDs for directives. */

      var nextNgElementId = 0;
      /**
       * Registers this directive as present in its node's injector by flipping the directive's
       * corresponding bit in the injector's bloom filter.
       *
       * @param injectorIndex The index of the node injector where this token should be registered
       * @param tView The TView for the injector's bloom filters
       * @param type The directive token to register
       */

      function bloomAdd(injectorIndex, tView, type) {
        ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');
        var id;

        if (typeof type === 'string') {
          id = type.charCodeAt(0) || 0;
        } else if (type.hasOwnProperty(NG_ELEMENT_ID)) {
          id = type[NG_ELEMENT_ID];
        } // Set a unique ID on the directive type, so if something tries to inject the directive,
        // we can easily retrieve the ID and hash it into the bloom bit that should be checked.


        if (id == null) {
          id = type[NG_ELEMENT_ID] = nextNgElementId++;
        } // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),
        // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.


        var bloomBit = id & BLOOM_MASK; // Create a mask that targets the specific bit associated with the directive.
        // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding
        // to bit positions 0 - 31 in a 32 bit integer.

        var mask = 1 << bloomBit; // Use the raw bloomBit number to determine which bloom filter bucket we should check
        // e.g: bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc

        var b7 = bloomBit & 0x80;
        var b6 = bloomBit & 0x40;
        var b5 = bloomBit & 0x20;
        var tData = tView.data;

        if (b7) {
          b6 ? b5 ? tData[injectorIndex + 7] |= mask : tData[injectorIndex + 6] |= mask : b5 ? tData[injectorIndex + 5] |= mask : tData[injectorIndex + 4] |= mask;
        } else {
          b6 ? b5 ? tData[injectorIndex + 3] |= mask : tData[injectorIndex + 2] |= mask : b5 ? tData[injectorIndex + 1] |= mask : tData[injectorIndex] |= mask;
        }
      }
      /**
       * Creates (or gets an existing) injector for a given element or container.
       *
       * @param tNode for which an injector should be retrieved / created.
       * @param lView View where the node is stored
       * @returns Node injector
       */


      function getOrCreateNodeInjectorForNode(tNode, lView) {
        var existingInjectorIndex = getInjectorIndex(tNode, lView);

        if (existingInjectorIndex !== -1) {
          return existingInjectorIndex;
        }

        var tView = lView[TVIEW];

        if (tView.firstCreatePass) {
          tNode.injectorIndex = lView.length;
          insertBloom(tView.data, tNode); // foundation for node bloom

          insertBloom(lView, null); // foundation for cumulative bloom

          insertBloom(tView.blueprint, null);
        }

        var parentLoc = getParentInjectorLocation(tNode, lView);
        var injectorIndex = tNode.injectorIndex; // If a parent injector can't be found, its location is set to -1.
        // In that case, we don't need to set up a cumulative bloom

        if (hasParentInjector(parentLoc)) {
          var parentIndex = getParentInjectorIndex(parentLoc);
          var parentLView = getParentInjectorView(parentLoc, lView);
          var parentData = parentLView[TVIEW].data; // Creates a cumulative bloom filter that merges the parent's bloom filter
          // and its own cumulative bloom (which contains tokens for all ancestors)

          for (var i = 0; i < 8
          /* BLOOM_SIZE */
          ; i++) {
            lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];
          }
        }

        lView[injectorIndex + 8
        /* PARENT */
        ] = parentLoc;
        return injectorIndex;
      }

      function insertBloom(arr, footer) {
        arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);
      }

      function getInjectorIndex(tNode, lView) {
        if (tNode.injectorIndex === -1 || // If the injector index is the same as its parent's injector index, then the index has been
        // copied down from the parent node. No injector has been created yet on this node.
        tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex || // After the first template pass, the injector index might exist but the parent values
        // might not have been calculated yet for this instance
        lView[tNode.injectorIndex + 8
        /* PARENT */
        ] === null) {
          return -1;
        } else {
          ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);
          return tNode.injectorIndex;
        }
      }
      /**
       * Finds the index of the parent injector, with a view offset if applicable. Used to set the
       * parent injector initially.
       *
       * @returns Returns a number that is the combination of the number of LViews that we have to go up
       * to find the LView containing the parent inject AND the index of the injector within that LView.
       */


      function getParentInjectorLocation(tNode, lView) {
        if (tNode.parent && tNode.parent.injectorIndex !== -1) {
          // If we have a parent `TNode` and there is an injector associated with it we are done, because
          // the parent injector is within the current `LView`.
          return tNode.parent.injectorIndex; // ViewOffset is 0
        } // When parent injector location is computed it may be outside of the current view. (ie it could
        // be pointing to a declared parent location). This variable stores number of declaration parents
        // we need to walk up in order to find the parent injector location.


        var declarationViewOffset = 0;
        var parentTNode = null;
        var lViewCursor = lView; // The parent injector is not in the current `LView`. We will have to walk the declared parent
        // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent
        // `NodeInjector`.

        while (lViewCursor !== null) {
          // First determine the `parentTNode` location. The parent pointer differs based on `TView.type`.
          var tView = lViewCursor[TVIEW];
          var tViewType = tView.type;

          if (tViewType === 2
          /* Embedded */
          ) {
            ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');
            parentTNode = tView.declTNode;
          } else if (tViewType === 1
          /* Component */
          ) {
            // Components don't have `TView.declTNode` because each instance of component could be
            // inserted in different location, hence `TView.declTNode` is meaningless.
            parentTNode = lViewCursor[T_HOST];
          } else {
            ngDevMode && assertEqual(tView.type, 0
            /* Root */
            , 'Root type expected');
            parentTNode = null;
          }

          if (parentTNode === null) {
            // If we have no parent, than we are done.
            return NO_PARENT_INJECTOR;
          }

          ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]); // Every iteration of the loop requires that we go to the declared parent.

          declarationViewOffset++;
          lViewCursor = lViewCursor[DECLARATION_VIEW];

          if (parentTNode.injectorIndex !== -1) {
            // We found a NodeInjector which points to something.
            return parentTNode.injectorIndex | declarationViewOffset << 16
            /* ViewOffsetShift */
            ;
          }
        }

        return NO_PARENT_INJECTOR;
      }
      /**
       * Makes a type or an injection token public to the DI system by adding it to an
       * injector's bloom filter.
       *
       * @param di The node injector in which a directive will be added
       * @param token The type or the injection token to be made public
       */


      function diPublicInInjector(injectorIndex, tView, token) {
        bloomAdd(injectorIndex, tView, token);
      }
      /**
       * Inject static attribute value into directive constructor.
       *
       * This method is used with `factory` functions which are generated as part of
       * `defineDirective` or `defineComponent`. The method retrieves the static value
       * of an attribute. (Dynamic attributes are not supported since they are not resolved
       *  at the time of injection and can change over time.)
       *
       * # Example
       * Given:
       * ```
       * @Component(...)
       * class MyComponent {
       *   constructor(@Attribute('title') title: string) { ... }
       * }
       * ```
       * When instantiated with
       * ```
       * <my-component title="Hello"></my-component>
       * ```
       *
       * Then factory method generated is:
       * ```
       * MyComponent.ɵcmp = defineComponent({
       *   factory: () => new MyComponent(injectAttribute('title'))
       *   ...
       * })
       * ```
       *
       * @publicApi
       */


      function injectAttributeImpl(tNode, attrNameToInject) {
        ngDevMode && assertTNodeType(tNode, 12
        /* AnyContainer */
        | 3
        /* AnyRNode */
        );
        ngDevMode && assertDefined(tNode, 'expecting tNode');

        if (attrNameToInject === 'class') {
          return tNode.classes;
        }

        if (attrNameToInject === 'style') {
          return tNode.styles;
        }

        var attrs = tNode.attrs;

        if (attrs) {
          var attrsLength = attrs.length;
          var i = 0;

          while (i < attrsLength) {
            var value = attrs[i]; // If we hit a `Bindings` or `Template` marker then we are done.

            if (isNameOnlyAttributeMarker(value)) break; // Skip namespaced attributes

            if (value === 0
            /* NamespaceURI */
            ) {
              // we skip the next two values
              // as namespaced attributes looks like
              // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',
              // 'existValue', ...]
              i = i + 2;
            } else if (typeof value === 'number') {
              // Skip to the first value of the marked attribute.
              i++;

              while (i < attrsLength && typeof attrs[i] === 'string') {
                i++;
              }
            } else if (value === attrNameToInject) {
              return attrs[i + 1];
            } else {
              i = i + 2;
            }
          }
        }

        return null;
      }

      function notFoundValueOrThrow(notFoundValue, token, flags) {
        if (flags & InjectFlags.Optional) {
          return notFoundValue;
        } else {
          throwProviderNotFoundError(token, 'NodeInjector');
        }
      }
      /**
       * Returns the value associated to the given token from the ModuleInjector or throws exception
       *
       * @param lView The `LView` that contains the `tNode`
       * @param token The token to look for
       * @param flags Injection flags
       * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`
       * @returns the value from the injector or throws an exception
       */


      function lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {
        if (flags & InjectFlags.Optional && notFoundValue === undefined) {
          // This must be set or the NullInjector will throw for optional deps
          notFoundValue = null;
        }

        if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {
          var moduleInjector = lView[INJECTOR]; // switch to `injectInjectorOnly` implementation for module injector, since module injector
          // should not have access to Component/Directive DI scope (that may happen through
          // `directiveInject` implementation)

          var previousInjectImplementation = setInjectImplementation(undefined);

          try {
            if (moduleInjector) {
              return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);
            } else {
              return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);
            }
          } finally {
            setInjectImplementation(previousInjectImplementation);
          }
        }

        return notFoundValueOrThrow(notFoundValue, token, flags);
      }
      /**
       * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.
       *
       * Look for the injector providing the token by walking up the node injector tree and then
       * the module injector tree.
       *
       * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom
       * filter. `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)
       *
       * @param tNode The Node where the search for the injector should start
       * @param lView The `LView` that contains the `tNode`
       * @param token The token to look for
       * @param flags Injection flags
       * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`
       * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided
       */


      function getOrCreateInjectable(tNode, lView, token) {
        var flags = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : InjectFlags.Default;
        var notFoundValue = arguments.length > 4 ? arguments[4] : undefined;

        if (tNode !== null) {
          var bloomHash = bloomHashBitOrFactory(token); // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef
          // so just call the factory function to create it.

          if (typeof bloomHash === 'function') {
            if (!enterDI(lView, tNode, flags)) {
              // Failed to enter DI, try module injector instead. If a token is injected with the @Host
              // flag, the module injector is not searched for that token in Ivy.
              return flags & InjectFlags.Host ? notFoundValueOrThrow(notFoundValue, token, flags) : lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
            }

            try {
              var value = bloomHash();

              if (value == null && !(flags & InjectFlags.Optional)) {
                throwProviderNotFoundError(token);
              } else {
                return value;
              }
            } finally {
              leaveDI();
            }
          } else if (typeof bloomHash === 'number') {
            // A reference to the previous injector TView that was found while climbing the element
            // injector tree. This is used to know if viewProviders can be accessed on the current
            // injector.
            var previousTView = null;
            var injectorIndex = getInjectorIndex(tNode, lView);
            var parentLocation = NO_PARENT_INJECTOR;
            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
            // searching the parent injector.

            if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {
              parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) : lView[injectorIndex + 8
              /* PARENT */
              ];

              if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {
                injectorIndex = -1;
              } else {
                previousTView = lView[TVIEW];
                injectorIndex = getParentInjectorIndex(parentLocation);
                lView = getParentInjectorView(parentLocation, lView);
              }
            } // Traverse up the injector tree until we find a potential match or until we know there
            // *isn't* a match.


            while (injectorIndex !== -1) {
              ngDevMode && assertNodeInjector(lView, injectorIndex); // Check the current injector. If it matches, see if it contains token.

              var tView = lView[TVIEW];
              ngDevMode && assertTNodeForLView(tView.data[injectorIndex + 8
              /* TNODE */
              ], lView);

              if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {
                // At this point, we have an injector which *may* contain the token, so we step through
                // the providers and directives associated with the injector's corresponding node to get
                // the instance.
                var instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);

                if (instance !== NOT_FOUND) {
                  return instance;
                }
              }

              parentLocation = lView[injectorIndex + 8
              /* PARENT */
              ];

              if (parentLocation !== NO_PARENT_INJECTOR && shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8
              /* TNODE */
              ] === hostTElementNode) && bloomHasToken(bloomHash, injectorIndex, lView)) {
                // The def wasn't found anywhere on this node, so it was a false positive.
                // Traverse up the tree and continue searching.
                previousTView = tView;
                injectorIndex = getParentInjectorIndex(parentLocation);
                lView = getParentInjectorView(parentLocation, lView);
              } else {
                // If we should not search parent OR If the ancestor bloom filter value does not have the
                // bit corresponding to the directive we can give up on traversing up to find the specific
                // injector.
                injectorIndex = -1;
              }
            }
          }
        }

        return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
      }

      var NOT_FOUND = {};

      function createNodeInjector() {
        return new NodeInjector(getCurrentTNode(), getLView());
      }

      function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {
        var currentTView = lView[TVIEW];
        var tNode = currentTView.data[injectorIndex + 8
        /* TNODE */
        ]; // First, we need to determine if view providers can be accessed by the starting element.
        // There are two possibilities

        var canAccessViewProviders = previousTView == null ? // 1) This is the first invocation `previousTView == null` which means that we are at the
        // `TNode` of where injector is starting to look. In such a case the only time we are allowed
        // to look into the ViewProviders is if:
        // - we are on a component
        // - AND the injector set `includeViewProviders` to true (implying that the token can see
        // ViewProviders because it is the Component or a Service which itself was declared in
        // ViewProviders)
        isComponentHost(tNode) && includeViewProviders : // 2) `previousTView != null` which means that we are now walking across the parent nodes.
        // In such a case we are only allowed to look into the ViewProviders if:
        // - We just crossed from child View to Parent View `previousTView != currentTView`
        // - AND the parent TNode is an Element.
        // This means that we just came from the Component's View and therefore are allowed to see
        // into the ViewProviders.
        previousTView != currentTView && (tNode.type & 3
        /* AnyRNode */
        ) !== 0; // This special case happens when there is a @host on the inject and when we are searching
        // on the host element node.

        var isHostSpecialCase = flags & InjectFlags.Host && hostTElementNode === tNode;
        var injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);

        if (injectableIdx !== null) {
          return getNodeInjectable(lView, currentTView, injectableIdx, tNode);
        } else {
          return NOT_FOUND;
        }
      }
      /**
       * Searches for the given token among the node's directives and providers.
       *
       * @param tNode TNode on which directives are present.
       * @param tView The tView we are currently processing
       * @param token Provider token or type of a directive to look for.
       * @param canAccessViewProviders Whether view providers should be considered.
       * @param isHostSpecialCase Whether the host special case applies.
       * @returns Index of a found directive or provider, or null when none found.
       */


      function locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {
        var nodeProviderIndexes = tNode.providerIndexes;
        var tInjectables = tView.data;
        var injectablesStart = nodeProviderIndexes & 1048575
        /* ProvidersStartIndexMask */
        ;
        var directivesStart = tNode.directiveStart;
        var directiveEnd = tNode.directiveEnd;
        var cptViewProvidersCount = nodeProviderIndexes >> 20
        /* CptViewProvidersCountShift */
        ;
        var startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount; // When the host special case applies, only the viewProviders and the component are visible

        var endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;

        for (var i = startingIndex; i < endIndex; i++) {
          var providerTokenOrDef = tInjectables[i];

          if (i < directivesStart && token === providerTokenOrDef || i >= directivesStart && providerTokenOrDef.type === token) {
            return i;
          }
        }

        if (isHostSpecialCase) {
          var dirDef = tInjectables[directivesStart];

          if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {
            return directivesStart;
          }
        }

        return null;
      }
      /**
       * Retrieve or instantiate the injectable from the `LView` at particular `index`.
       *
       * This function checks to see if the value has already been instantiated and if so returns the
       * cached `injectable`. Otherwise if it detects that the value is still a factory it
       * instantiates the `injectable` and caches the value.
       */


      function getNodeInjectable(lView, tView, index, tNode) {
        var value = lView[index];
        var tData = tView.data;

        if (isFactory(value)) {
          var factory = value;

          if (factory.resolving) {
            throwCyclicDependencyError(stringifyForError(tData[index]));
          }

          var previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);
          factory.resolving = true;
          var previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null;
          var success = enterDI(lView, tNode, InjectFlags.Default);
          ngDevMode && assertEqual(success, true, 'Because flags do not contain \`SkipSelf\' we expect this to always succeed.');

          try {
            value = lView[index] = factory.factory(undefined, tData, lView, tNode); // This code path is hit for both directives and providers.
            // For perf reasons, we want to avoid searching for hooks on providers.
            // It does no harm to try (the hooks just won't exist), but the extra
            // checks are unnecessary and this is a hot path. So we check to see
            // if the index of the dependency is in the directive range for this
            // tNode. If it's not, we know it's a provider and skip hook registration.

            if (tView.firstCreatePass && index >= tNode.directiveStart) {
              ngDevMode && assertDirectiveDef(tData[index]);
              registerPreOrderHooks(index, tData[index], tView);
            }
          } finally {
            previousInjectImplementation !== null && setInjectImplementation(previousInjectImplementation);
            setIncludeViewProviders(previousIncludeViewProviders);
            factory.resolving = false;
            leaveDI();
          }
        }

        return value;
      }
      /**
       * Returns the bit in an injector's bloom filter that should be used to determine whether or not
       * the directive might be provided by the injector.
       *
       * When a directive is public, it is added to the bloom filter and given a unique ID that can be
       * retrieved on the Type. When the directive isn't public or the token is not a directive `null`
       * is returned as the node injector can not possibly provide that token.
       *
       * @param token the injection token
       * @returns the matching bit to check in the bloom filter or `null` if the token is not known.
       *   When the returned value is negative then it represents special values such as `Injector`.
       */


      function bloomHashBitOrFactory(token) {
        ngDevMode && assertDefined(token, 'token must be defined');

        if (typeof token === 'string') {
          return token.charCodeAt(0) || 0;
        }

        var tokenId = // First check with `hasOwnProperty` so we don't get an inherited ID.
        token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined; // Negative token IDs are used for special objects such as `Injector`

        if (typeof tokenId === 'number') {
          if (tokenId >= 0) {
            return tokenId & BLOOM_MASK;
          } else {
            ngDevMode && assertEqual(tokenId, -1
            /* Injector */
            , 'Expecting to get Special Injector Id');
            return createNodeInjector;
          }
        } else {
          return tokenId;
        }
      }

      function bloomHasToken(bloomHash, injectorIndex, injectorView) {
        // Create a mask that targets the specific bit associated with the directive we're looking for.
        // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding
        // to bit positions 0 - 31 in a 32 bit integer.
        var mask = 1 << bloomHash;
        var b7 = bloomHash & 0x80;
        var b6 = bloomHash & 0x40;
        var b5 = bloomHash & 0x20; // Our bloom filter size is 256 bits, which is eight 32-bit bloom filter buckets:
        // bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc.
        // Get the bloom filter value from the appropriate bucket based on the directive's bloomBit.

        var value;

        if (b7) {
          value = b6 ? b5 ? injectorView[injectorIndex + 7] : injectorView[injectorIndex + 6] : b5 ? injectorView[injectorIndex + 5] : injectorView[injectorIndex + 4];
        } else {
          value = b6 ? b5 ? injectorView[injectorIndex + 3] : injectorView[injectorIndex + 2] : b5 ? injectorView[injectorIndex + 1] : injectorView[injectorIndex];
        } // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,
        // this injector is a potential match.


        return !!(value & mask);
      }
      /** Returns true if flags prevent parent injector from being searched for tokens */


      function shouldSearchParent(flags, isFirstHostTNode) {
        return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);
      }

      var NodeInjector = /*#__PURE__*/function () {
        function NodeInjector(_tNode, _lView) {
          _classCallCheck(this, NodeInjector);

          this._tNode = _tNode;
          this._lView = _lView;
        }

        _createClass2(NodeInjector, [{
          key: "get",
          value: function get(token, notFoundValue) {
            return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue);
          }
        }]);

        return NodeInjector;
      }();
      /**
       * @codeGenApi
       */


      function ɵɵgetFactoryOf(type) {
        var typeAny = type;

        if (isForwardRef(type)) {
          return function () {
            var factory = ɵɵgetFactoryOf(resolveForwardRef(typeAny));
            return factory ? factory() : null;
          };
        }

        var factory = getFactoryDef(typeAny);

        if (factory === null) {
          var injectorDef = getInjectorDef(typeAny);
          factory = injectorDef && injectorDef.factory;
        }

        return factory || null;
      }
      /**
       * @codeGenApi
       */


      function ɵɵgetInheritedFactory(type) {
        return noSideEffects(function () {
          var ownConstructor = type.prototype.constructor;
          var ownFactory = ownConstructor[NG_FACTORY_DEF] || ɵɵgetFactoryOf(ownConstructor);
          var objectPrototype = Object.prototype;
          var parent = Object.getPrototypeOf(type.prototype).constructor; // Go up the prototype until we hit `Object`.

          while (parent && parent !== objectPrototype) {
            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,
            // we've found the inherited factory. Note the check that the factory isn't the type's
            // own factory is redundant in most cases, but if the user has custom decorators on the
            // class, this lookup will start one level down in the prototype chain, causing us to
            // find the own factory first and potentially triggering an infinite loop downstream.

            if (factory && factory !== ownFactory) {
              return factory;
            }

            parent = Object.getPrototypeOf(parent);
          } // There is no factory defined. Either this was improper usage of inheritance
          // (no Angular decorator on the superclass) or there is no constructor at all
          // in the inheritance chain. Since the two cases cannot be distinguished, the
          // latter has to be assumed.


          return function (t) {
            return new t();
          };
        });
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Facade for the attribute injection from DI.
       *
       * @codeGenApi
       */


      function ɵɵinjectAttribute(attrNameToInject) {
        return injectAttributeImpl(getCurrentTNode(), attrNameToInject);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ANNOTATIONS = '__annotations__';
      var PARAMETERS = '__parameters__';
      var PROP_METADATA = '__prop__metadata__';
      /**
       * @suppress {globalThis}
       */

      function makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {
        return noSideEffects(function () {
          var metaCtor = makeMetadataCtor(props);

          function DecoratorFactory() {
            for (var _len33 = arguments.length, args = new Array(_len33), _key34 = 0; _key34 < _len33; _key34++) {
              args[_key34] = arguments[_key34];
            }

            if (this instanceof DecoratorFactory) {
              metaCtor.call.apply(metaCtor, [this].concat(args));
              return this;
            }

            var annotationInstance = _construct(DecoratorFactory, args);

            return function TypeDecorator(cls) {
              if (typeFn) typeFn.apply(void 0, [cls].concat(args)); // Use of Object.defineProperty is important since it creates non-enumerable property which
              // prevents the property is copied during subclassing.

              var annotations = cls.hasOwnProperty(ANNOTATIONS) ? cls[ANNOTATIONS] : Object.defineProperty(cls, ANNOTATIONS, {
                value: []
              })[ANNOTATIONS];
              annotations.push(annotationInstance);
              if (additionalProcessing) additionalProcessing(cls);
              return cls;
            };
          }

          if (parentClass) {
            DecoratorFactory.prototype = Object.create(parentClass.prototype);
          }

          DecoratorFactory.prototype.ngMetadataName = name;
          DecoratorFactory.annotationCls = DecoratorFactory;
          return DecoratorFactory;
        });
      }

      function makeMetadataCtor(props) {
        return function ctor() {
          if (props) {
            var values = props.apply(void 0, arguments);

            for (var propName in values) {
              this[propName] = values[propName];
            }
          }
        };
      }

      function makeParamDecorator(name, props, parentClass) {
        return noSideEffects(function () {
          var metaCtor = makeMetadataCtor(props);

          function ParamDecoratorFactory() {
            for (var _len34 = arguments.length, args = new Array(_len34), _key35 = 0; _key35 < _len34; _key35++) {
              args[_key35] = arguments[_key35];
            }

            if (this instanceof ParamDecoratorFactory) {
              metaCtor.apply(this, args);
              return this;
            }

            var annotationInstance = _construct(ParamDecoratorFactory, args);

            ParamDecorator.annotation = annotationInstance;
            return ParamDecorator;

            function ParamDecorator(cls, unusedKey, index) {
              // Use of Object.defineProperty is important since it creates non-enumerable property which
              // prevents the property is copied during subclassing.
              var parameters = cls.hasOwnProperty(PARAMETERS) ? cls[PARAMETERS] : Object.defineProperty(cls, PARAMETERS, {
                value: []
              })[PARAMETERS]; // there might be gaps if some in between parameters do not have annotations.
              // we pad with nulls.

              while (parameters.length <= index) {
                parameters.push(null);
              }

              (parameters[index] = parameters[index] || []).push(annotationInstance);
              return cls;
            }
          }

          if (parentClass) {
            ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);
          }

          ParamDecoratorFactory.prototype.ngMetadataName = name;
          ParamDecoratorFactory.annotationCls = ParamDecoratorFactory;
          return ParamDecoratorFactory;
        });
      }

      function makePropDecorator(name, props, parentClass, additionalProcessing) {
        return noSideEffects(function () {
          var metaCtor = makeMetadataCtor(props);

          function PropDecoratorFactory() {
            for (var _len35 = arguments.length, args = new Array(_len35), _key36 = 0; _key36 < _len35; _key36++) {
              args[_key36] = arguments[_key36];
            }

            if (this instanceof PropDecoratorFactory) {
              metaCtor.apply(this, args);
              return this;
            }

            var decoratorInstance = _construct(PropDecoratorFactory, args);

            function PropDecorator(target, name) {
              var constructor = target.constructor; // Use of Object.defineProperty is important because it creates a non-enumerable property
              // which prevents the property from being copied during subclassing.

              var meta = constructor.hasOwnProperty(PROP_METADATA) ? constructor[PROP_METADATA] : Object.defineProperty(constructor, PROP_METADATA, {
                value: {}
              })[PROP_METADATA];
              meta[name] = meta.hasOwnProperty(name) && meta[name] || [];
              meta[name].unshift(decoratorInstance);
              if (additionalProcessing) additionalProcessing.apply(void 0, [target, name].concat(args));
            }

            return PropDecorator;
          }

          if (parentClass) {
            PropDecoratorFactory.prototype = Object.create(parentClass.prototype);
          }

          PropDecoratorFactory.prototype.ngMetadataName = name;
          PropDecoratorFactory.annotationCls = PropDecoratorFactory;
          return PropDecoratorFactory;
        });
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function CREATE_ATTRIBUTE_DECORATOR__PRE_R3__() {
        return makeParamDecorator('Attribute', function (attributeName) {
          return {
            attributeName: attributeName
          };
        });
      }

      function CREATE_ATTRIBUTE_DECORATOR__POST_R3__() {
        return makeParamDecorator('Attribute', function (attributeName) {
          return {
            attributeName: attributeName,
            __NG_ELEMENT_ID__: function __NG_ELEMENT_ID__() {
              return ɵɵinjectAttribute(attributeName);
            }
          };
        });
      }

      var CREATE_ATTRIBUTE_DECORATOR_IMPL = CREATE_ATTRIBUTE_DECORATOR__POST_R3__;
      /**
       * Attribute decorator and metadata.
       *
       * @Annotation
       * @publicApi
       */

      var Attribute = CREATE_ATTRIBUTE_DECORATOR_IMPL();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Creates a token that can be used in a DI Provider.
       *
       * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a
       * runtime representation) such as when injecting an interface, callable type, array or
       * parameterized type.
       *
       * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
       * the `Injector`. This provides additional level of type safety.
       *
       * ```
       * interface MyInterface {...}
       * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));
       * // myInterface is inferred to be MyInterface.
       * ```
       *
       * When creating an `InjectionToken`, you can optionally specify a factory function which returns
       * (possibly by creating) a default value of the parameterized type `T`. This sets up the
       * `InjectionToken` using this factory as a provider as if it was defined explicitly in the
       * application's root injector. If the factory function, which takes zero arguments, needs to inject
       * dependencies, it can do so using the `inject` function. See below for an example.
       *
       * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which
       * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As
       * mentioned above, `'root'` is the default value for `providedIn`.
       *
       * @usageNotes
       * ### Basic Example
       *
       * ### Plain InjectionToken
       *
       * {@example core/di/ts/injector_spec.ts region='InjectionToken'}
       *
       * ### Tree-shakable InjectionToken
       *
       * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
       *
       *
       * @publicApi
       */

      var InjectionToken = /*#__PURE__*/function () {
        function InjectionToken(_desc, options) {
          _classCallCheck(this, InjectionToken);

          this._desc = _desc;
          /** @internal */

          this.ngMetadataName = 'InjectionToken';
          this.ɵprov = undefined;

          if (typeof options == 'number') {
            (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.
            // See `InjectorMarkers`

            this.__NG_ELEMENT_ID__ = options;
          } else if (options !== undefined) {
            this.ɵprov = ɵɵdefineInjectable({
              token: this,
              providedIn: options.providedIn || 'root',
              factory: options.factory
            });
          }
        }

        _createClass2(InjectionToken, [{
          key: "toString",
          value: function toString() {
            return "InjectionToken ".concat(this._desc);
          }
        }]);

        return InjectionToken;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A DI token that you can use to create a virtual [provider](guide/glossary#provider)
       * that will populate the `entryComponents` field of components and NgModules
       * based on its `useValue` property value.
       * All components that are referenced in the `useValue` value (either directly
       * or in a nested array or map) are added to the `entryComponents` property.
       *
       * @usageNotes
       *
       * The following example shows how the router can populate the `entryComponents`
       * field of an NgModule based on a router configuration that refers
       * to components.
       *
       * ```typescript
       * // helper function inside the router
       * function provideRoutes(routes) {
       *   return [
       *     {provide: ROUTES, useValue: routes},
       *     {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}
       *   ];
       * }
       *
       * // user code
       * let routes = [
       *   {path: '/root', component: RootComp},
       *   {path: '/teams', component: TeamsComp}
       * ];
       *
       * @NgModule({
       *   providers: [provideRoutes(routes)]
       * })
       * class ModuleWithRoutes {}
       * ```
       *
       * @publicApi
       * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.
       */


      var ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents');
      /**
       * Base class for query metadata.
       *
       * @see `ContentChildren`.
       * @see `ContentChild`.
       * @see `ViewChildren`.
       * @see `ViewChild`.
       *
       * @publicApi
       */

      var Query = function Query() {
        _classCallCheck(this, Query);
      };

      var ɵ0$1 = function ɵ0$1(selector) {
        var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
        return Object.assign({
          selector: selector,
          first: false,
          isViewQuery: false,
          descendants: false
        }, data);
      };
      /**
       * ContentChildren decorator and metadata.
       *
       *
       * @Annotation
       * @publicApi
       */


      var ContentChildren = makePropDecorator('ContentChildren', ɵ0$1, Query);

      var ɵ1 = function ɵ1(selector) {
        var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
        return Object.assign({
          selector: selector,
          first: true,
          isViewQuery: false,
          descendants: true
        }, data);
      };
      /**
       * ContentChild decorator and metadata.
       *
       *
       * @Annotation
       *
       * @publicApi
       */


      var ContentChild = makePropDecorator('ContentChild', ɵ1, Query);

      var ɵ2 = function ɵ2(selector) {
        var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
        return Object.assign({
          selector: selector,
          first: false,
          isViewQuery: true,
          descendants: true
        }, data);
      };
      /**
       * ViewChildren decorator and metadata.
       *
       * @Annotation
       * @publicApi
       */


      var ViewChildren = makePropDecorator('ViewChildren', ɵ2, Query);

      var ɵ3 = function ɵ3(selector, data) {
        return Object.assign({
          selector: selector,
          first: true,
          isViewQuery: true,
          descendants: true
        }, data);
      };
      /**
       * ViewChild decorator and metadata.
       *
       * @Annotation
       * @publicApi
       */


      var ViewChild = makePropDecorator('ViewChild', ɵ3, Query);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var R3ResolvedDependencyType;

      (function (R3ResolvedDependencyType) {
        R3ResolvedDependencyType[R3ResolvedDependencyType["Token"] = 0] = "Token";
        R3ResolvedDependencyType[R3ResolvedDependencyType["Attribute"] = 1] = "Attribute";
        R3ResolvedDependencyType[R3ResolvedDependencyType["ChangeDetectorRef"] = 2] = "ChangeDetectorRef";
        R3ResolvedDependencyType[R3ResolvedDependencyType["Invalid"] = 3] = "Invalid";
      })(R3ResolvedDependencyType || (R3ResolvedDependencyType = {}));

      var R3FactoryTarget;

      (function (R3FactoryTarget) {
        R3FactoryTarget[R3FactoryTarget["Directive"] = 0] = "Directive";
        R3FactoryTarget[R3FactoryTarget["Component"] = 1] = "Component";
        R3FactoryTarget[R3FactoryTarget["Injectable"] = 2] = "Injectable";
        R3FactoryTarget[R3FactoryTarget["Pipe"] = 3] = "Pipe";
        R3FactoryTarget[R3FactoryTarget["NgModule"] = 4] = "NgModule";
      })(R3FactoryTarget || (R3FactoryTarget = {}));

      var ViewEncapsulation$1;

      (function (ViewEncapsulation) {
        ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated"; // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.

        ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None";
        ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom";
      })(ViewEncapsulation$1 || (ViewEncapsulation$1 = {}));
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function getCompilerFacade() {
        var globalNg = _global['ng'];

        if (!globalNg || !globalNg.ɵcompilerFacade) {
          throw new Error("Angular JIT compilation failed: '@angular/compiler' not loaded!\n" + "  - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\n" + "  - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\n" + "  - Alternatively provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.");
        }

        return globalNg.ɵcompilerFacade;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description
       *
       * Represents a type that a Component or other object is instances of.
       *
       * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by
       * the `MyCustomComponent` constructor function.
       *
       * @publicApi
       */


      var Type = Function;

      function isType(v) {
        return typeof v === 'function';
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Equivalent to ES6 spread, add each item to an array.
       *
       * @param items The items to add
       * @param arr The array to which you want to add the items
       */


      function addAllToArray(items, arr) {
        for (var i = 0; i < items.length; i++) {
          arr.push(items[i]);
        }
      }
      /**
       * Flattens an array.
       */


      function flatten(list, dst) {
        if (dst === undefined) dst = list;

        for (var i = 0; i < list.length; i++) {
          var item = list[i];

          if (Array.isArray(item)) {
            // we need to inline it.
            if (dst === list) {
              // Our assumption that the list was already flat was wrong and
              // we need to clone flat since we need to write to it.
              dst = list.slice(0, i);
            }

            flatten(item, dst);
          } else if (dst !== list) {
            dst.push(item);
          }
        }

        return dst;
      }

      function deepForEach(input, fn) {
        input.forEach(function (value) {
          return Array.isArray(value) ? deepForEach(value, fn) : fn(value);
        });
      }

      function addToArray(arr, index, value) {
        // perf: array.push is faster than array.splice!
        if (index >= arr.length) {
          arr.push(value);
        } else {
          arr.splice(index, 0, value);
        }
      }

      function removeFromArray(arr, index) {
        // perf: array.pop is faster than array.splice!
        if (index >= arr.length - 1) {
          return arr.pop();
        } else {
          return arr.splice(index, 1)[0];
        }
      }

      function newArray(size, value) {
        var list = [];

        for (var i = 0; i < size; i++) {
          list.push(value);
        }

        return list;
      }
      /**
       * Remove item from array (Same as `Array.splice()` but faster.)
       *
       * `Array.splice()` is not as fast because it has to allocate an array for the elements which were
       * removed. This causes memory pressure and slows down code when most of the time we don't
       * care about the deleted items array.
       *
       * https://jsperf.com/fast-array-splice (About 20x faster)
       *
       * @param array Array to splice
       * @param index Index of element in array to remove.
       * @param count Number of items to remove.
       */


      function arraySplice(array, index, count) {
        var length = array.length - count;

        while (index < length) {
          array[index] = array[index + count];
          index++;
        }

        while (count--) {
          array.pop(); // shrink the array
        }
      }
      /**
       * Same as `Array.splice(index, 0, value)` but faster.
       *
       * `Array.splice()` is not fast because it has to allocate an array for the elements which were
       * removed. This causes memory pressure and slows down code when most of the time we don't
       * care about the deleted items array.
       *
       * @param array Array to splice.
       * @param index Index in array where the `value` should be added.
       * @param value Value to add to array.
       */


      function arrayInsert(array, index, value) {
        ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\'t insert past array end.');
        var end = array.length;

        while (end > index) {
          var previousEnd = end - 1;
          array[end] = array[previousEnd];
          end = previousEnd;
        }

        array[index] = value;
      }
      /**
       * Same as `Array.splice2(index, 0, value1, value2)` but faster.
       *
       * `Array.splice()` is not fast because it has to allocate an array for the elements which were
       * removed. This causes memory pressure and slows down code when most of the time we don't
       * care about the deleted items array.
       *
       * @param array Array to splice.
       * @param index Index in array where the `value` should be added.
       * @param value1 Value to add to array.
       * @param value2 Value to add to array.
       */


      function arrayInsert2(array, index, value1, value2) {
        ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\'t insert past array end.');
        var end = array.length;

        if (end == index) {
          // inserting at the end.
          array.push(value1, value2);
        } else if (end === 1) {
          // corner case when we have less items in array than we have items to insert.
          array.push(value2, array[0]);
          array[0] = value1;
        } else {
          end--;
          array.push(array[end - 1], array[end]);

          while (end > index) {
            var previousEnd = end - 2;
            array[end] = array[previousEnd];
            end--;
          }

          array[index] = value1;
          array[index + 1] = value2;
        }
      }
      /**
       * Insert a `value` into an `array` so that the array remains sorted.
       *
       * NOTE:
       * - Duplicates are not allowed, and are ignored.
       * - This uses binary search algorithm for fast inserts.
       *
       * @param array A sorted array to insert into.
       * @param value The value to insert.
       * @returns index of the inserted value.
       */


      function arrayInsertSorted(array, value) {
        var index = arrayIndexOfSorted(array, value);

        if (index < 0) {
          // if we did not find it insert it.
          index = ~index;
          arrayInsert(array, index, value);
        }

        return index;
      }
      /**
       * Remove `value` from a sorted `array`.
       *
       * NOTE:
       * - This uses binary search algorithm for fast removals.
       *
       * @param array A sorted array to remove from.
       * @param value The value to remove.
       * @returns index of the removed value.
       *   - positive index if value found and removed.
       *   - negative index if value not found. (`~index` to get the value where it should have been
       *     inserted)
       */


      function arrayRemoveSorted(array, value) {
        var index = arrayIndexOfSorted(array, value);

        if (index >= 0) {
          arraySplice(array, index, 1);
        }

        return index;
      }
      /**
       * Get an index of an `value` in a sorted `array`.
       *
       * NOTE:
       * - This uses binary search algorithm for fast removals.
       *
       * @param array A sorted array to binary search.
       * @param value The value to look for.
       * @returns index of the value.
       *   - positive index if value found.
       *   - negative index if value not found. (`~index` to get the value where it should have been
       *     located)
       */


      function arrayIndexOfSorted(array, value) {
        return _arrayIndexOfSorted(array, value, 0);
      }
      /**
       * Set a `value` for a `key`.
       *
       * @param keyValueArray to modify.
       * @param key The key to locate or create.
       * @param value The value to set for a `key`.
       * @returns index (always even) of where the value vas set.
       */


      function keyValueArraySet(keyValueArray, key, value) {
        var index = keyValueArrayIndexOf(keyValueArray, key);

        if (index >= 0) {
          // if we found it set it.
          keyValueArray[index | 1] = value;
        } else {
          index = ~index;
          arrayInsert2(keyValueArray, index, key, value);
        }

        return index;
      }
      /**
       * Retrieve a `value` for a `key` (on `undefined` if not found.)
       *
       * @param keyValueArray to search.
       * @param key The key to locate.
       * @return The `value` stored at the `key` location or `undefined if not found.
       */


      function keyValueArrayGet(keyValueArray, key) {
        var index = keyValueArrayIndexOf(keyValueArray, key);

        if (index >= 0) {
          // if we found it retrieve it.
          return keyValueArray[index | 1];
        }

        return undefined;
      }
      /**
       * Retrieve a `key` index value in the array or `-1` if not found.
       *
       * @param keyValueArray to search.
       * @param key The key to locate.
       * @returns index of where the key is (or should have been.)
       *   - positive (even) index if key found.
       *   - negative index if key not found. (`~index` (even) to get the index where it should have
       *     been inserted.)
       */


      function keyValueArrayIndexOf(keyValueArray, key) {
        return _arrayIndexOfSorted(keyValueArray, key, 1);
      }
      /**
       * Delete a `key` (and `value`) from the `KeyValueArray`.
       *
       * @param keyValueArray to modify.
       * @param key The key to locate or delete (if exist).
       * @returns index of where the key was (or should have been.)
       *   - positive (even) index if key found and deleted.
       *   - negative index if key not found. (`~index` (even) to get the index where it should have
       *     been.)
       */


      function keyValueArrayDelete(keyValueArray, key) {
        var index = keyValueArrayIndexOf(keyValueArray, key);

        if (index >= 0) {
          // if we found it remove it.
          arraySplice(keyValueArray, index, 2);
        }

        return index;
      }
      /**
       * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.
       *
       * NOTE:
       * - This uses binary search algorithm for fast removals.
       *
       * @param array A sorted array to binary search.
       * @param value The value to look for.
       * @param shift grouping shift.
       *   - `0` means look at every location
       *   - `1` means only look at every other (even) location (the odd locations are to be ignored as
       *         they are values.)
       * @returns index of the value.
       *   - positive index if value found.
       *   - negative index if value not found. (`~index` to get the value where it should have been
       * inserted)
       */


      function _arrayIndexOfSorted(array, value, shift) {
        ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');
        var start = 0;
        var end = array.length >> shift;

        while (end !== start) {
          var middle = start + (end - start >> 1); // find the middle.

          var current = array[middle << shift];

          if (value === current) {
            return middle << shift;
          } else if (current > value) {
            end = middle;
          } else {
            start = middle + 1; // We already searched middle so make it non-inclusive by adding 1
          }
        }

        return ~(end << shift);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /*
       * #########################
       * Attention: These Regular expressions have to hold even if the code is minified!
       * ##########################
       */

      /**
       * Regular expression that detects pass-through constructors for ES5 output. This Regex
       * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also
       * it intends to capture the pattern where existing constructors have been downleveled from
       * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g.
       *
       * ```
       *   function MyClass() {
       *     var _this = _super.apply(this, arguments) || this;
       * ```
       *
       * ```
       *   function MyClass() {
       *     var _this = _super.apply(this, __spread(arguments)) || this;
       * ```
       *
       * More details can be found in: https://github.com/angular/angular/issues/38453.
       */


      var ES5_DELEGATE_CTOR = /^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|[^()]+\(arguments\))\)/;
      /** Regular expression that detects ES2015 classes which extend from other classes. */

      var ES2015_INHERITED_CLASS = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/;
      /**
       * Regular expression that detects ES2015 classes which extend from other classes and
       * have an explicit constructor defined.
       */

      var ES2015_INHERITED_CLASS_WITH_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/;
      /**
       * Regular expression that detects ES2015 classes which extend from other classes
       * and inherit a constructor.
       */

      var ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{\s*super\(\.\.\.arguments\)/;
      /**
       * Determine whether a stringified type is a class which delegates its constructor
       * to its parent.
       *
       * This is not trivial since compiled code can actually contain a constructor function
       * even if the original source code did not. For instance, when the child class contains
       * an initialized instance property.
       */

      function isDelegateCtor(typeStr) {
        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);
      }

      var ReflectionCapabilities = /*#__PURE__*/function () {
        function ReflectionCapabilities(reflect) {
          _classCallCheck(this, ReflectionCapabilities);

          this._reflect = reflect || _global['Reflect'];
        }

        _createClass2(ReflectionCapabilities, [{
          key: "isReflectionEnabled",
          value: function isReflectionEnabled() {
            return true;
          }
        }, {
          key: "factory",
          value: function factory(t) {
            return function () {
              for (var _len36 = arguments.length, args = new Array(_len36), _key37 = 0; _key37 < _len36; _key37++) {
                args[_key37] = arguments[_key37];
              }

              return _construct(t, args);
            };
          }
          /** @internal */

        }, {
          key: "_zipTypesAndAnnotations",
          value: function _zipTypesAndAnnotations(paramTypes, paramAnnotations) {
            var result;

            if (typeof paramTypes === 'undefined') {
              result = newArray(paramAnnotations.length);
            } else {
              result = newArray(paramTypes.length);
            }

            for (var i = 0; i < result.length; i++) {
              // TS outputs Object for parameters without types, while Traceur omits
              // the annotations. For now we preserve the Traceur behavior to aid
              // migration, but this can be revisited.
              if (typeof paramTypes === 'undefined') {
                result[i] = [];
              } else if (paramTypes[i] && paramTypes[i] != Object) {
                result[i] = [paramTypes[i]];
              } else {
                result[i] = [];
              }

              if (paramAnnotations && paramAnnotations[i] != null) {
                result[i] = result[i].concat(paramAnnotations[i]);
              }
            }

            return result;
          }
        }, {
          key: "_ownParameters",
          value: function _ownParameters(type, parentCtor) {
            var typeStr = type.toString(); // If we have no decorators, we only have function.length as metadata.
            // In that case, to detect whether a child class declared an own constructor or not,
            // we need to look inside of that constructor to check whether it is
            // just calling the parent.
            // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439
            // that sets 'design:paramtypes' to []
            // if a class inherits from another class but has no ctor declared itself.

            if (isDelegateCtor(typeStr)) {
              return null;
            } // Prefer the direct API.


            if (type.parameters && type.parameters !== parentCtor.parameters) {
              return type.parameters;
            } // API of tsickle for lowering decorators to properties on the class.


            var tsickleCtorParams = type.ctorParameters;

            if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {
              // Newer tsickle uses a function closure
              // Retain the non-function case for compatibility with older tsickle
              var ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;

              var _paramTypes = ctorParameters.map(function (ctorParam) {
                return ctorParam && ctorParam.type;
              });

              var _paramAnnotations = ctorParameters.map(function (ctorParam) {
                return ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators);
              });

              return this._zipTypesAndAnnotations(_paramTypes, _paramAnnotations);
            } // API for metadata created by invoking the decorators.


            var paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];

            var paramTypes = this._reflect && this._reflect.getOwnMetadata && this._reflect.getOwnMetadata('design:paramtypes', type);

            if (paramTypes || paramAnnotations) {
              return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);
            } // If a class has no decorators, at least create metadata
            // based on function.length.
            // Note: We know that this is a real constructor as we checked
            // the content of the constructor above.


            return newArray(type.length);
          }
        }, {
          key: "parameters",
          value: function parameters(type) {
            // Note: only report metadata if we have at least one class decorator
            // to stay in sync with the static reflector.
            if (!isType(type)) {
              return [];
            }

            var parentCtor = getParentCtor(type);

            var parameters = this._ownParameters(type, parentCtor);

            if (!parameters && parentCtor !== Object) {
              parameters = this.parameters(parentCtor);
            }

            return parameters || [];
          }
        }, {
          key: "_ownAnnotations",
          value: function _ownAnnotations(typeOrFunc, parentCtor) {
            // Prefer the direct API.
            if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {
              var annotations = typeOrFunc.annotations;

              if (typeof annotations === 'function' && annotations.annotations) {
                annotations = annotations.annotations;
              }

              return annotations;
            } // API of tsickle for lowering decorators to properties on the class.


            if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {
              return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);
            } // API for metadata created by invoking the decorators.


            if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {
              return typeOrFunc[ANNOTATIONS];
            }

            return null;
          }
        }, {
          key: "annotations",
          value: function annotations(typeOrFunc) {
            if (!isType(typeOrFunc)) {
              return [];
            }

            var parentCtor = getParentCtor(typeOrFunc);
            var ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];
            var parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];
            return parentAnnotations.concat(ownAnnotations);
          }
        }, {
          key: "_ownPropMetadata",
          value: function _ownPropMetadata(typeOrFunc, parentCtor) {
            // Prefer the direct API.
            if (typeOrFunc.propMetadata && typeOrFunc.propMetadata !== parentCtor.propMetadata) {
              var propMetadata = typeOrFunc.propMetadata;

              if (typeof propMetadata === 'function' && propMetadata.propMetadata) {
                propMetadata = propMetadata.propMetadata;
              }

              return propMetadata;
            } // API of tsickle for lowering decorators to properties on the class.


            if (typeOrFunc.propDecorators && typeOrFunc.propDecorators !== parentCtor.propDecorators) {
              var propDecorators = typeOrFunc.propDecorators;
              var _propMetadata = {};
              Object.keys(propDecorators).forEach(function (prop) {
                _propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);
              });
              return _propMetadata;
            } // API for metadata created by invoking the decorators.


            if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {
              return typeOrFunc[PROP_METADATA];
            }

            return null;
          }
        }, {
          key: "propMetadata",
          value: function propMetadata(typeOrFunc) {
            if (!isType(typeOrFunc)) {
              return {};
            }

            var parentCtor = getParentCtor(typeOrFunc);
            var propMetadata = {};

            if (parentCtor !== Object) {
              var parentPropMetadata = this.propMetadata(parentCtor);
              Object.keys(parentPropMetadata).forEach(function (propName) {
                propMetadata[propName] = parentPropMetadata[propName];
              });
            }

            var ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);

            if (ownPropMetadata) {
              Object.keys(ownPropMetadata).forEach(function (propName) {
                var decorators = [];

                if (propMetadata.hasOwnProperty(propName)) {
                  decorators.push.apply(decorators, _toConsumableArray(propMetadata[propName]));
                }

                decorators.push.apply(decorators, _toConsumableArray(ownPropMetadata[propName]));
                propMetadata[propName] = decorators;
              });
            }

            return propMetadata;
          }
        }, {
          key: "ownPropMetadata",
          value: function ownPropMetadata(typeOrFunc) {
            if (!isType(typeOrFunc)) {
              return {};
            }

            return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};
          }
        }, {
          key: "hasLifecycleHook",
          value: function hasLifecycleHook(type, lcProperty) {
            return type instanceof Type && lcProperty in type.prototype;
          }
        }, {
          key: "guards",
          value: function guards(type) {
            return {};
          }
        }, {
          key: "getter",
          value: function getter(name) {
            return new Function('o', 'return o.' + name + ';');
          }
        }, {
          key: "setter",
          value: function setter(name) {
            return new Function('o', 'v', 'return o.' + name + ' = v;');
          }
        }, {
          key: "method",
          value: function method(name) {
            var functionBody = "if (!o.".concat(name, ") throw new Error('\"").concat(name, "\" is undefined');\n        return o.").concat(name, ".apply(o, args);");
            return new Function('o', 'args', functionBody);
          } // There is not a concept of import uri in Js, but this is useful in developing Dart applications.

        }, {
          key: "importUri",
          value: function importUri(type) {
            // StaticSymbol
            if (typeof type === 'object' && type['filePath']) {
              return type['filePath'];
            } // Runtime type


            return "./".concat(stringify(type));
          }
        }, {
          key: "resourceUri",
          value: function resourceUri(type) {
            return "./".concat(stringify(type));
          }
        }, {
          key: "resolveIdentifier",
          value: function resolveIdentifier(name, moduleUrl, members, runtime) {
            return runtime;
          }
        }, {
          key: "resolveEnum",
          value: function resolveEnum(enumIdentifier, name) {
            return enumIdentifier[name];
          }
        }]);

        return ReflectionCapabilities;
      }();

      function convertTsickleDecoratorIntoMetadata(decoratorInvocations) {
        if (!decoratorInvocations) {
          return [];
        }

        return decoratorInvocations.map(function (decoratorInvocation) {
          var decoratorType = decoratorInvocation.type;
          var annotationCls = decoratorType.annotationCls;
          var annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];
          return _construct(annotationCls, _toConsumableArray(annotationArgs));
        });
      }

      function getParentCtor(ctor) {
        var parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;
        var parentCtor = parentProto ? parentProto.constructor : null; // Note: We always use `Object` as the null value
        // to simplify checking later on.

        return parentCtor || Object;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ɵ0$2 = function ɵ0$2(token) {
        return {
          token: token
        };
      };
      /**
       * Inject decorator and metadata.
       *
       * @Annotation
       * @publicApi
       */


      var Inject = makeParamDecorator('Inject', ɵ0$2);
      /**
       * Optional decorator and metadata.
       *
       * @Annotation
       * @publicApi
       */

      var Optional = makeParamDecorator('Optional');
      /**
       * Self decorator and metadata.
       *
       * @Annotation
       * @publicApi
       */

      var Self = makeParamDecorator('Self');
      /**
       * `SkipSelf` decorator and metadata.
       *
       * @Annotation
       * @publicApi
       */

      var SkipSelf = makeParamDecorator('SkipSelf');
      /**
       * Host decorator and metadata.
       *
       * @Annotation
       * @publicApi
       */

      var Host = makeParamDecorator('Host');
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var _reflect = null;

      function getReflect() {
        return _reflect = _reflect || new ReflectionCapabilities();
      }

      function reflectDependencies(type) {
        return convertDependencies(getReflect().parameters(type));
      }

      function convertDependencies(deps) {
        var compiler = getCompilerFacade();
        return deps.map(function (dep) {
          return reflectDependency(compiler, dep);
        });
      }

      function reflectDependency(compiler, dep) {
        var meta = {
          token: null,
          host: false,
          optional: false,
          resolved: compiler.R3ResolvedDependencyType.Token,
          self: false,
          skipSelf: false
        };

        function setTokenAndResolvedType(token) {
          meta.resolved = compiler.R3ResolvedDependencyType.Token;
          meta.token = token;
        }

        if (Array.isArray(dep) && dep.length > 0) {
          for (var j = 0; j < dep.length; j++) {
            var param = dep[j];

            if (param === undefined) {
              // param may be undefined if type of dep is not set by ngtsc
              continue;
            }

            var proto = Object.getPrototypeOf(param);

            if (param instanceof Optional || proto.ngMetadataName === 'Optional') {
              meta.optional = true;
            } else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') {
              meta.skipSelf = true;
            } else if (param instanceof Self || proto.ngMetadataName === 'Self') {
              meta.self = true;
            } else if (param instanceof Host || proto.ngMetadataName === 'Host') {
              meta.host = true;
            } else if (param instanceof Inject) {
              meta.token = param.token;
            } else if (param instanceof Attribute) {
              if (param.attributeName === undefined) {
                throw new Error("Attribute name must be defined.");
              }

              meta.token = param.attributeName;
              meta.resolved = compiler.R3ResolvedDependencyType.Attribute;
            } else if (param.__ChangeDetectorRef__ === true) {
              meta.token = param;
              meta.resolved = compiler.R3ResolvedDependencyType.ChangeDetectorRef;
            } else {
              setTokenAndResolvedType(param);
            }
          }
        } else if (dep === undefined || Array.isArray(dep) && dep.length === 0) {
          meta.token = undefined;
          meta.resolved = R3ResolvedDependencyType.Invalid;
        } else {
          setTokenAndResolvedType(dep);
        }

        return meta;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Used to resolve resource URLs on `@Component` when used with JIT compilation.
       *
       * Example:
       * ```
       * @Component({
       *   selector: 'my-comp',
       *   templateUrl: 'my-comp.html', // This requires asynchronous resolution
       * })
       * class MyComponent{
       * }
       *
       * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process
       * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.
       *
       * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into
       * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.
       *
       * // Use browser's `fetch()` function as the default resource resolution strategy.
       * resolveComponentResources(fetch).then(() => {
       *   // After resolution all URLs have been converted into `template` strings.
       *   renderComponent(MyComponent);
       * });
       *
       * ```
       *
       * NOTE: In AOT the resolution happens during compilation, and so there should be no need
       * to call this method outside JIT mode.
       *
       * @param resourceResolver a function which is responsible for returning a `Promise` to the
       * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.
       */


      function resolveComponentResources(resourceResolver) {
        // Store all promises which are fetching the resources.
        var componentResolved = []; // Cache so that we don't fetch the same resource more than once.

        var urlMap = new Map();

        function cachedResourceResolve(url) {
          var promise = urlMap.get(url);

          if (!promise) {
            var resp = resourceResolver(url);
            urlMap.set(url, promise = resp.then(unwrapResponse));
          }

          return promise;
        }

        componentResourceResolutionQueue.forEach(function (component, type) {
          var promises = [];

          if (component.templateUrl) {
            promises.push(cachedResourceResolve(component.templateUrl).then(function (template) {
              component.template = template;
            }));
          }

          var styleUrls = component.styleUrls;
          var styles = component.styles || (component.styles = []);
          var styleOffset = component.styles.length;
          styleUrls && styleUrls.forEach(function (styleUrl, index) {
            styles.push(''); // pre-allocate array.

            promises.push(cachedResourceResolve(styleUrl).then(function (style) {
              styles[styleOffset + index] = style;
              styleUrls.splice(styleUrls.indexOf(styleUrl), 1);

              if (styleUrls.length == 0) {
                component.styleUrls = undefined;
              }
            }));
          });
          var fullyResolved = Promise.all(promises).then(function () {
            return componentDefResolved(type);
          });
          componentResolved.push(fullyResolved);
        });
        clearResolutionOfComponentResourcesQueue();
        return Promise.all(componentResolved).then(function () {
          return undefined;
        });
      }

      var componentResourceResolutionQueue = new Map(); // Track when existing ɵcmp for a Type is waiting on resources.

      var componentDefPendingResolution = new Set();

      function maybeQueueResolutionOfComponentResources(type, metadata) {
        if (componentNeedsResolution(metadata)) {
          componentResourceResolutionQueue.set(type, metadata);
          componentDefPendingResolution.add(type);
        }
      }

      function isComponentDefPendingResolution(type) {
        return componentDefPendingResolution.has(type);
      }

      function componentNeedsResolution(component) {
        return !!(component.templateUrl && !component.hasOwnProperty('template') || component.styleUrls && component.styleUrls.length);
      }

      function clearResolutionOfComponentResourcesQueue() {
        var old = componentResourceResolutionQueue;
        componentResourceResolutionQueue = new Map();
        return old;
      }

      function restoreComponentResolutionQueue(queue) {
        componentDefPendingResolution.clear();
        queue.forEach(function (_, type) {
          return componentDefPendingResolution.add(type);
        });
        componentResourceResolutionQueue = queue;
      }

      function isComponentResourceResolutionQueueEmpty() {
        return componentResourceResolutionQueue.size === 0;
      }

      function unwrapResponse(response) {
        return typeof response == 'string' ? response : response.text();
      }

      function componentDefResolved(type) {
        componentDefPendingResolution["delete"](type);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _THROW_IF_NOT_FOUND = {};
      var THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
      var NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';
      var NG_TOKEN_PATH = 'ngTokenPath';
      var NEW_LINE = /\n/gm;
      var NO_NEW_LINE = 'ɵ';
      var SOURCE = '__source';
      var ɵ0$3 = getClosureSafeProperty;
      var USE_VALUE = getClosureSafeProperty({
        provide: String,
        useValue: ɵ0$3
      });
      /**
       * Current injector value used by `inject`.
       * - `undefined`: it is an error to call `inject`
       * - `null`: `inject` can be called but there is no injector (limp-mode).
       * - Injector instance: Use the injector for resolution.
       */

      var _currentInjector = undefined;

      function setCurrentInjector(injector) {
        var former = _currentInjector;
        _currentInjector = injector;
        return former;
      }

      function injectInjectorOnly(token) {
        var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : InjectFlags.Default;

        if (_currentInjector === undefined) {
          throw new Error("inject() must be called from an injection context");
        } else if (_currentInjector === null) {
          return injectRootLimpMode(token, undefined, flags);
        } else {
          return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);
        }
      }

      function ɵɵinject(token) {
        var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : InjectFlags.Default;
        return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags);
      }
      /**
       * Throws an error indicating that a factory function could not be generated by the compiler for a
       * particular class.
       *
       * This instruction allows the actual error message to be optimized away when ngDevMode is turned
       * off, saving bytes of generated code while still providing a good experience in dev mode.
       *
       * The name of the class is not mentioned here, but will be in the generated factory function name
       * and thus in the stack trace.
       *
       * @codeGenApi
       */


      function ɵɵinvalidFactoryDep(index) {
        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';
        throw new Error(msg);
      }
      /**
       * Injects a token from the currently active injector.
       *
       * Must be used in the context of a factory function such as one defined for an
       * `InjectionToken`. Throws an error if not called from such a context.
       *
       * Within such a factory function, using this function to request injection of a dependency
       * is faster and more type-safe than providing an additional array of dependencies
       * (as has been common with `useFactory` providers).
       *
       * @param token The injection token for the dependency to be injected.
       * @param flags Optional flags that control how injection is executed.
       * The flags correspond to injection strategies that can be specified with
       * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.
       * @returns True if injection is successful, null otherwise.
       *
       * @usageNotes
       *
       * ### Example
       *
       * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
       *
       * @publicApi
       */


      var inject = ɵɵinject;

      function injectArgs(types) {
        var args = [];

        for (var i = 0; i < types.length; i++) {
          var arg = resolveForwardRef(types[i]);

          if (Array.isArray(arg)) {
            if (arg.length === 0) {
              throw new Error('Arguments array must have arguments.');
            }

            var type = undefined;
            var flags = InjectFlags.Default;

            for (var j = 0; j < arg.length; j++) {
              var meta = arg[j];

              if (meta instanceof Optional || meta.ngMetadataName === 'Optional' || meta === Optional) {
                flags |= InjectFlags.Optional;
              } else if (meta instanceof SkipSelf || meta.ngMetadataName === 'SkipSelf' || meta === SkipSelf) {
                flags |= InjectFlags.SkipSelf;
              } else if (meta instanceof Self || meta.ngMetadataName === 'Self' || meta === Self) {
                flags |= InjectFlags.Self;
              } else if (meta instanceof Host || meta.ngMetadataName === 'Host' || meta === Host) {
                flags |= InjectFlags.Host;
              } else if (meta instanceof Inject || meta === Inject) {
                type = meta.token;
              } else {
                type = meta;
              }
            }

            args.push(ɵɵinject(type, flags));
          } else {
            args.push(ɵɵinject(arg));
          }
        }

        return args;
      }

      function catchInjectorError(e, token, injectorErrorName, source) {
        var tokenPath = e[NG_TEMP_TOKEN_PATH];

        if (token[SOURCE]) {
          tokenPath.unshift(token[SOURCE]);
        }

        e.message = formatError('\n' + e.message, tokenPath, injectorErrorName, source);
        e[NG_TOKEN_PATH] = tokenPath;
        e[NG_TEMP_TOKEN_PATH] = null;
        throw e;
      }

      function formatError(text, obj, injectorErrorName) {
        var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
        text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;
        var context = stringify(obj);

        if (Array.isArray(obj)) {
          context = obj.map(stringify).join(' -> ');
        } else if (typeof obj === 'object') {
          var parts = [];

          for (var key in obj) {
            if (obj.hasOwnProperty(key)) {
              var value = obj[key];
              parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));
            }
          }

          context = "{".concat(parts.join(', '), "}");
        }

        return "".concat(injectorErrorName).concat(source ? '(' + source + ')' : '', "[").concat(context, "]: ").concat(text.replace(NEW_LINE, '\n  '));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * The Trusted Types policy, or null if Trusted Types are not
       * enabled/supported, or undefined if the policy has not been created yet.
       */


      var policy;
      /**
       * Returns the Trusted Types policy, or null if Trusted Types are not
       * enabled/supported. The first call to this function will create the policy.
       */

      function getPolicy() {
        if (policy === undefined) {
          policy = null;

          if (_global.trustedTypes) {
            try {
              policy = _global.trustedTypes.createPolicy('angular', {
                createHTML: function createHTML(s) {
                  return s;
                },
                createScript: function createScript(s) {
                  return s;
                },
                createScriptURL: function createScriptURL(s) {
                  return s;
                }
              });
            } catch (_a) {// trustedTypes.createPolicy throws if called with a name that is
              // already registered, even in report-only mode. Until the API changes,
              // catch the error not to break the applications functionally. In such
              // cases, the code will fall back to using strings.
            }
          }
        }

        return policy;
      }
      /**
       * Unsafely promote a string to a TrustedHTML, falling back to strings when
       * Trusted Types are not available.
       * @security This is a security-sensitive function; any use of this function
       * must go through security review. In particular, it must be assured that the
       * provided string will never cause an XSS vulnerability if used in a context
       * that will be interpreted as HTML by a browser, e.g. when assigning to
       * element.innerHTML.
       */


      function trustedHTMLFromString(html) {
        var _a;

        return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createHTML(html)) || html;
      }
      /**
       * Unsafely promote a string to a TrustedScript, falling back to strings when
       * Trusted Types are not available.
       * @security In particular, it must be assured that the provided string will
       * never cause an XSS vulnerability if used in a context that will be
       * interpreted and executed as a script by a browser, e.g. when calling eval.
       */


      function trustedScriptFromString(script) {
        var _a;

        return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScript(script)) || script;
      }
      /**
       * Unsafely promote a string to a TrustedScriptURL, falling back to strings
       * when Trusted Types are not available.
       * @security This is a security-sensitive function; any use of this function
       * must go through security review. In particular, it must be assured that the
       * provided string will never cause an XSS vulnerability if used in a context
       * that will cause a browser to load and execute a resource, e.g. when
       * assigning to script.src.
       */


      function trustedScriptURLFromString(url) {
        var _a;

        return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScriptURL(url)) || url;
      }
      /**
       * Unsafely call the Function constructor with the given string arguments. It
       * is only available in development mode, and should be stripped out of
       * production code.
       * @security This is a security-sensitive function; any use of this function
       * must go through security review. In particular, it must be assured that it
       * is only called from development code, as use in production code can lead to
       * XSS vulnerabilities.
       */


      function newTrustedFunctionForDev() {
        if (typeof ngDevMode === 'undefined') {
          throw new Error('newTrustedFunctionForDev should never be called in production');
        }

        for (var _len37 = arguments.length, args = new Array(_len37), _key38 = 0; _key38 < _len37; _key38++) {
          args[_key38] = arguments[_key38];
        }

        if (!_global.trustedTypes) {
          // In environments that don't support Trusted Types, fall back to the most
          // straightforward implementation:
          return _construct(Function, args);
        } // Chrome currently does not support passing TrustedScript to the Function
        // constructor. The following implements the workaround proposed on the page
        // below, where the Chromium bug is also referenced:
        // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor


        var fnArgs = args.slice(0, -1).join(',');
        var fnBody = args.pop().toString();
        var body = "(function anonymous(".concat(fnArgs, "\n) { ").concat(fnBody, "\n})"); // Using eval directly confuses the compiler and prevents this module from
        // being stripped out of JS binaries even if not used. The global['eval']
        // indirection fixes that.

        var fn = _global['eval'](trustedScriptFromString(body)); // To completely mimic the behavior of calling "new Function", two more
        // things need to happen:
        // 1. Stringifying the resulting function should return its source code


        fn.toString = function () {
          return body;
        }; // 2. When calling the resulting function, `this` should refer to `global`


        return fn.bind(_global); // When Trusted Types support in Function constructors is widely available,
        // the implementation of this function can be simplified to:
        // return new Function(...args.map(a => trustedScriptFromString(a)));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var SafeValueImpl = /*#__PURE__*/function () {
        function SafeValueImpl(changingThisBreaksApplicationSecurity) {
          _classCallCheck(this, SafeValueImpl);

          this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;
        }

        _createClass2(SafeValueImpl, [{
          key: "toString",
          value: function toString() {
            return "SafeValue must use [property]=binding: ".concat(this.changingThisBreaksApplicationSecurity) + " (see https://g.co/ng/security#xss)";
          }
        }]);

        return SafeValueImpl;
      }();

      var SafeHtmlImpl = /*#__PURE__*/function (_SafeValueImpl) {
        _inherits(SafeHtmlImpl, _SafeValueImpl);

        var _super217 = _createSuper(SafeHtmlImpl);

        function SafeHtmlImpl() {
          _classCallCheck(this, SafeHtmlImpl);

          return _super217.apply(this, arguments);
        }

        _createClass2(SafeHtmlImpl, [{
          key: "getTypeName",
          value: function getTypeName() {
            return "HTML"
            /* Html */
            ;
          }
        }]);

        return SafeHtmlImpl;
      }(SafeValueImpl);

      var SafeStyleImpl = /*#__PURE__*/function (_SafeValueImpl2) {
        _inherits(SafeStyleImpl, _SafeValueImpl2);

        var _super218 = _createSuper(SafeStyleImpl);

        function SafeStyleImpl() {
          _classCallCheck(this, SafeStyleImpl);

          return _super218.apply(this, arguments);
        }

        _createClass2(SafeStyleImpl, [{
          key: "getTypeName",
          value: function getTypeName() {
            return "Style"
            /* Style */
            ;
          }
        }]);

        return SafeStyleImpl;
      }(SafeValueImpl);

      var SafeScriptImpl = /*#__PURE__*/function (_SafeValueImpl3) {
        _inherits(SafeScriptImpl, _SafeValueImpl3);

        var _super219 = _createSuper(SafeScriptImpl);

        function SafeScriptImpl() {
          _classCallCheck(this, SafeScriptImpl);

          return _super219.apply(this, arguments);
        }

        _createClass2(SafeScriptImpl, [{
          key: "getTypeName",
          value: function getTypeName() {
            return "Script"
            /* Script */
            ;
          }
        }]);

        return SafeScriptImpl;
      }(SafeValueImpl);

      var SafeUrlImpl = /*#__PURE__*/function (_SafeValueImpl4) {
        _inherits(SafeUrlImpl, _SafeValueImpl4);

        var _super220 = _createSuper(SafeUrlImpl);

        function SafeUrlImpl() {
          _classCallCheck(this, SafeUrlImpl);

          return _super220.apply(this, arguments);
        }

        _createClass2(SafeUrlImpl, [{
          key: "getTypeName",
          value: function getTypeName() {
            return "URL"
            /* Url */
            ;
          }
        }]);

        return SafeUrlImpl;
      }(SafeValueImpl);

      var SafeResourceUrlImpl = /*#__PURE__*/function (_SafeValueImpl5) {
        _inherits(SafeResourceUrlImpl, _SafeValueImpl5);

        var _super221 = _createSuper(SafeResourceUrlImpl);

        function SafeResourceUrlImpl() {
          _classCallCheck(this, SafeResourceUrlImpl);

          return _super221.apply(this, arguments);
        }

        _createClass2(SafeResourceUrlImpl, [{
          key: "getTypeName",
          value: function getTypeName() {
            return "ResourceURL"
            /* ResourceUrl */
            ;
          }
        }]);

        return SafeResourceUrlImpl;
      }(SafeValueImpl);

      function unwrapSafeValue(value) {
        return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity : value;
      }

      function allowSanitizationBypassAndThrow(value, type) {
        var actualType = getSanitizationBypassType(value);

        if (actualType != null && actualType !== type) {
          // Allow ResourceURLs in URL contexts, they are strictly more trusted.
          if (actualType === "ResourceURL"
          /* ResourceUrl */
          && type === "URL"
          /* Url */
          ) return true;
          throw new Error("Required a safe ".concat(type, ", got a ").concat(actualType, " (see https://g.co/ng/security#xss)"));
        }

        return actualType === type;
      }

      function getSanitizationBypassType(value) {
        return value instanceof SafeValueImpl && value.getTypeName() || null;
      }
      /**
       * Mark `html` string as trusted.
       *
       * This function wraps the trusted string in `String` and brands it in a way which makes it
       * recognizable to {@link htmlSanitizer} to be trusted implicitly.
       *
       * @param trustedHtml `html` string which needs to be implicitly trusted.
       * @returns a `html` which has been branded to be implicitly trusted.
       */


      function bypassSanitizationTrustHtml(trustedHtml) {
        return new SafeHtmlImpl(trustedHtml);
      }
      /**
       * Mark `style` string as trusted.
       *
       * This function wraps the trusted string in `String` and brands it in a way which makes it
       * recognizable to {@link styleSanitizer} to be trusted implicitly.
       *
       * @param trustedStyle `style` string which needs to be implicitly trusted.
       * @returns a `style` hich has been branded to be implicitly trusted.
       */


      function bypassSanitizationTrustStyle(trustedStyle) {
        return new SafeStyleImpl(trustedStyle);
      }
      /**
       * Mark `script` string as trusted.
       *
       * This function wraps the trusted string in `String` and brands it in a way which makes it
       * recognizable to {@link scriptSanitizer} to be trusted implicitly.
       *
       * @param trustedScript `script` string which needs to be implicitly trusted.
       * @returns a `script` which has been branded to be implicitly trusted.
       */


      function bypassSanitizationTrustScript(trustedScript) {
        return new SafeScriptImpl(trustedScript);
      }
      /**
       * Mark `url` string as trusted.
       *
       * This function wraps the trusted string in `String` and brands it in a way which makes it
       * recognizable to {@link urlSanitizer} to be trusted implicitly.
       *
       * @param trustedUrl `url` string which needs to be implicitly trusted.
       * @returns a `url`  which has been branded to be implicitly trusted.
       */


      function bypassSanitizationTrustUrl(trustedUrl) {
        return new SafeUrlImpl(trustedUrl);
      }
      /**
       * Mark `url` string as trusted.
       *
       * This function wraps the trusted string in `String` and brands it in a way which makes it
       * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.
       *
       * @param trustedResourceUrl `url` string which needs to be implicitly trusted.
       * @returns a `url` which has been branded to be implicitly trusted.
       */


      function bypassSanitizationTrustResourceUrl(trustedResourceUrl) {
        return new SafeResourceUrlImpl(trustedResourceUrl);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * This helper is used to get hold of an inert tree of DOM elements containing dirty HTML
       * that needs sanitizing.
       * Depending upon browser support we use one of two strategies for doing this.
       * Default: DOMParser strategy
       * Fallback: InertDocument strategy
       */


      function getInertBodyHelper(defaultDoc) {
        var inertDocumentHelper = new InertDocumentHelper(defaultDoc);
        return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper;
      }
      /**
       * Uses DOMParser to create and fill an inert body element.
       * This is the default strategy used in browsers that support it.
       */


      var DOMParserHelper = /*#__PURE__*/function () {
        function DOMParserHelper(inertDocumentHelper) {
          _classCallCheck(this, DOMParserHelper);

          this.inertDocumentHelper = inertDocumentHelper;
        }

        _createClass2(DOMParserHelper, [{
          key: "getInertBodyElement",
          value: function getInertBodyElement(html) {
            // We add these extra elements to ensure that the rest of the content is parsed as expected
            // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the
            // `<head>` tag. Note that the `<body>` tag is closed implicitly to prevent unclosed tags
            // in `html` from consuming the otherwise explicit `</body>` tag.
            html = '<body><remove></remove>' + html;

            try {
              var body = new window.DOMParser().parseFromString(trustedHTMLFromString(html), 'text/html').body;

              if (body === null) {
                // In some browsers (e.g. Mozilla/5.0 iPad AppleWebKit Mobile) the `body` property only
                // becomes available in the following tick of the JS engine. In that case we fall back to
                // the `inertDocumentHelper` instead.
                return this.inertDocumentHelper.getInertBodyElement(html);
              }

              body.removeChild(body.firstChild);
              return body;
            } catch (_a) {
              return null;
            }
          }
        }]);

        return DOMParserHelper;
      }();
      /**
       * Use an HTML5 `template` element, if supported, or an inert body element created via
       * `createHtmlDocument` to create and fill an inert DOM element.
       * This is the fallback strategy if the browser does not support DOMParser.
       */


      var InertDocumentHelper = /*#__PURE__*/function () {
        function InertDocumentHelper(defaultDoc) {
          _classCallCheck(this, InertDocumentHelper);

          this.defaultDoc = defaultDoc;
          this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');

          if (this.inertDocument.body == null) {
            // usually there should be only one body element in the document, but IE doesn't have any, so
            // we need to create one.
            var inertHtml = this.inertDocument.createElement('html');
            this.inertDocument.appendChild(inertHtml);
            var inertBodyElement = this.inertDocument.createElement('body');
            inertHtml.appendChild(inertBodyElement);
          }
        }

        _createClass2(InertDocumentHelper, [{
          key: "getInertBodyElement",
          value: function getInertBodyElement(html) {
            // Prefer using <template> element if supported.
            var templateEl = this.inertDocument.createElement('template');

            if ('content' in templateEl) {
              templateEl.innerHTML = trustedHTMLFromString(html);
              return templateEl;
            } // Note that previously we used to do something like `this.inertDocument.body.innerHTML = html`
            // and we returned the inert `body` node. This was changed, because IE seems to treat setting
            // `innerHTML` on an inserted element differently, compared to one that hasn't been inserted
            // yet. In particular, IE appears to split some of the text into multiple text nodes rather
            // than keeping them in a single one which ends up messing with Ivy's i18n parsing further
            // down the line. This has been worked around by creating a new inert `body` and using it as
            // the root node in which we insert the HTML.


            var inertBody = this.inertDocument.createElement('body');
            inertBody.innerHTML = trustedHTMLFromString(html); // Support: IE 11 only
            // strip custom-namespaced attributes on IE<=11

            if (this.defaultDoc.documentMode) {
              this.stripCustomNsAttrs(inertBody);
            }

            return inertBody;
          }
          /**
           * When IE11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'
           * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.
           * 'ns1:xlink:foo').
           *
           * This is undesirable since we don't want to allow any of these custom attributes. This method
           * strips them all.
           */

        }, {
          key: "stripCustomNsAttrs",
          value: function stripCustomNsAttrs(el) {
            var elAttrs = el.attributes; // loop backwards so that we can support removals.

            for (var i = elAttrs.length - 1; 0 < i; i--) {
              var attrib = elAttrs.item(i);
              var attrName = attrib.name;

              if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {
                el.removeAttribute(attrName);
              }
            }

            var childNode = el.firstChild;

            while (childNode) {
              if (childNode.nodeType === Node.ELEMENT_NODE) this.stripCustomNsAttrs(childNode);
              childNode = childNode.nextSibling;
            }
          }
        }]);

        return InertDocumentHelper;
      }();
      /**
       * We need to determine whether the DOMParser exists in the global context and
       * supports parsing HTML; HTML parsing support is not as wide as other formats, see
       * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility.
       *
       * @suppress {uselessCode}
       */


      function isDOMParserAvailable() {
        try {
          return !!new window.DOMParser().parseFromString(trustedHTMLFromString(''), 'text/html');
        } catch (_a) {
          return false;
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A pattern that recognizes a commonly useful subset of URLs that are safe.
       *
       * This regular expression matches a subset of URLs that will not cause script
       * execution if used in URL context within a HTML document. Specifically, this
       * regular expression matches if (comment from here on and regex copied from
       * Soy's EscapingConventions):
       * (1) Either an allowed protocol (http, https, mailto or ftp).
       * (2) or no protocol.  A protocol must be followed by a colon. The below
       *     allows that by allowing colons only after one of the characters [/?#].
       *     A colon after a hash (#) must be in the fragment.
       *     Otherwise, a colon after a (?) must be in a query.
       *     Otherwise, a colon after a single solidus (/) must be in a path.
       *     Otherwise, a colon after a double solidus (//) must be in the authority
       *     (before port).
       *
       * The pattern disallows &, used in HTML entity declarations before
       * one of the characters in [/?#]. This disallows HTML entities used in the
       * protocol name, which should never happen, e.g. "h&#116;tp" for "http".
       * It also disallows HTML entities in the first path part of a relative path,
       * e.g. "foo&lt;bar/baz".  Our existing escaping functions should not produce
       * that. More importantly, it disallows masking of a colon,
       * e.g. "javascript&#58;...".
       *
       * This regular expression was taken from the Closure sanitization library.
       */


      var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;
      /* A pattern that matches safe srcset values */

      var SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;
      /** A pattern that matches safe data URLs. Only matches image, video and audio types. */

      var 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;

      function _sanitizeUrl(url) {
        url = String(url);
        if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN)) return url;

        if (typeof ngDevMode === 'undefined' || ngDevMode) {
          console.warn("WARNING: sanitizing unsafe URL value ".concat(url, " (see https://g.co/ng/security#xss)"));
        }

        return 'unsafe:' + url;
      }

      function sanitizeSrcset(srcset) {
        srcset = String(srcset);
        return srcset.split(',').map(function (srcset) {
          return _sanitizeUrl(srcset.trim());
        }).join(', ');
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function tagSet(tags) {
        var res = {};

        var _iterator56 = _createForOfIteratorHelper(tags.split(',')),
            _step55;

        try {
          for (_iterator56.s(); !(_step55 = _iterator56.n()).done;) {
            var t = _step55.value;
            res[t] = true;
          }
        } catch (err) {
          _iterator56.e(err);
        } finally {
          _iterator56.f();
        }

        return res;
      }

      function merge() {
        var res = {};

        for (var _len38 = arguments.length, sets = new Array(_len38), _key39 = 0; _key39 < _len38; _key39++) {
          sets[_key39] = arguments[_key39];
        }

        for (var _i23 = 0, _sets = sets; _i23 < _sets.length; _i23++) {
          var s = _sets[_i23];

          for (var v in s) {
            if (s.hasOwnProperty(v)) res[v] = true;
          }
        }

        return res;
      } // Good source of info about elements and attributes
      // https://html.spec.whatwg.org/#semantics
      // https://simon.html5.org/html-elements
      // Safe Void Elements - HTML5
      // https://html.spec.whatwg.org/#void-elements


      var VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr'); // Elements that you can, intentionally, leave open (and which close themselves)
      // https://html.spec.whatwg.org/#optional-tags

      var OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');
      var OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');
      var OPTIONAL_END_TAG_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS); // Safe Block Elements - HTML5

      var BLOCK_ELEMENTS = merge(OPTIONAL_END_TAG_BLOCK_ELEMENTS, 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

      var INLINE_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, 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'));
      var VALID_ELEMENTS = merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS); // Attributes that have href and hence need to be sanitized

      var URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href'); // Attributes that have special href set hence need to be sanitized

      var SRCSET_ATTRS = tagSet('srcset');
      var HTML_ATTRS = 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)

      var ARIA_ATTRS = 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
      // issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via
      // innerHTML is required, SVG attributes should be added here.
      // NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those
      // can be sanitized, but they increase security surface area without a legitimate use case, so they
      // are left out here.

      var VALID_ATTRS = merge(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS, ARIA_ATTRS); // Elements whose content should not be traversed/preserved, if the elements themselves are invalid.
      //
      // Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)
      // `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we
      // don't want to preserve the content, if the elements themselves are going to be removed.

      var SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');
      /**
       * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe
       * attributes.
       */

      var SanitizingHtmlSerializer = /*#__PURE__*/function () {
        function SanitizingHtmlSerializer() {
          _classCallCheck(this, SanitizingHtmlSerializer);

          // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just
          // because characters were re-encoded.
          this.sanitizedSomething = false;
          this.buf = [];
        }

        _createClass2(SanitizingHtmlSerializer, [{
          key: "sanitizeChildren",
          value: function sanitizeChildren(el) {
            // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.
            // However this code never accesses properties off of `document` before deleting its contents
            // again, so it shouldn't be vulnerable to DOM clobbering.
            var current = el.firstChild;
            var traverseContent = true;

            while (current) {
              if (current.nodeType === Node.ELEMENT_NODE) {
                traverseContent = this.startElement(current);
              } else if (current.nodeType === Node.TEXT_NODE) {
                this.chars(current.nodeValue);
              } else {
                // Strip non-element, non-text nodes.
                this.sanitizedSomething = true;
              }

              if (traverseContent && current.firstChild) {
                current = current.firstChild;
                continue;
              }

              while (current) {
                // Leaving the element. Walk up and to the right, closing tags as we go.
                if (current.nodeType === Node.ELEMENT_NODE) {
                  this.endElement(current);
                }

                var next = this.checkClobberedElement(current, current.nextSibling);

                if (next) {
                  current = next;
                  break;
                }

                current = this.checkClobberedElement(current, current.parentNode);
              }
            }

            return this.buf.join('');
          }
          /**
           * Sanitizes an opening element tag (if valid) and returns whether the element's contents should
           * be traversed. Element content must always be traversed (even if the element itself is not
           * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.
           *
           * @param element The element to sanitize.
           * @return True if the element's contents should be traversed.
           */

        }, {
          key: "startElement",
          value: function startElement(element) {
            var tagName = element.nodeName.toLowerCase();

            if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {
              this.sanitizedSomething = true;
              return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);
            }

            this.buf.push('<');
            this.buf.push(tagName);
            var elAttrs = element.attributes;

            for (var i = 0; i < elAttrs.length; i++) {
              var elAttr = elAttrs.item(i);
              var attrName = elAttr.name;
              var lower = attrName.toLowerCase();

              if (!VALID_ATTRS.hasOwnProperty(lower)) {
                this.sanitizedSomething = true;
                continue;
              }

              var value = elAttr.value; // TODO(martinprobst): Special case image URIs for data:image/...

              if (URI_ATTRS[lower]) value = _sanitizeUrl(value);
              if (SRCSET_ATTRS[lower]) value = sanitizeSrcset(value);
              this.buf.push(' ', attrName, '="', encodeEntities(value), '"');
            }

            this.buf.push('>');
            return true;
          }
        }, {
          key: "endElement",
          value: function endElement(current) {
            var tagName = current.nodeName.toLowerCase();

            if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {
              this.buf.push('</');
              this.buf.push(tagName);
              this.buf.push('>');
            }
          }
        }, {
          key: "chars",
          value: function chars(_chars) {
            this.buf.push(encodeEntities(_chars));
          }
        }, {
          key: "checkClobberedElement",
          value: function checkClobberedElement(node, nextNode) {
            if (nextNode && (node.compareDocumentPosition(nextNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {
              throw new Error("Failed to sanitize html because the element is clobbered: ".concat(node.outerHTML));
            }

            return nextNode;
          }
        }]);

        return SanitizingHtmlSerializer;
      }(); // Regular Expressions for parsing tags and attributes


      var SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; // ! to ~ is the ASCII range.

      var NON_ALPHANUMERIC_REGEXP = /([^\#-~ |!])/g;
      /**
       * Escapes all potentially dangerous characters, so that the
       * resulting string can be safely inserted into attribute or
       * element text.
       * @param value
       */

      function encodeEntities(value) {
        return value.replace(/&/g, '&amp;').replace(SURROGATE_PAIR_REGEXP, function (match) {
          var hi = match.charCodeAt(0);
          var low = match.charCodeAt(1);
          return '&#' + ((hi - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000) + ';';
        }).replace(NON_ALPHANUMERIC_REGEXP, function (match) {
          return '&#' + match.charCodeAt(0) + ';';
        }).replace(/</g, '&lt;').replace(/>/g, '&gt;');
      }

      var inertBodyHelper;
      /**
       * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to
       * the DOM in a browser environment.
       */

      function _sanitizeHtml(defaultDoc, unsafeHtmlInput) {
        var inertBodyElement = null;

        try {
          inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc); // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).

          var unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';
          inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml); // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser
          // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.

          var mXSSAttempts = 5;
          var parsedHtml = unsafeHtml;

          do {
            if (mXSSAttempts === 0) {
              throw new Error('Failed to sanitize html because the input is unstable');
            }

            mXSSAttempts--;
            unsafeHtml = parsedHtml;
            parsedHtml = inertBodyElement.innerHTML;
            inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);
          } while (unsafeHtml !== parsedHtml);

          var sanitizer = new SanitizingHtmlSerializer();
          var safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);

          if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) {
            console.warn('WARNING: sanitizing HTML stripped some content, see https://g.co/ng/security#xss');
          }

          return safeHtml;
        } finally {
          // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.
          if (inertBodyElement) {
            var parent = getTemplateContent(inertBodyElement) || inertBodyElement;

            while (parent.firstChild) {
              parent.removeChild(parent.firstChild);
            }
          }
        }
      }

      function getTemplateContent(el) {
        return 'content' in el
        /** Microsoft/TypeScript#21517 */
        && isTemplateElement(el) ? el.content : null;
      }

      function isTemplateElement(el) {
        return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
       * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
       * handled.
       *
       * See DomSanitizer for more details on security in Angular applications.
       *
       * @publicApi
       */


      var SecurityContext;

      (function (SecurityContext) {
        SecurityContext[SecurityContext["NONE"] = 0] = "NONE";
        SecurityContext[SecurityContext["HTML"] = 1] = "HTML";
        SecurityContext[SecurityContext["STYLE"] = 2] = "STYLE";
        SecurityContext[SecurityContext["SCRIPT"] = 3] = "SCRIPT";
        SecurityContext[SecurityContext["URL"] = 4] = "URL";
        SecurityContext[SecurityContext["RESOURCE_URL"] = 5] = "RESOURCE_URL";
      })(SecurityContext || (SecurityContext = {}));
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing
       * dangerous content.
       *
       * This method parses the `html` and locates potentially dangerous content (such as urls and
       * javascript) and removes it.
       *
       * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.
       *
       * @param unsafeHtml untrusted `html`, typically from the user.
       * @returns `html` string which is safe to display to user, because all of the dangerous javascript
       * and urls have been removed.
       *
       * @codeGenApi
       */


      function ɵɵsanitizeHtml(unsafeHtml) {
        var sanitizer = getSanitizer();

        if (sanitizer) {
          return sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '';
        }

        if (allowSanitizationBypassAndThrow(unsafeHtml, "HTML"
        /* Html */
        )) {
          return unwrapSafeValue(unsafeHtml);
        }

        return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml));
      }
      /**
       * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing
       * dangerous content.
       *
       * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.
       *
       * @param unsafeStyle untrusted `style`, typically from the user.
       * @returns `style` string which is safe to bind to the `style` properties.
       *
       * @codeGenApi
       */


      function ɵɵsanitizeStyle(unsafeStyle) {
        var sanitizer = getSanitizer();

        if (sanitizer) {
          return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';
        }

        if (allowSanitizationBypassAndThrow(unsafeStyle, "Style"
        /* Style */
        )) {
          return unwrapSafeValue(unsafeStyle);
        }

        return renderStringify(unsafeStyle);
      }
      /**
       * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing
       * dangerous
       * content.
       *
       * This method parses the `url` and locates potentially dangerous content (such as javascript) and
       * removes it.
       *
       * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.
       *
       * @param unsafeUrl untrusted `url`, typically from the user.
       * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
       * all of the dangerous javascript has been removed.
       *
       * @codeGenApi
       */


      function ɵɵsanitizeUrl(unsafeUrl) {
        var sanitizer = getSanitizer();

        if (sanitizer) {
          return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';
        }

        if (allowSanitizationBypassAndThrow(unsafeUrl, "URL"
        /* Url */
        )) {
          return unwrapSafeValue(unsafeUrl);
        }

        return _sanitizeUrl(renderStringify(unsafeUrl));
      }
      /**
       * A `url` sanitizer which only lets trusted `url`s through.
       *
       * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.
       *
       * @param unsafeResourceUrl untrusted `url`, typically from the user.
       * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
       * only trusted `url`s have been allowed to pass.
       *
       * @codeGenApi
       */


      function ɵɵsanitizeResourceUrl(unsafeResourceUrl) {
        var sanitizer = getSanitizer();

        if (sanitizer) {
          return sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '';
        }

        if (allowSanitizationBypassAndThrow(unsafeResourceUrl, "ResourceURL"
        /* ResourceUrl */
        )) {
          return unwrapSafeValue(unsafeResourceUrl);
        }

        throw new Error('unsafe value used in a resource URL context (see https://g.co/ng/security#xss)');
      }
      /**
       * A `script` sanitizer which only lets trusted javascript through.
       *
       * This passes only `script`s marked trusted by calling {@link
       * bypassSanitizationTrustScript}.
       *
       * @param unsafeScript untrusted `script`, typically from the user.
       * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,
       * because only trusted `scripts` have been allowed to pass.
       *
       * @codeGenApi
       */


      function ɵɵsanitizeScript(unsafeScript) {
        var sanitizer = getSanitizer();

        if (sanitizer) {
          return sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '';
        }

        if (allowSanitizationBypassAndThrow(unsafeScript, "Script"
        /* Script */
        )) {
          return unwrapSafeValue(unsafeScript);
        }

        throw new Error('unsafe value used in a script context');
      }
      /**
       * Promotes the given constant string to a TrustedHTML.
       * @param html constant string containing trusted HTML.
       * @returns TrustedHTML wrapping `html`.
       *
       * @security This is a security-sensitive function and should only be used to
       * convert constant values of attributes and properties found in
       * application-provided Angular templates to TrustedHTML.
       *
       * @codeGenApi
       */


      function ɵɵtrustConstantHtml(html) {
        return trustedHTMLFromString(html);
      }
      /**
       * Promotes the given constant string to a TrustedScript.
       * @param script constant string containing a trusted script.
       * @returns TrustedScript wrapping `script`.
       *
       * @security This is a security-sensitive function and should only be used to
       * convert constant values of attributes and properties found in
       * application-provided Angular templates to TrustedScript.
       *
       * @codeGenApi
       */


      function ɵɵtrustConstantScript(script) {
        return trustedScriptFromString(script);
      }
      /**
       * Promotes the given constant string to a TrustedScriptURL.
       * @param url constant string containing a trusted script URL.
       * @returns TrustedScriptURL wrapping `url`.
       *
       * @security This is a security-sensitive function and should only be used to
       * convert constant values of attributes and properties found in
       * application-provided Angular templates to TrustedScriptURL.
       *
       * @codeGenApi
       */


      function ɵɵtrustConstantResourceUrl(url) {
        return trustedScriptURLFromString(url);
      }
      /**
       * Detects which sanitizer to use for URL property, based on tag name and prop name.
       *
       * The rules are based on the RESOURCE_URL context config from
       * `packages/compiler/src/schema/dom_security_schema.ts`.
       * If tag and prop names don't match Resource URL schema, use URL sanitizer.
       */


      function getUrlSanitizer(tag, prop) {
        if (prop === 'src' && (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' || tag === 'script') || prop === 'href' && (tag === 'base' || tag === 'link')) {
          return ɵɵsanitizeResourceUrl;
        }

        return ɵɵsanitizeUrl;
      }
      /**
       * Sanitizes URL, selecting sanitizer function based on tag and property names.
       *
       * This function is used in case we can't define security context at compile time, when only prop
       * name is available. This happens when we generate host bindings for Directives/Components. The
       * host element is unknown at compile time, so we defer calculation of specific sanitizer to
       * runtime.
       *
       * @param unsafeUrl untrusted `url`, typically from the user.
       * @param tag target element tag name.
       * @param prop name of the property that contains the value.
       * @returns `url` string which is safe to bind.
       *
       * @codeGenApi
       */


      function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) {
        return getUrlSanitizer(tag, prop)(unsafeUrl);
      }

      function validateAgainstEventProperties(name) {
        if (name.toLowerCase().startsWith('on')) {
          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.";
          throw new Error(msg);
        }
      }

      function validateAgainstEventAttributes(name) {
        if (name.toLowerCase().startsWith('on')) {
          var msg = "Binding to event attribute '".concat(name, "' is disallowed for security reasons, ") + "please use (".concat(name.slice(2), ")=...");
          throw new Error(msg);
        }
      }

      function getSanitizer() {
        var lView = getLView();
        return lView && lView[SANITIZER];
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ERROR_TYPE = 'ngType';
      var ERROR_DEBUG_CONTEXT = 'ngDebugContext';
      var ERROR_ORIGINAL_ERROR = 'ngOriginalError';
      var ERROR_LOGGER = 'ngErrorLogger';

      function wrappedError(message, originalError) {
        var msg = "".concat(message, " caused by: ").concat(originalError instanceof Error ? originalError.message : originalError);
        var error = Error(msg);
        error[ERROR_ORIGINAL_ERROR] = originalError;
        return error;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function getType(error) {
        return error[ERROR_TYPE];
      }

      function getDebugContext(error) {
        return error[ERROR_DEBUG_CONTEXT];
      }

      function getOriginalError(error) {
        return error[ERROR_ORIGINAL_ERROR];
      }

      function getErrorLogger(error) {
        return error[ERROR_LOGGER] || defaultErrorLogger;
      }

      function defaultErrorLogger(console) {
        for (var _len39 = arguments.length, values = new Array(_len39 > 1 ? _len39 - 1 : 0), _key40 = 1; _key40 < _len39; _key40++) {
          values[_key40 - 1] = arguments[_key40];
        }

        console.error.apply(console, values);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Provides a hook for centralized exception handling.
       *
       * The default implementation of `ErrorHandler` prints error messages to the `console`. To
       * intercept error handling, write a custom exception handler that replaces this default as
       * appropriate for your app.
       *
       * @usageNotes
       * ### Example
       *
       * ```
       * class MyErrorHandler implements ErrorHandler {
       *   handleError(error) {
       *     // do something with the exception
       *   }
       * }
       *
       * @NgModule({
       *   providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]
       * })
       * class MyModule {}
       * ```
       *
       * @publicApi
       */


      var ErrorHandler = /*#__PURE__*/function () {
        function ErrorHandler() {
          _classCallCheck(this, ErrorHandler);

          /**
           * @internal
           */
          this._console = console;
        }

        _createClass2(ErrorHandler, [{
          key: "handleError",
          value: function handleError(error) {
            var originalError = this._findOriginalError(error);

            var context = this._findContext(error); // Note: Browser consoles show the place from where console.error was called.
            // We can use this to give users additional information about the error.


            var errorLogger = getErrorLogger(error);
            errorLogger(this._console, "ERROR", error);

            if (originalError) {
              errorLogger(this._console, "ORIGINAL ERROR", originalError);
            }

            if (context) {
              errorLogger(this._console, 'ERROR CONTEXT', context);
            }
          }
          /** @internal */

        }, {
          key: "_findContext",
          value: function _findContext(error) {
            if (error) {
              return getDebugContext(error) ? getDebugContext(error) : this._findContext(getOriginalError(error));
            }

            return null;
          }
          /** @internal */

        }, {
          key: "_findOriginalError",
          value: function _findOriginalError(error) {
            var e = getOriginalError(error);

            while (e && getOriginalError(e)) {
              e = getOriginalError(e);
            }

            return e;
          }
        }]);

        return ErrorHandler;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Defines a schema that allows an NgModule to contain the following:
       * - Non-Angular elements named with dash case (`-`).
       * - Element properties named with dash case (`-`).
       * Dash case is the naming convention for custom elements.
       *
       * @publicApi
       */


      var CUSTOM_ELEMENTS_SCHEMA = {
        name: 'custom-elements'
      };
      /**
       * Defines a schema that allows any property on any element.
       *
       * @publicApi
       */

      var NO_ERRORS_SCHEMA = {
        name: 'no-errors-schema'
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var END_COMMENT = /-->/g;
      var END_COMMENT_ESCAPED = "-\u200B-\u200B>";
      /**
       * Escape the content of the strings so that it can be safely inserted into a comment node.
       *
       * The issue is that HTML does not specify any way to escape comment end text inside the comment.
       * `<!-- The way you close a comment is with "-->". -->`. Above the `"-->"` is meant to be text not
       * an end to the comment. This can be created programmatically through DOM APIs.
       *
       * ```
       * div.innerHTML = div.innerHTML
       * ```
       *
       * One would expect that the above code would be safe to do, but it turns out that because comment
       * text is not escaped, the comment may contain text which will prematurely close the comment
       * opening up the application for XSS attack. (In SSR we programmatically create comment nodes which
       * may contain such text and expect them to be safe.)
       *
       * This function escapes the comment text by looking for the closing char sequence `-->` and replace
       * it with `-_-_>` where the `_` is a zero width space `\u200B`. The result is that if a comment
       * contains `-->` text it will render normally but it will not cause the HTML parser to close the
       * comment.
       *
       * @param value text to make safe for comment node by escaping the comment close character sequence
       */

      function escapeCommentText(value) {
        return value.replace(END_COMMENT, END_COMMENT_ESCAPED);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!
       */

      /**
       * Creates an `Array` construction with a given name. This is useful when
       * looking for memory consumption to see what time of array it is.
       *
       *
       * @param name Name to give to the constructor
       * @returns A subclass of `Array` if possible. This can only be done in
       *          environments which support `class` construct.
       */


      function createNamedArrayType(name) {
        // This should never be called in prod mode, so let's verify that is the case.
        if (ngDevMode) {
          try {
            // If this function were compromised the following could lead to arbitrary
            // script execution. We bless it with Trusted Types anyway since this
            // function is stripped out of production binaries.
            return newTrustedFunctionForDev('Array', "return class ".concat(name, " extends Array{}"))(Array);
          } catch (e) {
            // If it does not work just give up and fall back to regular Array.
            return Array;
          }
        } else {
          throw new Error('Looks like we are in \'prod mode\', but we are creating a named Array type, which is wrong! Check your code');
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function normalizeDebugBindingName(name) {
        // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers
        name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));
        return "ng-reflect-".concat(name);
      }

      var CAMEL_CASE_REGEXP = /([A-Z])/g;

      function camelCaseToDashCase(input) {
        return input.replace(CAMEL_CASE_REGEXP, function () {
          for (var _len40 = arguments.length, m = new Array(_len40), _key41 = 0; _key41 < _len40; _key41++) {
            m[_key41] = arguments[_key41];
          }

          return '-' + m[1].toLowerCase();
        });
      }

      function normalizeDebugBindingValue(value) {
        try {
          // Limit the size of the value as otherwise the DOM just gets polluted.
          return value != null ? value.toString().slice(0, 30) : value;
        } catch (e) {
          return '[ERROR] Exception while trying to serialize the value';
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Returns the matching `LContext` data for a given DOM node, directive or component instance.
       *
       * This function will examine the provided DOM element, component, or directive instance\'s
       * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched
       * value will be that of the newly created `LContext`.
       *
       * If the monkey-patched value is the `LView` instance then the context value for that
       * target will be created and the monkey-patch reference will be updated. Therefore when this
       * function is called it may mutate the provided element\'s, component\'s or any of the associated
       * directive\'s monkey-patch values.
       *
       * If the monkey-patch value is not detected then the code will walk up the DOM until an element
       * is found which contains a monkey-patch reference. When that occurs then the provided element
       * will be updated with a new context (which is then returned). If the monkey-patch value is not
       * detected for a component/directive instance then it will throw an error (all components and
       * directives should be automatically monkey-patched by ivy).
       *
       * @param target Component, Directive or DOM Node.
       */


      function getLContext(target) {
        var mpValue = readPatchedData(target);

        if (mpValue) {
          // only when it's an array is it considered an LView instance
          // ... otherwise it's an already constructed LContext instance
          if (Array.isArray(mpValue)) {
            var lView = mpValue;
            var nodeIndex;
            var component = undefined;
            var directives = undefined;

            if (isComponentInstance(target)) {
              nodeIndex = findViaComponent(lView, target);

              if (nodeIndex == -1) {
                throw new Error('The provided component was not found in the application');
              }

              component = target;
            } else if (isDirectiveInstance(target)) {
              nodeIndex = findViaDirective(lView, target);

              if (nodeIndex == -1) {
                throw new Error('The provided directive was not found in the application');
              }

              directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);
            } else {
              nodeIndex = findViaNativeElement(lView, target);

              if (nodeIndex == -1) {
                return null;
              }
            } // the goal is not to fill the entire context full of data because the lookups
            // are expensive. Instead, only the target data (the element, component, container, ICU
            // expression or directive details) are filled into the context. If called multiple times
            // with different target values then the missing target data will be filled in.


            var _native2 = unwrapRNode(lView[nodeIndex]);

            var existingCtx = readPatchedData(_native2);
            var context = existingCtx && !Array.isArray(existingCtx) ? existingCtx : createLContext(lView, nodeIndex, _native2); // only when the component has been discovered then update the monkey-patch

            if (component && context.component === undefined) {
              context.component = component;
              attachPatchData(context.component, context);
            } // only when the directives have been discovered then update the monkey-patch


            if (directives && context.directives === undefined) {
              context.directives = directives;

              for (var i = 0; i < directives.length; i++) {
                attachPatchData(directives[i], context);
              }
            }

            attachPatchData(context["native"], context);
            mpValue = context;
          }
        } else {
          var rElement = target;
          ngDevMode && assertDomNode(rElement); // if the context is not found then we need to traverse upwards up the DOM
          // to find the nearest element that has already been monkey patched with data

          var parent = rElement;

          while (parent = parent.parentNode) {
            var parentContext = readPatchedData(parent);

            if (parentContext) {
              var _lView2 = void 0;

              if (Array.isArray(parentContext)) {
                _lView2 = parentContext;
              } else {
                _lView2 = parentContext.lView;
              } // the edge of the app was also reached here through another means
              // (maybe because the DOM was changed manually).


              if (!_lView2) {
                return null;
              }

              var index = findViaNativeElement(_lView2, rElement);

              if (index >= 0) {
                var _native3 = unwrapRNode(_lView2[index]);

                var _context30 = createLContext(_lView2, index, _native3);

                attachPatchData(_native3, _context30);
                mpValue = _context30;
                break;
              }
            }
          }
        }

        return mpValue || null;
      }
      /**
       * Creates an empty instance of a `LContext` context
       */


      function createLContext(lView, nodeIndex, _native4) {
        return {
          lView: lView,
          nodeIndex: nodeIndex,
          "native": _native4,
          component: undefined,
          directives: undefined,
          localRefs: undefined
        };
      }
      /**
       * Takes a component instance and returns the view for that component.
       *
       * @param componentInstance
       * @returns The component's view
       */


      function getComponentViewByInstance(componentInstance) {
        var lView = readPatchedData(componentInstance);
        var view;

        if (Array.isArray(lView)) {
          var nodeIndex = findViaComponent(lView, componentInstance);
          view = getComponentLViewByIndex(nodeIndex, lView);
          var context = createLContext(lView, nodeIndex, view[HOST]);
          context.component = componentInstance;
          attachPatchData(componentInstance, context);
          attachPatchData(context["native"], context);
        } else {
          var _context31 = lView;
          view = getComponentLViewByIndex(_context31.nodeIndex, _context31.lView);
        }

        return view;
      }
      /**
       * Assigns the given data to the given target (which could be a component,
       * directive or DOM node instance) using monkey-patching.
       */


      function attachPatchData(target, data) {
        target[MONKEY_PATCH_KEY_NAME] = data;
      }

      function isComponentInstance(instance) {
        return instance && instance.constructor && instance.constructor.ɵcmp;
      }

      function isDirectiveInstance(instance) {
        return instance && instance.constructor && instance.constructor.ɵdir;
      }
      /**
       * Locates the element within the given LView and returns the matching index
       */


      function findViaNativeElement(lView, target) {
        var tView = lView[TVIEW];

        for (var i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {
          if (unwrapRNode(lView[i]) === target) {
            return i;
          }
        }

        return -1;
      }
      /**
       * Locates the next tNode (child, sibling or parent).
       */


      function traverseNextElement(tNode) {
        if (tNode.child) {
          return tNode.child;
        } else if (tNode.next) {
          return tNode.next;
        } else {
          // Let's take the following template: <div><span>text</span></div><component/>
          // After checking the text node, we need to find the next parent that has a "next" TNode,
          // in this case the parent `div`, so that we can find the component.
          while (tNode.parent && !tNode.parent.next) {
            tNode = tNode.parent;
          }

          return tNode.parent && tNode.parent.next;
        }
      }
      /**
       * Locates the component within the given LView and returns the matching index
       */


      function findViaComponent(lView, componentInstance) {
        var componentIndices = lView[TVIEW].components;

        if (componentIndices) {
          for (var i = 0; i < componentIndices.length; i++) {
            var elementComponentIndex = componentIndices[i];
            var componentView = getComponentLViewByIndex(elementComponentIndex, lView);

            if (componentView[CONTEXT] === componentInstance) {
              return elementComponentIndex;
            }
          }
        } else {
          var rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);
          var rootComponent = rootComponentView[CONTEXT];

          if (rootComponent === componentInstance) {
            // we are dealing with the root element here therefore we know that the
            // element is the very first element after the HEADER data in the lView
            return HEADER_OFFSET;
          }
        }

        return -1;
      }
      /**
       * Locates the directive within the given LView and returns the matching index
       */


      function findViaDirective(lView, directiveInstance) {
        // if a directive is monkey patched then it will (by default)
        // have a reference to the LView of the current view. The
        // element bound to the directive being search lives somewhere
        // in the view data. We loop through the nodes and check their
        // list of directives for the instance.
        var tNode = lView[TVIEW].firstChild;

        while (tNode) {
          var directiveIndexStart = tNode.directiveStart;
          var directiveIndexEnd = tNode.directiveEnd;

          for (var i = directiveIndexStart; i < directiveIndexEnd; i++) {
            if (lView[i] === directiveInstance) {
              return tNode.index;
            }
          }

          tNode = traverseNextElement(tNode);
        }

        return -1;
      }
      /**
       * Returns a list of directives extracted from the given view based on the
       * provided list of directive index values.
       *
       * @param nodeIndex The node index
       * @param lView The target view data
       * @param includeComponents Whether or not to include components in returned directives
       */


      function getDirectivesAtNodeIndex(nodeIndex, lView, includeComponents) {
        var tNode = lView[TVIEW].data[nodeIndex];
        var directiveStartIndex = tNode.directiveStart;
        if (directiveStartIndex == 0) return EMPTY_ARRAY;
        var directiveEndIndex = tNode.directiveEnd;
        if (!includeComponents && tNode.flags & 2
        /* isComponentHost */
        ) directiveStartIndex++;
        return lView.slice(directiveStartIndex, directiveEndIndex);
      }

      function getComponentAtNodeIndex(nodeIndex, lView) {
        var tNode = lView[TVIEW].data[nodeIndex];
        var directiveStartIndex = tNode.directiveStart;
        return tNode.flags & 2
        /* isComponentHost */
        ? lView[directiveStartIndex] : null;
      }
      /**
       * Returns a map of local references (local reference name => element or directive instance) that
       * exist on a given element.
       */


      function discoverLocalRefs(lView, nodeIndex) {
        var tNode = lView[TVIEW].data[nodeIndex];

        if (tNode && tNode.localNames) {
          var result = {};
          var localIndex = tNode.index + 1;

          for (var i = 0; i < tNode.localNames.length; i += 2) {
            result[tNode.localNames[i]] = lView[localIndex];
            localIndex++;
          }

          return result;
        }

        return null;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ɵ0$4 = function ɵ0$4() {
        return (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame || // browser only
        setTimeout // everything else
        ).bind(_global);
      };

      var defaultScheduler = ɵ0$4();
      /**
       *
       * @codeGenApi
       */

      function ɵɵresolveWindow(element) {
        return {
          name: 'window',
          target: element.ownerDocument.defaultView
        };
      }
      /**
       *
       * @codeGenApi
       */


      function ɵɵresolveDocument(element) {
        return {
          name: 'document',
          target: element.ownerDocument
        };
      }
      /**
       *
       * @codeGenApi
       */


      function ɵɵresolveBody(element) {
        return {
          name: 'body',
          target: element.ownerDocument.body
        };
      }
      /**
       * The special delimiter we use to separate property names, prefixes, and suffixes
       * in property binding metadata. See storeBindingMetadata().
       *
       * We intentionally use the Unicode "REPLACEMENT CHARACTER" (U+FFFD) as a delimiter
       * because it is a very uncommon character that is unlikely to be part of a user's
       * property names or interpolation strings. If it is in fact used in a property
       * binding, DebugElement.properties will not return the correct value for that
       * binding. However, there should be no runtime effect for real applications.
       *
       * This character is typically rendered as a question mark inside of a diamond.
       * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)
       *
       */


      var INTERPOLATION_DELIMITER = "\uFFFD";
      /**
       * Unwrap a value which might be behind a closure (for forward declaration reasons).
       */

      function maybeUnwrapFn(value) {
        if (value instanceof Function) {
          return value();
        } else {
          return value;
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /** Called when there are multiple component selectors that match a given node */


      function throwMultipleComponentError(tNode) {
        throw new RuntimeError("300"
        /* MULTIPLE_COMPONENTS_MATCH */
        , "Multiple components match node with tagname ".concat(tNode.value));
      }
      /** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */


      function throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) {
        var field = propName ? " for '".concat(propName, "'") : '';
        var msg = "ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value".concat(field, ": '").concat(oldValue, "'. Current value: '").concat(currValue, "'.");

        if (creationMode) {
          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?";
        } // TODO: include debug context, see `viewDebugError` function in
        // `packages/core/src/view/errors.ts` for reference.


        throw new RuntimeError("100"
        /* EXPRESSION_CHANGED_AFTER_CHECKED */
        , msg);
      }

      function constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) {
        var _meta$split = meta.split(INTERPOLATION_DELIMITER),
            _meta$split2 = _toArray(_meta$split),
            propName = _meta$split2[0],
            prefix = _meta$split2[1],
            chunks = _meta$split2.slice(2);

        var oldValue = prefix,
            newValue = prefix;

        for (var i = 0; i < chunks.length; i++) {
          var slotIdx = rootIndex + i;
          oldValue += "".concat(lView[slotIdx]).concat(chunks[i]);
          newValue += "".concat(slotIdx === expressionIndex ? changedValue : lView[slotIdx]).concat(chunks[i]);
        }

        return {
          propName: propName,
          oldValue: oldValue,
          newValue: newValue
        };
      }
      /**
       * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError:
       * - property name (for property bindings or interpolations)
       * - old and new values, enriched using information from metadata
       *
       * More information on the metadata storage format can be found in `storePropertyBindingMetadata`
       * function description.
       */


      function getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) {
        var tData = lView[TVIEW].data;
        var metadata = tData[bindingIndex];

        if (typeof metadata === 'string') {
          // metadata for property interpolation
          if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {
            return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue);
          } // metadata for property binding


          return {
            propName: metadata,
            oldValue: oldValue,
            newValue: newValue
          };
        } // metadata is not available for this expression, check if this expression is a part of the
        // property interpolation by going from the current binding index left and look for a string that
        // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this:
        // [..., 'id�Prefix � and � suffix', null, null, null, ...]


        if (metadata === null) {
          var idx = bindingIndex - 1;

          while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {
            idx--;
          }

          var meta = tData[idx];

          if (typeof meta === 'string') {
            var matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g')); // first interpolation delimiter separates property name from interpolation parts (in case of
            // property interpolations), so we subtract one from total number of found delimiters

            if (matches && matches.length - 1 > bindingIndex - idx) {
              return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);
            }
          }
        }

        return {
          propName: undefined,
          oldValue: oldValue,
          newValue: newValue
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Flags for renderer-specific style modifiers.
       * @publicApi
       */


      var RendererStyleFlags2;

      (function (RendererStyleFlags2) {
        // TODO(misko): This needs to be refactored into a separate file so that it can be imported from
        // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails
        // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.

        /**
         * Marks a style as important.
         */
        RendererStyleFlags2[RendererStyleFlags2["Important"] = 1] = "Important";
        /**
         * Marks a style as using dash case naming (this-is-dash-case).
         */

        RendererStyleFlags2[RendererStyleFlags2["DashCase"] = 2] = "DashCase";
      })(RendererStyleFlags2 || (RendererStyleFlags2 = {}));
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _icuContainerIterate;
      /**
       * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.
       */


      function icuContainerIterate(tIcuContainerNode, lView) {
        return _icuContainerIterate(tIcuContainerNode, lView);
      }
      /**
       * Ensures that `IcuContainerVisitor`'s implementation is present.
       *
       * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the
       * bundler to tree shake ICU logic and only load it if ICU instruction is executed.
       */


      function ensureIcuContainerVisitorLoaded(loader) {
        if (_icuContainerIterate === undefined) {
          // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it
          // can be inlined into call-site.
          _icuContainerIterate = loader();
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // Note: This hack is necessary so we don't erroneously get a circular dependency
      // failure based on types.


      var unusedValueExportToPlacateAjd$5 = 1;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of
       * that LContainer, which is an LView
       * @param lView the lView whose parent to get
       */

      function getLViewParent(lView) {
        ngDevMode && assertLView(lView);
        var parent = lView[PARENT];
        return isLContainer(parent) ? parent[PARENT] : parent;
      }
      /**
       * Retrieve the root view from any component or `LView` by walking the parent `LView` until
       * reaching the root `LView`.
       *
       * @param componentOrLView any component or `LView`
       */


      function getRootView(componentOrLView) {
        ngDevMode && assertDefined(componentOrLView, 'component');
        var lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);

        while (lView && !(lView[FLAGS] & 512
        /* IsRoot */
        )) {
          lView = getLViewParent(lView);
        }

        ngDevMode && assertLView(lView);
        return lView;
      }
      /**
       * Returns the `RootContext` instance that is associated with
       * the application where the target is situated. It does this by walking the parent views until it
       * gets to the root view, then getting the context off of that.
       *
       * @param viewOrComponent the `LView` or component to get the root context for.
       */


      function getRootContext(viewOrComponent) {
        var rootView = getRootView(viewOrComponent);
        ngDevMode && assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');
        return rootView[CONTEXT];
      }
      /**
       * Gets the first `LContainer` in the LView or `null` if none exists.
       */


      function getFirstLContainer(lView) {
        return getNearestLContainer(lView[CHILD_HEAD]);
      }
      /**
       * Gets the next `LContainer` that is a sibling of the given container.
       */


      function getNextLContainer(container) {
        return getNearestLContainer(container[NEXT]);
      }

      function getNearestLContainer(viewOrContainer) {
        while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {
          viewOrContainer = viewOrContainer[NEXT];
        }

        return viewOrContainer;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$2 + unusedValueExportToPlacateAjd;
      /**
       * NOTE: for performance reasons, the possible actions are inlined within the function instead of
       * being passed as an argument.
       */

      function applyToElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {
        // If this slot was allocated for a text node dynamically created by i18n, the text node itself
        // won't be created until i18nApply() in the update block, so this node should be skipped.
        // For more info, see "ICU expressions should work inside an ngTemplateOutlet inside an ngFor"
        // in `i18n_spec.ts`.
        if (lNodeToHandle != null) {
          var lContainer;
          var isComponent = false; // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is
          // wrapped in an array which needs to be unwrapped. We need to know if it is a component and if
          // it has LContainer so that we can process all of those cases appropriately.

          if (isLContainer(lNodeToHandle)) {
            lContainer = lNodeToHandle;
          } else if (isLView(lNodeToHandle)) {
            isComponent = true;
            ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');
            lNodeToHandle = lNodeToHandle[HOST];
          }

          var rNode = unwrapRNode(lNodeToHandle);
          ngDevMode && !isProceduralRenderer(renderer) && assertDomNode(rNode);

          if (action === 0
          /* Create */
          && parent !== null) {
            if (beforeNode == null) {
              nativeAppendChild(renderer, parent, rNode);
            } else {
              nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);
            }
          } else if (action === 1
          /* Insert */
          && parent !== null) {
            nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);
          } else if (action === 2
          /* Detach */
          ) {
            nativeRemoveNode(renderer, rNode, isComponent);
          } else if (action === 3
          /* Destroy */
          ) {
            ngDevMode && ngDevMode.rendererDestroyNode++;
            renderer.destroyNode(rNode);
          }

          if (lContainer != null) {
            applyContainer(renderer, action, lContainer, parent, beforeNode);
          }
        }
      }

      function createTextNode(renderer, value) {
        ngDevMode && ngDevMode.rendererCreateTextNode++;
        ngDevMode && ngDevMode.rendererSetText++;
        return isProceduralRenderer(renderer) ? renderer.createText(value) : renderer.createTextNode(value);
      }

      function updateTextNode(renderer, rNode, value) {
        ngDevMode && ngDevMode.rendererSetText++;
        isProceduralRenderer(renderer) ? renderer.setValue(rNode, value) : rNode.textContent = value;
      }

      function createCommentNode(renderer, value) {
        ngDevMode && ngDevMode.rendererCreateComment++; // isProceduralRenderer check is not needed because both `Renderer2` and `Renderer3` have the same
        // method name.

        return renderer.createComment(escapeCommentText(value));
      }
      /**
       * Creates a native element from a tag name, using a renderer.
       * @param renderer A renderer to use
       * @param name the tag name
       * @param namespace Optional namespace for element.
       * @returns the element created
       */


      function createElementNode(renderer, name, namespace) {
        ngDevMode && ngDevMode.rendererCreateElement++;

        if (isProceduralRenderer(renderer)) {
          return renderer.createElement(name, namespace);
        } else {
          return namespace === null ? renderer.createElement(name) : renderer.createElementNS(namespace, name);
        }
      }
      /**
       * Removes all DOM elements associated with a view.
       *
       * Because some root nodes of the view may be containers, we sometimes need
       * to propagate deeply into the nested containers to remove all elements in the
       * views beneath it.
       *
       * @param tView The `TView' of the `LView` from which elements should be added or removed
       * @param lView The view from which elements should be added or removed
       */


      function removeViewFromContainer(tView, lView) {
        var renderer = lView[RENDERER];
        applyView(tView, lView, renderer, 2
        /* Detach */
        , null, null);
        lView[HOST] = null;
        lView[T_HOST] = null;
      }
      /**
       * Adds all DOM elements associated with a view.
       *
       * Because some root nodes of the view may be containers, we sometimes need
       * to propagate deeply into the nested containers to add all elements in the
       * views beneath it.
       *
       * @param tView The `TView' of the `LView` from which elements should be added or removed
       * @param parentTNode The `TNode` where the `LView` should be attached to.
       * @param renderer Current renderer to use for DOM manipulations.
       * @param lView The view from which elements should be added or removed
       * @param parentNativeNode The parent `RElement` where it should be inserted into.
       * @param beforeNode The node before which elements should be added, if insert mode
       */


      function addViewToContainer(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) {
        lView[HOST] = parentNativeNode;
        lView[T_HOST] = parentTNode;
        applyView(tView, lView, renderer, 1
        /* Insert */
        , parentNativeNode, beforeNode);
      }
      /**
       * Detach a `LView` from the DOM by detaching its nodes.
       *
       * @param tView The `TView' of the `LView` to be detached
       * @param lView the `LView` to be detached.
       */


      function renderDetachView(tView, lView) {
        applyView(tView, lView, lView[RENDERER], 2
        /* Detach */
        , null, null);
      }
      /**
       * Traverses down and up the tree of views and containers to remove listeners and
       * call onDestroy callbacks.
       *
       * Notes:
       *  - Because it's used for onDestroy calls, it needs to be bottom-up.
       *  - Must process containers instead of their views to avoid splicing
       *  when views are destroyed and re-added.
       *  - Using a while loop because it's faster than recursion
       *  - Destroy only called on movement to sibling or movement to parent (laterally or up)
       *
       *  @param rootView The view to destroy
       */


      function destroyViewTree(rootView) {
        // If the view has no children, we can clean it up and return early.
        var lViewOrLContainer = rootView[CHILD_HEAD];

        if (!lViewOrLContainer) {
          return cleanUpView(rootView[TVIEW], rootView);
        }

        while (lViewOrLContainer) {
          var next = null;

          if (isLView(lViewOrLContainer)) {
            // If LView, traverse down to child.
            next = lViewOrLContainer[CHILD_HEAD];
          } else {
            ngDevMode && assertLContainer(lViewOrLContainer); // If container, traverse down to its first LView.

            var firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET];
            if (firstView) next = firstView;
          }

          if (!next) {
            // Only clean up view when moving to the side or up, as destroy hooks
            // should be called in order from the bottom up.
            while (lViewOrLContainer && !lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) {
              if (isLView(lViewOrLContainer)) {
                cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);
              }

              lViewOrLContainer = lViewOrLContainer[PARENT];
            }

            if (lViewOrLContainer === null) lViewOrLContainer = rootView;

            if (isLView(lViewOrLContainer)) {
              cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);
            }

            next = lViewOrLContainer && lViewOrLContainer[NEXT];
          }

          lViewOrLContainer = next;
        }
      }
      /**
       * Inserts a view into a container.
       *
       * This adds the view to the container's array of active views in the correct
       * position. It also adds the view's elements to the DOM if the container isn't a
       * root node of another view (in that case, the view's elements will be added when
       * the container's parent view is added later).
       *
       * @param tView The `TView' of the `LView` to insert
       * @param lView The view to insert
       * @param lContainer The container into which the view should be inserted
       * @param index Which index in the container to insert the child view into
       */


      function insertView(tView, lView, lContainer, index) {
        ngDevMode && assertLView(lView);
        ngDevMode && assertLContainer(lContainer);
        var indexInContainer = CONTAINER_HEADER_OFFSET + index;
        var containerLength = lContainer.length;

        if (index > 0) {
          // This is a new view, we need to add it to the children.
          lContainer[indexInContainer - 1][NEXT] = lView;
        }

        if (index < containerLength - CONTAINER_HEADER_OFFSET) {
          lView[NEXT] = lContainer[indexInContainer];
          addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);
        } else {
          lContainer.push(lView);
          lView[NEXT] = null;
        }

        lView[PARENT] = lContainer; // track views where declaration and insertion points are different

        var declarationLContainer = lView[DECLARATION_LCONTAINER];

        if (declarationLContainer !== null && lContainer !== declarationLContainer) {
          trackMovedView(declarationLContainer, lView);
        } // notify query that a new view has been added


        var lQueries = lView[QUERIES];

        if (lQueries !== null) {
          lQueries.insertView(tView);
        } // Sets the attached flag


        lView[FLAGS] |= 128
        /* Attached */
        ;
      }
      /**
       * Track views created from the declaration container (TemplateRef) and inserted into a
       * different LContainer.
       */


      function trackMovedView(declarationContainer, lView) {
        ngDevMode && assertDefined(lView, 'LView required');
        ngDevMode && assertLContainer(declarationContainer);
        var movedViews = declarationContainer[MOVED_VIEWS];
        var insertedLContainer = lView[PARENT];
        ngDevMode && assertLContainer(insertedLContainer);
        var insertedComponentLView = insertedLContainer[PARENT][DECLARATION_COMPONENT_VIEW];
        ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');
        var declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];
        ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');

        if (declaredComponentLView !== insertedComponentLView) {
          // At this point the declaration-component is not same as insertion-component; this means that
          // this is a transplanted view. Mark the declared lView as having transplanted views so that
          // those views can participate in CD.
          declarationContainer[HAS_TRANSPLANTED_VIEWS] = true;
        }

        if (movedViews === null) {
          declarationContainer[MOVED_VIEWS] = [lView];
        } else {
          movedViews.push(lView);
        }
      }

      function detachMovedView(declarationContainer, lView) {
        ngDevMode && assertLContainer(declarationContainer);
        ngDevMode && assertDefined(declarationContainer[MOVED_VIEWS], 'A projected view should belong to a non-empty projected views collection');
        var movedViews = declarationContainer[MOVED_VIEWS];
        var declarationViewIndex = movedViews.indexOf(lView);
        var insertionLContainer = lView[PARENT];
        ngDevMode && assertLContainer(insertionLContainer); // If the view was marked for refresh but then detached before it was checked (where the flag
        // would be cleared and the counter decremented), we need to decrement the view counter here
        // instead.

        if (lView[FLAGS] & 1024
        /* RefreshTransplantedView */
        ) {
          lView[FLAGS] &= ~1024
          /* RefreshTransplantedView */
          ;
          updateTransplantedViewCount(insertionLContainer, -1);
        }

        movedViews.splice(declarationViewIndex, 1);
      }
      /**
       * Detaches a view from a container.
       *
       * This method removes the view from the container's array of active views. It also
       * removes the view's elements from the DOM.
       *
       * @param lContainer The container from which to detach a view
       * @param removeIndex The index of the view to detach
       * @returns Detached LView instance.
       */


      function detachView(lContainer, removeIndex) {
        if (lContainer.length <= CONTAINER_HEADER_OFFSET) return;
        var indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;
        var viewToDetach = lContainer[indexInContainer];

        if (viewToDetach) {
          var declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];

          if (declarationLContainer !== null && declarationLContainer !== lContainer) {
            detachMovedView(declarationLContainer, viewToDetach);
          }

          if (removeIndex > 0) {
            lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];
          }

          var removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);
          removeViewFromContainer(viewToDetach[TVIEW], viewToDetach); // notify query that a view has been removed

          var lQueries = removedLView[QUERIES];

          if (lQueries !== null) {
            lQueries.detachView(removedLView[TVIEW]);
          }

          viewToDetach[PARENT] = null;
          viewToDetach[NEXT] = null; // Unsets the attached flag

          viewToDetach[FLAGS] &= ~128
          /* Attached */
          ;
        }

        return viewToDetach;
      }
      /**
       * A standalone function which destroys an LView,
       * conducting clean up (e.g. removing listeners, calling onDestroys).
       *
       * @param tView The `TView' of the `LView` to be destroyed
       * @param lView The view to be destroyed.
       */


      function destroyLView(tView, lView) {
        if (!(lView[FLAGS] & 256
        /* Destroyed */
        )) {
          var renderer = lView[RENDERER];

          if (isProceduralRenderer(renderer) && renderer.destroyNode) {
            applyView(tView, lView, renderer, 3
            /* Destroy */
            , null, null);
          }

          destroyViewTree(lView);
        }
      }
      /**
       * Calls onDestroys hooks for all directives and pipes in a given view and then removes all
       * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks
       * can be propagated to @Output listeners.
       *
       * @param tView `TView` for the `LView` to clean up.
       * @param lView The LView to clean up
       */


      function cleanUpView(tView, lView) {
        if (!(lView[FLAGS] & 256
        /* Destroyed */
        )) {
          // Usually the Attached flag is removed when the view is detached from its parent, however
          // if it's a root view, the flag won't be unset hence why we're also removing on destroy.
          lView[FLAGS] &= ~128
          /* Attached */
          ; // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook
          // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If
          // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.
          // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is
          // really more of an "afterDestroy" hook if you think about it.

          lView[FLAGS] |= 256
          /* Destroyed */
          ;
          executeOnDestroys(tView, lView);
          processCleanups(tView, lView); // For component views only, the local renderer is destroyed at clean up time.

          if (lView[TVIEW].type === 1
          /* Component */
          && isProceduralRenderer(lView[RENDERER])) {
            ngDevMode && ngDevMode.rendererDestroy++;
            lView[RENDERER].destroy();
          }

          var declarationContainer = lView[DECLARATION_LCONTAINER]; // we are dealing with an embedded view that is still inserted into a container

          if (declarationContainer !== null && isLContainer(lView[PARENT])) {
            // and this is a projected view
            if (declarationContainer !== lView[PARENT]) {
              detachMovedView(declarationContainer, lView);
            } // For embedded views still attached to a container: remove query result from this view.


            var lQueries = lView[QUERIES];

            if (lQueries !== null) {
              lQueries.detachView(tView);
            }
          }
        }
      }
      /** Removes listeners and unsubscribes from output subscriptions */


      function processCleanups(tView, lView) {
        var tCleanup = tView.cleanup;
        var lCleanup = lView[CLEANUP]; // `LCleanup` contains both share information with `TCleanup` as well as instance specific
        // information appended at the end. We need to know where the end of the `TCleanup` information
        // is, and we track this with `lastLCleanupIndex`.

        var lastLCleanupIndex = -1;

        if (tCleanup !== null) {
          for (var i = 0; i < tCleanup.length - 1; i += 2) {
            if (typeof tCleanup[i] === 'string') {
              // This is a native DOM listener
              var idxOrTargetGetter = tCleanup[i + 1];
              var target = typeof idxOrTargetGetter === 'function' ? idxOrTargetGetter(lView) : unwrapRNode(lView[idxOrTargetGetter]);
              var listener = lCleanup[lastLCleanupIndex = tCleanup[i + 2]];
              var useCaptureOrSubIdx = tCleanup[i + 3];

              if (typeof useCaptureOrSubIdx === 'boolean') {
                // native DOM listener registered with Renderer3
                target.removeEventListener(tCleanup[i], listener, useCaptureOrSubIdx);
              } else {
                if (useCaptureOrSubIdx >= 0) {
                  // unregister
                  lCleanup[lastLCleanupIndex = useCaptureOrSubIdx]();
                } else {
                  // Subscription
                  lCleanup[lastLCleanupIndex = -useCaptureOrSubIdx].unsubscribe();
                }
              }

              i += 2;
            } else {
              // This is a cleanup function that is grouped with the index of its context
              var context = lCleanup[lastLCleanupIndex = tCleanup[i + 1]];
              tCleanup[i].call(context);
            }
          }
        }

        if (lCleanup !== null) {
          for (var _i24 = lastLCleanupIndex + 1; _i24 < lCleanup.length; _i24++) {
            var instanceCleanupFn = lCleanup[_i24];
            ngDevMode && assertFunction(instanceCleanupFn, 'Expecting instance cleanup function.');
            instanceCleanupFn();
          }

          lView[CLEANUP] = null;
        }
      }
      /** Calls onDestroy hooks for this view */


      function executeOnDestroys(tView, lView) {
        var destroyHooks;

        if (tView != null && (destroyHooks = tView.destroyHooks) != null) {
          for (var i = 0; i < destroyHooks.length; i += 2) {
            var context = lView[destroyHooks[i]]; // Only call the destroy hook if the context has been requested.

            if (!(context instanceof NodeInjectorFactory)) {
              var toCall = destroyHooks[i + 1];

              if (Array.isArray(toCall)) {
                for (var j = 0; j < toCall.length; j += 2) {
                  toCall[j + 1].call(context[toCall[j]]);
                }
              } else {
                toCall.call(context);
              }
            }
          }
        }
      }
      /**
       * Returns a native element if a node can be inserted into the given parent.
       *
       * There are two reasons why we may not be able to insert a element immediately.
       * - Projection: When creating a child content element of a component, we have to skip the
       *   insertion because the content of a component will be projected.
       *   `<component><content>delayed due to projection</content></component>`
       * - Parent container is disconnected: This can happen when we are inserting a view into
       *   parent container, which itself is disconnected. For example the parent container is part
       *   of a View which has not be inserted or is made for projection but has not been inserted
       *   into destination.
       *
       * @param tView: Current `TView`.
       * @param tNode: `TNode` for which we wish to retrieve render parent.
       * @param lView: Current `LView`.
       */


      function getParentRElement(tView, tNode, lView) {
        return getClosestRElement(tView, tNode.parent, lView);
      }
      /**
       * Get closest `RElement` or `null` if it can't be found.
       *
       * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location.
       * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively).
       * If `TNode` is `null` then return host `RElement`:
       *   - return `null` if projection
       *   - return `null` if parent container is disconnected (we have no parent.)
       *
       * @param tView: Current `TView`.
       * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is
       *     needed).
       * @param lView: Current `LView`.
       * @returns `null` if the `RElement` can't be determined at this time (no parent / projection)
       */


      function getClosestRElement(tView, tNode, lView) {
        var parentTNode = tNode; // Skip over element and ICU containers as those are represented by a comment node and
        // can't be used as a render parent.

        while (parentTNode !== null && parentTNode.type & (8
        /* ElementContainer */
        | 32
        /* Icu */
        )) {
          tNode = parentTNode;
          parentTNode = tNode.parent;
        } // If the parent tNode is null, then we are inserting across views: either into an embedded view
        // or a component view.


        if (parentTNode === null) {
          // We are inserting a root element of the component view into the component host element and
          // it should always be eager.
          return lView[HOST];
        } else {
          ngDevMode && assertTNodeType(parentTNode, 3
          /* AnyRNode */
          | 4
          /* Container */
          );

          if (parentTNode.flags & 2
          /* isComponentHost */
          ) {
            ngDevMode && assertTNodeForLView(parentTNode, lView);
            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
            // parent element is not a component. Component's content nodes are not inserted immediately
            // because they will be projected, and so doing insert at this point would be wasteful.
            // Since the projection would then move it to its final destination. Note that we can't
            // make this assumption when using the Shadow DOM, because the native projection placeholders
            // (<content> or <slot>) have to be in place as elements are being inserted.

            if (encapsulation === ViewEncapsulation.None || encapsulation === ViewEncapsulation.Emulated) {
              return null;
            }
          }

          return getNativeByTNode(parentTNode, lView);
        }
      }
      /**
       * Inserts a native node before another native node for a given parent using {@link Renderer3}.
       * This is a utility function that can be used when native nodes were determined - it abstracts an
       * actual renderer being used.
       */


      function nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {
        ngDevMode && ngDevMode.rendererInsertBefore++;

        if (isProceduralRenderer(renderer)) {
          renderer.insertBefore(parent, child, beforeNode, isMove);
        } else {
          parent.insertBefore(child, beforeNode, isMove);
        }
      }

      function nativeAppendChild(renderer, parent, child) {
        ngDevMode && ngDevMode.rendererAppendChild++;
        ngDevMode && assertDefined(parent, 'parent node must be defined');

        if (isProceduralRenderer(renderer)) {
          renderer.appendChild(parent, child);
        } else {
          parent.appendChild(child);
        }
      }

      function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {
        if (beforeNode !== null) {
          nativeInsertBefore(renderer, parent, child, beforeNode, isMove);
        } else {
          nativeAppendChild(renderer, parent, child);
        }
      }
      /** Removes a node from the DOM given its native parent. */


      function nativeRemoveChild(renderer, parent, child, isHostElement) {
        if (isProceduralRenderer(renderer)) {
          renderer.removeChild(parent, child, isHostElement);
        } else {
          parent.removeChild(child);
        }
      }
      /**
       * Returns a native parent of a given native node.
       */


      function nativeParentNode(renderer, node) {
        return isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode;
      }
      /**
       * Returns a native sibling of a given native node.
       */


      function nativeNextSibling(renderer, node) {
        return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling;
      }
      /**
       * Find a node in front of which `currentTNode` should be inserted.
       *
       * This method determines the `RNode` in front of which we should insert the `currentRNode`. This
       * takes `TNode.insertBeforeIndex` into account if i18n code has been invoked.
       *
       * @param parentTNode parent `TNode`
       * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)
       * @param lView current `LView`
       */


      function getInsertInFrontOfRNode(parentTNode, currentTNode, lView) {
        return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView);
      }
      /**
       * Find a node in front of which `currentTNode` should be inserted. (Does not take i18n into
       * account)
       *
       * This method determines the `RNode` in front of which we should insert the `currentRNode`. This
       * does not take `TNode.insertBeforeIndex` into account.
       *
       * @param parentTNode parent `TNode`
       * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)
       * @param lView current `LView`
       */


      function getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView) {
        if (parentTNode.type & (8
        /* ElementContainer */
        | 32
        /* Icu */
        )) {
          return getNativeByTNode(parentTNode, lView);
        }

        return null;
      }
      /**
       * Tree shakable boundary for `getInsertInFrontOfRNodeWithI18n` function.
       *
       * This function will only be set if i18n code runs.
       */


      var _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithNoI18n;
      /**
       * Tree shakable boundary for `processI18nInsertBefore` function.
       *
       * This function will only be set if i18n code runs.
       */

      var _processI18nInsertBefore;

      function setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore) {
        _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n;
        _processI18nInsertBefore = processI18nInsertBefore;
      }
      /**
       * Appends the `child` native node (or a collection of nodes) to the `parent`.
       *
       * @param tView The `TView' to be appended
       * @param lView The current LView
       * @param childRNode The native child (or children) that should be appended
       * @param childTNode The TNode of the child element
       */


      function appendChild(tView, lView, childRNode, childTNode) {
        var parentRNode = getParentRElement(tView, childTNode, lView);
        var renderer = lView[RENDERER];
        var parentTNode = childTNode.parent || lView[T_HOST];
        var anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView);

        if (parentRNode != null) {
          if (Array.isArray(childRNode)) {
            for (var i = 0; i < childRNode.length; i++) {
              nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false);
            }
          } else {
            nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false);
          }
        }

        _processI18nInsertBefore !== undefined && _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode);
      }
      /**
       * Returns the first native node for a given LView, starting from the provided TNode.
       *
       * Native nodes are returned in the order in which those appear in the native tree (DOM).
       */


      function getFirstNativeNode(lView, tNode) {
        if (tNode !== null) {
          ngDevMode && assertTNodeType(tNode, 3
          /* AnyRNode */
          | 12
          /* AnyContainer */
          | 32
          /* Icu */
          | 16
          /* Projection */
          );
          var tNodeType = tNode.type;

          if (tNodeType & 3
          /* AnyRNode */
          ) {
            return getNativeByTNode(tNode, lView);
          } else if (tNodeType & 4
          /* Container */
          ) {
            return getBeforeNodeForView(-1, lView[tNode.index]);
          } else if (tNodeType & 8
          /* ElementContainer */
          ) {
            var elIcuContainerChild = tNode.child;

            if (elIcuContainerChild !== null) {
              return getFirstNativeNode(lView, elIcuContainerChild);
            } else {
              var rNodeOrLContainer = lView[tNode.index];

              if (isLContainer(rNodeOrLContainer)) {
                return getBeforeNodeForView(-1, rNodeOrLContainer);
              } else {
                return unwrapRNode(rNodeOrLContainer);
              }
            }
          } else if (tNodeType & 32
          /* Icu */
          ) {
            var nextRNode = icuContainerIterate(tNode, lView);
            var rNode = nextRNode(); // If the ICU container has no nodes, than we use the ICU anchor as the node.

            return rNode || unwrapRNode(lView[tNode.index]);
          } else {
            var componentView = lView[DECLARATION_COMPONENT_VIEW];
            var componentHost = componentView[T_HOST];
            var parentView = getLViewParent(componentView);
            var firstProjectedTNode = componentHost.projection[tNode.projection];

            if (firstProjectedTNode != null) {
              return getFirstNativeNode(parentView, firstProjectedTNode);
            } else {
              return getFirstNativeNode(lView, tNode.next);
            }
          }
        }

        return null;
      }

      function getBeforeNodeForView(viewIndexInContainer, lContainer) {
        var nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;

        if (nextViewIndex < lContainer.length) {
          var lView = lContainer[nextViewIndex];
          var firstTNodeOfView = lView[TVIEW].firstChild;

          if (firstTNodeOfView !== null) {
            return getFirstNativeNode(lView, firstTNodeOfView);
          }
        }

        return lContainer[NATIVE];
      }
      /**
       * Removes a native node itself using a given renderer. To remove the node we are looking up its
       * parent from the native tree as not all platforms / browsers support the equivalent of
       * node.remove().
       *
       * @param renderer A renderer to be used
       * @param rNode The native node that should be removed
       * @param isHostElement A flag indicating if a node to be removed is a host of a component.
       */


      function nativeRemoveNode(renderer, rNode, isHostElement) {
        ngDevMode && ngDevMode.rendererRemoveNode++;
        var nativeParent = nativeParentNode(renderer, rNode);

        if (nativeParent) {
          nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);
        }
      }
      /**
       * Performs the operation of `action` on the node. Typically this involves inserting or removing
       * nodes on the LView or projection boundary.
       */


      function applyNodes(renderer, action, tNode, lView, parentRElement, beforeNode, isProjection) {
        while (tNode != null) {
          ngDevMode && assertTNodeForLView(tNode, lView);
          ngDevMode && assertTNodeType(tNode, 3
          /* AnyRNode */
          | 12
          /* AnyContainer */
          | 16
          /* Projection */
          | 32
          /* Icu */
          );
          var rawSlotValue = lView[tNode.index];
          var tNodeType = tNode.type;

          if (isProjection) {
            if (action === 0
            /* Create */
            ) {
              rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);
              tNode.flags |= 4
              /* isProjected */
              ;
            }
          }

          if ((tNode.flags & 64
          /* isDetached */
          ) !== 64
          /* isDetached */
          ) {
            if (tNodeType & 8
            /* ElementContainer */
            ) {
              applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);
              applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);
            } else if (tNodeType & 32
            /* Icu */
            ) {
              var nextRNode = icuContainerIterate(tNode, lView);
              var rNode = void 0;

              while (rNode = nextRNode()) {
                applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);
              }

              applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);
            } else if (tNodeType & 16
            /* Projection */
            ) {
              applyProjectionRecursive(renderer, action, lView, tNode, parentRElement, beforeNode);
            } else {
              ngDevMode && assertTNodeType(tNode, 3
              /* AnyRNode */
              | 4
              /* Container */
              );
              applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);
            }
          }

          tNode = isProjection ? tNode.projectionNext : tNode.next;
        }
      }

      function applyView(tView, lView, renderer, action, parentRElement, beforeNode) {
        applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false);
      }
      /**
       * `applyProjection` performs operation on the projection.
       *
       * Inserting a projection requires us to locate the projected nodes from the parent component. The
       * complication is that those nodes themselves could be re-projected from their parent component.
       *
       * @param tView The `TView` of `LView` which needs to be inserted, detached, destroyed
       * @param lView The `LView` which needs to be inserted, detached, destroyed.
       * @param tProjectionNode node to project
       */


      function applyProjection(tView, lView, tProjectionNode) {
        var renderer = lView[RENDERER];
        var parentRNode = getParentRElement(tView, tProjectionNode, lView);
        var parentTNode = tProjectionNode.parent || lView[T_HOST];
        var beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView);
        applyProjectionRecursive(renderer, 0
        /* Create */
        , lView, tProjectionNode, parentRNode, beforeNode);
      }
      /**
       * `applyProjectionRecursive` performs operation on the projection specified by `action` (insert,
       * detach, destroy)
       *
       * Inserting a projection requires us to locate the projected nodes from the parent component. The
       * complication is that those nodes themselves could be re-projected from their parent component.
       *
       * @param renderer Render to use
       * @param action action to perform (insert, detach, destroy)
       * @param lView The LView which needs to be inserted, detached, destroyed.
       * @param tProjectionNode node to project
       * @param parentRElement parent DOM element for insertion/removal.
       * @param beforeNode Before which node the insertions should happen.
       */


      function applyProjectionRecursive(renderer, action, lView, tProjectionNode, parentRElement, beforeNode) {
        var componentLView = lView[DECLARATION_COMPONENT_VIEW];
        var componentNode = componentLView[T_HOST];
        ngDevMode && assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');
        var nodeToProjectOrRNodes = componentNode.projection[tProjectionNode.projection];

        if (Array.isArray(nodeToProjectOrRNodes)) {
          // This should not exist, it is a bit of a hack. When we bootstrap a top level node and we
          // need to support passing projectable nodes, so we cheat and put them in the TNode
          // of the Host TView. (Yes we put instance info at the T Level). We can get away with it
          // because we know that that TView is not shared and therefore it will not be a problem.
          // This should be refactored and cleaned up.
          for (var i = 0; i < nodeToProjectOrRNodes.length; i++) {
            var rNode = nodeToProjectOrRNodes[i];
            applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);
          }
        } else {
          var nodeToProject = nodeToProjectOrRNodes;
          var projectedComponentLView = componentLView[PARENT];
          applyNodes(renderer, action, nodeToProject, projectedComponentLView, parentRElement, beforeNode, true);
        }
      }
      /**
       * `applyContainer` performs an operation on the container and its views as specified by
       * `action` (insert, detach, destroy)
       *
       * Inserting a Container is complicated by the fact that the container may have Views which
       * themselves have containers or projections.
       *
       * @param renderer Renderer to use
       * @param action action to perform (insert, detach, destroy)
       * @param lContainer The LContainer which needs to be inserted, detached, destroyed.
       * @param parentRElement parent DOM element for insertion/removal.
       * @param beforeNode Before which node the insertions should happen.
       */


      function applyContainer(renderer, action, lContainer, parentRElement, beforeNode) {
        ngDevMode && assertLContainer(lContainer);
        var anchor = lContainer[NATIVE]; // LContainer has its own before node.

        var _native5 = unwrapRNode(lContainer); // An LContainer can be created dynamically on any node by injecting ViewContainerRef.
        // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor
        // node (comment in the DOM) that will be different from the LContainer's host node. In this
        // particular case we need to execute action on 2 nodes:
        // - container's host node (this is done in the executeActionOnElementOrContainer)
        // - container's host node (this is done here)


        if (anchor !== _native5) {
          // This is very strange to me (Misko). I would expect that the native is same as anchor. I
          // don't see a reason why they should be different, but they are.
          //
          // If they are we need to process the second anchor as well.
          applyToElementOrContainer(action, renderer, parentRElement, anchor, beforeNode);
        }

        for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
          var lView = lContainer[i];
          applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor);
        }
      }
      /**
       * Writes class/style to element.
       *
       * @param renderer Renderer to use.
       * @param isClassBased `true` if it should be written to `class` (`false` to write to `style`)
       * @param rNode The Node to write to.
       * @param prop Property to write to. This would be the class/style name.
       * @param value Value to write. If `null`/`undefined`/`false` this is considered a remove (set/add
       *        otherwise).
       */


      function applyStyling(renderer, isClassBased, rNode, prop, value) {
        var isProcedural = isProceduralRenderer(renderer);

        if (isClassBased) {
          // We actually want JS true/false here because any truthy value should add the class
          if (!value) {
            ngDevMode && ngDevMode.rendererRemoveClass++;

            if (isProcedural) {
              renderer.removeClass(rNode, prop);
            } else {
              rNode.classList.remove(prop);
            }
          } else {
            ngDevMode && ngDevMode.rendererAddClass++;

            if (isProcedural) {
              renderer.addClass(rNode, prop);
            } else {
              ngDevMode && assertDefined(rNode.classList, 'HTMLElement expected');
              rNode.classList.add(prop);
            }
          }
        } else {
          var flags = prop.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase;

          if (value == null
          /** || value === undefined */
          ) {
            ngDevMode && ngDevMode.rendererRemoveStyle++;

            if (isProcedural) {
              renderer.removeStyle(rNode, prop, flags);
            } else {
              rNode.style.removeProperty(prop);
            }
          } else {
            // A value is important if it ends with `!important`. The style
            // parser strips any semicolons at the end of the value.
            var isImportant = typeof value === 'string' ? value.endsWith('!important') : false;

            if (isImportant) {
              // !important has to be stripped from the value for it to be valid.
              value = value.slice(0, -10);
              flags |= RendererStyleFlags2.Important;
            }

            ngDevMode && ngDevMode.rendererSetStyle++;

            if (isProcedural) {
              renderer.setStyle(rNode, prop, value, flags);
            } else {
              ngDevMode && assertDefined(rNode.style, 'HTMLElement expected');
              rNode.style.setProperty(prop, value, isImportant ? 'important' : '');
            }
          }
        }
      }
      /**
       * Write `cssText` to `RElement`.
       *
       * This function does direct write without any reconciliation. Used for writing initial values, so
       * that static styling values do not pull in the style parser.
       *
       * @param renderer Renderer to use
       * @param element The element which needs to be updated.
       * @param newValue The new class list to write.
       */


      function writeDirectStyle(renderer, element, newValue) {
        ngDevMode && assertString(newValue, '\'newValue\' should be a string');

        if (isProceduralRenderer(renderer)) {
          renderer.setAttribute(element, 'style', newValue);
        } else {
          element.style.cssText = newValue;
        }

        ngDevMode && ngDevMode.rendererSetStyle++;
      }
      /**
       * Write `className` to `RElement`.
       *
       * This function does direct write without any reconciliation. Used for writing initial values, so
       * that static styling values do not pull in the style parser.
       *
       * @param renderer Renderer to use
       * @param element The element which needs to be updated.
       * @param newValue The new class list to write.
       */


      function writeDirectClass(renderer, element, newValue) {
        ngDevMode && assertString(newValue, '\'newValue\' should be a string');

        if (isProceduralRenderer(renderer)) {
          if (newValue === '') {
            // There are tests in `google3` which expect `element.getAttribute('class')` to be `null`.
            renderer.removeAttribute(element, 'class');
          } else {
            renderer.setAttribute(element, 'class', newValue);
          }
        } else {
          element.className = newValue;
        }

        ngDevMode && ngDevMode.rendererSetClassName++;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Returns an index of `classToSearch` in `className` taking token boundaries into account.
       *
       * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`)
       *
       * @param className A string containing classes (whitespace separated)
       * @param classToSearch A class name to locate
       * @param startingIndex Starting location of search
       * @returns an index of the located class (or -1 if not found)
       */


      function classIndexOf(className, classToSearch, startingIndex) {
        ngDevMode && assertNotEqual(classToSearch, '', 'can not look for "" string.');
        var end = className.length;

        while (true) {
          var foundIndex = className.indexOf(classToSearch, startingIndex);
          if (foundIndex === -1) return foundIndex;

          if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32
          /* SPACE */
          ) {
            // Ensure that it has leading whitespace
            var length = classToSearch.length;

            if (foundIndex + length === end || className.charCodeAt(foundIndex + length) <= 32
            /* SPACE */
            ) {
              // Ensure that it has trailing whitespace
              return foundIndex;
            }
          } // False positive, keep searching from where we left off.


          startingIndex = foundIndex + 1;
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5;
      var NG_TEMPLATE_SELECTOR = 'ng-template';
      /**
       * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)
       *
       * @param attrs `TAttributes` to search through.
       * @param cssClassToMatch class to match (lowercase)
       * @param isProjectionMode Whether or not class matching should look into the attribute `class` in
       *    addition to the `AttributeMarker.Classes`.
       */

      function isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {
        // TODO(misko): The fact that this function needs to know about `isProjectionMode` seems suspect.
        // It is strange to me that sometimes the class information comes in form of `class` attribute
        // and sometimes in form of `AttributeMarker.Classes`. Some investigation is needed to determine
        // if that is the right behavior.
        ngDevMode && assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');
        var i = 0;

        while (i < attrs.length) {
          var item = attrs[i++];

          if (isProjectionMode && item === 'class') {
            item = attrs[i];

            if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) {
              return true;
            }
          } else if (item === 1
          /* Classes */
          ) {
            // We found the classes section. Start searching for the class.
            while (i < attrs.length && typeof (item = attrs[i++]) == 'string') {
              // while we have strings
              if (item.toLowerCase() === cssClassToMatch) return true;
            }

            return false;
          }
        }

        return false;
      }
      /**
       * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).
       *
       * @param tNode current TNode
       */


      function isInlineTemplate(tNode) {
        return tNode.type === 4
        /* Container */
        && tNode.value !== NG_TEMPLATE_SELECTOR;
      }
      /**
       * Function that checks whether a given tNode matches tag-based selector and has a valid type.
       *
       * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular
       * directive matching mode:
       * - in the "directive matching" mode we do _not_ take TContainer's tagName into account if it is
       * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a
       * tag name was extracted from * syntax so we would match the same directive twice);
       * - in the "projection" mode, we use a tag name potentially extracted from the * syntax processing
       * (applicable to TNodeType.Container only).
       */


      function hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {
        var tagNameToCompare = tNode.type === 4
        /* Container */
        && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;
        return currentSelector === tagNameToCompare;
      }
      /**
       * A utility function to match an Ivy node static data against a simple CSS selector
       *
       * @param node static data of the node to match
       * @param selector The selector to try matching against the node.
       * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing
       * directive matching.
       * @returns true if node matches the selector.
       */


      function isNodeMatchingSelector(tNode, selector, isProjectionMode) {
        ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');
        var mode = 4
        /* ELEMENT */
        ;
        var nodeAttrs = tNode.attrs || []; // Find the index of first attribute that has no value, only a name.

        var nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs); // When processing ":not" selectors, we skip to the next ":not" if the
        // current one doesn't match

        var skipToNextSelector = false;

        for (var i = 0; i < selector.length; i++) {
          var current = selector[i];

          if (typeof current === 'number') {
            // If we finish processing a :not selector and it hasn't failed, return false
            if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {
              return false;
            } // If we are skipping to the next :not() and this mode flag is positive,
            // it's a part of the current :not() selector, and we should keep skipping


            if (skipToNextSelector && isPositive(current)) continue;
            skipToNextSelector = false;
            mode = current | mode & 1
            /* NOT */
            ;
            continue;
          }

          if (skipToNextSelector) continue;

          if (mode & 4
          /* ELEMENT */
          ) {
            mode = 2
            /* ATTRIBUTE */
            | mode & 1
            /* NOT */
            ;

            if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) || current === '' && selector.length === 1) {
              if (isPositive(mode)) return false;
              skipToNextSelector = true;
            }
          } else {
            var selectorAttrValue = mode & 8
            /* CLASS */
            ? current : selector[++i]; // special case for matching against classes when a tNode has been instantiated with
            // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])

            if (mode & 8
            /* CLASS */
            && tNode.attrs !== null) {
              if (!isCssClassMatching(tNode.attrs, selectorAttrValue, isProjectionMode)) {
                if (isPositive(mode)) return false;
                skipToNextSelector = true;
              }

              continue;
            }

            var attrName = mode & 8
            /* CLASS */
            ? 'class' : current;
            var attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), isProjectionMode);

            if (attrIndexInNode === -1) {
              if (isPositive(mode)) return false;
              skipToNextSelector = true;
              continue;
            }

            if (selectorAttrValue !== '') {
              var nodeAttrValue = void 0;

              if (attrIndexInNode > nameOnlyMarkerIdx) {
                nodeAttrValue = '';
              } else {
                ngDevMode && assertNotEqual(nodeAttrs[attrIndexInNode], 0
                /* NamespaceURI */
                , 'We do not match directives on namespaced attributes'); // we lowercase the attribute value to be able to match
                // selectors without case-sensitivity
                // (selectors are already in lowercase when generated)

                nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase();
              }

              var compareAgainstClassName = mode & 8
              /* CLASS */
              ? nodeAttrValue : null;

              if (compareAgainstClassName && classIndexOf(compareAgainstClassName, selectorAttrValue, 0) !== -1 || mode & 2
              /* ATTRIBUTE */
              && selectorAttrValue !== nodeAttrValue) {
                if (isPositive(mode)) return false;
                skipToNextSelector = true;
              }
            }
          }
        }

        return isPositive(mode) || skipToNextSelector;
      }

      function isPositive(mode) {
        return (mode & 1
        /* NOT */
        ) === 0;
      }
      /**
       * Examines the attribute's definition array for a node to find the index of the
       * attribute that matches the given `name`.
       *
       * NOTE: This will not match namespaced attributes.
       *
       * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.
       * The following table summarizes which types of attributes we attempt to match:
       *
       * ===========================================================================================================
       * Modes                   | Normal Attributes | Bindings Attributes | Template Attributes | I18n
       * Attributes
       * ===========================================================================================================
       * Inline + Projection     | YES               | YES                 | NO                  | YES
       * -----------------------------------------------------------------------------------------------------------
       * Inline + Directive      | NO                | NO                  | YES                 | NO
       * -----------------------------------------------------------------------------------------------------------
       * Non-inline + Projection | YES               | YES                 | NO                  | YES
       * -----------------------------------------------------------------------------------------------------------
       * Non-inline + Directive  | YES               | YES                 | NO                  | YES
       * ===========================================================================================================
       *
       * @param name the name of the attribute to find
       * @param attrs the attribute array to examine
       * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)
       * rather than a manually expanded template node (e.g `<ng-template>`).
       * @param isProjectionMode true if we are matching against content projection otherwise we are
       * matching against directives.
       */


      function findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) {
        if (attrs === null) return -1;
        var i = 0;

        if (isProjectionMode || !isInlineTemplate) {
          var bindingsMode = false;

          while (i < attrs.length) {
            var maybeAttrName = attrs[i];

            if (maybeAttrName === name) {
              return i;
            } else if (maybeAttrName === 3
            /* Bindings */
            || maybeAttrName === 6
            /* I18n */
            ) {
              bindingsMode = true;
            } else if (maybeAttrName === 1
            /* Classes */
            || maybeAttrName === 2
            /* Styles */
            ) {
              var value = attrs[++i]; // We should skip classes here because we have a separate mechanism for
              // matching classes in projection mode.

              while (typeof value === 'string') {
                value = attrs[++i];
              }

              continue;
            } else if (maybeAttrName === 4
            /* Template */
            ) {
              // We do not care about Template attributes in this scenario.
              break;
            } else if (maybeAttrName === 0
            /* NamespaceURI */
            ) {
              // Skip the whole namespaced attribute and value. This is by design.
              i += 4;
              continue;
            } // In binding mode there are only names, rather than name-value pairs.


            i += bindingsMode ? 1 : 2;
          } // We did not match the attribute


          return -1;
        } else {
          return matchTemplateAttribute(attrs, name);
        }
      }

      function isNodeMatchingSelectorList(tNode, selector) {
        var isProjectionMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

        for (var i = 0; i < selector.length; i++) {
          if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {
            return true;
          }
        }

        return false;
      }

      function getProjectAsAttrValue(tNode) {
        var nodeAttrs = tNode.attrs;

        if (nodeAttrs != null) {
          var ngProjectAsAttrIdx = nodeAttrs.indexOf(5
          /* ProjectAs */
          ); // only check for ngProjectAs in attribute names, don't accidentally match attribute's value
          // (attribute names are stored at even indexes)

          if ((ngProjectAsAttrIdx & 1) === 0) {
            return nodeAttrs[ngProjectAsAttrIdx + 1];
          }
        }

        return null;
      }

      function getNameOnlyMarkerIndex(nodeAttrs) {
        for (var i = 0; i < nodeAttrs.length; i++) {
          var nodeAttr = nodeAttrs[i];

          if (isNameOnlyAttributeMarker(nodeAttr)) {
            return i;
          }
        }

        return nodeAttrs.length;
      }

      function matchTemplateAttribute(attrs, name) {
        var i = attrs.indexOf(4
        /* Template */
        );

        if (i > -1) {
          i++;

          while (i < attrs.length) {
            var attr = attrs[i]; // Return in case we checked all template attrs and are switching to the next section in the
            // attrs array (that starts with a number that represents an attribute marker).

            if (typeof attr === 'number') return -1;
            if (attr === name) return i;
            i++;
          }
        }

        return -1;
      }
      /**
       * Checks whether a selector is inside a CssSelectorList
       * @param selector Selector to be checked.
       * @param list List in which to look for the selector.
       */


      function isSelectorInSelectorList(selector, list) {
        selectorListLoop: for (var i = 0; i < list.length; i++) {
          var currentSelectorInList = list[i];

          if (selector.length !== currentSelectorInList.length) {
            continue;
          }

          for (var j = 0; j < selector.length; j++) {
            if (selector[j] !== currentSelectorInList[j]) {
              continue selectorListLoop;
            }
          }

          return true;
        }

        return false;
      }

      function maybeWrapInNotSelector(isNegativeMode, chunk) {
        return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;
      }

      function stringifyCSSSelector(selector) {
        var result = selector[0];
        var i = 1;
        var mode = 2
        /* ATTRIBUTE */
        ;
        var currentChunk = '';
        var isNegativeMode = false;

        while (i < selector.length) {
          var valueOrMarker = selector[i];

          if (typeof valueOrMarker === 'string') {
            if (mode & 2
            /* ATTRIBUTE */
            ) {
              var attrValue = selector[++i];
              currentChunk += '[' + valueOrMarker + (attrValue.length > 0 ? '="' + attrValue + '"' : '') + ']';
            } else if (mode & 8
            /* CLASS */
            ) {
              currentChunk += '.' + valueOrMarker;
            } else if (mode & 4
            /* ELEMENT */
            ) {
              currentChunk += ' ' + valueOrMarker;
            }
          } else {
            //
            // Append current chunk to the final result in case we come across SelectorFlag, which
            // indicates that the previous section of a selector is over. We need to accumulate content
            // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.
            // ```
            //  ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']
            // ```
            // should be transformed to `.classA :not(.classB .classC)`.
            //
            // Note: for negative selector part, we accumulate content between flags until we find the
            // next negative flag. This is needed to support a case where `:not()` rule contains more than
            // one chunk, e.g. the following selector:
            // ```
            //  ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']
            // ```
            // should be stringified to `:not(p.foo) :not(.bar)`
            //
            if (currentChunk !== '' && !isPositive(valueOrMarker)) {
              result += maybeWrapInNotSelector(isNegativeMode, currentChunk);
              currentChunk = '';
            }

            mode = valueOrMarker; // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative
            // mode is maintained for remaining chunks of a selector.

            isNegativeMode = isNegativeMode || !isPositive(mode);
          }

          i++;
        }

        if (currentChunk !== '') {
          result += maybeWrapInNotSelector(isNegativeMode, currentChunk);
        }

        return result;
      }
      /**
       * Generates string representation of CSS selector in parsed form.
       *
       * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing
       * additional parsing at runtime (for example, for directive matching). However in some cases (for
       * example, while bootstrapping a component), a string version of the selector is required to query
       * for the host element on the page. This function takes the parsed form of a selector and returns
       * its string representation.
       *
       * @param selectorList selector in parsed form
       * @returns string representation of a given selector
       */


      function stringifyCSSSelectorList(selectorList) {
        return selectorList.map(stringifyCSSSelector).join(',');
      }
      /**
       * Extracts attributes and classes information from a given CSS selector.
       *
       * This function is used while creating a component dynamically. In this case, the host element
       * (that is created dynamically) should contain attributes and classes specified in component's CSS
       * selector.
       *
       * @param selector CSS selector in parsed form (in a form of array)
       * @returns object with `attrs` and `classes` fields that contain extracted information
       */


      function extractAttrsAndClassesFromSelector(selector) {
        var attrs = [];
        var classes = [];
        var i = 1;
        var mode = 2
        /* ATTRIBUTE */
        ;

        while (i < selector.length) {
          var valueOrMarker = selector[i];

          if (typeof valueOrMarker === 'string') {
            if (mode === 2
            /* ATTRIBUTE */
            ) {
              if (valueOrMarker !== '') {
                attrs.push(valueOrMarker, selector[++i]);
              }
            } else if (mode === 8
            /* CLASS */
            ) {
              classes.push(valueOrMarker);
            }
          } else {
            // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative
            // mode is maintained for remaining chunks of a selector. Since attributes and classes are
            // extracted only for "positive" part of the selector, we can stop here.
            if (!isPositive(mode)) break;
            mode = valueOrMarker;
          }

          i++;
        }

        return {
          attrs: attrs,
          classes: classes
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /** A special value which designates that a value has not changed. */


      var NO_CHANGE = typeof ngDevMode === 'undefined' || ngDevMode ? {
        __brand__: 'NO_CHANGE'
      } : {};
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Advances to an element for later binding instructions.
       *
       * Used in conjunction with instructions like {@link property} to act on elements with specified
       * indices, for example those created with {@link element} or {@link elementStart}.
       *
       * ```ts
       * (rf: RenderFlags, ctx: any) => {
       *   if (rf & 1) {
       *     text(0, 'Hello');
       *     text(1, 'Goodbye')
       *     element(2, 'div');
       *   }
       *   if (rf & 2) {
       *     advance(2); // Advance twice to the <div>.
       *     property('title', 'test');
       *   }
       *  }
       * ```
       * @param delta Number of elements to advance forwards by.
       *
       * @codeGenApi
       */

      function ɵɵadvance(delta) {
        ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');
        selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, isInCheckNoChangesMode());
      }

      function selectIndexInternal(tView, lView, index, checkNoChangesMode) {
        ngDevMode && assertIndexInDeclRange(lView, index); // Flush the initial hooks for elements in the view that have been added up to this point.
        // PERF WARNING: do NOT extract this to a separate function without running benchmarks

        if (!checkNoChangesMode) {
          var hooksInitPhaseCompleted = (lView[FLAGS] & 3
          /* InitPhaseStateMask */
          ) === 3
          /* InitPhaseCompleted */
          ;

          if (hooksInitPhaseCompleted) {
            var preOrderCheckHooks = tView.preOrderCheckHooks;

            if (preOrderCheckHooks !== null) {
              executeCheckHooks(lView, preOrderCheckHooks, index);
            }
          } else {
            var preOrderHooks = tView.preOrderHooks;

            if (preOrderHooks !== null) {
              executeInitAndCheckHooks(lView, preOrderHooks, 0
              /* OnInitHooksToBeRun */
              , index);
            }
          }
        } // We must set the selected index *after* running the hooks, because hooks may have side-effects
        // that cause other template functions to run, thus updating the selected index, which is global
        // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index
        // will be altered by the time we leave the `ɵɵadvance` instruction.


        setSelectedIndex(index);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function toTStylingRange(prev, next) {
        ngDevMode && assertNumberInRange(prev, 0, 32767
        /* UNSIGNED_MASK */
        );
        ngDevMode && assertNumberInRange(next, 0, 32767
        /* UNSIGNED_MASK */
        );
        return prev << 17
        /* PREV_SHIFT */
        | next << 2
        /* NEXT_SHIFT */
        ;
      }

      function getTStylingRangePrev(tStylingRange) {
        ngDevMode && assertNumber(tStylingRange, 'expected number');
        return tStylingRange >> 17
        /* PREV_SHIFT */
        & 32767
        /* UNSIGNED_MASK */
        ;
      }

      function getTStylingRangePrevDuplicate(tStylingRange) {
        ngDevMode && assertNumber(tStylingRange, 'expected number');
        return (tStylingRange & 2
        /* PREV_DUPLICATE */
        ) == 2
        /* PREV_DUPLICATE */
        ;
      }

      function setTStylingRangePrev(tStylingRange, previous) {
        ngDevMode && assertNumber(tStylingRange, 'expected number');
        ngDevMode && assertNumberInRange(previous, 0, 32767
        /* UNSIGNED_MASK */
        );
        return tStylingRange & ~4294836224
        /* PREV_MASK */
        | previous << 17
        /* PREV_SHIFT */
        ;
      }

      function setTStylingRangePrevDuplicate(tStylingRange) {
        ngDevMode && assertNumber(tStylingRange, 'expected number');
        return tStylingRange | 2
        /* PREV_DUPLICATE */
        ;
      }

      function getTStylingRangeNext(tStylingRange) {
        ngDevMode && assertNumber(tStylingRange, 'expected number');
        return (tStylingRange & 131068
        /* NEXT_MASK */
        ) >> 2
        /* NEXT_SHIFT */
        ;
      }

      function setTStylingRangeNext(tStylingRange, next) {
        ngDevMode && assertNumber(tStylingRange, 'expected number');
        ngDevMode && assertNumberInRange(next, 0, 32767
        /* UNSIGNED_MASK */
        );
        return tStylingRange & ~131068
        /* NEXT_MASK */
        | //
        next << 2
        /* NEXT_SHIFT */
        ;
      }

      function getTStylingRangeNextDuplicate(tStylingRange) {
        ngDevMode && assertNumber(tStylingRange, 'expected number');
        return (tStylingRange & 1
        /* NEXT_DUPLICATE */
        ) === 1
        /* NEXT_DUPLICATE */
        ;
      }

      function setTStylingRangeNextDuplicate(tStylingRange) {
        ngDevMode && assertNumber(tStylingRange, 'expected number');
        return tStylingRange | 1
        /* NEXT_DUPLICATE */
        ;
      }

      function getTStylingRangeTail(tStylingRange) {
        ngDevMode && assertNumber(tStylingRange, 'expected number');
        var next = getTStylingRangeNext(tStylingRange);
        return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Patch a `debug` property on top of the existing object.
       *
       * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
       *
       * @param obj Object to patch
       * @param debug Value to patch
       */


      function attachDebugObject(obj, debug) {
        if (ngDevMode) {
          Object.defineProperty(obj, 'debug', {
            value: debug,
            enumerable: false
          });
        } else {
          throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
        }
      }
      /**
       * Patch a `debug` property getter on top of the existing object.
       *
       * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
       *
       * @param obj Object to patch
       * @param debugGetter Getter returning a value to patch
       */


      function attachDebugGetter(obj, debugGetter) {
        if (ngDevMode) {
          Object.defineProperty(obj, 'debug', {
            get: debugGetter,
            enumerable: false
          });
        } else {
          throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var NG_DEV_MODE = (typeof ngDevMode === 'undefined' || !!ngDevMode) && initNgDevMode();
      /*
       * This file contains conditionally attached classes which provide human readable (debug) level
       * information for `LView`, `LContainer` and other internal data structures. These data structures
       * are stored internally as array which makes it very difficult during debugging to reason about the
       * current state of the system.
       *
       * Patching the array with extra property does change the array's hidden class' but it does not
       * change the cost of access, therefore this patching should not have significant if any impact in
       * `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)
       *
       * So instead of seeing:
       * ```
       * Array(30) [Object, 659, null, …]
       * ```
       *
       * You get to see:
       * ```
       * LViewDebug {
       *   views: [...],
       *   flags: {attached: true, ...}
       *   nodes: [
       *     {html: '<div id="123">', ..., nodes: [
       *       {html: '<span>', ..., nodes: null}
       *     ]}
       *   ]
       * }
       * ```
       */

      var LVIEW_COMPONENT_CACHE;
      var LVIEW_EMBEDDED_CACHE;
      var LVIEW_ROOT;
      /**
       * This function clones a blueprint and creates LView.
       *
       * Simple slice will keep the same type, and we need it to be LView
       */

      function cloneToLViewFromTViewBlueprint(tView) {
        var debugTView = tView;
        var lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);
        return lView.concat(tView.blueprint);
      }

      function getLViewToClone(type, name) {
        switch (type) {
          case 0
          /* Root */
          :
            if (LVIEW_ROOT === undefined) LVIEW_ROOT = new (createNamedArrayType('LRootView'))();
            return LVIEW_ROOT;

          case 1
          /* Component */
          :
            if (LVIEW_COMPONENT_CACHE === undefined) LVIEW_COMPONENT_CACHE = new Map();
            var componentArray = LVIEW_COMPONENT_CACHE.get(name);

            if (componentArray === undefined) {
              componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();
              LVIEW_COMPONENT_CACHE.set(name, componentArray);
            }

            return componentArray;

          case 2
          /* Embedded */
          :
            if (LVIEW_EMBEDDED_CACHE === undefined) LVIEW_EMBEDDED_CACHE = new Map();
            var embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);

            if (embeddedArray === undefined) {
              embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();
              LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);
            }

            return embeddedArray;
        }

        throw new Error('unreachable code');
      }

      function nameSuffix(text) {
        if (text == null) return '';
        var index = text.lastIndexOf('_Template');
        return '_' + (index === -1 ? text : text.substr(0, index));
      }
      /**
       * This class is a debug version of Object literal so that we can have constructor name show up
       * in
       * debug tools in ngDevMode.
       */


      var TViewConstructor = /*#__PURE__*/function () {
        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) {
          _classCallCheck(this, TView);

          this.type = type;
          this.blueprint = blueprint;
          this.template = template;
          this.queries = queries;
          this.viewQuery = viewQuery;
          this.declTNode = declTNode;
          this.data = data;
          this.bindingStartIndex = bindingStartIndex;
          this.expandoStartIndex = expandoStartIndex;
          this.hostBindingOpCodes = hostBindingOpCodes;
          this.firstCreatePass = firstCreatePass;
          this.firstUpdatePass = firstUpdatePass;
          this.staticViewQueries = staticViewQueries;
          this.staticContentQueries = staticContentQueries;
          this.preOrderHooks = preOrderHooks;
          this.preOrderCheckHooks = preOrderCheckHooks;
          this.contentHooks = contentHooks;
          this.contentCheckHooks = contentCheckHooks;
          this.viewHooks = viewHooks;
          this.viewCheckHooks = viewCheckHooks;
          this.destroyHooks = destroyHooks;
          this.cleanup = cleanup;
          this.contentQueries = contentQueries;
          this.components = components;
          this.directiveRegistry = directiveRegistry;
          this.pipeRegistry = pipeRegistry;
          this.firstChild = firstChild;
          this.schemas = schemas;
          this.consts = consts;
          this.incompleteFirstPass = incompleteFirstPass;
          this._decls = _decls;
          this._vars = _vars;
        }

        _createClass2(TView, [{
          key: "template_",
          get: function get() {
            var buf = [];
            processTNodeChildren(this.firstChild, buf);
            return buf.join('');
          }
        }, {
          key: "type_",
          get: function get() {
            return TViewTypeAsString[this.type] || "TViewType.?".concat(this.type, "?");
          }
        }]);

        return TView;
      }();

      var TNode = /*#__PURE__*/function () {
        function TNode(tView_, //
        type, //
        index, //
        insertBeforeIndex, //
        injectorIndex, //
        directiveStart, //
        directiveEnd, //
        directiveStylingLast, //
        propertyBindings, //
        flags, //
        providerIndexes, //
        value, //
        attrs, //
        mergedAttrs, //
        localNames, //
        initialInputs, //
        inputs, //
        outputs, //
        tViews, //
        next, //
        projectionNext, //
        child, //
        parent, //
        projection, //
        styles, //
        stylesWithoutHost, //
        residualStyles, //
        classes, //
        classesWithoutHost, //
        residualClasses, //
        classBindings, //
        styleBindings) {
          _classCallCheck(this, TNode);

          this.tView_ = tView_;
          this.type = type;
          this.index = index;
          this.insertBeforeIndex = insertBeforeIndex;
          this.injectorIndex = injectorIndex;
          this.directiveStart = directiveStart;
          this.directiveEnd = directiveEnd;
          this.directiveStylingLast = directiveStylingLast;
          this.propertyBindings = propertyBindings;
          this.flags = flags;
          this.providerIndexes = providerIndexes;
          this.value = value;
          this.attrs = attrs;
          this.mergedAttrs = mergedAttrs;
          this.localNames = localNames;
          this.initialInputs = initialInputs;
          this.inputs = inputs;
          this.outputs = outputs;
          this.tViews = tViews;
          this.next = next;
          this.projectionNext = projectionNext;
          this.child = child;
          this.parent = parent;
          this.projection = projection;
          this.styles = styles;
          this.stylesWithoutHost = stylesWithoutHost;
          this.residualStyles = residualStyles;
          this.classes = classes;
          this.classesWithoutHost = classesWithoutHost;
          this.residualClasses = residualClasses;
          this.classBindings = classBindings;
          this.styleBindings = styleBindings;
        }
        /**
         * Return a human debug version of the set of `NodeInjector`s which will be consulted when
         * resolving tokens from this `TNode`.
         *
         * When debugging applications, it is often difficult to determine which `NodeInjector`s will be
         * consulted. This method shows a list of `DebugNode`s representing the `TNode`s which will be
         * consulted in order when resolving a token starting at this `TNode`.
         *
         * The original data is stored in `LView` and `TView` with a lot of offset indexes, and so it is
         * difficult to reason about.
         *
         * @param lView The `LView` instance for this `TNode`.
         */


        _createClass2(TNode, [{
          key: "debugNodeInjectorPath",
          value: function debugNodeInjectorPath(lView) {
            var path = [];
            var injectorIndex = getInjectorIndex(this, lView);
            ngDevMode && assertNodeInjector(lView, injectorIndex);

            while (injectorIndex !== -1) {
              var tNode = lView[TVIEW].data[injectorIndex + 8
              /* TNODE */
              ];
              path.push(buildDebugNode(tNode, lView));
              var parentLocation = lView[injectorIndex + 8
              /* PARENT */
              ];

              if (parentLocation === NO_PARENT_INJECTOR) {
                injectorIndex = -1;
              } else {
                injectorIndex = getParentInjectorIndex(parentLocation);
                lView = getParentInjectorView(parentLocation, lView);
              }
            }

            return path;
          }
        }, {
          key: "type_",
          get: function get() {
            return toTNodeTypeAsString(this.type) || "TNodeType.?".concat(this.type, "?");
          }
        }, {
          key: "flags_",
          get: function get() {
            var flags = [];
            if (this.flags & 16
            /* hasClassInput */
            ) flags.push('TNodeFlags.hasClassInput');
            if (this.flags & 8
            /* hasContentQuery */
            ) flags.push('TNodeFlags.hasContentQuery');
            if (this.flags & 32
            /* hasStyleInput */
            ) flags.push('TNodeFlags.hasStyleInput');
            if (this.flags & 128
            /* hasHostBindings */
            ) flags.push('TNodeFlags.hasHostBindings');
            if (this.flags & 2
            /* isComponentHost */
            ) flags.push('TNodeFlags.isComponentHost');
            if (this.flags & 1
            /* isDirectiveHost */
            ) flags.push('TNodeFlags.isDirectiveHost');
            if (this.flags & 64
            /* isDetached */
            ) flags.push('TNodeFlags.isDetached');
            if (this.flags & 4
            /* isProjected */
            ) flags.push('TNodeFlags.isProjected');
            return flags.join('|');
          }
        }, {
          key: "template_",
          get: function get() {
            if (this.type & 1
            /* Text */
            ) return this.value;
            var buf = [];
            var tagName = typeof this.value === 'string' && this.value || this.type_;
            buf.push('<', tagName);

            if (this.flags) {
              buf.push(' ', this.flags_);
            }

            if (this.attrs) {
              for (var i = 0; i < this.attrs.length;) {
                var attrName = this.attrs[i++];

                if (typeof attrName == 'number') {
                  break;
                }

                var attrValue = this.attrs[i++];
                buf.push(' ', attrName, '="', attrValue, '"');
              }
            }

            buf.push('>');
            processTNodeChildren(this.child, buf);
            buf.push('</', tagName, '>');
            return buf.join('');
          }
        }, {
          key: "styleBindings_",
          get: function get() {
            return toDebugStyleBinding(this, false);
          }
        }, {
          key: "classBindings_",
          get: function get() {
            return toDebugStyleBinding(this, true);
          }
        }, {
          key: "providerIndexStart_",
          get: function get() {
            return this.providerIndexes & 1048575
            /* ProvidersStartIndexMask */
            ;
          }
        }, {
          key: "providerIndexEnd_",
          get: function get() {
            return this.providerIndexStart_ + (this.providerIndexes >>> 20
            /* CptViewProvidersCountShift */
            );
          }
        }]);

        return TNode;
      }();

      var TNodeDebug = TNode;

      function toDebugStyleBinding(tNode, isClassBased) {
        var tData = tNode.tView_.data;
        var bindings = [];
        var range = isClassBased ? tNode.classBindings : tNode.styleBindings;
        var prev = getTStylingRangePrev(range);
        var next = getTStylingRangeNext(range);
        var isTemplate = next !== 0;
        var cursor = isTemplate ? next : prev;

        while (cursor !== 0) {
          var itemKey = tData[cursor];
          var itemRange = tData[cursor + 1];
          bindings.unshift({
            key: itemKey,
            index: cursor,
            isTemplate: isTemplate,
            prevDuplicate: getTStylingRangePrevDuplicate(itemRange),
            nextDuplicate: getTStylingRangeNextDuplicate(itemRange),
            nextIndex: getTStylingRangeNext(itemRange),
            prevIndex: getTStylingRangePrev(itemRange)
          });
          if (cursor === prev) isTemplate = false;
          cursor = getTStylingRangePrev(itemRange);
        }

        bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);
        return bindings;
      }

      function processTNodeChildren(tNode, buf) {
        while (tNode) {
          buf.push(tNode.template_);
          tNode = tNode.next;
        }
      }

      var TViewData = NG_DEV_MODE && createNamedArrayType('TViewData') || null;
      var TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because
      // `LView` constructor could have side-effects.

      /**
       * This function clones a blueprint and creates TData.
       *
       * Simple slice will keep the same type, and we need it to be TData
       */

      function cloneToTViewData(list) {
        if (TVIEWDATA_EMPTY === undefined) TVIEWDATA_EMPTY = new TViewData();
        return TVIEWDATA_EMPTY.concat(list);
      }

      var LViewBlueprint = NG_DEV_MODE && createNamedArrayType('LViewBlueprint') || null;
      var MatchesArray = NG_DEV_MODE && createNamedArrayType('MatchesArray') || null;
      var TViewComponents = NG_DEV_MODE && createNamedArrayType('TViewComponents') || null;
      var TNodeLocalNames = NG_DEV_MODE && createNamedArrayType('TNodeLocalNames') || null;
      var TNodeInitialInputs = NG_DEV_MODE && createNamedArrayType('TNodeInitialInputs') || null;
      var TNodeInitialData = NG_DEV_MODE && createNamedArrayType('TNodeInitialData') || null;
      var LCleanup = NG_DEV_MODE && createNamedArrayType('LCleanup') || null;
      var TCleanup = NG_DEV_MODE && createNamedArrayType('TCleanup') || null;

      function attachLViewDebug(lView) {
        attachDebugObject(lView, new LViewDebug(lView));
      }

      function attachLContainerDebug(lContainer) {
        attachDebugObject(lContainer, new LContainerDebug(lContainer));
      }

      function toDebug(obj) {
        if (obj) {
          var debug = obj.debug;
          assertDefined(debug, 'Object does not have a debug representation.');
          return debug;
        } else {
          return obj;
        }
      }
      /**
       * Use this method to unwrap a native element in `LView` and convert it into HTML for easier
       * reading.
       *
       * @param value possibly wrapped native DOM node.
       * @param includeChildren If `true` then the serialized HTML form will include child elements
       * (same
       * as `outerHTML`). If `false` then the serialized HTML form will only contain the element
       * itself
       * (will not serialize child elements).
       */


      function toHtml(value) {
        var includeChildren = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
        var node = unwrapRNode(value);

        if (node) {
          switch (node.nodeType) {
            case Node.TEXT_NODE:
              return node.textContent;

            case Node.COMMENT_NODE:
              return "<!--".concat(node.textContent, "-->");

            case Node.ELEMENT_NODE:
              var outerHTML = node.outerHTML;

              if (includeChildren) {
                return outerHTML;
              } else {
                var innerHTML = '>' + node.innerHTML + '<';
                return outerHTML.split(innerHTML)[0] + '>';
              }

          }
        }

        return null;
      }

      var LViewDebug = /*#__PURE__*/function () {
        function LViewDebug(_raw_lView) {
          _classCallCheck(this, LViewDebug);

          this._raw_lView = _raw_lView;
        }
        /**
         * Flags associated with the `LView` unpacked into a more readable state.
         */


        _createClass2(LViewDebug, [{
          key: "flags",
          get: function get() {
            var flags = this._raw_lView[FLAGS];
            return {
              __raw__flags__: flags,
              initPhaseState: flags & 3
              /* InitPhaseStateMask */
              ,
              creationMode: !!(flags & 4
              /* CreationMode */
              ),
              firstViewPass: !!(flags & 8
              /* FirstLViewPass */
              ),
              checkAlways: !!(flags & 16
              /* CheckAlways */
              ),
              dirty: !!(flags & 64
              /* Dirty */
              ),
              attached: !!(flags & 128
              /* Attached */
              ),
              destroyed: !!(flags & 256
              /* Destroyed */
              ),
              isRoot: !!(flags & 512
              /* IsRoot */
              ),
              indexWithinInitPhase: flags >> 11
              /* IndexWithinInitPhaseShift */

            };
          }
        }, {
          key: "parent",
          get: function get() {
            return toDebug(this._raw_lView[PARENT]);
          }
        }, {
          key: "hostHTML",
          get: function get() {
            return toHtml(this._raw_lView[HOST], true);
          }
        }, {
          key: "html",
          get: function get() {
            return (this.nodes || []).map(mapToHTML).join('');
          }
        }, {
          key: "context",
          get: function get() {
            return this._raw_lView[CONTEXT];
          }
          /**
           * The tree of nodes associated with the current `LView`. The nodes have been normalized into
           * a tree structure with relevant details pulled out for readability.
           */

        }, {
          key: "nodes",
          get: function get() {
            var lView = this._raw_lView;
            var tNode = lView[TVIEW].firstChild;
            return toDebugNodes(tNode, lView);
          }
        }, {
          key: "template",
          get: function get() {
            return this.tView.template_;
          }
        }, {
          key: "tView",
          get: function get() {
            return this._raw_lView[TVIEW];
          }
        }, {
          key: "cleanup",
          get: function get() {
            return this._raw_lView[CLEANUP];
          }
        }, {
          key: "injector",
          get: function get() {
            return this._raw_lView[INJECTOR];
          }
        }, {
          key: "rendererFactory",
          get: function get() {
            return this._raw_lView[RENDERER_FACTORY];
          }
        }, {
          key: "renderer",
          get: function get() {
            return this._raw_lView[RENDERER];
          }
        }, {
          key: "sanitizer",
          get: function get() {
            return this._raw_lView[SANITIZER];
          }
        }, {
          key: "childHead",
          get: function get() {
            return toDebug(this._raw_lView[CHILD_HEAD]);
          }
        }, {
          key: "next",
          get: function get() {
            return toDebug(this._raw_lView[NEXT]);
          }
        }, {
          key: "childTail",
          get: function get() {
            return toDebug(this._raw_lView[CHILD_TAIL]);
          }
        }, {
          key: "declarationView",
          get: function get() {
            return toDebug(this._raw_lView[DECLARATION_VIEW]);
          }
        }, {
          key: "queries",
          get: function get() {
            return this._raw_lView[QUERIES];
          }
        }, {
          key: "tHost",
          get: function get() {
            return this._raw_lView[T_HOST];
          }
        }, {
          key: "decls",
          get: function get() {
            return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);
          }
        }, {
          key: "vars",
          get: function get() {
            return toLViewRange(this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex);
          }
        }, {
          key: "expando",
          get: function get() {
            return toLViewRange(this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length);
          }
          /**
           * Normalized view of child views (and containers) attached at this location.
           */

        }, {
          key: "childViews",
          get: function get() {
            var childViews = [];
            var child = this.childHead;

            while (child) {
              childViews.push(child);
              child = child.next;
            }

            return childViews;
          }
        }]);

        return LViewDebug;
      }();

      function mapToHTML(node) {
        if (node.type === 'ElementContainer') {
          return (node.children || []).map(mapToHTML).join('');
        } else if (node.type === 'IcuContainer') {
          throw new Error('Not implemented');
        } else {
          return toHtml(node["native"], true) || '';
        }
      }

      function toLViewRange(tView, lView, start, end) {
        var content = [];

        for (var index = start; index < end; index++) {
          content.push({
            index: index,
            t: tView.data[index],
            l: lView[index]
          });
        }

        return {
          start: start,
          end: end,
          length: end - start,
          content: content
        };
      }
      /**
       * Turns a flat list of nodes into a tree by walking the associated `TNode` tree.
       *
       * @param tNode
       * @param lView
       */


      function toDebugNodes(tNode, lView) {
        if (tNode) {
          var debugNodes = [];
          var tNodeCursor = tNode;

          while (tNodeCursor) {
            debugNodes.push(buildDebugNode(tNodeCursor, lView));
            tNodeCursor = tNodeCursor.next;
          }

          return debugNodes;
        } else {
          return [];
        }
      }

      function buildDebugNode(tNode, lView) {
        var rawValue = lView[tNode.index];

        var _native6 = unwrapRNode(rawValue);

        var factories = [];
        var instances = [];
        var tView = lView[TVIEW];

        for (var i = tNode.directiveStart; i < tNode.directiveEnd; i++) {
          var def = tView.data[i];
          factories.push(def.type);
          instances.push(lView[i]);
        }

        return {
          html: toHtml(_native6),
          type: toTNodeTypeAsString(tNode.type),
          "native": _native6,
          children: toDebugNodes(tNode.child, lView),
          factories: factories,
          instances: instances,
          injector: buildNodeInjectorDebug(tNode, tView, lView)
        };
      }

      function buildNodeInjectorDebug(tNode, tView, lView) {
        var viewProviders = [];

        for (var i = tNode.providerIndexStart_; i < tNode.providerIndexEnd_; i++) {
          viewProviders.push(tView.data[i]);
        }

        var providers = [];

        for (var _i25 = tNode.providerIndexEnd_; _i25 < tNode.directiveEnd; _i25++) {
          providers.push(tView.data[_i25]);
        }

        var nodeInjectorDebug = {
          bloom: toBloom(lView, tNode.injectorIndex),
          cumulativeBloom: toBloom(tView.data, tNode.injectorIndex),
          providers: providers,
          viewProviders: viewProviders,
          parentInjectorIndex: lView[tNode.providerIndexStart_ - 1]
        };
        return nodeInjectorDebug;
      }
      /**
       * Convert a number at `idx` location in `array` into binary representation.
       *
       * @param array
       * @param idx
       */


      function binary(array, idx) {
        var value = array[idx]; // If not a number we print 8 `?` to retain alignment but let user know that it was called on
        // wrong type.

        if (typeof value !== 'number') return '????????'; // We prefix 0s so that we have constant length number

        var text = '00000000' + value.toString(2);
        return text.substring(text.length - 8);
      }
      /**
       * Convert a bloom filter at location `idx` in `array` into binary representation.
       *
       * @param array
       * @param idx
       */


      function toBloom(array, idx) {
        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));
      }

      var LContainerDebug = /*#__PURE__*/function () {
        function LContainerDebug(_raw_lContainer) {
          _classCallCheck(this, LContainerDebug);

          this._raw_lContainer = _raw_lContainer;
        }

        _createClass2(LContainerDebug, [{
          key: "hasTransplantedViews",
          get: function get() {
            return this._raw_lContainer[HAS_TRANSPLANTED_VIEWS];
          }
        }, {
          key: "views",
          get: function get() {
            return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET).map(toDebug);
          }
        }, {
          key: "parent",
          get: function get() {
            return toDebug(this._raw_lContainer[PARENT]);
          }
        }, {
          key: "movedViews",
          get: function get() {
            return this._raw_lContainer[MOVED_VIEWS];
          }
        }, {
          key: "host",
          get: function get() {
            return this._raw_lContainer[HOST];
          }
        }, {
          key: "native",
          get: function get() {
            return this._raw_lContainer[NATIVE];
          }
        }, {
          key: "next",
          get: function get() {
            return toDebug(this._raw_lContainer[NEXT]);
          }
        }]);

        return LContainerDebug;
      }();

      var ɵ0$5 = function ɵ0$5() {
        return Promise.resolve(null);
      };
      /**
       * A permanent marker promise which signifies that the current CD tree is
       * clean.
       */


      var _CLEAN_PROMISE = ɵ0$5();
      /**
       * Invoke `HostBindingsFunction`s for view.
       *
       * This methods executes `TView.hostBindingOpCodes`. It is used to execute the
       * `HostBindingsFunction`s associated with the current `LView`.
       *
       * @param tView Current `TView`.
       * @param lView Current `LView`.
       */


      function processHostBindingOpCodes(tView, lView) {
        var hostBindingOpCodes = tView.hostBindingOpCodes;
        if (hostBindingOpCodes === null) return;

        try {
          for (var i = 0; i < hostBindingOpCodes.length; i++) {
            var opCode = hostBindingOpCodes[i];

            if (opCode < 0) {
              // Negative numbers are element indexes.
              setSelectedIndex(~opCode);
            } else {
              // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.
              var directiveIdx = opCode;
              var bindingRootIndx = hostBindingOpCodes[++i];
              var hostBindingFn = hostBindingOpCodes[++i];
              setBindingRootForHostBindings(bindingRootIndx, directiveIdx);
              var context = lView[directiveIdx];
              hostBindingFn(2
              /* Update */
              , context);
            }
          }
        } finally {
          setSelectedIndex(-1);
        }
      }
      /** Refreshes all content queries declared by directives in a given view */


      function refreshContentQueries(tView, lView) {
        var contentQueries = tView.contentQueries;

        if (contentQueries !== null) {
          for (var i = 0; i < contentQueries.length; i += 2) {
            var queryStartIdx = contentQueries[i];
            var directiveDefIdx = contentQueries[i + 1];

            if (directiveDefIdx !== -1) {
              var _directiveDef2 = tView.data[directiveDefIdx];
              ngDevMode && assertDefined(_directiveDef2, 'DirectiveDef not found.');
              ngDevMode && assertDefined(_directiveDef2.contentQueries, 'contentQueries function should be defined');
              setCurrentQueryIndex(queryStartIdx);

              _directiveDef2.contentQueries(2
              /* Update */
              , lView[directiveDefIdx], directiveDefIdx);
            }
          }
        }
      }
      /** Refreshes child components in the current view (update mode). */


      function refreshChildComponents(hostLView, components) {
        for (var i = 0; i < components.length; i++) {
          refreshComponent(hostLView, components[i]);
        }
      }
      /** Renders child components in the current view (creation mode). */


      function renderChildComponents(hostLView, components) {
        for (var i = 0; i < components.length; i++) {
          renderComponent(hostLView, components[i]);
        }
      }

      function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) {
        var lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice();
        lView[HOST] = host;
        lView[FLAGS] = flags | 4
        /* CreationMode */
        | 128
        /* Attached */
        | 8
        /* FirstLViewPass */
        ;
        resetPreOrderHookFlags(lView);
        ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);
        lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;
        lView[CONTEXT] = context;
        lView[RENDERER_FACTORY] = rendererFactory || parentLView && parentLView[RENDERER_FACTORY];
        ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required');
        lView[RENDERER] = renderer || parentLView && parentLView[RENDERER];
        ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');
        lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null;
        lView[INJECTOR] = injector || parentLView && parentLView[INJECTOR] || null;
        lView[T_HOST] = tHostNode;
        ngDevMode && assertEqual(tView.type == 2
        /* Embedded */
        ? parentLView !== null : true, true, 'Embedded views must have parentLView');
        lView[DECLARATION_COMPONENT_VIEW] = tView.type == 2
        /* Embedded */
        ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;
        ngDevMode && attachLViewDebug(lView);
        return lView;
      }

      function getOrCreateTNode(tView, index, type, name, attrs) {
        ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in
        // `view_engine_compatibility` for additional context.
        assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\'t be in the LView header.'); // Keep this function short, so that the VM will inline it.

        ngDevMode && assertPureTNodeType(type);
        var tNode = tView.data[index];

        if (tNode === null) {
          tNode = createTNodeAtIndex(tView, index, type, name, attrs);

          if (isInI18nBlock()) {
            // If we are in i18n block then all elements should be pre declared through `Placeholder`
            // See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.
            // If the `TNode` was not pre-declared than it means it was not mentioned which means it was
            // removed, so we mark it as detached.
            tNode.flags |= 64
            /* isDetached */
            ;
          }
        } else if (tNode.type & 64
        /* Placeholder */
        ) {
          tNode.type = type;
          tNode.value = name;
          tNode.attrs = attrs;
          var parent = getCurrentParentTNode();
          tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex;
          ngDevMode && assertTNodeForTView(tNode, tView);
          ngDevMode && assertEqual(index, tNode.index, 'Expecting same index');
        }

        setCurrentTNode(tNode, true);
        return tNode;
      }

      function createTNodeAtIndex(tView, index, type, name, attrs) {
        var currentTNode = getCurrentTNodePlaceholderOk();
        var isParent = isCurrentTNodeParent();
        var parent = isParent ? currentTNode : currentTNode && currentTNode.parent; // Parents cannot cross component boundaries because components will be used in multiple places.

        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
        // at index 0, in case of i18n, index 0 can be the instruction `i18nStart` and the first node has
        // the index 1 or more, so we can't just check node index.

        if (tView.firstChild === null) {
          tView.firstChild = tNode;
        }

        if (currentTNode !== null) {
          if (isParent) {
            // FIXME(misko): This logic looks unnecessarily complicated. Could we simplify?
            if (currentTNode.child == null && tNode.parent !== null) {
              // We are in the same view, which means we are adding content node to the parent view.
              currentTNode.child = tNode;
            }
          } else {
            if (currentTNode.next === null) {
              // In the case of i18n the `currentTNode` may already be linked, in which case we don't want
              // to break the links which i18n created.
              currentTNode.next = tNode;
            }
          }
        }

        return tNode;
      }
      /**
       * When elements are created dynamically after a view blueprint is created (e.g. through
       * i18nApply()), we need to adjust the blueprint for future
       * template passes.
       *
       * @param tView `TView` associated with `LView`
       * @param lView The `LView` containing the blueprint to adjust
       * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0
       * @param initialValue Initial value to store in blueprint
       */


      function allocExpando(tView, lView, numSlotsToAlloc, initialValue) {
        if (numSlotsToAlloc === 0) return -1;

        if (ngDevMode) {
          assertFirstCreatePass(tView);
          assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');
          assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');
          assertEqual(tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView');
          assertFirstUpdatePass(tView);
        }

        var allocIdx = lView.length;

        for (var i = 0; i < numSlotsToAlloc; i++) {
          lView.push(initialValue);
          tView.blueprint.push(initialValue);
          tView.data.push(null);
        }

        return allocIdx;
      } //////////////////////////
      //// Render
      //////////////////////////

      /**
       * Processes a view in the creation mode. This includes a number of steps in a specific order:
       * - creating view query functions (if any);
       * - executing a template function in the creation mode;
       * - updating static queries (if any);
       * - creating child components defined in a given view.
       */


      function renderView(tView, lView, context) {
        ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');
        enterView(lView);

        try {
          var viewQuery = tView.viewQuery;

          if (viewQuery !== null) {
            executeViewQueryFn(1
            /* Create */
            , viewQuery, context);
          } // Execute a template associated with this view, if it exists. A template function might not be
          // defined for the root component views.


          var templateFn = tView.template;

          if (templateFn !== null) {
            executeTemplate(tView, lView, templateFn, 1
            /* Create */
            , context);
          } // This needs to be set before children are processed to support recursive components.
          // This must be set to false immediately after the first creation run because in an
          // ngFor loop, all the views will be created together before update mode runs and turns
          // off firstCreatePass. If we don't set it here, instances will perform directive
          // matching, etc again and again.


          if (tView.firstCreatePass) {
            tView.firstCreatePass = false;
          } // We resolve content queries specifically marked as `static` in creation mode. Dynamic
          // content queries are resolved during change detection (i.e. update mode), after embedded
          // views are refreshed (see block above).


          if (tView.staticContentQueries) {
            refreshContentQueries(tView, lView);
          } // We must materialize query results before child components are processed
          // in case a child component has projected a container. The LContainer needs
          // to exist so the embedded views are properly attached by the container.


          if (tView.staticViewQueries) {
            executeViewQueryFn(2
            /* Update */
            , tView.viewQuery, context);
          } // Render child component views.


          var components = tView.components;

          if (components !== null) {
            renderChildComponents(lView, components);
          }
        } catch (error) {
          // If we didn't manage to get past the first template pass due to
          // an error, mark the view as corrupted so we can try to recover.
          if (tView.firstCreatePass) {
            tView.incompleteFirstPass = true;
          }

          throw error;
        } finally {
          lView[FLAGS] &= ~4
          /* CreationMode */
          ;
          leaveView();
        }
      }
      /**
       * Processes a view in update mode. This includes a number of steps in a specific order:
       * - executing a template function in update mode;
       * - executing hooks;
       * - refreshing queries;
       * - setting host bindings;
       * - refreshing child (embedded and component) views.
       */


      function refreshView(tView, lView, templateFn, context) {
        ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');
        var flags = lView[FLAGS];
        if ((flags & 256
        /* Destroyed */
        ) === 256
        /* Destroyed */
        ) return;
        enterView(lView); // Check no changes mode is a dev only mode used to verify that bindings have not changed
        // since they were assigned. We do not want to execute lifecycle hooks in that mode.

        var isInCheckNoChangesPass = isInCheckNoChangesMode();

        try {
          resetPreOrderHookFlags(lView);
          setBindingIndex(tView.bindingStartIndex);

          if (templateFn !== null) {
            executeTemplate(tView, lView, templateFn, 2
            /* Update */
            , context);
          }

          var hooksInitPhaseCompleted = (flags & 3
          /* InitPhaseStateMask */
          ) === 3
          /* InitPhaseCompleted */
          ; // execute pre-order hooks (OnInit, OnChanges, DoCheck)
          // PERF WARNING: do NOT extract this to a separate function without running benchmarks

          if (!isInCheckNoChangesPass) {
            if (hooksInitPhaseCompleted) {
              var preOrderCheckHooks = tView.preOrderCheckHooks;

              if (preOrderCheckHooks !== null) {
                executeCheckHooks(lView, preOrderCheckHooks, null);
              }
            } else {
              var preOrderHooks = tView.preOrderHooks;

              if (preOrderHooks !== null) {
                executeInitAndCheckHooks(lView, preOrderHooks, 0
                /* OnInitHooksToBeRun */
                , null);
              }

              incrementInitPhaseFlags(lView, 0
              /* OnInitHooksToBeRun */
              );
            }
          } // First mark transplanted views that are declared in this lView as needing a refresh at their
          // insertion points. This is needed to avoid the situation where the template is defined in this
          // `LView` but its declaration appears after the insertion component.


          markTransplantedViewsForRefresh(lView);
          refreshEmbeddedViews(lView); // Content query results must be refreshed before content hooks are called.

          if (tView.contentQueries !== null) {
            refreshContentQueries(tView, lView);
          } // execute content hooks (AfterContentInit, AfterContentChecked)
          // PERF WARNING: do NOT extract this to a separate function without running benchmarks


          if (!isInCheckNoChangesPass) {
            if (hooksInitPhaseCompleted) {
              var contentCheckHooks = tView.contentCheckHooks;

              if (contentCheckHooks !== null) {
                executeCheckHooks(lView, contentCheckHooks);
              }
            } else {
              var contentHooks = tView.contentHooks;

              if (contentHooks !== null) {
                executeInitAndCheckHooks(lView, contentHooks, 1
                /* AfterContentInitHooksToBeRun */
                );
              }

              incrementInitPhaseFlags(lView, 1
              /* AfterContentInitHooksToBeRun */
              );
            }
          }

          processHostBindingOpCodes(tView, lView); // Refresh child component views.

          var components = tView.components;

          if (components !== null) {
            refreshChildComponents(lView, components);
          } // View queries must execute after refreshing child components because a template in this view
          // could be inserted in a child component. If the view query executes before child component
          // refresh, the template might not yet be inserted.


          var viewQuery = tView.viewQuery;

          if (viewQuery !== null) {
            executeViewQueryFn(2
            /* Update */
            , viewQuery, context);
          } // execute view hooks (AfterViewInit, AfterViewChecked)
          // PERF WARNING: do NOT extract this to a separate function without running benchmarks


          if (!isInCheckNoChangesPass) {
            if (hooksInitPhaseCompleted) {
              var viewCheckHooks = tView.viewCheckHooks;

              if (viewCheckHooks !== null) {
                executeCheckHooks(lView, viewCheckHooks);
              }
            } else {
              var viewHooks = tView.viewHooks;

              if (viewHooks !== null) {
                executeInitAndCheckHooks(lView, viewHooks, 2
                /* AfterViewInitHooksToBeRun */
                );
              }

              incrementInitPhaseFlags(lView, 2
              /* AfterViewInitHooksToBeRun */
              );
            }
          }

          if (tView.firstUpdatePass === true) {
            // We need to make sure that we only flip the flag on successful `refreshView` only
            // Don't do this in `finally` block.
            // If we did this in `finally` block then an exception could block the execution of styling
            // instructions which in turn would be unable to insert themselves into the styling linked
            // list. The result of this would be that if the exception would not be throw on subsequent CD
            // the styling would be unable to process it data and reflect to the DOM.
            tView.firstUpdatePass = false;
          } // Do not reset the dirty state when running in check no changes mode. We don't want components
          // to behave differently depending on whether check no changes is enabled or not. For example:
          // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to
          // refresh a `NgClass` binding should work. If we would reset the dirty state in the check
          // no changes cycle, the component would be not be dirty for the next update pass. This would
          // be different in production mode where the component dirty state is not reset.


          if (!isInCheckNoChangesPass) {
            lView[FLAGS] &= ~(64
            /* Dirty */
            | 8
            /* FirstLViewPass */
            );
          }

          if (lView[FLAGS] & 1024
          /* RefreshTransplantedView */
          ) {
            lView[FLAGS] &= ~1024
            /* RefreshTransplantedView */
            ;
            updateTransplantedViewCount(lView[PARENT], -1);
          }
        } finally {
          leaveView();
        }
      }

      function renderComponentOrTemplate(tView, lView, templateFn, context) {
        var rendererFactory = lView[RENDERER_FACTORY];
        var normalExecutionPath = !isInCheckNoChangesMode();
        var creationModeIsActive = isCreationMode(lView);

        try {
          if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {
            rendererFactory.begin();
          }

          if (creationModeIsActive) {
            renderView(tView, lView, context);
          }

          refreshView(tView, lView, templateFn, context);
        } finally {
          if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {
            rendererFactory.end();
          }
        }
      }

      function executeTemplate(tView, lView, templateFn, rf, context) {
        var prevSelectedIndex = getSelectedIndex();

        try {
          setSelectedIndex(-1);

          if (rf & 2
          /* Update */
          && lView.length > HEADER_OFFSET) {
            // When we're updating, inherently select 0 so we don't
            // have to generate that instruction for most update blocks.
            selectIndexInternal(tView, lView, HEADER_OFFSET, isInCheckNoChangesMode());
          }

          templateFn(rf, context);
        } finally {
          setSelectedIndex(prevSelectedIndex);
        }
      } //////////////////////////
      //// Element
      //////////////////////////


      function executeContentQueries(tView, tNode, lView) {
        if (isContentQueryHost(tNode)) {
          var _start13 = tNode.directiveStart;
          var end = tNode.directiveEnd;

          for (var directiveIndex = _start13; directiveIndex < end; directiveIndex++) {
            var def = tView.data[directiveIndex];

            if (def.contentQueries) {
              def.contentQueries(1
              /* Create */
              , lView[directiveIndex], directiveIndex);
            }
          }
        }
      }
      /**
       * Creates directive instances.
       */


      function createDirectivesInstances(tView, lView, tNode) {
        if (!getBindingsEnabled()) return;
        instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView));

        if ((tNode.flags & 128
        /* hasHostBindings */
        ) === 128
        /* hasHostBindings */
        ) {
          invokeDirectivesHostBindings(tView, lView, tNode);
        }
      }
      /**
       * Takes a list of local names and indices and pushes the resolved local variable values
       * to LView in the same order as they are loaded in the template with load().
       */


      function saveResolvedLocalsInData(viewData, tNode) {
        var localRefExtractor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getNativeByTNode;
        var localNames = tNode.localNames;

        if (localNames !== null) {
          var localIndex = tNode.index + 1;

          for (var i = 0; i < localNames.length; i += 2) {
            var index = localNames[i + 1];
            var value = index === -1 ? localRefExtractor(tNode, viewData) : viewData[index];
            viewData[localIndex++] = value;
          }
        }
      }
      /**
       * Gets TView from a template function or creates a new TView
       * if it doesn't already exist.
       *
       * @param def ComponentDef
       * @returns TView
       */


      function getOrCreateTComponentView(def) {
        var tView = def.tView; // Create a TView if there isn't one, or recreate it if the first create pass didn't
        // complete successfully since we can't know for sure whether it's in a usable shape.

        if (tView === null || tView.incompleteFirstPass) {
          // Declaration node here is null since this function is called when we dynamically create a
          // component and hence there is no declaration.
          var declTNode = null;
          return def.tView = createTView(1
          /* Component */
          , declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts);
        }

        return tView;
      }
      /**
       * Creates a TView instance
       *
       * @param type Type of `TView`.
       * @param declTNode Declaration location of this `TView`.
       * @param templateFn Template function
       * @param decls The number of nodes, local refs, and pipes in this template
       * @param directives Registry of directives for this view
       * @param pipes Registry of pipes for this view
       * @param viewQuery View queries for this view
       * @param schemas Schemas for this view
       * @param consts Constants for this view
       */


      function createTView(type, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory) {
        ngDevMode && ngDevMode.tView++;
        var bindingStartIndex = HEADER_OFFSET + decls; // This length does not yet contain host bindings from child directives because at this point,
        // we don't know which directives are active on this template. As soon as a directive is matched
        // that has a host binding, we will update the blueprint with that def's hostVars count.

        var initialViewLength = bindingStartIndex + vars;
        var blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);
        var consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;
        var tView = blueprint[TVIEW] = ngDevMode ? new TViewConstructor(type, // type: TViewType,
        blueprint, // blueprint: LView,
        templateFn, // template: ComponentTemplate<{}>|null,
        null, // queries: TQueries|null
        viewQuery, // viewQuery: ViewQueriesFunction<{}>|null,
        declTNode, // declTNode: TNode|null,
        cloneToTViewData(blueprint).fill(null, bindingStartIndex), // data: TData,
        bindingStartIndex, // bindingStartIndex: number,
        initialViewLength, // expandoStartIndex: number,
        null, // hostBindingOpCodes: HostBindingOpCodes,
        true, // firstCreatePass: boolean,
        true, // firstUpdatePass: boolean,
        false, // staticViewQueries: boolean,
        false, // staticContentQueries: boolean,
        null, // preOrderHooks: HookData|null,
        null, // preOrderCheckHooks: HookData|null,
        null, // contentHooks: HookData|null,
        null, // contentCheckHooks: HookData|null,
        null, // viewHooks: HookData|null,
        null, // viewCheckHooks: HookData|null,
        null, // destroyHooks: DestroyHookData|null,
        null, // cleanup: any[]|null,
        null, // contentQueries: number[]|null,
        null, // components: number[]|null,
        typeof directives === 'function' ? //
        directives() : //
        directives, // directiveRegistry: DirectiveDefList|null,
        typeof pipes === 'function' ? pipes() : pipes, // pipeRegistry: PipeDefList|null,
        null, // firstChild: TNode|null,
        schemas, // schemas: SchemaMetadata[]|null,
        consts, // consts: TConstants|null
        false, // incompleteFirstPass: boolean
        decls, // ngDevMode only: decls
        vars) : {
          type: type,
          blueprint: blueprint,
          template: templateFn,
          queries: null,
          viewQuery: viewQuery,
          declTNode: declTNode,
          data: blueprint.slice().fill(null, bindingStartIndex),
          bindingStartIndex: bindingStartIndex,
          expandoStartIndex: initialViewLength,
          hostBindingOpCodes: null,
          firstCreatePass: true,
          firstUpdatePass: true,
          staticViewQueries: false,
          staticContentQueries: false,
          preOrderHooks: null,
          preOrderCheckHooks: null,
          contentHooks: null,
          contentCheckHooks: null,
          viewHooks: null,
          viewCheckHooks: null,
          destroyHooks: null,
          cleanup: null,
          contentQueries: null,
          components: null,
          directiveRegistry: typeof directives === 'function' ? directives() : directives,
          pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
          firstChild: null,
          schemas: schemas,
          consts: consts,
          incompleteFirstPass: false
        };

        if (ngDevMode) {
          // For performance reasons it is important that the tView retains the same shape during runtime.
          // (To make sure that all of the code is monomorphic.) For this reason we seal the object to
          // prevent class transitions.
          Object.seal(tView);
        }

        return tView;
      }

      function createViewBlueprint(bindingStartIndex, initialViewLength) {
        var blueprint = ngDevMode ? new LViewBlueprint() : [];

        for (var i = 0; i < initialViewLength; i++) {
          blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);
        }

        return blueprint;
      }

      function createError(text, token) {
        return new Error("Renderer: ".concat(text, " [").concat(stringifyForError(token), "]"));
      }

      function assertHostNodeExists(rElement, elementOrSelector) {
        if (!rElement) {
          if (typeof elementOrSelector === 'string') {
            throw createError('Host node with selector not found:', elementOrSelector);
          } else {
            throw createError('Host node is required:', elementOrSelector);
          }
        }
      }
      /**
       * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.
       *
       * @param rendererFactory Factory function to create renderer instance.
       * @param elementOrSelector Render element or CSS selector to locate the element.
       * @param encapsulation View Encapsulation defined for component that requests host element.
       */


      function locateHostElement(renderer, elementOrSelector, encapsulation) {
        if (isProceduralRenderer(renderer)) {
          // When using native Shadow DOM, do not clear host element to allow native slot projection
          var preserveContent = encapsulation === ViewEncapsulation.ShadowDom;
          return renderer.selectRootElement(elementOrSelector, preserveContent);
        }

        var rElement = typeof elementOrSelector === 'string' ? renderer.querySelector(elementOrSelector) : elementOrSelector;
        ngDevMode && assertHostNodeExists(rElement, elementOrSelector); // Always clear host element's content when Renderer3 is in use. For procedural renderer case we
        // make it depend on whether ShadowDom encapsulation is used (in which case the content should be
        // preserved to allow native slot projection). ShadowDom encapsulation requires procedural
        // renderer, and procedural renderer case is handled above.

        rElement.textContent = '';
        return rElement;
      }
      /**
       * Saves context for this cleanup function in LView.cleanupInstances.
       *
       * On the first template pass, saves in TView:
       * - Cleanup function
       * - Index of context we just saved in LView.cleanupInstances
       *
       * This function can also be used to store instance specific cleanup fns. In that case the `context`
       * is `null` and the function is store in `LView` (rather than it `TView`).
       */


      function storeCleanupWithContext(tView, lView, context, cleanupFn) {
        var lCleanup = getOrCreateLViewCleanup(lView);

        if (context === null) {
          // If context is null that this is instance specific callback. These callbacks can only be
          // inserted after template shared instances. For this reason in ngDevMode we freeze the TView.
          if (ngDevMode) {
            Object.freeze(getOrCreateTViewCleanup(tView));
          }

          lCleanup.push(cleanupFn);
        } else {
          lCleanup.push(context);

          if (tView.firstCreatePass) {
            getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);
          }
        }
      }

      function createTNode(tView, tParent, type, index, value, attrs) {
        ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in
        // `view_engine_compatibility` for additional context.
        assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\'t be in the LView header.');
        ngDevMode && assertNotSame(attrs, undefined, '\'undefined\' is not valid value for \'attrs\'');
        ngDevMode && ngDevMode.tNode++;
        ngDevMode && tParent && assertTNodeForTView(tParent, tView);
        var injectorIndex = tParent ? tParent.injectorIndex : -1;
        var tNode = ngDevMode ? new TNodeDebug(tView, // tView_: TView
        type, // type: TNodeType
        index, // index: number
        null, // insertBeforeIndex: null|-1|number|number[]
        injectorIndex, // injectorIndex: number
        -1, // directiveStart: number
        -1, // directiveEnd: number
        -1, // directiveStylingLast: number
        null, // propertyBindings: number[]|null
        0, // flags: TNodeFlags
        0, // providerIndexes: TNodeProviderIndexes
        value, // value: string|null
        attrs, // attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null
        null, // mergedAttrs
        null, // localNames: (string|number)[]|null
        undefined, // initialInputs: (string[]|null)[]|null|undefined
        null, // inputs: PropertyAliases|null
        null, // outputs: PropertyAliases|null
        null, // tViews: ITView|ITView[]|null
        null, // next: ITNode|null
        null, // projectionNext: ITNode|null
        null, // child: ITNode|null
        tParent, // parent: TElementNode|TContainerNode|null
        null, // projection: number|(ITNode|RNode[])[]|null
        null, // styles: string|null
        null, // stylesWithoutHost: string|null
        undefined, // residualStyles: string|null
        null, // classes: string|null
        null, // classesWithoutHost: string|null
        undefined, // residualClasses: string|null
        0, // classBindings: TStylingRange;
        0) : {
          type: type,
          index: index,
          insertBeforeIndex: null,
          injectorIndex: injectorIndex,
          directiveStart: -1,
          directiveEnd: -1,
          directiveStylingLast: -1,
          propertyBindings: null,
          flags: 0,
          providerIndexes: 0,
          value: value,
          attrs: attrs,
          mergedAttrs: null,
          localNames: null,
          initialInputs: undefined,
          inputs: null,
          outputs: null,
          tViews: null,
          next: null,
          projectionNext: null,
          child: null,
          parent: tParent,
          projection: null,
          styles: null,
          stylesWithoutHost: null,
          residualStyles: undefined,
          classes: null,
          classesWithoutHost: null,
          residualClasses: undefined,
          classBindings: 0,
          styleBindings: 0
        };

        if (ngDevMode) {
          // For performance reasons it is important that the tNode retains the same shape during runtime.
          // (To make sure that all of the code is monomorphic.) For this reason we seal the object to
          // prevent class transitions.
          Object.seal(tNode);
        }

        return tNode;
      }

      function generatePropertyAliases(inputAliasMap, directiveDefIdx, propStore) {
        for (var publicName in inputAliasMap) {
          if (inputAliasMap.hasOwnProperty(publicName)) {
            propStore = propStore === null ? {} : propStore;
            var internalName = inputAliasMap[publicName];

            if (propStore.hasOwnProperty(publicName)) {
              propStore[publicName].push(directiveDefIdx, internalName);
            } else {
              propStore[publicName] = [directiveDefIdx, internalName];
            }
          }
        }

        return propStore;
      }
      /**
       * Initializes data structures required to work with directive inputs and outputs.
       * Initialization is done for all directives matched on a given TNode.
       */


      function initializeInputAndOutputAliases(tView, tNode) {
        ngDevMode && assertFirstCreatePass(tView);
        var start = tNode.directiveStart;
        var end = tNode.directiveEnd;
        var tViewData = tView.data;
        var tNodeAttrs = tNode.attrs;
        var inputsFromAttrs = ngDevMode ? new TNodeInitialInputs() : [];
        var inputsStore = null;
        var outputsStore = null;

        for (var i = start; i < end; i++) {
          var _directiveDef3 = tViewData[i];
          var directiveInputs = _directiveDef3.inputs; // Do not use unbound attributes as inputs to structural directives, since structural
          // directive inputs can only be set using microsyntax (e.g. `<div *dir="exp">`).
          // TODO(FW-1930): microsyntax expressions may also contain unbound/static attributes, which
          // should be set for inline templates.

          var initialInputs = tNodeAttrs !== null && !isInlineTemplate(tNode) ? generateInitialInputs(directiveInputs, tNodeAttrs) : null;
          inputsFromAttrs.push(initialInputs);
          inputsStore = generatePropertyAliases(directiveInputs, i, inputsStore);
          outputsStore = generatePropertyAliases(_directiveDef3.outputs, i, outputsStore);
        }

        if (inputsStore !== null) {
          if (inputsStore.hasOwnProperty('class')) {
            tNode.flags |= 16
            /* hasClassInput */
            ;
          }

          if (inputsStore.hasOwnProperty('style')) {
            tNode.flags |= 32
            /* hasStyleInput */
            ;
          }
        }

        tNode.initialInputs = inputsFromAttrs;
        tNode.inputs = inputsStore;
        tNode.outputs = outputsStore;
      }
      /**
       * Mapping between attributes names that don't correspond to their element property names.
       *
       * Performance note: this function is written as a series of if checks (instead of, say, a property
       * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of
       * mapping property names. Do NOT change without benchmarking.
       *
       * Note: this mapping has to be kept in sync with the equally named mapping in the template
       * type-checking machinery of ngtsc.
       */


      function mapPropName(name) {
        if (name === 'class') return 'className';
        if (name === 'for') return 'htmlFor';
        if (name === 'formaction') return 'formAction';
        if (name === 'innerHtml') return 'innerHTML';
        if (name === 'readonly') return 'readOnly';
        if (name === 'tabindex') return 'tabIndex';
        return name;
      }

      function elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, nativeOnly) {
        ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');
        var element = getNativeByTNode(tNode, lView);
        var inputData = tNode.inputs;
        var dataValue;

        if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) {
          setInputsForProperty(tView, lView, dataValue, propName, value);
          if (isComponentHost(tNode)) markDirtyIfOnPush(lView, tNode.index);

          if (ngDevMode) {
            setNgReflectProperties(lView, element, tNode.type, dataValue, value);
          }
        } else if (tNode.type & 3
        /* AnyRNode */
        ) {
          propName = mapPropName(propName);

          if (ngDevMode) {
            validateAgainstEventProperties(propName);

            if (!validateProperty(tView, element, propName, tNode)) {
              // Return here since we only log warnings for unknown properties.
              logUnknownPropertyError(propName, tNode);
              return;
            }

            ngDevMode.rendererSetProperty++;
          } // It is assumed that the sanitizer is only added when the compiler determines that the
          // property is risky, so sanitization can be done without further checks.


          value = sanitizer != null ? sanitizer(value, tNode.value || '', propName) : value;

          if (isProceduralRenderer(renderer)) {
            renderer.setProperty(element, propName, value);
          } else if (!isAnimationProp(propName)) {
            element.setProperty ? element.setProperty(propName, value) : element[propName] = value;
          }
        } else if (tNode.type & 12
        /* AnyContainer */
        ) {
          // If the node is a container and the property didn't
          // match any of the inputs or schemas we should throw.
          if (ngDevMode && !matchingSchemas(tView, tNode.value)) {
            logUnknownPropertyError(propName, tNode);
          }
        }
      }
      /** If node is an OnPush component, marks its LView dirty. */


      function markDirtyIfOnPush(lView, viewIndex) {
        ngDevMode && assertLView(lView);
        var childComponentLView = getComponentLViewByIndex(viewIndex, lView);

        if (!(childComponentLView[FLAGS] & 16
        /* CheckAlways */
        )) {
          childComponentLView[FLAGS] |= 64
          /* Dirty */
          ;
        }
      }

      function setNgReflectProperty(lView, element, type, attrName, value) {
        var renderer = lView[RENDERER];
        attrName = normalizeDebugBindingName(attrName);
        var debugValue = normalizeDebugBindingValue(value);

        if (type & 3
        /* AnyRNode */
        ) {
          if (value == null) {
            isProceduralRenderer(renderer) ? renderer.removeAttribute(element, attrName) : element.removeAttribute(attrName);
          } else {
            isProceduralRenderer(renderer) ? renderer.setAttribute(element, attrName, debugValue) : element.setAttribute(attrName, debugValue);
          }
        } else {
          var textContent = escapeCommentText("bindings=".concat(JSON.stringify(_defineProperty({}, attrName, debugValue), null, 2)));

          if (isProceduralRenderer(renderer)) {
            renderer.setValue(element, textContent);
          } else {
            element.textContent = textContent;
          }
        }
      }

      function setNgReflectProperties(lView, element, type, dataValue, value) {
        if (type & (3
        /* AnyRNode */
        | 4
        /* Container */
        )) {
          /**
           * dataValue is an array containing runtime input or output names for the directives:
           * i+0: directive instance index
           * i+1: privateName
           *
           * e.g. [0, 'change', 'change-minified']
           * we want to set the reflected property with the privateName: dataValue[i+1]
           */
          for (var i = 0; i < dataValue.length; i += 2) {
            setNgReflectProperty(lView, element, type, dataValue[i + 1], value);
          }
        }
      }

      function validateProperty(tView, element, propName, tNode) {
        // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT
        // mode where this check happens at compile time. In JIT mode, `schemas` is always present and
        // defined as an array (as an empty array in case `schemas` field is not defined) and we should
        // execute the check below.
        if (tView.schemas === null) return true; // The property is considered valid if the element matches the schema, it exists on the element
        // or it is synthetic, and we are in a browser context (web worker nodes should be skipped).

        if (matchingSchemas(tView, tNode.value) || propName in element || isAnimationProp(propName)) {
          return true;
        } // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we
        // need to account for both here, while being careful for `typeof null` also returning 'object'.


        return typeof Node === 'undefined' || Node === null || !(element instanceof Node);
      }

      function matchingSchemas(tView, tagName) {
        var schemas = tView.schemas;

        if (schemas !== null) {
          for (var i = 0; i < schemas.length; i++) {
            var schema = schemas[i];

            if (schema === NO_ERRORS_SCHEMA || schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {
              return true;
            }
          }
        }

        return false;
      }
      /**
       * Logs an error that a property is not supported on an element.
       * @param propName Name of the invalid property.
       * @param tNode Node on which we encountered the property.
       */


      function logUnknownPropertyError(propName, tNode) {
        var message = "Can't bind to '".concat(propName, "' since it isn't a known property of '").concat(tNode.value, "'.");
        console.error(formatRuntimeError("303"
        /* UNKNOWN_BINDING */
        , message));
      }
      /**
       * Instantiate a root component.
       */


      function instantiateRootComponent(tView, lView, def) {
        var rootTNode = getCurrentTNode();

        if (tView.firstCreatePass) {
          if (def.providersResolver) def.providersResolver(def);
          var directiveIndex = allocExpando(tView, lView, 1, null);
          ngDevMode && assertEqual(directiveIndex, rootTNode.directiveStart, 'Because this is a root component the allocated expando should match the TNode component.');
          configureViewWithDirective(tView, rootTNode, lView, directiveIndex, def);
        }

        var directive = getNodeInjectable(lView, tView, rootTNode.directiveStart, rootTNode);
        attachPatchData(directive, lView);

        var _native7 = getNativeByTNode(rootTNode, lView);

        if (_native7) {
          attachPatchData(_native7, lView);
        }

        return directive;
      }
      /**
       * Resolve the matched directives on a node.
       */


      function resolveDirectives(tView, lView, tNode, localRefs) {
        // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in
        // tsickle.
        ngDevMode && assertFirstCreatePass(tView);
        var hasDirectives = false;

        if (getBindingsEnabled()) {
          var directiveDefs = findDirectiveDefMatches(tView, lView, tNode);
          var exportsMap = localRefs === null ? null : {
            '': -1
          };

          if (directiveDefs !== null) {
            hasDirectives = true;
            initTNodeFlags(tNode, tView.data.length, directiveDefs.length); // When the same token is provided by several directives on the same node, some rules apply in
            // the viewEngine:
            // - viewProviders have priority over providers
            // - the last directive in NgModule.declarations has priority over the previous one
            // So to match these rules, the order in which providers are added in the arrays is very
            // important.

            for (var i = 0; i < directiveDefs.length; i++) {
              var def = directiveDefs[i];
              if (def.providersResolver) def.providersResolver(def);
            }

            var preOrderHooksFound = false;
            var preOrderCheckHooksFound = false;
            var directiveIdx = allocExpando(tView, lView, directiveDefs.length, null);
            ngDevMode && assertSame(directiveIdx, tNode.directiveStart, 'TNode.directiveStart should point to just allocated space');

            for (var _i26 = 0; _i26 < directiveDefs.length; _i26++) {
              var _def2 = directiveDefs[_i26]; // Merge the attrs in the order of matches. This assumes that the first directive is the
              // component itself, so that the component has the least priority.

              tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, _def2.hostAttrs);
              configureViewWithDirective(tView, tNode, lView, directiveIdx, _def2);
              saveNameToExportMap(directiveIdx, _def2, exportsMap);
              if (_def2.contentQueries !== null) tNode.flags |= 8
              /* hasContentQuery */
              ;
              if (_def2.hostBindings !== null || _def2.hostAttrs !== null || _def2.hostVars !== 0) tNode.flags |= 128
              /* hasHostBindings */
              ;
              var lifeCycleHooks = _def2.type.prototype; // Only push a node index into the preOrderHooks array if this is the first
              // pre-order hook found on this node.

              if (!preOrderHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) {
                // We will push the actual hook function into this array later during dir instantiation.
                // We cannot do it now because we must ensure hooks are registered in the same
                // order that directives are created (i.e. injection order).
                (tView.preOrderHooks || (tView.preOrderHooks = [])).push(tNode.index);
                preOrderHooksFound = true;
              }

              if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {
                (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(tNode.index);
                preOrderCheckHooksFound = true;
              }

              directiveIdx++;
            }

            initializeInputAndOutputAliases(tView, tNode);
          }

          if (exportsMap) cacheMatchingLocalNames(tNode, localRefs, exportsMap);
        } // Merge the template attrs last so that they have the highest priority.


        tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);
        return hasDirectives;
      }
      /**
       * Add `hostBindings` to the `TView.hostBindingOpCodes`.
       *
       * @param tView `TView` to which the `hostBindings` should be added.
       * @param tNode `TNode` the element which contains the directive
       * @param lView `LView` current `LView`
       * @param directiveIdx Directive index in view.
       * @param directiveVarsIdx Where will the directive's vars be stored
       * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add.
       */


      function registerHostBindingOpCodes(tView, tNode, lView, directiveIdx, directiveVarsIdx, def) {
        ngDevMode && assertFirstCreatePass(tView);
        var hostBindings = def.hostBindings;

        if (hostBindings) {
          var hostBindingOpCodes = tView.hostBindingOpCodes;

          if (hostBindingOpCodes === null) {
            hostBindingOpCodes = tView.hostBindingOpCodes = [];
          }

          var elementIndx = ~tNode.index;

          if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) {
            // Conditionally add select element so that we are more efficient in execution.
            // NOTE: this is strictly not necessary and it trades code size for runtime perf.
            // (We could just always add it.)
            hostBindingOpCodes.push(elementIndx);
          }

          hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);
        }
      }
      /**
       * Returns the last selected element index in the `HostBindingOpCodes`
       *
       * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only
       * if it changes. This method returns the last index (or '0' if not found.)
       *
       * Selected element index are only the ones which are negative.
       */


      function lastSelectedElementIdx(hostBindingOpCodes) {
        var i = hostBindingOpCodes.length;

        while (i > 0) {
          var value = hostBindingOpCodes[--i];

          if (typeof value === 'number' && value < 0) {
            return value;
          }
        }

        return 0;
      }
      /**
       * Instantiate all the directives that were previously resolved on the current node.
       */


      function instantiateAllDirectives(tView, lView, tNode, _native8) {
        var start = tNode.directiveStart;
        var end = tNode.directiveEnd;

        if (!tView.firstCreatePass) {
          getOrCreateNodeInjectorForNode(tNode, lView);
        }

        attachPatchData(_native8, lView);
        var initialInputs = tNode.initialInputs;

        for (var i = start; i < end; i++) {
          var def = tView.data[i];
          var isComponent = isComponentDef(def);

          if (isComponent) {
            ngDevMode && assertTNodeType(tNode, 3
            /* AnyRNode */
            );
            addComponentLogic(lView, tNode, def);
          }

          var directive = getNodeInjectable(lView, tView, i, tNode);
          attachPatchData(directive, lView);

          if (initialInputs !== null) {
            setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);
          }

          if (isComponent) {
            var componentView = getComponentLViewByIndex(tNode.index, lView);
            componentView[CONTEXT] = directive;
          }
        }
      }

      function invokeDirectivesHostBindings(tView, lView, tNode) {
        var start = tNode.directiveStart;
        var end = tNode.directiveEnd;
        var firstCreatePass = tView.firstCreatePass;
        var elementIndex = tNode.index;
        var currentDirectiveIndex = getCurrentDirectiveIndex();

        try {
          setSelectedIndex(elementIndex);

          for (var dirIndex = start; dirIndex < end; dirIndex++) {
            var def = tView.data[dirIndex];
            var directive = lView[dirIndex];
            setCurrentDirectiveIndex(dirIndex);

            if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {
              invokeHostBindingsInCreationMode(def, directive);
            }
          }
        } finally {
          setSelectedIndex(-1);
          setCurrentDirectiveIndex(currentDirectiveIndex);
        }
      }
      /**
       * Invoke the host bindings in creation mode.
       *
       * @param def `DirectiveDef` which may contain the `hostBindings` function.
       * @param directive Instance of directive.
       */


      function invokeHostBindingsInCreationMode(def, directive) {
        if (def.hostBindings !== null) {
          def.hostBindings(1
          /* Create */
          , directive);
        }
      }
      /**
       * Matches the current node against all available selectors.
       * If a component is matched (at most one), it is returned in first position in the array.
       */


      function findDirectiveDefMatches(tView, viewData, tNode) {
        ngDevMode && assertFirstCreatePass(tView);
        ngDevMode && assertTNodeType(tNode, 3
        /* AnyRNode */
        | 12
        /* AnyContainer */
        );
        var registry = tView.directiveRegistry;
        var matches = null;

        if (registry) {
          for (var i = 0; i < registry.length; i++) {
            var def = registry[i];

            if (isNodeMatchingSelectorList(tNode, def.selectors,
            /* isProjectionMode */
            false)) {
              matches || (matches = ngDevMode ? new MatchesArray() : []);
              diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, viewData), tView, def.type);

              if (isComponentDef(def)) {
                if (ngDevMode) {
                  assertTNodeType(tNode, 2
                  /* Element */
                  , "\"".concat(tNode.value, "\" tags cannot be used as component hosts. ") + "Please use a different tag to activate the ".concat(stringify(def.type), " component."));
                  if (tNode.flags & 2
                  /* isComponentHost */
                  ) throwMultipleComponentError(tNode);
                }

                markAsComponentHost(tView, tNode); // The component is always stored first with directives after.

                matches.unshift(def);
              } else {
                matches.push(def);
              }
            }
          }
        }

        return matches;
      }
      /**
       * Marks a given TNode as a component's host. This consists of:
       * - setting appropriate TNode flags;
       * - storing index of component's host element so it will be queued for view refresh during CD.
       */


      function markAsComponentHost(tView, hostTNode) {
        ngDevMode && assertFirstCreatePass(tView);
        hostTNode.flags |= 2
        /* isComponentHost */
        ;
        (tView.components || (tView.components = ngDevMode ? new TViewComponents() : [])).push(hostTNode.index);
      }
      /** Caches local names and their matching directive indices for query and template lookups. */


      function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
        if (localRefs) {
          var localNames = tNode.localNames = ngDevMode ? new TNodeLocalNames() : []; // Local names must be stored in tNode in the same order that localRefs are defined
          // in the template to ensure the data is loaded in the same slots as their refs
          // in the template (for template queries).

          for (var i = 0; i < localRefs.length; i += 2) {
            var index = exportsMap[localRefs[i + 1]];
            if (index == null) throw new RuntimeError("301"
            /* EXPORT_NOT_FOUND */
            , "Export of name '".concat(localRefs[i + 1], "' not found!"));
            localNames.push(localRefs[i], index);
          }
        }
      }
      /**
       * Builds up an export map as directives are created, so local refs can be quickly mapped
       * to their directive instances.
       */


      function saveNameToExportMap(directiveIdx, def, exportsMap) {
        if (exportsMap) {
          if (def.exportAs) {
            for (var i = 0; i < def.exportAs.length; i++) {
              exportsMap[def.exportAs[i]] = directiveIdx;
            }
          }

          if (isComponentDef(def)) exportsMap[''] = directiveIdx;
        }
      }
      /**
       * Initializes the flags on the current node, setting all indices to the initial index,
       * the directive count to 0, and adding the isComponent flag.
       * @param index the initial index
       */


      function initTNodeFlags(tNode, index, numberOfDirectives) {
        ngDevMode && assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached the max number of directives');
        tNode.flags |= 1
        /* isDirectiveHost */
        ; // When the first directive is created on a node, save the index

        tNode.directiveStart = index;
        tNode.directiveEnd = index + numberOfDirectives;
        tNode.providerIndexes = index;
      }
      /**
       * Setup directive for instantiation.
       *
       * We need to create a `NodeInjectorFactory` which is then inserted in both the `Blueprint` as well
       * as `LView`. `TView` gets the `DirectiveDef`.
       *
       * @param tView `TView`
       * @param tNode `TNode`
       * @param lView `LView`
       * @param directiveIndex Index where the directive will be stored in the Expando.
       * @param def `DirectiveDef`
       */


      function configureViewWithDirective(tView, tNode, lView, directiveIndex, def) {
        ngDevMode && assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section');
        tView.data[directiveIndex] = def;
        var directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true));
        var nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null);
        tView.blueprint[directiveIndex] = nodeInjectorFactory;
        lView[directiveIndex] = nodeInjectorFactory;
        registerHostBindingOpCodes(tView, tNode, lView, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE), def);
      }

      function addComponentLogic(lView, hostTNode, def) {
        var _native9 = getNativeByTNode(hostTNode, lView);

        var tView = getOrCreateTComponentView(def); // Only component views should be added to the view tree directly. Embedded views are
        // accessed through their containers because they may be removed / re-added later.

        var rendererFactory = lView[RENDERER_FACTORY];
        var componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64
        /* Dirty */
        : 16
        /* CheckAlways */
        , _native9, hostTNode, rendererFactory, rendererFactory.createRenderer(_native9, def), null, null)); // Component view will always be created before any injected LContainers,
        // so this is a regular element, wrap it with the component view

        lView[hostTNode.index] = componentView;
      }

      function elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) {
        if (ngDevMode) {
          assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');
          validateAgainstEventAttributes(name);
          assertTNodeType(tNode, 2
          /* Element */
          , "Attempted to set attribute `".concat(name, "` on a container node. ") + "Host bindings are not valid on ng-container or ng-template.");
        }

        var element = getNativeByTNode(tNode, lView);
        setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);
      }

      function setElementAttribute(renderer, element, namespace, tagName, name, value, sanitizer) {
        if (value == null) {
          ngDevMode && ngDevMode.rendererRemoveAttribute++;
          isProceduralRenderer(renderer) ? renderer.removeAttribute(element, name, namespace) : element.removeAttribute(name);
        } else {
          ngDevMode && ngDevMode.rendererSetAttribute++;
          var strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);

          if (isProceduralRenderer(renderer)) {
            renderer.setAttribute(element, name, strValue, namespace);
          } else {
            namespace ? element.setAttributeNS(namespace, name, strValue) : element.setAttribute(name, strValue);
          }
        }
      }
      /**
       * Sets initial input properties on directive instances from attribute data
       *
       * @param lView Current LView that is being processed.
       * @param directiveIndex Index of the directive in directives array
       * @param instance Instance of the directive on which to set the initial inputs
       * @param def The directive def that contains the list of inputs
       * @param tNode The static data for this node
       */


      function setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) {
        var initialInputs = initialInputData[directiveIndex];

        if (initialInputs !== null) {
          var setInput = def.setInput;

          for (var i = 0; i < initialInputs.length;) {
            var publicName = initialInputs[i++];
            var privateName = initialInputs[i++];
            var value = initialInputs[i++];

            if (setInput !== null) {
              def.setInput(instance, value, publicName, privateName);
            } else {
              instance[privateName] = value;
            }

            if (ngDevMode) {
              var nativeElement = getNativeByTNode(tNode, lView);
              setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);
            }
          }
        }
      }
      /**
       * Generates initialInputData for a node and stores it in the template's static storage
       * so subsequent template invocations don't have to recalculate it.
       *
       * initialInputData is an array containing values that need to be set as input properties
       * for directives on this node, but only once on creation. We need this array to support
       * the case where you set an @Input property of a directive using attribute-like syntax.
       * e.g. if you have a `name` @Input, you can set it once like this:
       *
       * <my-component name="Bess"></my-component>
       *
       * @param inputs The list of inputs from the directive def
       * @param attrs The static attrs on this node
       */


      function generateInitialInputs(inputs, attrs) {
        var inputsToStore = null;
        var i = 0;

        while (i < attrs.length) {
          var attrName = attrs[i];

          if (attrName === 0
          /* NamespaceURI */
          ) {
            // We do not allow inputs on namespaced attributes.
            i += 4;
            continue;
          } else if (attrName === 5
          /* ProjectAs */
          ) {
            // Skip over the `ngProjectAs` value.
            i += 2;
            continue;
          } // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.


          if (typeof attrName === 'number') break;

          if (inputs.hasOwnProperty(attrName)) {
            if (inputsToStore === null) inputsToStore = [];
            inputsToStore.push(attrName, inputs[attrName], attrs[i + 1]);
          }

          i += 2;
        }

        return inputsToStore;
      } //////////////////////////
      //// ViewContainer & View
      //////////////////////////
      // Not sure why I need to do `any` here but TS complains later.


      var LContainerArray = (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode() && createNamedArrayType('LContainer');
      /**
       * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
       *
       * @param hostNative The host element for the LContainer
       * @param hostTNode The host TNode for the LContainer
       * @param currentView The parent view of the LContainer
       * @param native The native comment element
       * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case
       * @returns LContainer
       */

      function createLContainer(hostNative, currentView, _native10, tNode) {
        ngDevMode && assertLView(currentView);
        ngDevMode && !isProceduralRenderer(currentView[RENDERER]) && assertDomNode(_native10); // https://jsperf.com/array-literal-vs-new-array-really

        var lContainer = new (ngDevMode ? LContainerArray : Array)(hostNative, // host native
        true, // Boolean `true` in this position signifies that this is an `LContainer`
        false, // has transplanted views
        currentView, // parent
        null, // next
        0, // transplanted views to refresh count
        tNode, // t_host
        _native10, // native,
        null, // view refs
        null);
        ngDevMode && assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');
        ngDevMode && attachLContainerDebug(lContainer);
        return lContainer;
      }
      /**
       * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes
       * them by executing an associated template function.
       */


      function refreshEmbeddedViews(lView) {
        for (var lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {
          for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
            var embeddedLView = lContainer[i];
            var embeddedTView = embeddedLView[TVIEW];
            ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');

            if (viewAttachedToChangeDetector(embeddedLView)) {
              refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);
            }
          }
        }
      }
      /**
       * Mark transplanted views as needing to be refreshed at their insertion points.
       *
       * @param lView The `LView` that may have transplanted views.
       */


      function markTransplantedViewsForRefresh(lView) {
        for (var lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {
          if (!lContainer[HAS_TRANSPLANTED_VIEWS]) continue;
          var movedViews = lContainer[MOVED_VIEWS];
          ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');

          for (var i = 0; i < movedViews.length; i++) {
            var movedLView = movedViews[i];
            var insertionLContainer = movedLView[PARENT];
            ngDevMode && assertLContainer(insertionLContainer); // We don't want to increment the counter if the moved LView was already marked for
            // refresh.

            if ((movedLView[FLAGS] & 1024
            /* RefreshTransplantedView */
            ) === 0) {
              updateTransplantedViewCount(insertionLContainer, 1);
            } // Note, it is possible that the `movedViews` is tracking views that are transplanted *and*
            // those that aren't (declaration component === insertion component). In the latter case,
            // it's fine to add the flag, as we will clear it immediately in
            // `refreshEmbeddedViews` for the view currently being refreshed.


            movedLView[FLAGS] |= 1024
            /* RefreshTransplantedView */
            ;
          }
        }
      } /////////////

      /**
       * Refreshes components by entering the component view and processing its bindings, queries, etc.
       *
       * @param componentHostIdx  Element index in LView[] (adjusted for HEADER_OFFSET)
       */


      function refreshComponent(hostLView, componentHostIdx) {
        ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');
        var componentView = getComponentLViewByIndex(componentHostIdx, hostLView); // Only attached components that are CheckAlways or OnPush and dirty should be refreshed

        if (viewAttachedToChangeDetector(componentView)) {
          var tView = componentView[TVIEW];

          if (componentView[FLAGS] & (16
          /* CheckAlways */
          | 64
          /* Dirty */
          )) {
            refreshView(tView, componentView, tView.template, componentView[CONTEXT]);
          } else if (componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {
            // Only attached components that are CheckAlways or OnPush and dirty should be refreshed
            refreshContainsDirtyView(componentView);
          }
        }
      }
      /**
       * Refreshes all transplanted views marked with `LViewFlags.RefreshTransplantedView` that are
       * children or descendants of the given lView.
       *
       * @param lView The lView which contains descendant transplanted views that need to be refreshed.
       */


      function refreshContainsDirtyView(lView) {
        for (var lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {
          for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
            var embeddedLView = lContainer[i];

            if (embeddedLView[FLAGS] & 1024
            /* RefreshTransplantedView */
            ) {
              var embeddedTView = embeddedLView[TVIEW];
              ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');
              refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);
            } else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {
              refreshContainsDirtyView(embeddedLView);
            }
          }
        }

        var tView = lView[TVIEW]; // Refresh child component views.

        var components = tView.components;

        if (components !== null) {
          for (var _i27 = 0; _i27 < components.length; _i27++) {
            var componentView = getComponentLViewByIndex(components[_i27], lView); // Only attached components that are CheckAlways or OnPush and dirty should be refreshed

            if (viewAttachedToChangeDetector(componentView) && componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {
              refreshContainsDirtyView(componentView);
            }
          }
        }
      }

      function renderComponent(hostLView, componentHostIdx) {
        ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');
        var componentView = getComponentLViewByIndex(componentHostIdx, hostLView);
        var componentTView = componentView[TVIEW];
        syncViewWithBlueprint(componentTView, componentView);
        renderView(componentTView, componentView, componentView[CONTEXT]);
      }
      /**
       * Syncs an LView instance with its blueprint if they have gotten out of sync.
       *
       * Typically, blueprints and their view instances should always be in sync, so the loop here
       * will be skipped. However, consider this case of two components side-by-side:
       *
       * App template:
       * ```
       * <comp></comp>
       * <comp></comp>
       * ```
       *
       * The following will happen:
       * 1. App template begins processing.
       * 2. First <comp> is matched as a component and its LView is created.
       * 3. Second <comp> is matched as a component and its LView is created.
       * 4. App template completes processing, so it's time to check child templates.
       * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.
       * 6. Second <comp> template is checked. Its blueprint has been updated by the first
       * <comp> template, but its LView was created before this update, so it is out of sync.
       *
       * Note that embedded views inside ngFor loops will never be out of sync because these views
       * are processed as soon as they are created.
       *
       * @param tView The `TView` that contains the blueprint for syncing
       * @param lView The view to sync
       */


      function syncViewWithBlueprint(tView, lView) {
        for (var i = lView.length; i < tView.blueprint.length; i++) {
          lView.push(tView.blueprint[i]);
        }
      }
      /**
       * Adds LView or LContainer to the end of the current view tree.
       *
       * This structure will be used to traverse through nested views to remove listeners
       * and call onDestroy callbacks.
       *
       * @param lView The view where LView or LContainer should be added
       * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header
       * @param lViewOrLContainer The LView or LContainer to add to the view tree
       * @returns The state passed in
       */


      function addToViewTree(lView, lViewOrLContainer) {
        // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer
        // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out
        // of order, the change detection will run out of order, as the act of retrieving the the
        // LContainer from the RNode is what adds it to the queue.
        if (lView[CHILD_HEAD]) {
          lView[CHILD_TAIL][NEXT] = lViewOrLContainer;
        } else {
          lView[CHILD_HEAD] = lViewOrLContainer;
        }

        lView[CHILD_TAIL] = lViewOrLContainer;
        return lViewOrLContainer;
      } ///////////////////////////////
      //// Change detection
      ///////////////////////////////

      /**
       * Marks current view and all ancestors dirty.
       *
       * Returns the root view because it is found as a byproduct of marking the view tree
       * dirty, and can be used by methods that consume markViewDirty() to easily schedule
       * change detection. Otherwise, such methods would need to traverse up the view tree
       * an additional time to get the root view and schedule a tick on it.
       *
       * @param lView The starting LView to mark dirty
       * @returns the root LView
       */


      function markViewDirty(lView) {
        while (lView) {
          lView[FLAGS] |= 64
          /* Dirty */
          ;
          var parent = getLViewParent(lView); // Stop traversing up as soon as you find a root view that wasn't attached to any container

          if (isRootView(lView) && !parent) {
            return lView;
          } // continue otherwise


          lView = parent;
        }

        return null;
      }
      /**
       * Used to schedule change detection on the whole application.
       *
       * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.
       * It is usually called indirectly by calling `markDirty` when the view needs to be
       * re-rendered.
       *
       * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple
       * `scheduleTick` requests. The scheduling function can be overridden in
       * `renderComponent`'s `scheduler` option.
       */


      function scheduleTick(rootContext, flags) {
        var nothingScheduled = rootContext.flags === 0
        /* Empty */
        ;

        if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) {
          // https://github.com/angular/angular/issues/39296
          // should only attach the flags when really scheduling a tick
          rootContext.flags |= flags;
          var res;
          rootContext.clean = new Promise(function (r) {
            return res = r;
          });
          rootContext.scheduler(function () {
            if (rootContext.flags & 1
            /* DetectChanges */
            ) {
              rootContext.flags &= ~1
              /* DetectChanges */
              ;
              tickRootContext(rootContext);
            }

            if (rootContext.flags & 2
            /* FlushPlayers */
            ) {
              rootContext.flags &= ~2
              /* FlushPlayers */
              ;
              var playerHandler = rootContext.playerHandler;

              if (playerHandler) {
                playerHandler.flushPlayers();
              }
            }

            rootContext.clean = _CLEAN_PROMISE;
            res(null);
          });
        }
      }

      function tickRootContext(rootContext) {
        for (var i = 0; i < rootContext.components.length; i++) {
          var rootComponent = rootContext.components[i];
          var lView = readPatchedLView(rootComponent);
          var tView = lView[TVIEW];
          renderComponentOrTemplate(tView, lView, tView.template, rootComponent);
        }
      }

      function detectChangesInternal(tView, lView, context) {
        var rendererFactory = lView[RENDERER_FACTORY];
        if (rendererFactory.begin) rendererFactory.begin();

        try {
          refreshView(tView, lView, tView.template, context);
        } catch (error) {
          handleError(lView, error);
          throw error;
        } finally {
          if (rendererFactory.end) rendererFactory.end();
        }
      }
      /**
       * Synchronously perform change detection on a root view and its components.
       *
       * @param lView The view which the change detection should be performed on.
       */


      function detectChangesInRootView(lView) {
        tickRootContext(lView[CONTEXT]);
      }

      function checkNoChangesInternal(tView, view, context) {
        setIsInCheckNoChangesMode(true);

        try {
          detectChangesInternal(tView, view, context);
        } finally {
          setIsInCheckNoChangesMode(false);
        }
      }
      /**
       * Checks the change detector on a root view and its components, and throws if any changes are
       * detected.
       *
       * This is used in development mode to verify that running change detection doesn't
       * introduce other changes.
       *
       * @param lView The view which the change detection should be checked on.
       */


      function checkNoChangesInRootView(lView) {
        setIsInCheckNoChangesMode(true);

        try {
          detectChangesInRootView(lView);
        } finally {
          setIsInCheckNoChangesMode(false);
        }
      }

      function executeViewQueryFn(flags, viewQueryFn, component) {
        ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');
        setCurrentQueryIndex(0);
        viewQueryFn(flags, component);
      } ///////////////////////////////
      //// Bindings & interpolations
      ///////////////////////////////

      /**
       * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`.
       *
       * In order to support TestBed's `DebugElement.properties` we need to save, for each binding:
       * - a bound property name;
       * - a static parts of interpolated strings;
       *
       * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a
       * property binding metadata will be stored in `TView.data` at the same index as a bound value in
       * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the
       * following format:
       * - `propertyName` for bound properties;
       * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for
       * interpolated properties.
       *
       * @param tData `TData` where meta-data will be saved;
       * @param tNode `TNode` that is a target of the binding;
       * @param propertyName bound property name;
       * @param bindingIndex binding index in `LView`
       * @param interpolationParts static interpolation parts (for property interpolations)
       */


      function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex) {
        // Binding meta-data are stored only the first time a given property instruction is processed.
        // Since we don't have a concept of the "first update pass" we need to check for presence of the
        // binding meta-data to decide if one should be stored (or if was stored already).
        if (tData[bindingIndex] === null) {
          if (tNode.inputs == null || !tNode.inputs[propertyName]) {
            var propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);
            propBindingIdxs.push(bindingIndex);
            var bindingMetadata = propertyName;

            for (var _len41 = arguments.length, interpolationParts = new Array(_len41 > 4 ? _len41 - 4 : 0), _key42 = 4; _key42 < _len41; _key42++) {
              interpolationParts[_key42 - 4] = arguments[_key42];
            }

            if (interpolationParts.length > 0) {
              bindingMetadata += INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);
            }

            tData[bindingIndex] = bindingMetadata;
          }
        }
      }

      var CLEAN_PROMISE = _CLEAN_PROMISE;

      function getOrCreateLViewCleanup(view) {
        // top level variables should not be exported for performance reasons (PERF_NOTES.md)
        return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new LCleanup() : []);
      }

      function getOrCreateTViewCleanup(tView) {
        return tView.cleanup || (tView.cleanup = ngDevMode ? new TCleanup() : []);
      }
      /**
       * There are cases where the sub component's renderer needs to be included
       * instead of the current renderer (see the componentSyntheticHost* instructions).
       */


      function loadComponentRenderer(currentDef, tNode, lView) {
        // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root
        // component (see packages/core/src/render3/component.ts). This is not consistent with the process
        // of creating inner components, when current directive index is available in the state. In order
        // to avoid relying on current def being `null` (thus special-casing root component creation), the
        // process of creating root component should be unified with the process of creating inner
        // components.
        if (currentDef === null || isComponentDef(currentDef)) {
          lView = unwrapLView(lView[tNode.index]);
        }

        return lView[RENDERER];
      }
      /** Handles an error thrown in an LView. */


      function handleError(lView, error) {
        var injector = lView[INJECTOR];
        var errorHandler = injector ? injector.get(ErrorHandler, null) : null;
        errorHandler && errorHandler.handleError(error);
      }
      /**
       * Set the inputs of directives at the current node to corresponding value.
       *
       * @param tView The current TView
       * @param lView the `LView` which contains the directives.
       * @param inputs mapping between the public "input" name and privately-known,
       *        possibly minified, property names to write to.
       * @param value Value to set.
       */


      function setInputsForProperty(tView, lView, inputs, publicName, value) {
        for (var i = 0; i < inputs.length;) {
          var index = inputs[i++];
          var privateName = inputs[i++];
          var instance = lView[index];
          ngDevMode && assertIndexInRange(lView, index);
          var def = tView.data[index];

          if (def.setInput !== null) {
            def.setInput(instance, value, publicName, privateName);
          } else {
            instance[privateName] = value;
          }
        }
      }
      /**
       * Updates a text binding at a given index in a given LView.
       */


      function textBindingInternal(lView, index, value) {
        ngDevMode && assertString(value, 'Value should be a string');
        ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE');
        ngDevMode && assertIndexInRange(lView, index);
        var element = getNativeByIndex(index, lView);
        ngDevMode && assertDefined(element, 'native element should exist');
        updateTextNode(lView[RENDERER], element, value);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Compute the static styling (class/style) from `TAttributes`.
       *
       * This function should be called during `firstCreatePass` only.
       *
       * @param tNode The `TNode` into which the styling information should be loaded.
       * @param attrs `TAttributes` containing the styling information.
       * @param writeToHost Where should the resulting static styles be written?
       *   - `false` Write to `TNode.stylesWithoutHost` / `TNode.classesWithoutHost`
       *   - `true` Write to `TNode.styles` / `TNode.classes`
       */


      function computeStaticStyling(tNode, attrs, writeToHost) {
        ngDevMode && assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only');
        var styles = writeToHost ? tNode.styles : null;
        var classes = writeToHost ? tNode.classes : null;
        var mode = 0;

        if (attrs !== null) {
          for (var i = 0; i < attrs.length; i++) {
            var value = attrs[i];

            if (typeof value === 'number') {
              mode = value;
            } else if (mode == 1
            /* Classes */
            ) {
              classes = concatStringsWithSpace(classes, value);
            } else if (mode == 2
            /* Styles */
            ) {
              var style = value;
              var styleValue = attrs[++i];
              styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';');
            }
          }
        }

        writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles;
        writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Synchronously perform change detection on a component (and possibly its sub-components).
       *
       * This function triggers change detection in a synchronous way on a component.
       *
       * @param component The component which the change detection should be performed on.
       */


      function detectChanges(component) {
        var view = getComponentViewByInstance(component);
        detectChangesInternal(view[TVIEW], view, component);
      }
      /**
       * Marks the component as dirty (needing change detection). Marking a component dirty will
       * schedule a change detection on it at some point in the future.
       *
       * Marking an already dirty component as dirty won't do anything. Only one outstanding change
       * detection can be scheduled per component tree.
       *
       * @param component Component to mark as dirty.
       */


      function markDirty(component) {
        ngDevMode && assertDefined(component, 'component');
        var rootView = markViewDirty(getComponentViewByInstance(component));
        ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined');
        scheduleTick(rootView[CONTEXT], 1
        /* DetectChanges */
        );
      }
      /**
       * Used to perform change detection on the whole application.
       *
       * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick`
       * executes lifecycle hooks and conditionally checks components based on their
       * `ChangeDetectionStrategy` and dirtiness.
       *
       * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally
       * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a
       * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can
       * be changed when calling `renderComponent` and providing the `scheduler` option.
       */


      function tick(component) {
        var rootView = getRootView(component);
        var rootContext = rootView[CONTEXT];
        tickRootContext(rootContext);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.
       *
       * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a
       * project.
       *
       * @publicApi
       */


      var INJECTOR$1 = new InjectionToken('INJECTOR', // Dissable tslint because this is const enum which gets inlined not top level prop access.
      // tslint:disable-next-line: no-toplevel-property-access
      -1
      /* Injector */
      );
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var NullInjector = /*#__PURE__*/function () {
        function NullInjector() {
          _classCallCheck(this, NullInjector);
        }

        _createClass2(NullInjector, [{
          key: "get",
          value: function get(token) {
            var notFoundValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : THROW_IF_NOT_FOUND;

            if (notFoundValue === THROW_IF_NOT_FOUND) {
              var error = new Error("NullInjectorError: No provider for ".concat(stringify(token), "!"));
              error.name = 'NullInjectorError';
              throw error;
            }

            return notFoundValue;
          }
        }]);

        return NullInjector;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * An internal token whose presence in an injector indicates that the injector should treat itself
       * as a root scoped injector when processing requests for unknown tokens which may indicate
       * they are provided in the root scope.
       */


      var INJECTOR_SCOPE = new InjectionToken('Set Injector scope.');
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Marker which indicates that a value has not yet been created from the factory function.
       */

      var NOT_YET = {};
      /**
       * Marker which indicates that the factory function for a token is in the process of being called.
       *
       * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates
       * injection of a dependency has recursively attempted to inject the original token, and there is
       * a circular dependency among the providers.
       */

      var CIRCULAR = {};
      var EMPTY_ARRAY$1 = [];
      /**
       * A lazily initialized NullInjector.
       */

      var NULL_INJECTOR = undefined;

      function getNullInjector() {
        if (NULL_INJECTOR === undefined) {
          NULL_INJECTOR = new NullInjector();
        }

        return NULL_INJECTOR;
      }
      /**
       * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
       *
       * @publicApi
       */


      function createInjector(defType) {
        var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
        var additionalProviders = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
        var name = arguments.length > 3 ? arguments[3] : undefined;
        var injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);

        injector._resolveInjectorDefTypes();

        return injector;
      }
      /**
       * Creates a new injector without eagerly resolving its injector types. Can be used in places
       * where resolving the injector types immediately can lead to an infinite loop. The injector types
       * should be resolved at a later point by calling `_resolveInjectorDefTypes`.
       */


      function createInjectorWithoutInjectorInstances(defType) {
        var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
        var additionalProviders = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
        var name = arguments.length > 3 ? arguments[3] : undefined;
        return new R3Injector(defType, additionalProviders, parent || getNullInjector(), name);
      }

      var R3Injector = /*#__PURE__*/function () {
        function R3Injector(def, additionalProviders, parent) {
          var _this467 = this;

          var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;

          _classCallCheck(this, R3Injector);

          this.parent = parent;
          /**
           * Map of tokens to records which contain the instances of those tokens.
           * - `null` value implies that we don't have the record. Used by tree-shakable injectors
           * to prevent further searches.
           */

          this.records = new Map();
          /**
           * The transitive set of `InjectorType`s which define this injector.
           */

          this.injectorDefTypes = new Set();
          /**
           * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
           */

          this.onDestroy = new Set();
          this._destroyed = false;
          var dedupStack = []; // Start off by creating Records for every provider declared in every InjectorType
          // included transitively in additional providers then do the same for `def`. This order is
          // important because `def` may include providers that override ones in additionalProviders.

          additionalProviders && deepForEach(additionalProviders, function (provider) {
            return _this467.processProvider(provider, def, additionalProviders);
          });
          deepForEach([def], function (injectorDef) {
            return _this467.processInjectorType(injectorDef, [], dedupStack);
          }); // Make sure the INJECTOR token provides this injector.

          this.records.set(INJECTOR$1, makeRecord(undefined, this)); // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide
          // any injectable scoped to APP_ROOT_SCOPE.

          var record = this.records.get(INJECTOR_SCOPE);
          this.scope = record != null ? record.value : null; // Source name, used for debugging

          this.source = source || (typeof def === 'object' ? null : stringify(def));
        }
        /**
         * Flag indicating that this injector was previously destroyed.
         */


        _createClass2(R3Injector, [{
          key: "destroyed",
          get: function get() {
            return this._destroyed;
          }
          /**
           * Destroy the injector and release references to every instance or provider associated with it.
           *
           * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
           * hook was found.
           */

        }, {
          key: "destroy",
          value: function destroy() {
            this.assertNotDestroyed(); // Set destroyed = true first, in case lifecycle hooks re-enter destroy().

            this._destroyed = true;

            try {
              // Call all the lifecycle hooks.
              this.onDestroy.forEach(function (service) {
                return service.ngOnDestroy();
              });
            } finally {
              // Release all references.
              this.records.clear();
              this.onDestroy.clear();
              this.injectorDefTypes.clear();
            }
          }
        }, {
          key: "get",
          value: function get(token) {
            var notFoundValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : THROW_IF_NOT_FOUND;
            var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : InjectFlags.Default;
            this.assertNotDestroyed(); // Set the injection context.

            var previousInjector = setCurrentInjector(this);

            try {
              // Check for the SkipSelf flag.
              if (!(flags & InjectFlags.SkipSelf)) {
                // SkipSelf isn't set, check if the record belongs to this injector.
                var record = this.records.get(token);

                if (record === undefined) {
                  // No record, but maybe the token is scoped to this injector. Look for an injectable
                  // def with a scope matching this injector.
                  var def = couldBeInjectableType(token) && getInjectableDef(token);

                  if (def && this.injectableDefInScope(def)) {
                    // Found an injectable def and it's scoped to this injector. Pretend as if it was here
                    // all along.
                    record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);
                  } else {
                    record = null;
                  }

                  this.records.set(token, record);
                } // If a record was found, get the instance for it and return it.


                if (record != null
                /* NOT null || undefined */
                ) {
                  return this.hydrate(token, record);
                }
              } // Select the next injector based on the Self flag - if self is set, the next injector is
              // the NullInjector, otherwise it's the parent.


              var nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector(); // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue
              // is undefined, the value is null, otherwise it's the notFoundValue.

              notFoundValue = flags & InjectFlags.Optional && notFoundValue === THROW_IF_NOT_FOUND ? null : notFoundValue;
              return nextInjector.get(token, notFoundValue);
            } catch (e) {
              if (e.name === 'NullInjectorError') {
                var path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];
                path.unshift(stringify(token));

                if (previousInjector) {
                  // We still have a parent injector, keep throwing
                  throw e;
                } else {
                  // Format & throw the final error message when we don't have any previous injector
                  return catchInjectorError(e, token, 'R3InjectorError', this.source);
                }
              } else {
                throw e;
              }
            } finally {
              // Lastly, clean up the state by restoring the previous injector.
              setCurrentInjector(previousInjector);
            }
          }
          /** @internal */

        }, {
          key: "_resolveInjectorDefTypes",
          value: function _resolveInjectorDefTypes() {
            var _this468 = this;

            this.injectorDefTypes.forEach(function (defType) {
              return _this468.get(defType);
            });
          }
        }, {
          key: "toString",
          value: function toString() {
            var tokens = [],
                records = this.records;
            records.forEach(function (v, token) {
              return tokens.push(stringify(token));
            });
            return "R3Injector[".concat(tokens.join(', '), "]");
          }
        }, {
          key: "assertNotDestroyed",
          value: function assertNotDestroyed() {
            if (this._destroyed) {
              throw new Error('Injector has already been destroyed.');
            }
          }
          /**
           * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers
           * to this injector.
           *
           * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,
           * the function will return "true" to indicate that the providers of the type definition need
           * to be processed. This allows us to process providers of injector types after all imports of
           * an injector definition are processed. (following View Engine semantics: see FW-1349)
           */

        }, {
          key: "processInjectorType",
          value: function processInjectorType(defOrWrappedDef, parents, dedupStack) {
            var _this469 = this;

            defOrWrappedDef = resolveForwardRef(defOrWrappedDef);
            if (!defOrWrappedDef) return false; // Either the defOrWrappedDef is an InjectorType (with injector def) or an
            // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic
            // read, so care is taken to only do the read once.
            // First attempt to read the injector def (`ɵinj`).

            var def = getInjectorDef(defOrWrappedDef); // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.

            var ngModule = def == null && defOrWrappedDef.ngModule || undefined; // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,
            // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type
            // is the `ngModule`.

            var defType = ngModule === undefined ? defOrWrappedDef : ngModule; // Check for circular dependencies.

            if (ngDevMode && parents.indexOf(defType) !== -1) {
              var defName = stringify(defType);
              var path = parents.map(stringify);
              throwCyclicDependencyError(defName, path);
            } // Check for multiple imports of the same module


            var isDuplicate = dedupStack.indexOf(defType) !== -1; // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual
            // `InjectorDef` is on its `ngModule`.

            if (ngModule !== undefined) {
              def = getInjectorDef(ngModule);
            } // If no definition was found, it might be from exports. Remove it.


            if (def == null) {
              return false;
            } // Add providers in the same way that @NgModule resolution did:
            // First, include providers from any imports.


            if (def.imports != null && !isDuplicate) {
              // Before processing defType's imports, add it to the set of parents. This way, if it ends
              // up deeply importing itself, this can be detected.
              ngDevMode && parents.push(defType); // Add it to the set of dedups. This way we can detect multiple imports of the same module

              dedupStack.push(defType);
              var importTypesWithProviders;

              try {
                deepForEach(def.imports, function (imported) {
                  if (_this469.processInjectorType(imported, parents, dedupStack)) {
                    if (importTypesWithProviders === undefined) importTypesWithProviders = []; // If the processed import is an injector type with providers, we store it in the
                    // list of import types with providers, so that we can process those afterwards.

                    importTypesWithProviders.push(imported);
                  }
                });
              } finally {
                // Remove it from the parents set when finished.
                ngDevMode && parents.pop();
              } // Imports which are declared with providers (TypeWithProviders) need to be processed
              // after all imported modules are processed. This is similar to how View Engine
              // processes/merges module imports in the metadata resolver. See: FW-1349.


              if (importTypesWithProviders !== undefined) {
                var _loop6 = function _loop6(i) {
                  var _importTypesWithProvi = importTypesWithProviders[i],
                      ngModule = _importTypesWithProvi.ngModule,
                      providers = _importTypesWithProvi.providers;
                  deepForEach(providers, function (provider) {
                    return _this469.processProvider(provider, ngModule, providers || EMPTY_ARRAY$1);
                  });
                };

                for (var i = 0; i < importTypesWithProviders.length; i++) {
                  _loop6(i);
                }
              }
            } // Track the InjectorType and add a provider for it. It's important that this is done after the
            // def's imports.


            this.injectorDefTypes.add(defType);
            this.records.set(defType, makeRecord(def.factory, NOT_YET)); // Next, include providers listed on the definition itself.

            var defProviders = def.providers;

            if (defProviders != null && !isDuplicate) {
              var injectorType = defOrWrappedDef;
              deepForEach(defProviders, function (provider) {
                return _this469.processProvider(provider, injectorType, defProviders);
              });
            }

            return ngModule !== undefined && defOrWrappedDef.providers !== undefined;
          }
          /**
           * Process a `SingleProvider` and add it.
           */

        }, {
          key: "processProvider",
          value: function processProvider(provider, ngModuleType, providers) {
            // Determine the token from the provider. Either it's its own token, or has a {provide: ...}
            // property.
            provider = resolveForwardRef(provider);
            var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide); // Construct a `Record` for the provider.

            var record = providerToRecord(provider, ngModuleType, providers);

            if (!isTypeProvider(provider) && provider.multi === true) {
              // If the provider indicates that it's a multi-provider, process it specially.
              // First check whether it's been defined already.
              var multiRecord = this.records.get(token);

              if (multiRecord) {
                // It has. Throw a nice error if
                if (ngDevMode && multiRecord.multi === undefined) {
                  throwMixedMultiProviderError();
                }
              } else {
                multiRecord = makeRecord(undefined, NOT_YET, true);

                multiRecord.factory = function () {
                  return injectArgs(multiRecord.multi);
                };

                this.records.set(token, multiRecord);
              }

              token = provider;
              multiRecord.multi.push(provider);
            } else {
              var existing = this.records.get(token);

              if (ngDevMode && existing && existing.multi !== undefined) {
                throwMixedMultiProviderError();
              }
            }

            this.records.set(token, record);
          }
        }, {
          key: "hydrate",
          value: function hydrate(token, record) {
            if (ngDevMode && record.value === CIRCULAR) {
              throwCyclicDependencyError(stringify(token));
            } else if (record.value === NOT_YET) {
              record.value = CIRCULAR;
              record.value = record.factory();
            }

            if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {
              this.onDestroy.add(record.value);
            }

            return record.value;
          }
        }, {
          key: "injectableDefInScope",
          value: function injectableDefInScope(def) {
            if (!def.providedIn) {
              return false;
            } else if (typeof def.providedIn === 'string') {
              return def.providedIn === 'any' || def.providedIn === this.scope;
            } else {
              return this.injectorDefTypes.has(def.providedIn);
            }
          }
        }]);

        return R3Injector;
      }();

      function injectableDefOrInjectorDefFactory(token) {
        // Most tokens will have an injectable def directly on them, which specifies a factory directly.
        var injectableDef = getInjectableDef(token);
        var factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);

        if (factory !== null) {
          return factory;
        } // If the token is an NgModule, it's also injectable but the factory is on its injector def
        // (`ɵinj`)


        var injectorDef = getInjectorDef(token);

        if (injectorDef !== null) {
          return injectorDef.factory;
        } // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.
        // If it's missing that, it's an error.


        if (token instanceof InjectionToken) {
          throw new Error("Token ".concat(stringify(token), " is missing a \u0275prov definition."));
        } // Undecorated types can sometimes be created if they have no constructor arguments.


        if (token instanceof Function) {
          return getUndecoratedInjectableFactory(token);
        } // There was no way to resolve a factory for this token.


        throw new Error('unreachable');
      }

      function getUndecoratedInjectableFactory(token) {
        // If the token has parameters then it has dependencies that we cannot resolve implicitly.
        var paramLength = token.length;

        if (paramLength > 0) {
          var args = newArray(paramLength, '?');
          throw new Error("Can't resolve all parameters for ".concat(stringify(token), ": (").concat(args.join(', '), ")."));
        } // The constructor function appears to have no parameters.
        // This might be because it inherits from a super-class. In which case, use an injectable
        // def from an ancestor if there is one.
        // Otherwise this really is a simple class with no dependencies, so return a factory that
        // just instantiates the zero-arg constructor.


        var inheritedInjectableDef = getInheritedInjectableDef(token);

        if (inheritedInjectableDef !== null) {
          return function () {
            return inheritedInjectableDef.factory(token);
          };
        } else {
          return function () {
            return new token();
          };
        }
      }

      function providerToRecord(provider, ngModuleType, providers) {
        if (isValueProvider(provider)) {
          return makeRecord(undefined, provider.useValue);
        } else {
          var factory = providerToFactory(provider, ngModuleType, providers);
          return makeRecord(factory, NOT_YET);
        }
      }
      /**
       * Converts a `SingleProvider` into a factory function.
       *
       * @param provider provider to convert to factory
       */


      function providerToFactory(provider, ngModuleType, providers) {
        var factory = undefined;

        if (isTypeProvider(provider)) {
          var unwrappedProvider = resolveForwardRef(provider);
          return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);
        } else {
          if (isValueProvider(provider)) {
            factory = function factory() {
              return resolveForwardRef(provider.useValue);
            };
          } else if (isFactoryProvider(provider)) {
            factory = function factory() {
              return provider.useFactory.apply(provider, _toConsumableArray(injectArgs(provider.deps || [])));
            };
          } else if (isExistingProvider(provider)) {
            factory = function factory() {
              return ɵɵinject(resolveForwardRef(provider.useExisting));
            };
          } else {
            var classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));

            if (ngDevMode && !classRef) {
              throwInvalidProviderError(ngModuleType, providers, provider);
            }

            if (hasDeps(provider)) {
              factory = function factory() {
                return _construct(classRef, _toConsumableArray(injectArgs(provider.deps)));
              };
            } else {
              return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);
            }
          }
        }

        return factory;
      }

      function makeRecord(factory, value) {
        var multi = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
        return {
          factory: factory,
          value: value,
          multi: multi ? [] : undefined
        };
      }

      function isValueProvider(value) {
        return value !== null && typeof value == 'object' && USE_VALUE in value;
      }

      function isExistingProvider(value) {
        return !!(value && value.useExisting);
      }

      function isFactoryProvider(value) {
        return !!(value && value.useFactory);
      }

      function isTypeProvider(value) {
        return typeof value === 'function';
      }

      function isClassProvider(value) {
        return !!value.useClass;
      }

      function hasDeps(value) {
        return !!value.deps;
      }

      function hasOnDestroy(value) {
        return value !== null && typeof value === 'object' && typeof value.ngOnDestroy === 'function';
      }

      function couldBeInjectableType(value) {
        return typeof value === 'function' || typeof value === 'object' && value instanceof InjectionToken;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function INJECTOR_IMPL__PRE_R3__(providers, parent, name) {
        return new StaticInjector(providers, parent, name);
      }

      function INJECTOR_IMPL__POST_R3__(providers, parent, name) {
        return createInjector({
          name: name
        }, parent, providers, name);
      }

      var INJECTOR_IMPL = INJECTOR_IMPL__POST_R3__;
      /**
       * Concrete injectors implement this interface. Injectors are configured
       * with [providers](guide/glossary#provider) that associate
       * dependencies of various types with [injection tokens](guide/glossary#di-token).
       *
       * @see ["DI Providers"](guide/dependency-injection-providers).
       * @see `StaticProvider`
       *
       * @usageNotes
       *
       *  The following example creates a service injector instance.
       *
       * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
       *
       * ### Usage example
       *
       * {@example core/di/ts/injector_spec.ts region='Injector'}
       *
       * `Injector` returns itself when given `Injector` as a token:
       *
       * {@example core/di/ts/injector_spec.ts region='injectInjector'}
       *
       * @publicApi
       */

      var Injector = /*#__PURE__*/function () {
        function Injector() {
          _classCallCheck(this, Injector);
        }

        _createClass2(Injector, null, [{
          key: "create",
          value: function create(options, parent) {
            if (Array.isArray(options)) {
              return INJECTOR_IMPL(options, parent, '');
            } else {
              return INJECTOR_IMPL(options.providers, options.parent, options.name || '');
            }
          }
        }]);

        return Injector;
      }();

      Injector.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;
      Injector.NULL = new NullInjector();
      /** @nocollapse */

      Injector.ɵprov = ɵɵdefineInjectable({
        token: Injector,
        providedIn: 'any',
        factory: function factory() {
          return ɵɵinject(INJECTOR$1);
        }
      });
      /**
       * @internal
       * @nocollapse
       */

      Injector.__NG_ELEMENT_ID__ = -1
      /* Injector */
      ;

      var IDENT = function IDENT(value) {
        return value;
      };

      var ɵ0$6 = IDENT;
      var EMPTY = [];
      var CIRCULAR$1 = IDENT;

      var MULTI_PROVIDER_FN = function MULTI_PROVIDER_FN() {
        return Array.prototype.slice.call(arguments);
      };

      var ɵ1$1 = MULTI_PROVIDER_FN;
      var NO_NEW_LINE$1 = 'ɵ';

      var StaticInjector = /*#__PURE__*/function () {
        function StaticInjector(providers) {
          var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Injector.NULL;
          var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

          _classCallCheck(this, StaticInjector);

          this.parent = parent;
          this.source = source;
          var records = this._records = new Map();
          records.set(Injector, {
            token: Injector,
            fn: IDENT,
            deps: EMPTY,
            value: this,
            useNew: false
          });
          records.set(INJECTOR$1, {
            token: INJECTOR$1,
            fn: IDENT,
            deps: EMPTY,
            value: this,
            useNew: false
          });
          this.scope = recursivelyProcessProviders(records, providers);
        }

        _createClass2(StaticInjector, [{
          key: "get",
          value: function get(token, notFoundValue) {
            var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : InjectFlags.Default;
            var records = this._records;
            var record = records.get(token);

            if (record === undefined) {
              // This means we have never seen this record, see if it is tree shakable provider.
              var injectableDef = getInjectableDef(token);

              if (injectableDef) {
                var providedIn = injectableDef && injectableDef.providedIn;

                if (providedIn === 'any' || providedIn != null && providedIn === this.scope) {
                  records.set(token, record = resolveProvider({
                    provide: token,
                    useFactory: injectableDef.factory,
                    deps: EMPTY
                  }));
                }
              }

              if (record === undefined) {
                // Set record to null to make sure that we don't go through expensive lookup above again.
                records.set(token, null);
              }
            }

            var lastInjector = setCurrentInjector(this);

            try {
              return tryResolveToken(token, record, records, this.parent, notFoundValue, flags);
            } catch (e) {
              return catchInjectorError(e, token, 'StaticInjectorError', this.source);
            } finally {
              setCurrentInjector(lastInjector);
            }
          }
        }, {
          key: "toString",
          value: function toString() {
            var tokens = [],
                records = this._records;
            records.forEach(function (v, token) {
              return tokens.push(stringify(token));
            });
            return "StaticInjector[".concat(tokens.join(', '), "]");
          }
        }]);

        return StaticInjector;
      }();

      function resolveProvider(provider) {
        var deps = computeDeps(provider);
        var fn = IDENT;
        var value = EMPTY;
        var useNew = false;
        var provide = resolveForwardRef(provider.provide);

        if (USE_VALUE in provider) {
          // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined.
          value = provider.useValue;
        } else if (provider.useFactory) {
          fn = provider.useFactory;
        } else if (provider.useExisting) {// Just use IDENT
        } else if (provider.useClass) {
          useNew = true;
          fn = resolveForwardRef(provider.useClass);
        } else if (typeof provide == 'function') {
          useNew = true;
          fn = provide;
        } else {
          throw staticError('StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable', provider);
        }

        return {
          deps: deps,
          fn: fn,
          useNew: useNew,
          value: value
        };
      }

      function multiProviderMixError(token) {
        return staticError('Cannot mix multi providers and regular providers', token);
      }

      function recursivelyProcessProviders(records, provider) {
        var scope = null;

        if (provider) {
          provider = resolveForwardRef(provider);

          if (Array.isArray(provider)) {
            // if we have an array recurse into the array
            for (var i = 0; i < provider.length; i++) {
              scope = recursivelyProcessProviders(records, provider[i]) || scope;
            }
          } else if (typeof provider === 'function') {
            // Functions were supported in ReflectiveInjector, but are not here. For safety give useful
            // error messages
            throw staticError('Function/Class not supported', provider);
          } else if (provider && typeof provider === 'object' && provider.provide) {
            // At this point we have what looks like a provider: {provide: ?, ....}
            var token = resolveForwardRef(provider.provide);
            var resolvedProvider = resolveProvider(provider);

            if (provider.multi === true) {
              // This is a multi provider.
              var multiProvider = records.get(token);

              if (multiProvider) {
                if (multiProvider.fn !== MULTI_PROVIDER_FN) {
                  throw multiProviderMixError(token);
                }
              } else {
                // Create a placeholder factory which will look up the constituents of the multi provider.
                records.set(token, multiProvider = {
                  token: provider.provide,
                  deps: [],
                  useNew: false,
                  fn: MULTI_PROVIDER_FN,
                  value: EMPTY
                });
              } // Treat the provider as the token.


              token = provider;
              multiProvider.deps.push({
                token: token,
                options: 6
                /* Default */

              });
            }

            var record = records.get(token);

            if (record && record.fn == MULTI_PROVIDER_FN) {
              throw multiProviderMixError(token);
            }

            if (token === INJECTOR_SCOPE) {
              scope = resolvedProvider.value;
            }

            records.set(token, resolvedProvider);
          } else {
            throw staticError('Unexpected provider', provider);
          }
        }

        return scope;
      }

      function tryResolveToken(token, record, records, parent, notFoundValue, flags) {
        try {
          return resolveToken(token, record, records, parent, notFoundValue, flags);
        } catch (e) {
          // ensure that 'e' is of type Error.
          if (!(e instanceof Error)) {
            e = new Error(e);
          }

          var path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];
          path.unshift(token);

          if (record && record.value == CIRCULAR$1) {
            // Reset the Circular flag.
            record.value = EMPTY;
          }

          throw e;
        }
      }

      function resolveToken(token, record, records, parent, notFoundValue, flags) {
        var value;

        if (record && !(flags & InjectFlags.SkipSelf)) {
          // If we don't have a record, this implies that we don't own the provider hence don't know how
          // to resolve it.
          value = record.value;

          if (value == CIRCULAR$1) {
            throw Error(NO_NEW_LINE$1 + 'Circular dependency');
          } else if (value === EMPTY) {
            record.value = CIRCULAR$1;
            var obj = undefined;
            var useNew = record.useNew;
            var fn = record.fn;
            var depRecords = record.deps;
            var deps = EMPTY;

            if (depRecords.length) {
              deps = [];

              for (var i = 0; i < depRecords.length; i++) {
                var depRecord = depRecords[i];
                var options = depRecord.options;
                var childRecord = options & 2
                /* CheckSelf */
                ? records.get(depRecord.token) : undefined;
                deps.push(tryResolveToken( // Current Token to resolve
                depRecord.token, // A record which describes how to resolve the token.
                // If undefined, this means we don't have such a record
                childRecord, // Other records we know about.
                records, // If we don't know how to resolve dependency and we should not check parent for it,
                // than pass in Null injector.
                !childRecord && !(options & 4
                /* CheckParent */
                ) ? Injector.NULL : parent, options & 1
                /* Optional */
                ? null : Injector.THROW_IF_NOT_FOUND, InjectFlags.Default));
              }
            }

            record.value = value = useNew ? _construct(fn, _toConsumableArray(deps)) : fn.apply(obj, deps);
          }
        } else if (!(flags & InjectFlags.Self)) {
          value = parent.get(token, notFoundValue, InjectFlags.Default);
        } else if (!(flags & InjectFlags.Optional)) {
          value = Injector.NULL.get(token, notFoundValue);
        } else {
          value = Injector.NULL.get(token, typeof notFoundValue !== 'undefined' ? notFoundValue : null);
        }

        return value;
      }

      function computeDeps(provider) {
        var deps = EMPTY;
        var providerDeps = provider.deps;

        if (providerDeps && providerDeps.length) {
          deps = [];

          for (var i = 0; i < providerDeps.length; i++) {
            var options = 6
            /* Default */
            ;
            var token = resolveForwardRef(providerDeps[i]);

            if (Array.isArray(token)) {
              for (var j = 0, annotations = token; j < annotations.length; j++) {
                var annotation = annotations[j];

                if (annotation instanceof Optional || annotation == Optional) {
                  options = options | 1
                  /* Optional */
                  ;
                } else if (annotation instanceof SkipSelf || annotation == SkipSelf) {
                  options = options & ~2
                  /* CheckSelf */
                  ;
                } else if (annotation instanceof Self || annotation == Self) {
                  options = options & ~4
                  /* CheckParent */
                  ;
                } else if (annotation instanceof Inject) {
                  token = annotation.token;
                } else {
                  token = resolveForwardRef(annotation);
                }
              }
            }

            deps.push({
              token: token,
              options: options
            });
          }
        } else if (provider.useExisting) {
          var _token = resolveForwardRef(provider.useExisting);

          deps = [{
            token: _token,
            options: 6
            /* Default */

          }];
        } else if (!providerDeps && !(USE_VALUE in provider)) {
          // useValue & useExisting are the only ones which are exempt from deps all others need it.
          throw staticError('\'deps\' required', provider);
        }

        return deps;
      }

      function staticError(text, obj) {
        return new Error(formatError(text, obj, 'StaticInjectorError'));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Retrieves the component instance associated with a given DOM element.
       *
       * @usageNotes
       * Given the following DOM structure:
       * ```html
       * <my-app>
       *   <div>
       *     <child-comp></child-comp>
       *   </div>
       * </my-app>
       * ```
       * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent`
       * associated with this DOM element.
       *
       * Calling the function on `<my-app>` will return the `MyApp` instance.
       *
       *
       * @param element DOM element from which the component should be retrieved.
       * @returns Component instance associated with the element or `null` if there
       *    is no component associated with it.
       *
       * @publicApi
       * @globalApi ng
       */


      function getComponent(element) {
        assertDomElement(element);
        var context = loadLContext(element, false);
        if (context === null) return null;

        if (context.component === undefined) {
          context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);
        }

        return context.component;
      }
      /**
       * If inside an embedded view (e.g. `*ngIf` or `*ngFor`), retrieves the context of the embedded
       * view that the element is part of. Otherwise retrieves the instance of the component whose view
       * owns the element (in this case, the result is the same as calling `getOwningComponent`).
       *
       * @param element Element for which to get the surrounding component instance.
       * @returns Instance of the component that is around the element or null if the element isn't
       *    inside any component.
       *
       * @publicApi
       * @globalApi ng
       */


      function getContext(element) {
        assertDomElement(element);
        var context = loadLContext(element, false);
        return context === null ? null : context.lView[CONTEXT];
      }
      /**
       * Retrieves the component instance whose view contains the DOM element.
       *
       * For example, if `<child-comp>` is used in the template of `<app-comp>`
       * (i.e. a `ViewChild` of `<app-comp>`), calling `getOwningComponent` on `<child-comp>`
       * would return `<app-comp>`.
       *
       * @param elementOrDir DOM element, component or directive instance
       *    for which to retrieve the root components.
       * @returns Component instance whose view owns the DOM element or null if the element is not
       *    part of a component view.
       *
       * @publicApi
       * @globalApi ng
       */


      function getOwningComponent(elementOrDir) {
        var context = loadLContext(elementOrDir, false);
        if (context === null) return null;
        var lView = context.lView;
        var parent;
        ngDevMode && assertLView(lView);

        while (lView[TVIEW].type === 2
        /* Embedded */
        && (parent = getLViewParent(lView))) {
          lView = parent;
        }

        return lView[FLAGS] & 512
        /* IsRoot */
        ? null : lView[CONTEXT];
      }
      /**
       * Retrieves all root components associated with a DOM element, directive or component instance.
       * Root components are those which have been bootstrapped by Angular.
       *
       * @param elementOrDir DOM element, component or directive instance
       *    for which to retrieve the root components.
       * @returns Root components associated with the target object.
       *
       * @publicApi
       * @globalApi ng
       */


      function getRootComponents(elementOrDir) {
        return _toConsumableArray(getRootContext(elementOrDir).components);
      }
      /**
       * Retrieves an `Injector` associated with an element, component or directive instance.
       *
       * @param elementOrDir DOM element, component or directive instance for which to
       *    retrieve the injector.
       * @returns Injector associated with the element, component or directive instance.
       *
       * @publicApi
       * @globalApi ng
       */


      function getInjector(elementOrDir) {
        var context = loadLContext(elementOrDir, false);
        if (context === null) return Injector.NULL;
        var tNode = context.lView[TVIEW].data[context.nodeIndex];
        return new NodeInjector(tNode, context.lView);
      }
      /**
       * Retrieve a set of injection tokens at a given DOM node.
       *
       * @param element Element for which the injection tokens should be retrieved.
       */


      function getInjectionTokens(element) {
        var context = loadLContext(element, false);
        if (context === null) return [];
        var lView = context.lView;
        var tView = lView[TVIEW];
        var tNode = tView.data[context.nodeIndex];
        var providerTokens = [];
        var startIndex = tNode.providerIndexes & 1048575
        /* ProvidersStartIndexMask */
        ;
        var endIndex = tNode.directiveEnd;

        for (var i = startIndex; i < endIndex; i++) {
          var value = tView.data[i];

          if (isDirectiveDefHack(value)) {
            // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a
            // design flaw.  We should always store same type so that we can be monomorphic. The issue
            // is that for Components/Directives we store the def instead the type. The correct behavior
            // is that we should always be storing injectable type in this location.
            value = value.type;
          }

          providerTokens.push(value);
        }

        return providerTokens;
      }
      /**
       * Retrieves directive instances associated with a given DOM element. Does not include
       * component instances.
       *
       * @usageNotes
       * Given the following DOM structure:
       * ```
       * <my-app>
       *   <button my-button></button>
       *   <my-comp></my-comp>
       * </my-app>
       * ```
       * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`
       * directive that is associated with the DOM element.
       *
       * Calling `getDirectives` on `<my-comp>` will return an empty array.
       *
       * @param element DOM element for which to get the directives.
       * @returns Array of directives associated with the element.
       *
       * @publicApi
       * @globalApi ng
       */


      function getDirectives(element) {
        var context = loadLContext(element);

        if (context.directives === undefined) {
          context.directives = getDirectivesAtNodeIndex(context.nodeIndex, context.lView, false);
        } // The `directives` in this case are a named array called `LComponentView`. Clone the
        // result so we don't expose an internal data structure in the user's console.


        return context.directives === null ? [] : _toConsumableArray(context.directives);
      }

      function loadLContext(target) {
        var throwOnNotFound = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
        var context = getLContext(target);

        if (!context && throwOnNotFound) {
          throw new Error(ngDevMode ? "Unable to find context associated with ".concat(stringifyForError(target)) : 'Invalid ng target');
        }

        return context;
      }
      /**
       * Retrieve map of local references.
       *
       * The references are retrieved as a map of local reference name to element or directive instance.
       *
       * @param target DOM element, component or directive instance for which to retrieve
       *    the local references.
       */


      function getLocalRefs(target) {
        var context = loadLContext(target, false);
        if (context === null) return {};

        if (context.localRefs === undefined) {
          context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);
        }

        return context.localRefs || {};
      }
      /**
       * Retrieves the host element of a component or directive instance.
       * The host element is the DOM element that matched the selector of the directive.
       *
       * @param componentOrDirective Component or directive instance for which the host
       *     element should be retrieved.
       * @returns Host element of the target.
       *
       * @publicApi
       * @globalApi ng
       */


      function getHostElement(componentOrDirective) {
        return getLContext(componentOrDirective)["native"];
      }
      /**
       * Retrieves the rendered text for a given component.
       *
       * This function retrieves the host element of a component and
       * and then returns the `textContent` for that element. This implies
       * that the text returned will include re-projected content of
       * the component as well.
       *
       * @param component The component to return the content text for.
       */


      function getRenderedText(component) {
        var hostElement = getHostElement(component);
        return hostElement.textContent || '';
      }

      function loadLContextFromNode(node) {
        if (!(node instanceof Node)) throw new Error('Expecting instance of DOM Element');
        return loadLContext(node);
      }
      /**
       * Retrieves a list of event listeners associated with a DOM element. The list does include host
       * listeners, but it does not include event listeners defined outside of the Angular context
       * (e.g. through `addEventListener`).
       *
       * @usageNotes
       * Given the following DOM structure:
       * ```
       * <my-app>
       *   <div (click)="doSomething()"></div>
       * </my-app>
       *
       * ```
       * Calling `getListeners` on `<div>` will return an object that looks as follows:
       * ```
       * {
       *   name: 'click',
       *   element: <div>,
       *   callback: () => doSomething(),
       *   useCapture: false
       * }
       * ```
       *
       * @param element Element for which the DOM listeners should be retrieved.
       * @returns Array of event listeners on the DOM element.
       *
       * @publicApi
       * @globalApi ng
       */


      function getListeners(element) {
        assertDomElement(element);
        var lContext = loadLContext(element, false);
        if (lContext === null) return [];
        var lView = lContext.lView;
        var tView = lView[TVIEW];
        var lCleanup = lView[CLEANUP];
        var tCleanup = tView.cleanup;
        var listeners = [];

        if (tCleanup && lCleanup) {
          for (var i = 0; i < tCleanup.length;) {
            var firstParam = tCleanup[i++];
            var secondParam = tCleanup[i++];

            if (typeof firstParam === 'string') {
              var name = firstParam;
              var listenerElement = unwrapRNode(lView[secondParam]);
              var callback = lCleanup[tCleanup[i++]];
              var useCaptureOrIndx = tCleanup[i++]; // if useCaptureOrIndx is boolean then report it as is.
              // if useCaptureOrIndx is positive number then it in unsubscribe method
              // if useCaptureOrIndx is negative number then it is a Subscription

              var type = typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0 ? 'dom' : 'output';
              var useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false;

              if (element == listenerElement) {
                listeners.push({
                  element: element,
                  name: name,
                  callback: callback,
                  useCapture: useCapture,
                  type: type
                });
              }
            }
          }
        }

        listeners.sort(sortListeners);
        return listeners;
      }

      function sortListeners(a, b) {
        if (a.name == b.name) return 0;
        return a.name < b.name ? -1 : 1;
      }
      /**
       * This function should not exist because it is megamorphic and only mostly correct.
       *
       * See call site for more info.
       */


      function isDirectiveDefHack(obj) {
        return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;
      }
      /**
       * Returns the attached `DebugNode` instance for an element in the DOM.
       *
       * @param element DOM element which is owned by an existing component's view.
       */


      function getDebugNode(element) {
        var debugNode = null;
        var lContext = loadLContextFromNode(element);
        var lView = lContext.lView;
        var nodeIndex = lContext.nodeIndex;

        if (nodeIndex !== -1) {
          var valueInLView = lView[nodeIndex]; // this means that value in the lView is a component with its own
          // data. In this situation the TNode is not accessed at the same spot.

          var tNode = isLView(valueInLView) ? valueInLView[T_HOST] : getTNode(lView[TVIEW], nodeIndex);
          ngDevMode && assertEqual(tNode.index, nodeIndex, 'Expecting that TNode at index is same as index');
          debugNode = buildDebugNode(tNode, lView);
        }

        return debugNode;
      }
      /**
       * Retrieve the component `LView` from component/element.
       *
       * NOTE: `LView` is a private and should not be leaked outside.
       *       Don't export this method to `ng.*` on window.
       *
       * @param target DOM element or component instance for which to retrieve the LView.
       */


      function getComponentLView(target) {
        var lContext = loadLContext(target);
        var nodeIndx = lContext.nodeIndex;
        var lView = lContext.lView;
        var componentLView = lView[nodeIndx];
        ngDevMode && assertLView(componentLView);
        return componentLView;
      }
      /** Asserts that a value is a DOM Element. */


      function assertDomElement(value) {
        if (typeof Element !== 'undefined' && !(value instanceof Element)) {
          throw new Error('Expecting instance of DOM Element');
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Marks a component for check (in case of OnPush components) and synchronously
       * performs change detection on the application this component belongs to.
       *
       * @param component Component to {@link ChangeDetectorRef#markForCheck mark for check}.
       *
       * @publicApi
       * @globalApi ng
       */


      function applyChanges(component) {
        markDirty(component);
        getRootComponents(component).forEach(function (rootComponent) {
          return detectChanges(rootComponent);
        });
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * This file introduces series of globally accessible debug tools
       * to allow for the Angular debugging story to function.
       *
       * To see this in action run the following command:
       *
       *   bazel run --config=ivy
       *   //packages/core/test/bundling/todo:devserver
       *
       *  Then load `localhost:5432` and start using the console tools.
       */

      /**
       * This value reflects the property on the window where the dev
       * tools are patched (window.ng).
       * */


      var GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';
      var _published = false;
      /**
       * Publishes a collection of default debug tools onto`window.ng`.
       *
       * These functions are available globally when Angular is in development
       * mode and are automatically stripped away from prod mode is on.
       */

      function publishDefaultGlobalUtils() {
        if (!_published) {
          _published = true;
          publishGlobalUtil('getComponent', getComponent);
          publishGlobalUtil('getContext', getContext);
          publishGlobalUtil('getListeners', getListeners);
          publishGlobalUtil('getOwningComponent', getOwningComponent);
          publishGlobalUtil('getHostElement', getHostElement);
          publishGlobalUtil('getInjector', getInjector);
          publishGlobalUtil('getRootComponents', getRootComponents);
          publishGlobalUtil('getDirectives', getDirectives);
          publishGlobalUtil('applyChanges', applyChanges);
        }
      }
      /**
       * Publishes the given function to `window.ng` so that it can be
       * used from the browser console when an application is not in production.
       */


      function publishGlobalUtil(name, fn) {
        if (typeof COMPILED === 'undefined' || !COMPILED) {
          // Note: we can't export `ng` when using closure enhanced optimization as:
          // - closure declares globals itself for minified names, which sometimes clobber our `ng` global
          // - we can't declare a closure extern as the namespace `ng` is already used within Google
          //   for typings for AngularJS (via `goog.provide('ng....')`).
          var w = _global;
          ngDevMode && assertDefined(fn, 'function not defined');

          if (w) {
            var container = w[GLOBAL_PUBLISH_EXPANDO_KEY];

            if (!container) {
              container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {};
            }

            container[name] = fn;
          }
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ɵ0$7 = function ɵ0$7(token, notFoundValue) {
        throwProviderNotFoundError(token, 'NullInjector');
      }; // TODO: A hack to not pull in the NullInjector from @angular/core.


      var NULL_INJECTOR$1 = {
        get: ɵ0$7
      };
      /**
       * Bootstraps a Component into an existing host element and returns an instance
       * of the component.
       *
       * Use this function to bootstrap a component into the DOM tree. Each invocation
       * of this function will create a separate tree of components, injectors and
       * change detection cycles and lifetimes. To dynamically insert a new component
       * into an existing tree such that it shares the same injection, change detection
       * and object lifetime, use {@link ViewContainer#createComponent}.
       *
       * @param componentType Component to bootstrap
       * @param options Optional parameters which control bootstrapping
       */

      function renderComponent$1(componentType
      /* Type as workaround for: Microsoft/TypeScript/issues/4881 */
      ) {
        var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
        ngDevMode && publishDefaultGlobalUtils();
        ngDevMode && assertComponentType(componentType);
        var rendererFactory = opts.rendererFactory || domRendererFactory3;
        var sanitizer = opts.sanitizer || null;
        var componentDef = getComponentDef(componentType);
        if (componentDef.type != componentType) componentDef.type = componentType; // The first index of the first selector is the tag name.

        var componentTag = componentDef.selectors[0][0];
        var hostRenderer = rendererFactory.createRenderer(null, null);
        var hostRNode = locateHostElement(hostRenderer, opts.host || componentTag, componentDef.encapsulation);
        var rootFlags = componentDef.onPush ? 64
        /* Dirty */
        | 512
        /* IsRoot */
        : 16
        /* CheckAlways */
        | 512
        /* IsRoot */
        ;
        var rootContext = createRootContext(opts.scheduler, opts.playerHandler);
        var renderer = rendererFactory.createRenderer(hostRNode, componentDef);
        var rootTView = createTView(0
        /* Root */
        , null, null, 1, 0, null, null, null, null, null);
        var rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null);
        enterView(rootView);
        var component;

        try {
          if (rendererFactory.begin) rendererFactory.begin();
          var componentView = createRootComponentView(hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer);
          component = createRootComponent(componentView, componentDef, rootView, rootContext, opts.hostFeatures || null); // create mode pass

          renderView(rootTView, rootView, null); // update mode pass

          refreshView(rootTView, rootView, null, null);
        } finally {
          leaveView();
          if (rendererFactory.end) rendererFactory.end();
        }

        return component;
      }
      /**
       * Creates the root component view and the root component node.
       *
       * @param rNode Render host element.
       * @param def ComponentDef
       * @param rootView The parent view where the host node is stored
       * @param rendererFactory Factory to be used for creating child renderers.
       * @param hostRenderer The current renderer
       * @param sanitizer The sanitizer, if provided
       *
       * @returns Component view created
       */


      function createRootComponentView(rNode, def, rootView, rendererFactory, hostRenderer, sanitizer) {
        var tView = rootView[TVIEW];
        var index = HEADER_OFFSET;
        ngDevMode && assertIndexInRange(rootView, index);
        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
        // the same time we want to communicate the the debug `TNode` that this is a special `TNode`
        // representing a host element.

        var tNode = getOrCreateTNode(tView, index, 2
        /* Element */
        , '#host', null);
        var mergedAttrs = tNode.mergedAttrs = def.hostAttrs;

        if (mergedAttrs !== null) {
          computeStaticStyling(tNode, mergedAttrs, true);

          if (rNode !== null) {
            setUpAttributes(hostRenderer, rNode, mergedAttrs);

            if (tNode.classes !== null) {
              writeDirectClass(hostRenderer, rNode, tNode.classes);
            }

            if (tNode.styles !== null) {
              writeDirectStyle(hostRenderer, rNode, tNode.styles);
            }
          }
        }

        var viewRenderer = rendererFactory.createRenderer(rNode, def);
        var componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64
        /* Dirty */
        : 16
        /* CheckAlways */
        , rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null);

        if (tView.firstCreatePass) {
          diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);
          markAsComponentHost(tView, tNode);
          initTNodeFlags(tNode, rootView.length, 1);
        }

        addToViewTree(rootView, componentView); // Store component view at node index, with node as the HOST

        return rootView[index] = componentView;
      }
      /**
       * Creates a root component and sets it up with features and host bindings. Shared by
       * renderComponent() and ViewContainerRef.createComponent().
       */


      function createRootComponent(componentView, componentDef, rootLView, rootContext, hostFeatures) {
        var tView = rootLView[TVIEW]; // Create directive instance with factory() and store at next index in viewData

        var component = instantiateRootComponent(tView, rootLView, componentDef);
        rootContext.components.push(component);
        componentView[CONTEXT] = component;
        hostFeatures && hostFeatures.forEach(function (feature) {
          return feature(component, componentDef);
        }); // We want to generate an empty QueryList for root content queries for backwards
        // compatibility with ViewEngine.

        if (componentDef.contentQueries) {
          var tNode = getCurrentTNode();
          ngDevMode && assertDefined(tNode, 'TNode expected');
          componentDef.contentQueries(1
          /* Create */
          , component, tNode.directiveStart);
        }

        var rootTNode = getCurrentTNode();
        ngDevMode && assertDefined(rootTNode, 'tNode should have been already created');

        if (tView.firstCreatePass && (componentDef.hostBindings !== null || componentDef.hostAttrs !== null)) {
          setSelectedIndex(rootTNode.index);
          var rootTView = rootLView[TVIEW];
          registerHostBindingOpCodes(rootTView, rootTNode, rootLView, rootTNode.directiveStart, rootTNode.directiveEnd, componentDef);
          invokeHostBindingsInCreationMode(componentDef, component);
        }

        return component;
      }

      function createRootContext(scheduler, playerHandler) {
        return {
          components: [],
          scheduler: scheduler || defaultScheduler,
          clean: CLEAN_PROMISE,
          playerHandler: playerHandler || null,
          flags: 0
          /* Empty */

        };
      }
      /**
       * Used to enable lifecycle hooks on the root component.
       *
       * Include this feature when calling `renderComponent` if the root component
       * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't
       * be called properly.
       *
       * Example:
       *
       * ```
       * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});
       * ```
       */


      function LifecycleHooksFeature(component, def) {
        var lView = readPatchedLView(component);
        ngDevMode && assertDefined(lView, 'LView is required');
        var tView = lView[TVIEW];
        var tNode = getCurrentTNode();
        ngDevMode && assertDefined(tNode, 'TNode is required');
        registerPostOrderHooks(tView, tNode);
      }
      /**
       * Wait on component until it is rendered.
       *
       * This function returns a `Promise` which is resolved when the component's
       * change detection is executed. This is determined by finding the scheduler
       * associated with the `component`'s render tree and waiting until the scheduler
       * flushes. If nothing is scheduled, the function returns a resolved promise.
       *
       * Example:
       * ```
       * await whenRendered(myComponent);
       * ```
       *
       * @param component Component to wait upon
       * @returns Promise which resolves when the component is rendered.
       */


      function whenRendered(component) {
        return getRootContext(component).clean;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function getSuperType(type) {
        return Object.getPrototypeOf(type.prototype).constructor;
      }
      /**
       * Merges the definition from a super class to a sub class.
       * @param definition The definition that is a SubClass of another directive of component
       *
       * @codeGenApi
       */


      function ɵɵInheritDefinitionFeature(definition) {
        var superType = getSuperType(definition.type);
        var shouldInheritFields = true;
        var inheritanceChain = [definition];

        while (superType) {
          var superDef = undefined;

          if (isComponentDef(definition)) {
            // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.
            superDef = superType.ɵcmp || superType.ɵdir;
          } else {
            if (superType.ɵcmp) {
              throw new Error('Directives cannot inherit Components');
            } // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.


            superDef = superType.ɵdir;
          }

          if (superDef) {
            if (shouldInheritFields) {
              inheritanceChain.push(superDef); // Some fields in the definition may be empty, if there were no values to put in them that
              // would've justified object creation. Unwrap them if necessary.

              var writeableDef = definition;
              writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);
              writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);
              writeableDef.outputs = maybeUnwrapEmpty(definition.outputs); // Merge hostBindings

              var superHostBindings = superDef.hostBindings;
              superHostBindings && inheritHostBindings(definition, superHostBindings); // Merge queries

              var superViewQuery = superDef.viewQuery;
              var superContentQueries = superDef.contentQueries;
              superViewQuery && inheritViewQuery(definition, superViewQuery);
              superContentQueries && inheritContentQueries(definition, superContentQueries); // Merge inputs and outputs

              fillProperties(definition.inputs, superDef.inputs);
              fillProperties(definition.declaredInputs, superDef.declaredInputs);
              fillProperties(definition.outputs, superDef.outputs); // Merge animations metadata.
              // If `superDef` is a Component, the `data` field is present (defaults to an empty object).

              if (isComponentDef(superDef) && superDef.data.animation) {
                // If super def is a Component, the `definition` is also a Component, since Directives can
                // not inherit Components (we throw an error above and cannot reach this code).
                var defData = definition.data;
                defData.animation = (defData.animation || []).concat(superDef.data.animation);
              }
            } // Run parent features


            var features = superDef.features;

            if (features) {
              for (var i = 0; i < features.length; i++) {
                var feature = features[i];

                if (feature && feature.ngInherit) {
                  feature(definition);
                } // If `InheritDefinitionFeature` is a part of the current `superDef`, it means that this
                // def already has all the necessary information inherited from its super class(es), so we
                // can stop merging fields from super classes. However we need to iterate through the
                // prototype chain to look for classes that might contain other "features" (like
                // NgOnChanges), which we should invoke for the original `definition`. We set the
                // `shouldInheritFields` flag to indicate that, essentially skipping fields inheritance
                // logic and only invoking functions from the "features" list.


                if (feature === ɵɵInheritDefinitionFeature) {
                  shouldInheritFields = false;
                }
              }
            }
          }

          superType = Object.getPrototypeOf(superType);
        }

        mergeHostAttrsAcrossInheritance(inheritanceChain);
      }
      /**
       * Merge the `hostAttrs` and `hostVars` from the inherited parent to the base class.
       *
       * @param inheritanceChain A list of `WritableDefs` starting at the top most type and listing
       * sub-types in order. For each type take the `hostAttrs` and `hostVars` and merge it with the child
       * type.
       */


      function mergeHostAttrsAcrossInheritance(inheritanceChain) {
        var hostVars = 0;
        var hostAttrs = null; // We process the inheritance order from the base to the leaves here.

        for (var i = inheritanceChain.length - 1; i >= 0; i--) {
          var def = inheritanceChain[i]; // For each `hostVars`, we need to add the superclass amount.

          def.hostVars = hostVars += def.hostVars; // for each `hostAttrs` we need to merge it with superclass.

          def.hostAttrs = mergeHostAttrs(def.hostAttrs, hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs));
        }
      }

      function maybeUnwrapEmpty(value) {
        if (value === EMPTY_OBJ) {
          return {};
        } else if (value === EMPTY_ARRAY) {
          return [];
        } else {
          return value;
        }
      }

      function inheritViewQuery(definition, superViewQuery) {
        var prevViewQuery = definition.viewQuery;

        if (prevViewQuery) {
          definition.viewQuery = function (rf, ctx) {
            superViewQuery(rf, ctx);
            prevViewQuery(rf, ctx);
          };
        } else {
          definition.viewQuery = superViewQuery;
        }
      }

      function inheritContentQueries(definition, superContentQueries) {
        var prevContentQueries = definition.contentQueries;

        if (prevContentQueries) {
          definition.contentQueries = function (rf, ctx, directiveIndex) {
            superContentQueries(rf, ctx, directiveIndex);
            prevContentQueries(rf, ctx, directiveIndex);
          };
        } else {
          definition.contentQueries = superContentQueries;
        }
      }

      function inheritHostBindings(definition, superHostBindings) {
        var prevHostBindings = definition.hostBindings;

        if (prevHostBindings) {
          definition.hostBindings = function (rf, ctx) {
            superHostBindings(rf, ctx);
            prevHostBindings(rf, ctx);
          };
        } else {
          definition.hostBindings = superHostBindings;
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Fields which exist on either directive or component definitions, and need to be copied from
       * parent to child classes by the `ɵɵCopyDefinitionFeature`.
       */


      var COPY_DIRECTIVE_FIELDS = [// The child class should use the providers of its parent.
      'providersResolver'];
      /**
       * Fields which exist only on component definitions, and need to be copied from parent to child
       * classes by the `ɵɵCopyDefinitionFeature`.
       *
       * The type here allows any field of `ComponentDef` which is not also a property of `DirectiveDef`,
       * since those should go in `COPY_DIRECTIVE_FIELDS` above.
       */

      var COPY_COMPONENT_FIELDS = [// The child class should use the template function of its parent, including all template
      // semantics.
      'template', 'decls', 'consts', 'vars', 'onPush', 'ngContentSelectors', // The child class should use the CSS styles of its parent, including all styling semantics.
      'styles', 'encapsulation', // The child class should be checked by the runtime in the same way as its parent.
      'schemas'];
      /**
       * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a
       * definition.
       *
       * This exists primarily to support ngcc migration of an existing View Engine pattern, where an
       * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it
       * generates a skeleton definition on the child class, and applies this feature.
       *
       * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,
       * including things like the component template function.
       *
       * @param definition The definition of a child class which inherits from a parent class with its
       * own definition.
       *
       * @codeGenApi
       */

      function ɵɵCopyDefinitionFeature(definition) {
        var superType = getSuperType(definition.type);
        var superDef = undefined;

        if (isComponentDef(definition)) {
          // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.
          superDef = superType.ɵcmp;
        } else {
          // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.
          superDef = superType.ɵdir;
        } // Needed because `definition` fields are readonly.


        var defAny = definition; // Copy over any fields that apply to either directives or components.

        var _iterator57 = _createForOfIteratorHelper(COPY_DIRECTIVE_FIELDS),
            _step56;

        try {
          for (_iterator57.s(); !(_step56 = _iterator57.n()).done;) {
            var _field = _step56.value;
            defAny[_field] = superDef[_field];
          }
        } catch (err) {
          _iterator57.e(err);
        } finally {
          _iterator57.f();
        }

        if (isComponentDef(superDef)) {
          // Copy over any component-specific fields.
          var _iterator58 = _createForOfIteratorHelper(COPY_COMPONENT_FIELDS),
              _step57;

          try {
            for (_iterator58.s(); !(_step57 = _iterator58.n()).done;) {
              var field = _step57.value;
              defAny[field] = superDef[field];
            }
          } catch (err) {
            _iterator58.e(err);
          } finally {
            _iterator58.f();
          }
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _symbolIterator = null;

      function getSymbolIterator() {
        if (!_symbolIterator) {
          var _Symbol = _global['Symbol'];

          if (_Symbol && _Symbol.iterator) {
            _symbolIterator = _Symbol.iterator;
          } else {
            // es6-shim specific logic
            var keys = Object.getOwnPropertyNames(Map.prototype);

            for (var i = 0; i < keys.length; ++i) {
              var key = keys[i];

              if (key !== 'entries' && key !== 'size' && Map.prototype[key] === Map.prototype['entries']) {
                _symbolIterator = key;
              }
            }
          }
        }

        return _symbolIterator;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function devModeEqual(a, b) {
        var isListLikeIterableA = isListLikeIterable(a);
        var isListLikeIterableB = isListLikeIterable(b);

        if (isListLikeIterableA && isListLikeIterableB) {
          return areIterablesEqual(a, b, devModeEqual);
        } else {
          var isAObject = a && (typeof a === 'object' || typeof a === 'function');
          var isBObject = b && (typeof b === 'object' || typeof b === 'function');

          if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {
            return true;
          } else {
            return Object.is(a, b);
          }
        }
      }
      /**
       * Indicates that the result of a {@link Pipe} transformation has changed even though the
       * reference has not changed.
       *
       * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value
       * is stored.
       *
       * Example:
       *
       * ```
       * if (this._latestValue === this._latestReturnedValue) {
       *    return this._latestReturnedValue;
       *  } else {
       *    this._latestReturnedValue = this._latestValue;
       *    return WrappedValue.wrap(this._latestValue); // this will force update
       *  }
       * ```
       *
       * @publicApi
       * @deprecated from v10 stop using. (No replacement, deemed unnecessary.)
       */


      var WrappedValue = /*#__PURE__*/function () {
        function WrappedValue(value) {
          _classCallCheck(this, WrappedValue);

          this.wrapped = value;
        }
        /** Creates a wrapped value. */


        _createClass2(WrappedValue, null, [{
          key: "wrap",
          value: function wrap(value) {
            return new WrappedValue(value);
          }
          /**
           * Returns the underlying value of a wrapped value.
           * Returns the given `value` when it is not wrapped.
           **/

        }, {
          key: "unwrap",
          value: function unwrap(value) {
            return WrappedValue.isWrapped(value) ? value.wrapped : value;
          }
          /** Returns true if `value` is a wrapped value. */

        }, {
          key: "isWrapped",
          value: function isWrapped(value) {
            return value instanceof WrappedValue;
          }
        }]);

        return WrappedValue;
      }();

      function isListLikeIterable(obj) {
        if (!isJsObject(obj)) return false;
        return Array.isArray(obj) || !(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]
        getSymbolIterator() in obj; // JS Iterable have a Symbol.iterator prop
      }

      function areIterablesEqual(a, b, comparator) {
        var iterator1 = a[getSymbolIterator()]();
        var iterator2 = b[getSymbolIterator()]();

        while (true) {
          var item1 = iterator1.next();
          var item2 = iterator2.next();
          if (item1.done && item2.done) return true;
          if (item1.done || item2.done) return false;
          if (!comparator(item1.value, item2.value)) return false;
        }
      }

      function iterateListLike(obj, fn) {
        if (Array.isArray(obj)) {
          for (var i = 0; i < obj.length; i++) {
            fn(obj[i]);
          }
        } else {
          var iterator = obj[getSymbolIterator()]();
          var item;

          while (!(item = iterator.next()).done) {
            fn(item.value);
          }
        }
      }

      function isJsObject(o) {
        return o !== null && (typeof o === 'function' || typeof o === 'object');
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // TODO(misko): consider inlining

      /** Updates binding and returns the value. */


      function updateBinding(lView, bindingIndex, value) {
        return lView[bindingIndex] = value;
      }
      /** Gets the current binding value. */


      function getBinding(lView, bindingIndex) {
        ngDevMode && assertIndexInRange(lView, bindingIndex);
        ngDevMode && assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');
        return lView[bindingIndex];
      }
      /**
       * Updates binding if changed, then returns whether it was updated.
       *
       * This function also checks the `CheckNoChangesMode` and throws if changes are made.
       * Some changes (Objects/iterables) during `CheckNoChangesMode` are exempt to comply with VE
       * behavior.
       *
       * @param lView current `LView`
       * @param bindingIndex The binding in the `LView` to check
       * @param value New value to check against `lView[bindingIndex]`
       * @returns `true` if the bindings has changed. (Throws if binding has changed during
       *          `CheckNoChangesMode`)
       */


      function bindingUpdated(lView, bindingIndex, value) {
        ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');
        ngDevMode && assertLessThan(bindingIndex, lView.length, "Slot should have been initialized to NO_CHANGE");
        var oldValue = lView[bindingIndex];

        if (Object.is(oldValue, value)) {
          return false;
        } else {
          if (ngDevMode && isInCheckNoChangesMode()) {
            // View engine didn't report undefined values as changed on the first checkNoChanges pass
            // (before the change detection was run).
            var oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;

            if (!devModeEqual(oldValueToCompare, value)) {
              var details = getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value);
              throwErrorIfNoChangesMode(oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName);
            } // There was a change, but the `devModeEqual` decided that the change is exempt from an error.
            // For this reason we exit as if no change. The early exit is needed to prevent the changed
            // value to be written into `LView` (If we would write the new value that we would not see it
            // as change on next CD.)


            return false;
          }

          lView[bindingIndex] = value;
          return true;
        }
      }
      /** Updates 2 bindings if changed, then returns whether either was updated. */


      function bindingUpdated2(lView, bindingIndex, exp1, exp2) {
        var different = bindingUpdated(lView, bindingIndex, exp1);
        return bindingUpdated(lView, bindingIndex + 1, exp2) || different;
      }
      /** Updates 3 bindings if changed, then returns whether any was updated. */


      function bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) {
        var different = bindingUpdated2(lView, bindingIndex, exp1, exp2);
        return bindingUpdated(lView, bindingIndex + 2, exp3) || different;
      }
      /** Updates 4 bindings if changed, then returns whether any was updated. */


      function bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {
        var different = bindingUpdated2(lView, bindingIndex, exp1, exp2);
        return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Updates the value of or removes a bound attribute on an Element.
       *
       * Used in the case of `[attr.title]="value"`
       *
       * @param name name The name of the attribute.
       * @param value value The attribute is removed when value is `null` or `undefined`.
       *                  Otherwise the attribute value is set to the stringified value.
       * @param sanitizer An optional function used to sanitize the value.
       * @param namespace Optional namespace to use when setting the attribute.
       *
       * @codeGenApi
       */


      function ɵɵattribute(name, value, sanitizer, namespace) {
        var lView = getLView();
        var bindingIndex = nextBindingIndex();

        if (bindingUpdated(lView, bindingIndex, value)) {
          var tView = getTView();
          var tNode = getSelectedTNode();
          elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace);
          ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex);
        }

        return ɵɵattribute;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Create interpolation bindings with a variable number of expressions.
       *
       * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.
       * Those are faster because there is no need to create an array of expressions and iterate over it.
       *
       * `values`:
       * - has static text at even indexes,
       * - has evaluated expressions at odd indexes.
       *
       * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.
       */


      function interpolationV(lView, values) {
        ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');
        ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');
        var isBindingUpdated = false;
        var bindingIndex = getBindingIndex();

        for (var i = 1; i < values.length; i += 2) {
          // Check if bindings (odd indexes) have changed
          isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;
        }

        setBindingIndex(bindingIndex);

        if (!isBindingUpdated) {
          return NO_CHANGE;
        } // Build the updated content


        var content = values[0];

        for (var _i28 = 1; _i28 < values.length; _i28 += 2) {
          content += renderStringify(values[_i28]) + values[_i28 + 1];
        }

        return content;
      }
      /**
       * Creates an interpolation binding with 1 expression.
       *
       * @param prefix static value used for concatenation only.
       * @param v0 value checked for change.
       * @param suffix static value used for concatenation only.
       */


      function interpolation1(lView, prefix, v0, suffix) {
        var different = bindingUpdated(lView, nextBindingIndex(), v0);
        return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;
      }
      /**
       * Creates an interpolation binding with 2 expressions.
       */


      function interpolation2(lView, prefix, v0, i0, v1, suffix) {
        var bindingIndex = getBindingIndex();
        var different = bindingUpdated2(lView, bindingIndex, v0, v1);
        incrementBindingIndex(2);
        return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;
      }
      /**
       * Creates an interpolation binding with 3 expressions.
       */


      function interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix) {
        var bindingIndex = getBindingIndex();
        var different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);
        incrementBindingIndex(3);
        return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix : NO_CHANGE;
      }
      /**
       * Create an interpolation binding with 4 expressions.
       */


      function interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {
        var bindingIndex = getBindingIndex();
        var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
        incrementBindingIndex(4);
        return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + suffix : NO_CHANGE;
      }
      /**
       * Creates an interpolation binding with 5 expressions.
       */


      function interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {
        var bindingIndex = getBindingIndex();
        var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
        different = bindingUpdated(lView, bindingIndex + 4, v4) || different;
        incrementBindingIndex(5);
        return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + suffix : NO_CHANGE;
      }
      /**
       * Creates an interpolation binding with 6 expressions.
       */


      function interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {
        var bindingIndex = getBindingIndex();
        var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
        different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;
        incrementBindingIndex(6);
        return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix : NO_CHANGE;
      }
      /**
       * Creates an interpolation binding with 7 expressions.
       */


      function interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {
        var bindingIndex = getBindingIndex();
        var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
        different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;
        incrementBindingIndex(7);
        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;
      }
      /**
       * Creates an interpolation binding with 8 expressions.
       */


      function interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {
        var bindingIndex = getBindingIndex();
        var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
        different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;
        incrementBindingIndex(8);
        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;
      }
      /**
       *
       * Update an interpolated attribute on an element with single bound value surrounded by text.
       *
       * Used when the value passed to a property has 1 interpolated value in it:
       *
       * ```html
       * <div attr.title="prefix{{v0}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');
       * ```
       *
       * @param attrName The name of the attribute to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵattributeInterpolate1(attrName, prefix, v0, suffix, sanitizer, namespace) {
        var lView = getLView();
        var interpolatedValue = interpolation1(lView, prefix, v0, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tNode = getSelectedTNode();
          elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);
          ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 1, prefix, suffix);
        }

        return ɵɵattributeInterpolate1;
      }
      /**
       *
       * Update an interpolated attribute on an element with 2 bound values surrounded by text.
       *
       * Used when the value passed to a property has 2 interpolated values in it:
       *
       * ```html
       * <div attr.title="prefix{{v0}}-{{v1}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
       * ```
       *
       * @param attrName The name of the attribute to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵattributeInterpolate2(attrName, prefix, v0, i0, v1, suffix, sanitizer, namespace) {
        var lView = getLView();
        var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tNode = getSelectedTNode();
          elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);
          ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 2, prefix, i0, suffix);
        }

        return ɵɵattributeInterpolate2;
      }
      /**
       *
       * Update an interpolated attribute on an element with 3 bound values surrounded by text.
       *
       * Used when the value passed to a property has 3 interpolated values in it:
       *
       * ```html
       * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵattributeInterpolate3(
       * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
       * ```
       *
       * @param attrName The name of the attribute to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵattributeInterpolate3(attrName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer, namespace) {
        var lView = getLView();
        var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tNode = getSelectedTNode();
          elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);
          ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 3, prefix, i0, i1, suffix);
        }

        return ɵɵattributeInterpolate3;
      }
      /**
       *
       * Update an interpolated attribute on an element with 4 bound values surrounded by text.
       *
       * Used when the value passed to a property has 4 interpolated values in it:
       *
       * ```html
       * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵattributeInterpolate4(
       * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
       * ```
       *
       * @param attrName The name of the attribute to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵattributeInterpolate4(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer, namespace) {
        var lView = getLView();
        var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tNode = getSelectedTNode();
          elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);
          ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);
        }

        return ɵɵattributeInterpolate4;
      }
      /**
       *
       * Update an interpolated attribute on an element with 5 bound values surrounded by text.
       *
       * Used when the value passed to a property has 5 interpolated values in it:
       *
       * ```html
       * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵattributeInterpolate5(
       * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
       * ```
       *
       * @param attrName The name of the attribute to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵattributeInterpolate5(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer, namespace) {
        var lView = getLView();
        var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tNode = getSelectedTNode();
          elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);
          ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);
        }

        return ɵɵattributeInterpolate5;
      }
      /**
       *
       * Update an interpolated attribute on an element with 6 bound values surrounded by text.
       *
       * Used when the value passed to a property has 6 interpolated values in it:
       *
       * ```html
       * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵattributeInterpolate6(
       *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
       * ```
       *
       * @param attrName The name of the attribute to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵattributeInterpolate6(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer, namespace) {
        var lView = getLView();
        var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tNode = getSelectedTNode();
          elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);
          ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);
        }

        return ɵɵattributeInterpolate6;
      }
      /**
       *
       * Update an interpolated attribute on an element with 7 bound values surrounded by text.
       *
       * Used when the value passed to a property has 7 interpolated values in it:
       *
       * ```html
       * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵattributeInterpolate7(
       *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
       * ```
       *
       * @param attrName The name of the attribute to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param i5 Static value used for concatenation only.
       * @param v6 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵattributeInterpolate7(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer, namespace) {
        var lView = getLView();
        var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tNode = getSelectedTNode();
          elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);
          ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);
        }

        return ɵɵattributeInterpolate7;
      }
      /**
       *
       * Update an interpolated attribute on an element with 8 bound values surrounded by text.
       *
       * Used when the value passed to a property has 8 interpolated values in it:
       *
       * ```html
       * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵattributeInterpolate8(
       *  'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
       * ```
       *
       * @param attrName The name of the attribute to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param i5 Static value used for concatenation only.
       * @param v6 Value checked for change.
       * @param i6 Static value used for concatenation only.
       * @param v7 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵattributeInterpolate8(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer, namespace) {
        var lView = getLView();
        var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tNode = getSelectedTNode();
          elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);
          ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);
        }

        return ɵɵattributeInterpolate8;
      }
      /**
       * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.
       *
       * Used when the number of interpolated values exceeds 8.
       *
       * ```html
       * <div
       *  title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵattributeInterpolateV(
       *  'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
       *  'suffix']);
       * ```
       *
       * @param attrName The name of the attribute to update.
       * @param values The collection of values and the strings in-between those values, beginning with
       * a string prefix and ending with a string suffix.
       * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵattributeInterpolateV(attrName, values, sanitizer, namespace) {
        var lView = getLView();
        var interpolated = interpolationV(lView, values);

        if (interpolated !== NO_CHANGE) {
          var tNode = getSelectedTNode();
          elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace);

          if (ngDevMode) {
            var interpolationInBetween = [values[0]]; // prefix

            for (var i = 2; i < values.length; i += 2) {
              interpolationInBetween.push(values[i]);
            }

            storePropertyBindingMetadata.apply(void 0, [getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - interpolationInBetween.length + 1].concat(interpolationInBetween));
          }
        }

        return ɵɵattributeInterpolateV;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) {
        ngDevMode && assertFirstCreatePass(tView);
        ngDevMode && ngDevMode.firstCreatePass++;
        var tViewConsts = tView.consts; // TODO(pk): refactor getOrCreateTNode to have the "create" only version

        var tNode = getOrCreateTNode(tView, index, 4
        /* Container */
        , tagName || null, getConstant(tViewConsts, attrsIndex));
        resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));
        registerPostOrderHooks(tView, tNode);
        var embeddedTView = tNode.tViews = createTView(2
        /* Embedded */
        , tNode, templateFn, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null, tView.schemas, tViewConsts);

        if (tView.queries !== null) {
          tView.queries.template(tView, tNode);
          embeddedTView.queries = tView.queries.embeddedTView(tNode);
        }

        return tNode;
      }
      /**
       * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
       *
       * <ng-template #foo>
       *    <div></div>
       * </ng-template>
       *
       * @param index The index of the container in the data array
       * @param templateFn Inline template
       * @param decls The number of nodes, local refs, and pipes for this template
       * @param vars The number of bindings for this template
       * @param tagName The name of the container element, if applicable
       * @param attrsIndex Index of template attributes in the `consts` array.
       * @param localRefs Index of the local references in the `consts` array.
       * @param localRefExtractor A function which extracts local-refs values from the template.
       *        Defaults to the current element associated with the local-ref.
       *
       * @codeGenApi
       */


      function ɵɵtemplate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {
        var lView = getLView();
        var tView = getTView();
        var adjustedIndex = index + HEADER_OFFSET;
        var tNode = tView.firstCreatePass ? templateFirstCreatePass(adjustedIndex, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) : tView.data[adjustedIndex];
        setCurrentTNode(tNode, false);
        var comment = lView[RENDERER].createComment(ngDevMode ? 'container' : '');
        appendChild(tView, lView, comment, tNode);
        attachPatchData(comment, lView);
        addToViewTree(lView, lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode));

        if (isDirectiveHost(tNode)) {
          createDirectivesInstances(tView, lView, tNode);
        }

        if (localRefsIndex != null) {
          saveResolvedLocalsInData(lView, tNode, localRefExtractor);
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /** Store a value in the `data` at a given `index`. */


      function store(tView, lView, index, value) {
        // We don't store any static data for local variables, so the first time
        // we see the template, we should store as null to avoid a sparse array
        if (index >= tView.data.length) {
          tView.data[index] = null;
          tView.blueprint[index] = null;
        }

        lView[index] = value;
      }
      /**
       * Retrieves a local reference from the current contextViewData.
       *
       * If the reference to retrieve is in a parent view, this instruction is used in conjunction
       * with a nextContext() call, which walks up the tree and updates the contextViewData instance.
       *
       * @param index The index of the local ref in contextViewData.
       *
       * @codeGenApi
       */


      function ɵɵreference(index) {
        var contextLView = getContextLView();
        return load(contextLView, HEADER_OFFSET + index);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.
       *
       * This should be kept up to date with the public exports of @angular/core.
       */


      var angularCoreDiEnv = {
        'ɵɵdefineInjectable': ɵɵdefineInjectable,
        'ɵɵdefineInjector': ɵɵdefineInjector,
        'ɵɵinject': ɵɵinject,
        'ɵɵgetFactoryOf': getFactoryOf,
        'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep
      };

      function getFactoryOf(type) {
        var typeAny = type;

        if (isForwardRef(type)) {
          return function () {
            var factory = getFactoryOf(resolveForwardRef(typeAny));
            return factory ? factory() : null;
          };
        }

        var def = getInjectableDef(typeAny) || getInjectorDef(typeAny);

        if (!def || def.factory === undefined) {
          return null;
        }

        return def.factory;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting
       * injectable def (`ɵprov`) onto the injectable type.
       */


      function compileInjectable(type, srcMeta) {
        var ngInjectableDef = null;
        var ngFactoryDef = null; // if NG_PROV_DEF is already defined on this class then don't overwrite it

        if (!type.hasOwnProperty(NG_PROV_DEF)) {
          Object.defineProperty(type, NG_PROV_DEF, {
            get: function get() {
              if (ngInjectableDef === null) {
                ngInjectableDef = getCompilerFacade().compileInjectable(angularCoreDiEnv, "ng:///".concat(type.name, "/\u0275prov.js"), getInjectableMetadata(type, srcMeta));
              }

              return ngInjectableDef;
            }
          });
        } // if NG_FACTORY_DEF is already defined on this class then don't overwrite it


        if (!type.hasOwnProperty(NG_FACTORY_DEF)) {
          Object.defineProperty(type, NG_FACTORY_DEF, {
            get: function get() {
              if (ngFactoryDef === null) {
                var metadata = getInjectableMetadata(type, srcMeta);
                var compiler = getCompilerFacade();
                ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, "ng:///".concat(type.name, "/\u0275fac.js"), {
                  name: metadata.name,
                  type: metadata.type,
                  typeArgumentCount: metadata.typeArgumentCount,
                  deps: reflectDependencies(type),
                  injectFn: 'inject',
                  target: compiler.R3FactoryTarget.Injectable
                });
              }

              return ngFactoryDef;
            },
            // Leave this configurable so that the factories from directives or pipes can take precedence.
            configurable: true
          });
        }
      }

      var ɵ0$8 = getClosureSafeProperty;
      var USE_VALUE$1 = getClosureSafeProperty({
        provide: String,
        useValue: ɵ0$8
      });

      function isUseClassProvider(meta) {
        return meta.useClass !== undefined;
      }

      function isUseValueProvider(meta) {
        return USE_VALUE$1 in meta;
      }

      function isUseFactoryProvider(meta) {
        return meta.useFactory !== undefined;
      }

      function isUseExistingProvider(meta) {
        return meta.useExisting !== undefined;
      }

      function getInjectableMetadata(type, srcMeta) {
        // Allow the compilation of a class with a `@Injectable()` decorator without parameters
        var meta = srcMeta || {
          providedIn: null
        };
        var compilerMeta = {
          name: type.name,
          type: type,
          typeArgumentCount: 0,
          providedIn: meta.providedIn,
          userDeps: undefined
        };

        if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {
          compilerMeta.userDeps = convertDependencies(meta.deps);
        }

        if (isUseClassProvider(meta)) {
          // The user explicitly specified useClass, and may or may not have provided deps.
          compilerMeta.useClass = resolveForwardRef(meta.useClass);
        } else if (isUseValueProvider(meta)) {
          // The user explicitly specified useValue.
          compilerMeta.useValue = resolveForwardRef(meta.useValue);
        } else if (isUseFactoryProvider(meta)) {
          // The user explicitly specified useFactory.
          compilerMeta.useFactory = meta.useFactory;
        } else if (isUseExistingProvider(meta)) {
          // The user explicitly specified useExisting.
          compilerMeta.useExisting = resolveForwardRef(meta.useExisting);
        }

        return compilerMeta;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ɵ0$9 = getClosureSafeProperty;
      var USE_VALUE$2 = getClosureSafeProperty({
        provide: String,
        useValue: ɵ0$9
      });
      var EMPTY_ARRAY$2 = [];

      function convertInjectableProviderToFactory(type, provider) {
        if (!provider) {
          var reflectionCapabilities = new ReflectionCapabilities();
          var deps = reflectionCapabilities.parameters(type); // TODO - convert to flags.

          return function () {
            return _construct(type, _toConsumableArray(injectArgs(deps)));
          };
        }

        if (USE_VALUE$2 in provider) {
          var valueProvider = provider;
          return function () {
            return valueProvider.useValue;
          };
        } else if (provider.useExisting) {
          var existingProvider = provider;
          return function () {
            return ɵɵinject(resolveForwardRef(existingProvider.useExisting));
          };
        } else if (provider.useFactory) {
          var factoryProvider = provider;
          return function () {
            return factoryProvider.useFactory.apply(factoryProvider, _toConsumableArray(injectArgs(factoryProvider.deps || EMPTY_ARRAY$2)));
          };
        } else if (provider.useClass) {
          var classProvider = provider;
          var _deps3 = provider.deps;

          if (!_deps3) {
            var _reflectionCapabilities = new ReflectionCapabilities();

            _deps3 = _reflectionCapabilities.parameters(type);
          }

          return function () {
            return _construct(resolveForwardRef(classProvider.useClass), _toConsumableArray(injectArgs(_deps3)));
          };
        } else {
          var _deps4 = provider.deps;

          if (!_deps4) {
            var _reflectionCapabilities2 = new ReflectionCapabilities();

            _deps4 = _reflectionCapabilities2.parameters(type);
          }

          return function () {
            return _construct(type, _toConsumableArray(injectArgs(_deps4)));
          };
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ɵ0$a = function ɵ0$a(type, meta) {
        return SWITCH_COMPILE_INJECTABLE(type, meta);
      };
      /**
       * Injectable decorator and metadata.
       *
       * @Annotation
       * @publicApi
       */


      var Injectable = makeDecorator('Injectable', undefined, undefined, undefined, ɵ0$a);
      /**
       * Supports @Injectable() in JIT mode for Render2.
       */

      function render2CompileInjectable(injectableType, options) {
        if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {
          injectableType.ɵprov = ɵɵdefineInjectable({
            token: injectableType,
            providedIn: options.providedIn,
            factory: convertInjectableProviderToFactory(injectableType, options)
          });
        }
      }

      var SWITCH_COMPILE_INJECTABLE__POST_R3__ = compileInjectable;
      var SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable;
      var SWITCH_COMPILE_INJECTABLE = SWITCH_COMPILE_INJECTABLE__POST_R3__;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      function findFirstClosedCycle(keys) {
        var res = [];

        for (var i = 0; i < keys.length; ++i) {
          if (res.indexOf(keys[i]) > -1) {
            res.push(keys[i]);
            return res;
          }

          res.push(keys[i]);
        }

        return res;
      }

      function constructResolvingPath(keys) {
        if (keys.length > 1) {
          var reversed = findFirstClosedCycle(keys.slice().reverse());
          var tokenStrs = reversed.map(function (k) {
            return stringify(k.token);
          });
          return ' (' + tokenStrs.join(' -> ') + ')';
        }

        return '';
      }

      function injectionError(injector, key, constructResolvingMessage, originalError) {
        var keys = [key];
        var errMsg = constructResolvingMessage(keys);
        var error = originalError ? wrappedError(errMsg, originalError) : Error(errMsg);
        error.addKey = addKey;
        error.keys = keys;
        error.injectors = [injector];
        error.constructResolvingMessage = constructResolvingMessage;
        error[ERROR_ORIGINAL_ERROR] = originalError;
        return error;
      }

      function addKey(injector, key) {
        this.injectors.push(injector);
        this.keys.push(key); // Note: This updated message won't be reflected in the `.stack` property

        this.message = this.constructResolvingMessage(this.keys);
      }
      /**
       * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the
       * {@link Injector} does not have a {@link Provider} for the given key.
       *
       * @usageNotes
       * ### Example
       *
       * ```typescript
       * class A {
       *   constructor(b:B) {}
       * }
       *
       * expect(() => Injector.resolveAndCreate([A])).toThrowError();
       * ```
       */


      function noProviderError(injector, key) {
        return injectionError(injector, key, function (keys) {
          var first = stringify(keys[0].token);
          return "No provider for ".concat(first, "!").concat(constructResolvingPath(keys));
        });
      }
      /**
       * Thrown when dependencies form a cycle.
       *
       * @usageNotes
       * ### Example
       *
       * ```typescript
       * var injector = Injector.resolveAndCreate([
       *   {provide: "one", useFactory: (two) => "two", deps: [[new Inject("two")]]},
       *   {provide: "two", useFactory: (one) => "one", deps: [[new Inject("one")]]}
       * ]);
       *
       * expect(() => injector.get("one")).toThrowError();
       * ```
       *
       * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.
       */


      function cyclicDependencyError(injector, key) {
        return injectionError(injector, key, function (keys) {
          return "Cannot instantiate cyclic dependency!".concat(constructResolvingPath(keys));
        });
      }
      /**
       * Thrown when a constructing type returns with an Error.
       *
       * The `InstantiationError` class contains the original error plus the dependency graph which caused
       * this object to be instantiated.
       *
       * @usageNotes
       * ### Example
       *
       * ```typescript
       * class A {
       *   constructor() {
       *     throw new Error('message');
       *   }
       * }
       *
       * var injector = Injector.resolveAndCreate([A]);
      
       * try {
       *   injector.get(A);
       * } catch (e) {
       *   expect(e instanceof InstantiationError).toBe(true);
       *   expect(e.originalException.message).toEqual("message");
       *   expect(e.originalStack).toBeDefined();
       * }
       * ```
       */


      function instantiationError(injector, originalException, originalStack, key) {
        return injectionError(injector, key, function (keys) {
          var first = stringify(keys[0].token);
          return "".concat(originalException.message, ": Error during instantiation of ").concat(first, "!").concat(constructResolvingPath(keys), ".");
        }, originalException);
      }
      /**
       * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}
       * creation.
       *
       * @usageNotes
       * ### Example
       *
       * ```typescript
       * expect(() => Injector.resolveAndCreate(["not a type"])).toThrowError();
       * ```
       */


      function invalidProviderError(provider) {
        return Error("Invalid provider - only instances of Provider and Type are allowed, got: ".concat(provider));
      }
      /**
       * Thrown when the class has no annotation information.
       *
       * Lack of annotation information prevents the {@link Injector} from determining which dependencies
       * need to be injected into the constructor.
       *
       * @usageNotes
       * ### Example
       *
       * ```typescript
       * class A {
       *   constructor(b) {}
       * }
       *
       * expect(() => Injector.resolveAndCreate([A])).toThrowError();
       * ```
       *
       * This error is also thrown when the class not marked with {@link Injectable} has parameter types.
       *
       * ```typescript
       * class B {}
       *
       * class A {
       *   constructor(b:B) {} // no information about the parameter types of A is available at runtime.
       * }
       *
       * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();
       * ```
       *
       */


      function noAnnotationError(typeOrFunc, params) {
        var signature = [];

        for (var i = 0, ii = params.length; i < ii; i++) {
          var parameter = params[i];

          if (!parameter || parameter.length == 0) {
            signature.push('?');
          } else {
            signature.push(parameter.map(stringify).join(' '));
          }
        }

        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.');
      }
      /**
       * Thrown when getting an object by index.
       *
       * @usageNotes
       * ### Example
       *
       * ```typescript
       * class A {}
       *
       * var injector = Injector.resolveAndCreate([A]);
       *
       * expect(() => injector.getAt(100)).toThrowError();
       * ```
       *
       */


      function outOfBoundsError(index) {
        return Error("Index ".concat(index, " is out-of-bounds."));
      } // TODO: add a working example after alpha38 is released

      /**
       * Thrown when a multi provider and a regular provider are bound to the same token.
       *
       * @usageNotes
       * ### Example
       *
       * ```typescript
       * expect(() => Injector.resolveAndCreate([
       *   { provide: "Strings", useValue: "string1", multi: true},
       *   { provide: "Strings", useValue: "string2", multi: false}
       * ])).toThrowError();
       * ```
       */


      function mixingMultiProvidersWithRegularProvidersError(provider1, provider2) {
        return Error("Cannot mix multi providers and regular providers, got: ".concat(provider1, " ").concat(provider2));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A unique object used for retrieving items from the {@link ReflectiveInjector}.
       *
       * Keys have:
       * - a system-wide unique `id`.
       * - a `token`.
       *
       * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows
       * the
       * injector to store created objects in a more efficient way.
       *
       * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when
       * resolving
       * providers.
       *
       * @deprecated No replacement
       * @publicApi
       */


      var ReflectiveKey = /*#__PURE__*/function () {
        /**
         * Private
         */
        function ReflectiveKey(token, id) {
          _classCallCheck(this, ReflectiveKey);

          this.token = token;
          this.id = id;

          if (!token) {
            throw new Error('Token must be defined!');
          }

          this.displayName = stringify(this.token);
        }
        /**
         * Retrieves a `Key` for a token.
         */


        _createClass2(ReflectiveKey, null, [{
          key: "get",
          value: function get(token) {
            return _globalKeyRegistry.get(resolveForwardRef(token));
          }
          /**
           * @returns the number of keys registered in the system.
           */

        }, {
          key: "numberOfKeys",
          get: function get() {
            return _globalKeyRegistry.numberOfKeys;
          }
        }]);

        return ReflectiveKey;
      }();

      var KeyRegistry = /*#__PURE__*/function () {
        function KeyRegistry() {
          _classCallCheck(this, KeyRegistry);

          this._allKeys = new Map();
        }

        _createClass2(KeyRegistry, [{
          key: "get",
          value: function get(token) {
            if (token instanceof ReflectiveKey) return token;

            if (this._allKeys.has(token)) {
              return this._allKeys.get(token);
            }

            var newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);

            this._allKeys.set(token, newKey);

            return newKey;
          }
        }, {
          key: "numberOfKeys",
          get: function get() {
            return this._allKeys.size;
          }
        }]);

        return KeyRegistry;
      }();

      var _globalKeyRegistry = new KeyRegistry();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Provides access to reflection data about symbols. Used internally by Angular
       * to power dependency injection and compilation.
       */


      var Reflector = /*#__PURE__*/function () {
        function Reflector(reflectionCapabilities) {
          _classCallCheck(this, Reflector);

          this.reflectionCapabilities = reflectionCapabilities;
        }

        _createClass2(Reflector, [{
          key: "updateCapabilities",
          value: function updateCapabilities(caps) {
            this.reflectionCapabilities = caps;
          }
        }, {
          key: "factory",
          value: function factory(type) {
            return this.reflectionCapabilities.factory(type);
          }
        }, {
          key: "parameters",
          value: function parameters(typeOrFunc) {
            return this.reflectionCapabilities.parameters(typeOrFunc);
          }
        }, {
          key: "annotations",
          value: function annotations(typeOrFunc) {
            return this.reflectionCapabilities.annotations(typeOrFunc);
          }
        }, {
          key: "propMetadata",
          value: function propMetadata(typeOrFunc) {
            return this.reflectionCapabilities.propMetadata(typeOrFunc);
          }
        }, {
          key: "hasLifecycleHook",
          value: function hasLifecycleHook(type, lcProperty) {
            return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);
          }
        }, {
          key: "getter",
          value: function getter(name) {
            return this.reflectionCapabilities.getter(name);
          }
        }, {
          key: "setter",
          value: function setter(name) {
            return this.reflectionCapabilities.setter(name);
          }
        }, {
          key: "method",
          value: function method(name) {
            return this.reflectionCapabilities.method(name);
          }
        }, {
          key: "importUri",
          value: function importUri(type) {
            return this.reflectionCapabilities.importUri(type);
          }
        }, {
          key: "resourceUri",
          value: function resourceUri(type) {
            return this.reflectionCapabilities.resourceUri(type);
          }
        }, {
          key: "resolveIdentifier",
          value: function resolveIdentifier(name, moduleUrl, members, runtime) {
            return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);
          }
        }, {
          key: "resolveEnum",
          value: function resolveEnum(identifier, name) {
            return this.reflectionCapabilities.resolveEnum(identifier, name);
          }
        }]);

        return Reflector;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * The {@link Reflector} used internally in Angular to access metadata
       * about symbols.
       */


      var reflector = new Reflector(new ReflectionCapabilities());
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * `Dependency` is used by the framework to extend DI.
       * This is internal to Angular and should not be used directly.
       */

      var ReflectiveDependency = /*#__PURE__*/function () {
        function ReflectiveDependency(key, optional, visibility) {
          _classCallCheck(this, ReflectiveDependency);

          this.key = key;
          this.optional = optional;
          this.visibility = visibility;
        }

        _createClass2(ReflectiveDependency, null, [{
          key: "fromKey",
          value: function fromKey(key) {
            return new ReflectiveDependency(key, false, null);
          }
        }]);

        return ReflectiveDependency;
      }();

      var _EMPTY_LIST = [];

      var ResolvedReflectiveProvider_ = function ResolvedReflectiveProvider_(key, resolvedFactories, multiProvider) {
        _classCallCheck(this, ResolvedReflectiveProvider_);

        this.key = key;
        this.resolvedFactories = resolvedFactories;
        this.multiProvider = multiProvider;
        this.resolvedFactory = this.resolvedFactories[0];
      };
      /**
       * An internal resolved representation of a factory function created by resolving `Provider`.
       * @publicApi
       */


      var ResolvedReflectiveFactory = function ResolvedReflectiveFactory(
      /**
       * Factory function which can return an instance of an object represented by a key.
       */
      factory,
      /**
       * Arguments (dependencies) to the `factory` function.
       */
      dependencies) {
        _classCallCheck(this, ResolvedReflectiveFactory);

        this.factory = factory;
        this.dependencies = dependencies;
      };
      /**
       * Resolve a single provider.
       */


      function resolveReflectiveFactory(provider) {
        var factoryFn;
        var resolvedDeps;

        if (provider.useClass) {
          var useClass = resolveForwardRef(provider.useClass);
          factoryFn = reflector.factory(useClass);
          resolvedDeps = _dependenciesFor(useClass);
        } else if (provider.useExisting) {
          factoryFn = function factoryFn(aliasInstance) {
            return aliasInstance;
          };

          resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];
        } else if (provider.useFactory) {
          factoryFn = provider.useFactory;
          resolvedDeps = constructDependencies(provider.useFactory, provider.deps);
        } else {
          factoryFn = function factoryFn() {
            return provider.useValue;
          };

          resolvedDeps = _EMPTY_LIST;
        }

        return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);
      }
      /**
       * Converts the `Provider` into `ResolvedProvider`.
       *
       * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider
       * syntax.
       */


      function resolveReflectiveProvider(provider) {
        return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);
      }
      /**
       * Resolve a list of Providers.
       */


      function resolveReflectiveProviders(providers) {
        var normalized = _normalizeProviders(providers, []);

        var resolved = normalized.map(resolveReflectiveProvider);
        var resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());
        return Array.from(resolvedProviderMap.values());
      }
      /**
       * Merges a list of ResolvedProviders into a list where each key is contained exactly once and
       * multi providers have been merged.
       */


      function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {
        for (var i = 0; i < providers.length; i++) {
          var provider = providers[i];
          var existing = normalizedProvidersMap.get(provider.key.id);

          if (existing) {
            if (provider.multiProvider !== existing.multiProvider) {
              throw mixingMultiProvidersWithRegularProvidersError(existing, provider);
            }

            if (provider.multiProvider) {
              for (var j = 0; j < provider.resolvedFactories.length; j++) {
                existing.resolvedFactories.push(provider.resolvedFactories[j]);
              }
            } else {
              normalizedProvidersMap.set(provider.key.id, provider);
            }
          } else {
            var resolvedProvider = void 0;

            if (provider.multiProvider) {
              resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);
            } else {
              resolvedProvider = provider;
            }

            normalizedProvidersMap.set(provider.key.id, resolvedProvider);
          }
        }

        return normalizedProvidersMap;
      }

      function _normalizeProviders(providers, res) {
        providers.forEach(function (b) {
          if (b instanceof Type) {
            res.push({
              provide: b,
              useClass: b
            });
          } else if (b && typeof b == 'object' && b.provide !== undefined) {
            res.push(b);
          } else if (Array.isArray(b)) {
            _normalizeProviders(b, res);
          } else {
            throw invalidProviderError(b);
          }
        });
        return res;
      }

      function constructDependencies(typeOrFunc, dependencies) {
        if (!dependencies) {
          return _dependenciesFor(typeOrFunc);
        } else {
          var params = dependencies.map(function (t) {
            return [t];
          });
          return dependencies.map(function (t) {
            return _extractToken(typeOrFunc, t, params);
          });
        }
      }

      function _dependenciesFor(typeOrFunc) {
        var params = reflector.parameters(typeOrFunc);
        if (!params) return [];

        if (params.some(function (p) {
          return p == null;
        })) {
          throw noAnnotationError(typeOrFunc, params);
        }

        return params.map(function (p) {
          return _extractToken(typeOrFunc, p, params);
        });
      }

      function _extractToken(typeOrFunc, metadata, params) {
        var token = null;
        var optional = false;

        if (!Array.isArray(metadata)) {
          if (metadata instanceof Inject) {
            return _createDependency(metadata.token, optional, null);
          } else {
            return _createDependency(metadata, optional, null);
          }
        }

        var visibility = null;

        for (var i = 0; i < metadata.length; ++i) {
          var paramMetadata = metadata[i];

          if (paramMetadata instanceof Type) {
            token = paramMetadata;
          } else if (paramMetadata instanceof Inject) {
            token = paramMetadata.token;
          } else if (paramMetadata instanceof Optional) {
            optional = true;
          } else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {
            visibility = paramMetadata;
          } else if (paramMetadata instanceof InjectionToken) {
            token = paramMetadata;
          }
        }

        token = resolveForwardRef(token);

        if (token != null) {
          return _createDependency(token, optional, visibility);
        } else {
          throw noAnnotationError(typeOrFunc, params);
        }
      }

      function _createDependency(token, optional, visibility) {
        return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // Threshold for the dynamic version


      var UNDEFINED = {};
      /**
       * A ReflectiveDependency injection container used for instantiating objects and resolving
       * dependencies.
       *
       * An `Injector` is a replacement for a `new` operator, which can automatically resolve the
       * constructor dependencies.
       *
       * In typical use, application code asks for the dependencies in the constructor and they are
       * resolved by the `Injector`.
       *
       * @usageNotes
       * ### Example
       *
       * The following example creates an `Injector` configured to create `Engine` and `Car`.
       *
       * ```typescript
       * @Injectable()
       * class Engine {
       * }
       *
       * @Injectable()
       * class Car {
       *   constructor(public engine:Engine) {}
       * }
       *
       * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
       * var car = injector.get(Car);
       * expect(car instanceof Car).toBe(true);
       * expect(car.engine instanceof Engine).toBe(true);
       * ```
       *
       * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`
       * resolve all of the object's dependencies automatically.
       *
       * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.
       * @publicApi
       */

      var ReflectiveInjector = /*#__PURE__*/function () {
        function ReflectiveInjector() {
          _classCallCheck(this, ReflectiveInjector);
        }

        _createClass2(ReflectiveInjector, null, [{
          key: "resolve",
          value:
          /**
           * Turns an array of provider definitions into an array of resolved providers.
           *
           * A resolution is a process of flattening multiple nested arrays and converting individual
           * providers into an array of `ResolvedReflectiveProvider`s.
           *
           * @usageNotes
           * ### Example
           *
           * ```typescript
           * @Injectable()
           * class Engine {
           * }
           *
           * @Injectable()
           * class Car {
           *   constructor(public engine:Engine) {}
           * }
           *
           * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
           *
           * expect(providers.length).toEqual(2);
           *
           * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
           * expect(providers[0].key.displayName).toBe("Car");
           * expect(providers[0].dependencies.length).toEqual(1);
           * expect(providers[0].factory).toBeDefined();
           *
           * expect(providers[1].key.displayName).toBe("Engine");
           * });
           * ```
           *
           */
          function resolve(providers) {
            return resolveReflectiveProviders(providers);
          }
          /**
           * Resolves an array of providers and creates an injector from those providers.
           *
           * The passed-in providers can be an array of `Type`, `Provider`,
           * or a recursive array of more providers.
           *
           * @usageNotes
           * ### Example
           *
           * ```typescript
           * @Injectable()
           * class Engine {
           * }
           *
           * @Injectable()
           * class Car {
           *   constructor(public engine:Engine) {}
           * }
           *
           * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
           * expect(injector.get(Car) instanceof Car).toBe(true);
           * ```
           */

        }, {
          key: "resolveAndCreate",
          value: function resolveAndCreate(providers, parent) {
            var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);
            return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);
          }
          /**
           * Creates an injector from previously resolved providers.
           *
           * This API is the recommended way to construct injectors in performance-sensitive parts.
           *
           * @usageNotes
           * ### Example
           *
           * ```typescript
           * @Injectable()
           * class Engine {
           * }
           *
           * @Injectable()
           * class Car {
           *   constructor(public engine:Engine) {}
           * }
           *
           * var providers = ReflectiveInjector.resolve([Car, Engine]);
           * var injector = ReflectiveInjector.fromResolvedProviders(providers);
           * expect(injector.get(Car) instanceof Car).toBe(true);
           * ```
           */

        }, {
          key: "fromResolvedProviders",
          value: function fromResolvedProviders(providers, parent) {
            return new ReflectiveInjector_(providers, parent);
          }
        }]);

        return ReflectiveInjector;
      }();

      var ReflectiveInjector_ = /*#__PURE__*/function () {
        /**
         * Private
         */
        function ReflectiveInjector_(_providers, _parent) {
          _classCallCheck(this, ReflectiveInjector_);

          /** @internal */
          this._constructionCounter = 0;
          this._providers = _providers;
          this.parent = _parent || null;
          var len = _providers.length;
          this.keyIds = [];
          this.objs = [];

          for (var i = 0; i < len; i++) {
            this.keyIds[i] = _providers[i].key.id;
            this.objs[i] = UNDEFINED;
          }
        }

        _createClass2(ReflectiveInjector_, [{
          key: "get",
          value: function get(token) {
            var notFoundValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : THROW_IF_NOT_FOUND;
            return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);
          }
        }, {
          key: "resolveAndCreateChild",
          value: function resolveAndCreateChild(providers) {
            var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);
            return this.createChildFromResolved(ResolvedReflectiveProviders);
          }
        }, {
          key: "createChildFromResolved",
          value: function createChildFromResolved(providers) {
            var inj = new ReflectiveInjector_(providers);
            inj.parent = this;
            return inj;
          }
        }, {
          key: "resolveAndInstantiate",
          value: function resolveAndInstantiate(provider) {
            return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);
          }
        }, {
          key: "instantiateResolved",
          value: function instantiateResolved(provider) {
            return this._instantiateProvider(provider);
          }
        }, {
          key: "getProviderAtIndex",
          value: function getProviderAtIndex(index) {
            if (index < 0 || index >= this._providers.length) {
              throw outOfBoundsError(index);
            }

            return this._providers[index];
          }
          /** @internal */

        }, {
          key: "_new",
          value: function _new(provider) {
            if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {
              throw cyclicDependencyError(this, provider.key);
            }

            return this._instantiateProvider(provider);
          }
        }, {
          key: "_getMaxNumberOfObjects",
          value: function _getMaxNumberOfObjects() {
            return this.objs.length;
          }
        }, {
          key: "_instantiateProvider",
          value: function _instantiateProvider(provider) {
            if (provider.multiProvider) {
              var res = [];

              for (var i = 0; i < provider.resolvedFactories.length; ++i) {
                res[i] = this._instantiate(provider, provider.resolvedFactories[i]);
              }

              return res;
            } else {
              return this._instantiate(provider, provider.resolvedFactories[0]);
            }
          }
        }, {
          key: "_instantiate",
          value: function _instantiate(provider, ResolvedReflectiveFactory) {
            var _this470 = this;

            var factory = ResolvedReflectiveFactory.factory;
            var deps;

            try {
              deps = ResolvedReflectiveFactory.dependencies.map(function (dep) {
                return _this470._getByReflectiveDependency(dep);
              });
            } catch (e) {
              if (e.addKey) {
                e.addKey(this, provider.key);
              }

              throw e;
            }

            var obj;

            try {
              obj = factory.apply(void 0, _toConsumableArray(deps));
            } catch (e) {
              throw instantiationError(this, e, e.stack, provider.key);
            }

            return obj;
          }
        }, {
          key: "_getByReflectiveDependency",
          value: function _getByReflectiveDependency(dep) {
            return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);
          }
        }, {
          key: "_getByKey",
          value: function _getByKey(key, visibility, notFoundValue) {
            if (key === ReflectiveInjector_.INJECTOR_KEY) {
              return this;
            }

            if (visibility instanceof Self) {
              return this._getByKeySelf(key, notFoundValue);
            } else {
              return this._getByKeyDefault(key, notFoundValue, visibility);
            }
          }
        }, {
          key: "_getObjByKeyId",
          value: function _getObjByKeyId(keyId) {
            for (var i = 0; i < this.keyIds.length; i++) {
              if (this.keyIds[i] === keyId) {
                if (this.objs[i] === UNDEFINED) {
                  this.objs[i] = this._new(this._providers[i]);
                }

                return this.objs[i];
              }
            }

            return UNDEFINED;
          }
          /** @internal */

        }, {
          key: "_throwOrNull",
          value: function _throwOrNull(key, notFoundValue) {
            if (notFoundValue !== THROW_IF_NOT_FOUND) {
              return notFoundValue;
            } else {
              throw noProviderError(this, key);
            }
          }
          /** @internal */

        }, {
          key: "_getByKeySelf",
          value: function _getByKeySelf(key, notFoundValue) {
            var obj = this._getObjByKeyId(key.id);

            return obj !== UNDEFINED ? obj : this._throwOrNull(key, notFoundValue);
          }
          /** @internal */

        }, {
          key: "_getByKeyDefault",
          value: function _getByKeyDefault(key, notFoundValue, visibility) {
            var inj;

            if (visibility instanceof SkipSelf) {
              inj = this.parent;
            } else {
              inj = this;
            }

            while (inj instanceof ReflectiveInjector_) {
              var inj_ = inj;

              var obj = inj_._getObjByKeyId(key.id);

              if (obj !== UNDEFINED) return obj;
              inj = inj_.parent;
            }

            if (inj !== null) {
              return inj.get(key.token, notFoundValue);
            } else {
              return this._throwOrNull(key, notFoundValue);
            }
          }
        }, {
          key: "displayName",
          get: function get() {
            var providers = _mapProviders(this, function (b) {
              return ' "' + b.key.displayName + '" ';
            }).join(', ');

            return "ReflectiveInjector(providers: [".concat(providers, "])");
          }
        }, {
          key: "toString",
          value: function toString() {
            return this.displayName;
          }
        }]);

        return ReflectiveInjector_;
      }();

      ReflectiveInjector_.INJECTOR_KEY = ReflectiveKey.get(Injector);

      function _mapProviders(injector, fn) {
        var res = [];

        for (var i = 0; i < injector._providers.length; ++i) {
          res[i] = fn(injector.getProviderAtIndex(i));
        }

        return res;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function ɵɵdirectiveInject(token) {
        var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : InjectFlags.Default;
        var lView = getLView(); // Fall back to inject() if view hasn't been created. This situation can happen in tests
        // if inject utilities are used before bootstrapping.

        if (lView === null) {
          // Verify that we will not get into infinite loop.
          ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);
          return ɵɵinject(token, flags);
        }

        var tNode = getCurrentTNode();
        return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);
      }
      /**
       * Throws an error indicating that a factory function could not be generated by the compiler for a
       * particular class.
       *
       * This instruction allows the actual error message to be optimized away when ngDevMode is turned
       * off, saving bytes of generated code while still providing a good experience in dev mode.
       *
       * The name of the class is not mentioned here, but will be in the generated factory function name
       * and thus in the stack trace.
       *
       * @codeGenApi
       */


      function ɵɵinvalidFactory() {
        var msg = ngDevMode ? "This constructor was not compatible with Dependency Injection." : 'invalid';
        throw new Error(msg);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Update a property on a selected element.
       *
       * Operates on the element selected by index via the {@link select} instruction.
       *
       * If the property name also exists as an input property on one of the element's directives,
       * the component property will be set instead of the element property. This check must
       * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled
       *
       * @param propName Name of property. Because it is going to DOM, this is not subject to
       *        renaming as part of minification.
       * @param value New value to write.
       * @param sanitizer An optional function used to sanitize the value.
       * @returns This function returns itself so that it may be chained
       * (e.g. `property('name', ctx.name)('title', ctx.title)`)
       *
       * @codeGenApi
       */


      function ɵɵproperty(propName, value, sanitizer) {
        var lView = getLView();
        var bindingIndex = nextBindingIndex();

        if (bindingUpdated(lView, bindingIndex, value)) {
          var tView = getTView();
          var tNode = getSelectedTNode();
          elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, false);
          ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);
        }

        return ɵɵproperty;
      }
      /**
       * Given `<div style="..." my-dir>` and `MyDir` with `@Input('style')` we need to write to
       * directive input.
       */


      function setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased) {
        var inputs = tNode.inputs;
        var property = isClassBased ? 'class' : 'style'; // We support both 'class' and `className` hence the fallback.

        setInputsForProperty(tView, lView, inputs[property], property, value);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function elementStartFirstCreatePass(index, tView, lView, _native11, name, attrsIndex, localRefsIndex) {
        ngDevMode && assertFirstCreatePass(tView);
        ngDevMode && ngDevMode.firstCreatePass++;
        var tViewConsts = tView.consts;
        var attrs = getConstant(tViewConsts, attrsIndex);
        var tNode = getOrCreateTNode(tView, index, 2
        /* Element */
        , name, attrs);
        var hasDirectives = resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));
        ngDevMode && logUnknownElementError(tView, _native11, tNode, hasDirectives);

        if (tNode.attrs !== null) {
          computeStaticStyling(tNode, tNode.attrs, false);
        }

        if (tNode.mergedAttrs !== null) {
          computeStaticStyling(tNode, tNode.mergedAttrs, true);
        }

        if (tView.queries !== null) {
          tView.queries.elementStart(tView, tNode);
        }

        return tNode;
      }
      /**
       * Create DOM element. The instruction must later be followed by `elementEnd()` call.
       *
       * @param index Index of the element in the LView array
       * @param name Name of the DOM Node
       * @param attrsIndex Index of the element's attributes in the `consts` array.
       * @param localRefsIndex Index of the element's local references in the `consts` array.
       *
       * Attributes and localRefs are passed as an array of strings where elements with an even index
       * hold an attribute name and elements with an odd index hold an attribute value, ex.:
       * ['id', 'warning5', 'class', 'alert']
       *
       * @codeGenApi
       */


      function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {
        var lView = getLView();
        var tView = getTView();
        var adjustedIndex = HEADER_OFFSET + index;
        ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'elements should be created before any bindings');
        ngDevMode && assertIndexInRange(lView, adjustedIndex);
        var renderer = lView[RENDERER];

        var _native12 = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace());

        var tNode = tView.firstCreatePass ? elementStartFirstCreatePass(adjustedIndex, tView, lView, _native12, name, attrsIndex, localRefsIndex) : tView.data[adjustedIndex];
        setCurrentTNode(tNode, true);
        var mergedAttrs = tNode.mergedAttrs;

        if (mergedAttrs !== null) {
          setUpAttributes(renderer, _native12, mergedAttrs);
        }

        var classes = tNode.classes;

        if (classes !== null) {
          writeDirectClass(renderer, _native12, classes);
        }

        var styles = tNode.styles;

        if (styles !== null) {
          writeDirectStyle(renderer, _native12, styles);
        }

        if ((tNode.flags & 64
        /* isDetached */
        ) !== 64
        /* isDetached */
        ) {
          // In the i18n case, the translation may have removed this element, so only add it if it is not
          // detached. See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.
          appendChild(tView, lView, _native12, tNode);
        } // any immediate children of a component or template container must be pre-emptively
        // monkey-patched with the component view data so that the element can be inspected
        // later on using any element discovery utility methods (see `element_discovery.ts`)


        if (getElementDepthCount() === 0) {
          attachPatchData(_native12, lView);
        }

        increaseElementDepthCount();

        if (isDirectiveHost(tNode)) {
          createDirectivesInstances(tView, lView, tNode);
          executeContentQueries(tView, tNode, lView);
        }

        if (localRefsIndex !== null) {
          saveResolvedLocalsInData(lView, tNode);
        }
      }
      /**
       * Mark the end of the element.
       *
       * @codeGenApi
       */


      function ɵɵelementEnd() {
        var currentTNode = getCurrentTNode();
        ngDevMode && assertDefined(currentTNode, 'No parent node to close.');

        if (isCurrentTNodeParent()) {
          setCurrentTNodeAsNotParent();
        } else {
          ngDevMode && assertHasParent(getCurrentTNode());
          currentTNode = currentTNode.parent;
          setCurrentTNode(currentTNode, false);
        }

        var tNode = currentTNode;
        ngDevMode && assertTNodeType(tNode, 3
        /* AnyRNode */
        );
        decreaseElementDepthCount();
        var tView = getTView();

        if (tView.firstCreatePass) {
          registerPostOrderHooks(tView, currentTNode);

          if (isContentQueryHost(currentTNode)) {
            tView.queries.elementEnd(currentTNode);
          }
        }

        if (tNode.classesWithoutHost != null && hasClassInput(tNode)) {
          setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true);
        }

        if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {
          setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);
        }
      }
      /**
       * Creates an empty element using {@link elementStart} and {@link elementEnd}
       *
       * @param index Index of the element in the data array
       * @param name Name of the DOM Node
       * @param attrsIndex Index of the element's attributes in the `consts` array.
       * @param localRefsIndex Index of the element's local references in the `consts` array.
       *
       * @codeGenApi
       */


      function ɵɵelement(index, name, attrsIndex, localRefsIndex) {
        ɵɵelementStart(index, name, attrsIndex, localRefsIndex);
        ɵɵelementEnd();
      }

      function logUnknownElementError(tView, element, tNode, hasDirectives) {
        var schemas = tView.schemas; // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT
        // mode where this check happens at compile time. In JIT mode, `schemas` is always present and
        // defined as an array (as an empty array in case `schemas` field is not defined) and we should
        // execute the check below.

        if (schemas === null) return;
        var tagName = tNode.value; // If the element matches any directive, it's considered as valid.

        if (!hasDirectives && tagName !== null) {
          // The element is unknown if it's an instance of HTMLUnknownElement or it isn't registered
          // as a custom element. Note that unknown elements with a dash in their name won't be instances
          // of HTMLUnknownElement in browsers that support web components.
          var isUnknown = // Note that we can't check for `typeof HTMLUnknownElement === 'function'`,
          // because while most browsers return 'function', IE returns 'object'.
          typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement && element instanceof HTMLUnknownElement || typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 && !customElements.get(tagName);

          if (isUnknown && !matchingSchemas(tView, tagName)) {
            var message = "'".concat(tagName, "' is not a known element:\n");
            message += "1. If '".concat(tagName, "' is an Angular component, then verify that it is part of this module.\n");

            if (tagName && tagName.indexOf('-') > -1) {
              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.");
            } else {
              message += "2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.";
            }

            console.error(formatRuntimeError("304"
            /* UNKNOWN_ELEMENT */
            , message));
          }
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, localRefsIndex) {
        ngDevMode && ngDevMode.firstCreatePass++;
        var tViewConsts = tView.consts;
        var attrs = getConstant(tViewConsts, attrsIndex);
        var tNode = getOrCreateTNode(tView, index, 8
        /* ElementContainer */
        , 'ng-container', attrs); // While ng-container doesn't necessarily support styling, we use the style context to identify
        // and execute directives on the ng-container.

        if (attrs !== null) {
          computeStaticStyling(tNode, attrs, true);
        }

        var localRefs = getConstant(tViewConsts, localRefsIndex);
        resolveDirectives(tView, lView, tNode, localRefs);

        if (tView.queries !== null) {
          tView.queries.elementStart(tView, tNode);
        }

        return tNode;
      }
      /**
       * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.
       * The instruction must later be followed by `elementContainerEnd()` call.
       *
       * @param index Index of the element in the LView array
       * @param attrsIndex Index of the container attributes in the `consts` array.
       * @param localRefsIndex Index of the container's local references in the `consts` array.
       *
       * Even if this instruction accepts a set of attributes no actual attribute values are propagated to
       * the DOM (as a comment node can't have attributes). Attributes are here only for directive
       * matching purposes and setting initial inputs of directives.
       *
       * @codeGenApi
       */


      function ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {
        var lView = getLView();
        var tView = getTView();
        var adjustedIndex = index + HEADER_OFFSET;
        ngDevMode && assertIndexInRange(lView, adjustedIndex);
        ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'element containers should be created before any bindings');
        var tNode = tView.firstCreatePass ? elementContainerStartFirstCreatePass(adjustedIndex, tView, lView, attrsIndex, localRefsIndex) : tView.data[adjustedIndex];
        setCurrentTNode(tNode, true);
        ngDevMode && ngDevMode.rendererCreateComment++;

        var _native13 = lView[adjustedIndex] = lView[RENDERER].createComment(ngDevMode ? 'ng-container' : '');

        appendChild(tView, lView, _native13, tNode);
        attachPatchData(_native13, lView);

        if (isDirectiveHost(tNode)) {
          createDirectivesInstances(tView, lView, tNode);
          executeContentQueries(tView, tNode, lView);
        }

        if (localRefsIndex != null) {
          saveResolvedLocalsInData(lView, tNode);
        }
      }
      /**
       * Mark the end of the <ng-container>.
       *
       * @codeGenApi
       */


      function ɵɵelementContainerEnd() {
        var currentTNode = getCurrentTNode();
        var tView = getTView();

        if (isCurrentTNodeParent()) {
          setCurrentTNodeAsNotParent();
        } else {
          ngDevMode && assertHasParent(currentTNode);
          currentTNode = currentTNode.parent;
          setCurrentTNode(currentTNode, false);
        }

        ngDevMode && assertTNodeType(currentTNode, 8
        /* ElementContainer */
        );

        if (tView.firstCreatePass) {
          registerPostOrderHooks(tView, currentTNode);

          if (isContentQueryHost(currentTNode)) {
            tView.queries.elementEnd(currentTNode);
          }
        }
      }
      /**
       * Creates an empty logical container using {@link elementContainerStart}
       * and {@link elementContainerEnd}
       *
       * @param index Index of the element in the LView array
       * @param attrsIndex Index of the container attributes in the `consts` array.
       * @param localRefsIndex Index of the container's local references in the `consts` array.
       *
       * @codeGenApi
       */


      function ɵɵelementContainer(index, attrsIndex, localRefsIndex) {
        ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);
        ɵɵelementContainerEnd();
      }
      /**
       * Returns the current OpaqueViewState instance.
       *
       * Used in conjunction with the restoreView() instruction to save a snapshot
       * of the current view and restore it when listeners are invoked. This allows
       * walking the declaration view tree in listeners to get vars from parent views.
       *
       * @codeGenApi
       */


      function ɵɵgetCurrentView() {
        return getLView();
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Determine if the argument is shaped like a Promise
       */


      function isPromise(obj) {
        // allow any Promise/A+ compliant thenable.
        // It's up to the caller to ensure that obj.then conforms to the spec
        return !!obj && typeof obj.then === 'function';
      }
      /**
       * Determine if the argument is an Observable
       *
       * Strictly this tests that the `obj` is `Subscribable`, since `Observable`
       * types need additional methods, such as `lift()`. But it is adequate for our
       * needs since within the Angular framework code we only ever need to use the
       * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects
       * into `Observable` as needed.
       */


      function isObservable(obj) {
        return !!obj && typeof obj.subscribe === 'function';
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Adds an event listener to the current node.
       *
       * If an output exists on one of the node's directives, it also subscribes to the output
       * and saves the subscription for later cleanup.
       *
       * @param eventName Name of the event
       * @param listenerFn The function to be called when event emits
       * @param useCapture Whether or not to use capture in event listener
       * @param eventTargetResolver Function that returns global target information in case this listener
       * should be attached to a global object like window, document or body
       *
       * @codeGenApi
       */


      function ɵɵlistener(eventName, listenerFn) {
        var useCapture = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
        var eventTargetResolver = arguments.length > 3 ? arguments[3] : undefined;
        var lView = getLView();
        var tView = getTView();
        var tNode = getCurrentTNode();
        listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn, useCapture, eventTargetResolver);
        return ɵɵlistener;
      }
      /**
       * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.
       *
       * This instruction is for compatibility purposes and is designed to ensure that a
       * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered
       * in the component's renderer. Normally all host listeners are evaluated with the
       * parent component's renderer, but, in the case of animation @triggers, they need
       * to be evaluated with the sub component's renderer (because that's where the
       * animation triggers are defined).
       *
       * Do not use this instruction as a replacement for `listener`. This instruction
       * only exists to ensure compatibility with the ViewEngine's host binding behavior.
       *
       * @param eventName Name of the event
       * @param listenerFn The function to be called when event emits
       * @param useCapture Whether or not to use capture in event listener
       * @param eventTargetResolver Function that returns global target information in case this listener
       * should be attached to a global object like window, document or body
       *
       * @codeGenApi
       */


      function ɵɵsyntheticHostListener(eventName, listenerFn) {
        var useCapture = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
        var eventTargetResolver = arguments.length > 3 ? arguments[3] : undefined;
        var tNode = getCurrentTNode();
        var lView = getLView();
        var tView = getTView();
        var currentDef = getCurrentDirectiveDef(tView.data);
        var renderer = loadComponentRenderer(currentDef, tNode, lView);
        listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, useCapture, eventTargetResolver);
        return ɵɵsyntheticHostListener;
      }
      /**
       * A utility function that checks if a given element has already an event handler registered for an
       * event with a specified name. The TView.cleanup data structure is used to find out which events
       * are registered for a given element.
       */


      function findExistingListener(tView, lView, eventName, tNodeIdx) {
        var tCleanup = tView.cleanup;

        if (tCleanup != null) {
          for (var i = 0; i < tCleanup.length - 1; i += 2) {
            var cleanupEventName = tCleanup[i];

            if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) {
              // We have found a matching event name on the same node but it might not have been
              // registered yet, so we must explicitly verify entries in the LView cleanup data
              // structures.
              var lCleanup = lView[CLEANUP];
              var listenerIdxInLCleanup = tCleanup[i + 2];
              return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;
            } // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or
            // 2-element entries (for directive and queries destroy hooks). As such we can encounter
            // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements
            // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check
            // documentation of TView.cleanup for more details of this data structure layout.


            if (typeof cleanupEventName === 'string') {
              i += 2;
            }
          }
        }

        return null;
      }

      function listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn) {
        var useCapture = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
        var eventTargetResolver = arguments.length > 7 ? arguments[7] : undefined;
        var isTNodeDirectiveHost = isDirectiveHost(tNode);
        var firstCreatePass = tView.firstCreatePass;
        var tCleanup = firstCreatePass && getOrCreateTViewCleanup(tView); // When the ɵɵlistener instruction was generated and is executed we know that there is either a
        // native listener or a directive output on this element. As such we we know that we will have to
        // register a listener and store its cleanup function on LView.

        var lCleanup = getOrCreateLViewCleanup(lView);
        ngDevMode && assertTNodeType(tNode, 3
        /* AnyRNode */
        | 12
        /* AnyContainer */
        );
        var processOutputs = true; // add native event listener - applicable to elements only

        if (tNode.type & 3
        /* AnyRNode */
        ) {
          var _native14 = getNativeByTNode(tNode, lView);

          var resolved = eventTargetResolver ? eventTargetResolver(_native14) : EMPTY_OBJ;
          var target = resolved.target || _native14;
          var lCleanupIndex = lCleanup.length;
          var idxOrTargetGetter = eventTargetResolver ? function (_lView) {
            return eventTargetResolver(unwrapRNode(_lView[tNode.index])).target;
          } : tNode.index; // In order to match current behavior, native DOM event listeners must be added for all
          // events (including outputs).

          if (isProceduralRenderer(renderer)) {
            // There might be cases where multiple directives on the same element try to register an event
            // handler function for the same event. In this situation we want to avoid registration of
            // several native listeners as each registration would be intercepted by NgZone and
            // trigger change detection. This would mean that a single user action would result in several
            // change detections being invoked. To avoid this situation we want to have only one call to
            // native handler registration (for the same element and same type of event).
            //
            // In order to have just one native event handler in presence of multiple handler functions,
            // we just register a first handler function as a native event listener and then chain
            // (coalesce) other handler functions on top of the first native handler function.
            var existingListener = null; // Please note that the coalescing described here doesn't happen for events specifying an
            // alternative target (ex. (document:click)) - this is to keep backward compatibility with the
            // view engine.
            // Also, we don't have to search for existing listeners is there are no directives
            // matching on a given node as we can't register multiple event handlers for the same event in
            // a template (this would mean having duplicate attributes).

            if (!eventTargetResolver && isTNodeDirectiveHost) {
              existingListener = findExistingListener(tView, lView, eventName, tNode.index);
            }

            if (existingListener !== null) {
              // Attach a new listener to coalesced listeners list, maintaining the order in which
              // listeners are registered. For performance reasons, we keep a reference to the last
              // listener in that list (in `__ngLastListenerFn__` field), so we can avoid going through
              // the entire set each time we need to add a new listener.
              var lastListenerFn = existingListener.__ngLastListenerFn__ || existingListener;
              lastListenerFn.__ngNextListenerFn__ = listenerFn;
              existingListener.__ngLastListenerFn__ = listenerFn;
              processOutputs = false;
            } else {
              // The first argument of `listen` function in Procedural Renderer is:
              // - either a target name (as a string) in case of global target (window, document, body)
              // - or element reference (in all other cases)
              listenerFn = wrapListener(tNode, lView, listenerFn, false
              /** preventDefault */
              );
              var cleanupFn = renderer.listen(resolved.name || target, eventName, listenerFn);
              ngDevMode && ngDevMode.rendererAddEventListener++;
              lCleanup.push(listenerFn, cleanupFn);
              tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);
            }
          } else {
            listenerFn = wrapListener(tNode, lView, listenerFn, true
            /** preventDefault */
            );
            target.addEventListener(eventName, listenerFn, useCapture);
            ngDevMode && ngDevMode.rendererAddEventListener++;
            lCleanup.push(listenerFn);
            tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, useCapture);
          }
        } else {
          // Even if there is no native listener to add, we still need to wrap the listener so that OnPush
          // ancestors are marked dirty when an event occurs.
          listenerFn = wrapListener(tNode, lView, listenerFn, false
          /** preventDefault */
          );
        } // subscribe to directive outputs


        var outputs = tNode.outputs;
        var props;

        if (processOutputs && outputs !== null && (props = outputs[eventName])) {
          var propsLength = props.length;

          if (propsLength) {
            for (var i = 0; i < propsLength; i += 2) {
              var index = props[i];
              ngDevMode && assertIndexInRange(lView, index);
              var minifiedName = props[i + 1];
              var directiveInstance = lView[index];
              var output = directiveInstance[minifiedName];

              if (ngDevMode && !isObservable(output)) {
                throw new Error("@Output ".concat(minifiedName, " not initialized in '").concat(directiveInstance.constructor.name, "'."));
              }

              var subscription = output.subscribe(listenerFn);
              var idx = lCleanup.length;
              lCleanup.push(listenerFn, subscription);
              tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));
            }
          }
        }
      }

      function executeListenerWithErrorHandling(lView, listenerFn, e) {
        try {
          // Only explicitly returning false from a listener should preventDefault
          return listenerFn(e) !== false;
        } catch (error) {
          handleError(lView, error);
          return false;
        }
      }
      /**
       * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior,
       * if applicable.
       *
       * @param tNode The TNode associated with this listener
       * @param lView The LView that contains this listener
       * @param listenerFn The listener function to call
       * @param wrapWithPreventDefault Whether or not to prevent default behavior
       * (the procedural renderer does this already, so in those cases, we should skip)
       */


      function wrapListener(tNode, lView, listenerFn, wrapWithPreventDefault) {
        // Note: we are performing most of the work in the listener function itself
        // to optimize listener registration.
        return function wrapListenerIn_markDirtyAndPreventDefault(e) {
          // Ivy uses `Function` as a special token that allows us to unwrap the function
          // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`.
          if (e === Function) {
            return listenerFn;
          } // In order to be backwards compatible with View Engine, events on component host nodes
          // must also mark the component view itself dirty (i.e. the view that it owns).


          var startView = tNode.flags & 2
          /* isComponentHost */
          ? getComponentLViewByIndex(tNode.index, lView) : lView; // See interfaces/view.ts for more on LViewFlags.ManualOnPush

          if ((lView[FLAGS] & 32
          /* ManualOnPush */
          ) === 0) {
            markViewDirty(startView);
          }

          var result = executeListenerWithErrorHandling(lView, listenerFn, e); // A just-invoked listener function might have coalesced listeners so we need to check for
          // their presence and invoke as needed.

          var nextListenerFn = wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__;

          while (nextListenerFn) {
            // We should prevent default if any of the listeners explicitly return false
            result = executeListenerWithErrorHandling(lView, nextListenerFn, e) && result;
            nextListenerFn = nextListenerFn.__ngNextListenerFn__;
          }

          if (wrapWithPreventDefault && result === false) {
            e.preventDefault(); // Necessary for legacy browsers that don't support preventDefault (e.g. IE)

            e.returnValue = false;
          }

          return result;
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Retrieves a context at the level specified and saves it as the global, contextViewData.
       * Will get the next level up if level is not specified.
       *
       * This is used to save contexts of parent views so they can be bound in embedded views, or
       * in conjunction with reference() to bind a ref from a parent view.
       *
       * @param level The relative level of the view from which to grab context compared to contextVewData
       * @returns context
       *
       * @codeGenApi
       */


      function ɵɵnextContext() {
        var level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
        return nextContextImpl(level);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Checks a given node against matching projection slots and returns the
       * determined slot index. Returns "null" if no slot matched the given node.
       *
       * This function takes into account the parsed ngProjectAs selector from the
       * node's attributes. If present, it will check whether the ngProjectAs selector
       * matches any of the projection slot selectors.
       */


      function matchingProjectionSlotIndex(tNode, projectionSlots) {
        var wildcardNgContentIndex = null;
        var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);

        for (var i = 0; i < projectionSlots.length; i++) {
          var slotValue = projectionSlots[i]; // The last wildcard projection slot should match all nodes which aren't matching
          // any selector. This is necessary to be backwards compatible with view engine.

          if (slotValue === '*') {
            wildcardNgContentIndex = i;
            continue;
          } // If we ran into an `ngProjectAs` attribute, we should match its parsed selector
          // to the list of selectors, otherwise we fall back to matching against the node.


          if (ngProjectAsAttrVal === null ? isNodeMatchingSelectorList(tNode, slotValue,
          /* isProjectionMode */
          true) : isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {
            return i; // first matching selector "captures" a given node
          }
        }

        return wildcardNgContentIndex;
      }
      /**
       * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
       * It takes all the selectors from the entire component's template and decides where
       * each projected node belongs (it re-distributes nodes among "buckets" where each "bucket" is
       * backed by a selector).
       *
       * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,
       * un-parsed form.
       *
       * The parsed form is needed for efficient matching of a node against a given CSS selector.
       * The un-parsed, textual form is needed for support of the ngProjectAs attribute.
       *
       * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more
       * drawbacks:
       * - having only a textual form would require runtime parsing of CSS selectors;
       * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a
       * template author).
       *
       * @param projectionSlots? A collection of projection slots. A projection slot can be based
       *        on a parsed CSS selectors or set to the wildcard selector ("*") in order to match
       *        all nodes which do not match any selector. If not specified, a single wildcard
       *        selector projection slot will be defined.
       *
       * @codeGenApi
       */


      function ɵɵprojectionDef(projectionSlots) {
        var componentNode = getLView()[DECLARATION_COMPONENT_VIEW][T_HOST];

        if (!componentNode.projection) {
          // If no explicit projection slots are defined, fall back to a single
          // projection slot with the wildcard selector.
          var numProjectionSlots = projectionSlots ? projectionSlots.length : 1;
          var projectionHeads = componentNode.projection = newArray(numProjectionSlots, null);
          var tails = projectionHeads.slice();
          var componentChild = componentNode.child;

          while (componentChild !== null) {
            var slotIndex = projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;

            if (slotIndex !== null) {
              if (tails[slotIndex]) {
                tails[slotIndex].projectionNext = componentChild;
              } else {
                projectionHeads[slotIndex] = componentChild;
              }

              tails[slotIndex] = componentChild;
            }

            componentChild = componentChild.next;
          }
        }
      }
      /**
       * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call
       * to the projectionDef instruction.
       *
       * @param nodeIndex
       * @param selectorIndex:
       *        - 0 when the selector is `*` (or unspecified as this is the default value),
       *        - 1 based index of the selector from the {@link projectionDef}
       *
       * @codeGenApi
       */


      function ɵɵprojection(nodeIndex) {
        var selectorIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
        var attrs = arguments.length > 2 ? arguments[2] : undefined;
        var lView = getLView();
        var tView = getTView();
        var tProjectionNode = getOrCreateTNode(tView, HEADER_OFFSET + nodeIndex, 16
        /* Projection */
        , null, attrs || null); // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.

        if (tProjectionNode.projection === null) tProjectionNode.projection = selectorIndex; // `<ng-content>` has no content

        setCurrentTNodeAsNotParent();

        if ((tProjectionNode.flags & 64
        /* isDetached */
        ) !== 64
        /* isDetached */
        ) {
          // re-distribution of projectable nodes is stored on a component's view level
          applyProjection(tView, lView, tProjectionNode);
        }
      }
      /**
       *
       * Update an interpolated property on an element with a lone bound value
       *
       * Used when the value passed to a property has 1 interpolated value in it, an no additional text
       * surrounds that interpolated value:
       *
       * ```html
       * <div title="{{v0}}"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵpropertyInterpolate('title', v0);
       * ```
       *
       * If the property name also exists as an input property on one of the element's directives,
       * the component property will be set instead of the element property. This check must
       * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
       *
       * @param propName The name of the property to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵpropertyInterpolate(propName, v0, sanitizer) {
        ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer);
        return ɵɵpropertyInterpolate;
      }
      /**
       *
       * Update an interpolated property on an element with single bound value surrounded by text.
       *
       * Used when the value passed to a property has 1 interpolated value in it:
       *
       * ```html
       * <div title="prefix{{v0}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');
       * ```
       *
       * If the property name also exists as an input property on one of the element's directives,
       * the component property will be set instead of the element property. This check must
       * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
       *
       * @param propName The name of the property to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵpropertyInterpolate1(propName, prefix, v0, suffix, sanitizer) {
        var lView = getLView();
        var interpolatedValue = interpolation1(lView, prefix, v0, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tView = getTView();
          var tNode = getSelectedTNode();
          elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);
          ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 1, prefix, suffix);
        }

        return ɵɵpropertyInterpolate1;
      }
      /**
       *
       * Update an interpolated property on an element with 2 bound values surrounded by text.
       *
       * Used when the value passed to a property has 2 interpolated values in it:
       *
       * ```html
       * <div title="prefix{{v0}}-{{v1}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
       * ```
       *
       * If the property name also exists as an input property on one of the element's directives,
       * the component property will be set instead of the element property. This check must
       * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
       *
       * @param propName The name of the property to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵpropertyInterpolate2(propName, prefix, v0, i0, v1, suffix, sanitizer) {
        var lView = getLView();
        var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tView = getTView();
          var tNode = getSelectedTNode();
          elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);
          ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 2, prefix, i0, suffix);
        }

        return ɵɵpropertyInterpolate2;
      }
      /**
       *
       * Update an interpolated property on an element with 3 bound values surrounded by text.
       *
       * Used when the value passed to a property has 3 interpolated values in it:
       *
       * ```html
       * <div title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵpropertyInterpolate3(
       * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
       * ```
       *
       * If the property name also exists as an input property on one of the element's directives,
       * the component property will be set instead of the element property. This check must
       * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
       *
       * @param propName The name of the property to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵpropertyInterpolate3(propName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer) {
        var lView = getLView();
        var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tView = getTView();
          var tNode = getSelectedTNode();
          elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);
          ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 3, prefix, i0, i1, suffix);
        }

        return ɵɵpropertyInterpolate3;
      }
      /**
       *
       * Update an interpolated property on an element with 4 bound values surrounded by text.
       *
       * Used when the value passed to a property has 4 interpolated values in it:
       *
       * ```html
       * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵpropertyInterpolate4(
       * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
       * ```
       *
       * If the property name also exists as an input property on one of the element's directives,
       * the component property will be set instead of the element property. This check must
       * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
       *
       * @param propName The name of the property to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵpropertyInterpolate4(propName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer) {
        var lView = getLView();
        var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tView = getTView();
          var tNode = getSelectedTNode();
          elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);
          ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);
        }

        return ɵɵpropertyInterpolate4;
      }
      /**
       *
       * Update an interpolated property on an element with 5 bound values surrounded by text.
       *
       * Used when the value passed to a property has 5 interpolated values in it:
       *
       * ```html
       * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵpropertyInterpolate5(
       * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
       * ```
       *
       * If the property name also exists as an input property on one of the element's directives,
       * the component property will be set instead of the element property. This check must
       * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
       *
       * @param propName The name of the property to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵpropertyInterpolate5(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer) {
        var lView = getLView();
        var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tView = getTView();
          var tNode = getSelectedTNode();
          elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);
          ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);
        }

        return ɵɵpropertyInterpolate5;
      }
      /**
       *
       * Update an interpolated property on an element with 6 bound values surrounded by text.
       *
       * Used when the value passed to a property has 6 interpolated values in it:
       *
       * ```html
       * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵpropertyInterpolate6(
       *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
       * ```
       *
       * If the property name also exists as an input property on one of the element's directives,
       * the component property will be set instead of the element property. This check must
       * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
       *
       * @param propName The name of the property to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵpropertyInterpolate6(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer) {
        var lView = getLView();
        var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tView = getTView();
          var tNode = getSelectedTNode();
          elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);
          ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);
        }

        return ɵɵpropertyInterpolate6;
      }
      /**
       *
       * Update an interpolated property on an element with 7 bound values surrounded by text.
       *
       * Used when the value passed to a property has 7 interpolated values in it:
       *
       * ```html
       * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵpropertyInterpolate7(
       *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
       * ```
       *
       * If the property name also exists as an input property on one of the element's directives,
       * the component property will be set instead of the element property. This check must
       * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
       *
       * @param propName The name of the property to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param i5 Static value used for concatenation only.
       * @param v6 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵpropertyInterpolate7(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer) {
        var lView = getLView();
        var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tView = getTView();
          var tNode = getSelectedTNode();
          elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);
          ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);
        }

        return ɵɵpropertyInterpolate7;
      }
      /**
       *
       * Update an interpolated property on an element with 8 bound values surrounded by text.
       *
       * Used when the value passed to a property has 8 interpolated values in it:
       *
       * ```html
       * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵpropertyInterpolate8(
       *  'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
       * ```
       *
       * If the property name also exists as an input property on one of the element's directives,
       * the component property will be set instead of the element property. This check must
       * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
       *
       * @param propName The name of the property to update
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param i5 Static value used for concatenation only.
       * @param v6 Value checked for change.
       * @param i6 Static value used for concatenation only.
       * @param v7 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵpropertyInterpolate8(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer) {
        var lView = getLView();
        var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);

        if (interpolatedValue !== NO_CHANGE) {
          var tView = getTView();
          var tNode = getSelectedTNode();
          elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);
          ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);
        }

        return ɵɵpropertyInterpolate8;
      }
      /**
       * Update an interpolated property on an element with 9 or more bound values surrounded by text.
       *
       * Used when the number of interpolated values exceeds 8.
       *
       * ```html
       * <div
       *  title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
       * ```
       *
       * Its compiled representation is::
       *
       * ```ts
       * ɵɵpropertyInterpolateV(
       *  'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
       *  'suffix']);
       * ```
       *
       * If the property name also exists as an input property on one of the element's directives,
       * the component property will be set instead of the element property. This check must
       * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
       *
       * @param propName The name of the property to update.
       * @param values The collection of values and the strings inbetween those values, beginning with a
       * string prefix and ending with a string suffix.
       * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
       * @param sanitizer An optional sanitizer function
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵpropertyInterpolateV(propName, values, sanitizer) {
        var lView = getLView();
        var interpolatedValue = interpolationV(lView, values);

        if (interpolatedValue !== NO_CHANGE) {
          var tView = getTView();
          var tNode = getSelectedTNode();
          elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);

          if (ngDevMode) {
            var interpolationInBetween = [values[0]]; // prefix

            for (var i = 2; i < values.length; i += 2) {
              interpolationInBetween.push(values[i]);
            }

            storePropertyBindingMetadata.apply(void 0, [tView.data, tNode, propName, getBindingIndex() - interpolationInBetween.length + 1].concat(interpolationInBetween));
          }
        }

        return ɵɵpropertyInterpolateV;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * This file contains reuseable "empty" symbols that can be used as default return values
       * in different parts of the rendering code. Because the same symbols are returned, this
       * allows for identity checks against these values to be consistently used by the framework
       * code.
       */


      var EMPTY_OBJ$1 = {};
      var EMPTY_ARRAY$3 = []; // freezing the values prevents any code from accidentally inserting new values in

      if ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) {
        // These property accesses can be ignored because ngDevMode will be set to false
        // when optimizing code and the whole if statement will be dropped.
        // tslint:disable-next-line:no-toplevel-property-access
        Object.freeze(EMPTY_OBJ$1); // tslint:disable-next-line:no-toplevel-property-access

        Object.freeze(EMPTY_ARRAY$3);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * NOTE: The word `styling` is used interchangeably as style or class styling.
       *
       * This file contains code to link styling instructions together so that they can be replayed in
       * priority order. The file exists because Ivy styling instruction execution order does not match
       * that of the priority order. The purpose of this code is to create a linked list so that the
       * instructions can be traversed in priority order when computing the styles.
       *
       * Assume we are dealing with the following code:
       * ```
       * @Component({
       *   template: `
       *     <my-cmp [style]=" {color: '#001'} "
       *             [style.color]=" #002 "
       *             dir-style-color-1
       *             dir-style-color-2> `
       * })
       * class ExampleComponent {
       *   static ngComp = ... {
       *     ...
       *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`
       *     ɵɵstyleMap({color: '#001'});
       *     ɵɵstyleProp('color', '#002');
       *     ...
       *   }
       * }
       *
       * @Directive({
       *   selector: `[dir-style-color-1]',
       * })
       * class Style1Directive {
       *   @HostBinding('style') style = {color: '#005'};
       *   @HostBinding('style.color') color = '#006';
       *
       *   static ngDir = ... {
       *     ...
       *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`
       *     ɵɵstyleMap({color: '#005'});
       *     ɵɵstyleProp('color', '#006');
       *     ...
       *   }
       * }
       *
       * @Directive({
       *   selector: `[dir-style-color-2]',
       * })
       * class Style2Directive {
       *   @HostBinding('style') style = {color: '#007'};
       *   @HostBinding('style.color') color = '#008';
       *
       *   static ngDir = ... {
       *     ...
       *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`
       *     ɵɵstyleMap({color: '#007'});
       *     ɵɵstyleProp('color', '#008');
       *     ...
       *   }
       * }
       *
       * @Directive({
       *   selector: `my-cmp',
       * })
       * class MyComponent {
       *   @HostBinding('style') style = {color: '#003'};
       *   @HostBinding('style.color') color = '#004';
       *
       *   static ngComp = ... {
       *     ...
       *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`
       *     ɵɵstyleMap({color: '#003'});
       *     ɵɵstyleProp('color', '#004');
       *     ...
       *   }
       * }
       * ```
       *
       * The Order of instruction execution is:
       *
       * NOTE: the comment binding location is for illustrative purposes only.
       *
       * ```
       * // Template: (ExampleComponent)
       *     ɵɵstyleMap({color: '#001'});   // Binding index: 10
       *     ɵɵstyleProp('color', '#002');  // Binding index: 12
       * // MyComponent
       *     ɵɵstyleMap({color: '#003'});   // Binding index: 20
       *     ɵɵstyleProp('color', '#004');  // Binding index: 22
       * // Style1Directive
       *     ɵɵstyleMap({color: '#005'});   // Binding index: 24
       *     ɵɵstyleProp('color', '#006');  // Binding index: 26
       * // Style2Directive
       *     ɵɵstyleMap({color: '#007'});   // Binding index: 28
       *     ɵɵstyleProp('color', '#008');  // Binding index: 30
       * ```
       *
       * The correct priority order of concatenation is:
       *
       * ```
       * // MyComponent
       *     ɵɵstyleMap({color: '#003'});   // Binding index: 20
       *     ɵɵstyleProp('color', '#004');  // Binding index: 22
       * // Style1Directive
       *     ɵɵstyleMap({color: '#005'});   // Binding index: 24
       *     ɵɵstyleProp('color', '#006');  // Binding index: 26
       * // Style2Directive
       *     ɵɵstyleMap({color: '#007'});   // Binding index: 28
       *     ɵɵstyleProp('color', '#008');  // Binding index: 30
       * // Template: (ExampleComponent)
       *     ɵɵstyleMap({color: '#001'});   // Binding index: 10
       *     ɵɵstyleProp('color', '#002');  // Binding index: 12
       * ```
       *
       * What color should be rendered?
       *
       * Once the items are correctly sorted in the list, the answer is simply the last item in the
       * concatenation list which is `#002`.
       *
       * To do so we keep a linked list of all of the bindings which pertain to this element.
       * Notice that the bindings are inserted in the order of execution, but the `TView.data` allows
       * us to traverse them in the order of priority.
       *
       * |Idx|`TView.data`|`LView`          | Notes
       * |---|------------|-----------------|--------------
       * |...|            |                 |
       * |10 |`null`      |`{color: '#001'}`| `ɵɵstyleMap('color', {color: '#001'})`
       * |11 |`30 | 12`   | ...             |
       * |12 |`color`     |`'#002'`         | `ɵɵstyleProp('color', '#002')`
       * |13 |`10 | 0`    | ...             |
       * |...|            |                 |
       * |20 |`null`      |`{color: '#003'}`| `ɵɵstyleMap('color', {color: '#003'})`
       * |21 |`0 | 22`    | ...             |
       * |22 |`color`     |`'#004'`         | `ɵɵstyleProp('color', '#004')`
       * |23 |`20 | 24`   | ...             |
       * |24 |`null`      |`{color: '#005'}`| `ɵɵstyleMap('color', {color: '#005'})`
       * |25 |`22 | 26`   | ...             |
       * |26 |`color`     |`'#006'`         | `ɵɵstyleProp('color', '#006')`
       * |27 |`24 | 28`   | ...             |
       * |28 |`null`      |`{color: '#007'}`| `ɵɵstyleMap('color', {color: '#007'})`
       * |29 |`26 | 30`   | ...             |
       * |30 |`color`     |`'#008'`         | `ɵɵstyleProp('color', '#008')`
       * |31 |`28 | 10`   | ...             |
       *
       * The above data structure allows us to re-concatenate the styling no matter which data binding
       * changes.
       *
       * NOTE: in addition to keeping track of next/previous index the `TView.data` also stores prev/next
       * duplicate bit. The duplicate bit if true says there either is a binding with the same name or
       * there is a map (which may contain the name). This information is useful in knowing if other
       * styles with higher priority need to be searched for overwrites.
       *
       * NOTE: See `should support example in 'tnode_linked_list.ts' documentation` in
       * `tnode_linked_list_spec.ts` for working example.
       */


      var __unused_const_as_closure_does_not_like_standalone_comment_blocks__;
      /**
       * Insert new `tStyleValue` at `TData` and link existing style bindings such that we maintain linked
       * list of styles and compute the duplicate flag.
       *
       * Note: this function is executed during `firstUpdatePass` only to populate the `TView.data`.
       *
       * The function works by keeping track of `tStylingRange` which contains two pointers pointing to
       * the head/tail of the template portion of the styles.
       *  - if `isHost === false` (we are template) then insertion is at tail of `TStylingRange`
       *  - if `isHost === true` (we are host binding) then insertion is at head of `TStylingRange`
       *
       * @param tData The `TData` to insert into.
       * @param tNode `TNode` associated with the styling element.
       * @param tStylingKey See `TStylingKey`.
       * @param index location of where `tStyleValue` should be stored (and linked into list.)
       * @param isHostBinding `true` if the insertion is for a `hostBinding`. (insertion is in front of
       *               template.)
       * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.
       *                       `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)
       */


      function insertTStylingBinding(tData, tNode, tStylingKeyWithStatic, index, isHostBinding, isClassBinding) {
        ngDevMode && assertFirstUpdatePass(getTView());
        var tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;
        var tmplHead = getTStylingRangePrev(tBindings);
        var tmplTail = getTStylingRangeNext(tBindings);
        tData[index] = tStylingKeyWithStatic;
        var isKeyDuplicateOfStatic = false;
        var tStylingKey;

        if (Array.isArray(tStylingKeyWithStatic)) {
          // We are case when the `TStylingKey` contains static fields as well.
          var staticKeyValueArray = tStylingKeyWithStatic;
          tStylingKey = staticKeyValueArray[1]; // unwrap.
          // We need to check if our key is present in the static so that we can mark it as duplicate.

          if (tStylingKey === null || keyValueArrayIndexOf(staticKeyValueArray, tStylingKey) > 0) {
            // tStylingKey is present in the statics, need to mark it as duplicate.
            isKeyDuplicateOfStatic = true;
          }
        } else {
          tStylingKey = tStylingKeyWithStatic;
        }

        if (isHostBinding) {
          // We are inserting host bindings
          // If we don't have template bindings then `tail` is 0.
          var hasTemplateBindings = tmplTail !== 0; // This is important to know because that means that the `head` can't point to the first
          // template bindings (there are none.) Instead the head points to the tail of the template.

          if (hasTemplateBindings) {
            // template head's "prev" will point to last host binding or to 0 if no host bindings yet
            var previousNode = getTStylingRangePrev(tData[tmplHead + 1]);
            tData[index + 1] = toTStylingRange(previousNode, tmplHead); // if a host binding has already been registered, we need to update the next of that host
            // binding to point to this one

            if (previousNode !== 0) {
              // We need to update the template-tail value to point to us.
              tData[previousNode + 1] = setTStylingRangeNext(tData[previousNode + 1], index);
            } // The "previous" of the template binding head should point to this host binding


            tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1], index);
          } else {
            tData[index + 1] = toTStylingRange(tmplHead, 0); // if a host binding has already been registered, we need to update the next of that host
            // binding to point to this one

            if (tmplHead !== 0) {
              // We need to update the template-tail value to point to us.
              tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1], index);
            } // if we don't have template, the head points to template-tail, and needs to be advanced.


            tmplHead = index;
          }
        } else {
          // We are inserting in template section.
          // We need to set this binding's "previous" to the current template tail
          tData[index + 1] = toTStylingRange(tmplTail, 0);
          ngDevMode && assertEqual(tmplHead !== 0 && tmplTail === 0, false, 'Adding template bindings after hostBindings is not allowed.');

          if (tmplHead === 0) {
            tmplHead = index;
          } else {
            // We need to update the previous value "next" to point to this binding
            tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1], index);
          }

          tmplTail = index;
        } // Now we need to update / compute the duplicates.
        // Starting with our location search towards head (least priority)


        if (isKeyDuplicateOfStatic) {
          tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1]);
        }

        markDuplicates(tData, tStylingKey, index, true, isClassBinding);
        markDuplicates(tData, tStylingKey, index, false, isClassBinding);
        markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding);
        tBindings = toTStylingRange(tmplHead, tmplTail);

        if (isClassBinding) {
          tNode.classBindings = tBindings;
        } else {
          tNode.styleBindings = tBindings;
        }
      }
      /**
       * Look into the residual styling to see if the current `tStylingKey` is duplicate of residual.
       *
       * @param tNode `TNode` where the residual is stored.
       * @param tStylingKey `TStylingKey` to store.
       * @param tData `TData` associated with the current `LView`.
       * @param index location of where `tStyleValue` should be stored (and linked into list.)
       * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.
       *                       `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)
       */


      function markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding) {
        var residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;

        if (residual != null
        /* or undefined */
        && typeof tStylingKey == 'string' && keyValueArrayIndexOf(residual, tStylingKey) >= 0) {
          // We have duplicate in the residual so mark ourselves as duplicate.
          tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1]);
        }
      }
      /**
       * Marks `TStyleValue`s as duplicates if another style binding in the list has the same
       * `TStyleValue`.
       *
       * NOTE: this function is intended to be called twice once with `isPrevDir` set to `true` and once
       * with it set to `false` to search both the previous as well as next items in the list.
       *
       * No duplicate case
       * ```
       *   [style.color]
       *   [style.width.px] <<- index
       *   [style.height.px]
       * ```
       *
       * In the above case adding `[style.width.px]` to the existing `[style.color]` produces no
       * duplicates because `width` is not found in any other part of the linked list.
       *
       * Duplicate case
       * ```
       *   [style.color]
       *   [style.width.em]
       *   [style.width.px] <<- index
       * ```
       * In the above case adding `[style.width.px]` will produce a duplicate with `[style.width.em]`
       * because `width` is found in the chain.
       *
       * Map case 1
       * ```
       *   [style.width.px]
       *   [style.color]
       *   [style]  <<- index
       * ```
       * In the above case adding `[style]` will produce a duplicate with any other bindings because
       * `[style]` is a Map and as such is fully dynamic and could produce `color` or `width`.
       *
       * Map case 2
       * ```
       *   [style]
       *   [style.width.px]
       *   [style.color]  <<- index
       * ```
       * In the above case adding `[style.color]` will produce a duplicate because there is already a
       * `[style]` binding which is a Map and as such is fully dynamic and could produce `color` or
       * `width`.
       *
       * NOTE: Once `[style]` (Map) is added into the system all things are mapped as duplicates.
       * NOTE: We use `style` as example, but same logic is applied to `class`es as well.
       *
       * @param tData `TData` where the linked list is stored.
       * @param tStylingKey `TStylingKeyPrimitive` which contains the value to compare to other keys in
       *        the linked list.
       * @param index Starting location in the linked list to search from
       * @param isPrevDir Direction.
       *        - `true` for previous (lower priority);
       *        - `false` for next (higher priority).
       */


      function markDuplicates(tData, tStylingKey, index, isPrevDir, isClassBinding) {
        var tStylingAtIndex = tData[index + 1];
        var isMap = tStylingKey === null;
        var cursor = isPrevDir ? getTStylingRangePrev(tStylingAtIndex) : getTStylingRangeNext(tStylingAtIndex);
        var foundDuplicate = false; // We keep iterating as long as we have a cursor
        // AND either:
        // - we found what we are looking for, OR
        // - we are a map in which case we have to continue searching even after we find what we were
        //   looking for since we are a wild card and everything needs to be flipped to duplicate.

        while (cursor !== 0 && (foundDuplicate === false || isMap)) {
          ngDevMode && assertIndexInRange(tData, cursor);
          var tStylingValueAtCursor = tData[cursor];
          var tStyleRangeAtCursor = tData[cursor + 1];

          if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {
            foundDuplicate = true;
            tData[cursor + 1] = isPrevDir ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor) : setTStylingRangePrevDuplicate(tStyleRangeAtCursor);
          }

          cursor = isPrevDir ? getTStylingRangePrev(tStyleRangeAtCursor) : getTStylingRangeNext(tStyleRangeAtCursor);
        }

        if (foundDuplicate) {
          // if we found a duplicate, than mark ourselves.
          tData[index + 1] = isPrevDir ? setTStylingRangePrevDuplicate(tStylingAtIndex) : setTStylingRangeNextDuplicate(tStylingAtIndex);
        }
      }
      /**
       * Determines if two `TStylingKey`s are a match.
       *
       * When computing whether a binding contains a duplicate, we need to compare if the instruction
       * `TStylingKey` has a match.
       *
       * Here are examples of `TStylingKey`s which match given `tStylingKeyCursor` is:
       * - `color`
       *    - `color`    // Match another color
       *    - `null`     // That means that `tStylingKey` is a `classMap`/`styleMap` instruction
       *    - `['', 'color', 'other', true]` // wrapped `color` so match
       *    - `['', null, 'other', true]`       // wrapped `null` so match
       *    - `['', 'width', 'color', 'value']` // wrapped static value contains a match on `'color'`
       * - `null`       // `tStylingKeyCursor` always match as it is `classMap`/`styleMap` instruction
       *
       * @param tStylingKeyCursor
       * @param tStylingKey
       */


      function isStylingMatch(tStylingKeyCursor, tStylingKey) {
        ngDevMode && assertNotEqual(Array.isArray(tStylingKey), true, 'Expected that \'tStylingKey\' has been unwrapped');

        if (tStylingKeyCursor === null || // If the cursor is `null` it means that we have map at that
        // location so we must assume that we have a match.
        tStylingKey == null || // If `tStylingKey` is `null` then it is a map therefor assume that it
        // contains a match.
        (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) === tStylingKey // If the keys match explicitly than we are a match.
        ) {
          return true;
        } else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === 'string') {
          // if we did not find a match, but `tStylingKeyCursor` is `KeyValueArray` that means cursor has
          // statics and we need to check those as well.
          return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >= 0; // see if we are matching the key
        }

        return false;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // Global state of the parser. (This makes parser non-reentrant, but that is not an issue)


      var parserState = {
        textEnd: 0,
        key: 0,
        keyEnd: 0,
        value: 0,
        valueEnd: 0
      };
      /**
       * Retrieves the last parsed `key` of style.
       * @param text the text to substring the key from.
       */

      function getLastParsedKey(text) {
        return text.substring(parserState.key, parserState.keyEnd);
      }
      /**
       * Retrieves the last parsed `value` of style.
       * @param text the text to substring the key from.
       */


      function getLastParsedValue(text) {
        return text.substring(parserState.value, parserState.valueEnd);
      }
      /**
       * Initializes `className` string for parsing and parses the first token.
       *
       * This function is intended to be used in this format:
       * ```
       * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {
       *   const key = getLastParsedKey();
       *   ...
       * }
       * ```
       * @param text `className` to parse
       * @returns index where the next invocation of `parseClassNameNext` should resume.
       */


      function parseClassName(text) {
        resetParserState(text);
        return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd));
      }
      /**
       * Parses next `className` token.
       *
       * This function is intended to be used in this format:
       * ```
       * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {
       *   const key = getLastParsedKey();
       *   ...
       * }
       * ```
       *
       * @param text `className` to parse
       * @param index where the parsing should resume.
       * @returns index where the next invocation of `parseClassNameNext` should resume.
       */


      function parseClassNameNext(text, index) {
        var end = parserState.textEnd;

        if (end === index) {
          return -1;
        }

        index = parserState.keyEnd = consumeClassToken(text, parserState.key = index, end);
        return consumeWhitespace(text, index, end);
      }
      /**
       * Initializes `cssText` string for parsing and parses the first key/values.
       *
       * This function is intended to be used in this format:
       * ```
       * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {
       *   const key = getLastParsedKey();
       *   const value = getLastParsedValue();
       *   ...
       * }
       * ```
       * @param text `cssText` to parse
       * @returns index where the next invocation of `parseStyleNext` should resume.
       */


      function parseStyle(text) {
        resetParserState(text);
        return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd));
      }
      /**
       * Parses the next `cssText` key/values.
       *
       * This function is intended to be used in this format:
       * ```
       * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {
       *   const key = getLastParsedKey();
       *   const value = getLastParsedValue();
       *   ...
       * }
       *
       * @param text `cssText` to parse
       * @param index where the parsing should resume.
       * @returns index where the next invocation of `parseStyleNext` should resume.
       */


      function parseStyleNext(text, startIndex) {
        var end = parserState.textEnd;
        var index = parserState.key = consumeWhitespace(text, startIndex, end);

        if (end === index) {
          // we reached an end so just quit
          return -1;
        }

        index = parserState.keyEnd = consumeStyleKey(text, index, end);
        index = consumeSeparator(text, index, end, 58
        /* COLON */
        );
        index = parserState.value = consumeWhitespace(text, index, end);
        index = parserState.valueEnd = consumeStyleValue(text, index, end);
        return consumeSeparator(text, index, end, 59
        /* SEMI_COLON */
        );
      }
      /**
       * Reset the global state of the styling parser.
       * @param text The styling text to parse.
       */


      function resetParserState(text) {
        parserState.key = 0;
        parserState.keyEnd = 0;
        parserState.value = 0;
        parserState.valueEnd = 0;
        parserState.textEnd = text.length;
      }
      /**
       * Returns index of next non-whitespace character.
       *
       * @param text Text to scan
       * @param startIndex Starting index of character where the scan should start.
       * @param endIndex Ending index of character where the scan should end.
       * @returns Index of next non-whitespace character (May be the same as `start` if no whitespace at
       *          that location.)
       */


      function consumeWhitespace(text, startIndex, endIndex) {
        while (startIndex < endIndex && text.charCodeAt(startIndex) <= 32
        /* SPACE */
        ) {
          startIndex++;
        }

        return startIndex;
      }
      /**
       * Returns index of last char in class token.
       *
       * @param text Text to scan
       * @param startIndex Starting index of character where the scan should start.
       * @param endIndex Ending index of character where the scan should end.
       * @returns Index after last char in class token.
       */


      function consumeClassToken(text, startIndex, endIndex) {
        while (startIndex < endIndex && text.charCodeAt(startIndex) > 32
        /* SPACE */
        ) {
          startIndex++;
        }

        return startIndex;
      }
      /**
       * Consumes all of the characters belonging to style key and token.
       *
       * @param text Text to scan
       * @param startIndex Starting index of character where the scan should start.
       * @param endIndex Ending index of character where the scan should end.
       * @returns Index after last style key character.
       */


      function consumeStyleKey(text, startIndex, endIndex) {
        var ch;

        while (startIndex < endIndex && ((ch = text.charCodeAt(startIndex)) === 45
        /* DASH */
        || ch === 95
        /* UNDERSCORE */
        || (ch & -33
        /* UPPER_CASE */
        ) >= 65
        /* A */
        && (ch & -33
        /* UPPER_CASE */
        ) <= 90
        /* Z */
        || ch >= 48
        /* ZERO */
        && ch <= 57
        /* NINE */
        )) {
          startIndex++;
        }

        return startIndex;
      }
      /**
       * Consumes all whitespace and the separator `:` after the style key.
       *
       * @param text Text to scan
       * @param startIndex Starting index of character where the scan should start.
       * @param endIndex Ending index of character where the scan should end.
       * @returns Index after separator and surrounding whitespace.
       */


      function consumeSeparator(text, startIndex, endIndex, separator) {
        startIndex = consumeWhitespace(text, startIndex, endIndex);

        if (startIndex < endIndex) {
          if (ngDevMode && text.charCodeAt(startIndex) !== separator) {
            malformedStyleError(text, String.fromCharCode(separator), startIndex);
          }

          startIndex++;
        }

        return startIndex;
      }
      /**
       * Consumes style value honoring `url()` and `""` text.
       *
       * @param text Text to scan
       * @param startIndex Starting index of character where the scan should start.
       * @param endIndex Ending index of character where the scan should end.
       * @returns Index after last style value character.
       */


      function consumeStyleValue(text, startIndex, endIndex) {
        var ch1 = -1; // 1st previous character

        var ch2 = -1; // 2nd previous character

        var ch3 = -1; // 3rd previous character

        var i = startIndex;
        var lastChIndex = i;

        while (i < endIndex) {
          var ch = text.charCodeAt(i++);

          if (ch === 59
          /* SEMI_COLON */
          ) {
            return lastChIndex;
          } else if (ch === 34
          /* DOUBLE_QUOTE */
          || ch === 39
          /* SINGLE_QUOTE */
          ) {
            lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);
          } else if (startIndex === i - 4 && // We have seen only 4 characters so far "URL(" (Ignore "foo_URL()")
          ch3 === 85
          /* U */
          && ch2 === 82
          /* R */
          && ch1 === 76
          /* L */
          && ch === 40
          /* OPEN_PAREN */
          ) {
            lastChIndex = i = consumeQuotedText(text, 41
            /* CLOSE_PAREN */
            , i, endIndex);
          } else if (ch > 32
          /* SPACE */
          ) {
            // if we have a non-whitespace character then capture its location
            lastChIndex = i;
          }

          ch3 = ch2;
          ch2 = ch1;
          ch1 = ch & -33
          /* UPPER_CASE */
          ;
        }

        return lastChIndex;
      }
      /**
       * Consumes all of the quoted characters.
       *
       * @param text Text to scan
       * @param quoteCharCode CharCode of either `"` or `'` quote or `)` for `url(...)`.
       * @param startIndex Starting index of character where the scan should start.
       * @param endIndex Ending index of character where the scan should end.
       * @returns Index after quoted characters.
       */


      function consumeQuotedText(text, quoteCharCode, startIndex, endIndex) {
        var ch1 = -1; // 1st previous character

        var index = startIndex;

        while (index < endIndex) {
          var ch = text.charCodeAt(index++);

          if (ch == quoteCharCode && ch1 !== 92
          /* BACK_SLASH */
          ) {
            return index;
          }

          if (ch == 92
          /* BACK_SLASH */
          && ch1 === 92
          /* BACK_SLASH */
          ) {
            // two back slashes cancel each other out. For example `"\\"` should properly end the
            // quotation. (It should not assume that the last `"` is escaped.)
            ch1 = 0;
          } else {
            ch1 = ch;
          }
        }

        throw ngDevMode ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex) : new Error();
      }

      function malformedStyleError(text, expecting, index) {
        ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');
        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, "'."));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Update a style binding on an element with the provided value.
       *
       * If the style value is falsy then it will be removed from the element
       * (or assigned a different value depending if there are any styles placed
       * on the element with `styleMap` or any static styles that are
       * present from when the element was created with `styling`).
       *
       * Note that the styling element is updated as part of `stylingApply`.
       *
       * @param prop A valid CSS property.
       * @param value New value to write (`null` or an empty string to remove).
       * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.
       *
       * Note that this will apply the provided style value to the host element if this function is called
       * within a host binding function.
       *
       * @codeGenApi
       */


      function ɵɵstyleProp(prop, value, suffix) {
        checkStylingProperty(prop, value, suffix, false);
        return ɵɵstyleProp;
      }
      /**
       * Update a class binding on an element with the provided value.
       *
       * This instruction is meant to handle the `[class.foo]="exp"` case and,
       * therefore, the class binding itself must already be allocated using
       * `styling` within the creation block.
       *
       * @param prop A valid CSS class (only one).
       * @param value A true/false value which will turn the class on or off.
       *
       * Note that this will apply the provided class value to the host element if this function
       * is called within a host binding function.
       *
       * @codeGenApi
       */


      function ɵɵclassProp(className, value) {
        checkStylingProperty(className, value, null, true);
        return ɵɵclassProp;
      }
      /**
       * Update style bindings using an object literal on an element.
       *
       * This instruction is meant to apply styling via the `[style]="exp"` template bindings.
       * When styles are applied to the element they will then be updated with respect to
       * any styles/classes set via `styleProp`. If any styles are set to falsy
       * then they will be removed from the element.
       *
       * Note that the styling instruction will not be applied until `stylingApply` is called.
       *
       * @param styles A key/value style map of the styles that will be applied to the given element.
       *        Any missing styles (that have already been applied to the element beforehand) will be
       *        removed (unset) from the element's styling.
       *
       * Note that this will apply the provided styleMap value to the host element if this function
       * is called within a host binding.
       *
       * @codeGenApi
       */


      function ɵɵstyleMap(styles) {
        checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false);
      }
      /**
       * Parse text as style and add values to KeyValueArray.
       *
       * This code is pulled out to a separate function so that it can be tree shaken away if it is not
       * needed. It is only referenced from `ɵɵstyleMap`.
       *
       * @param keyValueArray KeyValueArray to add parsed values to.
       * @param text text to parse.
       */


      function styleStringParser(keyValueArray, text) {
        for (var i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) {
          styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text));
        }
      }
      /**
       * Update class bindings using an object literal or class-string on an element.
       *
       * This instruction is meant to apply styling via the `[class]="exp"` template bindings.
       * When classes are applied to the element they will then be updated with
       * respect to any styles/classes set via `classProp`. If any
       * classes are set to falsy then they will be removed from the element.
       *
       * Note that the styling instruction will not be applied until `stylingApply` is called.
       * Note that this will the provided classMap value to the host element if this function is called
       * within a host binding.
       *
       * @param classes A key/value map or string of CSS classes that will be added to the
       *        given element. Any missing classes (that have already been applied to the element
       *        beforehand) will be removed (unset) from the element's list of CSS classes.
       *
       * @codeGenApi
       */


      function ɵɵclassMap(classes) {
        checkStylingMap(keyValueArraySet, classStringParser, classes, true);
      }
      /**
       * Parse text as class and add values to KeyValueArray.
       *
       * This code is pulled out to a separate function so that it can be tree shaken away if it is not
       * needed. It is only referenced from `ɵɵclassMap`.
       *
       * @param keyValueArray KeyValueArray to add parsed values to.
       * @param text text to parse.
       */


      function classStringParser(keyValueArray, text) {
        for (var i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {
          keyValueArraySet(keyValueArray, getLastParsedKey(text), true);
        }
      }
      /**
       * Common code between `ɵɵclassProp` and `ɵɵstyleProp`.
       *
       * @param prop property name.
       * @param value binding value.
       * @param suffix suffix for the property (e.g. `em` or `px`)
       * @param isClassBased `true` if `class` change (`false` if `style`)
       */


      function checkStylingProperty(prop, value, suffix, isClassBased) {
        var lView = getLView();
        var tView = getTView(); // Styling instructions use 2 slots per binding.
        // 1. one for the value / TStylingKey
        // 2. one for the intermittent-value / TStylingRange

        var bindingIndex = incrementBindingIndex(2);

        if (tView.firstUpdatePass) {
          stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);
        }

        if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {
          var tNode = tView.data[getSelectedIndex()];
          updateStyling(tView, tNode, lView, lView[RENDERER], prop, lView[bindingIndex + 1] = normalizeSuffix(value, suffix), isClassBased, bindingIndex);
        }
      }
      /**
       * Common code between `ɵɵclassMap` and `ɵɵstyleMap`.
       *
       * @param keyValueArraySet (See `keyValueArraySet` in "util/array_utils") Gets passed in as a
       *        function so that `style` can be processed. This is done for tree shaking purposes.
       * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class`
       *        have different parsers.)
       * @param value bound value from application
       * @param isClassBased `true` if `class` change (`false` if `style`)
       */


      function checkStylingMap(keyValueArraySet, stringParser, value, isClassBased) {
        var tView = getTView();
        var bindingIndex = incrementBindingIndex(2);

        if (tView.firstUpdatePass) {
          stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);
        }

        var lView = getLView();

        if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {
          // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the
          // if so as not to read unnecessarily.
          var tNode = tView.data[getSelectedIndex()];

          if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) {
            if (ngDevMode) {
              // verify that if we are shadowing then `TData` is appropriately marked so that we skip
              // processing this binding in styling resolution.
              var tStylingKey = tView.data[bindingIndex];
              assertEqual(Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false, 'Styling linked list shadow input should be marked as \'false\'');
            } // VE does not concatenate the static portion like we are doing here.
            // Instead VE just ignores the static completely if dynamic binding is present.
            // Because of locality we have already set the static portion because we don't know if there
            // is a dynamic portion until later. If we would ignore the static portion it would look like
            // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong
            // thing as it would think that the static portion was removed. For this reason we
            // concatenate it so that `[ngStyle]`/`[ngClass]`  can continue to work on changed.


            var staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;
            ngDevMode && isClassBased === false && staticPrefix !== null && assertEqual(staticPrefix.endsWith(';'), true, 'Expecting static portion to end with \';\'');

            if (staticPrefix !== null) {
              // We want to make sure that falsy values of `value` become empty strings.
              value = concatStringsWithSpace(staticPrefix, value ? value : '');
            } // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`.
            // This takes over the `[style]` binding. (Same for `[class]`)


            setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);
          } else {
            updateStylingMap(tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1], lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value), isClassBased, bindingIndex);
          }
        }
      }
      /**
       * Determines when the binding is in `hostBindings` section
       *
       * @param tView Current `TView`
       * @param bindingIndex index of binding which we would like if it is in `hostBindings`
       */


      function isInHostBindings(tView, bindingIndex) {
        // All host bindings are placed after the expando section.
        return bindingIndex >= tView.expandoStartIndex;
      }
      /**
       * Collects the necessary information to insert the binding into a linked list of style bindings
       * using `insertTStylingBinding`.
       *
       * @param tView `TView` where the binding linked list will be stored.
       * @param tStylingKey Property/key of the binding.
       * @param bindingIndex Index of binding associated with the `prop`
       * @param isClassBased `true` if `class` change (`false` if `style`)
       */


      function stylingFirstUpdatePass(tView, tStylingKey, bindingIndex, isClassBased) {
        ngDevMode && assertFirstUpdatePass(tView);
        var tData = tView.data;

        if (tData[bindingIndex + 1] === null) {
          // The above check is necessary because we don't clear first update pass until first successful
          // (no exception) template execution. This prevents the styling instruction from double adding
          // itself to the list.
          // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the
          // if so as not to read unnecessarily.
          var tNode = tData[getSelectedIndex()];
          ngDevMode && assertDefined(tNode, 'TNode expected');
          var isHostBindings = isInHostBindings(tView, bindingIndex);

          if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) {
            // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding.
            // If there is a directive which uses `@Input('style')` or `@Input('class')` than
            // we need to neutralize this binding since that directive is shadowing it.
            // We turn this into a noop by setting the key to `false`
            tStylingKey = false;
          }

          tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);
          insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);
        }
      }
      /**
       * Adds static styling information to the binding if applicable.
       *
       * The linked list of styles not only stores the list and keys, but also stores static styling
       * information on some of the keys. This function determines if the key should contain the styling
       * information and computes it.
       *
       * See `TStylingStatic` for more details.
       *
       * @param tData `TData` where the linked list is stored.
       * @param tNode `TNode` for which the styling is being computed.
       * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey`
       * @param isClassBased `true` if `class` (`false` if `style`)
       */


      function wrapInStaticStylingKey(tData, tNode, stylingKey, isClassBased) {
        var hostDirectiveDef = getCurrentDirectiveDef(tData);
        var residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;

        if (hostDirectiveDef === null) {
          // We are in template node.
          // If template node already had styling instruction then it has already collected the static
          // styling and there is no need to collect them again. We know that we are the first styling
          // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet).
          var isFirstStylingInstructionInTemplate = (isClassBased ? tNode.classBindings : tNode.styleBindings) === 0;

          if (isFirstStylingInstructionInTemplate) {
            // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point
            // they are already merged and it would not be possible to figure which property belongs where
            // in the priority.
            stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased);
            stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased); // We know that if we have styling binding in template we can't have residual.

            residual = null;
          }
        } else {
          // We are in host binding node and there was no binding instruction in template node.
          // This means that we need to compute the residual.
          var directiveStylingLast = tNode.directiveStylingLast;
          var isFirstStylingInstructionInHostBinding = directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;

          if (isFirstStylingInstructionInHostBinding) {
            stylingKey = collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased);

            if (residual === null) {
              // - If `null` than either:
              //    - Template styling instruction already ran and it has consumed the static
              //      styling into its `TStylingKey` and so there is no need to update residual. Instead
              //      we need to update the `TStylingKey` associated with the first template node
              //      instruction. OR
              //    - Some other styling instruction ran and determined that there are no residuals
              var templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);

              if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) {
                // Only recompute if `templateStylingKey` had static values. (If no static value found
                // then there is nothing to do since this operation can only produce less static keys, not
                // more.)
                templateStylingKey = collectStylingFromDirectives(null, tData, tNode, templateStylingKey[1]
                /* unwrap previous statics */
                , isClassBased);
                templateStylingKey = collectStylingFromTAttrs(templateStylingKey, tNode.attrs, isClassBased);
                setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey);
              }
            } else {
              // We only need to recompute residual if it is not `null`.
              // - If existing residual (implies there was no template styling). This means that some of
              //   the statics may have moved from the residual to the `stylingKey` and so we have to
              //   recompute.
              // - If `undefined` this is the first time we are running.
              residual = collectResidual(tData, tNode, isClassBased);
            }
          }
        }

        if (residual !== undefined) {
          isClassBased ? tNode.residualClasses = residual : tNode.residualStyles = residual;
        }

        return stylingKey;
      }
      /**
       * Retrieve the `TStylingKey` for the template styling instruction.
       *
       * This is needed since `hostBinding` styling instructions are inserted after the template
       * instruction. While the template instruction needs to update the residual in `TNode` the
       * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because
       * the template instruction is downstream from the `hostBindings` instructions.
       *
       * @param tData `TData` where the linked list is stored.
       * @param tNode `TNode` for which the styling is being computed.
       * @param isClassBased `true` if `class` (`false` if `style`)
       * @return `TStylingKey` if found or `undefined` if not found.
       */


      function getTemplateHeadTStylingKey(tData, tNode, isClassBased) {
        var bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;

        if (getTStylingRangeNext(bindings) === 0) {
          // There does not seem to be a styling instruction in the `template`.
          return undefined;
        }

        return tData[getTStylingRangePrev(bindings)];
      }
      /**
       * Update the `TStylingKey` of the first template instruction in `TNode`.
       *
       * Logically `hostBindings` styling instructions are of lower priority than that of the template.
       * However, they execute after the template styling instructions. This means that they get inserted
       * in front of the template styling instructions.
       *
       * If we have a template styling instruction and a new `hostBindings` styling instruction is
       * executed it means that it may need to steal static fields from the template instruction. This
       * method allows us to update the first template instruction `TStylingKey` with a new value.
       *
       * Assume:
       * ```
       * <div my-dir style="color: red" [style.color]="tmplExp"></div>
       *
       * @Directive({
       *   host: {
       *     'style': 'width: 100px',
       *     '[style.color]': 'dirExp',
       *   }
       * })
       * class MyDir {}
       * ```
       *
       * when `[style.color]="tmplExp"` executes it creates this data structure.
       * ```
       *  ['', 'color', 'color', 'red', 'width', '100px'],
       * ```
       *
       * The reason for this is that the template instruction does not know if there are styling
       * instructions and must assume that there are none and must collect all of the static styling.
       * (both
       * `color' and 'width`)
       *
       * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list.
       * ```
       *  ['', 'color', 'width', '100px'],  // newly inserted
       *  ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong
       * ```
       *
       * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to
       * update it like so:
       * ```
       *  ['', 'color', 'width', '100px'],
       *  ['', 'color', 'color', 'red'],    // UPDATE
       * ```
       *
       * @param tData `TData` where the linked list is stored.
       * @param tNode `TNode` for which the styling is being computed.
       * @param isClassBased `true` if `class` (`false` if `style`)
       * @param tStylingKey New `TStylingKey` which is replacing the old one.
       */


      function setTemplateHeadTStylingKey(tData, tNode, isClassBased, tStylingKey) {
        var bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;
        ngDevMode && assertNotEqual(getTStylingRangeNext(bindings), 0, 'Expecting to have at least one template styling binding.');
        tData[getTStylingRangePrev(bindings)] = tStylingKey;
      }
      /**
       * Collect all static values after the current `TNode.directiveStylingLast` index.
       *
       * Collect the remaining styling information which has not yet been collected by an existing
       * styling instruction.
       *
       * @param tData `TData` where the `DirectiveDefs` are stored.
       * @param tNode `TNode` which contains the directive range.
       * @param isClassBased `true` if `class` (`false` if `style`)
       */


      function collectResidual(tData, tNode, isClassBased) {
        var residual = undefined;
        var directiveEnd = tNode.directiveEnd;
        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
        // collecting things after the last `hostBindings` directive which had a styling instruction.)

        for (var i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {
          var attrs = tData[i].hostAttrs;
          residual = collectStylingFromTAttrs(residual, attrs, isClassBased);
        }

        return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased);
      }
      /**
       * Collect the static styling information with lower priority than `hostDirectiveDef`.
       *
       * (This is opposite of residual styling.)
       *
       * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static
       *        styling. (Or `null` if template styling)
       * @param tData `TData` where the linked list is stored.
       * @param tNode `TNode` for which the styling is being computed.
       * @param stylingKey Existing `TStylingKey` to update or wrap.
       * @param isClassBased `true` if `class` (`false` if `style`)
       */


      function collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased) {
        // We need to loop because there can be directives which have `hostAttrs` but don't have
        // `hostBindings` so this loop catches up to the current directive..
        var currentDirective = null;
        var directiveEnd = tNode.directiveEnd;
        var directiveStylingLast = tNode.directiveStylingLast;

        if (directiveStylingLast === -1) {
          directiveStylingLast = tNode.directiveStart;
        } else {
          directiveStylingLast++;
        }

        while (directiveStylingLast < directiveEnd) {
          currentDirective = tData[directiveStylingLast];
          ngDevMode && assertDefined(currentDirective, 'expected to be defined');
          stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);
          if (currentDirective === hostDirectiveDef) break;
          directiveStylingLast++;
        }

        if (hostDirectiveDef !== null) {
          // we only advance the styling cursor if we are collecting data from host bindings.
          // Template executes before host bindings and so if we would update the index,
          // host bindings would not get their statics.
          tNode.directiveStylingLast = directiveStylingLast;
        }

        return stylingKey;
      }
      /**
       * Convert `TAttrs` into `TStylingStatic`.
       *
       * @param stylingKey existing `TStylingKey` to update or wrap.
       * @param attrs `TAttributes` to process.
       * @param isClassBased `true` if `class` (`false` if `style`)
       */


      function collectStylingFromTAttrs(stylingKey, attrs, isClassBased) {
        var desiredMarker = isClassBased ? 1
        /* Classes */
        : 2
        /* Styles */
        ;
        var currentMarker = -1
        /* ImplicitAttributes */
        ;

        if (attrs !== null) {
          for (var i = 0; i < attrs.length; i++) {
            var item = attrs[i];

            if (typeof item === 'number') {
              currentMarker = item;
            } else {
              if (currentMarker === desiredMarker) {
                if (!Array.isArray(stylingKey)) {
                  stylingKey = stylingKey === undefined ? [] : ['', stylingKey];
                }

                keyValueArraySet(stylingKey, item, isClassBased ? true : attrs[++i]);
              }
            }
          }
        }

        return stylingKey === undefined ? null : stylingKey;
      }
      /**
       * Convert user input to `KeyValueArray`.
       *
       * This function takes user input which could be `string`, Object literal, or iterable and converts
       * it into a consistent representation. The output of this is `KeyValueArray` (which is an array
       * where
       * even indexes contain keys and odd indexes contain values for those keys).
       *
       * The advantage of converting to `KeyValueArray` is that we can perform diff in an input
       * independent
       * way.
       * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be
       * applied)
       *
       * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the
       * difference in linear fashion without the need to allocate any additional data.
       *
       * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine
       * which values need to be deleted, over the new `Map` to determine additions, and we would have to
       * keep additional `Map` to keep track of duplicates or items which have not yet been visited.
       *
       * @param keyValueArraySet (See `keyValueArraySet` in "util/array_utils") Gets passed in as a
       *        function so that `style` can be processed. This is done
       *        for tree shaking purposes.
       * @param stringParser The parser is passed in so that it will be tree shakable. See
       *        `styleStringParser` and `classStringParser`
       * @param value The value to parse/convert to `KeyValueArray`
       */


      function toStylingKeyValueArray(keyValueArraySet, stringParser, value) {
        if (value == null
        /*|| value === undefined */
        || value === '') return EMPTY_ARRAY$3;
        var styleKeyValueArray = [];
        var unwrappedValue = unwrapSafeValue(value);

        if (Array.isArray(unwrappedValue)) {
          for (var i = 0; i < unwrappedValue.length; i++) {
            keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);
          }
        } else if (typeof unwrappedValue === 'object') {
          for (var key in unwrappedValue) {
            if (unwrappedValue.hasOwnProperty(key)) {
              keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]);
            }
          }
        } else if (typeof unwrappedValue === 'string') {
          stringParser(styleKeyValueArray, unwrappedValue);
        } else {
          ngDevMode && throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue);
        }

        return styleKeyValueArray;
      }
      /**
       * Set a `value` for a `key`.
       *
       * See: `keyValueArraySet` for details
       *
       * @param keyValueArray KeyValueArray to add to.
       * @param key Style key to add.
       * @param value The value to set.
       */


      function styleKeyValueArraySet(keyValueArray, key, value) {
        keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));
      }
      /**
       * Update map based styling.
       *
       * Map based styling could be anything which contains more than one binding. For example `string`,
       * or object literal. Dealing with all of these types would complicate the logic so
       * instead this function expects that the complex input is first converted into normalized
       * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it
       * very cheap to compute deltas between the previous and current value.
       *
       * @param tView Associated `TView.data` contains the linked list of binding priorities.
       * @param tNode `TNode` where the binding is located.
       * @param lView `LView` contains the values associated with other styling binding at this `TNode`.
       * @param renderer Renderer to use if any updates.
       * @param oldKeyValueArray Previous value represented as `KeyValueArray`
       * @param newKeyValueArray Current value represented as `KeyValueArray`
       * @param isClassBased `true` if `class` (`false` if `style`)
       * @param bindingIndex Binding index of the binding.
       */


      function updateStylingMap(tView, tNode, lView, renderer, oldKeyValueArray, newKeyValueArray, isClassBased, bindingIndex) {
        if (oldKeyValueArray === NO_CHANGE) {
          // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray.
          oldKeyValueArray = EMPTY_ARRAY$3;
        }

        var oldIndex = 0;
        var newIndex = 0;
        var oldKey = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;
        var newKey = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;

        while (oldKey !== null || newKey !== null) {
          ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?');
          ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?');
          var oldValue = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;
          var newValue = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;
          var setKey = null;
          var setValue = undefined;

          if (oldKey === newKey) {
            // UPDATE: Keys are equal => new value is overwriting old value.
            oldIndex += 2;
            newIndex += 2;

            if (oldValue !== newValue) {
              setKey = newKey;
              setValue = newValue;
            }
          } else if (newKey === null || oldKey !== null && oldKey < newKey) {
            // DELETE: oldKey key is missing or we did not find the oldKey in the newValue
            // (because the keyValueArray is sorted and `newKey` is found later alphabetically).
            // `"background" < "color"` so we need to delete `"background"` because it is not found in the
            // new array.
            oldIndex += 2;
            setKey = oldKey;
          } else {
            // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key.
            // `"color" > "background"` so we need to add `color` because it is in new array but not in
            // old array.
            ngDevMode && assertDefined(newKey, 'Expecting to have a valid key');
            newIndex += 2;
            setKey = newKey;
            setValue = newValue;
          }

          if (setKey !== null) {
            updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);
          }

          oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;
          newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;
        }
      }
      /**
       * Update a simple (property name) styling.
       *
       * This function takes `prop` and updates the DOM to that value. The function takes the binding
       * value as well as binding priority into consideration to determine which value should be written
       * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks
       * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.)
       *
       * @param tView Associated `TView.data` contains the linked list of binding priorities.
       * @param tNode `TNode` where the binding is located.
       * @param lView `LView` contains the values associated with other styling binding at this `TNode`.
       * @param renderer Renderer to use if any updates.
       * @param prop Either style property name or a class name.
       * @param value Either style value for `prop` or `true`/`false` if `prop` is class.
       * @param isClassBased `true` if `class` (`false` if `style`)
       * @param bindingIndex Binding index of the binding.
       */


      function updateStyling(tView, tNode, lView, renderer, prop, value, isClassBased, bindingIndex) {
        if (!(tNode.type & 3
        /* AnyRNode */
        )) {
          // It is possible to have styling on non-elements (such as ng-container).
          // This is rare, but it does happen. In such a case, just ignore the binding.
          return;
        }

        var tData = tView.data;
        var tRange = tData[bindingIndex + 1];
        var higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ? findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) : undefined;

        if (!isStylingValuePresent(higherPriorityValue)) {
          // We don't have a next duplicate, or we did not find a duplicate value.
          if (!isStylingValuePresent(value)) {
            // We should delete current value or restore to lower priority value.
            if (getTStylingRangePrevDuplicate(tRange)) {
              // We have a possible prev duplicate, let's retrieve it.
              value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased);
            }
          }

          var rNode = getNativeByIndex(getSelectedIndex(), lView);
          applyStyling(renderer, isClassBased, rNode, prop, value);
        }
      }
      /**
       * Search for styling value with higher priority which is overwriting current value, or a
       * value of lower priority to which we should fall back if the value is `undefined`.
       *
       * When value is being applied at a location, related values need to be consulted.
       * - If there is a higher priority binding, we should be using that one instead.
       *   For example `<div  [style]="{color:exp1}" [style.color]="exp2">` change to `exp1`
       *   requires that we check `exp2` to see if it is set to value other than `undefined`.
       * - If there is a lower priority binding and we are changing to `undefined`
       *   For example `<div  [style]="{color:exp1}" [style.color]="exp2">` change to `exp2` to
       *   `undefined` requires that we check `exp1` (and static values) and use that as new value.
       *
       * NOTE: The styling stores two values.
       * 1. The raw value which came from the application is stored at `index + 0` location. (This value
       *    is used for dirty checking).
       * 2. The normalized value is stored at `index + 1`.
       *
       * @param tData `TData` used for traversing the priority.
       * @param tNode `TNode` to use for resolving static styling. Also controls search direction.
       *   - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.
       *      If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.
       *   - `null` search prev and go all the way to end. Return last value where
       *     `isStylingValuePresent(value)` is true.
       * @param lView `LView` used for retrieving the actual values.
       * @param prop Property which we are interested in.
       * @param index Starting index in the linked list of styling bindings where the search should start.
       * @param isClassBased `true` if `class` (`false` if `style`)
       */


      function findStylingValue(tData, tNode, lView, prop, index, isClassBased) {
        // `TNode` to use for resolving static styling. Also controls search direction.
        //   - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.
        //      If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.
        //   - `null` search prev and go all the way to end. Return last value where
        //     `isStylingValuePresent(value)` is true.
        var isPrevDirection = tNode === null;
        var value = undefined;

        while (index > 0) {
          var rawKey = tData[index];
          var containsStatics = Array.isArray(rawKey); // Unwrap the key if we contain static values.

          var key = containsStatics ? rawKey[1] : rawKey;
          var isStylingMap = key === null;
          var valueAtLViewIndex = lView[index + 1];

          if (valueAtLViewIndex === NO_CHANGE) {
            // In firstUpdatePass the styling instructions create a linked list of styling.
            // On subsequent passes it is possible for a styling instruction to try to read a binding
            // which
            // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that
            // we have `undefined` (or empty array in case of styling-map instruction) instead. This
            // allows the resolution to apply the value (which may later be overwritten when the
            // binding actually executes.)
            valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY$3 : undefined;
          }

          var currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) : key === prop ? valueAtLViewIndex : undefined;

          if (containsStatics && !isStylingValuePresent(currentValue)) {
            currentValue = keyValueArrayGet(rawKey, prop);
          }

          if (isStylingValuePresent(currentValue)) {
            value = currentValue;

            if (isPrevDirection) {
              return value;
            }
          }

          var tRange = tData[index + 1];
          index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);
        }

        if (tNode !== null) {
          // in case where we are going in next direction AND we did not find anything, we need to
          // consult residual styling
          var residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;

          if (residual != null
          /** OR residual !=== undefined */
          ) {
            value = keyValueArrayGet(residual, prop);
          }
        }

        return value;
      }
      /**
       * Determines if the binding value should be used (or if the value is 'undefined' and hence priority
       * resolution should be used.)
       *
       * @param value Binding style value.
       */


      function isStylingValuePresent(value) {
        // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't
        // have an opinion as to what this binding should be and you should consult other bindings by
        // priority to determine the valid value.
        // This is extracted into a single function so that we have a single place to control this.
        return value !== undefined;
      }
      /**
       * Normalizes and/or adds a suffix to the value.
       *
       * If value is `null`/`undefined` no suffix is added
       * @param value
       * @param suffix
       */


      function normalizeSuffix(value, suffix) {
        if (value == null
        /** || value === undefined */
        ) {// do nothing
        } else if (typeof suffix === 'string') {
          value = value + suffix;
        } else if (typeof value === 'object') {
          value = stringify(unwrapSafeValue(value));
        }

        return value;
      }
      /**
       * Tests if the `TNode` has input shadow.
       *
       * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or
       * `@Input('class')` as input.
       *
       * @param tNode `TNode` which we would like to see if it has shadow.
       * @param isClassBased `true` if `class` (`false` if `style`)
       */


      function hasStylingInputShadow(tNode, isClassBased) {
        return (tNode.flags & (isClassBased ? 16
        /* hasClassInput */
        : 32
        /* hasStyleInput */
        )) !== 0;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Create static text node
       *
       * @param index Index of the node in the data array
       * @param value Static string value to write.
       *
       * @codeGenApi
       */


      function ɵɵtext(index) {
        var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
        var lView = getLView();
        var tView = getTView();
        var adjustedIndex = index + HEADER_OFFSET;
        ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'text nodes should be created before any bindings');
        ngDevMode && assertIndexInRange(lView, adjustedIndex);
        var tNode = tView.firstCreatePass ? getOrCreateTNode(tView, adjustedIndex, 1
        /* Text */
        , value, null) : tView.data[adjustedIndex];
        var textNative = lView[adjustedIndex] = createTextNode(lView[RENDERER], value);
        appendChild(tView, lView, textNative, tNode); // Text nodes are self closing.

        setCurrentTNode(tNode, false);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       *
       * Update text content with a lone bound value
       *
       * Used when a text node has 1 interpolated value in it, an no additional text
       * surrounds that interpolated value:
       *
       * ```html
       * <div>{{v0}}</div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵtextInterpolate(v0);
       * ```
       * @returns itself, so that it may be chained.
       * @see textInterpolateV
       * @codeGenApi
       */


      function ɵɵtextInterpolate(v0) {
        ɵɵtextInterpolate1('', v0, '');
        return ɵɵtextInterpolate;
      }
      /**
       *
       * Update text content with single bound value surrounded by other text.
       *
       * Used when a text node has 1 interpolated value in it:
       *
       * ```html
       * <div>prefix{{v0}}suffix</div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵtextInterpolate1('prefix', v0, 'suffix');
       * ```
       * @returns itself, so that it may be chained.
       * @see textInterpolateV
       * @codeGenApi
       */


      function ɵɵtextInterpolate1(prefix, v0, suffix) {
        var lView = getLView();
        var interpolated = interpolation1(lView, prefix, v0, suffix);

        if (interpolated !== NO_CHANGE) {
          textBindingInternal(lView, getSelectedIndex(), interpolated);
        }

        return ɵɵtextInterpolate1;
      }
      /**
       *
       * Update text content with 2 bound values surrounded by other text.
       *
       * Used when a text node has 2 interpolated values in it:
       *
       * ```html
       * <div>prefix{{v0}}-{{v1}}suffix</div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');
       * ```
       * @returns itself, so that it may be chained.
       * @see textInterpolateV
       * @codeGenApi
       */


      function ɵɵtextInterpolate2(prefix, v0, i0, v1, suffix) {
        var lView = getLView();
        var interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);

        if (interpolated !== NO_CHANGE) {
          textBindingInternal(lView, getSelectedIndex(), interpolated);
        }

        return ɵɵtextInterpolate2;
      }
      /**
       *
       * Update text content with 3 bound values surrounded by other text.
       *
       * Used when a text node has 3 interpolated values in it:
       *
       * ```html
       * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵtextInterpolate3(
       * 'prefix', v0, '-', v1, '-', v2, 'suffix');
       * ```
       * @returns itself, so that it may be chained.
       * @see textInterpolateV
       * @codeGenApi
       */


      function ɵɵtextInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {
        var lView = getLView();
        var interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);

        if (interpolated !== NO_CHANGE) {
          textBindingInternal(lView, getSelectedIndex(), interpolated);
        }

        return ɵɵtextInterpolate3;
      }
      /**
       *
       * Update text content with 4 bound values surrounded by other text.
       *
       * Used when a text node has 4 interpolated values in it:
       *
       * ```html
       * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵtextInterpolate4(
       * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
       * ```
       * @returns itself, so that it may be chained.
       * @see ɵɵtextInterpolateV
       * @codeGenApi
       */


      function ɵɵtextInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {
        var lView = getLView();
        var interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);

        if (interpolated !== NO_CHANGE) {
          textBindingInternal(lView, getSelectedIndex(), interpolated);
        }

        return ɵɵtextInterpolate4;
      }
      /**
       *
       * Update text content with 5 bound values surrounded by other text.
       *
       * Used when a text node has 5 interpolated values in it:
       *
       * ```html
       * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵtextInterpolate5(
       * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
       * ```
       * @returns itself, so that it may be chained.
       * @see textInterpolateV
       * @codeGenApi
       */


      function ɵɵtextInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {
        var lView = getLView();
        var interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);

        if (interpolated !== NO_CHANGE) {
          textBindingInternal(lView, getSelectedIndex(), interpolated);
        }

        return ɵɵtextInterpolate5;
      }
      /**
       *
       * Update text content with 6 bound values surrounded by other text.
       *
       * Used when a text node has 6 interpolated values in it:
       *
       * ```html
       * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵtextInterpolate6(
       *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
       * ```
       *
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change. @returns itself, so that it may be chained.
       * @see textInterpolateV
       * @codeGenApi
       */


      function ɵɵtextInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {
        var lView = getLView();
        var interpolated = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);

        if (interpolated !== NO_CHANGE) {
          textBindingInternal(lView, getSelectedIndex(), interpolated);
        }

        return ɵɵtextInterpolate6;
      }
      /**
       *
       * Update text content with 7 bound values surrounded by other text.
       *
       * Used when a text node has 7 interpolated values in it:
       *
       * ```html
       * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵtextInterpolate7(
       *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
       * ```
       * @returns itself, so that it may be chained.
       * @see textInterpolateV
       * @codeGenApi
       */


      function ɵɵtextInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {
        var lView = getLView();
        var interpolated = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);

        if (interpolated !== NO_CHANGE) {
          textBindingInternal(lView, getSelectedIndex(), interpolated);
        }

        return ɵɵtextInterpolate7;
      }
      /**
       *
       * Update text content with 8 bound values surrounded by other text.
       *
       * Used when a text node has 8 interpolated values in it:
       *
       * ```html
       * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵtextInterpolate8(
       *  'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
       * ```
       * @returns itself, so that it may be chained.
       * @see textInterpolateV
       * @codeGenApi
       */


      function ɵɵtextInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {
        var lView = getLView();
        var interpolated = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);

        if (interpolated !== NO_CHANGE) {
          textBindingInternal(lView, getSelectedIndex(), interpolated);
        }

        return ɵɵtextInterpolate8;
      }
      /**
       * Update text content with 9 or more bound values other surrounded by text.
       *
       * Used when the number of interpolated values exceeds 8.
       *
       * ```html
       * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵtextInterpolateV(
       *  ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
       *  'suffix']);
       * ```
       *.
       * @param values The collection of values and the strings in between those values, beginning with
       * a string prefix and ending with a string suffix.
       * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
       *
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵtextInterpolateV(values) {
        var lView = getLView();
        var interpolated = interpolationV(lView, values);

        if (interpolated !== NO_CHANGE) {
          textBindingInternal(lView, getSelectedIndex(), interpolated);
        }

        return ɵɵtextInterpolateV;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       *
       * Update an interpolated class on an element with single bound value surrounded by text.
       *
       * Used when the value passed to a property has 1 interpolated value in it:
       *
       * ```html
       * <div class="prefix{{v0}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵclassMapInterpolate1(prefix, v0, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation1(lView, prefix, v0, suffix);
        checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);
      }
      /**
       *
       * Update an interpolated class on an element with 2 bound values surrounded by text.
       *
       * Used when the value passed to a property has 2 interpolated values in it:
       *
       * ```html
       * <div class="prefix{{v0}}-{{v1}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵclassMapInterpolate2(prefix, v0, i0, v1, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);
        checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);
      }
      /**
       *
       * Update an interpolated class on an element with 3 bound values surrounded by text.
       *
       * Used when the value passed to a property has 3 interpolated values in it:
       *
       * ```html
       * <div class="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵclassMapInterpolate3(
       * 'prefix', v0, '-', v1, '-', v2, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵclassMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);
        checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);
      }
      /**
       *
       * Update an interpolated class on an element with 4 bound values surrounded by text.
       *
       * Used when the value passed to a property has 4 interpolated values in it:
       *
       * ```html
       * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵclassMapInterpolate4(
       * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵclassMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);
        checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);
      }
      /**
       *
       * Update an interpolated class on an element with 5 bound values surrounded by text.
       *
       * Used when the value passed to a property has 5 interpolated values in it:
       *
       * ```html
       * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵclassMapInterpolate5(
       * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵclassMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);
        checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);
      }
      /**
       *
       * Update an interpolated class on an element with 6 bound values surrounded by text.
       *
       * Used when the value passed to a property has 6 interpolated values in it:
       *
       * ```html
       * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵclassMapInterpolate6(
       *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵclassMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);
        checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);
      }
      /**
       *
       * Update an interpolated class on an element with 7 bound values surrounded by text.
       *
       * Used when the value passed to a property has 7 interpolated values in it:
       *
       * ```html
       * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵclassMapInterpolate7(
       *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param i5 Static value used for concatenation only.
       * @param v6 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵclassMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);
        checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);
      }
      /**
       *
       * Update an interpolated class on an element with 8 bound values surrounded by text.
       *
       * Used when the value passed to a property has 8 interpolated values in it:
       *
       * ```html
       * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵclassMapInterpolate8(
       *  'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param i5 Static value used for concatenation only.
       * @param v6 Value checked for change.
       * @param i6 Static value used for concatenation only.
       * @param v7 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵclassMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);
        checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);
      }
      /**
       * Update an interpolated class on an element with 9 or more bound values surrounded by text.
       *
       * Used when the number of interpolated values exceeds 8.
       *
       * ```html
       * <div
       *  class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵclassMapInterpolateV(
       *  ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
       *  'suffix']);
       * ```
       *.
       * @param values The collection of values and the strings in-between those values, beginning with
       * a string prefix and ending with a string suffix.
       * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
       * @codeGenApi
       */


      function ɵɵclassMapInterpolateV(values) {
        var lView = getLView();
        var interpolatedValue = interpolationV(lView, values);
        checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       *
       * Update an interpolated style on an element with single bound value surrounded by text.
       *
       * Used when the value passed to a property has 1 interpolated value in it:
       *
       * ```html
       * <div style="key: {{v0}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵstyleMapInterpolate1(prefix, v0, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation1(lView, prefix, v0, suffix);
        ɵɵstyleMap(interpolatedValue);
      }
      /**
       *
       * Update an interpolated style on an element with 2 bound values surrounded by text.
       *
       * Used when the value passed to a property has 2 interpolated values in it:
       *
       * ```html
       * <div style="key: {{v0}}; key1: {{v1}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵstyleMapInterpolate2(prefix, v0, i0, v1, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);
        ɵɵstyleMap(interpolatedValue);
      }
      /**
       *
       * Update an interpolated style on an element with 3 bound values surrounded by text.
       *
       * Used when the value passed to a property has 3 interpolated values in it:
       *
       * ```html
       * <div style="key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstyleMapInterpolate3(
       *     'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵstyleMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);
        ɵɵstyleMap(interpolatedValue);
      }
      /**
       *
       * Update an interpolated style on an element with 4 bound values surrounded by text.
       *
       * Used when the value passed to a property has 4 interpolated values in it:
       *
       * ```html
       * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstyleMapInterpolate4(
       *     'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵstyleMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);
        ɵɵstyleMap(interpolatedValue);
      }
      /**
       *
       * Update an interpolated style on an element with 5 bound values surrounded by text.
       *
       * Used when the value passed to a property has 5 interpolated values in it:
       *
       * ```html
       * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstyleMapInterpolate5(
       *     'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵstyleMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);
        ɵɵstyleMap(interpolatedValue);
      }
      /**
       *
       * Update an interpolated style on an element with 6 bound values surrounded by text.
       *
       * Used when the value passed to a property has 6 interpolated values in it:
       *
       * ```html
       * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};
       *             key5: {{v5}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstyleMapInterpolate6(
       *    'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
       *    'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵstyleMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);
        ɵɵstyleMap(interpolatedValue);
      }
      /**
       *
       * Update an interpolated style on an element with 7 bound values surrounded by text.
       *
       * Used when the value passed to a property has 7 interpolated values in it:
       *
       * ```html
       * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
       *             key6: {{v6}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstyleMapInterpolate7(
       *    'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
       *    '; key6: ', v6, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param i5 Static value used for concatenation only.
       * @param v6 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵstyleMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);
        ɵɵstyleMap(interpolatedValue);
      }
      /**
       *
       * Update an interpolated style on an element with 8 bound values surrounded by text.
       *
       * Used when the value passed to a property has 8 interpolated values in it:
       *
       * ```html
       * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
       *             key6: {{v6}}; key7: {{v7}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstyleMapInterpolate8(
       *    'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
       *    '; key6: ', v6, '; key7: ', v7, 'suffix');
       * ```
       *
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param i5 Static value used for concatenation only.
       * @param v6 Value checked for change.
       * @param i6 Static value used for concatenation only.
       * @param v7 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @codeGenApi
       */


      function ɵɵstyleMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {
        var lView = getLView();
        var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);
        ɵɵstyleMap(interpolatedValue);
      }
      /**
       * Update an interpolated style on an element with 9 or more bound values surrounded by text.
       *
       * Used when the number of interpolated values exceeds 8.
       *
       * ```html
       * <div
       *  class="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
       *         key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstyleMapInterpolateV(
       *    ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
       *     '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);
       * ```
       *.
       * @param values The collection of values and the strings in-between those values, beginning with
       * a string prefix and ending with a string suffix.
       * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)
       * @codeGenApi
       */


      function ɵɵstyleMapInterpolateV(values) {
        var lView = getLView();
        var interpolatedValue = interpolationV(lView, values);
        ɵɵstyleMap(interpolatedValue);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       *
       * Update an interpolated style property on an element with single bound value surrounded by text.
       *
       * Used when the value passed to a property has 1 interpolated value in it:
       *
       * ```html
       * <div style.color="prefix{{v0}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');
       * ```
       *
       * @param styleIndex Index of style to update. This index value refers to the
       *        index of the style in the style bindings array that was passed into
       *        `styling`.
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵstylePropInterpolate1(prop, prefix, v0, suffix, valueSuffix) {
        var lView = getLView();
        var interpolatedValue = interpolation1(lView, prefix, v0, suffix);
        checkStylingProperty(prop, interpolatedValue, valueSuffix, false);
        return ɵɵstylePropInterpolate1;
      }
      /**
       *
       * Update an interpolated style property on an element with 2 bound values surrounded by text.
       *
       * Used when the value passed to a property has 2 interpolated values in it:
       *
       * ```html
       * <div style.color="prefix{{v0}}-{{v1}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');
       * ```
       *
       * @param styleIndex Index of style to update. This index value refers to the
       *        index of the style in the style bindings array that was passed into
       *        `styling`.
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵstylePropInterpolate2(prop, prefix, v0, i0, v1, suffix, valueSuffix) {
        var lView = getLView();
        var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);
        checkStylingProperty(prop, interpolatedValue, valueSuffix, false);
        return ɵɵstylePropInterpolate2;
      }
      /**
       *
       * Update an interpolated style property on an element with 3 bound values surrounded by text.
       *
       * Used when the value passed to a property has 3 interpolated values in it:
       *
       * ```html
       * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');
       * ```
       *
       * @param styleIndex Index of style to update. This index value refers to the
       *        index of the style in the style bindings array that was passed into
       *        `styling`.
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵstylePropInterpolate3(prop, prefix, v0, i0, v1, i1, v2, suffix, valueSuffix) {
        var lView = getLView();
        var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);
        checkStylingProperty(prop, interpolatedValue, valueSuffix, false);
        return ɵɵstylePropInterpolate3;
      }
      /**
       *
       * Update an interpolated style property on an element with 4 bound values surrounded by text.
       *
       * Used when the value passed to a property has 4 interpolated values in it:
       *
       * ```html
       * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
       * ```
       *
       * @param styleIndex Index of style to update. This index value refers to the
       *        index of the style in the style bindings array that was passed into
       *        `styling`.
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵstylePropInterpolate4(prop, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, valueSuffix) {
        var lView = getLView();
        var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);
        checkStylingProperty(prop, interpolatedValue, valueSuffix, false);
        return ɵɵstylePropInterpolate4;
      }
      /**
       *
       * Update an interpolated style property on an element with 5 bound values surrounded by text.
       *
       * Used when the value passed to a property has 5 interpolated values in it:
       *
       * ```html
       * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
       * ```
       *
       * @param styleIndex Index of style to update. This index value refers to the
       *        index of the style in the style bindings array that was passed into
       *        `styling`.
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵstylePropInterpolate5(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, valueSuffix) {
        var lView = getLView();
        var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);
        checkStylingProperty(prop, interpolatedValue, valueSuffix, false);
        return ɵɵstylePropInterpolate5;
      }
      /**
       *
       * Update an interpolated style property on an element with 6 bound values surrounded by text.
       *
       * Used when the value passed to a property has 6 interpolated values in it:
       *
       * ```html
       * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
       * ```
       *
       * @param styleIndex Index of style to update. This index value refers to the
       *        index of the style in the style bindings array that was passed into
       *        `styling`.
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵstylePropInterpolate6(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, valueSuffix) {
        var lView = getLView();
        var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);
        checkStylingProperty(prop, interpolatedValue, valueSuffix, false);
        return ɵɵstylePropInterpolate6;
      }
      /**
       *
       * Update an interpolated style property on an element with 7 bound values surrounded by text.
       *
       * Used when the value passed to a property has 7 interpolated values in it:
       *
       * ```html
       * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstylePropInterpolate7(
       *    0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
       * ```
       *
       * @param styleIndex Index of style to update. This index value refers to the
       *        index of the style in the style bindings array that was passed into
       *        `styling`.
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param i5 Static value used for concatenation only.
       * @param v6 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵstylePropInterpolate7(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, valueSuffix) {
        var lView = getLView();
        var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);
        checkStylingProperty(prop, interpolatedValue, valueSuffix, false);
        return ɵɵstylePropInterpolate7;
      }
      /**
       *
       * Update an interpolated style property on an element with 8 bound values surrounded by text.
       *
       * Used when the value passed to a property has 8 interpolated values in it:
       *
       * ```html
       * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,
       * '-', v7, 'suffix');
       * ```
       *
       * @param styleIndex Index of style to update. This index value refers to the
       *        index of the style in the style bindings array that was passed into
       *        `styling`.
       * @param prefix Static value used for concatenation only.
       * @param v0 Value checked for change.
       * @param i0 Static value used for concatenation only.
       * @param v1 Value checked for change.
       * @param i1 Static value used for concatenation only.
       * @param v2 Value checked for change.
       * @param i2 Static value used for concatenation only.
       * @param v3 Value checked for change.
       * @param i3 Static value used for concatenation only.
       * @param v4 Value checked for change.
       * @param i4 Static value used for concatenation only.
       * @param v5 Value checked for change.
       * @param i5 Static value used for concatenation only.
       * @param v6 Value checked for change.
       * @param i6 Static value used for concatenation only.
       * @param v7 Value checked for change.
       * @param suffix Static value used for concatenation only.
       * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵstylePropInterpolate8(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, valueSuffix) {
        var lView = getLView();
        var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);
        checkStylingProperty(prop, interpolatedValue, valueSuffix, false);
        return ɵɵstylePropInterpolate8;
      }
      /**
       * Update an interpolated style property on an element with 9 or more bound values surrounded by
       * text.
       *
       * Used when the number of interpolated values exceeds 8.
       *
       * ```html
       * <div
       *  style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix">
       * </div>
       * ```
       *
       * Its compiled representation is:
       *
       * ```ts
       * ɵɵstylePropInterpolateV(
       *  0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
       *  'suffix']);
       * ```
       *
       * @param styleIndex Index of style to update. This index value refers to the
       *        index of the style in the style bindings array that was passed into
       *        `styling`..
       * @param values The collection of values and the strings in-between those values, beginning with
       * a string prefix and ending with a string suffix.
       * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
       * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
       * @returns itself, so that it may be chained.
       * @codeGenApi
       */


      function ɵɵstylePropInterpolateV(prop, values, valueSuffix) {
        var lView = getLView();
        var interpolatedValue = interpolationV(lView, values);
        checkStylingProperty(prop, interpolatedValue, valueSuffix, false);
        return ɵɵstylePropInterpolateV;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Update a property on a host element. Only applies to native node properties, not inputs.
       *
       * Operates on the element selected by index via the {@link select} instruction.
       *
       * @param propName Name of property. Because it is going to DOM, this is not subject to
       *        renaming as part of minification.
       * @param value New value to write.
       * @param sanitizer An optional function used to sanitize the value.
       * @returns This function returns itself so that it may be chained
       * (e.g. `property('name', ctx.name)('title', ctx.title)`)
       *
       * @codeGenApi
       */


      function ɵɵhostProperty(propName, value, sanitizer) {
        var lView = getLView();
        var bindingIndex = nextBindingIndex();

        if (bindingUpdated(lView, bindingIndex, value)) {
          var tView = getTView();
          var tNode = getSelectedTNode();
          elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true);
          ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);
        }

        return ɵɵhostProperty;
      }
      /**
       * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.
       *
       * This instruction is for compatibility purposes and is designed to ensure that a
       * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in
       * the component's renderer. Normally all host bindings are evaluated with the parent
       * component's renderer, but, in the case of animation @triggers, they need to be
       * evaluated with the sub component's renderer (because that's where the animation
       * triggers are defined).
       *
       * Do not use this instruction as a replacement for `elementProperty`. This instruction
       * only exists to ensure compatibility with the ViewEngine's host binding behavior.
       *
       * @param index The index of the element to update in the data array
       * @param propName Name of property. Because it is going to DOM, this is not subject to
       *        renaming as part of minification.
       * @param value New value to write.
       * @param sanitizer An optional function used to sanitize the value.
       *
       * @codeGenApi
       */


      function ɵɵsyntheticHostProperty(propName, value, sanitizer) {
        var lView = getLView();
        var bindingIndex = nextBindingIndex();

        if (bindingUpdated(lView, bindingIndex, value)) {
          var tView = getTView();
          var tNode = getSelectedTNode();
          var currentDef = getCurrentDirectiveDef(tView.data);
          var renderer = loadComponentRenderer(currentDef, tNode, lView);
          elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true);
          ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);
        }

        return ɵɵsyntheticHostProperty;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.
       */


      if (typeof ngI18nClosureMode === 'undefined') {
        // These property accesses can be ignored because ngI18nClosureMode will be set to false
        // when optimizing code and the whole if statement will be dropped.
        // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.
        // NOTE: we need to have it in IIFE so that the tree-shaker is happy.
        (function () {
          // tslint:disable-next-line:no-toplevel-property-access
          _global['ngI18nClosureMode'] = // TODO(FW-1250): validate that this actually, you know, works.
          // tslint:disable-next-line:no-toplevel-property-access
          typeof goog !== 'undefined' && typeof goog.getMsg === 'function';
        })();
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // THIS CODE IS GENERATED - DO NOT MODIFY
      // See angular/tools/gulp-tasks/cldr/extract.js


      var u = undefined;

      function plural(n) {
        var i = Math.floor(Math.abs(n)),
            v = n.toString().replace(/^[^.]*\.?/, '').length;
        if (i === 1 && v === 0) return 1;
        return 5;
      }

      var 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];
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * This const is used to store the locale data registered with `registerLocaleData`
       */

      var LOCALE_DATA = {};
      /**
       * Register locale data to be used internally by Angular. See the
       * ["I18n guide"](guide/i18n#i18n-pipes) to know how to import additional locale data.
       *
       * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1
       */

      function registerLocaleData(data, localeId, extraData) {
        if (typeof localeId !== 'string') {
          extraData = localeId;
          localeId = data[LocaleDataIndex.LocaleId];
        }

        localeId = localeId.toLowerCase().replace(/_/g, '-');
        LOCALE_DATA[localeId] = data;

        if (extraData) {
          LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData;
        }
      }
      /**
       * Finds the locale data for a given locale.
       *
       * @param locale The locale code.
       * @returns The locale data.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       */


      function findLocaleData(locale) {
        var normalizedLocale = normalizeLocale(locale);
        var match = getLocaleData(normalizedLocale);

        if (match) {
          return match;
        } // let's try to find a parent locale


        var parentLocale = normalizedLocale.split('-')[0];
        match = getLocaleData(parentLocale);

        if (match) {
          return match;
        }

        if (parentLocale === 'en') {
          return localeEn;
        }

        throw new Error("Missing locale data for the locale \"".concat(locale, "\"."));
      }
      /**
       * Retrieves the default currency code for the given locale.
       *
       * The default is defined as the first currency which is still in use.
       *
       * @param locale The code of the locale whose currency code we want.
       * @returns The code of the default currency for the given locale.
       *
       */


      function getLocaleCurrencyCode(locale) {
        var data = findLocaleData(locale);
        return data[LocaleDataIndex.CurrencyCode] || null;
      }
      /**
       * Retrieves the plural function used by ICU expressions to determine the plural case to use
       * for a given locale.
       * @param locale A locale code for the locale format rules to use.
       * @returns The plural function for the locale.
       * @see `NgPlural`
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       */


      function getLocalePluralCase(locale) {
        var data = findLocaleData(locale);
        return data[LocaleDataIndex.PluralCase];
      }
      /**
       * Helper function to get the given `normalizedLocale` from `LOCALE_DATA`
       * or from the global `ng.common.locale`.
       */


      function getLocaleData(normalizedLocale) {
        if (!(normalizedLocale in LOCALE_DATA)) {
          LOCALE_DATA[normalizedLocale] = _global.ng && _global.ng.common && _global.ng.common.locales && _global.ng.common.locales[normalizedLocale];
        }

        return LOCALE_DATA[normalizedLocale];
      }
      /**
       * Helper function to remove all the locale data from `LOCALE_DATA`.
       */


      function unregisterAllLocaleData() {
        LOCALE_DATA = {};
      }
      /**
       * Index of each type of locale data from the locale data array
       */


      var LocaleDataIndex;

      (function (LocaleDataIndex) {
        LocaleDataIndex[LocaleDataIndex["LocaleId"] = 0] = "LocaleId";
        LocaleDataIndex[LocaleDataIndex["DayPeriodsFormat"] = 1] = "DayPeriodsFormat";
        LocaleDataIndex[LocaleDataIndex["DayPeriodsStandalone"] = 2] = "DayPeriodsStandalone";
        LocaleDataIndex[LocaleDataIndex["DaysFormat"] = 3] = "DaysFormat";
        LocaleDataIndex[LocaleDataIndex["DaysStandalone"] = 4] = "DaysStandalone";
        LocaleDataIndex[LocaleDataIndex["MonthsFormat"] = 5] = "MonthsFormat";
        LocaleDataIndex[LocaleDataIndex["MonthsStandalone"] = 6] = "MonthsStandalone";
        LocaleDataIndex[LocaleDataIndex["Eras"] = 7] = "Eras";
        LocaleDataIndex[LocaleDataIndex["FirstDayOfWeek"] = 8] = "FirstDayOfWeek";
        LocaleDataIndex[LocaleDataIndex["WeekendRange"] = 9] = "WeekendRange";
        LocaleDataIndex[LocaleDataIndex["DateFormat"] = 10] = "DateFormat";
        LocaleDataIndex[LocaleDataIndex["TimeFormat"] = 11] = "TimeFormat";
        LocaleDataIndex[LocaleDataIndex["DateTimeFormat"] = 12] = "DateTimeFormat";
        LocaleDataIndex[LocaleDataIndex["NumberSymbols"] = 13] = "NumberSymbols";
        LocaleDataIndex[LocaleDataIndex["NumberFormats"] = 14] = "NumberFormats";
        LocaleDataIndex[LocaleDataIndex["CurrencyCode"] = 15] = "CurrencyCode";
        LocaleDataIndex[LocaleDataIndex["CurrencySymbol"] = 16] = "CurrencySymbol";
        LocaleDataIndex[LocaleDataIndex["CurrencyName"] = 17] = "CurrencyName";
        LocaleDataIndex[LocaleDataIndex["Currencies"] = 18] = "Currencies";
        LocaleDataIndex[LocaleDataIndex["Directionality"] = 19] = "Directionality";
        LocaleDataIndex[LocaleDataIndex["PluralCase"] = 20] = "PluralCase";
        LocaleDataIndex[LocaleDataIndex["ExtraData"] = 21] = "ExtraData";
      })(LocaleDataIndex || (LocaleDataIndex = {}));
      /**
       * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.
       */


      function normalizeLocale(locale) {
        return locale.toLowerCase().replace(/_/g, '-');
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var pluralMapping = ['zero', 'one', 'two', 'few', 'many'];
      /**
       * Returns the plural case based on the locale
       */

      function getPluralCase(value, locale) {
        var plural = getLocalePluralCase(locale)(parseInt(value, 10));
        var result = pluralMapping[plural];
        return result !== undefined ? result : 'other';
      }
      /**
       * The locale id that the application is using by default (for translations and ICU expressions).
       */


      var DEFAULT_LOCALE_ID = 'en-US';
      /**
       * USD currency code that the application uses by default for CurrencyPipe when no
       * DEFAULT_CURRENCY_CODE is provided.
       */

      var USD_CURRENCY_CODE = 'USD';
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Marks that the next string is an element name.
       *
       * See `I18nMutateOpCodes` documentation.
       */

      var ELEMENT_MARKER = {
        marker: 'element'
      };
      /**
       * Marks that the next string is comment text need for ICU.
       *
       * See `I18nMutateOpCodes` documentation.
       */

      var ICU_MARKER = {
        marker: 'ICU'
      };
      /**
       * See `I18nCreateOpCodes`
       */

      var I18nCreateOpCode;

      (function (I18nCreateOpCode) {
        /**
         * Number of bits to shift index so that it can be combined with the `APPEND_EAGERLY` and
         * `COMMENT`.
         */
        I18nCreateOpCode[I18nCreateOpCode["SHIFT"] = 2] = "SHIFT";
        /**
         * Should the node be appended to parent imedditatly after creation.
         */

        I18nCreateOpCode[I18nCreateOpCode["APPEND_EAGERLY"] = 1] = "APPEND_EAGERLY";
        /**
         * If set the node should be comment (rather than a text) node.
         */

        I18nCreateOpCode[I18nCreateOpCode["COMMENT"] = 2] = "COMMENT";
      })(I18nCreateOpCode || (I18nCreateOpCode = {})); // Note: This hack is necessary so we don't erroneously get a circular dependency
      // failure based on types.


      var unusedValueExportToPlacateAjd$6 = 1;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * The locale id that the application is currently using (for translations and ICU expressions).
       * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
       * but is now defined as a global value.
       */

      var LOCALE_ID = DEFAULT_LOCALE_ID;
      /**
       * Sets the locale id that will be used for translations and ICU expressions.
       * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
       * but is now defined as a global value.
       *
       * @param localeId
       */

      function setLocaleId(localeId) {
        assertDefined(localeId, "Expected localeId to be defined");

        if (typeof localeId === 'string') {
          LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');
        }
      }
      /**
       * Gets the locale id that will be used for translations and ICU expressions.
       * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
       * but is now defined as a global value.
       */


      function getLocaleId() {
        return LOCALE_ID;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Find a node in front of which `currentTNode` should be inserted (takes i18n into account).
       *
       * This method determines the `RNode` in front of which we should insert the `currentRNode`. This
       * takes `TNode.insertBeforeIndex` into account.
       *
       * @param parentTNode parent `TNode`
       * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)
       * @param lView current `LView`
       */


      function getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView) {
        var tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex;
        var insertBeforeIndex = Array.isArray(tNodeInsertBeforeIndex) ? tNodeInsertBeforeIndex[0] : tNodeInsertBeforeIndex;

        if (insertBeforeIndex === null) {
          return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView);
        } else {
          ngDevMode && assertIndexInRange(lView, insertBeforeIndex);
          return unwrapRNode(lView[insertBeforeIndex]);
        }
      }
      /**
       * Process `TNode.insertBeforeIndex` by adding i18n text nodes.
       *
       * See `TNode.insertBeforeIndex`
       */


      function processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRElement) {
        var tNodeInsertBeforeIndex = childTNode.insertBeforeIndex;

        if (Array.isArray(tNodeInsertBeforeIndex)) {
          // An array indicates that there are i18n nodes that need to be added as children of this
          // `childRNode`. These i18n nodes were created before this `childRNode` was available and so
          // only now can be added. The first element of the array is the normal index where we should
          // insert the `childRNode`. Additional elements are the extra nodes to be added as children of
          // `childRNode`.
          ngDevMode && assertDomNode(childRNode);
          var i18nParent = childRNode;
          var anchorRNode = null;

          if (!(childTNode.type & 3
          /* AnyRNode */
          )) {
            anchorRNode = i18nParent;
            i18nParent = parentRElement;
          }

          if (i18nParent !== null && (childTNode.flags & 2
          /* isComponentHost */
          ) === 0) {
            for (var i = 1; i < tNodeInsertBeforeIndex.length; i++) {
              // No need to `unwrapRNode` because all of the indexes point to i18n text nodes.
              // see `assertDomNode` below.
              var i18nChild = lView[tNodeInsertBeforeIndex[i]];
              nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false);
            }
          }
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Add `tNode` to `previousTNodes` list and update relevant `TNode`s in `previousTNodes` list
       * `tNode.insertBeforeIndex`.
       *
       * Things to keep in mind:
       * 1. All i18n text nodes are encoded as `TNodeType.Element` and are created eagerly by the
       *    `ɵɵi18nStart` instruction.
       * 2. All `TNodeType.Placeholder` `TNodes` are elements which will be created later by
       *    `ɵɵelementStart` instruction.
       * 3. `ɵɵelementStart` instruction will create `TNode`s in the ascending `TNode.index` order. (So a
       *    smaller index `TNode` is guaranteed to be created before a larger one)
       *
       * We use the above three invariants to determine `TNode.insertBeforeIndex`.
       *
       * In an ideal world `TNode.insertBeforeIndex` would always be `TNode.next.index`. However,
       * this will not work because `TNode.next.index` may be larger than `TNode.index` which means that
       * the next node is not yet created and therefore we can't insert in front of it.
       *
       * Rule1: `TNode.insertBeforeIndex = null` if `TNode.next === null` (Initial condition, as we don't
       *        know if there will be further `TNode`s inserted after.)
       * Rule2: If `previousTNode` is created after the `tNode` being inserted, then
       *        `previousTNode.insertBeforeNode = tNode.index` (So when a new `tNode` is added we check
       *        previous to see if we can update its `insertBeforeTNode`)
       *
       * See `TNode.insertBeforeIndex` for more context.
       *
       * @param previousTNodes A list of previous TNodes so that we can easily traverse `TNode`s in
       *     reverse order. (If `TNode` would have `previous` this would not be necessary.)
       * @param newTNode A TNode to add to the `previousTNodes` list.
       */


      function addTNodeAndUpdateInsertBeforeIndex(previousTNodes, newTNode) {
        // Start with Rule1
        ngDevMode && assertEqual(newTNode.insertBeforeIndex, null, 'We expect that insertBeforeIndex is not set');
        previousTNodes.push(newTNode);

        if (previousTNodes.length > 1) {
          for (var i = previousTNodes.length - 2; i >= 0; i--) {
            var existingTNode = previousTNodes[i]; // Text nodes are created eagerly and so they don't need their `indexBeforeIndex` updated.
            // It is safe to ignore them.

            if (!isI18nText(existingTNode)) {
              if (isNewTNodeCreatedBefore(existingTNode, newTNode) && getInsertBeforeIndex(existingTNode) === null) {
                // If it was created before us in time, (and it does not yet have `insertBeforeIndex`)
                // then add the `insertBeforeIndex`.
                setInsertBeforeIndex(existingTNode, newTNode.index);
              }
            }
          }
        }
      }

      function isI18nText(tNode) {
        return !(tNode.type & 64
        /* Placeholder */
        );
      }

      function isNewTNodeCreatedBefore(existingTNode, newTNode) {
        return isI18nText(newTNode) || existingTNode.index > newTNode.index;
      }

      function getInsertBeforeIndex(tNode) {
        var index = tNode.insertBeforeIndex;
        return Array.isArray(index) ? index[0] : index;
      }

      function setInsertBeforeIndex(tNode, value) {
        var index = tNode.insertBeforeIndex;

        if (Array.isArray(index)) {
          // Array is stored if we have to insert child nodes. See `TNode.insertBeforeIndex`
          index[0] = value;
        } else {
          setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);
          tNode.insertBeforeIndex = value;
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Retrieve `TIcu` at a given `index`.
       *
       * The `TIcu` can be stored either directly (if it is nested ICU) OR
       * it is stored inside tho `TIcuContainer` if it is top level ICU.
       *
       * The reason for this is that the top level ICU need a `TNode` so that they are part of the render
       * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is
       * expressed (parent ICU may have selected a case which does not contain it.)
       *
       * @param tView Current `TView`.
       * @param index Index where the value should be read from.
       */


      function getTIcu(tView, index) {
        var value = tView.data[index];
        if (value === null || typeof value === 'string') return null;

        if (ngDevMode && !(value.hasOwnProperty('tViews') || value.hasOwnProperty('currentCaseLViewIndex'))) {
          throwError('We expect to get \'null\'|\'TIcu\'|\'TIcuContainer\', but got: ' + value);
        } // Here the `value.hasOwnProperty('currentCaseLViewIndex')` is a polymorphic read as it can be
        // either TIcu or TIcuContainerNode. This is not ideal, but we still think it is OK because it
        // will be just two cases which fits into the browser inline cache (inline cache can take up to
        // 4)


        var tIcu = value.hasOwnProperty('currentCaseLViewIndex') ? value : value.value;
        ngDevMode && assertTIcu(tIcu);
        return tIcu;
      }
      /**
       * Store `TIcu` at a give `index`.
       *
       * The `TIcu` can be stored either directly (if it is nested ICU) OR
       * it is stored inside tho `TIcuContainer` if it is top level ICU.
       *
       * The reason for this is that the top level ICU need a `TNode` so that they are part of the render
       * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is
       * expressed (parent ICU may have selected a case which does not contain it.)
       *
       * @param tView Current `TView`.
       * @param index Index where the value should be stored at in `Tview.data`
       * @param tIcu The TIcu to store.
       */


      function setTIcu(tView, index, tIcu) {
        var tNode = tView.data[index];
        ngDevMode && assertEqual(tNode === null || tNode.hasOwnProperty('tViews'), true, 'We expect to get \'null\'|\'TIcuContainer\'');

        if (tNode === null) {
          tView.data[index] = tIcu;
        } else {
          ngDevMode && assertTNodeType(tNode, 32
          /* Icu */
          );
          tNode.value = tIcu;
        }
      }
      /**
       * Set `TNode.insertBeforeIndex` taking the `Array` into account.
       *
       * See `TNode.insertBeforeIndex`
       */


      function setTNodeInsertBeforeIndex(tNode, index) {
        ngDevMode && assertTNode(tNode);
        var insertBeforeIndex = tNode.insertBeforeIndex;

        if (insertBeforeIndex === null) {
          setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);
          insertBeforeIndex = tNode.insertBeforeIndex = [null
          /* may be updated to number later */
          , index];
        } else {
          assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here');
          insertBeforeIndex.push(index);
        }
      }
      /**
       * Create `TNode.type=TNodeType.Placeholder` node.
       *
       * See `TNodeType.Placeholder` for more information.
       */


      function createTNodePlaceholder(tView, previousTNodes, index) {
        var tNode = createTNodeAtIndex(tView, index, 64
        /* Placeholder */
        , null, null);
        addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode);
        return tNode;
      }
      /**
       * Returns current ICU case.
       *
       * ICU cases are stored as index into the `TIcu.cases`.
       * At times it is necessary to communicate that the ICU case just switched and that next ICU update
       * should update all bindings regardless of the mask. In such a case the we store negative numbers
       * for cases which have just been switched. This function removes the negative flag.
       */


      function getCurrentICUCaseIndex(tIcu, lView) {
        var currentCase = lView[tIcu.currentCaseLViewIndex];
        return currentCase === null ? currentCase : currentCase < 0 ? ~currentCase : currentCase;
      }

      function getParentFromIcuCreateOpCode(mergedCode) {
        return mergedCode >>> 17
        /* SHIFT_PARENT */
        ;
      }

      function getRefFromIcuCreateOpCode(mergedCode) {
        return (mergedCode & 131070
        /* MASK_REF */
        ) >>> 1
        /* SHIFT_REF */
        ;
      }

      function getInstructionFromIcuCreateOpCode(mergedCode) {
        return mergedCode & 1
        /* MASK_INSTRUCTION */
        ;
      }

      function icuCreateOpCode(opCode, parentIdx, refIdx) {
        ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index');
        ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index');
        return opCode | parentIdx << 17
        /* SHIFT_PARENT */
        | refIdx << 1
        /* SHIFT_REF */
        ;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Keep track of which input bindings in `ɵɵi18nExp` have changed.
       *
       * This is used to efficiently update expressions in i18n only when the corresponding input has
       * changed.
       *
       * 1) Each bit represents which of the `ɵɵi18nExp` has changed.
       * 2) There are 32 bits allowed in JS.
       * 3) Bit 32 is special as it is shared for all changes past 32. (In other words if you have more
       * than 32 `ɵɵi18nExp` then all changes past 32nd `ɵɵi18nExp` will be mapped to same bit. This means
       * that we may end up changing more than we need to. But i18n expressions with 32 bindings is rare
       * so in practice it should not be an issue.)
       */


      var changeMask = 0;
      /**
       * Keeps track of which bit needs to be updated in `changeMask`
       *
       * This value gets incremented on every call to `ɵɵi18nExp`
       */

      var changeMaskCounter = 0;
      /**
       * Keep track of which input bindings in `ɵɵi18nExp` have changed.
       *
       * `setMaskBit` gets invoked by each call to `ɵɵi18nExp`.
       *
       * @param hasChange did `ɵɵi18nExp` detect a change.
       */

      function setMaskBit(hasChange) {
        if (hasChange) {
          changeMask = changeMask | 1 << Math.min(changeMaskCounter, 31);
        }

        changeMaskCounter++;
      }

      function applyI18n(tView, lView, index) {
        if (changeMaskCounter > 0) {
          ngDevMode && assertDefined(tView, "tView should be defined");
          var tI18n = tView.data[index]; // When `index` points to an `ɵɵi18nAttributes` then we have an array otherwise `TI18n`

          var updateOpCodes = Array.isArray(tI18n) ? tI18n : tI18n.update;
          var bindingsStartIndex = getBindingIndex() - changeMaskCounter - 1;
          applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask);
        } // Reset changeMask & maskBit to default for the next update cycle


        changeMask = 0;
        changeMaskCounter = 0;
      }
      /**
       * Apply `I18nCreateOpCodes` op-codes as stored in `TI18n.create`.
       *
       * Creates text (and comment) nodes which are internationalized.
       *
       * @param lView Current lView
       * @param createOpCodes Set of op-codes to apply
       * @param parentRNode Parent node (so that direct children can be added eagerly) or `null` if it is
       *     a root node.
       * @param insertInFrontOf DOM node that should be used as an anchor.
       */


      function applyCreateOpCodes(lView, createOpCodes, parentRNode, insertInFrontOf) {
        var renderer = lView[RENDERER];

        for (var i = 0; i < createOpCodes.length; i++) {
          var opCode = createOpCodes[i++];
          var text = createOpCodes[i];
          var isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;
          var appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;
          var index = opCode >>> I18nCreateOpCode.SHIFT;
          var rNode = lView[index];

          if (rNode === null) {
            // We only create new DOM nodes if they don't already exist: If ICU switches case back to a
            // case which was already instantiated, no need to create new DOM nodes.
            rNode = lView[index] = isComment ? renderer.createComment(text) : createTextNode(renderer, text);
          }

          if (appendNow && parentRNode !== null) {
            nativeInsertBefore(renderer, parentRNode, rNode, insertInFrontOf, false);
          }
        }
      }
      /**
       * Apply `I18nMutateOpCodes` OpCodes.
       *
       * @param tView Current `TView`
       * @param mutableOpCodes Mutable OpCodes to process
       * @param lView Current `LView`
       * @param anchorRNode place where the i18n node should be inserted.
       */


      function applyMutableOpCodes(tView, mutableOpCodes, lView, anchorRNode) {
        ngDevMode && assertDomNode(anchorRNode);
        var renderer = lView[RENDERER]; // `rootIdx` represents the node into which all inserts happen.

        var rootIdx = null; // `rootRNode` represents the real node into which we insert. This can be different from
        // `lView[rootIdx]` if we have projection.
        //  - null we don't have a parent (as can be the case in when we are inserting into a root of
        //    LView which has no parent.)
        //  - `RElement` The element representing the root after taking projection into account.

        var rootRNode;

        for (var i = 0; i < mutableOpCodes.length; i++) {
          var opCode = mutableOpCodes[i];

          if (typeof opCode == 'string') {
            var textNodeIndex = mutableOpCodes[++i];

            if (lView[textNodeIndex] === null) {
              ngDevMode && ngDevMode.rendererCreateTextNode++;
              ngDevMode && assertIndexInRange(lView, textNodeIndex);
              lView[textNodeIndex] = createTextNode(renderer, opCode);
            }
          } else if (typeof opCode == 'number') {
            switch (opCode & 1
            /* MASK_INSTRUCTION */
            ) {
              case 0
              /* AppendChild */
              :
                var parentIdx = getParentFromIcuCreateOpCode(opCode);

                if (rootIdx === null) {
                  // The first operation should save the `rootIdx` because the first operation
                  // must insert into the root. (Only subsequent operations can insert into a dynamic
                  // parent)
                  rootIdx = parentIdx;
                  rootRNode = nativeParentNode(renderer, anchorRNode);
                }

                var insertInFrontOf = void 0;
                var parentRNode = void 0;

                if (parentIdx === rootIdx) {
                  insertInFrontOf = anchorRNode;
                  parentRNode = rootRNode;
                } else {
                  insertInFrontOf = null;
                  parentRNode = unwrapRNode(lView[parentIdx]);
                } // FIXME(misko): Refactor with `processI18nText`


                if (parentRNode !== null) {
                  // This can happen if the `LView` we are adding to is not attached to a parent `LView`.
                  // In such a case there is no "root" we can attach to. This is fine, as we still need to
                  // create the elements. When the `LView` gets later added to a parent these "root" nodes
                  // get picked up and added.
                  ngDevMode && assertDomNode(parentRNode);
                  var refIdx = getRefFromIcuCreateOpCode(opCode);
                  ngDevMode && assertGreaterThan(refIdx, HEADER_OFFSET, 'Missing ref'); // `unwrapRNode` is not needed here as all of these point to RNodes as part of the i18n
                  // which can't have components.

                  var child = lView[refIdx];
                  ngDevMode && assertDomNode(child);
                  nativeInsertBefore(renderer, parentRNode, child, insertInFrontOf, false);
                  var tIcu = getTIcu(tView, refIdx);

                  if (tIcu !== null && typeof tIcu === 'object') {
                    // If we just added a comment node which has ICU then that ICU may have already been
                    // rendered and therefore we need to re-add it here.
                    ngDevMode && assertTIcu(tIcu);
                    var caseIndex = getCurrentICUCaseIndex(tIcu, lView);

                    if (caseIndex !== null) {
                      applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, lView[tIcu.anchorIdx]);
                    }
                  }
                }

                break;

              case 1
              /* Attr */
              :
                var elementNodeIndex = opCode >>> 1
                /* SHIFT_REF */
                ;
                var attrName = mutableOpCodes[++i];
                var attrValue = mutableOpCodes[++i]; // This code is used for ICU expressions only, since we don't support
                // directives/components in ICUs, we don't need to worry about inputs here

                setElementAttribute(renderer, getNativeByIndex(elementNodeIndex, lView), null, null, attrName, attrValue, null);
                break;

              default:
                throw new Error("Unable to determine the type of mutate operation for \"".concat(opCode, "\""));
            }
          } else {
            switch (opCode) {
              case ICU_MARKER:
                var commentValue = mutableOpCodes[++i];
                var commentNodeIndex = mutableOpCodes[++i];

                if (lView[commentNodeIndex] === null) {
                  ngDevMode && assertEqual(typeof commentValue, 'string', "Expected \"".concat(commentValue, "\" to be a comment node value"));
                  ngDevMode && ngDevMode.rendererCreateComment++;
                  ngDevMode && assertIndexInExpandoRange(lView, commentNodeIndex);
                  var commentRNode = lView[commentNodeIndex] = createCommentNode(renderer, commentValue); // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)

                  attachPatchData(commentRNode, lView);
                }

                break;

              case ELEMENT_MARKER:
                var tagName = mutableOpCodes[++i];
                var _elementNodeIndex = mutableOpCodes[++i];

                if (lView[_elementNodeIndex] === null) {
                  ngDevMode && assertEqual(typeof tagName, 'string', "Expected \"".concat(tagName, "\" to be an element node tag name"));
                  ngDevMode && ngDevMode.rendererCreateElement++;
                  ngDevMode && assertIndexInExpandoRange(lView, _elementNodeIndex);
                  var elementRNode = lView[_elementNodeIndex] = createElementNode(renderer, tagName, null); // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)

                  attachPatchData(elementRNode, lView);
                }

                break;

              default:
                ngDevMode && throwError("Unable to determine the type of mutate operation for \"".concat(opCode, "\""));
            }
          }
        }
      }
      /**
       * Apply `I18nUpdateOpCodes` OpCodes
       *
       * @param tView Current `TView`
       * @param lView Current `LView`
       * @param updateOpCodes OpCodes to process
       * @param bindingsStartIndex Location of the first `ɵɵi18nApply`
       * @param changeMask Each bit corresponds to a `ɵɵi18nExp` (Counting backwards from
       *     `bindingsStartIndex`)
       */


      function applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask) {
        for (var i = 0; i < updateOpCodes.length; i++) {
          // bit code to check if we should apply the next update
          var checkBit = updateOpCodes[i]; // Number of opCodes to skip until next set of update codes

          var skipCodes = updateOpCodes[++i];

          if (checkBit & changeMask) {
            // The value has been updated since last checked
            var value = '';

            for (var j = i + 1; j <= i + skipCodes; j++) {
              var opCode = updateOpCodes[j];

              if (typeof opCode == 'string') {
                value += opCode;
              } else if (typeof opCode == 'number') {
                if (opCode < 0) {
                  // Negative opCode represent `i18nExp` values offset.
                  value += renderStringify(lView[bindingsStartIndex - opCode]);
                } else {
                  var nodeIndex = opCode >>> 2
                  /* SHIFT_REF */
                  ;

                  switch (opCode & 3
                  /* MASK_OPCODE */
                  ) {
                    case 1
                    /* Attr */
                    :
                      var propName = updateOpCodes[++j];
                      var sanitizeFn = updateOpCodes[++j];
                      var tNodeOrTagName = tView.data[nodeIndex];
                      ngDevMode && assertDefined(tNodeOrTagName, 'Experting TNode or string');

                      if (typeof tNodeOrTagName === 'string') {
                        // IF we don't have a `TNode`, then we are an element in ICU (as ICU content does
                        // not have TNode), in which case we know that there are no directives, and hence
                        // we use attribute setting.
                        setElementAttribute(lView[RENDERER], lView[nodeIndex], null, tNodeOrTagName, propName, value, sanitizeFn);
                      } else {
                        elementPropertyInternal(tView, tNodeOrTagName, lView, propName, value, lView[RENDERER], sanitizeFn, false);
                      }

                      break;

                    case 0
                    /* Text */
                    :
                      var rText = lView[nodeIndex];
                      rText !== null && updateTextNode(lView[RENDERER], rText, value);
                      break;

                    case 2
                    /* IcuSwitch */
                    :
                      applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex), lView, value);
                      break;

                    case 3
                    /* IcuUpdate */
                    :
                      applyIcuUpdateCase(tView, getTIcu(tView, nodeIndex), bindingsStartIndex, lView);
                      break;
                  }
                }
              }
            }
          } else {
            var _opCode = updateOpCodes[i + 1];

            if (_opCode > 0 && (_opCode & 3
            /* MASK_OPCODE */
            ) === 3
            /* IcuUpdate */
            ) {
              // Special case for the `icuUpdateCase`. It could be that the mask did not match, but
              // we still need to execute `icuUpdateCase` because the case has changed recently due to
              // previous `icuSwitchCase` instruction. (`icuSwitchCase` and `icuUpdateCase` always come in
              // pairs.)
              var _nodeIndex = _opCode >>> 2
              /* SHIFT_REF */
              ;

              var tIcu = getTIcu(tView, _nodeIndex);
              var currentIndex = lView[tIcu.currentCaseLViewIndex];

              if (currentIndex < 0) {
                applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView);
              }
            }
          }

          i += skipCodes;
        }
      }
      /**
       * Apply OpCodes associated with updating an existing ICU.
       *
       * @param tView Current `TView`
       * @param tIcu Current `TIcu`
       * @param bindingsStartIndex Location of the first `ɵɵi18nApply`
       * @param lView Current `LView`
       */


      function applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView) {
        ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex);
        var activeCaseIndex = lView[tIcu.currentCaseLViewIndex];

        if (activeCaseIndex !== null) {
          var mask = changeMask;

          if (activeCaseIndex < 0) {
            // Clear the flag.
            // Negative number means that the ICU was freshly created and we need to force the update.
            activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex; // -1 is same as all bits on, which simulates creation since it marks all bits dirty

            mask = -1;
          }

          applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask);
        }
      }
      /**
       * Apply OpCodes associated with switching a case on ICU.
       *
       * This involves tearing down existing case and than building up a new case.
       *
       * @param tView Current `TView`
       * @param tIcu Current `TIcu`
       * @param lView Current `LView`
       * @param value Value of the case to update to.
       */


      function applyIcuSwitchCase(tView, tIcu, lView, value) {
        // Rebuild a new case for this ICU
        var caseIndex = getCaseIndex(tIcu, value);
        var activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);

        if (activeCaseIndex !== caseIndex) {
          applyIcuSwitchCaseRemove(tView, tIcu, lView);
          lView[tIcu.currentCaseLViewIndex] = caseIndex === null ? null : ~caseIndex;

          if (caseIndex !== null) {
            // Add the nodes for the new case
            var anchorRNode = lView[tIcu.anchorIdx];

            if (anchorRNode) {
              ngDevMode && assertDomNode(anchorRNode);
              applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, anchorRNode);
            }
          }
        }
      }
      /**
       * Apply OpCodes associated with tearing ICU case.
       *
       * This involves tearing down existing case and than building up a new case.
       *
       * @param tView Current `TView`
       * @param tIcu Current `TIcu`
       * @param lView Current `LView`
       */


      function applyIcuSwitchCaseRemove(tView, tIcu, lView) {
        var activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);

        if (activeCaseIndex !== null) {
          var removeCodes = tIcu.remove[activeCaseIndex];

          for (var i = 0; i < removeCodes.length; i++) {
            var nodeOrIcuIndex = removeCodes[i];

            if (nodeOrIcuIndex > 0) {
              // Positive numbers are `RNode`s.
              var rNode = getNativeByIndex(nodeOrIcuIndex, lView);
              rNode !== null && nativeRemoveNode(lView[RENDERER], rNode);
            } else {
              // Negative numbers are ICUs
              applyIcuSwitchCaseRemove(tView, getTIcu(tView, ~nodeOrIcuIndex), lView);
            }
          }
        }
      }
      /**
       * Returns the index of the current case of an ICU expression depending on the main binding value
       *
       * @param icuExpression
       * @param bindingValue The value of the main binding used by this ICU expression
       */


      function getCaseIndex(icuExpression, bindingValue) {
        var index = icuExpression.cases.indexOf(bindingValue);

        if (index === -1) {
          switch (icuExpression.type) {
            case 1
            /* plural */
            :
              {
                var resolvedCase = getPluralCase(bindingValue, getLocaleId());
                index = icuExpression.cases.indexOf(resolvedCase);

                if (index === -1 && resolvedCase !== 'other') {
                  index = icuExpression.cases.indexOf('other');
                }

                break;
              }

            case 0
            /* select */
            :
              {
                index = icuExpression.cases.indexOf('other');
                break;
              }
          }
        }

        return index === -1 ? null : index;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function loadIcuContainerVisitor() {
        var _stack = [];

        var _index = -1;

        var _lView;

        var _removes;
        /**
         * Retrieves a set of root nodes from `TIcu.remove`. Used by `TNodeType.ICUContainer`
         * to determine which root belong to the ICU.
         *
         * Example of usage.
         * ```
         * const nextRNode = icuContainerIteratorStart(tIcuContainerNode, lView);
         * let rNode: RNode|null;
         * while(rNode = nextRNode()) {
         *   console.log(rNode);
         * }
         * ```
         *
         * @param tIcuContainerNode Current `TIcuContainerNode`
         * @param lView `LView` where the `RNode`s should be looked up.
         */


        function icuContainerIteratorStart(tIcuContainerNode, lView) {
          _lView = lView;

          while (_stack.length) {
            _stack.pop();
          }

          ngDevMode && assertTNodeForLView(tIcuContainerNode, lView);
          enterIcu(tIcuContainerNode.value, lView);
          return icuContainerIteratorNext;
        }

        function enterIcu(tIcu, lView) {
          _index = 0;
          var currentCase = getCurrentICUCaseIndex(tIcu, lView);

          if (currentCase !== null) {
            ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1);
            _removes = tIcu.remove[currentCase];
          } else {
            _removes = EMPTY_ARRAY;
          }
        }

        function icuContainerIteratorNext() {
          if (_index < _removes.length) {
            var removeOpCode = _removes[_index++];
            ngDevMode && assertNumber(removeOpCode, 'Expecting OpCode number');

            if (removeOpCode > 0) {
              var rNode = _lView[removeOpCode];
              ngDevMode && assertDomNode(rNode);
              return rNode;
            } else {
              _stack.push(_index, _removes); // ICUs are represented by negative indices


              var tIcuIndex = ~removeOpCode;
              var tIcu = _lView[TVIEW].data[tIcuIndex];
              ngDevMode && assertTIcu(tIcu);
              enterIcu(tIcu, _lView);
              return icuContainerIteratorNext();
            }
          } else {
            if (_stack.length === 0) {
              return null;
            } else {
              _removes = _stack.pop();
              _index = _stack.pop();
              return icuContainerIteratorNext();
            }
          }
        }

        return icuContainerIteratorStart;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Converts `I18nCreateOpCodes` array into a human readable format.
       *
       * This function is attached to the `I18nCreateOpCodes.debug` property if `ngDevMode` is enabled.
       * This function provides a human readable view of the opcodes. This is useful when debugging the
       * application as well as writing more readable tests.
       *
       * @param this `I18nCreateOpCodes` if attached as a method.
       * @param opcodes `I18nCreateOpCodes` if invoked as a function.
       */


      function i18nCreateOpCodesToString(opcodes) {
        var createOpCodes = opcodes || (Array.isArray(this) ? this : []);
        var lines = [];

        for (var i = 0; i < createOpCodes.length; i++) {
          var opCode = createOpCodes[i++];
          var text = createOpCodes[i];
          var isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;
          var appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;
          var index = opCode >>> I18nCreateOpCode.SHIFT;
          lines.push("lView[".concat(index, "] = document.").concat(isComment ? 'createComment' : 'createText', "(").concat(JSON.stringify(text), ");"));

          if (appendNow) {
            lines.push("parent.appendChild(lView[".concat(index, "]);"));
          }
        }

        return lines;
      }
      /**
       * Converts `I18nUpdateOpCodes` array into a human readable format.
       *
       * This function is attached to the `I18nUpdateOpCodes.debug` property if `ngDevMode` is enabled.
       * This function provides a human readable view of the opcodes. This is useful when debugging the
       * application as well as writing more readable tests.
       *
       * @param this `I18nUpdateOpCodes` if attached as a method.
       * @param opcodes `I18nUpdateOpCodes` if invoked as a function.
       */


      function i18nUpdateOpCodesToString(opcodes) {
        var parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));
        var lines = [];

        function consumeOpCode(value) {
          var ref = value >>> 2
          /* SHIFT_REF */
          ;
          var opCode = value & 3
          /* MASK_OPCODE */
          ;

          switch (opCode) {
            case 0
            /* Text */
            :
              return "(lView[".concat(ref, "] as Text).textContent = $$$");

            case 1
            /* Attr */
            :
              var attrName = parser.consumeString();
              var sanitizationFn = parser.consumeFunction();

              var _value10 = sanitizationFn ? "(".concat(sanitizationFn, ")($$$)") : '$$$';

              return "(lView[".concat(ref, "] as Element).setAttribute('").concat(attrName, "', ").concat(_value10, ")");

            case 2
            /* IcuSwitch */
            :
              return "icuSwitchCase(".concat(ref, ", $$$)");

            case 3
            /* IcuUpdate */
            :
              return "icuUpdateCase(".concat(ref, ")");
          }

          throw new Error('unexpected OpCode');
        }

        while (parser.hasMore()) {
          var mask = parser.consumeNumber();
          var size = parser.consumeNumber();
          var end = parser.i + size;
          var statements = [];
          var statement = '';

          while (parser.i < end) {
            var value = parser.consumeNumberOrString();

            if (typeof value === 'string') {
              statement += value;
            } else if (value < 0) {
              // Negative numbers are ref indexes
              // Here `i` refers to current binding index. It is to signify that the value is relative,
              // rather than absolute.
              statement += '${lView[i' + value + ']}';
            } else {
              // Positive numbers are operations.
              var opCodeText = consumeOpCode(value);
              statements.push(opCodeText.replace('$$$', '`' + statement + '`') + ';');
              statement = '';
            }
          }

          lines.push("if (mask & 0b".concat(mask.toString(2), ") { ").concat(statements.join(' '), " }"));
        }

        return lines;
      }
      /**
       * Converts `I18nCreateOpCodes` array into a human readable format.
       *
       * This function is attached to the `I18nCreateOpCodes.debug` if `ngDevMode` is enabled. This
       * function provides a human readable view of the opcodes. This is useful when debugging the
       * application as well as writing more readable tests.
       *
       * @param this `I18nCreateOpCodes` if attached as a method.
       * @param opcodes `I18nCreateOpCodes` if invoked as a function.
       */


      function icuCreateOpCodesToString(opcodes) {
        var parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));
        var lines = [];

        function consumeOpCode(opCode) {
          var parent = getParentFromIcuCreateOpCode(opCode);
          var ref = getRefFromIcuCreateOpCode(opCode);

          switch (getInstructionFromIcuCreateOpCode(opCode)) {
            case 0
            /* AppendChild */
            :
              return "(lView[".concat(parent, "] as Element).appendChild(lView[").concat(lastRef, "])");

            case 1
            /* Attr */
            :
              return "(lView[".concat(ref, "] as Element).setAttribute(\"").concat(parser.consumeString(), "\", \"").concat(parser.consumeString(), "\")");
          }

          throw new Error('Unexpected OpCode: ' + getInstructionFromIcuCreateOpCode(opCode));
        }

        var lastRef = -1;

        while (parser.hasMore()) {
          var value = parser.consumeNumberStringOrMarker();

          if (value === ICU_MARKER) {
            var text = parser.consumeString();
            lastRef = parser.consumeNumber();
            lines.push("lView[".concat(lastRef, "] = document.createComment(\"").concat(text, "\")"));
          } else if (value === ELEMENT_MARKER) {
            var _text2 = parser.consumeString();

            lastRef = parser.consumeNumber();
            lines.push("lView[".concat(lastRef, "] = document.createElement(\"").concat(_text2, "\")"));
          } else if (typeof value === 'string') {
            lastRef = parser.consumeNumber();
            lines.push("lView[".concat(lastRef, "] = document.createTextNode(\"").concat(value, "\")"));
          } else if (typeof value === 'number') {
            var line = consumeOpCode(value);
            line && lines.push(line);
          } else {
            throw new Error('Unexpected value');
          }
        }

        return lines;
      }
      /**
       * Converts `I18nRemoveOpCodes` array into a human readable format.
       *
       * This function is attached to the `I18nRemoveOpCodes.debug` if `ngDevMode` is enabled. This
       * function provides a human readable view of the opcodes. This is useful when debugging the
       * application as well as writing more readable tests.
       *
       * @param this `I18nRemoveOpCodes` if attached as a method.
       * @param opcodes `I18nRemoveOpCodes` if invoked as a function.
       */


      function i18nRemoveOpCodesToString(opcodes) {
        var removeCodes = opcodes || (Array.isArray(this) ? this : []);
        var lines = [];

        for (var i = 0; i < removeCodes.length; i++) {
          var nodeOrIcuIndex = removeCodes[i];

          if (nodeOrIcuIndex > 0) {
            // Positive numbers are `RNode`s.
            lines.push("remove(lView[".concat(nodeOrIcuIndex, "])"));
          } else {
            // Negative numbers are ICUs
            lines.push("removeNestedICU(".concat(~nodeOrIcuIndex, ")"));
          }
        }

        return lines;
      }

      var OpCodeParser = /*#__PURE__*/function () {
        function OpCodeParser(codes) {
          _classCallCheck(this, OpCodeParser);

          this.i = 0;
          this.codes = codes;
        }

        _createClass2(OpCodeParser, [{
          key: "hasMore",
          value: function hasMore() {
            return this.i < this.codes.length;
          }
        }, {
          key: "consumeNumber",
          value: function consumeNumber() {
            var value = this.codes[this.i++];
            assertNumber(value, 'expecting number in OpCode');
            return value;
          }
        }, {
          key: "consumeString",
          value: function consumeString() {
            var value = this.codes[this.i++];
            assertString(value, 'expecting string in OpCode');
            return value;
          }
        }, {
          key: "consumeFunction",
          value: function consumeFunction() {
            var value = this.codes[this.i++];

            if (value === null || typeof value === 'function') {
              return value;
            }

            throw new Error('expecting function in OpCode');
          }
        }, {
          key: "consumeNumberOrString",
          value: function consumeNumberOrString() {
            var value = this.codes[this.i++];

            if (typeof value === 'string') {
              return value;
            }

            assertNumber(value, 'expecting number or string in OpCode');
            return value;
          }
        }, {
          key: "consumeNumberStringOrMarker",
          value: function consumeNumberStringOrMarker() {
            var value = this.codes[this.i++];

            if (typeof value === 'string' || typeof value === 'number' || value == ICU_MARKER || value == ELEMENT_MARKER) {
              return value;
            }

            assertNumber(value, 'expecting number, string, ICU_MARKER or ELEMENT_MARKER in OpCode');
            return value;
          }
        }]);

        return OpCodeParser;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var BINDING_REGEXP = /�(\d+):?\d*�/gi;
      var ICU_REGEXP = /({\s*�\d+:?\d*�\s*,\s*\S{6}\s*,[\s\S]*})/gi;
      var NESTED_ICU = /�(\d+)�/;
      var ICU_BLOCK_REGEXP = /^\s*(�\d+:?\d*�)\s*,\s*(select|plural)\s*,/;
      var MARKER = "\uFFFD";
      var SUBTEMPLATE_REGEXP = /�\/?\*(\d+:\d+)�/gi;
      var PH_REGEXP = /�(\/?[#*]\d+):?\d*�/gi;
      /**
       * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:
       * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32
       * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character
       * and later on replaced by a space. We are re-implementing the same idea here, since translations
       * might contain this special character.
       */

      var NGSP_UNICODE_REGEXP = /\uE500/g;

      function replaceNgsp(value) {
        return value.replace(NGSP_UNICODE_REGEXP, ' ');
      }
      /**
       * Create dynamic nodes from i18n translation block.
       *
       * - Text nodes are created synchronously
       * - TNodes are linked into tree lazily
       *
       * @param tView Current `TView`
       * @parentTNodeIndex index to the parent TNode of this i18n block
       * @param lView Current `LView`
       * @param index Index of `ɵɵi18nStart` instruction.
       * @param message Message to translate.
       * @param subTemplateIndex Index into the sub template of message translation. (ie in case of
       *     `ngIf`) (-1 otherwise)
       */


      function i18nStartFirstCreatePass(tView, parentTNodeIndex, lView, index, message, subTemplateIndex) {
        var rootTNode = getCurrentParentTNode();
        var createOpCodes = [];
        var updateOpCodes = [];
        var existingTNodeStack = [[]];

        if (ngDevMode) {
          attachDebugGetter(createOpCodes, i18nCreateOpCodesToString);
          attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);
        }

        message = getTranslationForTemplate(message, subTemplateIndex);
        var msgParts = replaceNgsp(message).split(PH_REGEXP);

        for (var i = 0; i < msgParts.length; i++) {
          var value = msgParts[i];

          if ((i & 1) === 0) {
            // Even indexes are text (including bindings & ICU expressions)
            var parts = i18nParseTextIntoPartsAndICU(value);

            for (var j = 0; j < parts.length; j++) {
              var part = parts[j];

              if ((j & 1) === 0) {
                // `j` is odd therefore `part` is string
                var text = part;
                ngDevMode && assertString(text, 'Parsed ICU part should be string');

                if (text !== '') {
                  i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodeStack[0], createOpCodes, updateOpCodes, lView, text);
                }
              } else {
                // `j` is Even therefor `part` is an `ICUExpression`
                var icuExpression = part; // Verify that ICU expression has the right shape. Translations might contain invalid
                // constructions (while original messages were correct), so ICU parsing at runtime may
                // not succeed (thus `icuExpression` remains a string).
                // Note: we intentionally retain the error here by not using `ngDevMode`, because
                // the value can change based on the locale and users aren't guaranteed to hit
                // an invalid string while they're developing.

                if (typeof icuExpression !== 'object') {
                  throw new Error("Unable to parse ICU expression in \"".concat(message, "\" message."));
                }

                var icuContainerTNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodeStack[0], lView, createOpCodes, ngDevMode ? "ICU ".concat(index, ":").concat(icuExpression.mainBinding) : '', true);
                var icuNodeIndex = icuContainerTNode.index;
                ngDevMode && assertGreaterThanOrEqual(icuNodeIndex, HEADER_OFFSET, 'Index must be in absolute LView offset');
                icuStart(tView, lView, updateOpCodes, parentTNodeIndex, icuExpression, icuNodeIndex);
              }
            }
          } else {
            // Odd indexes are placeholders (elements and sub-templates)
            // At this point value is something like: '/#1:2' (originally coming from '�/#1:2�')
            var isClosing = value.charCodeAt(0) === 47
            /* SLASH */
            ;
            var type = value.charCodeAt(isClosing ? 1 : 0);
            ngDevMode && assertOneOf(type, 42
            /* STAR */
            , 35
            /* HASH */
            );

            var _index2 = HEADER_OFFSET + Number.parseInt(value.substring(isClosing ? 2 : 1));

            if (isClosing) {
              existingTNodeStack.shift();
              setCurrentTNode(getCurrentParentTNode(), false);
            } else {
              var tNode = createTNodePlaceholder(tView, existingTNodeStack[0], _index2);
              existingTNodeStack.unshift([]);
              setCurrentTNode(tNode, true);
            }
          }
        }

        tView.data[index] = {
          create: createOpCodes,
          update: updateOpCodes
        };
      }
      /**
       * Allocate space in i18n Range add create OpCode instruction to crete a text or comment node.
       *
       * @param tView Current `TView` needed to allocate space in i18n range.
       * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will be
       *     added as part of the `i18nStart` instruction or as part of the `TNode.insertBeforeIndex`.
       * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.
       * @param lView Current `LView` needed to allocate space in i18n range.
       * @param createOpCodes Array storing `I18nCreateOpCodes` where new opCodes will be added.
       * @param text Text to be added when the `Text` or `Comment` node will be created.
       * @param isICU true if a `Comment` node for ICU (instead of `Text`) node should be created.
       */


      function createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, text, isICU) {
        var i18nNodeIdx = allocExpando(tView, lView, 1, null);
        var opCode = i18nNodeIdx << I18nCreateOpCode.SHIFT;
        var parentTNode = getCurrentParentTNode();

        if (rootTNode === parentTNode) {
          // FIXME(misko): A null `parentTNode` should represent when we fall of the `LView` boundary.
          // (there is no parent), but in some circumstances (because we are inconsistent about how we set
          // `previousOrParentTNode`) it could point to `rootTNode` So this is a work around.
          parentTNode = null;
        }

        if (parentTNode === null) {
          // If we don't have a parent that means that we can eagerly add nodes.
          // If we have a parent than these nodes can't be added now (as the parent has not been created
          // yet) and instead the `parentTNode` is responsible for adding it. See
          // `TNode.insertBeforeIndex`
          opCode |= I18nCreateOpCode.APPEND_EAGERLY;
        }

        if (isICU) {
          opCode |= I18nCreateOpCode.COMMENT;
          ensureIcuContainerVisitorLoaded(loadIcuContainerVisitor);
        }

        createOpCodes.push(opCode, text === null ? '' : text); // We store `{{?}}` so that when looking at debug `TNodeType.template` we can see where the
        // bindings are.

        var tNode = createTNodeAtIndex(tView, i18nNodeIdx, isICU ? 32
        /* Icu */
        : 1
        /* Text */
        , text === null ? ngDevMode ? '{{?}}' : '' : text, null);
        addTNodeAndUpdateInsertBeforeIndex(existingTNodes, tNode);
        var tNodeIdx = tNode.index;
        setCurrentTNode(tNode, false
        /* Text nodes are self closing */
        );

        if (parentTNode !== null && rootTNode !== parentTNode) {
          // We are a child of deeper node (rather than a direct child of `i18nStart` instruction.)
          // We have to make sure to add ourselves to the parent.
          setTNodeInsertBeforeIndex(parentTNode, tNodeIdx);
        }

        return tNode;
      }
      /**
       * Processes text node in i18n block.
       *
       * Text nodes can have:
       * - Create instruction in `createOpCodes` for creating the text node.
       * - Allocate spec for text node in i18n range of `LView`
       * - If contains binding:
       *    - bindings => allocate space in i18n range of `LView` to store the binding value.
       *    - populate `updateOpCodes` with update instructions.
       *
       * @param tView Current `TView`
       * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will
       *     be added as part of the `i18nStart` instruction or as part of the
       *     `TNode.insertBeforeIndex`.
       * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.
       * @param createOpCodes Location where the creation OpCodes will be stored.
       * @param lView Current `LView`
       * @param text The translated text (which may contain binding)
       */


      function i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodes, createOpCodes, updateOpCodes, lView, text) {
        var hasBinding = text.match(BINDING_REGEXP);
        var tNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, hasBinding ? null : text, false);

        if (hasBinding) {
          generateBindingUpdateOpCodes(updateOpCodes, text, tNode.index);
        }
      }
      /**
       * See `i18nAttributes` above.
       */


      function i18nAttributesFirstPass(tView, index, values) {
        var previousElement = getCurrentTNode();
        var previousElementIndex = previousElement.index;
        var updateOpCodes = [];

        if (ngDevMode) {
          attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);
        }

        if (tView.firstCreatePass && tView.data[index] === null) {
          for (var i = 0; i < values.length; i += 2) {
            var attrName = values[i];
            var message = values[i + 1];

            if (message !== '') {
              // Check if attribute value contains an ICU and throw an error if that's the case.
              // ICUs in element attributes are not supported.
              // Note: we intentionally retain the error here by not using `ngDevMode`, because
              // the `value` can change based on the locale and users aren't guaranteed to hit
              // an invalid string while they're developing.
              if (ICU_REGEXP.test(message)) {
                throw new Error("ICU expressions are not supported in attributes. Message: \"".concat(message, "\"."));
              } // i18n attributes that hit this code path are guaranteed to have bindings, because
              // the compiler treats static i18n attributes as regular attribute bindings.


              generateBindingUpdateOpCodes(updateOpCodes, message, previousElementIndex, attrName);
            }
          }

          tView.data[index] = updateOpCodes;
        }
      }
      /**
       * Generate the OpCodes to update the bindings of a string.
       *
       * @param updateOpCodes Place where the update opcodes will be stored.
       * @param str The string containing the bindings.
       * @param destinationNode Index of the destination node which will receive the binding.
       * @param attrName Name of the attribute, if the string belongs to an attribute.
       * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary.
       */


      function generateBindingUpdateOpCodes(updateOpCodes, str, destinationNode, attrName) {
        var sanitizeFn = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
        ngDevMode && assertGreaterThanOrEqual(destinationNode, HEADER_OFFSET, 'Index must be in absolute LView offset');
        var maskIndex = updateOpCodes.length; // Location of mask

        var sizeIndex = maskIndex + 1; // location of size for skipping

        updateOpCodes.push(null, null); // Alloc space for mask and size

        var startIndex = maskIndex + 2; // location of first allocation.

        if (ngDevMode) {
          attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);
        }

        var textParts = str.split(BINDING_REGEXP);
        var mask = 0;

        for (var j = 0; j < textParts.length; j++) {
          var textValue = textParts[j];

          if (j & 1) {
            // Odd indexes are bindings
            var bindingIndex = parseInt(textValue, 10);
            updateOpCodes.push(-1 - bindingIndex);
            mask = mask | toMaskBit(bindingIndex);
          } else if (textValue !== '') {
            // Even indexes are text
            updateOpCodes.push(textValue);
          }
        }

        updateOpCodes.push(destinationNode << 2
        /* SHIFT_REF */
        | (attrName ? 1
        /* Attr */
        : 0
        /* Text */
        ));

        if (attrName) {
          updateOpCodes.push(attrName, sanitizeFn);
        }

        updateOpCodes[maskIndex] = mask;
        updateOpCodes[sizeIndex] = updateOpCodes.length - startIndex;
        return mask;
      }
      /**
       * Convert binding index to mask bit.
       *
       * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make
       * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to
       * have more than 32 bindings this will be hit very rarely. The downside of hitting this corner
       * case is that we will execute binding code more often than necessary. (penalty of performance)
       */


      function toMaskBit(bindingIndex) {
        return 1 << Math.min(bindingIndex, 31);
      }

      function isRootTemplateMessage(subTemplateIndex) {
        return subTemplateIndex === -1;
      }
      /**
       * Removes everything inside the sub-templates of a message.
       */


      function removeInnerTemplateTranslation(message) {
        var match;
        var res = '';
        var index = 0;
        var inTemplate = false;
        var tagMatched;

        while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) {
          if (!inTemplate) {
            res += message.substring(index, match.index + match[0].length);
            tagMatched = match[1];
            inTemplate = true;
          } else {
            if (match[0] === "".concat(MARKER, "/*").concat(tagMatched).concat(MARKER)) {
              index = match.index;
              inTemplate = false;
            }
          }
        }

        ngDevMode && assertEqual(inTemplate, false, "Tag mismatch: unable to find the end of the sub-template in the translation \"".concat(message, "\""));
        res += message.substr(index);
        return res;
      }
      /**
       * Extracts a part of a message and removes the rest.
       *
       * This method is used for extracting a part of the message associated with a template. A
       * translated message can span multiple templates.
       *
       * Example:
       * ```
       * <div i18n>Translate <span *ngIf>me</span>!</div>
       * ```
       *
       * @param message The message to crop
       * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the
       * external template and removes all sub-templates.
       */


      function getTranslationForTemplate(message, subTemplateIndex) {
        if (isRootTemplateMessage(subTemplateIndex)) {
          // We want the root template message, ignore all sub-templates
          return removeInnerTemplateTranslation(message);
        } else {
          // We want a specific sub-template
          var _start14 = message.indexOf(":".concat(subTemplateIndex).concat(MARKER)) + 2 + subTemplateIndex.toString().length;

          var end = message.search(new RegExp("".concat(MARKER, "\\/\\*\\d+:").concat(subTemplateIndex).concat(MARKER)));
          return removeInnerTemplateTranslation(message.substring(_start14, end));
        }
      }
      /**
       * Generate the OpCodes for ICU expressions.
       *
       * @param icuExpression
       * @param index Index where the anchor is stored and an optional `TIcuContainerNode`
       *   - `lView[anchorIdx]` points to a `Comment` node representing the anchor for the ICU.
       *   - `tView.data[anchorIdx]` points to the `TIcuContainerNode` if ICU is root (`null` otherwise)
       */


      function icuStart(tView, lView, updateOpCodes, parentIdx, icuExpression, anchorIdx) {
        ngDevMode && assertDefined(icuExpression, 'ICU expression must be defined');
        var bindingMask = 0;
        var tIcu = {
          type: icuExpression.type,
          currentCaseLViewIndex: allocExpando(tView, lView, 1, null),
          anchorIdx: anchorIdx,
          cases: [],
          create: [],
          remove: [],
          update: []
        };
        addUpdateIcuSwitch(updateOpCodes, icuExpression, anchorIdx);
        setTIcu(tView, anchorIdx, tIcu);
        var values = icuExpression.values;

        for (var i = 0; i < values.length; i++) {
          // Each value is an array of strings & other ICU expressions
          var valueArr = values[i];
          var nestedIcus = [];

          for (var j = 0; j < valueArr.length; j++) {
            var value = valueArr[j];

            if (typeof value !== 'string') {
              // It is an nested ICU expression
              var icuIndex = nestedIcus.push(value) - 1; // Replace nested ICU expression by a comment node

              valueArr[j] = "<!--\uFFFD".concat(icuIndex, "\uFFFD-->");
            }
          }

          bindingMask = parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, icuExpression.cases[i], valueArr.join(''), nestedIcus) | bindingMask;
        }

        if (bindingMask) {
          addUpdateIcuUpdate(updateOpCodes, bindingMask, anchorIdx);
        }
      }
      /**
       * Parses text containing an ICU expression and produces a JSON object for it.
       * Original code from closure library, modified for Angular.
       *
       * @param pattern Text containing an ICU expression that needs to be parsed.
       *
       */


      function parseICUBlock(pattern) {
        var cases = [];
        var values = [];
        var icuType = 1
        /* plural */
        ;
        var mainBinding = 0;
        pattern = pattern.replace(ICU_BLOCK_REGEXP, function (str, binding, type) {
          if (type === 'select') {
            icuType = 0
            /* select */
            ;
          } else {
            icuType = 1
            /* plural */
            ;
          }

          mainBinding = parseInt(binding.substr(1), 10);
          return '';
        });
        var parts = i18nParseTextIntoPartsAndICU(pattern); // Looking for (key block)+ sequence. One of the keys has to be "other".

        for (var pos = 0; pos < parts.length;) {
          var key = parts[pos++].trim();

          if (icuType === 1
          /* plural */
          ) {
            // Key can be "=x", we just want "x"
            key = key.replace(/\s*(?:=)?(\w+)\s*/, '$1');
          }

          if (key.length) {
            cases.push(key);
          }

          var blocks = i18nParseTextIntoPartsAndICU(parts[pos++]);

          if (cases.length > values.length) {
            values.push(blocks);
          }
        } // TODO(ocombe): support ICU expressions in attributes, see #21615


        return {
          type: icuType,
          mainBinding: mainBinding,
          cases: cases,
          values: values
        };
      }
      /**
       * Breaks pattern into strings and top level {...} blocks.
       * Can be used to break a message into text and ICU expressions, or to break an ICU expression
       * into keys and cases. Original code from closure library, modified for Angular.
       *
       * @param pattern (sub)Pattern to be broken.
       * @returns An `Array<string|IcuExpression>` where:
       *   - odd positions: `string` => text between ICU expressions
       *   - even positions: `ICUExpression` => ICU expression parsed into `ICUExpression` record.
       */


      function i18nParseTextIntoPartsAndICU(pattern) {
        if (!pattern) {
          return [];
        }

        var prevPos = 0;
        var braceStack = [];
        var results = [];
        var braces = /[{}]/g; // lastIndex doesn't get set to 0 so we have to.

        braces.lastIndex = 0;
        var match;

        while (match = braces.exec(pattern)) {
          var pos = match.index;

          if (match[0] == '}') {
            braceStack.pop();

            if (braceStack.length == 0) {
              // End of the block.
              var block = pattern.substring(prevPos, pos);

              if (ICU_BLOCK_REGEXP.test(block)) {
                results.push(parseICUBlock(block));
              } else {
                results.push(block);
              }

              prevPos = pos + 1;
            }
          } else {
            if (braceStack.length == 0) {
              var _substring = pattern.substring(prevPos, pos);

              results.push(_substring);
              prevPos = pos + 1;
            }

            braceStack.push('{');
          }
        }

        var substring = pattern.substring(prevPos);
        results.push(substring);
        return results;
      }
      /**
       * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.
       *
       */


      function parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, caseName, unsafeCaseHtml, nestedIcus) {
        var create = [];
        var remove = [];
        var update = [];

        if (ngDevMode) {
          attachDebugGetter(create, icuCreateOpCodesToString);
          attachDebugGetter(remove, i18nRemoveOpCodesToString);
          attachDebugGetter(update, i18nUpdateOpCodesToString);
        }

        tIcu.cases.push(caseName);
        tIcu.create.push(create);
        tIcu.remove.push(remove);
        tIcu.update.push(update);
        var inertBodyHelper = getInertBodyHelper(getDocument());
        var inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeCaseHtml);
        ngDevMode && assertDefined(inertBodyElement, 'Unable to generate inert body element');
        var inertRootNode = getTemplateContent(inertBodyElement) || inertBodyElement;

        if (inertRootNode) {
          return walkIcuTree(tView, tIcu, lView, updateOpCodes, create, remove, update, inertRootNode, parentIdx, nestedIcus, 0);
        } else {
          return 0;
        }
      }

      function walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, parentNode, parentIdx, nestedIcus, depth) {
        var bindingMask = 0;
        var currentNode = parentNode.firstChild;

        while (currentNode) {
          var newIndex = allocExpando(tView, lView, 1, null);

          switch (currentNode.nodeType) {
            case Node.ELEMENT_NODE:
              var element = currentNode;
              var tagName = element.tagName.toLowerCase();

              if (VALID_ELEMENTS.hasOwnProperty(tagName)) {
                addCreateNodeAndAppend(create, ELEMENT_MARKER, tagName, parentIdx, newIndex);
                tView.data[newIndex] = tagName;
                var elAttrs = element.attributes;

                for (var i = 0; i < elAttrs.length; i++) {
                  var attr = elAttrs.item(i);
                  var lowerAttrName = attr.name.toLowerCase();

                  var _hasBinding = !!attr.value.match(BINDING_REGEXP); // we assume the input string is safe, unless it's using a binding


                  if (_hasBinding) {
                    if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {
                      if (URI_ATTRS[lowerAttrName]) {
                        generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, _sanitizeUrl);
                      } else if (SRCSET_ATTRS[lowerAttrName]) {
                        generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, sanitizeSrcset);
                      } else {
                        generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name);
                      }
                    } else {
                      ngDevMode && console.warn("WARNING: ignoring unsafe attribute value " + "".concat(lowerAttrName, " on element ").concat(tagName, " ") + "(see https://g.co/ng/security#xss)");
                    }
                  } else {
                    addCreateAttribute(create, newIndex, attr);
                  }
                } // Parse the children of this node (if any)


                bindingMask = walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, currentNode, newIndex, nestedIcus, depth + 1) | bindingMask;
                addRemoveNode(remove, newIndex, depth);
              }

              break;

            case Node.TEXT_NODE:
              var value = currentNode.textContent || '';
              var hasBinding = value.match(BINDING_REGEXP);
              addCreateNodeAndAppend(create, null, hasBinding ? '' : value, parentIdx, newIndex);
              addRemoveNode(remove, newIndex, depth);

              if (hasBinding) {
                bindingMask = generateBindingUpdateOpCodes(update, value, newIndex) | bindingMask;
              }

              break;

            case Node.COMMENT_NODE:
              // Check if the comment node is a placeholder for a nested ICU
              var isNestedIcu = NESTED_ICU.exec(currentNode.textContent || '');

              if (isNestedIcu) {
                var nestedIcuIndex = parseInt(isNestedIcu[1], 10);
                var icuExpression = nestedIcus[nestedIcuIndex]; // Create the comment node that will anchor the ICU expression

                addCreateNodeAndAppend(create, ICU_MARKER, ngDevMode ? "nested ICU ".concat(nestedIcuIndex) : '', parentIdx, newIndex);
                icuStart(tView, lView, sharedUpdateOpCodes, parentIdx, icuExpression, newIndex);
                addRemoveNestedIcu(remove, newIndex, depth);
              }

              break;
          }

          currentNode = currentNode.nextSibling;
        }

        return bindingMask;
      }

      function addRemoveNode(remove, index, depth) {
        if (depth === 0) {
          remove.push(index);
        }
      }

      function addRemoveNestedIcu(remove, index, depth) {
        if (depth === 0) {
          remove.push(~index); // remove ICU at `index`

          remove.push(index); // remove ICU comment at `index`
        }
      }

      function addUpdateIcuSwitch(update, icuExpression, index) {
        update.push(toMaskBit(icuExpression.mainBinding), 2, -1 - icuExpression.mainBinding, index << 2
        /* SHIFT_REF */
        | 2
        /* IcuSwitch */
        );
      }

      function addUpdateIcuUpdate(update, bindingMask, index) {
        update.push(bindingMask, 1, index << 2
        /* SHIFT_REF */
        | 3
        /* IcuUpdate */
        );
      }

      function addCreateNodeAndAppend(create, marker, text, appendToParentIdx, createAtIdx) {
        if (marker !== null) {
          create.push(marker);
        }

        create.push(text, createAtIdx, icuCreateOpCode(0
        /* AppendChild */
        , appendToParentIdx, createAtIdx));
      }

      function addCreateAttribute(create, newIndex, attr) {
        create.push(newIndex << 1
        /* SHIFT_REF */
        | 1
        /* Attr */
        , attr.name, attr.value);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // i18nPostprocess consts


      var ROOT_TEMPLATE_ID = 0;
      var PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\[(�.+?�?)\]/;
      var PP_PLACEHOLDERS_REGEXP = /\[(�.+?�?)\]|(�\/?\*\d+:\d+�)/g;
      var PP_ICU_VARS_REGEXP = /({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g;
      var PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;
      var PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\d+)?)�/g;
      var PP_CLOSE_TEMPLATE_REGEXP = /\/\*/;
      var PP_TEMPLATE_ID_REGEXP = /\d+\:(\d+)/;
      /**
       * Handles message string post-processing for internationalization.
       *
       * Handles message string post-processing by transforming it from intermediate
       * format (that might contain some markers that we need to replace) to the final
       * form, consumable by i18nStart instruction. Post processing steps include:
       *
       * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])
       * 2. Replace all ICU vars (like "VAR_PLURAL")
       * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}
       * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)
       *    in case multiple ICUs have the same placeholder name
       *
       * @param message Raw translation string for post processing
       * @param replacements Set of replacements that should be applied
       *
       * @returns Transformed string that can be consumed by i18nStart instruction
       *
       * @codeGenApi
       */

      function i18nPostprocess(message) {
        var replacements = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

        /**
         * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�]
         *
         * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically
         * grouped by templates, for example: [�#5�|�#6�|�#1:1�|�#3:2�] where �#5� and �#6� belong to root
         * template, �#1:1� belong to nested template with index 1 and �#1:2� - nested template with index
         * 3. However in real templates the order might be different: i.e. �#1:1� and/or �#3:2� may go in
         * front of �#6�. The post processing step restores the right order by keeping track of the
         * template id stack and looks for placeholders that belong to the currently active template.
         */
        var result = message;

        if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {
          var matches = {};
          var templateIdsStack = [ROOT_TEMPLATE_ID];
          result = result.replace(PP_PLACEHOLDERS_REGEXP, function (m, phs, tmpl) {
            var content = phs || tmpl;
            var placeholders = matches[content] || [];

            if (!placeholders.length) {
              content.split('|').forEach(function (placeholder) {
                var match = placeholder.match(PP_TEMPLATE_ID_REGEXP);
                var templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;
                var isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder);
                placeholders.push([templateId, isCloseTemplateTag, placeholder]);
              });
              matches[content] = placeholders;
            }

            if (!placeholders.length) {
              throw new Error("i18n postprocess: unmatched placeholder - ".concat(content));
            }

            var currentTemplateId = templateIdsStack[templateIdsStack.length - 1];
            var idx = 0; // find placeholder index that matches current template id

            for (var i = 0; i < placeholders.length; i++) {
              if (placeholders[i][0] === currentTemplateId) {
                idx = i;
                break;
              }
            } // update template id stack based on the current tag extracted


            var _placeholders$idx = _slicedToArray(placeholders[idx], 3),
                templateId = _placeholders$idx[0],
                isCloseTemplateTag = _placeholders$idx[1],
                placeholder = _placeholders$idx[2];

            if (isCloseTemplateTag) {
              templateIdsStack.pop();
            } else if (currentTemplateId !== templateId) {
              templateIdsStack.push(templateId);
            } // remove processed tag from the list


            placeholders.splice(idx, 1);
            return placeholder;
          });
        } // return current result if no replacements specified


        if (!Object.keys(replacements).length) {
          return result;
        }
        /**
         * Step 2: replace all ICU vars (like "VAR_PLURAL")
         */


        result = result.replace(PP_ICU_VARS_REGEXP, function (match, start, key, _type, _idx, end) {
          return replacements.hasOwnProperty(key) ? "".concat(start).concat(replacements[key]).concat(end) : match;
        });
        /**
         * Step 3: replace all placeholders used inside ICUs in a form of {PLACEHOLDER}
         */

        result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, function (match, key) {
          return replacements.hasOwnProperty(key) ? replacements[key] : match;
        });
        /**
         * Step 4: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case
         * multiple ICUs have the same placeholder name
         */

        result = result.replace(PP_ICUS_REGEXP, function (match, key) {
          if (replacements.hasOwnProperty(key)) {
            var list = replacements[key];

            if (!list.length) {
              throw new Error("i18n postprocess: unmatched ICU - ".concat(match, " with key: ").concat(key));
            }

            return list.shift();
          }

          return match;
        });
        return result;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Marks a block of text as translatable.
       *
       * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.
       * The translation `message` is the value which is locale specific. The translation string may
       * contain placeholders which associate inner elements and sub-templates within the translation.
       *
       * The translation `message` placeholders are:
       * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
       *   interpolated into. The placeholder `index` points to the expression binding index. An optional
       *   `block` that matches the sub-template in which it was declared.
       * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*:  Marks the beginning
       *   and end of DOM element that were embedded in the original translation block. The placeholder
       *   `index` points to the element index in the template instructions set. An optional `block` that
       *   matches the sub-template in which it was declared.
       * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
       *   split up and translated separately in each angular template function. The `index` points to the
       *   `template` instruction index. A `block` that matches the sub-template in which it was declared.
       *
       * @param index A unique index of the translation in the static block.
       * @param messageIndex An index of the translation message from the `def.consts` array.
       * @param subTemplateIndex Optional sub-template index in the `message`.
       *
       * @codeGenApi
       */


      function ɵɵi18nStart(index, messageIndex) {
        var subTemplateIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
        var tView = getTView();
        var lView = getLView();
        var adjustedIndex = HEADER_OFFSET + index;
        ngDevMode && assertDefined(tView, "tView should be defined");
        var message = getConstant(tView.consts, messageIndex);
        var parentTNode = getCurrentParentTNode();

        if (tView.firstCreatePass) {
          i18nStartFirstCreatePass(tView, parentTNode === null ? 0 : parentTNode.index, lView, adjustedIndex, message, subTemplateIndex);
        }

        var tI18n = tView.data[adjustedIndex];
        var sameViewParentTNode = parentTNode === lView[T_HOST] ? null : parentTNode;
        var parentRNode = getClosestRElement(tView, sameViewParentTNode, lView); // If `parentTNode` is an `ElementContainer` than it has `<!--ng-container--->`.
        // When we do inserts we have to make sure to insert in front of `<!--ng-container--->`.

        var insertInFrontOf = parentTNode && parentTNode.type & 8
        /* ElementContainer */
        ? lView[parentTNode.index] : null;
        applyCreateOpCodes(lView, tI18n.create, parentRNode, insertInFrontOf);
        setInI18nBlock(true);
      }
      /**
       * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes
       * into the render tree, moves the placeholder nodes and removes the deleted nodes.
       *
       * @codeGenApi
       */


      function ɵɵi18nEnd() {
        setInI18nBlock(false);
      }
      /**
       *
       * Use this instruction to create a translation block that doesn't contain any placeholder.
       * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.
       *
       * The translation `message` is the value which is locale specific. The translation string may
       * contain placeholders which associate inner elements and sub-templates within the translation.
       *
       * The translation `message` placeholders are:
       * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
       *   interpolated into. The placeholder `index` points to the expression binding index. An optional
       *   `block` that matches the sub-template in which it was declared.
       * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*:  Marks the beginning
       *   and end of DOM element that were embedded in the original translation block. The placeholder
       *   `index` points to the element index in the template instructions set. An optional `block` that
       *   matches the sub-template in which it was declared.
       * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
       *   split up and translated separately in each angular template function. The `index` points to the
       *   `template` instruction index. A `block` that matches the sub-template in which it was declared.
       *
       * @param index A unique index of the translation in the static block.
       * @param messageIndex An index of the translation message from the `def.consts` array.
       * @param subTemplateIndex Optional sub-template index in the `message`.
       *
       * @codeGenApi
       */


      function ɵɵi18n(index, messageIndex, subTemplateIndex) {
        ɵɵi18nStart(index, messageIndex, subTemplateIndex);
        ɵɵi18nEnd();
      }
      /**
       * Marks a list of attributes as translatable.
       *
       * @param index A unique index in the static block
       * @param values
       *
       * @codeGenApi
       */


      function ɵɵi18nAttributes(index, attrsIndex) {
        var tView = getTView();
        ngDevMode && assertDefined(tView, "tView should be defined");
        var attrs = getConstant(tView.consts, attrsIndex);
        i18nAttributesFirstPass(tView, index + HEADER_OFFSET, attrs);
      }
      /**
       * Stores the values of the bindings during each update cycle in order to determine if we need to
       * update the translated nodes.
       *
       * @param value The binding's value
       * @returns This function returns itself so that it may be chained
       * (e.g. `i18nExp(ctx.name)(ctx.title)`)
       *
       * @codeGenApi
       */


      function ɵɵi18nExp(value) {
        var lView = getLView();
        setMaskBit(bindingUpdated(lView, nextBindingIndex(), value));
        return ɵɵi18nExp;
      }
      /**
       * Updates a translation block or an i18n attribute when the bindings have changed.
       *
       * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}
       * (i18n attribute) on which it should update the content.
       *
       * @codeGenApi
       */


      function ɵɵi18nApply(index) {
        applyI18n(getTView(), getLView(), index + HEADER_OFFSET);
      }
      /**
       * Handles message string post-processing for internationalization.
       *
       * Handles message string post-processing by transforming it from intermediate
       * format (that might contain some markers that we need to replace) to the final
       * form, consumable by i18nStart instruction. Post processing steps include:
       *
       * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])
       * 2. Replace all ICU vars (like "VAR_PLURAL")
       * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}
       * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)
       *    in case multiple ICUs have the same placeholder name
       *
       * @param message Raw translation string for post processing
       * @param replacements Set of replacements that should be applied
       *
       * @returns Transformed string that can be consumed by i18nStart instruction
       *
       * @codeGenApi
       */


      function ɵɵi18nPostprocess(message) {
        var replacements = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
        return i18nPostprocess(message, replacements);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Resolves the providers which are defined in the DirectiveDef.
       *
       * When inserting the tokens and the factories in their respective arrays, we can assume that
       * this method is called first for the component (if any), and then for other directives on the same
       * node.
       * As a consequence,the providers are always processed in that order:
       * 1) The view providers of the component
       * 2) The providers of the component
       * 3) The providers of the other directives
       * This matches the structure of the injectables arrays of a view (for each node).
       * So the tokens and the factories can be pushed at the end of the arrays, except
       * in one case for multi providers.
       *
       * @param def the directive definition
       * @param providers: Array of `providers`.
       * @param viewProviders: Array of `viewProviders`.
       */


      function providersResolver(def, providers, viewProviders) {
        var tView = getTView();

        if (tView.firstCreatePass) {
          var isComponent = isComponentDef(def); // The list of view providers is processed first, and the flags are updated

          resolveProvider$1(viewProviders, tView.data, tView.blueprint, isComponent, true); // Then, the list of providers is processed, and the flags are updated

          resolveProvider$1(providers, tView.data, tView.blueprint, isComponent, false);
        }
      }
      /**
       * Resolves a provider and publishes it to the DI system.
       */


      function resolveProvider$1(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {
        provider = resolveForwardRef(provider);

        if (Array.isArray(provider)) {
          // Recursively call `resolveProvider`
          // Recursion is OK in this case because this code will not be in hot-path once we implement
          // cloning of the initial state.
          for (var i = 0; i < provider.length; i++) {
            resolveProvider$1(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);
          }
        } else {
          var tView = getTView();
          var lView = getLView();
          var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);
          var providerFactory = providerToFactory(provider);
          var tNode = getCurrentTNode();
          var beginIndex = tNode.providerIndexes & 1048575
          /* ProvidersStartIndexMask */
          ;
          var endIndex = tNode.directiveStart;
          var cptViewProvidersCount = tNode.providerIndexes >> 20
          /* CptViewProvidersCountShift */
          ;

          if (isTypeProvider(provider) || !provider.multi) {
            // Single provider case: the factory is created and pushed immediately
            var factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);
            var existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);

            if (existingFactoryIndex === -1) {
              diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);
              registerDestroyHooksIfSupported(tView, provider, tInjectables.length);
              tInjectables.push(token);
              tNode.directiveStart++;
              tNode.directiveEnd++;

              if (isViewProvider) {
                tNode.providerIndexes += 1048576
                /* CptViewProvidersCountShifter */
                ;
              }

              lInjectablesBlueprint.push(factory);
              lView.push(factory);
            } else {
              lInjectablesBlueprint[existingFactoryIndex] = factory;
              lView[existingFactoryIndex] = factory;
            }
          } else {
            // Multi provider case:
            // We create a multi factory which is going to aggregate all the values.
            // Since the output of such a factory depends on content or view injection,
            // we create two of them, which are linked together.
            //
            // The first one (for view providers) is always in the first block of the injectables array,
            // and the second one (for providers) is always in the second block.
            // This is important because view providers have higher priority. When a multi token
            // is being looked up, the view providers should be found first.
            // Note that it is not possible to have a multi factory in the third block (directive block).
            //
            // The algorithm to process multi providers is as follows:
            // 1) If the multi provider comes from the `viewProviders` of the component:
            //   a) If the special view providers factory doesn't exist, it is created and pushed.
            //   b) Else, the multi provider is added to the existing multi factory.
            // 2) If the multi provider comes from the `providers` of the component or of another
            // directive:
            //   a) If the multi factory doesn't exist, it is created and provider pushed into it.
            //      It is also linked to the multi factory for view providers, if it exists.
            //   b) Else, the multi provider is added to the existing multi factory.
            var existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);
            var existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);
            var doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingProvidersFactoryIndex];
            var doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingViewProvidersFactoryIndex];

            if (isViewProvider && !doesViewProvidersFactoryExist || !isViewProvider && !doesProvidersFactoryExist) {
              // Cases 1.a and 2.a
              diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);

              var _factory2 = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);

              if (!isViewProvider && doesViewProvidersFactoryExist) {
                lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = _factory2;
              }

              registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);
              tInjectables.push(token);
              tNode.directiveStart++;
              tNode.directiveEnd++;

              if (isViewProvider) {
                tNode.providerIndexes += 1048576
                /* CptViewProvidersCountShifter */
                ;
              }

              lInjectablesBlueprint.push(_factory2);
              lView.push(_factory2);
            } else {
              // Cases 1.b and 2.b
              var indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);
              registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex : existingViewProvidersFactoryIndex, indexInFactory);
            }

            if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {
              lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;
            }
          }
        }
      }
      /**
       * Registers the `ngOnDestroy` hook of a provider, if the provider supports destroy hooks.
       * @param tView `TView` in which to register the hook.
       * @param provider Provider whose hook should be registered.
       * @param contextIndex Index under which to find the context for the hook when it's being invoked.
       * @param indexInFactory Only required for `multi` providers. Index of the provider in the multi
       * provider factory.
       */


      function registerDestroyHooksIfSupported(tView, provider, contextIndex, indexInFactory) {
        var providerIsTypeProvider = isTypeProvider(provider);

        if (providerIsTypeProvider || isClassProvider(provider)) {
          var prototype = (provider.useClass || provider).prototype;
          var ngOnDestroy = prototype.ngOnDestroy;

          if (ngOnDestroy) {
            var hooks = tView.destroyHooks || (tView.destroyHooks = []);

            if (!providerIsTypeProvider && provider.multi) {
              ngDevMode && assertDefined(indexInFactory, 'indexInFactory when registering multi factory destroy hook');
              var existingCallbacksIndex = hooks.indexOf(contextIndex);

              if (existingCallbacksIndex === -1) {
                hooks.push(contextIndex, [indexInFactory, ngOnDestroy]);
              } else {
                hooks[existingCallbacksIndex + 1].push(indexInFactory, ngOnDestroy);
              }
            } else {
              hooks.push(contextIndex, ngOnDestroy);
            }
          }
        }
      }
      /**
       * Add a factory in a multi factory.
       * @returns Index at which the factory was inserted.
       */


      function multiFactoryAdd(multiFactory, factory, isComponentProvider) {
        if (isComponentProvider) {
          multiFactory.componentProviders++;
        }

        return multiFactory.multi.push(factory) - 1;
      }
      /**
       * Returns the index of item in the array, but only in the begin to end range.
       */


      function indexOf(item, arr, begin, end) {
        for (var i = begin; i < end; i++) {
          if (arr[i] === item) return i;
        }

        return -1;
      }
      /**
       * Use this with `multi` `providers`.
       */


      function multiProvidersFactoryResolver(_, tData, lData, tNode) {
        return multiResolve(this.multi, []);
      }
      /**
       * Use this with `multi` `viewProviders`.
       *
       * This factory knows how to concatenate itself with the existing `multi` `providers`.
       */


      function multiViewProvidersFactoryResolver(_, tData, lView, tNode) {
        var factories = this.multi;
        var result;

        if (this.providerFactory) {
          var componentCount = this.providerFactory.componentProviders;
          var multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode); // Copy the section of the array which contains `multi` `providers` from the component

          result = multiProviders.slice(0, componentCount); // Insert the `viewProvider` instances.

          multiResolve(factories, result); // Copy the section of the array which contains `multi` `providers` from other directives

          for (var i = componentCount; i < multiProviders.length; i++) {
            result.push(multiProviders[i]);
          }
        } else {
          result = []; // Insert the `viewProvider` instances.

          multiResolve(factories, result);
        }

        return result;
      }
      /**
       * Maps an array of factories into an array of values.
       */


      function multiResolve(factories, result) {
        for (var i = 0; i < factories.length; i++) {
          var factory = factories[i];
          result.push(factory());
        }

        return result;
      }
      /**
       * Creates a multi factory.
       */


      function multiFactory(factoryFn, index, isViewProvider, isComponent, f) {
        var factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);
        factory.multi = [];
        factory.index = index;
        factory.componentProviders = 0;
        multiFactoryAdd(factory, f, isComponent && !isViewProvider);
        return factory;
      }
      /**
       * This feature resolves the providers of a directive (or component),
       * and publish them into the DI system, making it visible to others for injection.
       *
       * For example:
       * ```ts
       * class ComponentWithProviders {
       *   constructor(private greeter: GreeterDE) {}
       *
       *   static ɵcmp = defineComponent({
       *     type: ComponentWithProviders,
       *     selectors: [['component-with-providers']],
       *    factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),
       *    decls: 1,
       *    vars: 1,
       *    template: function(fs: RenderFlags, ctx: ComponentWithProviders) {
       *      if (fs & RenderFlags.Create) {
       *        ɵɵtext(0);
       *      }
       *      if (fs & RenderFlags.Update) {
       *        ɵɵtextInterpolate(ctx.greeter.greet());
       *      }
       *    },
       *    features: [ɵɵProvidersFeature([GreeterDE])]
       *  });
       * }
       * ```
       *
       * @param definition
       *
       * @codeGenApi
       */


      function ɵɵProvidersFeature(providers) {
        var viewProviders = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
        return function (definition) {
          definition.providersResolver = function (def, processProvidersFn) {
            return providersResolver(def, //
            processProvidersFn ? processProvidersFn(providers) : providers, //
            viewProviders);
          };
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Represents a component created by a `ComponentFactory`.
       * Provides access to the component instance and related objects,
       * and provides the means of destroying the instance.
       *
       * @publicApi
       */


      var ComponentRef = function ComponentRef() {
        _classCallCheck(this, ComponentRef);
      };
      /**
       * Base class for a factory that can create a component dynamically.
       * Instantiate a factory for a given type of component with `resolveComponentFactory()`.
       * Use the resulting `ComponentFactory.create()` method to create a component of that type.
       *
       * @see [Dynamic Components](guide/dynamic-component-loader)
       *
       * @publicApi
       */


      var ComponentFactory = function ComponentFactory() {
        _classCallCheck(this, ComponentFactory);
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function noComponentFactoryError(component) {
        var error = Error("No component factory found for ".concat(stringify(component), ". Did you add it to @NgModule.entryComponents?"));
        error[ERROR_COMPONENT] = component;
        return error;
      }

      var ERROR_COMPONENT = 'ngComponent';

      function getComponent$1(error) {
        return error[ERROR_COMPONENT];
      }

      var _NullComponentFactoryResolver = /*#__PURE__*/function () {
        function _NullComponentFactoryResolver() {
          _classCallCheck(this, _NullComponentFactoryResolver);
        }

        _createClass2(_NullComponentFactoryResolver, [{
          key: "resolveComponentFactory",
          value: function resolveComponentFactory(component) {
            throw noComponentFactoryError(component);
          }
        }]);

        return _NullComponentFactoryResolver;
      }();
      /**
       * A simple registry that maps `Components` to generated `ComponentFactory` classes
       * that can be used to create instances of components.
       * Use to obtain the factory for a given component type,
       * then use the factory's `create()` method to create a component of that type.
       *
       * @see [Dynamic Components](guide/dynamic-component-loader)
       * @publicApi
       */


      var ComponentFactoryResolver = function ComponentFactoryResolver() {
        _classCallCheck(this, ComponentFactoryResolver);
      };

      ComponentFactoryResolver.NULL = new _NullComponentFactoryResolver();

      var CodegenComponentFactoryResolver = /*#__PURE__*/function () {
        function CodegenComponentFactoryResolver(factories, _parent, _ngModule) {
          _classCallCheck(this, CodegenComponentFactoryResolver);

          this._parent = _parent;
          this._ngModule = _ngModule;
          this._factories = new Map();

          for (var i = 0; i < factories.length; i++) {
            var factory = factories[i];

            this._factories.set(factory.componentType, factory);
          }
        }

        _createClass2(CodegenComponentFactoryResolver, [{
          key: "resolveComponentFactory",
          value: function resolveComponentFactory(component) {
            var factory = this._factories.get(component);

            if (!factory && this._parent) {
              factory = this._parent.resolveComponentFactory(component);
            }

            if (!factory) {
              throw noComponentFactoryError(component);
            }

            return new ComponentFactoryBoundToModule(factory, this._ngModule);
          }
        }]);

        return CodegenComponentFactoryResolver;
      }();

      var ComponentFactoryBoundToModule = /*#__PURE__*/function (_ComponentFactory) {
        _inherits(ComponentFactoryBoundToModule, _ComponentFactory);

        var _super222 = _createSuper(ComponentFactoryBoundToModule);

        function ComponentFactoryBoundToModule(factory, ngModule) {
          var _this471;

          _classCallCheck(this, ComponentFactoryBoundToModule);

          _this471 = _super222.call(this);
          _this471.factory = factory;
          _this471.ngModule = ngModule;
          _this471.selector = factory.selector;
          _this471.componentType = factory.componentType;
          _this471.ngContentSelectors = factory.ngContentSelectors;
          _this471.inputs = factory.inputs;
          _this471.outputs = factory.outputs;
          return _this471;
        }

        _createClass2(ComponentFactoryBoundToModule, [{
          key: "create",
          value: function create(injector, projectableNodes, rootSelectorOrNode, ngModule) {
            return this.factory.create(injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);
          }
        }]);

        return ComponentFactoryBoundToModule;
      }(ComponentFactory);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function noop() {// Do nothing.
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Creates an ElementRef from the most recent node.
       *
       * @returns The ElementRef instance to use
       */


      function injectElementRef() {
        return createElementRef(getCurrentTNode(), getLView());
      }
      /**
       * Creates an ElementRef given a node.
       *
       * @param tNode The node for which you'd like an ElementRef
       * @param lView The view to which the node belongs
       * @returns The ElementRef instance to use
       */


      function createElementRef(tNode, lView) {
        return new ElementRef(getNativeByTNode(tNode, lView));
      }

      var SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = injectElementRef;
      var SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop;
      var SWITCH_ELEMENT_REF_FACTORY = SWITCH_ELEMENT_REF_FACTORY__POST_R3__;
      /**
       * A wrapper around a native element inside of a View.
       *
       * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM
       * element.
       *
       * @security Permitting direct access to the DOM can make your application more vulnerable to
       * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the
       * [Security Guide](https://g.co/ng/security).
       *
       * @publicApi
       */
      // Note: We don't expose things like `Injector`, `ViewContainer`, ... here,
      // i.e. users have to ask for what they need. With that, we can build better analysis tools
      // and could do better codegen in the future.

      var ElementRef = function ElementRef(nativeElement) {
        _classCallCheck(this, ElementRef);

        this.nativeElement = nativeElement;
      };
      /**
       * @internal
       * @nocollapse
       */


      ElementRef.__NG_ELEMENT_ID__ = SWITCH_ELEMENT_REF_FACTORY;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');
      /**
       * Creates and initializes a custom renderer that implements the `Renderer2` base class.
       *
       * @publicApi
       */

      var RendererFactory2 = function RendererFactory2() {
        _classCallCheck(this, RendererFactory2);
      };
      /**
       * Extend this base class to implement custom rendering. By default, Angular
       * renders a template into DOM. You can use custom rendering to intercept
       * rendering calls, or to render to something other than DOM.
       *
       * Create your custom renderer using `RendererFactory2`.
       *
       * Use a custom renderer to bypass Angular's templating and
       * make custom UI changes that can't be expressed declaratively.
       * For example if you need to set a property or an attribute whose name is
       * not statically known, use the `setProperty()` or
       * `setAttribute()` method.
       *
       * @publicApi
       */


      var Renderer2 = function Renderer2() {
        _classCallCheck(this, Renderer2);
      };
      /**
       * @internal
       * @nocollapse
       */


      Renderer2.__NG_ELEMENT_ID__ = function () {
        return SWITCH_RENDERER2_FACTORY();
      };

      var SWITCH_RENDERER2_FACTORY__POST_R3__ = injectRenderer2;
      var SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop;
      var SWITCH_RENDERER2_FACTORY = SWITCH_RENDERER2_FACTORY__POST_R3__;
      /** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */

      function getOrCreateRenderer2(lView) {
        var renderer = lView[RENDERER];

        if (ngDevMode && !isProceduralRenderer(renderer)) {
          throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');
        }

        return renderer;
      }
      /** Injects a Renderer2 for the current component. */


      function injectRenderer2() {
        // We need the Renderer to be based on the component that it's being injected into, however since
        // DI happens before we've entered its view, `getLView` will return the parent view instead.
        var lView = getLView();
        var tNode = getCurrentTNode();
        var nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);
        return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Sanitizer is used by the views to sanitize potentially dangerous values.
       *
       * @publicApi
       */


      var Sanitizer = function Sanitizer() {
        _classCallCheck(this, Sanitizer);
      };
      /** @nocollapse */


      Sanitizer.ɵprov = ɵɵdefineInjectable({
        token: Sanitizer,
        providedIn: 'root',
        factory: function factory() {
          return null;
        }
      });
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description Represents the version of Angular
       *
       * @publicApi
       */

      var Version = function Version(full) {
        _classCallCheck(this, Version);

        this.full = full;
        this.major = full.split('.')[0];
        this.minor = full.split('.')[1];
        this.patch = full.split('.').slice(2).join('.');
      };
      /**
       * @publicApi
       */


      var VERSION = new Version('11.0.9');
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var DefaultIterableDifferFactory = /*#__PURE__*/function () {
        function DefaultIterableDifferFactory() {
          _classCallCheck(this, DefaultIterableDifferFactory);
        }

        _createClass2(DefaultIterableDifferFactory, [{
          key: "supports",
          value: function supports(obj) {
            return isListLikeIterable(obj);
          }
        }, {
          key: "create",
          value: function create(trackByFn) {
            return new DefaultIterableDiffer(trackByFn);
          }
        }]);

        return DefaultIterableDifferFactory;
      }();

      var trackByIdentity = function trackByIdentity(index, item) {
        return item;
      };

      var ɵ0$b = trackByIdentity;
      /**
       * @deprecated v4.0.0 - Should not be part of public API.
       * @publicApi
       */

      var DefaultIterableDiffer = /*#__PURE__*/function () {
        function DefaultIterableDiffer(trackByFn) {
          _classCallCheck(this, DefaultIterableDiffer);

          this.length = 0; // Keeps track of the used records at any point in time (during & across `_check()` calls)

          this._linkedRecords = null; // Keeps track of the removed records at any point in time during `_check()` calls.

          this._unlinkedRecords = null;
          this._previousItHead = null;
          this._itHead = null;
          this._itTail = null;
          this._additionsHead = null;
          this._additionsTail = null;
          this._movesHead = null;
          this._movesTail = null;
          this._removalsHead = null;
          this._removalsTail = null; // Keeps track of records where custom track by is the same, but item identity has changed

          this._identityChangesHead = null;
          this._identityChangesTail = null;
          this._trackByFn = trackByFn || trackByIdentity;
        }

        _createClass2(DefaultIterableDiffer, [{
          key: "forEachItem",
          value: function forEachItem(fn) {
            var record;

            for (record = this._itHead; record !== null; record = record._next) {
              fn(record);
            }
          }
        }, {
          key: "forEachOperation",
          value: function forEachOperation(fn) {
            var nextIt = this._itHead;
            var nextRemove = this._removalsHead;
            var addRemoveOffset = 0;
            var moveOffsets = null;

            while (nextIt || nextRemove) {
              // Figure out which is the next record to process
              // Order: remove, add, move
              var record = !nextRemove || nextIt && nextIt.currentIndex < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ? nextIt : nextRemove;
              var adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);
              var currentIndex = record.currentIndex; // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary

              if (record === nextRemove) {
                addRemoveOffset--;
                nextRemove = nextRemove._nextRemoved;
              } else {
                nextIt = nextIt._next;

                if (record.previousIndex == null) {
                  addRemoveOffset++;
                } else {
                  // INVARIANT:  currentIndex < previousIndex
                  if (!moveOffsets) moveOffsets = [];
                  var localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;
                  var localCurrentIndex = currentIndex - addRemoveOffset;

                  if (localMovePreviousIndex != localCurrentIndex) {
                    for (var i = 0; i < localMovePreviousIndex; i++) {
                      var offset = i < moveOffsets.length ? moveOffsets[i] : moveOffsets[i] = 0;
                      var index = offset + i;

                      if (localCurrentIndex <= index && index < localMovePreviousIndex) {
                        moveOffsets[i] = offset + 1;
                      }
                    }

                    var previousIndex = record.previousIndex;
                    moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;
                  }
                }
              }

              if (adjPreviousIndex !== currentIndex) {
                fn(record, adjPreviousIndex, currentIndex);
              }
            }
          }
        }, {
          key: "forEachPreviousItem",
          value: function forEachPreviousItem(fn) {
            var record;

            for (record = this._previousItHead; record !== null; record = record._nextPrevious) {
              fn(record);
            }
          }
        }, {
          key: "forEachAddedItem",
          value: function forEachAddedItem(fn) {
            var record;

            for (record = this._additionsHead; record !== null; record = record._nextAdded) {
              fn(record);
            }
          }
        }, {
          key: "forEachMovedItem",
          value: function forEachMovedItem(fn) {
            var record;

            for (record = this._movesHead; record !== null; record = record._nextMoved) {
              fn(record);
            }
          }
        }, {
          key: "forEachRemovedItem",
          value: function forEachRemovedItem(fn) {
            var record;

            for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
              fn(record);
            }
          }
        }, {
          key: "forEachIdentityChange",
          value: function forEachIdentityChange(fn) {
            var record;

            for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {
              fn(record);
            }
          }
        }, {
          key: "diff",
          value: function diff(collection) {
            if (collection == null) collection = [];

            if (!isListLikeIterable(collection)) {
              throw new Error("Error trying to diff '".concat(stringify(collection), "'. Only arrays and iterables are allowed"));
            }

            if (this.check(collection)) {
              return this;
            } else {
              return null;
            }
          }
        }, {
          key: "onDestroy",
          value: function onDestroy() {}
        }, {
          key: "check",
          value: function check(collection) {
            var _this472 = this;

            this._reset();

            var record = this._itHead;
            var mayBeDirty = false;
            var index;
            var item;
            var itemTrackBy;

            if (Array.isArray(collection)) {
              this.length = collection.length;

              for (var _index3 = 0; _index3 < this.length; _index3++) {
                item = collection[_index3];
                itemTrackBy = this._trackByFn(_index3, item);

                if (record === null || !Object.is(record.trackById, itemTrackBy)) {
                  record = this._mismatch(record, item, itemTrackBy, _index3);
                  mayBeDirty = true;
                } else {
                  if (mayBeDirty) {
                    // TODO(misko): can we limit this to duplicates only?
                    record = this._verifyReinsertion(record, item, itemTrackBy, _index3);
                  }

                  if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
                }

                record = record._next;
              }
            } else {
              index = 0;
              iterateListLike(collection, function (item) {
                itemTrackBy = _this472._trackByFn(index, item);

                if (record === null || !Object.is(record.trackById, itemTrackBy)) {
                  record = _this472._mismatch(record, item, itemTrackBy, index);
                  mayBeDirty = true;
                } else {
                  if (mayBeDirty) {
                    // TODO(misko): can we limit this to duplicates only?
                    record = _this472._verifyReinsertion(record, item, itemTrackBy, index);
                  }

                  if (!Object.is(record.item, item)) _this472._addIdentityChange(record, item);
                }

                record = record._next;
                index++;
              });
              this.length = index;
            }

            this._truncate(record);

            this.collection = collection;
            return this.isDirty;
          }
          /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity
           * changes.
           */

        }, {
          key: "isDirty",
          get: function get() {
            return this._additionsHead !== null || this._movesHead !== null || this._removalsHead !== null || this._identityChangesHead !== null;
          }
          /**
           * Reset the state of the change objects to show no changes. This means set previousKey to
           * currentKey, and clear all of the queues (additions, moves, removals).
           * Set the previousIndexes of moved and added items to their currentIndexes
           * Reset the list of additions, moves and removals
           *
           * @internal
           */

        }, {
          key: "_reset",
          value: function _reset() {
            if (this.isDirty) {
              var record;

              for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {
                record._nextPrevious = record._next;
              }

              for (record = this._additionsHead; record !== null; record = record._nextAdded) {
                record.previousIndex = record.currentIndex;
              }

              this._additionsHead = this._additionsTail = null;

              for (record = this._movesHead; record !== null; record = record._nextMoved) {
                record.previousIndex = record.currentIndex;
              }

              this._movesHead = this._movesTail = null;
              this._removalsHead = this._removalsTail = null;
              this._identityChangesHead = this._identityChangesTail = null; // TODO(vicb): when assert gets supported
              // assert(!this.isDirty);
            }
          }
          /**
           * This is the core function which handles differences between collections.
           *
           * - `record` is the record which we saw at this position last time. If null then it is a new
           *   item.
           * - `item` is the current item in the collection
           * - `index` is the position of the item in the collection
           *
           * @internal
           */

        }, {
          key: "_mismatch",
          value: function _mismatch(record, item, itemTrackBy, index) {
            // The previous record after which we will append the current one.
            var previousRecord;

            if (record === null) {
              previousRecord = this._itTail;
            } else {
              previousRecord = record._prev; // Remove the record from the collection since we know it does not match the item.

              this._remove(record);
            } // Attempt to see if we have seen the item before.


            record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);

            if (record !== null) {
              // We have seen this before, we need to move it forward in the collection.
              // But first we need to check if identity changed, so we can update in view if necessary
              if (!Object.is(record.item, item)) this._addIdentityChange(record, item);

              this._moveAfter(record, previousRecord, index);
            } else {
              // Never seen it, check evicted list.
              record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);

              if (record !== null) {
                // It is an item which we have evicted earlier: reinsert it back into the list.
                // But first we need to check if identity changed, so we can update in view if necessary
                if (!Object.is(record.item, item)) this._addIdentityChange(record, item);

                this._reinsertAfter(record, previousRecord, index);
              } else {
                // It is a new item: add it.
                record = this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);
              }
            }

            return record;
          }
          /**
           * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)
           *
           * Use case: `[a, a]` => `[b, a, a]`
           *
           * If we did not have this check then the insertion of `b` would:
           *   1) evict first `a`
           *   2) insert `b` at `0` index.
           *   3) leave `a` at index `1` as is. <-- this is wrong!
           *   3) reinsert `a` at index 2. <-- this is wrong!
           *
           * The correct behavior is:
           *   1) evict first `a`
           *   2) insert `b` at `0` index.
           *   3) reinsert `a` at index 1.
           *   3) move `a` at from `1` to `2`.
           *
           *
           * Double check that we have not evicted a duplicate item. We need to check if the item type may
           * have already been removed:
           * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted
           * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a
           * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'
           * at the end.
           *
           * @internal
           */

        }, {
          key: "_verifyReinsertion",
          value: function _verifyReinsertion(record, item, itemTrackBy, index) {
            var reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);

            if (reinsertRecord !== null) {
              record = this._reinsertAfter(reinsertRecord, record._prev, index);
            } else if (record.currentIndex != index) {
              record.currentIndex = index;

              this._addToMoves(record, index);
            }

            return record;
          }
          /**
           * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection
           *
           * - `record` The first excess {@link IterableChangeRecord_}.
           *
           * @internal
           */

        }, {
          key: "_truncate",
          value: function _truncate(record) {
            // Anything after that needs to be removed;
            while (record !== null) {
              var nextRecord = record._next;

              this._addToRemovals(this._unlink(record));

              record = nextRecord;
            }

            if (this._unlinkedRecords !== null) {
              this._unlinkedRecords.clear();
            }

            if (this._additionsTail !== null) {
              this._additionsTail._nextAdded = null;
            }

            if (this._movesTail !== null) {
              this._movesTail._nextMoved = null;
            }

            if (this._itTail !== null) {
              this._itTail._next = null;
            }

            if (this._removalsTail !== null) {
              this._removalsTail._nextRemoved = null;
            }

            if (this._identityChangesTail !== null) {
              this._identityChangesTail._nextIdentityChange = null;
            }
          }
          /** @internal */

        }, {
          key: "_reinsertAfter",
          value: function _reinsertAfter(record, prevRecord, index) {
            if (this._unlinkedRecords !== null) {
              this._unlinkedRecords.remove(record);
            }

            var prev = record._prevRemoved;
            var next = record._nextRemoved;

            if (prev === null) {
              this._removalsHead = next;
            } else {
              prev._nextRemoved = next;
            }

            if (next === null) {
              this._removalsTail = prev;
            } else {
              next._prevRemoved = prev;
            }

            this._insertAfter(record, prevRecord, index);

            this._addToMoves(record, index);

            return record;
          }
          /** @internal */

        }, {
          key: "_moveAfter",
          value: function _moveAfter(record, prevRecord, index) {
            this._unlink(record);

            this._insertAfter(record, prevRecord, index);

            this._addToMoves(record, index);

            return record;
          }
          /** @internal */

        }, {
          key: "_addAfter",
          value: function _addAfter(record, prevRecord, index) {
            this._insertAfter(record, prevRecord, index);

            if (this._additionsTail === null) {
              // TODO(vicb):
              // assert(this._additionsHead === null);
              this._additionsTail = this._additionsHead = record;
            } else {
              // TODO(vicb):
              // assert(_additionsTail._nextAdded === null);
              // assert(record._nextAdded === null);
              this._additionsTail = this._additionsTail._nextAdded = record;
            }

            return record;
          }
          /** @internal */

        }, {
          key: "_insertAfter",
          value: function _insertAfter(record, prevRecord, index) {
            // TODO(vicb):
            // assert(record != prevRecord);
            // assert(record._next === null);
            // assert(record._prev === null);
            var next = prevRecord === null ? this._itHead : prevRecord._next; // TODO(vicb):
            // assert(next != record);
            // assert(prevRecord != record);

            record._next = next;
            record._prev = prevRecord;

            if (next === null) {
              this._itTail = record;
            } else {
              next._prev = record;
            }

            if (prevRecord === null) {
              this._itHead = record;
            } else {
              prevRecord._next = record;
            }

            if (this._linkedRecords === null) {
              this._linkedRecords = new _DuplicateMap();
            }

            this._linkedRecords.put(record);

            record.currentIndex = index;
            return record;
          }
          /** @internal */

        }, {
          key: "_remove",
          value: function _remove(record) {
            return this._addToRemovals(this._unlink(record));
          }
          /** @internal */

        }, {
          key: "_unlink",
          value: function _unlink(record) {
            if (this._linkedRecords !== null) {
              this._linkedRecords.remove(record);
            }

            var prev = record._prev;
            var next = record._next; // TODO(vicb):
            // assert((record._prev = null) === null);
            // assert((record._next = null) === null);

            if (prev === null) {
              this._itHead = next;
            } else {
              prev._next = next;
            }

            if (next === null) {
              this._itTail = prev;
            } else {
              next._prev = prev;
            }

            return record;
          }
          /** @internal */

        }, {
          key: "_addToMoves",
          value: function _addToMoves(record, toIndex) {
            // TODO(vicb):
            // assert(record._nextMoved === null);
            if (record.previousIndex === toIndex) {
              return record;
            }

            if (this._movesTail === null) {
              // TODO(vicb):
              // assert(_movesHead === null);
              this._movesTail = this._movesHead = record;
            } else {
              // TODO(vicb):
              // assert(_movesTail._nextMoved === null);
              this._movesTail = this._movesTail._nextMoved = record;
            }

            return record;
          }
        }, {
          key: "_addToRemovals",
          value: function _addToRemovals(record) {
            if (this._unlinkedRecords === null) {
              this._unlinkedRecords = new _DuplicateMap();
            }

            this._unlinkedRecords.put(record);

            record.currentIndex = null;
            record._nextRemoved = null;

            if (this._removalsTail === null) {
              // TODO(vicb):
              // assert(_removalsHead === null);
              this._removalsTail = this._removalsHead = record;
              record._prevRemoved = null;
            } else {
              // TODO(vicb):
              // assert(_removalsTail._nextRemoved === null);
              // assert(record._nextRemoved === null);
              record._prevRemoved = this._removalsTail;
              this._removalsTail = this._removalsTail._nextRemoved = record;
            }

            return record;
          }
          /** @internal */

        }, {
          key: "_addIdentityChange",
          value: function _addIdentityChange(record, item) {
            record.item = item;

            if (this._identityChangesTail === null) {
              this._identityChangesTail = this._identityChangesHead = record;
            } else {
              this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;
            }

            return record;
          }
        }]);

        return DefaultIterableDiffer;
      }();

      var IterableChangeRecord_ = function IterableChangeRecord_(item, trackById) {
        _classCallCheck(this, IterableChangeRecord_);

        this.item = item;
        this.trackById = trackById;
        this.currentIndex = null;
        this.previousIndex = null;
        /** @internal */

        this._nextPrevious = null;
        /** @internal */

        this._prev = null;
        /** @internal */

        this._next = null;
        /** @internal */

        this._prevDup = null;
        /** @internal */

        this._nextDup = null;
        /** @internal */

        this._prevRemoved = null;
        /** @internal */

        this._nextRemoved = null;
        /** @internal */

        this._nextAdded = null;
        /** @internal */

        this._nextMoved = null;
        /** @internal */

        this._nextIdentityChange = null;
      }; // A linked list of IterableChangeRecords with the same IterableChangeRecord_.item


      var _DuplicateItemRecordList = /*#__PURE__*/function () {
        function _DuplicateItemRecordList() {
          _classCallCheck(this, _DuplicateItemRecordList);

          /** @internal */
          this._head = null;
          /** @internal */

          this._tail = null;
        }
        /**
         * Append the record to the list of duplicates.
         *
         * Note: by design all records in the list of duplicates hold the same value in record.item.
         */


        _createClass2(_DuplicateItemRecordList, [{
          key: "add",
          value: function add(record) {
            if (this._head === null) {
              this._head = this._tail = record;
              record._nextDup = null;
              record._prevDup = null;
            } else {
              // TODO(vicb):
              // assert(record.item ==  _head.item ||
              //       record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);
              this._tail._nextDup = record;
              record._prevDup = this._tail;
              record._nextDup = null;
              this._tail = record;
            }
          } // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and
          // IterableChangeRecord_.currentIndex >= atOrAfterIndex

        }, {
          key: "get",
          value: function get(trackById, atOrAfterIndex) {
            var record;

            for (record = this._head; record !== null; record = record._nextDup) {
              if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) && Object.is(record.trackById, trackById)) {
                return record;
              }
            }

            return null;
          }
          /**
           * Remove one {@link IterableChangeRecord_} from the list of duplicates.
           *
           * Returns whether the list of duplicates is empty.
           */

        }, {
          key: "remove",
          value: function remove(record) {
            // TODO(vicb):
            // assert(() {
            //  // verify that the record being removed is in the list.
            //  for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {
            //    if (identical(cursor, record)) return true;
            //  }
            //  return false;
            //});
            var prev = record._prevDup;
            var next = record._nextDup;

            if (prev === null) {
              this._head = next;
            } else {
              prev._nextDup = next;
            }

            if (next === null) {
              this._tail = prev;
            } else {
              next._prevDup = prev;
            }

            return this._head === null;
          }
        }]);

        return _DuplicateItemRecordList;
      }();

      var _DuplicateMap = /*#__PURE__*/function () {
        function _DuplicateMap() {
          _classCallCheck(this, _DuplicateMap);

          this.map = new Map();
        }

        _createClass2(_DuplicateMap, [{
          key: "put",
          value: function put(record) {
            var key = record.trackById;
            var duplicates = this.map.get(key);

            if (!duplicates) {
              duplicates = new _DuplicateItemRecordList();
              this.map.set(key, duplicates);
            }

            duplicates.add(record);
          }
          /**
           * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we
           * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.
           *
           * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we
           * have any more `a`s needs to return the second `a`.
           */

        }, {
          key: "get",
          value: function get(trackById, atOrAfterIndex) {
            var key = trackById;
            var recordList = this.map.get(key);
            return recordList ? recordList.get(trackById, atOrAfterIndex) : null;
          }
          /**
           * Removes a {@link IterableChangeRecord_} from the list of duplicates.
           *
           * The list of duplicates also is removed from the map if it gets empty.
           */

        }, {
          key: "remove",
          value: function remove(record) {
            var key = record.trackById;
            var recordList = this.map.get(key); // Remove the list of duplicates when it gets empty

            if (recordList.remove(record)) {
              this.map["delete"](key);
            }

            return record;
          }
        }, {
          key: "isEmpty",
          get: function get() {
            return this.map.size === 0;
          }
        }, {
          key: "clear",
          value: function clear() {
            this.map.clear();
          }
        }]);

        return _DuplicateMap;
      }();

      function getPreviousIndex(item, addRemoveOffset, moveOffsets) {
        var previousIndex = item.previousIndex;
        if (previousIndex === null) return previousIndex;
        var moveOffset = 0;

        if (moveOffsets && previousIndex < moveOffsets.length) {
          moveOffset = moveOffsets[previousIndex];
        }

        return previousIndex + addRemoveOffset + moveOffset;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var DefaultKeyValueDifferFactory = /*#__PURE__*/function () {
        function DefaultKeyValueDifferFactory() {
          _classCallCheck(this, DefaultKeyValueDifferFactory);
        }

        _createClass2(DefaultKeyValueDifferFactory, [{
          key: "supports",
          value: function supports(obj) {
            return obj instanceof Map || isJsObject(obj);
          }
        }, {
          key: "create",
          value: function create() {
            return new DefaultKeyValueDiffer();
          }
        }]);

        return DefaultKeyValueDifferFactory;
      }();

      var DefaultKeyValueDiffer = /*#__PURE__*/function () {
        function DefaultKeyValueDiffer() {
          _classCallCheck(this, DefaultKeyValueDiffer);

          this._records = new Map();
          this._mapHead = null; // _appendAfter is used in the check loop

          this._appendAfter = null;
          this._previousMapHead = null;
          this._changesHead = null;
          this._changesTail = null;
          this._additionsHead = null;
          this._additionsTail = null;
          this._removalsHead = null;
          this._removalsTail = null;
        }

        _createClass2(DefaultKeyValueDiffer, [{
          key: "isDirty",
          get: function get() {
            return this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null;
          }
        }, {
          key: "forEachItem",
          value: function forEachItem(fn) {
            var record;

            for (record = this._mapHead; record !== null; record = record._next) {
              fn(record);
            }
          }
        }, {
          key: "forEachPreviousItem",
          value: function forEachPreviousItem(fn) {
            var record;

            for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {
              fn(record);
            }
          }
        }, {
          key: "forEachChangedItem",
          value: function forEachChangedItem(fn) {
            var record;

            for (record = this._changesHead; record !== null; record = record._nextChanged) {
              fn(record);
            }
          }
        }, {
          key: "forEachAddedItem",
          value: function forEachAddedItem(fn) {
            var record;

            for (record = this._additionsHead; record !== null; record = record._nextAdded) {
              fn(record);
            }
          }
        }, {
          key: "forEachRemovedItem",
          value: function forEachRemovedItem(fn) {
            var record;

            for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
              fn(record);
            }
          }
        }, {
          key: "diff",
          value: function diff(map) {
            if (!map) {
              map = new Map();
            } else if (!(map instanceof Map || isJsObject(map))) {
              throw new Error("Error trying to diff '".concat(stringify(map), "'. Only maps and objects are allowed"));
            }

            return this.check(map) ? this : null;
          }
        }, {
          key: "onDestroy",
          value: function onDestroy() {}
          /**
           * Check the current state of the map vs the previous.
           * The algorithm is optimised for when the keys do no change.
           */

        }, {
          key: "check",
          value: function check(map) {
            var _this473 = this;

            this._reset();

            var insertBefore = this._mapHead;
            this._appendAfter = null;

            this._forEach(map, function (value, key) {
              if (insertBefore && insertBefore.key === key) {
                _this473._maybeAddToChanges(insertBefore, value);

                _this473._appendAfter = insertBefore;
                insertBefore = insertBefore._next;
              } else {
                var record = _this473._getOrCreateRecordForKey(key, value);

                insertBefore = _this473._insertBeforeOrAppend(insertBefore, record);
              }
            }); // Items remaining at the end of the list have been deleted


            if (insertBefore) {
              if (insertBefore._prev) {
                insertBefore._prev._next = null;
              }

              this._removalsHead = insertBefore;

              for (var record = insertBefore; record !== null; record = record._nextRemoved) {
                if (record === this._mapHead) {
                  this._mapHead = null;
                }

                this._records["delete"](record.key);

                record._nextRemoved = record._next;
                record.previousValue = record.currentValue;
                record.currentValue = null;
                record._prev = null;
                record._next = null;
              }
            } // Make sure tails have no next records from previous runs


            if (this._changesTail) this._changesTail._nextChanged = null;
            if (this._additionsTail) this._additionsTail._nextAdded = null;
            return this.isDirty;
          }
          /**
           * Inserts a record before `before` or append at the end of the list when `before` is null.
           *
           * Notes:
           * - This method appends at `this._appendAfter`,
           * - This method updates `this._appendAfter`,
           * - The return value is the new value for the insertion pointer.
           */

        }, {
          key: "_insertBeforeOrAppend",
          value: function _insertBeforeOrAppend(before, record) {
            if (before) {
              var prev = before._prev;
              record._next = before;
              record._prev = prev;
              before._prev = record;

              if (prev) {
                prev._next = record;
              }

              if (before === this._mapHead) {
                this._mapHead = record;
              }

              this._appendAfter = before;
              return before;
            }

            if (this._appendAfter) {
              this._appendAfter._next = record;
              record._prev = this._appendAfter;
            } else {
              this._mapHead = record;
            }

            this._appendAfter = record;
            return null;
          }
        }, {
          key: "_getOrCreateRecordForKey",
          value: function _getOrCreateRecordForKey(key, value) {
            if (this._records.has(key)) {
              var _record = this._records.get(key);

              this._maybeAddToChanges(_record, value);

              var prev = _record._prev;
              var next = _record._next;

              if (prev) {
                prev._next = next;
              }

              if (next) {
                next._prev = prev;
              }

              _record._next = null;
              _record._prev = null;
              return _record;
            }

            var record = new KeyValueChangeRecord_(key);

            this._records.set(key, record);

            record.currentValue = value;

            this._addToAdditions(record);

            return record;
          }
          /** @internal */

        }, {
          key: "_reset",
          value: function _reset() {
            if (this.isDirty) {
              var record; // let `_previousMapHead` contain the state of the map before the changes

              this._previousMapHead = this._mapHead;

              for (record = this._previousMapHead; record !== null; record = record._next) {
                record._nextPrevious = record._next;
              } // Update `record.previousValue` with the value of the item before the changes
              // We need to update all changed items (that's those which have been added and changed)


              for (record = this._changesHead; record !== null; record = record._nextChanged) {
                record.previousValue = record.currentValue;
              }

              for (record = this._additionsHead; record != null; record = record._nextAdded) {
                record.previousValue = record.currentValue;
              }

              this._changesHead = this._changesTail = null;
              this._additionsHead = this._additionsTail = null;
              this._removalsHead = null;
            }
          } // Add the record or a given key to the list of changes only when the value has actually changed

        }, {
          key: "_maybeAddToChanges",
          value: function _maybeAddToChanges(record, newValue) {
            if (!Object.is(newValue, record.currentValue)) {
              record.previousValue = record.currentValue;
              record.currentValue = newValue;

              this._addToChanges(record);
            }
          }
        }, {
          key: "_addToAdditions",
          value: function _addToAdditions(record) {
            if (this._additionsHead === null) {
              this._additionsHead = this._additionsTail = record;
            } else {
              this._additionsTail._nextAdded = record;
              this._additionsTail = record;
            }
          }
        }, {
          key: "_addToChanges",
          value: function _addToChanges(record) {
            if (this._changesHead === null) {
              this._changesHead = this._changesTail = record;
            } else {
              this._changesTail._nextChanged = record;
              this._changesTail = record;
            }
          }
          /** @internal */

        }, {
          key: "_forEach",
          value: function _forEach(obj, fn) {
            if (obj instanceof Map) {
              obj.forEach(fn);
            } else {
              Object.keys(obj).forEach(function (k) {
                return fn(obj[k], k);
              });
            }
          }
        }]);

        return DefaultKeyValueDiffer;
      }();

      var KeyValueChangeRecord_ = function KeyValueChangeRecord_(key) {
        _classCallCheck(this, KeyValueChangeRecord_);

        this.key = key;
        this.previousValue = null;
        this.currentValue = null;
        /** @internal */

        this._nextPrevious = null;
        /** @internal */

        this._next = null;
        /** @internal */

        this._prev = null;
        /** @internal */

        this._nextAdded = null;
        /** @internal */

        this._nextRemoved = null;
        /** @internal */

        this._nextChanged = null;
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
       *
       * @publicApi
       */


      var IterableDiffers = /*#__PURE__*/function () {
        function IterableDiffers(factories) {
          _classCallCheck(this, IterableDiffers);

          this.factories = factories;
        }

        _createClass2(IterableDiffers, [{
          key: "find",
          value: function find(iterable) {
            var factory = this.factories.find(function (f) {
              return f.supports(iterable);
            });

            if (factory != null) {
              return factory;
            } else {
              throw new Error("Cannot find a differ supporting object '".concat(iterable, "' of type '").concat(getTypeNameForDebugging(iterable), "'"));
            }
          }
        }], [{
          key: "create",
          value: function create(factories, parent) {
            if (parent != null) {
              var copied = parent.factories.slice();
              factories = factories.concat(copied);
            }

            return new IterableDiffers(factories);
          }
          /**
           * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
           * inherited {@link IterableDiffers} instance with the provided factories and return a new
           * {@link IterableDiffers} instance.
           *
           * @usageNotes
           * ### Example
           *
           * The following example shows how to extend an existing list of factories,
           * which will only be applied to the injector for this component and its children.
           * This step is all that's required to make a new {@link IterableDiffer} available.
           *
           * ```
           * @Component({
           *   viewProviders: [
           *     IterableDiffers.extend([new ImmutableListDiffer()])
           *   ]
           * })
           * ```
           */

        }, {
          key: "extend",
          value: function extend(factories) {
            return {
              provide: IterableDiffers,
              useFactory: function useFactory(parent) {
                if (!parent) {
                  // Typically would occur when calling IterableDiffers.extend inside of dependencies passed
                  // to
                  // bootstrap(), which would override default pipes instead of extending them.
                  throw new Error('Cannot extend IterableDiffers without a parent injector');
                }

                return IterableDiffers.create(factories, parent);
              },
              // Dependency technically isn't optional, but we can provide a better error message this way.
              deps: [[IterableDiffers, new SkipSelf(), new Optional()]]
            };
          }
        }]);

        return IterableDiffers;
      }();
      /** @nocollapse */


      IterableDiffers.ɵprov = ɵɵdefineInjectable({
        token: IterableDiffers,
        providedIn: 'root',
        factory: function factory() {
          return new IterableDiffers([new DefaultIterableDifferFactory()]);
        }
      });

      function getTypeNameForDebugging(type) {
        return type['name'] || typeof type;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
       *
       * @publicApi
       */


      var KeyValueDiffers = /*#__PURE__*/function () {
        function KeyValueDiffers(factories) {
          _classCallCheck(this, KeyValueDiffers);

          this.factories = factories;
        }

        _createClass2(KeyValueDiffers, [{
          key: "find",
          value: function find(kv) {
            var factory = this.factories.find(function (f) {
              return f.supports(kv);
            });

            if (factory) {
              return factory;
            }

            throw new Error("Cannot find a differ supporting object '".concat(kv, "'"));
          }
        }], [{
          key: "create",
          value: function create(factories, parent) {
            if (parent) {
              var copied = parent.factories.slice();
              factories = factories.concat(copied);
            }

            return new KeyValueDiffers(factories);
          }
          /**
           * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
           * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
           * {@link KeyValueDiffers} instance.
           *
           * @usageNotes
           * ### Example
           *
           * The following example shows how to extend an existing list of factories,
           * which will only be applied to the injector for this component and its children.
           * This step is all that's required to make a new {@link KeyValueDiffer} available.
           *
           * ```
           * @Component({
           *   viewProviders: [
           *     KeyValueDiffers.extend([new ImmutableMapDiffer()])
           *   ]
           * })
           * ```
           */

        }, {
          key: "extend",
          value: function extend(factories) {
            return {
              provide: KeyValueDiffers,
              useFactory: function useFactory(parent) {
                if (!parent) {
                  // Typically would occur when calling KeyValueDiffers.extend inside of dependencies passed
                  // to bootstrap(), which would override default pipes instead of extending them.
                  throw new Error('Cannot extend KeyValueDiffers without a parent injector');
                }

                return KeyValueDiffers.create(factories, parent);
              },
              // Dependency technically isn't optional, but we can provide a better error message this way.
              deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]
            };
          }
        }]);

        return KeyValueDiffers;
      }();
      /** @nocollapse */


      KeyValueDiffers.ɵprov = ɵɵdefineInjectable({
        token: KeyValueDiffers,
        providedIn: 'root',
        factory: function factory() {
          return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);
        }
      });
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      function collectNativeNodes(tView, lView, tNode, result) {
        var isProjection = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;

        while (tNode !== null) {
          ngDevMode && assertTNodeType(tNode, 3
          /* AnyRNode */
          | 12
          /* AnyContainer */
          | 16
          /* Projection */
          | 32
          /* Icu */
          );
          var lNode = lView[tNode.index];

          if (lNode !== null) {
            result.push(unwrapRNode(lNode));
          } // A given lNode can represent either a native node or a LContainer (when it is a host of a
          // ViewContainerRef). When we find a LContainer we need to descend into it to collect root nodes
          // from the views in this container.


          if (isLContainer(lNode)) {
            for (var i = CONTAINER_HEADER_OFFSET; i < lNode.length; i++) {
              var lViewInAContainer = lNode[i];
              var lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;

              if (lViewFirstChildTNode !== null) {
                collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);
              }
            }
          }

          var tNodeType = tNode.type;

          if (tNodeType & 8
          /* ElementContainer */
          ) {
            collectNativeNodes(tView, lView, tNode.child, result);
          } else if (tNodeType & 32
          /* Icu */
          ) {
            var nextRNode = icuContainerIterate(tNode, lView);
            var rNode = void 0;

            while (rNode = nextRNode()) {
              result.push(rNode);
            }
          } else if (tNodeType & 16
          /* Projection */
          ) {
            var componentView = lView[DECLARATION_COMPONENT_VIEW];
            var componentHost = componentView[T_HOST];
            var slotIdx = tNode.projection;
            ngDevMode && assertDefined(componentHost.projection, 'Components with projection nodes (<ng-content>) must have projection slots defined.');
            var nodesInSlot = componentHost.projection[slotIdx];

            if (Array.isArray(nodesInSlot)) {
              result.push.apply(result, _toConsumableArray(nodesInSlot));
            } else {
              var parentView = getLViewParent(componentView);
              ngDevMode && assertDefined(parentView, 'Component views should always have a parent view (component\'s host view)');
              collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);
            }
          }

          tNode = isProjection ? tNode.projectionNext : tNode.next;
        }

        return result;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ViewRef = /*#__PURE__*/function () {
        function ViewRef(
        /**
         * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.
         *
         * When ViewRef is created for a dynamic component, this also represents the `LView` for the
         * component.
         *
         * For a "regular" ViewRef created for an embedded view, this is the `LView` for the embedded
         * view.
         *
         * @internal
         */
        _lView,
        /**
         * This represents the `LView` associated with the point where `ChangeDetectorRef` was
         * requested.
         *
         * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
         */
        _cdRefInjectingView) {
          _classCallCheck(this, ViewRef);

          this._lView = _lView;
          this._cdRefInjectingView = _cdRefInjectingView;
          this._appRef = null;
          this._attachedToViewContainer = false;
        }

        _createClass2(ViewRef, [{
          key: "rootNodes",
          get: function get() {
            var lView = this._lView;
            var tView = lView[TVIEW];
            return collectNativeNodes(tView, lView, tView.firstChild, []);
          }
        }, {
          key: "context",
          get: function get() {
            return this._lView[CONTEXT];
          }
        }, {
          key: "destroyed",
          get: function get() {
            return (this._lView[FLAGS] & 256
            /* Destroyed */
            ) === 256
            /* Destroyed */
            ;
          }
        }, {
          key: "destroy",
          value: function destroy() {
            if (this._appRef) {
              this._appRef.detachView(this);
            } else if (this._attachedToViewContainer) {
              var parent = this._lView[PARENT];

              if (isLContainer(parent)) {
                var viewRefs = parent[VIEW_REFS];
                var index = viewRefs ? viewRefs.indexOf(this) : -1;

                if (index > -1) {
                  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.');
                  detachView(parent, index);
                  removeFromArray(viewRefs, index);
                }
              }

              this._attachedToViewContainer = false;
            }

            destroyLView(this._lView[TVIEW], this._lView);
          }
        }, {
          key: "onDestroy",
          value: function onDestroy(callback) {
            storeCleanupWithContext(this._lView[TVIEW], this._lView, null, callback);
          }
          /**
           * Marks a view and all of its ancestors dirty.
           *
           * It also triggers change detection by calling `scheduleTick` internally, which coalesces
           * multiple `markForCheck` calls to into one change detection run.
           *
           * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is
           * checked when it needs to be re-rendered but the two normal triggers haven't marked it
           * dirty (i.e. inputs haven't changed and events haven't fired in the view).
           *
           * <!-- TODO: Add a link to a chapter on OnPush components -->
           *
           * @usageNotes
           * ### Example
           *
           * ```typescript
           * @Component({
           *   selector: 'my-app',
           *   template: `Number of ticks: {{numberOfTicks}}`
           *   changeDetection: ChangeDetectionStrategy.OnPush,
           * })
           * class AppComponent {
           *   numberOfTicks = 0;
           *
           *   constructor(private ref: ChangeDetectorRef) {
           *     setInterval(() => {
           *       this.numberOfTicks++;
           *       // the following is required, otherwise the view will not be updated
           *       this.ref.markForCheck();
           *     }, 1000);
           *   }
           * }
           * ```
           */

        }, {
          key: "markForCheck",
          value: function markForCheck() {
            markViewDirty(this._cdRefInjectingView || this._lView);
          }
          /**
           * Detaches the view from the change detection tree.
           *
           * Detached views will not be checked during change detection runs until they are
           * re-attached, even if they are dirty. `detach` can be used in combination with
           * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
           * detection checks.
           *
           * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
           * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
           *
           * @usageNotes
           * ### Example
           *
           * The following example defines a component with a large list of readonly data.
           * Imagine the data changes constantly, many times per second. For performance reasons,
           * we want to check and update the list every five seconds. We can do that by detaching
           * the component's change detector and doing a local check every five seconds.
           *
           * ```typescript
           * class DataProvider {
           *   // in a real application the returned data will be different every time
           *   get data() {
           *     return [1,2,3,4,5];
           *   }
           * }
           *
           * @Component({
           *   selector: 'giant-list',
           *   template: `
           *     <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
           *   `,
           * })
           * class GiantList {
           *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
           *     ref.detach();
           *     setInterval(() => {
           *       this.ref.detectChanges();
           *     }, 5000);
           *   }
           * }
           *
           * @Component({
           *   selector: 'app',
           *   providers: [DataProvider],
           *   template: `
           *     <giant-list><giant-list>
           *   `,
           * })
           * class App {
           * }
           * ```
           */

        }, {
          key: "detach",
          value: function detach() {
            this._lView[FLAGS] &= ~128
            /* Attached */
            ;
          }
          /**
           * Re-attaches a view to the change detection tree.
           *
           * This can be used to re-attach views that were previously detached from the tree
           * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
           *
           * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
           *
           * @usageNotes
           * ### Example
           *
           * The following example creates a component displaying `live` data. The component will detach
           * its change detector from the main change detector tree when the component's live property
           * is set to false.
           *
           * ```typescript
           * class DataProvider {
           *   data = 1;
           *
           *   constructor() {
           *     setInterval(() => {
           *       this.data = this.data * 2;
           *     }, 500);
           *   }
           * }
           *
           * @Component({
           *   selector: 'live-data',
           *   inputs: ['live'],
           *   template: 'Data: {{dataProvider.data}}'
           * })
           * class LiveData {
           *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
           *
           *   set live(value) {
           *     if (value) {
           *       this.ref.reattach();
           *     } else {
           *       this.ref.detach();
           *     }
           *   }
           * }
           *
           * @Component({
           *   selector: 'my-app',
           *   providers: [DataProvider],
           *   template: `
           *     Live Update: <input type="checkbox" [(ngModel)]="live">
           *     <live-data [live]="live"><live-data>
           *   `,
           * })
           * class AppComponent {
           *   live = true;
           * }
           * ```
           */

        }, {
          key: "reattach",
          value: function reattach() {
            this._lView[FLAGS] |= 128
            /* Attached */
            ;
          }
          /**
           * Checks the view and its children.
           *
           * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement
           * local change detection checks.
           *
           * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
           * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
           *
           * @usageNotes
           * ### Example
           *
           * The following example defines a component with a large list of readonly data.
           * Imagine, the data changes constantly, many times per second. For performance reasons,
           * we want to check and update the list every five seconds.
           *
           * We can do that by detaching the component's change detector and doing a local change detection
           * check every five seconds.
           *
           * See {@link ChangeDetectorRef#detach detach} for more information.
           */

        }, {
          key: "detectChanges",
          value: function detectChanges() {
            detectChangesInternal(this._lView[TVIEW], this._lView, this.context);
          }
          /**
           * Checks the change detector and its children, and throws if any changes are detected.
           *
           * This is used in development mode to verify that running change detection doesn't
           * introduce other changes.
           */

        }, {
          key: "checkNoChanges",
          value: function checkNoChanges() {
            checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context);
          }
        }, {
          key: "attachToViewContainerRef",
          value: function attachToViewContainerRef() {
            if (this._appRef) {
              throw new Error('This view is already attached directly to the ApplicationRef!');
            }

            this._attachedToViewContainer = true;
          }
        }, {
          key: "detachFromAppRef",
          value: function detachFromAppRef() {
            this._appRef = null;
            renderDetachView(this._lView[TVIEW], this._lView);
          }
        }, {
          key: "attachToAppRef",
          value: function attachToAppRef(appRef) {
            if (this._attachedToViewContainer) {
              throw new Error('This view is already attached to a ViewContainer!');
            }

            this._appRef = appRef;
          }
        }]);

        return ViewRef;
      }();
      /** @internal */


      var RootViewRef = /*#__PURE__*/function (_ViewRef) {
        _inherits(RootViewRef, _ViewRef);

        var _super223 = _createSuper(RootViewRef);

        function RootViewRef(_view) {
          var _this474;

          _classCallCheck(this, RootViewRef);

          _this474 = _super223.call(this, _view);
          _this474._view = _view;
          return _this474;
        }

        _createClass2(RootViewRef, [{
          key: "detectChanges",
          value: function detectChanges() {
            detectChangesInRootView(this._view);
          }
        }, {
          key: "checkNoChanges",
          value: function checkNoChanges() {
            checkNoChangesInRootView(this._view);
          }
        }, {
          key: "context",
          get: function get() {
            return null;
          }
        }]);

        return RootViewRef;
      }(ViewRef);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = injectChangeDetectorRef;
      var SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__ = noop;
      var SWITCH_CHANGE_DETECTOR_REF_FACTORY = SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__;
      /**
       * Base class that provides change detection functionality.
       * A change-detection tree collects all views that are to be checked for changes.
       * Use the methods to add and remove views from the tree, initiate change-detection,
       * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.
       *
       * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks)
       * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection)
       *
       * @usageNotes
       *
       * The following examples demonstrate how to modify default change-detection behavior
       * to perform explicit detection when needed.
       *
       * ### Use `markForCheck()` with `CheckOnce` strategy
       *
       * The following example sets the `OnPush` change-detection strategy for a component
       * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check
       * after an interval. See [live demo](https://plnkr.co/edit/GC512b?p=preview).
       *
       * <code-example path="core/ts/change_detect/change-detection.ts"
       * region="mark-for-check"></code-example>
       *
       * ### Detach change detector to limit how often check occurs
       *
       * The following example defines a component with a large list of read-only data
       * that is expected to change constantly, many times per second.
       * To improve performance, we want to check and update the list
       * less often than the changes actually occur. To do that, we detach
       * the component's change detector and perform an explicit local check every five seconds.
       *
       * <code-example path="core/ts/change_detect/change-detection.ts" region="detach"></code-example>
       *
       *
       * ### Reattaching a detached component
       *
       * The following example creates a component displaying live data.
       * The component detaches its change detector from the main change detector tree
       * when the `live` property is set to false, and reattaches it when the property
       * becomes true.
       *
       * <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example>
       *
       * @publicApi
       */

      var ChangeDetectorRef = function ChangeDetectorRef() {
        _classCallCheck(this, ChangeDetectorRef);
      };
      /**
       * @internal
       * @nocollapse
       */


      ChangeDetectorRef.__NG_ELEMENT_ID__ = SWITCH_CHANGE_DETECTOR_REF_FACTORY;
      /**
       * This marker is need so that the JIT compiler can correctly identify this class as special.
       *
       * @internal
       * @nocollapse
       */

      ChangeDetectorRef.__ChangeDetectorRef__ = true;
      /** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */

      function injectChangeDetectorRef() {
        var isPipe = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
        return createViewRef(getCurrentTNode(), getLView(), isPipe);
      }
      /**
       * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).
       *
       * @param tNode The node that is requesting a ChangeDetectorRef
       * @param lView The view to which the node belongs
       * @param isPipe Whether the view is being injected into a pipe.
       * @returns The ChangeDetectorRef to use
       */


      function createViewRef(tNode, lView, isPipe) {
        // `isComponentView` will be true for Component and Directives (but not for Pipes).
        // See https://github.com/angular/angular/pull/33072 for proper fix
        var isComponentView = !isPipe && isComponentHost(tNode);

        if (isComponentView) {
          // The LView represents the location where the component is declared.
          // Instead we want the LView for the component View and so we need to look it up.
          var componentView = getComponentLViewByIndex(tNode.index, lView); // look down

          return new ViewRef(componentView, componentView);
        } else if (tNode.type & (3
        /* AnyRNode */
        | 12
        /* AnyContainer */
        | 32
        /* Icu */
        )) {
          // The LView represents the location where the injection is requested from.
          // We need to locate the containing LView (in case where the `lView` is an embedded view)
          var hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up

          return new ViewRef(hostComponentView, lView);
        }

        return null;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Structural diffing for `Object`s and `Map`s.
       */


      var keyValDiff = [new DefaultKeyValueDifferFactory()];
      /**
       * Structural diffing for `Iterable` types such as `Array`s.
       */

      var iterableDiff = [new DefaultIterableDifferFactory()];
      var defaultIterableDiffers = new IterableDiffers(iterableDiff);
      var defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = injectTemplateRef;
      var SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop;
      var SWITCH_TEMPLATE_REF_FACTORY = SWITCH_TEMPLATE_REF_FACTORY__POST_R3__;
      /**
       * Represents an embedded template that can be used to instantiate embedded views.
       * To instantiate embedded views based on a template, use the `ViewContainerRef`
       * method `createEmbeddedView()`.
       *
       * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`
       * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view
       * is injected into the constructor of the directive,
       * using the `TemplateRef` token.
       *
       * You can also use a `Query` to find a `TemplateRef` associated with
       * a component or a directive.
       *
       * @see `ViewContainerRef`
       * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)
       *
       * @publicApi
       */

      var TemplateRef = function TemplateRef() {
        _classCallCheck(this, TemplateRef);
      };
      /**
       * @internal
       * @nocollapse
       */


      TemplateRef.__NG_ELEMENT_ID__ = SWITCH_TEMPLATE_REF_FACTORY;
      var ViewEngineTemplateRef = TemplateRef;

      var R3TemplateRef = /*#__PURE__*/function (_ViewEngineTemplateRe) {
        _inherits(TemplateRef, _ViewEngineTemplateRe);

        var _super224 = _createSuper(TemplateRef);

        function TemplateRef(_declarationLView, _declarationTContainer, elementRef) {
          var _this475;

          _classCallCheck(this, TemplateRef);

          _this475 = _super224.call(this);
          _this475._declarationLView = _declarationLView;
          _this475._declarationTContainer = _declarationTContainer;
          _this475.elementRef = elementRef;
          return _this475;
        }

        _createClass2(TemplateRef, [{
          key: "createEmbeddedView",
          value: function createEmbeddedView(context) {
            var embeddedTView = this._declarationTContainer.tViews;
            var embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16
            /* CheckAlways */
            , null, embeddedTView.declTNode, null, null, null, null);
            var declarationLContainer = this._declarationLView[this._declarationTContainer.index];
            ngDevMode && assertLContainer(declarationLContainer);
            embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;
            var declarationViewLQueries = this._declarationLView[QUERIES];

            if (declarationViewLQueries !== null) {
              embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);
            }

            renderView(embeddedTView, embeddedLView, context);
            return new ViewRef(embeddedLView);
          }
        }]);

        return TemplateRef;
      }(ViewEngineTemplateRef);
      /**
       * Creates a TemplateRef given a node.
       *
       * @returns The TemplateRef instance to use
       */


      function injectTemplateRef() {
        return createTemplateRef(getCurrentTNode(), getLView());
      }
      /**
       * Creates a TemplateRef and stores it on the injector.
       *
       * @param hostTNode The node on which a TemplateRef is requested
       * @param hostLView The `LView` to which the node belongs
       * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type
       */


      function createTemplateRef(hostTNode, hostLView) {
        if (hostTNode.type & 4
        /* Container */
        ) {
          ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');
          return new R3TemplateRef(hostLView, hostTNode, createElementRef(hostTNode, hostLView));
        }

        return null;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Represents an instance of an `NgModule` created by an `NgModuleFactory`.
       * Provides access to the `NgModule` instance and related objects.
       *
       * @publicApi
       */


      var NgModuleRef = function NgModuleRef() {
        _classCallCheck(this, NgModuleRef);
      };
      /**
       * @publicApi
       */


      var NgModuleFactory = function NgModuleFactory() {
        _classCallCheck(this, NgModuleFactory);
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = injectViewContainerRef;
      var SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop;
      var SWITCH_VIEW_CONTAINER_REF_FACTORY = SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__;
      /**
       * Represents a container where one or more views can be attached to a component.
       *
       * Can contain *host views* (created by instantiating a
       * component with the `createComponent()` method), and *embedded views*
       * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
       *
       * A view container instance can contain other view containers,
       * creating a [view hierarchy](guide/glossary#view-tree).
       *
       * @see `ComponentRef`
       * @see `EmbeddedViewRef`
       *
       * @publicApi
       */

      var ViewContainerRef = function ViewContainerRef() {
        _classCallCheck(this, ViewContainerRef);
      };
      /**
       * @internal
       * @nocollapse
       */


      ViewContainerRef.__NG_ELEMENT_ID__ = SWITCH_VIEW_CONTAINER_REF_FACTORY;
      /**
       * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef
       * already exists, retrieves the existing ViewContainerRef.
       *
       * @returns The ViewContainerRef instance to use
       */

      function injectViewContainerRef() {
        var previousTNode = getCurrentTNode();
        return createContainerRef(previousTNode, getLView());
      }

      var VE_ViewContainerRef = ViewContainerRef;

      var R3ViewContainerRef = /*#__PURE__*/function (_VE_ViewContainerRef) {
        _inherits(ViewContainerRef, _VE_ViewContainerRef);

        var _super225 = _createSuper(ViewContainerRef);

        function ViewContainerRef(_lContainer, _hostTNode, _hostLView) {
          var _this476;

          _classCallCheck(this, ViewContainerRef);

          _this476 = _super225.call(this);
          _this476._lContainer = _lContainer;
          _this476._hostTNode = _hostTNode;
          _this476._hostLView = _hostLView;
          return _this476;
        }

        _createClass2(ViewContainerRef, [{
          key: "element",
          get: function get() {
            return createElementRef(this._hostTNode, this._hostLView);
          }
        }, {
          key: "injector",
          get: function get() {
            return new NodeInjector(this._hostTNode, this._hostLView);
          }
          /** @deprecated No replacement */

        }, {
          key: "parentInjector",
          get: function get() {
            var parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView);

            if (hasParentInjector(parentLocation)) {
              var parentView = getParentInjectorView(parentLocation, this._hostLView);
              var injectorIndex = getParentInjectorIndex(parentLocation);
              ngDevMode && assertNodeInjector(parentView, injectorIndex);
              var parentTNode = parentView[TVIEW].data[injectorIndex + 8
              /* TNODE */
              ];
              return new NodeInjector(parentTNode, parentView);
            } else {
              return new NodeInjector(null, this._hostLView);
            }
          }
        }, {
          key: "clear",
          value: function clear() {
            while (this.length > 0) {
              this.remove(this.length - 1);
            }
          }
        }, {
          key: "get",
          value: function get(index) {
            var viewRefs = getViewRefs(this._lContainer);
            return viewRefs !== null && viewRefs[index] || null;
          }
        }, {
          key: "length",
          get: function get() {
            return this._lContainer.length - CONTAINER_HEADER_OFFSET;
          }
        }, {
          key: "createEmbeddedView",
          value: function createEmbeddedView(templateRef, context, index) {
            var viewRef = templateRef.createEmbeddedView(context || {});
            this.insert(viewRef, index);
            return viewRef;
          }
        }, {
          key: "createComponent",
          value: function createComponent(componentFactory, index, injector, projectableNodes, ngModuleRef) {
            var contextInjector = injector || this.parentInjector;

            if (!ngModuleRef && componentFactory.ngModule == null && contextInjector) {
              // DO NOT REFACTOR. The code here used to have a `value || undefined` expression
              // which seems to cause internal google apps to fail. This is documented in the
              // following internal bug issue: go/b/142967802
              var result = contextInjector.get(NgModuleRef, null);

              if (result) {
                ngModuleRef = result;
              }
            }

            var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);
            this.insert(componentRef.hostView, index);
            return componentRef;
          }
        }, {
          key: "insert",
          value: function insert(viewRef, index) {
            var lView = viewRef._lView;
            var tView = lView[TVIEW];

            if (ngDevMode && viewRef.destroyed) {
              throw new Error('Cannot insert a destroyed View in a ViewContainer!');
            }

            if (viewAttachedToContainer(lView)) {
              // If view is already attached, detach it first so we clean up references appropriately.
              var prevIdx = this.indexOf(viewRef); // A view might be attached either to this or a different container. The `prevIdx` for
              // those cases will be:
              // equal to -1 for views attached to this ViewContainerRef
              // >= 0 for views attached to a different ViewContainerRef

              if (prevIdx !== -1) {
                this.detach(prevIdx);
              } else {
                var prevLContainer = lView[PARENT];
                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
                // LView (nor anywhere else).

                var prevVCRef = new R3ViewContainerRef(prevLContainer, prevLContainer[T_HOST], prevLContainer[PARENT]);
                prevVCRef.detach(prevVCRef.indexOf(viewRef));
              }
            } // Logical operation of adding `LView` to `LContainer`


            var adjustedIdx = this._adjustIndex(index);

            var lContainer = this._lContainer;
            insertView(tView, lView, lContainer, adjustedIdx); // Physical operation of adding the DOM nodes.

            var beforeNode = getBeforeNodeForView(adjustedIdx, lContainer);
            var renderer = lView[RENDERER];
            var parentRNode = nativeParentNode(renderer, lContainer[NATIVE]);

            if (parentRNode !== null) {
              addViewToContainer(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);
            }

            viewRef.attachToViewContainerRef();
            addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);
            return viewRef;
          }
        }, {
          key: "move",
          value: function move(viewRef, newIndex) {
            if (ngDevMode && viewRef.destroyed) {
              throw new Error('Cannot move a destroyed View in a ViewContainer!');
            }

            return this.insert(viewRef, newIndex);
          }
        }, {
          key: "indexOf",
          value: function indexOf(viewRef) {
            var viewRefsArr = getViewRefs(this._lContainer);
            return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;
          }
        }, {
          key: "remove",
          value: function remove(index) {
            var adjustedIdx = this._adjustIndex(index, -1);

            var detachedView = detachView(this._lContainer, adjustedIdx);

            if (detachedView) {
              // Before destroying the view, remove it from the container's array of `ViewRef`s.
              // This ensures the view container length is updated before calling
              // `destroyLView`, which could recursively call view container methods that
              // rely on an accurate container length.
              // (e.g. a method on this view container being called by a child directive's OnDestroy
              // lifecycle hook)
              removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx);
              destroyLView(detachedView[TVIEW], detachedView);
            }
          }
        }, {
          key: "detach",
          value: function detach(index) {
            var adjustedIdx = this._adjustIndex(index, -1);

            var view = detachView(this._lContainer, adjustedIdx);
            var wasDetached = view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null;
            return wasDetached ? new ViewRef(view) : null;
          }
        }, {
          key: "_adjustIndex",
          value: function _adjustIndex(index) {
            var shift = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;

            if (index == null) {
              return this.length + shift;
            }

            if (ngDevMode) {
              assertGreaterThan(index, -1, "ViewRef index must be positive, got ".concat(index)); // +1 because it's legal to insert at the end.

              assertLessThan(index, this.length + 1 + shift, 'index');
            }

            return index;
          }
        }]);

        return ViewContainerRef;
      }(VE_ViewContainerRef);

      function getViewRefs(lContainer) {
        return lContainer[VIEW_REFS];
      }

      function getOrCreateViewRefs(lContainer) {
        return lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = []);
      }
      /**
       * Creates a ViewContainerRef and stores it on the injector.
       *
       * @param ViewContainerRefToken The ViewContainerRef type
       * @param ElementRefToken The ElementRef type
       * @param hostTNode The node that is requesting a ViewContainerRef
       * @param hostLView The view to which the node belongs
       * @returns The ViewContainerRef instance to use
       */


      function createContainerRef(hostTNode, hostLView) {
        ngDevMode && assertTNodeType(hostTNode, 12
        /* AnyContainer */
        | 3
        /* AnyRNode */
        );
        var lContainer;
        var slotValue = hostLView[hostTNode.index];

        if (isLContainer(slotValue)) {
          // If the host is a container, we don't need to create a new LContainer
          lContainer = slotValue;
        } else {
          var commentNode; // If the host is an element container, the native host element is guaranteed to be a
          // comment and we can reuse that comment as anchor element for the new LContainer.
          // The comment node in question is already part of the DOM structure so we don't need to append
          // it again.

          if (hostTNode.type & 8
          /* ElementContainer */
          ) {
            commentNode = unwrapRNode(slotValue);
          } else {
            // If the host is a regular element, we have to insert a comment node manually which will
            // be used as an anchor when inserting elements. In this specific case we use low-level DOM
            // manipulation to insert it.
            var renderer = hostLView[RENDERER];
            ngDevMode && ngDevMode.rendererCreateComment++;
            commentNode = renderer.createComment(ngDevMode ? 'container' : '');
            var hostNative = getNativeByTNode(hostTNode, hostLView);
            var parentOfHostNative = nativeParentNode(renderer, hostNative);
            nativeInsertBefore(renderer, parentOfHostNative, commentNode, nativeNextSibling(renderer, hostNative), false);
          }

          hostLView[hostTNode.index] = lContainer = createLContainer(slotValue, hostLView, commentNode, hostTNode);
          addToViewTree(hostLView, lContainer);
        }

        return new R3ViewContainerRef(lContainer, hostTNode, hostLView);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function expressionChangedAfterItHasBeenCheckedError(context, oldValue, currValue, isFirstCheck) {
        var msg = "ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '".concat(oldValue, "'. Current value: '").concat(currValue, "'.");

        if (isFirstCheck) {
          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 ?";
        }

        return viewDebugError(msg, context);
      }

      function viewWrappedDebugError(err, context) {
        if (!(err instanceof Error)) {
          // errors that are not Error instances don't have a stack,
          // so it is ok to wrap them into a new Error object...
          err = new Error(err.toString());
        }

        _addDebugContext(err, context);

        return err;
      }

      function viewDebugError(msg, context) {
        var err = new Error(msg);

        _addDebugContext(err, context);

        return err;
      }

      function _addDebugContext(err, context) {
        err[ERROR_DEBUG_CONTEXT] = context;
        err[ERROR_LOGGER] = context.logError.bind(context);
      }

      function isViewDebugError(err) {
        return !!getDebugContext(err);
      }

      function viewDestroyedError(action) {
        return new Error("ViewDestroyedError: Attempt to use a destroyed view: ".concat(action));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // Called before each cycle of a view's check to detect whether this is in the
      // initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit
      // lifecycle methods. Returns true if this check cycle should call lifecycle
      // methods.


      function shiftInitState(view, priorInitState, newInitState) {
        // Only update the InitState if we are currently in the prior state.
        // For example, only move into CallingInit if we are in BeforeInit. Only
        // move into CallingContentInit if we are in CallingInit. Normally this will
        // always be true because of how checkCycle is called in checkAndUpdateView.
        // However, if checkAndUpdateView is called recursively or if an exception is
        // thrown while checkAndUpdateView is running, checkAndUpdateView starts over
        // from the beginning. This ensures the state is monotonically increasing,
        // terminating in the AfterInit state, which ensures the Init methods are called
        // at least once and only once.
        var state = view.state;
        var initState = state & 1792
        /* InitState_Mask */
        ;

        if (initState === priorInitState) {
          view.state = state & ~1792
          /* InitState_Mask */
          | newInitState;
          view.initIndex = -1;
          return true;
        }

        return initState === newInitState;
      } // Returns true if the lifecycle init method should be called for the node with
      // the given init index.


      function shouldCallLifecycleInitHook(view, initState, index) {
        if ((view.state & 1792
        /* InitState_Mask */
        ) === initState && view.initIndex <= index) {
          view.initIndex = index + 1;
          return true;
        }

        return false;
      }
      /**
       * Node instance data.
       *
       * We have a separate type per NodeType to save memory
       * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>)
       *
       * To keep our code monomorphic,
       * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...).
       * This way, no usage site can get a `NodeData` from view.nodes and then use it for different
       * purposes.
       */


      var NodeData = function NodeData() {
        _classCallCheck(this, NodeData);
      };
      /**
       * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
       */


      function asTextData(view, index) {
        return view.nodes[index];
      }
      /**
       * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
       */


      function asElementData(view, index) {
        return view.nodes[index];
      }
      /**
       * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
       */


      function asProviderData(view, index) {
        return view.nodes[index];
      }
      /**
       * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
       */


      function asPureExpressionData(view, index) {
        return view.nodes[index];
      }
      /**
       * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
       */


      function asQueryList(view, index) {
        return view.nodes[index];
      }

      var DebugContext = function DebugContext() {
        _classCallCheck(this, DebugContext);
      };
      /**
       * This object is used to prevent cycles in the source files and to have a place where
       * debug mode can hook it. It is lazily filled when `isDevMode` is known.
       */


      var Services = {
        setCurrentNode: undefined,
        createRootView: undefined,
        createEmbeddedView: undefined,
        createComponentView: undefined,
        createNgModuleRef: undefined,
        overrideProvider: undefined,
        overrideComponentView: undefined,
        clearOverrides: undefined,
        checkAndUpdateView: undefined,
        checkNoChangesView: undefined,
        destroyView: undefined,
        resolveDep: undefined,
        createDebugContext: undefined,
        handleEvent: undefined,
        updateDirectives: undefined,
        updateRenderer: undefined,
        dirtyParentQueries: undefined
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var NOOP = function NOOP() {};

      var _tokenKeyCache = new Map();

      function tokenKey(token) {
        var key = _tokenKeyCache.get(token);

        if (!key) {
          key = stringify(token) + '_' + _tokenKeyCache.size;

          _tokenKeyCache.set(token, key);
        }

        return key;
      }

      function unwrapValue(view, nodeIdx, bindingIdx, value) {
        if (WrappedValue.isWrapped(value)) {
          value = WrappedValue.unwrap(value);
          var globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;
          var oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);
          view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);
        }

        return value;
      }

      var UNDEFINED_RENDERER_TYPE_ID = '$$undefined';
      var EMPTY_RENDERER_TYPE_ID = '$$empty'; // Attention: this function is called as top level function.
      // Putting any logic in here will destroy closure tree shaking!

      function createRendererType2(values) {
        return {
          id: UNDEFINED_RENDERER_TYPE_ID,
          styles: values.styles,
          encapsulation: values.encapsulation,
          data: values.data
        };
      }

      var _renderCompCount$1 = 0;

      function resolveRendererType2(type) {
        if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {
          // first time we see this RendererType2. Initialize it...
          var isFilled = type.encapsulation != null && type.encapsulation !== ViewEncapsulation.None || type.styles.length || Object.keys(type.data).length;

          if (isFilled) {
            type.id = "c".concat(_renderCompCount$1++);
          } else {
            type.id = EMPTY_RENDERER_TYPE_ID;
          }
        }

        if (type && type.id === EMPTY_RENDERER_TYPE_ID) {
          type = null;
        }

        return type || null;
      }

      function checkBinding(view, def, bindingIdx, value) {
        var oldValues = view.oldValues;

        if (view.state & 2
        /* FirstCheck */
        || !Object.is(oldValues[def.bindingIndex + bindingIdx], value)) {
          return true;
        }

        return false;
      }

      function checkAndUpdateBinding(view, def, bindingIdx, value) {
        if (checkBinding(view, def, bindingIdx, value)) {
          view.oldValues[def.bindingIndex + bindingIdx] = value;
          return true;
        }

        return false;
      }

      function checkBindingNoChanges(view, def, bindingIdx, value) {
        var oldValue = view.oldValues[def.bindingIndex + bindingIdx];

        if (view.state & 1
        /* BeforeFirstCheck */
        || !devModeEqual(oldValue, value)) {
          var bindingName = def.bindings[bindingIdx].name;
          throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, def.nodeIndex), "".concat(bindingName, ": ").concat(oldValue), "".concat(bindingName, ": ").concat(value), (view.state & 1
          /* BeforeFirstCheck */
          ) !== 0);
        }
      }

      function markParentViewsForCheck(view) {
        var currView = view;

        while (currView) {
          if (currView.def.flags & 2
          /* OnPush */
          ) {
            currView.state |= 8
            /* ChecksEnabled */
            ;
          }

          currView = currView.viewContainerParent || currView.parent;
        }
      }

      function markParentViewsForCheckProjectedViews(view, endView) {
        var currView = view;

        while (currView && currView !== endView) {
          currView.state |= 64
          /* CheckProjectedViews */
          ;
          currView = currView.viewContainerParent || currView.parent;
        }
      }

      function dispatchEvent(view, nodeIndex, eventName, event) {
        try {
          var nodeDef = view.def.nodes[nodeIndex];
          var startView = nodeDef.flags & 33554432
          /* ComponentView */
          ? asElementData(view, nodeIndex).componentView : view;
          markParentViewsForCheck(startView);
          return Services.handleEvent(view, nodeIndex, eventName, event);
        } catch (e) {
          // Attention: Don't rethrow, as it would cancel Observable subscriptions!
          view.root.errorHandler.handleError(e);
        }
      }

      function declaredViewContainer(view) {
        if (view.parent) {
          var parentView = view.parent;
          return asElementData(parentView, view.parentNodeDef.nodeIndex);
        }

        return null;
      }
      /**
       * for component views, this is the host element.
       * for embedded views, this is the index of the parent node
       * that contains the view container.
       */


      function viewParentEl(view) {
        var parentView = view.parent;

        if (parentView) {
          return view.parentNodeDef.parent;
        } else {
          return null;
        }
      }

      function renderNode(view, def) {
        switch (def.flags & 201347067
        /* Types */
        ) {
          case 1
          /* TypeElement */
          :
            return asElementData(view, def.nodeIndex).renderElement;

          case 2
          /* TypeText */
          :
            return asTextData(view, def.nodeIndex).renderText;
        }
      }

      function elementEventFullName(target, name) {
        return target ? "".concat(target, ":").concat(name) : name;
      }

      function isComponentView(view) {
        return !!view.parent && !!(view.parentNodeDef.flags & 32768
        /* Component */
        );
      }

      function isEmbeddedView(view) {
        return !!view.parent && !(view.parentNodeDef.flags & 32768
        /* Component */
        );
      }

      function filterQueryId(queryId) {
        return 1 << queryId % 32;
      }

      function splitMatchedQueriesDsl(matchedQueriesDsl) {
        var matchedQueries = {};
        var matchedQueryIds = 0;
        var references = {};

        if (matchedQueriesDsl) {
          matchedQueriesDsl.forEach(function (_ref86) {
            var _ref87 = _slicedToArray(_ref86, 2),
                queryId = _ref87[0],
                valueType = _ref87[1];

            if (typeof queryId === 'number') {
              matchedQueries[queryId] = valueType;
              matchedQueryIds |= filterQueryId(queryId);
            } else {
              references[queryId] = valueType;
            }
          });
        }

        return {
          matchedQueries: matchedQueries,
          references: references,
          matchedQueryIds: matchedQueryIds
        };
      }

      function splitDepsDsl(deps, sourceName) {
        return deps.map(function (value) {
          var token;
          var flags;

          if (Array.isArray(value)) {
            var _value11 = _slicedToArray(value, 2);

            flags = _value11[0];
            token = _value11[1];
          } else {
            flags = 0
            /* None */
            ;
            token = value;
          }

          if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {
            Object.defineProperty(token, SOURCE, {
              value: sourceName,
              configurable: true
            });
          }

          return {
            flags: flags,
            token: token,
            tokenKey: tokenKey(token)
          };
        });
      }

      function getParentRenderElement(view, renderHost, def) {
        var renderParent = def.renderParent;

        if (renderParent) {
          if ((renderParent.flags & 1
          /* TypeElement */
          ) === 0 || (renderParent.flags & 33554432
          /* ComponentView */
          ) === 0 || renderParent.element.componentRendererType && (renderParent.element.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom || // TODO(FW-2290): remove the `encapsulation === 1` fallback logic in v12.
          renderParent.element.componentRendererType.encapsulation === 1)) {
            // only children of non components, or children of components with native encapsulation should
            // be attached.
            return asElementData(view, def.renderParent.nodeIndex).renderElement;
          }
        } else {
          return renderHost;
        }
      }

      var DEFINITION_CACHE = new WeakMap();

      function resolveDefinition(factory) {
        var value = DEFINITION_CACHE.get(factory);

        if (!value) {
          value = factory(function () {
            return NOOP;
          });
          value.factory = factory;
          DEFINITION_CACHE.set(factory, value);
        }

        return value;
      }

      function rootRenderNodes(view) {
        var renderNodes = [];
        visitRootRenderNodes(view, 0
        /* Collect */
        , undefined, undefined, renderNodes);
        return renderNodes;
      }

      function visitRootRenderNodes(view, action, parentNode, nextSibling, target) {
        // We need to re-compute the parent node in case the nodes have been moved around manually
        if (action === 3
        /* RemoveChild */
        ) {
          parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode));
        }

        visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);
      }

      function visitSiblingRenderNodes(view, action, startIndex, endIndex, parentNode, nextSibling, target) {
        for (var i = startIndex; i <= endIndex; i++) {
          var nodeDef = view.def.nodes[i];

          if (nodeDef.flags & (1
          /* TypeElement */
          | 2
          /* TypeText */
          | 8
          /* TypeNgContent */
          )) {
            visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);
          } // jump to next sibling


          i += nodeDef.childCount;
        }
      }

      function visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nextSibling, target) {
        var compView = view;

        while (compView && !isComponentView(compView)) {
          compView = compView.parent;
        }

        var hostView = compView.parent;
        var hostElDef = viewParentEl(compView);
        var startIndex = hostElDef.nodeIndex + 1;
        var endIndex = hostElDef.nodeIndex + hostElDef.childCount;

        for (var i = startIndex; i <= endIndex; i++) {
          var nodeDef = hostView.def.nodes[i];

          if (nodeDef.ngContentIndex === ngContentIndex) {
            visitRenderNode(hostView, nodeDef, action, parentNode, nextSibling, target);
          } // jump to next sibling


          i += nodeDef.childCount;
        }

        if (!hostView.parent) {
          // a root view
          var projectedNodes = view.root.projectableNodes[ngContentIndex];

          if (projectedNodes) {
            for (var _i29 = 0; _i29 < projectedNodes.length; _i29++) {
              execRenderNodeAction(view, projectedNodes[_i29], action, parentNode, nextSibling, target);
            }
          }
        }
      }

      function visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target) {
        if (nodeDef.flags & 8
        /* TypeNgContent */
        ) {
          visitProjectedRenderNodes(view, nodeDef.ngContent.index, action, parentNode, nextSibling, target);
        } else {
          var rn = renderNode(view, nodeDef);

          if (action === 3
          /* RemoveChild */
          && nodeDef.flags & 33554432
          /* ComponentView */
          && nodeDef.bindingFlags & 48
          /* CatSyntheticProperty */
          ) {
            // Note: we might need to do both actions.
            if (nodeDef.bindingFlags & 16
            /* SyntheticProperty */
            ) {
              execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);
            }

            if (nodeDef.bindingFlags & 32
            /* SyntheticHostProperty */
            ) {
              var compView = asElementData(view, nodeDef.nodeIndex).componentView;
              execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target);
            }
          } else {
            execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);
          }

          if (nodeDef.flags & 16777216
          /* EmbeddedViews */
          ) {
            var embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer._embeddedViews;

            for (var k = 0; k < embeddedViews.length; k++) {
              visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);
            }
          }

          if (nodeDef.flags & 1
          /* TypeElement */
          && !nodeDef.element.name) {
            visitSiblingRenderNodes(view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode, nextSibling, target);
          }
        }
      }

      function execRenderNodeAction(view, renderNode, action, parentNode, nextSibling, target) {
        var renderer = view.renderer;

        switch (action) {
          case 1
          /* AppendChild */
          :
            renderer.appendChild(parentNode, renderNode);
            break;

          case 2
          /* InsertBefore */
          :
            renderer.insertBefore(parentNode, renderNode, nextSibling);
            break;

          case 3
          /* RemoveChild */
          :
            renderer.removeChild(parentNode, renderNode);
            break;

          case 0
          /* Collect */
          :
            target.push(renderNode);
            break;
        }
      }

      var NS_PREFIX_RE = /^:([^:]+):(.+)$/;

      function splitNamespace(name) {
        if (name[0] === ':') {
          var match = name.match(NS_PREFIX_RE);
          return [match[1], match[2]];
        }

        return ['', name];
      }

      function calcBindingFlags(bindings) {
        var flags = 0;

        for (var i = 0; i < bindings.length; i++) {
          flags |= bindings[i].flags;
        }

        return flags;
      }

      function interpolate(valueCount, constAndInterp) {
        var result = '';

        for (var i = 0; i < valueCount * 2; i = i + 2) {
          result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);
        }

        return result + constAndInterp[valueCount * 2];
      }

      function inlineInterpolate(valueCount, c0, a1, c1, a2, c2, a3, c3, a4, c4, a5, c5, a6, c6, a7, c7, a8, c8, a9, c9) {
        switch (valueCount) {
          case 1:
            return c0 + _toStringWithNull(a1) + c1;

          case 2:
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;

          case 3:
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3;

          case 4:
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4;

          case 5:
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;

          case 6:
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;

          case 7:
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6 + _toStringWithNull(a7) + c7;

          case 8:
            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;

          case 9:
            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;

          default:
            throw new Error("Does not support more than 9 expressions");
        }
      }

      function _toStringWithNull(v) {
        return v != null ? v.toString() : '';
      }

      var EMPTY_ARRAY$4 = [];
      var EMPTY_MAP = {};
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var UNDEFINED_VALUE = {};
      var InjectorRefTokenKey = tokenKey(Injector);
      var INJECTORRefTokenKey = tokenKey(INJECTOR$1);
      var NgModuleRefTokenKey = tokenKey(NgModuleRef);

      function moduleProvideDef(flags, token, value, deps) {
        // Need to resolve forwardRefs as e.g. for `useValue` we
        // lowered the expression and then stopped evaluating it,
        // i.e. also didn't unwrap it.
        value = resolveForwardRef(value);
        var depDefs = splitDepsDsl(deps, stringify(token));
        return {
          // will bet set by the module definition
          index: -1,
          deps: depDefs,
          flags: flags,
          token: token,
          value: value
        };
      }

      function moduleDef(providers) {
        var providersByKey = {};
        var modules = [];
        var scope = null;

        for (var i = 0; i < providers.length; i++) {
          var provider = providers[i];

          if (provider.token === INJECTOR_SCOPE) {
            scope = provider.value;
          }

          if (provider.flags & 1073741824
          /* TypeNgModule */
          ) {
            modules.push(provider.token);
          }

          provider.index = i;
          providersByKey[tokenKey(provider.token)] = provider;
        }

        return {
          // Will be filled later...
          factory: null,
          providersByKey: providersByKey,
          providers: providers,
          modules: modules,
          scope: scope
        };
      }

      function initNgModule(data) {
        var def = data._def;
        var providers = data._providers = newArray(def.providers.length);

        for (var i = 0; i < def.providers.length; i++) {
          var provDef = def.providers[i];

          if (!(provDef.flags & 4096
          /* LazyProvider */
          )) {
            // Make sure the provider has not been already initialized outside this loop.
            if (providers[i] === undefined) {
              providers[i] = _createProviderInstance(data, provDef);
            }
          }
        }
      }

      function resolveNgModuleDep(data, depDef) {
        var notFoundValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Injector.THROW_IF_NOT_FOUND;
        var former = setCurrentInjector(data);

        try {
          if (depDef.flags & 8
          /* Value */
          ) {
            return depDef.token;
          }

          if (depDef.flags & 2
          /* Optional */
          ) {
            notFoundValue = null;
          }

          if (depDef.flags & 1
          /* SkipSelf */
          ) {
            return data._parent.get(depDef.token, notFoundValue);
          }

          var _tokenKey = depDef.tokenKey;

          switch (_tokenKey) {
            case InjectorRefTokenKey:
            case INJECTORRefTokenKey:
            case NgModuleRefTokenKey:
              return data;
          }

          var _providerDef2 = data._def.providersByKey[_tokenKey];
          var injectableDef;

          if (_providerDef2) {
            var providerInstance = data._providers[_providerDef2.index];

            if (providerInstance === undefined) {
              providerInstance = data._providers[_providerDef2.index] = _createProviderInstance(data, _providerDef2);
            }

            return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;
          } else if ((injectableDef = getInjectableDef(depDef.token)) && targetsModule(data, injectableDef)) {
            var index = data._providers.length;
            data._def.providers[index] = data._def.providersByKey[depDef.tokenKey] = {
              flags: 1024
              /* TypeFactoryProvider */
              | 4096
              /* LazyProvider */
              ,
              value: injectableDef.factory,
              deps: [],
              index: index,
              token: depDef.token
            };
            data._providers[index] = UNDEFINED_VALUE;
            return data._providers[index] = _createProviderInstance(data, data._def.providersByKey[depDef.tokenKey]);
          } else if (depDef.flags & 4
          /* Self */
          ) {
            return notFoundValue;
          }

          return data._parent.get(depDef.token, notFoundValue);
        } finally {
          setCurrentInjector(former);
        }
      }

      function moduleTransitivelyPresent(ngModule, scope) {
        return ngModule._def.modules.indexOf(scope) > -1;
      }

      function targetsModule(ngModule, def) {
        var providedIn = def.providedIn;
        return providedIn != null && (providedIn === 'any' || providedIn === ngModule._def.scope || moduleTransitivelyPresent(ngModule, providedIn));
      }

      function _createProviderInstance(ngModule, providerDef) {
        var injectable;

        switch (providerDef.flags & 201347067
        /* Types */
        ) {
          case 512
          /* TypeClassProvider */
          :
            injectable = _createClass(ngModule, providerDef.value, providerDef.deps);
            break;

          case 1024
          /* TypeFactoryProvider */
          :
            injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);
            break;

          case 2048
          /* TypeUseExistingProvider */
          :
            injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);
            break;

          case 256
          /* TypeValueProvider */
          :
            injectable = providerDef.value;
            break;
        } // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be
        // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be
        // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already
        // set (ngOnDestroy was detected statically).


        if (injectable !== UNDEFINED_VALUE && injectable !== null && typeof injectable === 'object' && !(providerDef.flags & 131072
        /* OnDestroy */
        ) && typeof injectable.ngOnDestroy === 'function') {
          providerDef.flags |= 131072
          /* OnDestroy */
          ;
        }

        return injectable === undefined ? UNDEFINED_VALUE : injectable;
      }

      function _createClass(ngModule, ctor, deps) {
        var len = deps.length;

        switch (len) {
          case 0:
            return new ctor();

          case 1:
            return new ctor(resolveNgModuleDep(ngModule, deps[0]));

          case 2:
            return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));

          case 3:
            return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));

          default:
            var depValues = [];

            for (var i = 0; i < len; i++) {
              depValues[i] = resolveNgModuleDep(ngModule, deps[i]);
            }

            return _construct(ctor, depValues);
        }
      }

      function _callFactory(ngModule, factory, deps) {
        var len = deps.length;

        switch (len) {
          case 0:
            return factory();

          case 1:
            return factory(resolveNgModuleDep(ngModule, deps[0]));

          case 2:
            return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));

          case 3:
            return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));

          default:
            var depValues = [];

            for (var i = 0; i < len; i++) {
              depValues[i] = resolveNgModuleDep(ngModule, deps[i]);
            }

            return factory.apply(void 0, depValues);
        }
      }

      function callNgModuleLifecycle(ngModule, lifecycles) {
        var def = ngModule._def;
        var destroyed = new Set();

        for (var i = 0; i < def.providers.length; i++) {
          var provDef = def.providers[i];

          if (provDef.flags & 131072
          /* OnDestroy */
          ) {
            var instance = ngModule._providers[i];

            if (instance && instance !== UNDEFINED_VALUE) {
              var onDestroy = instance.ngOnDestroy;

              if (typeof onDestroy === 'function' && !destroyed.has(instance)) {
                onDestroy.apply(instance);
                destroyed.add(instance);
              }
            }
          }
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function attachEmbeddedView(parentView, elementData, viewIndex, view) {
        var embeddedViews = elementData.viewContainer._embeddedViews;

        if (viewIndex === null || viewIndex === undefined) {
          viewIndex = embeddedViews.length;
        }

        view.viewContainerParent = parentView;
        addToArray(embeddedViews, viewIndex, view);
        attachProjectedView(elementData, view);
        Services.dirtyParentQueries(view);
        var prevView = viewIndex > 0 ? embeddedViews[viewIndex - 1] : null;
        renderAttachEmbeddedView(elementData, prevView, view);
      }

      function attachProjectedView(vcElementData, view) {
        var dvcElementData = declaredViewContainer(view);

        if (!dvcElementData || dvcElementData === vcElementData || view.state & 16
        /* IsProjectedView */
        ) {
          return;
        } // Note: For performance reasons, we
        // - add a view to template._projectedViews only 1x throughout its lifetime,
        //   and remove it not until the view is destroyed.
        //   (hard, as when a parent view is attached/detached we would need to attach/detach all
        //    nested projected views as well, even across component boundaries).
        // - don't track the insertion order of views in the projected views array
        //   (hard, as when the views of the same template are inserted different view containers)


        view.state |= 16
        /* IsProjectedView */
        ;
        var projectedViews = dvcElementData.template._projectedViews;

        if (!projectedViews) {
          projectedViews = dvcElementData.template._projectedViews = [];
        }

        projectedViews.push(view); // Note: we are changing the NodeDef here as we cannot calculate
        // the fact whether a template is used for projection during compilation.

        markNodeAsProjectedTemplate(view.parent.def, view.parentNodeDef);
      }

      function markNodeAsProjectedTemplate(viewDef, nodeDef) {
        if (nodeDef.flags & 4
        /* ProjectedTemplate */
        ) {
          return;
        }

        viewDef.nodeFlags |= 4
        /* ProjectedTemplate */
        ;
        nodeDef.flags |= 4
        /* ProjectedTemplate */
        ;
        var parentNodeDef = nodeDef.parent;

        while (parentNodeDef) {
          parentNodeDef.childFlags |= 4
          /* ProjectedTemplate */
          ;
          parentNodeDef = parentNodeDef.parent;
        }
      }

      function detachEmbeddedView(elementData, viewIndex) {
        var embeddedViews = elementData.viewContainer._embeddedViews;

        if (viewIndex == null || viewIndex >= embeddedViews.length) {
          viewIndex = embeddedViews.length - 1;
        }

        if (viewIndex < 0) {
          return null;
        }

        var view = embeddedViews[viewIndex];
        view.viewContainerParent = null;
        removeFromArray(embeddedViews, viewIndex); // See attachProjectedView for why we don't update projectedViews here.

        Services.dirtyParentQueries(view);
        renderDetachView$1(view);
        return view;
      }

      function detachProjectedView(view) {
        if (!(view.state & 16
        /* IsProjectedView */
        )) {
          return;
        }

        var dvcElementData = declaredViewContainer(view);

        if (dvcElementData) {
          var projectedViews = dvcElementData.template._projectedViews;

          if (projectedViews) {
            removeFromArray(projectedViews, projectedViews.indexOf(view));
            Services.dirtyParentQueries(view);
          }
        }
      }

      function moveEmbeddedView(elementData, oldViewIndex, newViewIndex) {
        var embeddedViews = elementData.viewContainer._embeddedViews;
        var view = embeddedViews[oldViewIndex];
        removeFromArray(embeddedViews, oldViewIndex);

        if (newViewIndex == null) {
          newViewIndex = embeddedViews.length;
        }

        addToArray(embeddedViews, newViewIndex, view); // Note: Don't need to change projectedViews as the order in there
        // as always invalid...

        Services.dirtyParentQueries(view);
        renderDetachView$1(view);
        var prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;
        renderAttachEmbeddedView(elementData, prevView, view);
        return view;
      }

      function renderAttachEmbeddedView(elementData, prevView, view) {
        var prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode) : elementData.renderElement;
        var parentNode = view.renderer.parentNode(prevRenderNode);
        var nextSibling = view.renderer.nextSibling(prevRenderNode); // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be!
        // However, browsers automatically do `appendChild` when there is no `nextSibling`.

        visitRootRenderNodes(view, 2
        /* InsertBefore */
        , parentNode, nextSibling, undefined);
      }

      function renderDetachView$1(view) {
        visitRootRenderNodes(view, 3
        /* RemoveChild */
        , null, null, undefined);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var EMPTY_CONTEXT = {}; // Attention: this function is called as top level function.
      // Putting any logic in here will destroy closure tree shaking!

      function createComponentFactory(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors) {
        return new ComponentFactory_(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);
      }

      function getComponentViewDefinitionFactory(componentFactory) {
        return componentFactory.viewDefFactory;
      }

      var ComponentFactory_ = /*#__PURE__*/function (_ComponentFactory2) {
        _inherits(ComponentFactory_, _ComponentFactory2);

        var _super226 = _createSuper(ComponentFactory_);

        function ComponentFactory_(selector, componentType, viewDefFactory, _inputs, _outputs, ngContentSelectors) {
          var _this477;

          _classCallCheck(this, ComponentFactory_);

          // Attention: this ctor is called as top level function.
          // Putting any logic in here will destroy closure tree shaking!
          _this477 = _super226.call(this);
          _this477.selector = selector;
          _this477.componentType = componentType;
          _this477._inputs = _inputs;
          _this477._outputs = _outputs;
          _this477.ngContentSelectors = ngContentSelectors;
          _this477.viewDefFactory = viewDefFactory;
          return _this477;
        }

        _createClass2(ComponentFactory_, [{
          key: "inputs",
          get: function get() {
            var inputsArr = [];
            var inputs = this._inputs;

            for (var propName in inputs) {
              var templateName = inputs[propName];
              inputsArr.push({
                propName: propName,
                templateName: templateName
              });
            }

            return inputsArr;
          }
        }, {
          key: "outputs",
          get: function get() {
            var outputsArr = [];

            for (var propName in this._outputs) {
              var templateName = this._outputs[propName];
              outputsArr.push({
                propName: propName,
                templateName: templateName
              });
            }

            return outputsArr;
          }
          /**
           * Creates a new component.
           */

        }, {
          key: "create",
          value: function create(injector, projectableNodes, rootSelectorOrNode, ngModule) {
            if (!ngModule) {
              throw new Error('ngModule should be provided');
            }

            var viewDef = resolveDefinition(this.viewDefFactory);
            var componentNodeIndex = viewDef.nodes[0].element.componentProvider.nodeIndex;
            var view = Services.createRootView(injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);
            var component = asProviderData(view, componentNodeIndex).instance;

            if (rootSelectorOrNode) {
              view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full);
            }

            return new ComponentRef_(view, new ViewRef_(view), component);
          }
        }]);

        return ComponentFactory_;
      }(ComponentFactory);

      var ComponentRef_ = /*#__PURE__*/function (_ComponentRef) {
        _inherits(ComponentRef_, _ComponentRef);

        var _super227 = _createSuper(ComponentRef_);

        function ComponentRef_(_view, _viewRef, _component) {
          var _this478;

          _classCallCheck(this, ComponentRef_);

          _this478 = _super227.call(this);
          _this478._view = _view;
          _this478._viewRef = _viewRef;
          _this478._component = _component;
          _this478._elDef = _this478._view.def.nodes[0];
          _this478.hostView = _viewRef;
          _this478.changeDetectorRef = _viewRef;
          _this478.instance = _component;
          return _this478;
        }

        _createClass2(ComponentRef_, [{
          key: "location",
          get: function get() {
            return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);
          }
        }, {
          key: "injector",
          get: function get() {
            return new Injector_(this._view, this._elDef);
          }
        }, {
          key: "componentType",
          get: function get() {
            return this._component.constructor;
          }
        }, {
          key: "destroy",
          value: function destroy() {
            this._viewRef.destroy();
          }
        }, {
          key: "onDestroy",
          value: function onDestroy(callback) {
            this._viewRef.onDestroy(callback);
          }
        }]);

        return ComponentRef_;
      }(ComponentRef);

      function createViewContainerData(view, elDef, elData) {
        return new ViewContainerRef_(view, elDef, elData);
      }

      var ViewContainerRef_ = /*#__PURE__*/function () {
        function ViewContainerRef_(_view, _elDef, _data) {
          _classCallCheck(this, ViewContainerRef_);

          this._view = _view;
          this._elDef = _elDef;
          this._data = _data;
          /**
           * @internal
           */

          this._embeddedViews = [];
        }

        _createClass2(ViewContainerRef_, [{
          key: "element",
          get: function get() {
            return new ElementRef(this._data.renderElement);
          }
        }, {
          key: "injector",
          get: function get() {
            return new Injector_(this._view, this._elDef);
          }
          /** @deprecated No replacement */

        }, {
          key: "parentInjector",
          get: function get() {
            var view = this._view;
            var elDef = this._elDef.parent;

            while (!elDef && view) {
              elDef = viewParentEl(view);
              view = view.parent;
            }

            return view ? new Injector_(view, elDef) : new Injector_(this._view, null);
          }
        }, {
          key: "clear",
          value: function clear() {
            var len = this._embeddedViews.length;

            for (var i = len - 1; i >= 0; i--) {
              var view = detachEmbeddedView(this._data, i);
              Services.destroyView(view);
            }
          }
        }, {
          key: "get",
          value: function get(index) {
            var view = this._embeddedViews[index];

            if (view) {
              var ref = new ViewRef_(view);
              ref.attachToViewContainerRef(this);
              return ref;
            }

            return null;
          }
        }, {
          key: "length",
          get: function get() {
            return this._embeddedViews.length;
          }
        }, {
          key: "createEmbeddedView",
          value: function createEmbeddedView(templateRef, context, index) {
            var viewRef = templateRef.createEmbeddedView(context || {});
            this.insert(viewRef, index);
            return viewRef;
          }
        }, {
          key: "createComponent",
          value: function createComponent(componentFactory, index, injector, projectableNodes, ngModuleRef) {
            var contextInjector = injector || this.parentInjector;

            if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {
              ngModuleRef = contextInjector.get(NgModuleRef);
            }

            var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);
            this.insert(componentRef.hostView, index);
            return componentRef;
          }
        }, {
          key: "insert",
          value: function insert(viewRef, index) {
            if (viewRef.destroyed) {
              throw new Error('Cannot insert a destroyed View in a ViewContainer!');
            }

            var viewRef_ = viewRef;
            var viewData = viewRef_._view;
            attachEmbeddedView(this._view, this._data, index, viewData);
            viewRef_.attachToViewContainerRef(this);
            return viewRef;
          }
        }, {
          key: "move",
          value: function move(viewRef, currentIndex) {
            if (viewRef.destroyed) {
              throw new Error('Cannot move a destroyed View in a ViewContainer!');
            }

            var previousIndex = this._embeddedViews.indexOf(viewRef._view);

            moveEmbeddedView(this._data, previousIndex, currentIndex);
            return viewRef;
          }
        }, {
          key: "indexOf",
          value: function indexOf(viewRef) {
            return this._embeddedViews.indexOf(viewRef._view);
          }
        }, {
          key: "remove",
          value: function remove(index) {
            var viewData = detachEmbeddedView(this._data, index);

            if (viewData) {
              Services.destroyView(viewData);
            }
          }
        }, {
          key: "detach",
          value: function detach(index) {
            var view = detachEmbeddedView(this._data, index);
            return view ? new ViewRef_(view) : null;
          }
        }]);

        return ViewContainerRef_;
      }();

      function createChangeDetectorRef(view) {
        return new ViewRef_(view);
      }

      var ViewRef_ = /*#__PURE__*/function () {
        function ViewRef_(_view) {
          _classCallCheck(this, ViewRef_);

          this._view = _view;
          this._viewContainerRef = null;
          this._appRef = null;
        }

        _createClass2(ViewRef_, [{
          key: "rootNodes",
          get: function get() {
            return rootRenderNodes(this._view);
          }
        }, {
          key: "context",
          get: function get() {
            return this._view.context;
          }
        }, {
          key: "destroyed",
          get: function get() {
            return (this._view.state & 128
            /* Destroyed */
            ) !== 0;
          }
        }, {
          key: "markForCheck",
          value: function markForCheck() {
            markParentViewsForCheck(this._view);
          }
        }, {
          key: "detach",
          value: function detach() {
            this._view.state &= ~4
            /* Attached */
            ;
          }
        }, {
          key: "detectChanges",
          value: function detectChanges() {
            var fs = this._view.root.rendererFactory;

            if (fs.begin) {
              fs.begin();
            }

            try {
              Services.checkAndUpdateView(this._view);
            } finally {
              if (fs.end) {
                fs.end();
              }
            }
          }
        }, {
          key: "checkNoChanges",
          value: function checkNoChanges() {
            Services.checkNoChangesView(this._view);
          }
        }, {
          key: "reattach",
          value: function reattach() {
            this._view.state |= 4
            /* Attached */
            ;
          }
        }, {
          key: "onDestroy",
          value: function onDestroy(callback) {
            if (!this._view.disposables) {
              this._view.disposables = [];
            }

            this._view.disposables.push(callback);
          }
        }, {
          key: "destroy",
          value: function destroy() {
            if (this._appRef) {
              this._appRef.detachView(this);
            } else if (this._viewContainerRef) {
              this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));
            }

            Services.destroyView(this._view);
          }
        }, {
          key: "detachFromAppRef",
          value: function detachFromAppRef() {
            this._appRef = null;
            renderDetachView$1(this._view);
            Services.dirtyParentQueries(this._view);
          }
        }, {
          key: "attachToAppRef",
          value: function attachToAppRef(appRef) {
            if (this._viewContainerRef) {
              throw new Error('This view is already attached to a ViewContainer!');
            }

            this._appRef = appRef;
          }
        }, {
          key: "attachToViewContainerRef",
          value: function attachToViewContainerRef(vcRef) {
            if (this._appRef) {
              throw new Error('This view is already attached directly to the ApplicationRef!');
            }

            this._viewContainerRef = vcRef;
          }
        }]);

        return ViewRef_;
      }();

      function createTemplateData(view, def) {
        return new TemplateRef_(view, def);
      }

      var TemplateRef_ = /*#__PURE__*/function (_TemplateRef) {
        _inherits(TemplateRef_, _TemplateRef);

        var _super228 = _createSuper(TemplateRef_);

        function TemplateRef_(_parentView, _def) {
          var _this479;

          _classCallCheck(this, TemplateRef_);

          _this479 = _super228.call(this);
          _this479._parentView = _parentView;
          _this479._def = _def;
          return _this479;
        }

        _createClass2(TemplateRef_, [{
          key: "createEmbeddedView",
          value: function createEmbeddedView(context) {
            return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, this._def.element.template, context));
          }
        }, {
          key: "elementRef",
          get: function get() {
            return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);
          }
        }]);

        return TemplateRef_;
      }(TemplateRef);

      function createInjector$1(view, elDef) {
        return new Injector_(view, elDef);
      }

      var Injector_ = /*#__PURE__*/function () {
        function Injector_(view, elDef) {
          _classCallCheck(this, Injector_);

          this.view = view;
          this.elDef = elDef;
        }

        _createClass2(Injector_, [{
          key: "get",
          value: function get(token) {
            var notFoundValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Injector.THROW_IF_NOT_FOUND;
            var allowPrivateServices = this.elDef ? (this.elDef.flags & 33554432
            /* ComponentView */
            ) !== 0 : false;
            return Services.resolveDep(this.view, this.elDef, allowPrivateServices, {
              flags: 0
              /* None */
              ,
              token: token,
              tokenKey: tokenKey(token)
            }, notFoundValue);
          }
        }]);

        return Injector_;
      }();

      function nodeValue(view, index) {
        var def = view.def.nodes[index];

        if (def.flags & 1
        /* TypeElement */
        ) {
          var elData = asElementData(view, def.nodeIndex);
          return def.element.template ? elData.template : elData.renderElement;
        } else if (def.flags & 2
        /* TypeText */
        ) {
          return asTextData(view, def.nodeIndex).renderText;
        } else if (def.flags & (20224
        /* CatProvider */
        | 16
        /* TypePipe */
        )) {
          return asProviderData(view, def.nodeIndex).instance;
        }

        throw new Error("Illegal state: read nodeValue for node index ".concat(index));
      }

      function createNgModuleRef(moduleType, parent, bootstrapComponents, def) {
        return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);
      }

      var NgModuleRef_ = /*#__PURE__*/function () {
        function NgModuleRef_(_moduleType, _parent, _bootstrapComponents, _def) {
          _classCallCheck(this, NgModuleRef_);

          this._moduleType = _moduleType;
          this._parent = _parent;
          this._bootstrapComponents = _bootstrapComponents;
          this._def = _def;
          this._destroyListeners = [];
          this._destroyed = false;
          this.injector = this;
          initNgModule(this);
        }

        _createClass2(NgModuleRef_, [{
          key: "get",
          value: function get(token) {
            var notFoundValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Injector.THROW_IF_NOT_FOUND;
            var injectFlags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : InjectFlags.Default;
            var flags = 0
            /* None */
            ;

            if (injectFlags & InjectFlags.SkipSelf) {
              flags |= 1
              /* SkipSelf */
              ;
            } else if (injectFlags & InjectFlags.Self) {
              flags |= 4
              /* Self */
              ;
            }

            return resolveNgModuleDep(this, {
              token: token,
              tokenKey: tokenKey(token),
              flags: flags
            }, notFoundValue);
          }
        }, {
          key: "instance",
          get: function get() {
            return this.get(this._moduleType);
          }
        }, {
          key: "componentFactoryResolver",
          get: function get() {
            return this.get(ComponentFactoryResolver);
          }
        }, {
          key: "destroy",
          value: function destroy() {
            if (this._destroyed) {
              throw new Error("The ng module ".concat(stringify(this.instance.constructor), " has already been destroyed."));
            }

            this._destroyed = true;
            callNgModuleLifecycle(this, 131072
            /* OnDestroy */
            );

            this._destroyListeners.forEach(function (listener) {
              return listener();
            });
          }
        }, {
          key: "onDestroy",
          value: function onDestroy(callback) {
            this._destroyListeners.push(callback);
          }
        }]);

        return NgModuleRef_;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var Renderer2TokenKey = tokenKey(Renderer2);
      var ElementRefTokenKey = tokenKey(ElementRef);
      var ViewContainerRefTokenKey = tokenKey(ViewContainerRef);
      var TemplateRefTokenKey = tokenKey(TemplateRef);
      var ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);
      var InjectorRefTokenKey$1 = tokenKey(Injector);
      var INJECTORRefTokenKey$1 = tokenKey(INJECTOR$1);

      function directiveDef(checkIndex, flags, matchedQueries, childCount, ctor, deps, props, outputs) {
        var bindings = [];

        if (props) {
          for (var prop in props) {
            var _props$prop = _slicedToArray(props[prop], 2),
                bindingIndex = _props$prop[0],
                nonMinifiedName = _props$prop[1];

            bindings[bindingIndex] = {
              flags: 8
              /* TypeProperty */
              ,
              name: prop,
              nonMinifiedName: nonMinifiedName,
              ns: null,
              securityContext: null,
              suffix: null
            };
          }
        }

        var outputDefs = [];

        if (outputs) {
          for (var propName in outputs) {
            outputDefs.push({
              type: 1
              /* DirectiveOutput */
              ,
              propName: propName,
              target: null,
              eventName: outputs[propName]
            });
          }
        }

        flags |= 16384
        /* TypeDirective */
        ;
        return _def(checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);
      }

      function pipeDef(flags, ctor, deps) {
        flags |= 16
        /* TypePipe */
        ;
        return _def(-1, flags, null, 0, ctor, ctor, deps);
      }

      function providerDef(flags, matchedQueries, token, value, deps) {
        return _def(-1, flags, matchedQueries, 0, token, value, deps);
      }

      function _def(checkIndex, flags, matchedQueriesDsl, childCount, token, value, deps, bindings, outputs) {
        var _splitMatchedQueriesD = splitMatchedQueriesDsl(matchedQueriesDsl),
            matchedQueries = _splitMatchedQueriesD.matchedQueries,
            references = _splitMatchedQueriesD.references,
            matchedQueryIds = _splitMatchedQueriesD.matchedQueryIds;

        if (!outputs) {
          outputs = [];
        }

        if (!bindings) {
          bindings = [];
        } // Need to resolve forwardRefs as e.g. for `useValue` we
        // lowered the expression and then stopped evaluating it,
        // i.e. also didn't unwrap it.


        value = resolveForwardRef(value);
        var depDefs = splitDepsDsl(deps, stringify(token));
        return {
          // will bet set by the view definition
          nodeIndex: -1,
          parent: null,
          renderParent: null,
          bindingIndex: -1,
          outputIndex: -1,
          // regular values
          checkIndex: checkIndex,
          flags: flags,
          childFlags: 0,
          directChildFlags: 0,
          childMatchedQueries: 0,
          matchedQueries: matchedQueries,
          matchedQueryIds: matchedQueryIds,
          references: references,
          ngContentIndex: -1,
          childCount: childCount,
          bindings: bindings,
          bindingFlags: calcBindingFlags(bindings),
          outputs: outputs,
          element: null,
          provider: {
            token: token,
            value: value,
            deps: depDefs
          },
          text: null,
          query: null,
          ngContent: null
        };
      }

      function createProviderInstance(view, def) {
        return _createProviderInstance$1(view, def);
      }

      function createPipeInstance(view, def) {
        // deps are looked up from component.
        var compView = view;

        while (compView.parent && !isComponentView(compView)) {
          compView = compView.parent;
        } // pipes can see the private services of the component


        var allowPrivateServices = true; // pipes are always eager and classes!

        return createClass(compView.parent, viewParentEl(compView), allowPrivateServices, def.provider.value, def.provider.deps);
      }

      function createDirectiveInstance(view, def) {
        // components can see other private services, other directives can't.
        var allowPrivateServices = (def.flags & 32768
        /* Component */
        ) > 0; // directives are always eager and classes!

        var instance = createClass(view, def.parent, allowPrivateServices, def.provider.value, def.provider.deps);

        if (def.outputs.length) {
          for (var i = 0; i < def.outputs.length; i++) {
            var output = def.outputs[i];
            var outputObservable = instance[output.propName];

            if (isObservable(outputObservable)) {
              var subscription = outputObservable.subscribe(eventHandlerClosure(view, def.parent.nodeIndex, output.eventName));
              view.disposables[def.outputIndex + i] = subscription.unsubscribe.bind(subscription);
            } else {
              throw new Error("@Output ".concat(output.propName, " not initialized in '").concat(instance.constructor.name, "'."));
            }
          }
        }

        return instance;
      }

      function eventHandlerClosure(view, index, eventName) {
        return function (event) {
          return dispatchEvent(view, index, eventName, event);
        };
      }

      function checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
        var providerData = asProviderData(view, def.nodeIndex);
        var directive = providerData.instance;
        var changed = false;
        var changes = undefined;
        var bindLen = def.bindings.length;

        if (bindLen > 0 && checkBinding(view, def, 0, v0)) {
          changed = true;
          changes = updateProp(view, providerData, def, 0, v0, changes);
        }

        if (bindLen > 1 && checkBinding(view, def, 1, v1)) {
          changed = true;
          changes = updateProp(view, providerData, def, 1, v1, changes);
        }

        if (bindLen > 2 && checkBinding(view, def, 2, v2)) {
          changed = true;
          changes = updateProp(view, providerData, def, 2, v2, changes);
        }

        if (bindLen > 3 && checkBinding(view, def, 3, v3)) {
          changed = true;
          changes = updateProp(view, providerData, def, 3, v3, changes);
        }

        if (bindLen > 4 && checkBinding(view, def, 4, v4)) {
          changed = true;
          changes = updateProp(view, providerData, def, 4, v4, changes);
        }

        if (bindLen > 5 && checkBinding(view, def, 5, v5)) {
          changed = true;
          changes = updateProp(view, providerData, def, 5, v5, changes);
        }

        if (bindLen > 6 && checkBinding(view, def, 6, v6)) {
          changed = true;
          changes = updateProp(view, providerData, def, 6, v6, changes);
        }

        if (bindLen > 7 && checkBinding(view, def, 7, v7)) {
          changed = true;
          changes = updateProp(view, providerData, def, 7, v7, changes);
        }

        if (bindLen > 8 && checkBinding(view, def, 8, v8)) {
          changed = true;
          changes = updateProp(view, providerData, def, 8, v8, changes);
        }

        if (bindLen > 9 && checkBinding(view, def, 9, v9)) {
          changed = true;
          changes = updateProp(view, providerData, def, 9, v9, changes);
        }

        if (changes) {
          directive.ngOnChanges(changes);
        }

        if (def.flags & 65536
        /* OnInit */
        && shouldCallLifecycleInitHook(view, 256
        /* InitState_CallingOnInit */
        , def.nodeIndex)) {
          directive.ngOnInit();
        }

        if (def.flags & 262144
        /* DoCheck */
        ) {
          directive.ngDoCheck();
        }

        return changed;
      }

      function checkAndUpdateDirectiveDynamic(view, def, values) {
        var providerData = asProviderData(view, def.nodeIndex);
        var directive = providerData.instance;
        var changed = false;
        var changes = undefined;

        for (var i = 0; i < values.length; i++) {
          if (checkBinding(view, def, i, values[i])) {
            changed = true;
            changes = updateProp(view, providerData, def, i, values[i], changes);
          }
        }

        if (changes) {
          directive.ngOnChanges(changes);
        }

        if (def.flags & 65536
        /* OnInit */
        && shouldCallLifecycleInitHook(view, 256
        /* InitState_CallingOnInit */
        , def.nodeIndex)) {
          directive.ngOnInit();
        }

        if (def.flags & 262144
        /* DoCheck */
        ) {
          directive.ngDoCheck();
        }

        return changed;
      }

      function _createProviderInstance$1(view, def) {
        // private services can see other private services
        var allowPrivateServices = (def.flags & 8192
        /* PrivateProvider */
        ) > 0;
        var providerDef = def.provider;

        switch (def.flags & 201347067
        /* Types */
        ) {
          case 512
          /* TypeClassProvider */
          :
            return createClass(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);

          case 1024
          /* TypeFactoryProvider */
          :
            return callFactory(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);

          case 2048
          /* TypeUseExistingProvider */
          :
            return resolveDep(view, def.parent, allowPrivateServices, providerDef.deps[0]);

          case 256
          /* TypeValueProvider */
          :
            return providerDef.value;
        }
      }

      function createClass(view, elDef, allowPrivateServices, ctor, deps) {
        var len = deps.length;

        switch (len) {
          case 0:
            return new ctor();

          case 1:
            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));

          case 2:
            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));

          case 3:
            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));

          default:
            var depValues = [];

            for (var i = 0; i < len; i++) {
              depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));
            }

            return _construct(ctor, depValues);
        }
      }

      function callFactory(view, elDef, allowPrivateServices, factory, deps) {
        var len = deps.length;

        switch (len) {
          case 0:
            return factory();

          case 1:
            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));

          case 2:
            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));

          case 3:
            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));

          default:
            var depValues = [];

            for (var i = 0; i < len; i++) {
              depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));
            }

            return factory.apply(void 0, depValues);
        }
      } // This default value is when checking the hierarchy for a token.
      //
      // It means both:
      // - the token is not provided by the current injector,
      // - only the element injectors should be checked (ie do not check module injectors
      //
      //          mod1
      //         /
      //       el1   mod2
      //         \  /
      //         el2
      //
      // When requesting el2.injector.get(token), we should check in the following order and return the
      // first found value:
      // - el2.injector.get(token, default)
      // - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module
      // - mod2.injector.get(token, default)


      var NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};

      function resolveDep(view, elDef, allowPrivateServices, depDef) {
        var notFoundValue = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : Injector.THROW_IF_NOT_FOUND;

        if (depDef.flags & 8
        /* Value */
        ) {
          return depDef.token;
        }

        var startView = view;

        if (depDef.flags & 2
        /* Optional */
        ) {
          notFoundValue = null;
        }

        var tokenKey = depDef.tokenKey;

        if (tokenKey === ChangeDetectorRefTokenKey) {
          // directives on the same element as a component should be able to control the change detector
          // of that component as well.
          allowPrivateServices = !!(elDef && elDef.element.componentView);
        }

        if (elDef && depDef.flags & 1
        /* SkipSelf */
        ) {
          allowPrivateServices = false;
          elDef = elDef.parent;
        }

        var searchView = view;

        while (searchView) {
          if (elDef) {
            switch (tokenKey) {
              case Renderer2TokenKey:
                {
                  var compView = findCompView(searchView, elDef, allowPrivateServices);
                  return compView.renderer;
                }

              case ElementRefTokenKey:
                return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);

              case ViewContainerRefTokenKey:
                return asElementData(searchView, elDef.nodeIndex).viewContainer;

              case TemplateRefTokenKey:
                {
                  if (elDef.element.template) {
                    return asElementData(searchView, elDef.nodeIndex).template;
                  }

                  break;
                }

              case ChangeDetectorRefTokenKey:
                {
                  var cdView = findCompView(searchView, elDef, allowPrivateServices);
                  return createChangeDetectorRef(cdView);
                }

              case InjectorRefTokenKey$1:
              case INJECTORRefTokenKey$1:
                return createInjector$1(searchView, elDef);

              default:
                var _providerDef3 = (allowPrivateServices ? elDef.element.allProviders : elDef.element.publicProviders)[tokenKey];

                if (_providerDef3) {
                  var providerData = asProviderData(searchView, _providerDef3.nodeIndex);

                  if (!providerData) {
                    providerData = {
                      instance: _createProviderInstance$1(searchView, _providerDef3)
                    };
                    searchView.nodes[_providerDef3.nodeIndex] = providerData;
                  }

                  return providerData.instance;
                }

            }
          }

          allowPrivateServices = isComponentView(searchView);
          elDef = viewParentEl(searchView);
          searchView = searchView.parent;

          if (depDef.flags & 4
          /* Self */
          ) {
            searchView = null;
          }
        }

        var value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);

        if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
          // Return the value from the root element injector when
          // - it provides it
          //   (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
          // - the module injector should not be checked
          //   (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
          return value;
        }

        return startView.root.ngModule.injector.get(depDef.token, notFoundValue);
      }

      function findCompView(view, elDef, allowPrivateServices) {
        var compView;

        if (allowPrivateServices) {
          compView = asElementData(view, elDef.nodeIndex).componentView;
        } else {
          compView = view;

          while (compView.parent && !isComponentView(compView)) {
            compView = compView.parent;
          }
        }

        return compView;
      }

      function updateProp(view, providerData, def, bindingIdx, value, changes) {
        if (def.flags & 32768
        /* Component */
        ) {
          var compView = asElementData(view, def.parent.nodeIndex).componentView;

          if (compView.def.flags & 2
          /* OnPush */
          ) {
            compView.state |= 8
            /* ChecksEnabled */
            ;
          }
        }

        var binding = def.bindings[bindingIdx];
        var propName = binding.name; // Note: This is still safe with Closure Compiler as
        // the user passed in the property name as an object has to `providerDef`,
        // so Closure Compiler will have renamed the property correctly already.

        providerData.instance[propName] = value;

        if (def.flags & 524288
        /* OnChanges */
        ) {
          changes = changes || {};
          var oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);
          var _binding = def.bindings[bindingIdx];
          changes[_binding.nonMinifiedName] = new SimpleChange(oldValue, value, (view.state & 2
          /* FirstCheck */
          ) !== 0);
        }

        view.oldValues[def.bindingIndex + bindingIdx] = value;
        return changes;
      } // This function calls the ngAfterContentCheck, ngAfterContentInit,
      // ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node
      // flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are
      // called during a pre-order traversal of the view tree (that is calling the
      // parent hooks before the child hooks) these events are sent in using a
      // post-order traversal of the tree (children before parents). This changes the
      // meaning of initIndex in the view state. For ngOnInit, initIndex tracks the
      // expected nodeIndex which a ngOnInit should be called. When sending
      // ngAfterContentInit and ngAfterViewInit it is the expected count of
      // ngAfterContentInit or ngAfterViewInit methods that have been called. This
      // ensure that despite being called recursively or after picking up after an
      // exception, the ngAfterContentInit or ngAfterViewInit will be called on the
      // correct nodes. Consider for example, the following (where E is an element
      // and D is a directive)
      //  Tree:       pre-order index  post-order index
      //    E1        0                6
      //      E2      1                1
      //       D3     2                0
      //      E4      3                5
      //       E5     4                4
      //        E6    5                2
      //        E7    6                3
      // As can be seen, the post-order index has an unclear relationship to the
      // pre-order index (postOrderIndex === preOrderIndex - parentCount +
      // childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit
      // are stable (will be the same for the same view regardless of exceptions or
      // recursion) we just need to count them which will roughly correspond to the
      // post-order index (it skips elements and directives that do not have
      // lifecycle hooks).
      //
      // For example, if an exception is raised in the E6.onAfterViewInit() the
      // initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to
      // initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will
      // not have their ngAfterViewInit() called but, starting with E7, the rest of
      // the view will begin getting ngAfterViewInit() called until a check and
      // pass is complete.
      //
      // This algorthim also handles recursion. Consider if E4's ngAfterViewInit()
      // indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected
      // initIndex is set to 6, the recusive checkAndUpdateView() starts walk again.
      // D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1.
      // When the recursion returns the initIndex will be 7 so E1 is skipped as it
      // has already been called in the recursively called checkAnUpdateView().


      function callLifecycleHooksChildrenFirst(view, lifecycles) {
        if (!(view.def.nodeFlags & lifecycles)) {
          return;
        }

        var nodes = view.def.nodes;
        var initIndex = 0;

        for (var i = 0; i < nodes.length; i++) {
          var nodeDef = nodes[i];
          var parent = nodeDef.parent;

          if (!parent && nodeDef.flags & lifecycles) {
            // matching root node (e.g. a pipe)
            callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);
          }

          if ((nodeDef.childFlags & lifecycles) === 0) {
            // no child matches one of the lifecycles
            i += nodeDef.childCount;
          }

          while (parent && parent.flags & 1
          /* TypeElement */
          && i === parent.nodeIndex + parent.childCount) {
            // last child of an element
            if (parent.directChildFlags & lifecycles) {
              initIndex = callElementProvidersLifecycles(view, parent, lifecycles, initIndex);
            }

            parent = parent.parent;
          }
        }
      }

      function callElementProvidersLifecycles(view, elDef, lifecycles, initIndex) {
        for (var i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {
          var nodeDef = view.def.nodes[i];

          if (nodeDef.flags & lifecycles) {
            callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);
          } // only visit direct children


          i += nodeDef.childCount;
        }

        return initIndex;
      }

      function callProviderLifecycles(view, index, lifecycles, initIndex) {
        var providerData = asProviderData(view, index);

        if (!providerData) {
          return;
        }

        var provider = providerData.instance;

        if (!provider) {
          return;
        }

        Services.setCurrentNode(view, index);

        if (lifecycles & 1048576
        /* AfterContentInit */
        && shouldCallLifecycleInitHook(view, 512
        /* InitState_CallingAfterContentInit */
        , initIndex)) {
          provider.ngAfterContentInit();
        }

        if (lifecycles & 2097152
        /* AfterContentChecked */
        ) {
          provider.ngAfterContentChecked();
        }

        if (lifecycles & 4194304
        /* AfterViewInit */
        && shouldCallLifecycleInitHook(view, 768
        /* InitState_CallingAfterViewInit */
        , initIndex)) {
          provider.ngAfterViewInit();
        }

        if (lifecycles & 8388608
        /* AfterViewChecked */
        ) {
          provider.ngAfterViewChecked();
        }

        if (lifecycles & 131072
        /* OnDestroy */
        ) {
          provider.ngOnDestroy();
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ComponentFactoryResolver$1 = /*#__PURE__*/function (_ComponentFactoryReso) {
        _inherits(ComponentFactoryResolver$1, _ComponentFactoryReso);

        var _super229 = _createSuper(ComponentFactoryResolver$1);

        /**
         * @param ngModule The NgModuleRef to which all resolved factories are bound.
         */
        function ComponentFactoryResolver$1(ngModule) {
          var _this480;

          _classCallCheck(this, ComponentFactoryResolver$1);

          _this480 = _super229.call(this);
          _this480.ngModule = ngModule;
          return _this480;
        }

        _createClass2(ComponentFactoryResolver$1, [{
          key: "resolveComponentFactory",
          value: function resolveComponentFactory(component) {
            ngDevMode && assertComponentType(component);
            var componentDef = getComponentDef(component);
            return new ComponentFactory$1(componentDef, this.ngModule);
          }
        }]);

        return ComponentFactoryResolver$1;
      }(ComponentFactoryResolver);

      function toRefArray(map) {
        var array = [];

        for (var nonMinified in map) {
          if (map.hasOwnProperty(nonMinified)) {
            var minified = map[nonMinified];
            array.push({
              propName: minified,
              templateName: nonMinified
            });
          }
        }

        return array;
      }

      function getNamespace$1(elementName) {
        var name = elementName.toLowerCase();
        return name === 'svg' ? SVG_NAMESPACE : name === 'math' ? MATH_ML_NAMESPACE : null;
      }
      /**
       * A change detection scheduler token for {@link RootContext}. This token is the default value used
       * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.
       */


      var SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', {
        providedIn: 'root',
        factory: function factory() {
          return defaultScheduler;
        }
      });

      function createChainedInjector(rootViewInjector, moduleInjector) {
        return {
          get: function get(token, notFoundValue, flags) {
            var value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);

            if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
              // Return the value from the root element injector when
              // - it provides it
              //   (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
              // - the module injector should not be checked
              //   (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
              return value;
            }

            return moduleInjector.get(token, notFoundValue, flags);
          }
        };
      }
      /**
       * Render3 implementation of {@link viewEngine_ComponentFactory}.
       */


      var ComponentFactory$1 = /*#__PURE__*/function (_ComponentFactory3) {
        _inherits(ComponentFactory$1, _ComponentFactory3);

        var _super230 = _createSuper(ComponentFactory$1);

        /**
         * @param componentDef The component definition.
         * @param ngModule The NgModuleRef to which the factory is bound.
         */
        function ComponentFactory$1(componentDef, ngModule) {
          var _this481;

          _classCallCheck(this, ComponentFactory$1);

          _this481 = _super230.call(this);
          _this481.componentDef = componentDef;
          _this481.ngModule = ngModule;
          _this481.componentType = componentDef.type;
          _this481.selector = stringifyCSSSelectorList(componentDef.selectors);
          _this481.ngContentSelectors = componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];
          _this481.isBoundToModule = !!ngModule;
          return _this481;
        }

        _createClass2(ComponentFactory$1, [{
          key: "inputs",
          get: function get() {
            return toRefArray(this.componentDef.inputs);
          }
        }, {
          key: "outputs",
          get: function get() {
            return toRefArray(this.componentDef.outputs);
          }
        }, {
          key: "create",
          value: function create(injector, projectableNodes, rootSelectorOrNode, ngModule) {
            ngModule = ngModule || this.ngModule;
            var rootViewInjector = ngModule ? createChainedInjector(injector, ngModule.injector) : injector;
            var rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3);
            var sanitizer = rootViewInjector.get(Sanitizer, null);
            var hostRenderer = rendererFactory.createRenderer(null, this.componentDef); // Determine a tag name used for creating host elements when this component is created
            // dynamically. Default to 'div' if this component did not specify any tag name in its selector.

            var elementName = this.componentDef.selectors[0][0] || 'div';
            var hostRNode = rootSelectorOrNode ? locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation) : createElementNode(rendererFactory.createRenderer(null, this.componentDef), elementName, getNamespace$1(elementName));
            var rootFlags = this.componentDef.onPush ? 64
            /* Dirty */
            | 512
            /* IsRoot */
            : 16
            /* CheckAlways */
            | 512
            /* IsRoot */
            ;
            var rootContext = createRootContext(); // Create the root view. Uses empty TView and ContentTemplate.

            var rootTView = createTView(0
            /* Root */
            , null, null, 1, 0, null, null, null, null, null);
            var rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector); // rootView is the parent when bootstrapping
            // TODO(misko): it looks like we are entering view here but we don't really need to as
            // `renderView` does that. However as the code is written it is needed because
            // `createRootComponentView` and `createRootComponent` both read global state. Fixing those
            // issues would allow us to drop this.

            enterView(rootLView);
            var component;
            var tElementNode;

            try {
              var componentView = createRootComponentView(hostRNode, this.componentDef, rootLView, rendererFactory, hostRenderer);

              if (hostRNode) {
                if (rootSelectorOrNode) {
                  setUpAttributes(hostRenderer, hostRNode, ['ng-version', VERSION.full]);
                } else {
                  // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`
                  // is not defined), also apply attributes and classes extracted from component selector.
                  // Extract attributes and classes from the first selector only to match VE behavior.
                  var _extractAttrsAndClass = extractAttrsAndClassesFromSelector(this.componentDef.selectors[0]),
                      attrs = _extractAttrsAndClass.attrs,
                      classes = _extractAttrsAndClass.classes;

                  if (attrs) {
                    setUpAttributes(hostRenderer, hostRNode, attrs);
                  }

                  if (classes && classes.length > 0) {
                    writeDirectClass(hostRenderer, hostRNode, classes.join(' '));
                  }
                }
              }

              tElementNode = getTNode(rootTView, HEADER_OFFSET);

              if (projectableNodes !== undefined) {
                var projection = tElementNode.projection = [];

                for (var i = 0; i < this.ngContentSelectors.length; i++) {
                  var nodesforSlot = projectableNodes[i]; // Projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade
                  // case). Here we do normalize passed data structure to be an array of arrays to avoid
                  // complex checks down the line.
                  // We also normalize the length of the passed in projectable nodes (to match the number of
                  // <ng-container> slots defined by a component).

                  projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null);
                }
              } // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and
              // executed here?
              // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref


              component = createRootComponent(componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]);
              renderView(rootTView, rootLView, null);
            } finally {
              leaveView();
            }

            return new ComponentRef$1(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);
          }
        }]);

        return ComponentFactory$1;
      }(ComponentFactory);

      var componentFactoryResolver = new ComponentFactoryResolver$1();
      /**
       * Creates a ComponentFactoryResolver and stores it on the injector. Or, if the
       * ComponentFactoryResolver
       * already exists, retrieves the existing ComponentFactoryResolver.
       *
       * @returns The ComponentFactoryResolver instance to use
       */

      function injectComponentFactoryResolver() {
        return componentFactoryResolver;
      }
      /**
       * Represents an instance of a Component created via a {@link ComponentFactory}.
       *
       * `ComponentRef` provides access to the Component Instance as well other objects related to this
       * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}
       * method.
       *
       */


      var ComponentRef$1 = /*#__PURE__*/function (_ComponentRef2) {
        _inherits(ComponentRef$1, _ComponentRef2);

        var _super231 = _createSuper(ComponentRef$1);

        function ComponentRef$1(componentType, instance, location, _rootLView, _tNode) {
          var _this482;

          _classCallCheck(this, ComponentRef$1);

          _this482 = _super231.call(this);
          _this482.location = location;
          _this482._rootLView = _rootLView;
          _this482._tNode = _tNode;
          _this482.instance = instance;
          _this482.hostView = _this482.changeDetectorRef = new RootViewRef(_rootLView);
          _this482.componentType = componentType;
          return _this482;
        }

        _createClass2(ComponentRef$1, [{
          key: "injector",
          get: function get() {
            return new NodeInjector(this._tNode, this._rootLView);
          }
        }, {
          key: "destroy",
          value: function destroy() {
            this.hostView.destroy();
          }
        }, {
          key: "onDestroy",
          value: function onDestroy(callback) {
            this.hostView.onDestroy(callback);
          }
        }]);

        return ComponentRef$1;
      }(ComponentRef);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Adds decorator, constructor, and property metadata to a given type via static metadata fields
       * on the type.
       *
       * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.
       *
       * Calls to `setClassMetadata` can be marked as pure, resulting in the metadata assignments being
       * tree-shaken away during production builds.
       */


      function setClassMetadata(type, decorators, ctorParameters, propDecorators) {
        return noSideEffects(function () {
          var clazz = type;

          if (decorators !== null) {
            if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) {
              var _clazz$decorators;

              (_clazz$decorators = clazz.decorators).push.apply(_clazz$decorators, _toConsumableArray(decorators));
            } else {
              clazz.decorators = decorators;
            }
          }

          if (ctorParameters !== null) {
            // Rather than merging, clobber the existing parameters. If other projects exist which
            // use tsickle-style annotations and reflect over them in the same way, this could
            // cause issues, but that is vanishingly unlikely.
            clazz.ctorParameters = ctorParameters;
          }

          if (propDecorators !== null) {
            // The property decorator objects are merged as it is possible different fields have
            // different decorator types. Decorators on individual fields are not merged, as it's
            // also incredibly unlikely that a field will be decorated both with an Angular
            // decorator and a non-Angular decorator that's also been downleveled.
            if (clazz.hasOwnProperty('propDecorators') && clazz.propDecorators !== undefined) {
              clazz.propDecorators = Object.assign(Object.assign({}, clazz.propDecorators), propDecorators);
            } else {
              clazz.propDecorators = propDecorators;
            }
          }
        });
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Map of module-id to the corresponding NgModule.
       * - In pre Ivy we track NgModuleFactory,
       * - In post Ivy we track the NgModuleType
       */


      var modules = new Map();
      /**
       * Registers a loaded module. Should only be called from generated NgModuleFactory code.
       * @publicApi
       */

      function registerModuleFactory(id, factory) {
        var existing = modules.get(id);
        assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);
        modules.set(id, factory);
      }

      function assertSameOrNotExisting(id, type, incoming) {
        if (type && type !== incoming) {
          throw new Error("Duplicate module registered for ".concat(id, " - ").concat(stringify(type), " vs ").concat(stringify(type.name)));
        }
      }

      function registerNgModuleType(ngModuleType) {
        var visited = new Set();
        recurse(ngModuleType);

        function recurse(ngModuleType) {
          // The imports array of an NgModule must refer to other NgModules,
          // so an error is thrown if no module definition is available.
          var def = getNgModuleDef(ngModuleType,
          /* throwNotFound */
          true);
          var id = def.id;

          if (id !== null) {
            var existing = modules.get(id);
            assertSameOrNotExisting(id, existing, ngModuleType);
            modules.set(id, ngModuleType);
          }

          var imports = maybeUnwrapFn(def.imports);

          var _iterator59 = _createForOfIteratorHelper(imports),
              _step58;

          try {
            for (_iterator59.s(); !(_step58 = _iterator59.n()).done;) {
              var i = _step58.value;

              if (!visited.has(i)) {
                visited.add(i);
                recurse(i);
              }
            }
          } catch (err) {
            _iterator59.e(err);
          } finally {
            _iterator59.f();
          }
        }
      }

      function clearModulesForTest() {
        modules.clear();
      }

      function getRegisteredNgModuleType(id) {
        return modules.get(id) || autoRegisterModuleById[id];
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var NgModuleRef$1 = /*#__PURE__*/function (_NgModuleRef) {
        _inherits(NgModuleRef$1, _NgModuleRef);

        var _super232 = _createSuper(NgModuleRef$1);

        function NgModuleRef$1(ngModuleType, _parent) {
          var _this483;

          _classCallCheck(this, NgModuleRef$1);

          _this483 = _super232.call(this);
          _this483._parent = _parent; // tslint:disable-next-line:require-internal-with-underscore

          _this483._bootstrapComponents = [];
          _this483.injector = _assertThisInitialized(_this483);
          _this483.destroyCbs = []; // When bootstrapping a module we have a dependency graph that looks like this:
          // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the
          // module being resolved tries to inject the ComponentFactoryResolver, it'll create a
          // circular dependency which will result in a runtime error, because the injector doesn't
          // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves
          // and providing it, rather than letting the injector resolve it.

          _this483.componentFactoryResolver = new ComponentFactoryResolver$1(_assertThisInitialized(_this483));
          var ngModuleDef = getNgModuleDef(ngModuleType);
          ngDevMode && assertDefined(ngModuleDef, "NgModule '".concat(stringify(ngModuleType), "' is not a subtype of 'NgModuleType'."));
          var ngLocaleIdDef = getNgLocaleIdDef(ngModuleType);
          ngLocaleIdDef && setLocaleId(ngLocaleIdDef);
          _this483._bootstrapComponents = maybeUnwrapFn(ngModuleDef.bootstrap);
          _this483._r3Injector = createInjectorWithoutInjectorInstances(ngModuleType, _parent, [{
            provide: NgModuleRef,
            useValue: _assertThisInitialized(_this483)
          }, {
            provide: ComponentFactoryResolver,
            useValue: _this483.componentFactoryResolver
          }], stringify(ngModuleType)); // We need to resolve the injector types separately from the injector creation, because
          // the module might be trying to use this ref in its contructor for DI which will cause a
          // circular error that will eventually error out, because the injector isn't created yet.

          _this483._r3Injector._resolveInjectorDefTypes();

          _this483.instance = _this483.get(ngModuleType);
          return _this483;
        }

        _createClass2(NgModuleRef$1, [{
          key: "get",
          value: function get(token) {
            var notFoundValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Injector.THROW_IF_NOT_FOUND;
            var injectFlags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : InjectFlags.Default;

            if (token === Injector || token === NgModuleRef || token === INJECTOR$1) {
              return this;
            }

            return this._r3Injector.get(token, notFoundValue, injectFlags);
          }
        }, {
          key: "destroy",
          value: function destroy() {
            ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');
            var injector = this._r3Injector;
            !injector.destroyed && injector.destroy();
            this.destroyCbs.forEach(function (fn) {
              return fn();
            });
            this.destroyCbs = null;
          }
        }, {
          key: "onDestroy",
          value: function onDestroy(callback) {
            ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');
            this.destroyCbs.push(callback);
          }
        }]);

        return NgModuleRef$1;
      }(NgModuleRef);

      var NgModuleFactory$1 = /*#__PURE__*/function (_NgModuleFactory) {
        _inherits(NgModuleFactory$1, _NgModuleFactory);

        var _super233 = _createSuper(NgModuleFactory$1);

        function NgModuleFactory$1(moduleType) {
          var _this484;

          _classCallCheck(this, NgModuleFactory$1);

          _this484 = _super233.call(this);
          _this484.moduleType = moduleType;
          var ngModuleDef = getNgModuleDef(moduleType);

          if (ngModuleDef !== null) {
            // Register the NgModule with Angular's module registry. The location (and hence timing) of
            // this call is critical to ensure this works correctly (modules get registered when expected)
            // without bloating bundles (modules are registered when otherwise not referenced).
            //
            // In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has
            // several practical consequences:
            //
            // - If an .ngfactory file is not imported from, the module won't be registered (and can be
            //   tree shaken).
            // - If an .ngfactory file is imported from, the module will be registered even if an instance
            //   is not actually created (via `create` below).
            // - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's
            //   imports,
            //
            // In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are
            // not a required API to use - there are other ways to obtain an NgModuleFactory for a given
            // NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead,
            // the side effect of registration is added here, in the constructor of NgModuleFactory,
            // ensuring no matter how a factory is created, the module is registered correctly.
            //
            // An alternative would be to include the registration side effect inline following the actual
            // NgModule definition. This also has the correct timing, but breaks tree-shaking - modules
            // will be registered and retained even if they're otherwise never referenced.
            registerNgModuleType(moduleType);
          }

          return _this484;
        }

        _createClass2(NgModuleFactory$1, [{
          key: "create",
          value: function create(parentInjector) {
            return new NgModuleRef$1(this.moduleType, parentInjector);
          }
        }]);

        return NgModuleFactory$1;
      }(NgModuleFactory);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Bindings for pure functions are stored after regular bindings.
       *
       * |-------decls------|---------vars---------|                 |----- hostVars (dir1) ------|
       * ------------------------------------------------------------------------------------------
       * | nodes/refs/pipes | bindings | fn slots  | injector | dir1 | host bindings | host slots |
       * ------------------------------------------------------------------------------------------
       *                    ^                      ^
       *      TView.bindingStartIndex      TView.expandoStartIndex
       *
       * Pure function instructions are given an offset from the binding root. Adding the offset to the
       * binding root gives the first index where the bindings are stored. In component views, the binding
       * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +
       * any directive instances + any hostVars in directives evaluated before it.
       *
       * See VIEW_DATA.md for more information about host binding resolution.
       */

      /**
       * If the value hasn't been saved, calls the pure function to store and return the
       * value. If it has been saved, returns the saved value.
       *
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn Function that returns a value
       * @param thisArg Optional calling context of pureFn
       * @returns value
       *
       * @codeGenApi
       */


      function ɵɵpureFunction0(slotOffset, pureFn, thisArg) {
        var bindingIndex = getBindingRoot() + slotOffset;
        var lView = getLView();
        return lView[bindingIndex] === NO_CHANGE ? updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) : getBinding(lView, bindingIndex);
      }
      /**
       * If the value of the provided exp has changed, calls the pure function to return
       * an updated value. Or if the value has not changed, returns cached value.
       *
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn Function that returns an updated value
       * @param exp Updated expression value
       * @param thisArg Optional calling context of pureFn
       * @returns Updated or cached value
       *
       * @codeGenApi
       */


      function ɵɵpureFunction1(slotOffset, pureFn, exp, thisArg) {
        return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg);
      }
      /**
       * If the value of any provided exp has changed, calls the pure function to return
       * an updated value. Or if no values have changed, returns cached value.
       *
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn
       * @param exp1
       * @param exp2
       * @param thisArg Optional calling context of pureFn
       * @returns Updated or cached value
       *
       * @codeGenApi
       */


      function ɵɵpureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) {
        return pureFunction2Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, thisArg);
      }
      /**
       * If the value of any provided exp has changed, calls the pure function to return
       * an updated value. Or if no values have changed, returns cached value.
       *
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn
       * @param exp1
       * @param exp2
       * @param exp3
       * @param thisArg Optional calling context of pureFn
       * @returns Updated or cached value
       *
       * @codeGenApi
       */


      function ɵɵpureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) {
        return pureFunction3Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, thisArg);
      }
      /**
       * If the value of any provided exp has changed, calls the pure function to return
       * an updated value. Or if no values have changed, returns cached value.
       *
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn
       * @param exp1
       * @param exp2
       * @param exp3
       * @param exp4
       * @param thisArg Optional calling context of pureFn
       * @returns Updated or cached value
       *
       * @codeGenApi
       */


      function ɵɵpureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {
        return pureFunction4Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg);
      }
      /**
       * If the value of any provided exp has changed, calls the pure function to return
       * an updated value. Or if no values have changed, returns cached value.
       *
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn
       * @param exp1
       * @param exp2
       * @param exp3
       * @param exp4
       * @param exp5
       * @param thisArg Optional calling context of pureFn
       * @returns Updated or cached value
       *
       * @codeGenApi
       */


      function ɵɵpureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {
        var bindingIndex = getBindingRoot() + slotOffset;
        var lView = getLView();
        var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);
        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);
      }
      /**
       * If the value of any provided exp has changed, calls the pure function to return
       * an updated value. Or if no values have changed, returns cached value.
       *
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn
       * @param exp1
       * @param exp2
       * @param exp3
       * @param exp4
       * @param exp5
       * @param exp6
       * @param thisArg Optional calling context of pureFn
       * @returns Updated or cached value
       *
       * @codeGenApi
       */


      function ɵɵpureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {
        var bindingIndex = getBindingRoot() + slotOffset;
        var lView = getLView();
        var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);
        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);
      }
      /**
       * If the value of any provided exp has changed, calls the pure function to return
       * an updated value. Or if no values have changed, returns cached value.
       *
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn
       * @param exp1
       * @param exp2
       * @param exp3
       * @param exp4
       * @param exp5
       * @param exp6
       * @param exp7
       * @param thisArg Optional calling context of pureFn
       * @returns Updated or cached value
       *
       * @codeGenApi
       */


      function ɵɵpureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {
        var bindingIndex = getBindingRoot() + slotOffset;
        var lView = getLView();
        var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);
        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);
      }
      /**
       * If the value of any provided exp has changed, calls the pure function to return
       * an updated value. Or if no values have changed, returns cached value.
       *
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn
       * @param exp1
       * @param exp2
       * @param exp3
       * @param exp4
       * @param exp5
       * @param exp6
       * @param exp7
       * @param exp8
       * @param thisArg Optional calling context of pureFn
       * @returns Updated or cached value
       *
       * @codeGenApi
       */


      function ɵɵpureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {
        var bindingIndex = getBindingRoot() + slotOffset;
        var lView = getLView();
        var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);
        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);
      }
      /**
       * pureFunction instruction that can support any number of bindings.
       *
       * If the value of any provided exp has changed, calls the pure function to return
       * an updated value. Or if no values have changed, returns cached value.
       *
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn A pure function that takes binding values and builds an object or array
       * containing those values.
       * @param exps An array of binding values
       * @param thisArg Optional calling context of pureFn
       * @returns Updated or cached value
       *
       * @codeGenApi
       */


      function ɵɵpureFunctionV(slotOffset, pureFn, exps, thisArg) {
        return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg);
      }
      /**
       * Results of a pure function invocation are stored in LView in a dedicated slot that is initialized
       * to NO_CHANGE. In rare situations a pure pipe might throw an exception on the very first
       * invocation and not produce any valid results. In this case LView would keep holding the NO_CHANGE
       * value. The NO_CHANGE is not something that we can use in expressions / bindings thus we convert
       * it to `undefined`.
       */


      function getPureFunctionReturnValue(lView, returnValueIndex) {
        ngDevMode && assertIndexInRange(lView, returnValueIndex);
        var lastReturnValue = lView[returnValueIndex];
        return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue;
      }
      /**
       * If the value of the provided exp has changed, calls the pure function to return
       * an updated value. Or if the value has not changed, returns cached value.
       *
       * @param lView LView in which the function is being executed.
       * @param bindingRoot Binding root index.
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn Function that returns an updated value
       * @param exp Updated expression value
       * @param thisArg Optional calling context of pureFn
       * @returns Updated or cached value
       */


      function pureFunction1Internal(lView, bindingRoot, slotOffset, pureFn, exp, thisArg) {
        var bindingIndex = bindingRoot + slotOffset;
        return bindingUpdated(lView, bindingIndex, exp) ? updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) : getPureFunctionReturnValue(lView, bindingIndex + 1);
      }
      /**
       * If the value of any provided exp has changed, calls the pure function to return
       * an updated value. Or if no values have changed, returns cached value.
       *
       * @param lView LView in which the function is being executed.
       * @param bindingRoot Binding root index.
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn
       * @param exp1
       * @param exp2
       * @param thisArg Optional calling context of pureFn
       * @returns Updated or cached value
       */


      function pureFunction2Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, thisArg) {
        var bindingIndex = bindingRoot + slotOffset;
        return bindingUpdated2(lView, bindingIndex, exp1, exp2) ? updateBinding(lView, bindingIndex + 2, thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) : getPureFunctionReturnValue(lView, bindingIndex + 2);
      }
      /**
       * If the value of any provided exp has changed, calls the pure function to return
       * an updated value. Or if no values have changed, returns cached value.
       *
       * @param lView LView in which the function is being executed.
       * @param bindingRoot Binding root index.
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn
       * @param exp1
       * @param exp2
       * @param exp3
       * @param thisArg Optional calling context of pureFn
       * @returns Updated or cached value
       */


      function pureFunction3Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, thisArg) {
        var bindingIndex = bindingRoot + slotOffset;
        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);
      }
      /**
       * If the value of any provided exp has changed, calls the pure function to return
       * an updated value. Or if no values have changed, returns cached value.
       *
       * @param lView LView in which the function is being executed.
       * @param bindingRoot Binding root index.
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn
       * @param exp1
       * @param exp2
       * @param exp3
       * @param exp4
       * @param thisArg Optional calling context of pureFn
       * @returns Updated or cached value
       *
       */


      function pureFunction4Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {
        var bindingIndex = bindingRoot + slotOffset;
        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);
      }
      /**
       * pureFunction instruction that can support any number of bindings.
       *
       * If the value of any provided exp has changed, calls the pure function to return
       * an updated value. Or if no values have changed, returns cached value.
       *
       * @param lView LView in which the function is being executed.
       * @param bindingRoot Binding root index.
       * @param slotOffset the offset from binding root to the reserved slot
       * @param pureFn A pure function that takes binding values and builds an object or array
       * containing those values.
       * @param exps An array of binding values
       * @param thisArg Optional calling context of pureFn
       * @returns Updated or cached value
       */


      function pureFunctionVInternal(lView, bindingRoot, slotOffset, pureFn, exps, thisArg) {
        var bindingIndex = bindingRoot + slotOffset;
        var different = false;

        for (var i = 0; i < exps.length; i++) {
          bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);
        }

        return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) : getPureFunctionReturnValue(lView, bindingIndex);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Create a pipe.
       *
       * @param index Pipe index where the pipe will be stored.
       * @param pipeName The name of the pipe
       * @returns T the instance of the pipe.
       *
       * @codeGenApi
       */


      function ɵɵpipe(index, pipeName) {
        var tView = getTView();
        var pipeDef;
        var adjustedIndex = index + HEADER_OFFSET;

        if (tView.firstCreatePass) {
          pipeDef = getPipeDef$1(pipeName, tView.pipeRegistry);
          tView.data[adjustedIndex] = pipeDef;

          if (pipeDef.onDestroy) {
            (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);
          }
        } else {
          pipeDef = tView.data[adjustedIndex];
        }

        var pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));
        var previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject);

        try {
          // DI for pipes is supposed to behave like directives when placed on a component
          // host node, which means that we have to disable access to `viewProviders`.
          var previousIncludeViewProviders = setIncludeViewProviders(false);
          var pipeInstance = pipeFactory();
          setIncludeViewProviders(previousIncludeViewProviders);
          store(tView, getLView(), adjustedIndex, pipeInstance);
          return pipeInstance;
        } finally {
          // we have to restore the injector implementation in finally, just in case the creation of the
          // pipe throws an error.
          setInjectImplementation(previousInjectImplementation);
        }
      }
      /**
       * Searches the pipe registry for a pipe with the given name. If one is found,
       * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.
       *
       * @param name Name of pipe to resolve
       * @param registry Full list of available pipes
       * @returns Matching PipeDef
       */


      function getPipeDef$1(name, registry) {
        if (registry) {
          for (var i = registry.length - 1; i >= 0; i--) {
            var _pipeDef = registry[i];

            if (name === _pipeDef.name) {
              return _pipeDef;
            }
          }
        }

        throw new RuntimeError("302"
        /* PIPE_NOT_FOUND */
        , "The pipe '".concat(name, "' could not be found!"));
      }
      /**
       * Invokes a pipe with 1 arguments.
       *
       * This instruction acts as a guard to {@link PipeTransform#transform} invoking
       * the pipe only when an input to the pipe changes.
       *
       * @param index Pipe index where the pipe was stored on creation.
       * @param slotOffset the offset in the reserved slot space
       * @param v1 1st argument to {@link PipeTransform#transform}.
       *
       * @codeGenApi
       */


      function ɵɵpipeBind1(index, slotOffset, v1) {
        var adjustedIndex = index + HEADER_OFFSET;
        var lView = getLView();
        var pipeInstance = load(lView, adjustedIndex);
        return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction1Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, pipeInstance) : pipeInstance.transform(v1));
      }
      /**
       * Invokes a pipe with 2 arguments.
       *
       * This instruction acts as a guard to {@link PipeTransform#transform} invoking
       * the pipe only when an input to the pipe changes.
       *
       * @param index Pipe index where the pipe was stored on creation.
       * @param slotOffset the offset in the reserved slot space
       * @param v1 1st argument to {@link PipeTransform#transform}.
       * @param v2 2nd argument to {@link PipeTransform#transform}.
       *
       * @codeGenApi
       */


      function ɵɵpipeBind2(index, slotOffset, v1, v2) {
        var adjustedIndex = index + HEADER_OFFSET;
        var lView = getLView();
        var pipeInstance = load(lView, adjustedIndex);
        return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction2Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, pipeInstance) : pipeInstance.transform(v1, v2));
      }
      /**
       * Invokes a pipe with 3 arguments.
       *
       * This instruction acts as a guard to {@link PipeTransform#transform} invoking
       * the pipe only when an input to the pipe changes.
       *
       * @param index Pipe index where the pipe was stored on creation.
       * @param slotOffset the offset in the reserved slot space
       * @param v1 1st argument to {@link PipeTransform#transform}.
       * @param v2 2nd argument to {@link PipeTransform#transform}.
       * @param v3 4rd argument to {@link PipeTransform#transform}.
       *
       * @codeGenApi
       */


      function ɵɵpipeBind3(index, slotOffset, v1, v2, v3) {
        var adjustedIndex = index + HEADER_OFFSET;
        var lView = getLView();
        var pipeInstance = load(lView, adjustedIndex);
        return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction3Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) : pipeInstance.transform(v1, v2, v3));
      }
      /**
       * Invokes a pipe with 4 arguments.
       *
       * This instruction acts as a guard to {@link PipeTransform#transform} invoking
       * the pipe only when an input to the pipe changes.
       *
       * @param index Pipe index where the pipe was stored on creation.
       * @param slotOffset the offset in the reserved slot space
       * @param v1 1st argument to {@link PipeTransform#transform}.
       * @param v2 2nd argument to {@link PipeTransform#transform}.
       * @param v3 3rd argument to {@link PipeTransform#transform}.
       * @param v4 4th argument to {@link PipeTransform#transform}.
       *
       * @codeGenApi
       */


      function ɵɵpipeBind4(index, slotOffset, v1, v2, v3, v4) {
        var adjustedIndex = index + HEADER_OFFSET;
        var lView = getLView();
        var pipeInstance = load(lView, adjustedIndex);
        return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction4Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) : pipeInstance.transform(v1, v2, v3, v4));
      }
      /**
       * Invokes a pipe with variable number of arguments.
       *
       * This instruction acts as a guard to {@link PipeTransform#transform} invoking
       * the pipe only when an input to the pipe changes.
       *
       * @param index Pipe index where the pipe was stored on creation.
       * @param slotOffset the offset in the reserved slot space
       * @param values Array of arguments to pass to {@link PipeTransform#transform} method.
       *
       * @codeGenApi
       */


      function ɵɵpipeBindV(index, slotOffset, values) {
        var adjustedIndex = index + HEADER_OFFSET;
        var lView = getLView();
        var pipeInstance = load(lView, adjustedIndex);
        return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunctionVInternal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, values, pipeInstance) : pipeInstance.transform.apply(pipeInstance, values));
      }

      function isPure(lView, index) {
        return lView[TVIEW].data[index].pure;
      }
      /**
       * Unwrap the output of a pipe transformation.
       * In order to trick change detection into considering that the new value is always different from
       * the old one, the old value is overwritten by NO_CHANGE.
       *
       * @param newValue the pipe transformation output.
       */


      function unwrapValue$1(lView, newValue) {
        if (WrappedValue.isWrapped(newValue)) {
          newValue = WrappedValue.unwrap(newValue); // The NO_CHANGE value needs to be written at the index where the impacted binding value is
          // stored

          var bindingToInvalidateIdx = getBindingIndex();
          lView[bindingToInvalidateIdx] = NO_CHANGE;
        }

        return newValue;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var EventEmitter_ = /*#__PURE__*/function (_rxjs__WEBPACK_IMPORT) {
        _inherits(EventEmitter_, _rxjs__WEBPACK_IMPORT);

        var _super234 = _createSuper(EventEmitter_);

        function EventEmitter_() {
          var _this485;

          var isAsync = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;

          _classCallCheck(this, EventEmitter_);

          _this485 = _super234.call(this);
          _this485.__isAsync = isAsync;
          return _this485;
        }

        _createClass2(EventEmitter_, [{
          key: "emit",
          value: function emit(value) {
            _get(_getPrototypeOf(EventEmitter_.prototype), "next", this).call(this, value);
          }
        }, {
          key: "subscribe",
          value: function subscribe(generatorOrNext, error, complete) {
            var schedulerFn;

            var errorFn = function errorFn(err) {
              return null;
            };

            var completeFn = function completeFn() {
              return null;
            };

            if (generatorOrNext && typeof generatorOrNext === 'object') {
              schedulerFn = this.__isAsync ? function (value) {
                setTimeout(function () {
                  return generatorOrNext.next(value);
                });
              } : function (value) {
                generatorOrNext.next(value);
              };

              if (generatorOrNext.error) {
                errorFn = this.__isAsync ? function (err) {
                  setTimeout(function () {
                    return generatorOrNext.error(err);
                  });
                } : function (err) {
                  generatorOrNext.error(err);
                };
              }

              if (generatorOrNext.complete) {
                completeFn = this.__isAsync ? function () {
                  setTimeout(function () {
                    return generatorOrNext.complete();
                  });
                } : function () {
                  generatorOrNext.complete();
                };
              }
            } else {
              schedulerFn = this.__isAsync ? function (value) {
                setTimeout(function () {
                  return generatorOrNext(value);
                });
              } : function (value) {
                generatorOrNext(value);
              };

              if (error) {
                errorFn = this.__isAsync ? function (err) {
                  setTimeout(function () {
                    return error(err);
                  });
                } : function (err) {
                  error(err);
                };
              }

              if (complete) {
                completeFn = this.__isAsync ? function () {
                  setTimeout(function () {
                    return complete();
                  });
                } : function () {
                  complete();
                };
              }
            }

            var sink = _get(_getPrototypeOf(EventEmitter_.prototype), "subscribe", this).call(this, schedulerFn, errorFn, completeFn);

            if (generatorOrNext instanceof rxjs__WEBPACK_IMPORTED_MODULE_0__["Subscription"]) {
              generatorOrNext.add(sink);
            }

            return sink;
          }
        }]);

        return EventEmitter_;
      }(rxjs__WEBPACK_IMPORTED_MODULE_0__["Subject"]);
      /**
       * @publicApi
       */


      var EventEmitter = EventEmitter_;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      function symbolIterator() {
        return this._results[getSymbolIterator()]();
      }
      /**
       * An unmodifiable list of items that Angular keeps up to date when the state
       * of the application changes.
       *
       * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}
       * provide.
       *
       * Implements an iterable interface, therefore it can be used in both ES6
       * javascript `for (var i of items)` loops as well as in Angular templates with
       * `*ngFor="let i of myList"`.
       *
       * Changes can be observed by subscribing to the changes `Observable`.
       *
       * NOTE: In the future this class will implement an `Observable` interface.
       *
       * @usageNotes
       * ### Example
       * ```typescript
       * @Component({...})
       * class Container {
       *   @ViewChildren(Item) items:QueryList<Item>;
       * }
       * ```
       *
       * @publicApi
       */


      var QueryList = /*#__PURE__*/function () {
        function QueryList() {
          _classCallCheck(this, QueryList);

          this.dirty = true;
          this._results = [];
          this.changes = new EventEmitter();
          this.length = 0; // This function should be declared on the prototype, but doing so there will cause the class
          // declaration to have side-effects and become not tree-shakable. For this reason we do it in
          // the constructor.
          // [getSymbolIterator()](): Iterator<T> { ... }

          var symbol = getSymbolIterator();
          var proto = QueryList.prototype;
          if (!proto[symbol]) proto[symbol] = symbolIterator;
        }
        /**
         * See
         * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
         */


        _createClass2(QueryList, [{
          key: "map",
          value: function map(fn) {
            return this._results.map(fn);
          }
          /**
           * See
           * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
           */

        }, {
          key: "filter",
          value: function filter(fn) {
            return this._results.filter(fn);
          }
          /**
           * See
           * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
           */

        }, {
          key: "find",
          value: function find(fn) {
            return this._results.find(fn);
          }
          /**
           * See
           * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
           */

        }, {
          key: "reduce",
          value: function reduce(fn, init) {
            return this._results.reduce(fn, init);
          }
          /**
           * See
           * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
           */

        }, {
          key: "forEach",
          value: function forEach(fn) {
            this._results.forEach(fn);
          }
          /**
           * See
           * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
           */

        }, {
          key: "some",
          value: function some(fn) {
            return this._results.some(fn);
          }
          /**
           * Returns a copy of the internal results list as an Array.
           */

        }, {
          key: "toArray",
          value: function toArray() {
            return this._results.slice();
          }
        }, {
          key: "toString",
          value: function toString() {
            return this._results.toString();
          }
          /**
           * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that
           * on change detection, it will not notify of changes to the queries, unless a new change
           * occurs.
           *
           * @param resultsTree The query results to store
           */

        }, {
          key: "reset",
          value: function reset(resultsTree) {
            this._results = flatten(resultsTree);
            this.dirty = false;
            this.length = this._results.length;
            this.last = this._results[this.length - 1];
            this.first = this._results[0];
          }
          /**
           * Triggers a change event by emitting on the `changes` {@link EventEmitter}.
           */

        }, {
          key: "notifyOnChanges",
          value: function notifyOnChanges() {
            this.changes.emit(this);
          }
          /** internal */

        }, {
          key: "setDirty",
          value: function setDirty() {
            this.dirty = true;
          }
          /** internal */

        }, {
          key: "destroy",
          value: function destroy() {
            this.changes.complete();
            this.changes.unsubscribe();
          }
        }]);

        return QueryList;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // Note: This hack is necessary so we don't erroneously get a circular dependency
      // failure based on types.


      var unusedValueExportToPlacateAjd$7 = 1;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // Note: This hack is necessary so we don't erroneously get a circular dependency
      // failure based on types.

      var unusedValueExportToPlacateAjd$8 = 1;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$7 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$8;

      var LQuery_ = /*#__PURE__*/function () {
        function LQuery_(queryList) {
          _classCallCheck(this, LQuery_);

          this.queryList = queryList;
          this.matches = null;
        }

        _createClass2(LQuery_, [{
          key: "clone",
          value: function clone() {
            return new LQuery_(this.queryList);
          }
        }, {
          key: "setDirty",
          value: function setDirty() {
            this.queryList.setDirty();
          }
        }]);

        return LQuery_;
      }();

      var LQueries_ = /*#__PURE__*/function () {
        function LQueries_() {
          var queries = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];

          _classCallCheck(this, LQueries_);

          this.queries = queries;
        }

        _createClass2(LQueries_, [{
          key: "createEmbeddedView",
          value: function createEmbeddedView(tView) {
            var tQueries = tView.queries;

            if (tQueries !== null) {
              var noOfInheritedQueries = tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;
              var viewLQueries = []; // An embedded view has queries propagated from a declaration view at the beginning of the
              // TQueries collection and up until a first content query declared in the embedded view. Only
              // propagated LQueries are created at this point (LQuery corresponding to declared content
              // queries will be instantiated from the content query instructions for each directive).

              for (var i = 0; i < noOfInheritedQueries; i++) {
                var tQuery = tQueries.getByIndex(i);
                var parentLQuery = this.queries[tQuery.indexInDeclarationView];
                viewLQueries.push(parentLQuery.clone());
              }

              return new LQueries_(viewLQueries);
            }

            return null;
          }
        }, {
          key: "insertView",
          value: function insertView(tView) {
            this.dirtyQueriesWithMatches(tView);
          }
        }, {
          key: "detachView",
          value: function detachView(tView) {
            this.dirtyQueriesWithMatches(tView);
          }
        }, {
          key: "dirtyQueriesWithMatches",
          value: function dirtyQueriesWithMatches(tView) {
            for (var i = 0; i < this.queries.length; i++) {
              if (getTQuery(tView, i).matches !== null) {
                this.queries[i].setDirty();
              }
            }
          }
        }]);

        return LQueries_;
      }();

      var TQueryMetadata_ = function TQueryMetadata_(predicate, descendants, isStatic) {
        var read = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;

        _classCallCheck(this, TQueryMetadata_);

        this.predicate = predicate;
        this.descendants = descendants;
        this.isStatic = isStatic;
        this.read = read;
      };

      var TQueries_ = /*#__PURE__*/function () {
        function TQueries_() {
          var queries = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];

          _classCallCheck(this, TQueries_);

          this.queries = queries;
        }

        _createClass2(TQueries_, [{
          key: "elementStart",
          value: function elementStart(tView, tNode) {
            ngDevMode && assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');

            for (var i = 0; i < this.queries.length; i++) {
              this.queries[i].elementStart(tView, tNode);
            }
          }
        }, {
          key: "elementEnd",
          value: function elementEnd(tNode) {
            for (var i = 0; i < this.queries.length; i++) {
              this.queries[i].elementEnd(tNode);
            }
          }
        }, {
          key: "embeddedTView",
          value: function embeddedTView(tNode) {
            var queriesForTemplateRef = null;

            for (var i = 0; i < this.length; i++) {
              var childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;
              var tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);

              if (tqueryClone) {
                tqueryClone.indexInDeclarationView = i;

                if (queriesForTemplateRef !== null) {
                  queriesForTemplateRef.push(tqueryClone);
                } else {
                  queriesForTemplateRef = [tqueryClone];
                }
              }
            }

            return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null;
          }
        }, {
          key: "template",
          value: function template(tView, tNode) {
            ngDevMode && assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');

            for (var i = 0; i < this.queries.length; i++) {
              this.queries[i].template(tView, tNode);
            }
          }
        }, {
          key: "getByIndex",
          value: function getByIndex(index) {
            ngDevMode && assertIndexInRange(this.queries, index);
            return this.queries[index];
          }
        }, {
          key: "length",
          get: function get() {
            return this.queries.length;
          }
        }, {
          key: "track",
          value: function track(tquery) {
            this.queries.push(tquery);
          }
        }]);

        return TQueries_;
      }();

      var TQuery_ = /*#__PURE__*/function () {
        function TQuery_(metadata) {
          var nodeIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;

          _classCallCheck(this, TQuery_);

          this.metadata = metadata;
          this.matches = null;
          this.indexInDeclarationView = -1;
          this.crossesNgTemplate = false;
          /**
           * A flag indicating if a given query still applies to nodes it is crossing. We use this flag
           * (alongside with _declarationNodeIndex) to know when to stop applying content queries to
           * elements in a template.
           */

          this._appliesToNextNode = true;
          this._declarationNodeIndex = nodeIndex;
        }

        _createClass2(TQuery_, [{
          key: "elementStart",
          value: function elementStart(tView, tNode) {
            if (this.isApplyingToNode(tNode)) {
              this.matchTNode(tView, tNode);
            }
          }
        }, {
          key: "elementEnd",
          value: function elementEnd(tNode) {
            if (this._declarationNodeIndex === tNode.index) {
              this._appliesToNextNode = false;
            }
          }
        }, {
          key: "template",
          value: function template(tView, tNode) {
            this.elementStart(tView, tNode);
          }
        }, {
          key: "embeddedTView",
          value: function embeddedTView(tNode, childQueryIndex) {
            if (this.isApplyingToNode(tNode)) {
              this.crossesNgTemplate = true; // A marker indicating a `<ng-template>` element (a placeholder for query results from
              // embedded views created based on this `<ng-template>`).

              this.addMatch(-tNode.index, childQueryIndex);
              return new TQuery_(this.metadata);
            }

            return null;
          }
        }, {
          key: "isApplyingToNode",
          value: function isApplyingToNode(tNode) {
            if (this._appliesToNextNode && this.metadata.descendants === false) {
              var declarationNodeIdx = this._declarationNodeIndex;
              var parent = tNode.parent; // Determine if a given TNode is a "direct" child of a node on which a content query was
              // declared (only direct children of query's host node can match with the descendants: false
              // option). There are 3 main use-case / conditions to consider here:
              // - <needs-target><i #target></i></needs-target>: here <i #target> parent node is a query
              // host node;
              // - <needs-target><ng-template [ngIf]="true"><i #target></i></ng-template></needs-target>:
              // here <i #target> parent node is null;
              // - <needs-target><ng-container><i #target></i></ng-container></needs-target>: here we need
              // to go past `<ng-container>` to determine <i #target> parent node (but we shouldn't traverse
              // up past the query's host node!).

              while (parent !== null && parent.type & 8
              /* ElementContainer */
              && parent.index !== declarationNodeIdx) {
                parent = parent.parent;
              }

              return declarationNodeIdx === (parent !== null ? parent.index : -1);
            }

            return this._appliesToNextNode;
          }
        }, {
          key: "matchTNode",
          value: function matchTNode(tView, tNode) {
            var predicate = this.metadata.predicate;

            if (Array.isArray(predicate)) {
              for (var i = 0; i < predicate.length; i++) {
                var name = predicate[i];
                this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name)); // Also try matching the name to a provider since strings can be used as DI tokens too.

                this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false));
              }
            } else {
              if (predicate === TemplateRef) {
                if (tNode.type & 4
                /* Container */
                ) {
                  this.matchTNodeWithReadOption(tView, tNode, -1);
                }
              } else {
                this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false));
              }
            }
          }
        }, {
          key: "matchTNodeWithReadOption",
          value: function matchTNodeWithReadOption(tView, tNode, nodeMatchIdx) {
            if (nodeMatchIdx !== null) {
              var read = this.metadata.read;

              if (read !== null) {
                if (read === ElementRef || read === ViewContainerRef || read === TemplateRef && tNode.type & 4
                /* Container */
                ) {
                  this.addMatch(tNode.index, -2);
                } else {
                  var directiveOrProviderIdx = locateDirectiveOrProvider(tNode, tView, read, false, false);

                  if (directiveOrProviderIdx !== null) {
                    this.addMatch(tNode.index, directiveOrProviderIdx);
                  }
                }
              } else {
                this.addMatch(tNode.index, nodeMatchIdx);
              }
            }
          }
        }, {
          key: "addMatch",
          value: function addMatch(tNodeIdx, matchIdx) {
            if (this.matches === null) {
              this.matches = [tNodeIdx, matchIdx];
            } else {
              this.matches.push(tNodeIdx, matchIdx);
            }
          }
        }]);

        return TQuery_;
      }();
      /**
       * Iterates over local names for a given node and returns directive index
       * (or -1 if a local name points to an element).
       *
       * @param tNode static data of a node to check
       * @param selector selector to match
       * @returns directive index, -1 or null if a selector didn't match any of the local names
       */


      function getIdxOfMatchingSelector(tNode, selector) {
        var localNames = tNode.localNames;

        if (localNames !== null) {
          for (var i = 0; i < localNames.length; i += 2) {
            if (localNames[i] === selector) {
              return localNames[i + 1];
            }
          }
        }

        return null;
      }

      function createResultByTNodeType(tNode, currentView) {
        if (tNode.type & (3
        /* AnyRNode */
        | 8
        /* ElementContainer */
        )) {
          return createElementRef(tNode, currentView);
        } else if (tNode.type & 4
        /* Container */
        ) {
          return createTemplateRef(tNode, currentView);
        }

        return null;
      }

      function createResultForNode(lView, tNode, matchingIdx, read) {
        if (matchingIdx === -1) {
          // if read token and / or strategy is not specified, detect it using appropriate tNode type
          return createResultByTNodeType(tNode, lView);
        } else if (matchingIdx === -2) {
          // read a special token from a node injector
          return createSpecialToken(lView, tNode, read);
        } else {
          // read a token
          return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode);
        }
      }

      function createSpecialToken(lView, tNode, read) {
        if (read === ElementRef) {
          return createElementRef(tNode, lView);
        } else if (read === TemplateRef) {
          return createTemplateRef(tNode, lView);
        } else if (read === ViewContainerRef) {
          ngDevMode && assertTNodeType(tNode, 3
          /* AnyRNode */
          | 12
          /* AnyContainer */
          );
          return createContainerRef(tNode, lView);
        } else {
          ngDevMode && throwError("Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got ".concat(stringify(read), "."));
        }
      }
      /**
       * A helper function that creates query results for a given view. This function is meant to do the
       * processing once and only once for a given view instance (a set of results for a given view
       * doesn't change).
       */


      function materializeViewResults(tView, lView, tQuery, queryIndex) {
        var lQuery = lView[QUERIES].queries[queryIndex];

        if (lQuery.matches === null) {
          var tViewData = tView.data;
          var tQueryMatches = tQuery.matches;
          var result = [];

          for (var i = 0; i < tQueryMatches.length; i += 2) {
            var matchedNodeIdx = tQueryMatches[i];

            if (matchedNodeIdx < 0) {
              // we at the <ng-template> marker which might have results in views created based on this
              // <ng-template> - those results will be in separate views though, so here we just leave
              // null as a placeholder
              result.push(null);
            } else {
              ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);
              var tNode = tViewData[matchedNodeIdx];
              result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));
            }
          }

          lQuery.matches = result;
        }

        return lQuery.matches;
      }
      /**
       * A helper function that collects (already materialized) query results from a tree of views,
       * starting with a provided LView.
       */


      function collectQueryResults(tView, lView, queryIndex, result) {
        var tQuery = tView.queries.getByIndex(queryIndex);
        var tQueryMatches = tQuery.matches;

        if (tQueryMatches !== null) {
          var lViewResults = materializeViewResults(tView, lView, tQuery, queryIndex);

          for (var i = 0; i < tQueryMatches.length; i += 2) {
            var tNodeIdx = tQueryMatches[i];

            if (tNodeIdx > 0) {
              result.push(lViewResults[i / 2]);
            } else {
              var childQueryIndex = tQueryMatches[i + 1];
              var declarationLContainer = lView[-tNodeIdx];
              ngDevMode && assertLContainer(declarationLContainer); // collect matches for views inserted in this container

              for (var _i30 = CONTAINER_HEADER_OFFSET; _i30 < declarationLContainer.length; _i30++) {
                var embeddedLView = declarationLContainer[_i30];

                if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {
                  collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);
                }
              } // collect matches for views created from this declaration container and inserted into
              // different containers


              if (declarationLContainer[MOVED_VIEWS] !== null) {
                var embeddedLViews = declarationLContainer[MOVED_VIEWS];

                for (var _i31 = 0; _i31 < embeddedLViews.length; _i31++) {
                  var _embeddedLView = embeddedLViews[_i31];
                  collectQueryResults(_embeddedLView[TVIEW], _embeddedLView, childQueryIndex, result);
                }
              }
            }
          }
        }

        return result;
      }
      /**
       * Refreshes a query by combining matches from all active views and removing matches from deleted
       * views.
       *
       * @returns `true` if a query got dirty during change detection or if this is a static query
       * resolving in creation mode, `false` otherwise.
       *
       * @codeGenApi
       */


      function ɵɵqueryRefresh(queryList) {
        var lView = getLView();
        var tView = getTView();
        var queryIndex = getCurrentQueryIndex();
        setCurrentQueryIndex(queryIndex + 1);
        var tQuery = getTQuery(tView, queryIndex);

        if (queryList.dirty && isCreationMode(lView) === tQuery.metadata.isStatic) {
          if (tQuery.matches === null) {
            queryList.reset([]);
          } else {
            var result = tQuery.crossesNgTemplate ? collectQueryResults(tView, lView, queryIndex, []) : materializeViewResults(tView, lView, tQuery, queryIndex);
            queryList.reset(result);
            queryList.notifyOnChanges();
          }

          return true;
        }

        return false;
      }
      /**
       * Creates new QueryList for a static view query.
       *
       * @param predicate The type for which the query will search
       * @param descend Whether or not to descend into children
       * @param read What to save in the query
       *
       * @codeGenApi
       */


      function ɵɵstaticViewQuery(predicate, descend, read) {
        viewQueryInternal(getTView(), getLView(), predicate, descend, read, true);
      }
      /**
       * Creates new QueryList, stores the reference in LView and returns QueryList.
       *
       * @param predicate The type for which the query will search
       * @param descend Whether or not to descend into children
       * @param read What to save in the query
       *
       * @codeGenApi
       */


      function ɵɵviewQuery(predicate, descend, read) {
        viewQueryInternal(getTView(), getLView(), predicate, descend, read, false);
      }

      function viewQueryInternal(tView, lView, predicate, descend, read, isStatic) {
        if (tView.firstCreatePass) {
          createTQuery(tView, new TQueryMetadata_(predicate, descend, isStatic, read), -1);

          if (isStatic) {
            tView.staticViewQueries = true;
          }
        }

        createLQuery(tView, lView);
      }
      /**
       * Registers a QueryList, associated with a content query, for later refresh (part of a view
       * refresh).
       *
       * @param directiveIndex Current directive index
       * @param predicate The type for which the query will search
       * @param descend Whether or not to descend into children
       * @param read What to save in the query
       * @returns QueryList<T>
       *
       * @codeGenApi
       */


      function ɵɵcontentQuery(directiveIndex, predicate, descend, read) {
        contentQueryInternal(getTView(), getLView(), predicate, descend, read, false, getCurrentTNode(), directiveIndex);
      }
      /**
       * Registers a QueryList, associated with a static content query, for later refresh
       * (part of a view refresh).
       *
       * @param directiveIndex Current directive index
       * @param predicate The type for which the query will search
       * @param descend Whether or not to descend into children
       * @param read What to save in the query
       * @returns QueryList<T>
       *
       * @codeGenApi
       */


      function ɵɵstaticContentQuery(directiveIndex, predicate, descend, read) {
        contentQueryInternal(getTView(), getLView(), predicate, descend, read, true, getCurrentTNode(), directiveIndex);
      }

      function contentQueryInternal(tView, lView, predicate, descend, read, isStatic, tNode, directiveIndex) {
        if (tView.firstCreatePass) {
          createTQuery(tView, new TQueryMetadata_(predicate, descend, isStatic, read), tNode.index);
          saveContentQueryAndDirectiveIndex(tView, directiveIndex);

          if (isStatic) {
            tView.staticContentQueries = true;
          }
        }

        createLQuery(tView, lView);
      }
      /**
       * Loads a QueryList corresponding to the current view or content query.
       *
       * @codeGenApi
       */


      function ɵɵloadQuery() {
        return loadQueryInternal(getLView(), getCurrentQueryIndex());
      }

      function loadQueryInternal(lView, queryIndex) {
        ngDevMode && assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');
        ngDevMode && assertIndexInRange(lView[QUERIES].queries, queryIndex);
        return lView[QUERIES].queries[queryIndex].queryList;
      }

      function createLQuery(tView, lView) {
        var queryList = new QueryList();
        storeCleanupWithContext(tView, lView, queryList, queryList.destroy);
        if (lView[QUERIES] === null) lView[QUERIES] = new LQueries_();
        lView[QUERIES].queries.push(new LQuery_(queryList));
      }

      function createTQuery(tView, metadata, nodeIndex) {
        if (tView.queries === null) tView.queries = new TQueries_();
        tView.queries.track(new TQuery_(metadata, nodeIndex));
      }

      function saveContentQueryAndDirectiveIndex(tView, directiveIndex) {
        var tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);
        var lastSavedDirectiveIndex = tViewContentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1;

        if (directiveIndex !== lastSavedDirectiveIndex) {
          tViewContentQueries.push(tView.queries.length - 1, directiveIndex);
        }
      }

      function getTQuery(tView, index) {
        ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery');
        return tView.queries.getByIndex(index);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the
       * `<ng-template>` element.
       *
       * @codeGenApi
       */


      function ɵɵtemplateRefExtractor(tNode, lView) {
        return createTemplateRef(tNode, lView);
      }
      /**
       * Returns the appropriate `ChangeDetectorRef` for a pipe.
       *
       * @codeGenApi
       */


      function ɵɵinjectPipeChangeDetectorRef() {
        var flags = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : InjectFlags.Default;
        var value = injectChangeDetectorRef(true);

        if (value == null && !(flags & InjectFlags.Optional)) {
          throwProviderNotFoundError('ChangeDetectorRef');
        } else {
          return value;
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ɵ0$c = function ɵ0$c() {
        return {
          'ɵɵattribute': ɵɵattribute,
          'ɵɵattributeInterpolate1': ɵɵattributeInterpolate1,
          'ɵɵattributeInterpolate2': ɵɵattributeInterpolate2,
          'ɵɵattributeInterpolate3': ɵɵattributeInterpolate3,
          'ɵɵattributeInterpolate4': ɵɵattributeInterpolate4,
          'ɵɵattributeInterpolate5': ɵɵattributeInterpolate5,
          'ɵɵattributeInterpolate6': ɵɵattributeInterpolate6,
          'ɵɵattributeInterpolate7': ɵɵattributeInterpolate7,
          'ɵɵattributeInterpolate8': ɵɵattributeInterpolate8,
          'ɵɵattributeInterpolateV': ɵɵattributeInterpolateV,
          'ɵɵdefineComponent': ɵɵdefineComponent,
          'ɵɵdefineDirective': ɵɵdefineDirective,
          'ɵɵdefineInjectable': ɵɵdefineInjectable,
          'ɵɵdefineInjector': ɵɵdefineInjector,
          'ɵɵdefineNgModule': ɵɵdefineNgModule,
          'ɵɵdefinePipe': ɵɵdefinePipe,
          'ɵɵdirectiveInject': ɵɵdirectiveInject,
          'ɵɵgetFactoryOf': ɵɵgetFactoryOf,
          'ɵɵgetInheritedFactory': ɵɵgetInheritedFactory,
          'ɵɵinject': ɵɵinject,
          'ɵɵinjectAttribute': ɵɵinjectAttribute,
          'ɵɵinvalidFactory': ɵɵinvalidFactory,
          'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,
          'ɵɵinjectPipeChangeDetectorRef': ɵɵinjectPipeChangeDetectorRef,
          'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,
          'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,
          'ɵɵProvidersFeature': ɵɵProvidersFeature,
          'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,
          'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,
          'ɵɵnextContext': ɵɵnextContext,
          'ɵɵnamespaceHTML': ɵɵnamespaceHTML,
          'ɵɵnamespaceMathML': ɵɵnamespaceMathML,
          'ɵɵnamespaceSVG': ɵɵnamespaceSVG,
          'ɵɵenableBindings': ɵɵenableBindings,
          'ɵɵdisableBindings': ɵɵdisableBindings,
          'ɵɵelementStart': ɵɵelementStart,
          'ɵɵelementEnd': ɵɵelementEnd,
          'ɵɵelement': ɵɵelement,
          'ɵɵelementContainerStart': ɵɵelementContainerStart,
          'ɵɵelementContainerEnd': ɵɵelementContainerEnd,
          'ɵɵelementContainer': ɵɵelementContainer,
          'ɵɵpureFunction0': ɵɵpureFunction0,
          'ɵɵpureFunction1': ɵɵpureFunction1,
          'ɵɵpureFunction2': ɵɵpureFunction2,
          'ɵɵpureFunction3': ɵɵpureFunction3,
          'ɵɵpureFunction4': ɵɵpureFunction4,
          'ɵɵpureFunction5': ɵɵpureFunction5,
          'ɵɵpureFunction6': ɵɵpureFunction6,
          'ɵɵpureFunction7': ɵɵpureFunction7,
          'ɵɵpureFunction8': ɵɵpureFunction8,
          'ɵɵpureFunctionV': ɵɵpureFunctionV,
          'ɵɵgetCurrentView': ɵɵgetCurrentView,
          'ɵɵrestoreView': ɵɵrestoreView,
          'ɵɵlistener': ɵɵlistener,
          'ɵɵprojection': ɵɵprojection,
          'ɵɵsyntheticHostProperty': ɵɵsyntheticHostProperty,
          'ɵɵsyntheticHostListener': ɵɵsyntheticHostListener,
          'ɵɵpipeBind1': ɵɵpipeBind1,
          'ɵɵpipeBind2': ɵɵpipeBind2,
          'ɵɵpipeBind3': ɵɵpipeBind3,
          'ɵɵpipeBind4': ɵɵpipeBind4,
          'ɵɵpipeBindV': ɵɵpipeBindV,
          'ɵɵprojectionDef': ɵɵprojectionDef,
          'ɵɵhostProperty': ɵɵhostProperty,
          'ɵɵproperty': ɵɵproperty,
          'ɵɵpropertyInterpolate': ɵɵpropertyInterpolate,
          'ɵɵpropertyInterpolate1': ɵɵpropertyInterpolate1,
          'ɵɵpropertyInterpolate2': ɵɵpropertyInterpolate2,
          'ɵɵpropertyInterpolate3': ɵɵpropertyInterpolate3,
          'ɵɵpropertyInterpolate4': ɵɵpropertyInterpolate4,
          'ɵɵpropertyInterpolate5': ɵɵpropertyInterpolate5,
          'ɵɵpropertyInterpolate6': ɵɵpropertyInterpolate6,
          'ɵɵpropertyInterpolate7': ɵɵpropertyInterpolate7,
          'ɵɵpropertyInterpolate8': ɵɵpropertyInterpolate8,
          'ɵɵpropertyInterpolateV': ɵɵpropertyInterpolateV,
          'ɵɵpipe': ɵɵpipe,
          'ɵɵqueryRefresh': ɵɵqueryRefresh,
          'ɵɵviewQuery': ɵɵviewQuery,
          'ɵɵstaticViewQuery': ɵɵstaticViewQuery,
          'ɵɵstaticContentQuery': ɵɵstaticContentQuery,
          'ɵɵloadQuery': ɵɵloadQuery,
          'ɵɵcontentQuery': ɵɵcontentQuery,
          'ɵɵreference': ɵɵreference,
          'ɵɵclassMap': ɵɵclassMap,
          'ɵɵclassMapInterpolate1': ɵɵclassMapInterpolate1,
          'ɵɵclassMapInterpolate2': ɵɵclassMapInterpolate2,
          'ɵɵclassMapInterpolate3': ɵɵclassMapInterpolate3,
          'ɵɵclassMapInterpolate4': ɵɵclassMapInterpolate4,
          'ɵɵclassMapInterpolate5': ɵɵclassMapInterpolate5,
          'ɵɵclassMapInterpolate6': ɵɵclassMapInterpolate6,
          'ɵɵclassMapInterpolate7': ɵɵclassMapInterpolate7,
          'ɵɵclassMapInterpolate8': ɵɵclassMapInterpolate8,
          'ɵɵclassMapInterpolateV': ɵɵclassMapInterpolateV,
          'ɵɵstyleMap': ɵɵstyleMap,
          'ɵɵstyleMapInterpolate1': ɵɵstyleMapInterpolate1,
          'ɵɵstyleMapInterpolate2': ɵɵstyleMapInterpolate2,
          'ɵɵstyleMapInterpolate3': ɵɵstyleMapInterpolate3,
          'ɵɵstyleMapInterpolate4': ɵɵstyleMapInterpolate4,
          'ɵɵstyleMapInterpolate5': ɵɵstyleMapInterpolate5,
          'ɵɵstyleMapInterpolate6': ɵɵstyleMapInterpolate6,
          'ɵɵstyleMapInterpolate7': ɵɵstyleMapInterpolate7,
          'ɵɵstyleMapInterpolate8': ɵɵstyleMapInterpolate8,
          'ɵɵstyleMapInterpolateV': ɵɵstyleMapInterpolateV,
          'ɵɵstyleProp': ɵɵstyleProp,
          'ɵɵstylePropInterpolate1': ɵɵstylePropInterpolate1,
          'ɵɵstylePropInterpolate2': ɵɵstylePropInterpolate2,
          'ɵɵstylePropInterpolate3': ɵɵstylePropInterpolate3,
          'ɵɵstylePropInterpolate4': ɵɵstylePropInterpolate4,
          'ɵɵstylePropInterpolate5': ɵɵstylePropInterpolate5,
          'ɵɵstylePropInterpolate6': ɵɵstylePropInterpolate6,
          'ɵɵstylePropInterpolate7': ɵɵstylePropInterpolate7,
          'ɵɵstylePropInterpolate8': ɵɵstylePropInterpolate8,
          'ɵɵstylePropInterpolateV': ɵɵstylePropInterpolateV,
          'ɵɵclassProp': ɵɵclassProp,
          'ɵɵadvance': ɵɵadvance,
          'ɵɵtemplate': ɵɵtemplate,
          'ɵɵtext': ɵɵtext,
          'ɵɵtextInterpolate': ɵɵtextInterpolate,
          'ɵɵtextInterpolate1': ɵɵtextInterpolate1,
          'ɵɵtextInterpolate2': ɵɵtextInterpolate2,
          'ɵɵtextInterpolate3': ɵɵtextInterpolate3,
          'ɵɵtextInterpolate4': ɵɵtextInterpolate4,
          'ɵɵtextInterpolate5': ɵɵtextInterpolate5,
          'ɵɵtextInterpolate6': ɵɵtextInterpolate6,
          'ɵɵtextInterpolate7': ɵɵtextInterpolate7,
          'ɵɵtextInterpolate8': ɵɵtextInterpolate8,
          'ɵɵtextInterpolateV': ɵɵtextInterpolateV,
          'ɵɵi18n': ɵɵi18n,
          'ɵɵi18nAttributes': ɵɵi18nAttributes,
          'ɵɵi18nExp': ɵɵi18nExp,
          'ɵɵi18nStart': ɵɵi18nStart,
          'ɵɵi18nEnd': ɵɵi18nEnd,
          'ɵɵi18nApply': ɵɵi18nApply,
          'ɵɵi18nPostprocess': ɵɵi18nPostprocess,
          'ɵɵresolveWindow': ɵɵresolveWindow,
          'ɵɵresolveDocument': ɵɵresolveDocument,
          'ɵɵresolveBody': ɵɵresolveBody,
          'ɵɵsetComponentScope': ɵɵsetComponentScope,
          'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope,
          'ɵɵsanitizeHtml': ɵɵsanitizeHtml,
          'ɵɵsanitizeStyle': ɵɵsanitizeStyle,
          'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl,
          'ɵɵsanitizeScript': ɵɵsanitizeScript,
          'ɵɵsanitizeUrl': ɵɵsanitizeUrl,
          'ɵɵsanitizeUrlOrResourceUrl': ɵɵsanitizeUrlOrResourceUrl,
          'ɵɵtrustConstantHtml': ɵɵtrustConstantHtml,
          'ɵɵtrustConstantScript': ɵɵtrustConstantScript,
          'ɵɵtrustConstantResourceUrl': ɵɵtrustConstantResourceUrl
        };
      };
      /**
       * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.
       *
       * This should be kept up to date with the public exports of @angular/core.
       */


      var angularCoreEnv = ɵ0$c();
      var jitOptions = null;

      function setJitOptions(options) {
        if (jitOptions !== null) {
          if (options.defaultEncapsulation !== jitOptions.defaultEncapsulation) {
            ngDevMode && console.error('Provided value for `defaultEncapsulation` can not be changed once it has been set.');
            return;
          }

          if (options.preserveWhitespaces !== jitOptions.preserveWhitespaces) {
            ngDevMode && console.error('Provided value for `preserveWhitespaces` can not be changed once it has been set.');
            return;
          }
        }

        jitOptions = options;
      }

      function getJitOptions() {
        return jitOptions;
      }

      function resetJitOptions() {
        jitOptions = null;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var EMPTY_ARRAY$5 = [];
      var moduleQueue = [];
      /**
       * Enqueues moduleDef to be checked later to see if scope can be set on its
       * component declarations.
       */

      function enqueueModuleForDelayedScoping(moduleType, ngModule) {
        moduleQueue.push({
          moduleType: moduleType,
          ngModule: ngModule
        });
      }

      var flushingModuleQueue = false;
      /**
       * Loops over queued module definitions, if a given module definition has all of its
       * declarations resolved, it dequeues that module definition and sets the scope on
       * its declarations.
       */

      function flushModuleScopingQueueAsMuchAsPossible() {
        if (!flushingModuleQueue) {
          flushingModuleQueue = true;

          try {
            for (var i = moduleQueue.length - 1; i >= 0; i--) {
              var _moduleQueue$i = moduleQueue[i],
                  moduleType = _moduleQueue$i.moduleType,
                  ngModule = _moduleQueue$i.ngModule;

              if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) {
                // dequeue
                moduleQueue.splice(i, 1);
                setScopeOnDeclaredComponents(moduleType, ngModule);
              }
            }
          } finally {
            flushingModuleQueue = false;
          }
        }
      }
      /**
       * Returns truthy if a declaration has resolved. If the declaration happens to be
       * an array of declarations, it will recurse to check each declaration in that array
       * (which may also be arrays).
       */


      function isResolvedDeclaration(declaration) {
        if (Array.isArray(declaration)) {
          return declaration.every(isResolvedDeclaration);
        }

        return !!resolveForwardRef(declaration);
      }
      /**
       * Compiles a module in JIT mode.
       *
       * This function automatically gets called when a class has a `@NgModule` decorator.
       */


      function compileNgModule(moduleType) {
        var ngModule = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
        compileNgModuleDefs(moduleType, ngModule); // Because we don't know if all declarations have resolved yet at the moment the
        // NgModule decorator is executing, we're enqueueing the setting of module scope
        // on its declarations to be run at a later time when all declarations for the module,
        // including forward refs, have resolved.

        enqueueModuleForDelayedScoping(moduleType, ngModule);
      }
      /**
       * Compiles and adds the `ɵmod` and `ɵinj` properties to the module class.
       *
       * It's possible to compile a module via this API which will allow duplicate declarations in its
       * root.
       */


      function compileNgModuleDefs(moduleType, ngModule) {
        var allowDuplicateDeclarationsInRoot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
        ngDevMode && assertDefined(moduleType, 'Required value moduleType');
        ngDevMode && assertDefined(ngModule, 'Required value ngModule');
        var declarations = flatten(ngModule.declarations || EMPTY_ARRAY$5);
        var ngModuleDef = null;
        Object.defineProperty(moduleType, NG_MOD_DEF, {
          configurable: true,
          get: function get() {
            if (ngModuleDef === null) {
              if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) {
                // We need to assert this immediately, because allowing it to continue will cause it to
                // go into an infinite loop before we've reached the point where we throw all the errors.
                throw new Error("'".concat(stringifyForError(moduleType), "' module can't import itself"));
              }

              ngModuleDef = getCompilerFacade().compileNgModule(angularCoreEnv, "ng:///".concat(moduleType.name, "/\u0275mod.js"), {
                type: moduleType,
                bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY$5).map(resolveForwardRef),
                declarations: declarations.map(resolveForwardRef),
                imports: flatten(ngModule.imports || EMPTY_ARRAY$5).map(resolveForwardRef).map(expandModuleWithProviders),
                exports: flatten(ngModule.exports || EMPTY_ARRAY$5).map(resolveForwardRef).map(expandModuleWithProviders),
                schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,
                id: ngModule.id || null
              }); // Set `schemas` on ngModuleDef to an empty array in JIT mode to indicate that runtime
              // should verify that there are no unknown elements in a template. In AOT mode, that check
              // happens at compile time and `schemas` information is not present on Component and Module
              // defs after compilation (so the check doesn't happen the second time at runtime).

              if (!ngModuleDef.schemas) {
                ngModuleDef.schemas = [];
              }
            }

            return ngModuleDef;
          }
        });
        var ngInjectorDef = null;
        Object.defineProperty(moduleType, NG_INJ_DEF, {
          get: function get() {
            if (ngInjectorDef === null) {
              ngDevMode && verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);
              var meta = {
                name: moduleType.name,
                type: moduleType,
                deps: reflectDependencies(moduleType),
                providers: ngModule.providers || EMPTY_ARRAY$5,
                imports: [(ngModule.imports || EMPTY_ARRAY$5).map(resolveForwardRef), (ngModule.exports || EMPTY_ARRAY$5).map(resolveForwardRef)]
              };
              ngInjectorDef = getCompilerFacade().compileInjector(angularCoreEnv, "ng:///".concat(moduleType.name, "/\u0275inj.js"), meta);
            }

            return ngInjectorDef;
          },
          // Make the property configurable in dev mode to allow overriding in tests
          configurable: !!ngDevMode
        });
      }

      function verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot, importingModule) {
        if (verifiedNgModule.get(moduleType)) return;
        verifiedNgModule.set(moduleType, true);
        moduleType = resolveForwardRef(moduleType);
        var ngModuleDef;

        if (importingModule) {
          ngModuleDef = getNgModuleDef(moduleType);

          if (!ngModuleDef) {
            throw new Error("Unexpected value '".concat(moduleType.name, "' imported by the module '").concat(importingModule.name, "'. Please add an @NgModule annotation."));
          }
        } else {
          ngModuleDef = getNgModuleDef(moduleType, true);
        }

        var errors = [];
        var declarations = maybeUnwrapFn(ngModuleDef.declarations);
        var imports = maybeUnwrapFn(ngModuleDef.imports);
        flatten(imports).map(unwrapModuleWithProvidersImports).forEach(function (mod) {
          verifySemanticsOfNgModuleImport(mod, moduleType);
          verifySemanticsOfNgModuleDef(mod, false, moduleType);
        });
        var exports = maybeUnwrapFn(ngModuleDef.exports);
        declarations.forEach(verifyDeclarationsHaveDefinitions);
        declarations.forEach(verifyDirectivesHaveSelector);
        var combinedDeclarations = [].concat(_toConsumableArray(declarations.map(resolveForwardRef)), _toConsumableArray(flatten(imports.map(computeCombinedExports)).map(resolveForwardRef)));
        exports.forEach(verifyExportsAreDeclaredOrReExported);
        declarations.forEach(function (decl) {
          return verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot);
        });
        declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);
        var ngModule = getAnnotation(moduleType, 'NgModule');

        if (ngModule) {
          ngModule.imports && flatten(ngModule.imports).map(unwrapModuleWithProvidersImports).forEach(function (mod) {
            verifySemanticsOfNgModuleImport(mod, moduleType);
            verifySemanticsOfNgModuleDef(mod, false, moduleType);
          });
          ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType);
          ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule);
          ngModule.entryComponents && deepForEach(ngModule.entryComponents, verifyComponentIsPartOfNgModule);
        } // Throw Error if any errors were detected.


        if (errors.length) {
          throw new Error(errors.join('\n'));
        } ////////////////////////////////////////////////////////////////////////////////////////////////


        function verifyDeclarationsHaveDefinitions(type) {
          type = resolveForwardRef(type);
          var def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);

          if (!def) {
            errors.push("Unexpected value '".concat(stringifyForError(type), "' declared by the module '").concat(stringifyForError(moduleType), "'. Please add a @Pipe/@Directive/@Component annotation."));
          }
        }

        function verifyDirectivesHaveSelector(type) {
          type = resolveForwardRef(type);
          var def = getDirectiveDef(type);

          if (!getComponentDef(type) && def && def.selectors.length == 0) {
            errors.push("Directive ".concat(stringifyForError(type), " has no selector, please add it!"));
          }
        }

        function verifyExportsAreDeclaredOrReExported(type) {
          type = resolveForwardRef(type);
          var kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' || getPipeDef(type) && 'pipe';

          if (kind) {
            // only checked if we are declared as Component, Directive, or Pipe
            // Modules don't need to be declared or imported.
            if (combinedDeclarations.lastIndexOf(type) === -1) {
              // We are exporting something which we don't explicitly declare or import.
              errors.push("Can't export ".concat(kind, " ").concat(stringifyForError(type), " from ").concat(stringifyForError(moduleType), " as it was neither declared nor imported!"));
            }
          }
        }

        function verifyDeclarationIsUnique(type, suppressErrors) {
          type = resolveForwardRef(type);
          var existingModule = ownerNgModule.get(type);

          if (existingModule && existingModule !== moduleType) {
            if (!suppressErrors) {
              var _modules = [existingModule, moduleType].map(stringifyForError).sort();

              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], "."));
            }
          } else {
            // Mark type as having owner.
            ownerNgModule.set(type, moduleType);
          }
        }

        function verifyComponentIsPartOfNgModule(type) {
          type = resolveForwardRef(type);
          var existingModule = ownerNgModule.get(type);

          if (!existingModule) {
            errors.push("Component ".concat(stringifyForError(type), " is not part of any NgModule or the module has not been imported into your module."));
          }
        }

        function verifyCorrectBootstrapType(type) {
          type = resolveForwardRef(type);

          if (!getComponentDef(type)) {
            errors.push("".concat(stringifyForError(type), " cannot be used as an entry component."));
          }
        }

        function verifyComponentEntryComponentsIsPartOfNgModule(type) {
          type = resolveForwardRef(type);

          if (getComponentDef(type)) {
            // We know we are component
            var component = getAnnotation(type, 'Component');

            if (component && component.entryComponents) {
              deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule);
            }
          }
        }

        function verifySemanticsOfNgModuleImport(type, importingModule) {
          type = resolveForwardRef(type);

          if (getComponentDef(type) || getDirectiveDef(type)) {
            throw new Error("Unexpected directive '".concat(type.name, "' imported by the module '").concat(importingModule.name, "'. Please add an @NgModule annotation."));
          }

          if (getPipeDef(type)) {
            throw new Error("Unexpected pipe '".concat(type.name, "' imported by the module '").concat(importingModule.name, "'. Please add an @NgModule annotation."));
          }
        }
      }

      function unwrapModuleWithProvidersImports(typeOrWithProviders) {
        typeOrWithProviders = resolveForwardRef(typeOrWithProviders);
        return typeOrWithProviders.ngModule || typeOrWithProviders;
      }

      function getAnnotation(type, name) {
        var annotation = null;
        collect(type.__annotations__);
        collect(type.decorators);
        return annotation;

        function collect(annotations) {
          if (annotations) {
            annotations.forEach(readAnnotation);
          }
        }

        function readAnnotation(decorator) {
          if (!annotation) {
            var proto = Object.getPrototypeOf(decorator);

            if (proto.ngMetadataName == name) {
              annotation = decorator;
            } else if (decorator.type) {
              var _proto = Object.getPrototypeOf(decorator.type);

              if (_proto.ngMetadataName == name) {
                annotation = decorator.args[0];
              }
            }
          }
        }
      }
      /**
       * Keep track of compiled components. This is needed because in tests we often want to compile the
       * same component with more than one NgModule. This would cause an error unless we reset which
       * NgModule the component belongs to. We keep the list of compiled components here so that the
       * TestBed can reset it later.
       */


      var ownerNgModule = new Map();
      var verifiedNgModule = new Map();

      function resetCompiledComponents() {
        ownerNgModule = new Map();
        verifiedNgModule = new Map();
        moduleQueue.length = 0;
      }
      /**
       * Computes the combined declarations of explicit declarations, as well as declarations inherited by
       * traversing the exports of imported modules.
       * @param type
       */


      function computeCombinedExports(type) {
        type = resolveForwardRef(type);
        var ngModuleDef = getNgModuleDef(type, true);
        return _toConsumableArray(flatten(maybeUnwrapFn(ngModuleDef.exports).map(function (type) {
          var ngModuleDef = getNgModuleDef(type);

          if (ngModuleDef) {
            verifySemanticsOfNgModuleDef(type, false);
            return computeCombinedExports(type);
          } else {
            return type;
          }
        })));
      }
      /**
       * Some declared components may be compiled asynchronously, and thus may not have their
       * ɵcmp set yet. If this is the case, then a reference to the module is written into
       * the `ngSelectorScope` property of the declared type.
       */


      function setScopeOnDeclaredComponents(moduleType, ngModule) {
        var declarations = flatten(ngModule.declarations || EMPTY_ARRAY$5);
        var transitiveScopes = transitiveScopesFor(moduleType);
        declarations.forEach(function (declaration) {
          if (declaration.hasOwnProperty(NG_COMP_DEF)) {
            // A `ɵcmp` field exists - go ahead and patch the component directly.
            var component = declaration;
            var componentDef = getComponentDef(component);
            patchComponentDefWithScope(componentDef, transitiveScopes);
          } else if (!declaration.hasOwnProperty(NG_DIR_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {
            // Set `ngSelectorScope` for future reference when the component compilation finishes.
            declaration.ngSelectorScope = moduleType;
          }
        });
      }
      /**
       * Patch the definition of a component with directives and pipes from the compilation scope of
       * a given module.
       */


      function patchComponentDefWithScope(componentDef, transitiveScopes) {
        componentDef.directiveDefs = function () {
          return Array.from(transitiveScopes.compilation.directives).map(function (dir) {
            return dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir) : getDirectiveDef(dir);
          }).filter(function (def) {
            return !!def;
          });
        };

        componentDef.pipeDefs = function () {
          return Array.from(transitiveScopes.compilation.pipes).map(function (pipe) {
            return getPipeDef(pipe);
          });
        };

        componentDef.schemas = transitiveScopes.schemas; // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we
        // may face a problem where previously compiled defs available to a given Component/Directive
        // are cached in TView and may become stale (in case any of these defs gets recompiled). In
        // order to avoid this problem, we force fresh TView to be created.

        componentDef.tView = null;
      }
      /**
       * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.
       *
       * This operation is memoized and the result is cached on the module's definition. This function can
       * be called on modules with components that have not fully compiled yet, but the result should not
       * be used until they have.
       *
       * @param moduleType module that transitive scope should be calculated for.
       */


      function transitiveScopesFor(moduleType) {
        if (!isNgModule(moduleType)) {
          throw new Error("".concat(moduleType.name, " does not have a module def (\u0275mod property)"));
        }

        var def = getNgModuleDef(moduleType);

        if (def.transitiveCompileScopes !== null) {
          return def.transitiveCompileScopes;
        }

        var scopes = {
          schemas: def.schemas || null,
          compilation: {
            directives: new Set(),
            pipes: new Set()
          },
          exported: {
            directives: new Set(),
            pipes: new Set()
          }
        };
        maybeUnwrapFn(def.imports).forEach(function (imported) {
          var importedType = imported;

          if (!isNgModule(importedType)) {
            throw new Error("Importing ".concat(importedType.name, " which does not have a \u0275mod property"));
          } // When this module imports another, the imported module's exported directives and pipes are
          // added to the compilation scope of this module.


          var importedScope = transitiveScopesFor(importedType);
          importedScope.exported.directives.forEach(function (entry) {
            return scopes.compilation.directives.add(entry);
          });
          importedScope.exported.pipes.forEach(function (entry) {
            return scopes.compilation.pipes.add(entry);
          });
        });
        maybeUnwrapFn(def.declarations).forEach(function (declared) {
          var declaredWithDefs = declared;

          if (getPipeDef(declaredWithDefs)) {
            scopes.compilation.pipes.add(declared);
          } else {
            // Either declared has a ɵcmp or ɵdir, or it's a component which hasn't
            // had its template compiled yet. In either case, it gets added to the compilation's
            // directives.
            scopes.compilation.directives.add(declared);
          }
        });
        maybeUnwrapFn(def.exports).forEach(function (exported) {
          var exportedType = exported; // Either the type is a module, a pipe, or a component/directive (which may not have a
          // ɵcmp as it might be compiled asynchronously).

          if (isNgModule(exportedType)) {
            // When this module exports another, the exported module's exported directives and pipes are
            // added to both the compilation and exported scopes of this module.
            var exportedScope = transitiveScopesFor(exportedType);
            exportedScope.exported.directives.forEach(function (entry) {
              scopes.compilation.directives.add(entry);
              scopes.exported.directives.add(entry);
            });
            exportedScope.exported.pipes.forEach(function (entry) {
              scopes.compilation.pipes.add(entry);
              scopes.exported.pipes.add(entry);
            });
          } else if (getPipeDef(exportedType)) {
            scopes.exported.pipes.add(exportedType);
          } else {
            scopes.exported.directives.add(exportedType);
          }
        });
        def.transitiveCompileScopes = scopes;
        return scopes;
      }

      function expandModuleWithProviders(value) {
        if (isModuleWithProviders(value)) {
          return value.ngModule;
        }

        return value;
      }

      function isModuleWithProviders(value) {
        return value.ngModule !== undefined;
      }

      function isNgModule(value) {
        return !!getNgModuleDef(value);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Keep track of the compilation depth to avoid reentrancy issues during JIT compilation. This
       * matters in the following scenario:
       *
       * Consider a component 'A' that extends component 'B', both declared in module 'M'. During
       * the compilation of 'A' the definition of 'B' is requested to capture the inheritance chain,
       * potentially triggering compilation of 'B'. If this nested compilation were to trigger
       * `flushModuleScopingQueueAsMuchAsPossible` it may happen that module 'M' is still pending in the
       * queue, resulting in 'A' and 'B' to be patched with the NgModule scope. As the compilation of
       * 'A' is still in progress, this would introduce a circular dependency on its compilation. To avoid
       * this issue, the module scope queue is only flushed for compilations at the depth 0, to ensure
       * all compilations have finished.
       */


      var compilationDepth = 0;
      /**
       * Compile an Angular component according to its decorator metadata, and patch the resulting
       * component def (ɵcmp) onto the component type.
       *
       * Compilation may be asynchronous (due to the need to resolve URLs for the component template or
       * other resources, for example). In the event that compilation is not immediate, `compileComponent`
       * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`
       * until the global queue has been resolved with a call to `resolveComponentResources`.
       */

      function compileComponent(type, metadata) {
        // Initialize ngDevMode. This must be the first statement in compileComponent.
        // See the `initNgDevMode` docstring for more information.
        (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();
        var ngComponentDef = null; // Metadata may have resources which need to be resolved.

        maybeQueueResolutionOfComponentResources(type, metadata); // Note that we're using the same function as `Directive`, because that's only subset of metadata
        // that we need to create the ngFactoryDef. We're avoiding using the component metadata
        // because we'd have to resolve the asynchronous templates.

        addDirectiveFactoryDef(type, metadata);
        Object.defineProperty(type, NG_COMP_DEF, {
          get: function get() {
            if (ngComponentDef === null) {
              var compiler = getCompilerFacade();

              if (componentNeedsResolution(metadata)) {
                var error = ["Component '".concat(type.name, "' is not resolved:")];

                if (metadata.templateUrl) {
                  error.push(" - templateUrl: ".concat(metadata.templateUrl));
                }

                if (metadata.styleUrls && metadata.styleUrls.length) {
                  error.push(" - styleUrls: ".concat(JSON.stringify(metadata.styleUrls)));
                }

                error.push("Did you run and wait for 'resolveComponentResources()'?");
                throw new Error(error.join('\n'));
              } // This const was called `jitOptions` previously but had to be renamed to `options` because
              // of a bug with Terser that caused optimized JIT builds to throw a `ReferenceError`.
              // This bug was investigated in https://github.com/angular/angular-cli/issues/17264.
              // We should not rename it back until https://github.com/terser/terser/issues/615 is fixed.


              var options = getJitOptions();
              var preserveWhitespaces = metadata.preserveWhitespaces;

              if (preserveWhitespaces === undefined) {
                if (options !== null && options.preserveWhitespaces !== undefined) {
                  preserveWhitespaces = options.preserveWhitespaces;
                } else {
                  preserveWhitespaces = false;
                }
              }

              var encapsulation = metadata.encapsulation;

              if (encapsulation === undefined) {
                if (options !== null && options.defaultEncapsulation !== undefined) {
                  encapsulation = options.defaultEncapsulation;
                } else {
                  encapsulation = ViewEncapsulation.Emulated;
                }
              }

              var templateUrl = metadata.templateUrl || "ng:///".concat(type.name, "/template.html");
              var meta = Object.assign(Object.assign({}, directiveMetadata(type, metadata)), {
                typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl),
                template: metadata.template || '',
                preserveWhitespaces: preserveWhitespaces,
                styles: metadata.styles || EMPTY_ARRAY,
                animations: metadata.animations,
                directives: [],
                changeDetection: metadata.changeDetection,
                pipes: new Map(),
                encapsulation: encapsulation,
                interpolation: metadata.interpolation,
                viewProviders: metadata.viewProviders || null
              });
              compilationDepth++;

              try {
                if (meta.usesInheritance) {
                  addDirectiveDefToUndecoratedParents(type);
                }

                ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta);
              } finally {
                // Ensure that the compilation depth is decremented even when the compilation failed.
                compilationDepth--;
              }

              if (compilationDepth === 0) {
                // When NgModule decorator executed, we enqueued the module definition such that
                // it would only dequeue and add itself as module scope to all of its declarations,
                // but only if  if all of its declarations had resolved. This call runs the check
                // to see if any modules that are in the queue can be dequeued and add scope to
                // their declarations.
                flushModuleScopingQueueAsMuchAsPossible();
              } // If component compilation is async, then the @NgModule annotation which declares the
              // component may execute and set an ngSelectorScope property on the component type. This
              // allows the component to patch itself with directiveDefs from the module after it
              // finishes compiling.


              if (hasSelectorScope(type)) {
                var scopes = transitiveScopesFor(type.ngSelectorScope);
                patchComponentDefWithScope(ngComponentDef, scopes);
              }
            }

            return ngComponentDef;
          },
          // Make the property configurable in dev mode to allow overriding in tests
          configurable: !!ngDevMode
        });
      }

      function hasSelectorScope(component) {
        return component.ngSelectorScope !== undefined;
      }
      /**
       * Compile an Angular directive according to its decorator metadata, and patch the resulting
       * directive def onto the component type.
       *
       * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which
       * will resolve when compilation completes and the directive becomes usable.
       */


      function compileDirective(type, directive) {
        var ngDirectiveDef = null;
        addDirectiveFactoryDef(type, directive || {});
        Object.defineProperty(type, NG_DIR_DEF, {
          get: function get() {
            if (ngDirectiveDef === null) {
              // `directive` can be null in the case of abstract directives as a base class
              // that use `@Directive()` with no selector. In that case, pass empty object to the
              // `directiveMetadata` function instead of null.
              var meta = getDirectiveMetadata(type, directive || {});
              ngDirectiveDef = getCompilerFacade().compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata);
            }

            return ngDirectiveDef;
          },
          // Make the property configurable in dev mode to allow overriding in tests
          configurable: !!ngDevMode
        });
      }

      function getDirectiveMetadata(type, metadata) {
        var name = type && type.name;
        var sourceMapUrl = "ng:///".concat(name, "/\u0275dir.js");
        var compiler = getCompilerFacade();
        var facade = directiveMetadata(type, metadata);
        facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);

        if (facade.usesInheritance) {
          addDirectiveDefToUndecoratedParents(type);
        }

        return {
          metadata: facade,
          sourceMapUrl: sourceMapUrl
        };
      }

      function addDirectiveFactoryDef(type, metadata) {
        var ngFactoryDef = null;
        Object.defineProperty(type, NG_FACTORY_DEF, {
          get: function get() {
            if (ngFactoryDef === null) {
              var meta = getDirectiveMetadata(type, metadata);
              var compiler = getCompilerFacade();
              ngFactoryDef = compiler.compileFactory(angularCoreEnv, "ng:///".concat(type.name, "/\u0275fac.js"), Object.assign(Object.assign({}, meta.metadata), {
                injectFn: 'directiveInject',
                target: compiler.R3FactoryTarget.Directive
              }));
            }

            return ngFactoryDef;
          },
          // Make the property configurable in dev mode to allow overriding in tests
          configurable: !!ngDevMode
        });
      }

      function extendsDirectlyFromObject(type) {
        return Object.getPrototypeOf(type.prototype) === Object.prototype;
      }
      /**
       * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a
       * `Component`).
       */


      function directiveMetadata(type, metadata) {
        // Reflect inputs and outputs.
        var reflect = getReflect();
        var propMetadata = reflect.ownPropMetadata(type);
        return {
          name: type.name,
          type: type,
          typeArgumentCount: 0,
          selector: metadata.selector !== undefined ? metadata.selector : null,
          deps: reflectDependencies(type),
          host: metadata.host || EMPTY_OBJ,
          propMetadata: propMetadata,
          inputs: metadata.inputs || EMPTY_ARRAY,
          outputs: metadata.outputs || EMPTY_ARRAY,
          queries: extractQueriesMetadata(type, propMetadata, isContentQuery),
          lifecycle: {
            usesOnChanges: reflect.hasLifecycleHook(type, 'ngOnChanges')
          },
          typeSourceSpan: null,
          usesInheritance: !extendsDirectlyFromObject(type),
          exportAs: extractExportAs(metadata.exportAs),
          providers: metadata.providers || null,
          viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery)
        };
      }
      /**
       * Adds a directive definition to all parent classes of a type that don't have an Angular decorator.
       */


      function addDirectiveDefToUndecoratedParents(type) {
        var objPrototype = Object.prototype;
        var parent = Object.getPrototypeOf(type.prototype).constructor; // Go up the prototype until we hit `Object`.

        while (parent && parent !== objPrototype) {
          // Since inheritance works if the class was annotated already, we only need to add
          // the def if there are no annotations and the def hasn't been created already.
          if (!getDirectiveDef(parent) && !getComponentDef(parent) && shouldAddAbstractDirective(parent)) {
            compileDirective(parent, null);
          }

          parent = Object.getPrototypeOf(parent);
        }
      }

      function convertToR3QueryPredicate(selector) {
        return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);
      }

      function convertToR3QueryMetadata(propertyName, ann) {
        return {
          propertyName: propertyName,
          predicate: convertToR3QueryPredicate(ann.selector),
          descendants: ann.descendants,
          first: ann.first,
          read: ann.read ? ann.read : null,
          "static": !!ann["static"]
        };
      }

      function extractQueriesMetadata(type, propMetadata, isQueryAnn) {
        var queriesMeta = [];

        var _loop7 = function _loop7(field) {
          if (propMetadata.hasOwnProperty(field)) {
            var annotations = propMetadata[field];
            annotations.forEach(function (ann) {
              if (isQueryAnn(ann)) {
                if (!ann.selector) {
                  throw new Error("Can't construct a query for the property \"".concat(field, "\" of ") + "\"".concat(stringifyForError(type), "\" since the query selector wasn't defined."));
                }

                if (annotations.some(isInputAnnotation)) {
                  throw new Error("Cannot combine @Input decorators with query decorators");
                }

                queriesMeta.push(convertToR3QueryMetadata(field, ann));
              }
            });
          }
        };

        for (var field in propMetadata) {
          _loop7(field);
        }

        return queriesMeta;
      }

      function extractExportAs(exportAs) {
        return exportAs === undefined ? null : splitByComma(exportAs);
      }

      function isContentQuery(value) {
        var name = value.ngMetadataName;
        return name === 'ContentChild' || name === 'ContentChildren';
      }

      function isViewQuery(value) {
        var name = value.ngMetadataName;
        return name === 'ViewChild' || name === 'ViewChildren';
      }

      function isInputAnnotation(value) {
        return value.ngMetadataName === 'Input';
      }

      function splitByComma(value) {
        return value.split(',').map(function (piece) {
          return piece.trim();
        });
      }

      var LIFECYCLE_HOOKS = ['ngOnChanges', 'ngOnInit', 'ngOnDestroy', 'ngDoCheck', 'ngAfterViewInit', 'ngAfterViewChecked', 'ngAfterContentInit', 'ngAfterContentChecked'];

      function shouldAddAbstractDirective(type) {
        var reflect = getReflect();

        if (LIFECYCLE_HOOKS.some(function (hookName) {
          return reflect.hasLifecycleHook(type, hookName);
        })) {
          return true;
        }

        var propMetadata = reflect.propMetadata(type);

        for (var field in propMetadata) {
          var annotations = propMetadata[field];

          for (var i = 0; i < annotations.length; i++) {
            var current = annotations[i];
            var metadataName = current.ngMetadataName;

            if (isInputAnnotation(current) || isContentQuery(current) || isViewQuery(current) || metadataName === 'Output' || metadataName === 'HostBinding' || metadataName === 'HostListener') {
              return true;
            }
          }
        }

        return false;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function compilePipe(type, meta) {
        var ngPipeDef = null;
        var ngFactoryDef = null;
        Object.defineProperty(type, NG_FACTORY_DEF, {
          get: function get() {
            if (ngFactoryDef === null) {
              var metadata = getPipeMetadata(type, meta);
              var compiler = getCompilerFacade();
              ngFactoryDef = compiler.compileFactory(angularCoreEnv, "ng:///".concat(metadata.name, "/\u0275fac.js"), Object.assign(Object.assign({}, metadata), {
                injectFn: 'directiveInject',
                target: compiler.R3FactoryTarget.Pipe
              }));
            }

            return ngFactoryDef;
          },
          // Make the property configurable in dev mode to allow overriding in tests
          configurable: !!ngDevMode
        });
        Object.defineProperty(type, NG_PIPE_DEF, {
          get: function get() {
            if (ngPipeDef === null) {
              var metadata = getPipeMetadata(type, meta);
              ngPipeDef = getCompilerFacade().compilePipe(angularCoreEnv, "ng:///".concat(metadata.name, "/\u0275pipe.js"), metadata);
            }

            return ngPipeDef;
          },
          // Make the property configurable in dev mode to allow overriding in tests
          configurable: !!ngDevMode
        });
      }

      function getPipeMetadata(type, meta) {
        return {
          type: type,
          typeArgumentCount: 0,
          name: type.name,
          deps: reflectDependencies(type),
          pipeName: meta.name,
          pure: meta.pure !== undefined ? meta.pure : true
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ɵ0$d = function ɵ0$d() {
        var dir = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
        return dir;
      },
          ɵ1$2 = function ɵ1$2(type, meta) {
        return SWITCH_COMPILE_DIRECTIVE(type, meta);
      };
      /**
       * Type of the Directive metadata.
       *
       * @publicApi
       */


      var Directive = makeDecorator('Directive', ɵ0$d, undefined, undefined, ɵ1$2);

      var ɵ2$1 = function ɵ2$1() {
        var c = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
        return Object.assign({
          changeDetection: ChangeDetectionStrategy.Default
        }, c);
      },
          ɵ3$1 = function ɵ3$1(type, meta) {
        return SWITCH_COMPILE_COMPONENT(type, meta);
      };
      /**
       * Component decorator and metadata.
       *
       * @Annotation
       * @publicApi
       */


      var Component = makeDecorator('Component', ɵ2$1, Directive, undefined, ɵ3$1);

      var ɵ4 = function ɵ4(p) {
        return Object.assign({
          pure: true
        }, p);
      },
          ɵ5 = function ɵ5(type, meta) {
        return SWITCH_COMPILE_PIPE(type, meta);
      };
      /**
       * @Annotation
       * @publicApi
       */


      var Pipe = makeDecorator('Pipe', ɵ4, undefined, undefined, ɵ5);

      var ɵ6 = function ɵ6(bindingPropertyName) {
        return {
          bindingPropertyName: bindingPropertyName
        };
      };
      /**
       * @Annotation
       * @publicApi
       */


      var Input = makePropDecorator('Input', ɵ6);

      var ɵ7 = function ɵ7(bindingPropertyName) {
        return {
          bindingPropertyName: bindingPropertyName
        };
      };
      /**
       * @Annotation
       * @publicApi
       */


      var Output = makePropDecorator('Output', ɵ7);

      var ɵ8 = function ɵ8(hostPropertyName) {
        return {
          hostPropertyName: hostPropertyName
        };
      };
      /**
       * @Annotation
       * @publicApi
       */


      var HostBinding = makePropDecorator('HostBinding', ɵ8);

      var ɵ9 = function ɵ9(eventName, args) {
        return {
          eventName: eventName,
          args: args
        };
      };
      /**
       * Decorator that binds a DOM event to a host listener and supplies configuration metadata.
       * Angular invokes the supplied handler method when the host element emits the specified event,
       * and updates the bound element with the result.
       *
       * If the handler method returns false, applies `preventDefault` on the bound element.
       *
       * @usageNotes
       *
       * The following example declares a directive
       * that attaches a click listener to a button and counts clicks.
       *
       * ```ts
       * @Directive({selector: 'button[counting]'})
       * class CountClicks {
       *   numberOfClicks = 0;
       *
       *   @HostListener('click', ['$event.target'])
       *   onClick(btn) {
       *     console.log('button', btn, 'number of clicks:', this.numberOfClicks++);
       *  }
       * }
       *
       * @Component({
       *   selector: 'app',
       *   template: '<button counting>Increment</button>',
       * })
       * class App {}
       *
       * ```
       *
       * The following example registers another DOM event handler that listens for key-press events.
       * ``` ts
       * import { HostListener, Component } from "@angular/core";
       *
       * @Component({
       *   selector: 'app',
       *   template: `<h1>Hello, you have pressed keys {{counter}} number of times!</h1> Press any key to
       * increment the counter.
       *   <button (click)="resetCounter()">Reset Counter</button>`
       * })
       * class AppComponent {
       *   counter = 0;
       *   @HostListener('window:keydown', ['$event'])
       *   handleKeyDown(event: KeyboardEvent) {
       *     this.counter++;
       *   }
       *   resetCounter() {
       *     this.counter = 0;
       *   }
       * }
       * ```
       *
       * @Annotation
       * @publicApi
       */


      var HostListener = makePropDecorator('HostListener', ɵ9);
      var SWITCH_COMPILE_COMPONENT__POST_R3__ = compileComponent;
      var SWITCH_COMPILE_DIRECTIVE__POST_R3__ = compileDirective;
      var SWITCH_COMPILE_PIPE__POST_R3__ = compilePipe;
      var SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop;
      var SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop;
      var SWITCH_COMPILE_PIPE__PRE_R3__ = noop;
      var SWITCH_COMPILE_COMPONENT = SWITCH_COMPILE_COMPONENT__POST_R3__;
      var SWITCH_COMPILE_DIRECTIVE = SWITCH_COMPILE_DIRECTIVE__POST_R3__;
      var SWITCH_COMPILE_PIPE = SWITCH_COMPILE_PIPE__POST_R3__;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var ɵ0$e = function ɵ0$e(ngModule) {
        return ngModule;
      },
          ɵ1$3 =
      /**
       * Decorator that marks the following class as an NgModule, and supplies
       * configuration metadata for it.
       *
       * * The `declarations` and `entryComponents` options configure the compiler
       * with information about what belongs to the NgModule.
       * * The `providers` options configures the NgModule's injector to provide
       * dependencies the NgModule members.
       * * The `imports` and `exports` options bring in members from other modules, and make
       * this module's members available to others.
       */
      function ɵ1$3(type, meta) {
        return SWITCH_COMPILE_NGMODULE(type, meta);
      };
      /**
       * @Annotation
       * @publicApi
       */


      var NgModule = makeDecorator('NgModule', ɵ0$e, undefined, undefined, ɵ1$3);

      function preR3NgModuleCompile(moduleType, metadata) {
        var imports = metadata && metadata.imports || [];

        if (metadata && metadata.exports) {
          imports = [].concat(_toConsumableArray(imports), [metadata.exports]);
        }

        moduleType.ɵinj = ɵɵdefineInjector({
          factory: convertInjectableProviderToFactory(moduleType, {
            useClass: moduleType
          }),
          providers: metadata && metadata.providers,
          imports: imports
        });
      }

      var SWITCH_COMPILE_NGMODULE__POST_R3__ = compileNgModule;
      var SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;
      var SWITCH_COMPILE_NGMODULE = SWITCH_COMPILE_NGMODULE__POST_R3__;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A [DI token](guide/glossary#di-token "DI token definition") that you can use to provide
       * one or more initialization functions.
       *
       * The provided functions are injected at application startup and executed during
       * app initialization. If any of these functions returns a Promise, initialization
       * does not complete until the Promise is resolved.
       *
       * You can, for example, create a factory function that loads language data
       * or an external configuration, and provide that function to the `APP_INITIALIZER` token.
       * The function is executed during the application bootstrap process,
       * and the needed data is available on startup.
       *
       * @see `ApplicationInitStatus`
       *
       * @publicApi
       */

      var APP_INITIALIZER = new InjectionToken('Application Initializer');
      /**
       * A class that reflects the state of running {@link APP_INITIALIZER} functions.
       *
       * @publicApi
       */

      var ApplicationInitStatus = /*#__PURE__*/function () {
        function ApplicationInitStatus(appInits) {
          var _this486 = this;

          _classCallCheck(this, ApplicationInitStatus);

          this.appInits = appInits;
          this.resolve = noop;
          this.reject = noop;
          this.initialized = false;
          this.done = false;
          this.donePromise = new Promise(function (res, rej) {
            _this486.resolve = res;
            _this486.reject = rej;
          });
        }
        /** @internal */


        _createClass2(ApplicationInitStatus, [{
          key: "runInitializers",
          value: function runInitializers() {
            var _this487 = this;

            if (this.initialized) {
              return;
            }

            var asyncInitPromises = [];

            var complete = function complete() {
              _this487.done = true;

              _this487.resolve();
            };

            if (this.appInits) {
              for (var i = 0; i < this.appInits.length; i++) {
                var initResult = this.appInits[i]();

                if (isPromise(initResult)) {
                  asyncInitPromises.push(initResult);
                }
              }
            }

            Promise.all(asyncInitPromises).then(function () {
              complete();
            })["catch"](function (e) {
              _this487.reject(e);
            });

            if (asyncInitPromises.length === 0) {
              complete();
            }

            this.initialized = true;
          }
        }]);

        return ApplicationInitStatus;
      }();

      ApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) {
        return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8));
      };

      ApplicationInitStatus.ɵprov = ɵɵdefineInjectable({
        token: ApplicationInitStatus,
        factory: ApplicationInitStatus.ɵfac
      });

      ApplicationInitStatus.ctorParameters = function () {
        return [{
          type: Array,
          decorators: [{
            type: Inject,
            args: [APP_INITIALIZER]
          }, {
            type: Optional
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        setClassMetadata(ApplicationInitStatus, [{
          type: Injectable
        }], function () {
          return [{
            type: Array,
            decorators: [{
              type: Inject,
              args: [APP_INITIALIZER]
            }, {
              type: Optional
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A [DI token](guide/glossary#di-token "DI token definition") representing a unique string ID, used
       * primarily for prefixing application attributes and CSS styles when
       * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.
       *
       * BY default, the value is randomly generated and assigned to the application by Angular.
       * To provide a custom ID value, use a DI provider <!-- TODO: provider --> to configure
       * the root {@link Injector} that uses this token.
       *
       * @publicApi
       */


      var APP_ID = new InjectionToken('AppId');

      function _appIdRandomProviderFactory() {
        return "".concat(_randomChar()).concat(_randomChar()).concat(_randomChar());
      }
      /**
       * Providers that generate a random `APP_ID_TOKEN`.
       * @publicApi
       */


      var APP_ID_RANDOM_PROVIDER = {
        provide: APP_ID,
        useFactory: _appIdRandomProviderFactory,
        deps: []
      };

      function _randomChar() {
        return String.fromCharCode(97 + Math.floor(Math.random() * 25));
      }
      /**
       * A function that is executed when a platform is initialized.
       * @publicApi
       */


      var PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer');
      /**
       * A token that indicates an opaque platform ID.
       * @publicApi
       */

      var PLATFORM_ID = new InjectionToken('Platform ID');
      /**
       * A [DI token](guide/glossary#di-token "DI token definition") that provides a set of callbacks to
       * be called for every component that is bootstrapped.
       *
       * Each callback must take a `ComponentRef` instance and return nothing.
       *
       * `(componentRef: ComponentRef) => void`
       *
       * @publicApi
       */

      var APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');
      /**
       * A [DI token](guide/glossary#di-token "DI token definition") that indicates the root directory of
       * the application
       * @publicApi
       */

      var PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var Console = /*#__PURE__*/function () {
        function Console() {
          _classCallCheck(this, Console);
        }

        _createClass2(Console, [{
          key: "log",
          value: function log(message) {
            // tslint:disable-next-line:no-console
            console.log(message);
          } // Note: for reporting errors use `DOM.logError()` as it is platform specific

        }, {
          key: "warn",
          value: function warn(message) {
            // tslint:disable-next-line:no-console
            console.warn(message);
          }
        }]);

        return Console;
      }();

      Console.ɵfac = function Console_Factory(t) {
        return new (t || Console)();
      };

      Console.ɵprov = ɵɵdefineInjectable({
        token: Console,
        factory: Console.ɵfac
      });
      /*@__PURE__*/

      (function () {
        setClassMetadata(Console, [{
          type: Injectable
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Provide this token to set the locale of your application.
       * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
       * DecimalPipe and PercentPipe) and by ICU expressions.
       *
       * See the [i18n guide](guide/i18n#setting-up-locale) for more information.
       *
       * @usageNotes
       * ### Example
       *
       * ```typescript
       * import { LOCALE_ID } from '@angular/core';
       * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
       * import { AppModule } from './app/app.module';
       *
       * platformBrowserDynamic().bootstrapModule(AppModule, {
       *   providers: [{provide: LOCALE_ID, useValue: 'en-US' }]
       * });
       * ```
       *
       * @publicApi
       */


      var LOCALE_ID$1 = new InjectionToken('LocaleId');
      /**
       * Provide this token to set the default currency code your application uses for
       * CurrencyPipe when there is no currency code passed into it. This is only used by
       * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.
       *
       * See the [i18n guide](guide/i18n#setting-up-locale) for more information.
       *
       * <div class="alert is-helpful">
       *
       * **Deprecation notice:**
       *
       * The default currency code is currently always `USD` but this is deprecated from v9.
       *
       * **In v10 the default currency code will be taken from the current locale.**
       *
       * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in
       * your application `NgModule`:
       *
       * ```ts
       * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}
       * ```
       *
       * </div>
       *
       * @usageNotes
       * ### Example
       *
       * ```typescript
       * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
       * import { AppModule } from './app/app.module';
       *
       * platformBrowserDynamic().bootstrapModule(AppModule, {
       *   providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]
       * });
       * ```
       *
       * @publicApi
       */

      var DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode');
      /**
       * Use this token at bootstrap to provide the content of your translation file (`xtb`,
       * `xlf` or `xlf2`) when you want to translate your application in another language.
       *
       * See the [i18n guide](guide/i18n#merge) for more information.
       *
       * @usageNotes
       * ### Example
       *
       * ```typescript
       * import { TRANSLATIONS } from '@angular/core';
       * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
       * import { AppModule } from './app/app.module';
       *
       * // content of your translation file
       * const translations = '....';
       *
       * platformBrowserDynamic().bootstrapModule(AppModule, {
       *   providers: [{provide: TRANSLATIONS, useValue: translations }]
       * });
       * ```
       *
       * @publicApi
       */

      var TRANSLATIONS = new InjectionToken('Translations');
      /**
       * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,
       * `xlf` or `xlf2`.
       *
       * See the [i18n guide](guide/i18n#merge) for more information.
       *
       * @usageNotes
       * ### Example
       *
       * ```typescript
       * import { TRANSLATIONS_FORMAT } from '@angular/core';
       * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
       * import { AppModule } from './app/app.module';
       *
       * platformBrowserDynamic().bootstrapModule(AppModule, {
       *   providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]
       * });
       * ```
       *
       * @publicApi
       */

      var TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');
      /**
       * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
       * that the compiler should use in case of missing translations:
       * - Error: throw if you have missing translations.
       * - Warning (default): show a warning in the console and/or shell.
       * - Ignore: do nothing.
       *
       * See the [i18n guide](guide/i18n#missing-translation) for more information.
       *
       * @usageNotes
       * ### Example
       * ```typescript
       * import { MissingTranslationStrategy } from '@angular/core';
       * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
       * import { AppModule } from './app/app.module';
       *
       * platformBrowserDynamic().bootstrapModule(AppModule, {
       *   missingTranslation: MissingTranslationStrategy.Error
       * });
       * ```
       *
       * @publicApi
       */

      var MissingTranslationStrategy;

      (function (MissingTranslationStrategy) {
        MissingTranslationStrategy[MissingTranslationStrategy["Error"] = 0] = "Error";
        MissingTranslationStrategy[MissingTranslationStrategy["Warning"] = 1] = "Warning";
        MissingTranslationStrategy[MissingTranslationStrategy["Ignore"] = 2] = "Ignore";
      })(MissingTranslationStrategy || (MissingTranslationStrategy = {}));
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var SWITCH_IVY_ENABLED__POST_R3__ = true;
      var SWITCH_IVY_ENABLED__PRE_R3__ = false;
      var ivyEnabled = SWITCH_IVY_ENABLED__POST_R3__;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Combination of NgModuleFactory and ComponentFactorys.
       *
       * @publicApi
       */

      var ModuleWithComponentFactories = function ModuleWithComponentFactories(ngModuleFactory, componentFactories) {
        _classCallCheck(this, ModuleWithComponentFactories);

        this.ngModuleFactory = ngModuleFactory;
        this.componentFactories = componentFactories;
      };

      function _throwError() {
        throw new Error("Runtime compiler is not loaded");
      }

      var Compiler_compileModuleSync__PRE_R3__ = _throwError;

      var Compiler_compileModuleSync__POST_R3__ = function Compiler_compileModuleSync__POST_R3__(moduleType) {
        return new NgModuleFactory$1(moduleType);
      };

      var Compiler_compileModuleSync = Compiler_compileModuleSync__POST_R3__;
      var Compiler_compileModuleAsync__PRE_R3__ = _throwError;

      var Compiler_compileModuleAsync__POST_R3__ = function Compiler_compileModuleAsync__POST_R3__(moduleType) {
        return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType));
      };

      var Compiler_compileModuleAsync = Compiler_compileModuleAsync__POST_R3__;
      var Compiler_compileModuleAndAllComponentsSync__PRE_R3__ = _throwError;

      var Compiler_compileModuleAndAllComponentsSync__POST_R3__ = function Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType) {
        var ngModuleFactory = Compiler_compileModuleSync__POST_R3__(moduleType);
        var moduleDef = getNgModuleDef(moduleType);
        var componentFactories = maybeUnwrapFn(moduleDef.declarations).reduce(function (factories, declaration) {
          var componentDef = getComponentDef(declaration);
          componentDef && factories.push(new ComponentFactory$1(componentDef));
          return factories;
        }, []);
        return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);
      };

      var Compiler_compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync__POST_R3__;
      var Compiler_compileModuleAndAllComponentsAsync__PRE_R3__ = _throwError;

      var Compiler_compileModuleAndAllComponentsAsync__POST_R3__ = function Compiler_compileModuleAndAllComponentsAsync__POST_R3__(moduleType) {
        return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType));
      };

      var Compiler_compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync__POST_R3__;
      /**
       * Low-level service for running the angular compiler during runtime
       * to create {@link ComponentFactory}s, which
       * can later be used to create and render a Component instance.
       *
       * Each `@NgModule` provides an own `Compiler` to its injector,
       * that will use the directives/pipes of the ng module for compilation
       * of components.
       *
       * @publicApi
       */

      var Compiler = /*#__PURE__*/function () {
        function Compiler() {
          _classCallCheck(this, Compiler);

          /**
           * Compiles the given NgModule and all of its components. All templates of the components listed
           * in `entryComponents` have to be inlined.
           */
          this.compileModuleSync = Compiler_compileModuleSync;
          /**
           * Compiles the given NgModule and all of its components
           */

          this.compileModuleAsync = Compiler_compileModuleAsync;
          /**
           * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
           */

          this.compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync;
          /**
           * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
           */

          this.compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync;
        }
        /**
         * Clears all caches.
         */


        _createClass2(Compiler, [{
          key: "clearCache",
          value: function clearCache() {}
          /**
           * Clears the cache for the given component/ngModule.
           */

        }, {
          key: "clearCacheFor",
          value: function clearCacheFor(type) {}
          /**
           * Returns the id for a given NgModule, if one is defined and known to the compiler.
           */

        }, {
          key: "getModuleId",
          value: function getModuleId(moduleType) {
            return undefined;
          }
        }]);

        return Compiler;
      }();

      Compiler.ɵfac = function Compiler_Factory(t) {
        return new (t || Compiler)();
      };

      Compiler.ɵprov = ɵɵdefineInjectable({
        token: Compiler,
        factory: Compiler.ɵfac
      });
      /*@__PURE__*/

      (function () {
        setClassMetadata(Compiler, [{
          type: Injectable
        }], function () {
          return [];
        }, null);
      })();
      /**
       * Token to provide CompilerOptions in the platform injector.
       *
       * @publicApi
       */


      var COMPILER_OPTIONS = new InjectionToken('compilerOptions');
      /**
       * A factory for creating a Compiler
       *
       * @publicApi
       */

      var CompilerFactory = function CompilerFactory() {
        _classCallCheck(this, CompilerFactory);
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var promise = function () {
        return Promise.resolve(0);
      }();

      function scheduleMicroTask(fn) {
        if (typeof Zone === 'undefined') {
          // use promise to schedule microTask instead of use Zone
          promise.then(function () {
            fn && fn.apply(null, null);
          });
        } else {
          Zone.current.scheduleMicroTask('scheduleMicrotask', fn);
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function getNativeRequestAnimationFrame() {
        var nativeRequestAnimationFrame = _global['requestAnimationFrame'];
        var nativeCancelAnimationFrame = _global['cancelAnimationFrame'];

        if (typeof Zone !== 'undefined' && nativeRequestAnimationFrame && nativeCancelAnimationFrame) {
          // use unpatched version of requestAnimationFrame(native delegate) if possible
          // to avoid another Change detection
          var unpatchedRequestAnimationFrame = nativeRequestAnimationFrame[Zone.__symbol__('OriginalDelegate')];

          if (unpatchedRequestAnimationFrame) {
            nativeRequestAnimationFrame = unpatchedRequestAnimationFrame;
          }

          var unpatchedCancelAnimationFrame = nativeCancelAnimationFrame[Zone.__symbol__('OriginalDelegate')];

          if (unpatchedCancelAnimationFrame) {
            nativeCancelAnimationFrame = unpatchedCancelAnimationFrame;
          }
        }

        return {
          nativeRequestAnimationFrame: nativeRequestAnimationFrame,
          nativeCancelAnimationFrame: nativeCancelAnimationFrame
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * An injectable service for executing work inside or outside of the Angular zone.
       *
       * The most common use of this service is to optimize performance when starting a work consisting of
       * one or more asynchronous tasks that don't require UI updates or error handling to be handled by
       * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks
       * can reenter the Angular zone via {@link #run}.
       *
       * <!-- TODO: add/fix links to:
       *   - docs explaining zones and the use of zones in Angular and change-detection
       *   - link to runOutsideAngular/run (throughout this file!)
       *   -->
       *
       * @usageNotes
       * ### Example
       *
       * ```
       * import {Component, NgZone} from '@angular/core';
       * import {NgIf} from '@angular/common';
       *
       * @Component({
       *   selector: 'ng-zone-demo',
       *   template: `
       *     <h2>Demo: NgZone</h2>
       *
       *     <p>Progress: {{progress}}%</p>
       *     <p *ngIf="progress >= 100">Done processing {{label}} of Angular zone!</p>
       *
       *     <button (click)="processWithinAngularZone()">Process within Angular zone</button>
       *     <button (click)="processOutsideOfAngularZone()">Process outside of Angular zone</button>
       *   `,
       * })
       * export class NgZoneDemo {
       *   progress: number = 0;
       *   label: string;
       *
       *   constructor(private _ngZone: NgZone) {}
       *
       *   // Loop inside the Angular zone
       *   // so the UI DOES refresh after each setTimeout cycle
       *   processWithinAngularZone() {
       *     this.label = 'inside';
       *     this.progress = 0;
       *     this._increaseProgress(() => console.log('Inside Done!'));
       *   }
       *
       *   // Loop outside of the Angular zone
       *   // so the UI DOES NOT refresh after each setTimeout cycle
       *   processOutsideOfAngularZone() {
       *     this.label = 'outside';
       *     this.progress = 0;
       *     this._ngZone.runOutsideAngular(() => {
       *       this._increaseProgress(() => {
       *         // reenter the Angular zone and display done
       *         this._ngZone.run(() => { console.log('Outside Done!'); });
       *       });
       *     });
       *   }
       *
       *   _increaseProgress(doneCallback: () => void) {
       *     this.progress += 1;
       *     console.log(`Current progress: ${this.progress}%`);
       *
       *     if (this.progress < 100) {
       *       window.setTimeout(() => this._increaseProgress(doneCallback), 10);
       *     } else {
       *       doneCallback();
       *     }
       *   }
       * }
       * ```
       *
       * @publicApi
       */


      var NgZone = /*#__PURE__*/function () {
        function NgZone(_ref88) {
          var _ref88$enableLongStac = _ref88.enableLongStackTrace,
              enableLongStackTrace = _ref88$enableLongStac === void 0 ? false : _ref88$enableLongStac,
              _ref88$shouldCoalesce = _ref88.shouldCoalesceEventChangeDetection,
              shouldCoalesceEventChangeDetection = _ref88$shouldCoalesce === void 0 ? false : _ref88$shouldCoalesce;

          _classCallCheck(this, NgZone);

          this.hasPendingMacrotasks = false;
          this.hasPendingMicrotasks = false;
          /**
           * Whether there are no outstanding microtasks or macrotasks.
           */

          this.isStable = true;
          /**
           * Notifies when code enters Angular Zone. This gets fired first on VM Turn.
           */

          this.onUnstable = new EventEmitter(false);
          /**
           * Notifies when there is no more microtasks enqueued in the current VM Turn.
           * This is a hint for Angular to do change detection, which may enqueue more microtasks.
           * For this reason this event can fire multiple times per VM Turn.
           */

          this.onMicrotaskEmpty = new EventEmitter(false);
          /**
           * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
           * implies we are about to relinquish VM turn.
           * This event gets called just once.
           */

          this.onStable = new EventEmitter(false);
          /**
           * Notifies that an error has been delivered.
           */

          this.onError = new EventEmitter(false);

          if (typeof Zone == 'undefined') {
            throw new Error("In this configuration Angular requires Zone.js");
          }

          Zone.assertZonePatched();
          var self = this;
          self._nesting = 0;
          self._outer = self._inner = Zone.current;

          if (Zone['TaskTrackingZoneSpec']) {
            self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']());
          }

          if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {
            self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);
          }

          self.shouldCoalesceEventChangeDetection = shouldCoalesceEventChangeDetection;
          self.lastRequestAnimationFrameId = -1;
          self.nativeRequestAnimationFrame = getNativeRequestAnimationFrame().nativeRequestAnimationFrame;
          forkInnerZoneWithAngularBehavior(self);
        }

        _createClass2(NgZone, [{
          key: "run",
          value:
          /**
           * Executes the `fn` function synchronously within the Angular zone and returns value returned by
           * the function.
           *
           * Running functions via `run` allows you to reenter Angular zone from a task that was executed
           * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
           *
           * Any future tasks or microtasks scheduled from within this function will continue executing from
           * within the Angular zone.
           *
           * If a synchronous error happens it will be rethrown and not reported via `onError`.
           */
          function run(fn, applyThis, applyArgs) {
            return this._inner.run(fn, applyThis, applyArgs);
          }
          /**
           * Executes the `fn` function synchronously within the Angular zone as a task and returns value
           * returned by the function.
           *
           * Running functions via `run` allows you to reenter Angular zone from a task that was executed
           * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
           *
           * Any future tasks or microtasks scheduled from within this function will continue executing from
           * within the Angular zone.
           *
           * If a synchronous error happens it will be rethrown and not reported via `onError`.
           */

        }, {
          key: "runTask",
          value: function runTask(fn, applyThis, applyArgs, name) {
            var zone = this._inner;
            var task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);

            try {
              return zone.runTask(task, applyThis, applyArgs);
            } finally {
              zone.cancelTask(task);
            }
          }
          /**
           * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
           * rethrown.
           */

        }, {
          key: "runGuarded",
          value: function runGuarded(fn, applyThis, applyArgs) {
            return this._inner.runGuarded(fn, applyThis, applyArgs);
          }
          /**
           * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
           * the function.
           *
           * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
           * work that
           * doesn't trigger Angular change-detection or is subject to Angular's error handling.
           *
           * Any future tasks or microtasks scheduled from within this function will continue executing from
           * outside of the Angular zone.
           *
           * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
           */

        }, {
          key: "runOutsideAngular",
          value: function runOutsideAngular(fn) {
            return this._outer.run(fn);
          }
        }], [{
          key: "isInAngularZone",
          value: function isInAngularZone() {
            return Zone.current.get('isAngularZone') === true;
          }
        }, {
          key: "assertInAngularZone",
          value: function assertInAngularZone() {
            if (!NgZone.isInAngularZone()) {
              throw new Error('Expected to be in Angular Zone, but it is not!');
            }
          }
        }, {
          key: "assertNotInAngularZone",
          value: function assertNotInAngularZone() {
            if (NgZone.isInAngularZone()) {
              throw new Error('Expected to not be in Angular Zone, but it is!');
            }
          }
        }]);

        return NgZone;
      }();

      var EMPTY_PAYLOAD = {};

      function checkStable(zone) {
        if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {
          try {
            zone._nesting++;
            zone.onMicrotaskEmpty.emit(null);
          } finally {
            zone._nesting--;

            if (!zone.hasPendingMicrotasks) {
              try {
                zone.runOutsideAngular(function () {
                  return zone.onStable.emit(null);
                });
              } finally {
                zone.isStable = true;
              }
            }
          }
        }
      }

      function delayChangeDetectionForEvents(zone) {
        if (zone.lastRequestAnimationFrameId !== -1) {
          return;
        }

        zone.lastRequestAnimationFrameId = zone.nativeRequestAnimationFrame.call(_global, function () {
          // This is a work around for https://github.com/angular/angular/issues/36839.
          // The core issue is that when event coalescing is enabled it is possible for microtasks
          // to get flushed too early (As is the case with `Promise.then`) between the
          // coalescing eventTasks.
          //
          // To workaround this we schedule a "fake" eventTask before we process the
          // coalescing eventTasks. The benefit of this is that the "fake" container eventTask
          //  will prevent the microtasks queue from getting drained in between the coalescing
          // eventTask execution.
          if (!zone.fakeTopEventTask) {
            zone.fakeTopEventTask = Zone.root.scheduleEventTask('fakeTopEventTask', function () {
              zone.lastRequestAnimationFrameId = -1;
              updateMicroTaskStatus(zone);
              checkStable(zone);
            }, undefined, function () {}, function () {});
          }

          zone.fakeTopEventTask.invoke();
        });
        updateMicroTaskStatus(zone);
      }

      function forkInnerZoneWithAngularBehavior(zone) {
        var delayChangeDetectionForEventsDelegate = function delayChangeDetectionForEventsDelegate() {
          delayChangeDetectionForEvents(zone);
        };

        var maybeDelayChangeDetection = !!zone.shouldCoalesceEventChangeDetection && zone.nativeRequestAnimationFrame && delayChangeDetectionForEventsDelegate;
        zone._inner = zone._inner.fork({
          name: 'angular',
          properties: {
            'isAngularZone': true,
            'maybeDelayChangeDetection': maybeDelayChangeDetection
          },
          onInvokeTask: function onInvokeTask(delegate, current, target, task, applyThis, applyArgs) {
            try {
              onEnter(zone);
              return delegate.invokeTask(target, task, applyThis, applyArgs);
            } finally {
              if (maybeDelayChangeDetection && task.type === 'eventTask') {
                maybeDelayChangeDetection();
              }

              onLeave(zone);
            }
          },
          onInvoke: function onInvoke(delegate, current, target, callback, applyThis, applyArgs, source) {
            try {
              onEnter(zone);
              return delegate.invoke(target, callback, applyThis, applyArgs, source);
            } finally {
              onLeave(zone);
            }
          },
          onHasTask: function onHasTask(delegate, current, target, hasTaskState) {
            delegate.hasTask(target, hasTaskState);

            if (current === target) {
              // We are only interested in hasTask events which originate from our zone
              // (A child hasTask event is not interesting to us)
              if (hasTaskState.change == 'microTask') {
                zone._hasPendingMicrotasks = hasTaskState.microTask;
                updateMicroTaskStatus(zone);
                checkStable(zone);
              } else if (hasTaskState.change == 'macroTask') {
                zone.hasPendingMacrotasks = hasTaskState.macroTask;
              }
            }
          },
          onHandleError: function onHandleError(delegate, current, target, error) {
            delegate.handleError(target, error);
            zone.runOutsideAngular(function () {
              return zone.onError.emit(error);
            });
            return false;
          }
        });
      }

      function updateMicroTaskStatus(zone) {
        if (zone._hasPendingMicrotasks || zone.shouldCoalesceEventChangeDetection && zone.lastRequestAnimationFrameId !== -1) {
          zone.hasPendingMicrotasks = true;
        } else {
          zone.hasPendingMicrotasks = false;
        }
      }

      function onEnter(zone) {
        zone._nesting++;

        if (zone.isStable) {
          zone.isStable = false;
          zone.onUnstable.emit(null);
        }
      }

      function onLeave(zone) {
        zone._nesting--;
        checkStable(zone);
      }
      /**
       * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls
       * to framework to perform rendering.
       */


      var NoopNgZone = /*#__PURE__*/function () {
        function NoopNgZone() {
          _classCallCheck(this, NoopNgZone);

          this.hasPendingMicrotasks = false;
          this.hasPendingMacrotasks = false;
          this.isStable = true;
          this.onUnstable = new EventEmitter();
          this.onMicrotaskEmpty = new EventEmitter();
          this.onStable = new EventEmitter();
          this.onError = new EventEmitter();
        }

        _createClass2(NoopNgZone, [{
          key: "run",
          value: function run(fn, applyThis, applyArgs) {
            return fn.apply(applyThis, applyArgs);
          }
        }, {
          key: "runGuarded",
          value: function runGuarded(fn, applyThis, applyArgs) {
            return fn.apply(applyThis, applyArgs);
          }
        }, {
          key: "runOutsideAngular",
          value: function runOutsideAngular(fn) {
            return fn();
          }
        }, {
          key: "runTask",
          value: function runTask(fn, applyThis, applyArgs, name) {
            return fn.apply(applyThis, applyArgs);
          }
        }]);

        return NoopNgZone;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * The Testability service provides testing hooks that can be accessed from
       * the browser and by services such as Protractor. Each bootstrapped Angular
       * application on the page will have an instance of Testability.
       * @publicApi
       */


      var Testability = /*#__PURE__*/function () {
        function Testability(_ngZone) {
          var _this488 = this;

          _classCallCheck(this, Testability);

          this._ngZone = _ngZone;
          this._pendingCount = 0;
          this._isZoneStable = true;
          /**
           * Whether any work was done since the last 'whenStable' callback. This is
           * useful to detect if this could have potentially destabilized another
           * component while it is stabilizing.
           * @internal
           */

          this._didWork = false;
          this._callbacks = [];
          this.taskTrackingZone = null;

          this._watchAngularEvents();

          _ngZone.run(function () {
            _this488.taskTrackingZone = typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');
          });
        }

        _createClass2(Testability, [{
          key: "_watchAngularEvents",
          value: function _watchAngularEvents() {
            var _this489 = this;

            this._ngZone.onUnstable.subscribe({
              next: function next() {
                _this489._didWork = true;
                _this489._isZoneStable = false;
              }
            });

            this._ngZone.runOutsideAngular(function () {
              _this489._ngZone.onStable.subscribe({
                next: function next() {
                  NgZone.assertNotInAngularZone();
                  scheduleMicroTask(function () {
                    _this489._isZoneStable = true;

                    _this489._runCallbacksIfReady();
                  });
                }
              });
            });
          }
          /**
           * Increases the number of pending request
           * @deprecated pending requests are now tracked with zones.
           */

        }, {
          key: "increasePendingRequestCount",
          value: function increasePendingRequestCount() {
            this._pendingCount += 1;
            this._didWork = true;
            return this._pendingCount;
          }
          /**
           * Decreases the number of pending request
           * @deprecated pending requests are now tracked with zones
           */

        }, {
          key: "decreasePendingRequestCount",
          value: function decreasePendingRequestCount() {
            this._pendingCount -= 1;

            if (this._pendingCount < 0) {
              throw new Error('pending async requests below zero');
            }

            this._runCallbacksIfReady();

            return this._pendingCount;
          }
          /**
           * Whether an associated application is stable
           */

        }, {
          key: "isStable",
          value: function isStable() {
            return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;
          }
        }, {
          key: "_runCallbacksIfReady",
          value: function _runCallbacksIfReady() {
            var _this490 = this;

            if (this.isStable()) {
              // Schedules the call backs in a new frame so that it is always async.
              scheduleMicroTask(function () {
                while (_this490._callbacks.length !== 0) {
                  var cb = _this490._callbacks.pop();

                  clearTimeout(cb.timeoutId);
                  cb.doneCb(_this490._didWork);
                }

                _this490._didWork = false;
              });
            } else {
              // Still not stable, send updates.
              var pending = this.getPendingTasks();
              this._callbacks = this._callbacks.filter(function (cb) {
                if (cb.updateCb && cb.updateCb(pending)) {
                  clearTimeout(cb.timeoutId);
                  return false;
                }

                return true;
              });
              this._didWork = true;
            }
          }
        }, {
          key: "getPendingTasks",
          value: function getPendingTasks() {
            if (!this.taskTrackingZone) {
              return [];
            } // Copy the tasks data so that we don't leak tasks.


            return this.taskTrackingZone.macroTasks.map(function (t) {
              return {
                source: t.source,
                // From TaskTrackingZone:
                // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40
                creationLocation: t.creationLocation,
                data: t.data
              };
            });
          }
        }, {
          key: "addCallback",
          value: function addCallback(cb, timeout, updateCb) {
            var _this491 = this;

            var timeoutId = -1;

            if (timeout && timeout > 0) {
              timeoutId = setTimeout(function () {
                _this491._callbacks = _this491._callbacks.filter(function (cb) {
                  return cb.timeoutId !== timeoutId;
                });
                cb(_this491._didWork, _this491.getPendingTasks());
              }, timeout);
            }

            this._callbacks.push({
              doneCb: cb,
              timeoutId: timeoutId,
              updateCb: updateCb
            });
          }
          /**
           * Wait for the application to be stable with a timeout. If the timeout is reached before that
           * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
           *
           * @param doneCb The callback to invoke when Angular is stable or the timeout expires
           *    whichever comes first.
           * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
           *    specified, whenStable() will wait forever.
           * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
           *    pending macrotasks changes. If this callback returns true doneCb will not be invoked
           *    and no further updates will be issued.
           */

        }, {
          key: "whenStable",
          value: function whenStable(doneCb, timeout, updateCb) {
            if (updateCb && !this.taskTrackingZone) {
              throw new Error('Task tracking zone is required when passing an update callback to ' + 'whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');
            } // These arguments are 'Function' above to keep the public API simple.


            this.addCallback(doneCb, timeout, updateCb);

            this._runCallbacksIfReady();
          }
          /**
           * Get the number of pending requests
           * @deprecated pending requests are now tracked with zones
           */

        }, {
          key: "getPendingRequestCount",
          value: function getPendingRequestCount() {
            return this._pendingCount;
          }
          /**
           * Find providers by name
           * @param using The root element to search from
           * @param provider The name of binding variable
           * @param exactMatch Whether using exactMatch
           */

        }, {
          key: "findProviders",
          value: function findProviders(using, provider, exactMatch) {
            // TODO(juliemr): implement.
            return [];
          }
        }]);

        return Testability;
      }();

      Testability.ɵfac = function Testability_Factory(t) {
        return new (t || Testability)(ɵɵinject(NgZone));
      };

      Testability.ɵprov = ɵɵdefineInjectable({
        token: Testability,
        factory: Testability.ɵfac
      });

      Testability.ctorParameters = function () {
        return [{
          type: NgZone
        }];
      };
      /*@__PURE__*/


      (function () {
        setClassMetadata(Testability, [{
          type: Injectable
        }], function () {
          return [{
            type: NgZone
          }];
        }, null);
      })();
      /**
       * A global registry of {@link Testability} instances for specific elements.
       * @publicApi
       */


      var TestabilityRegistry = /*#__PURE__*/function () {
        function TestabilityRegistry() {
          _classCallCheck(this, TestabilityRegistry);

          /** @internal */
          this._applications = new Map();

          _testabilityGetter.addToWindow(this);
        }
        /**
         * Registers an application with a testability hook so that it can be tracked
         * @param token token of application, root element
         * @param testability Testability hook
         */


        _createClass2(TestabilityRegistry, [{
          key: "registerApplication",
          value: function registerApplication(token, testability) {
            this._applications.set(token, testability);
          }
          /**
           * Unregisters an application.
           * @param token token of application, root element
           */

        }, {
          key: "unregisterApplication",
          value: function unregisterApplication(token) {
            this._applications["delete"](token);
          }
          /**
           * Unregisters all applications
           */

        }, {
          key: "unregisterAllApplications",
          value: function unregisterAllApplications() {
            this._applications.clear();
          }
          /**
           * Get a testability hook associated with the application
           * @param elem root element
           */

        }, {
          key: "getTestability",
          value: function getTestability(elem) {
            return this._applications.get(elem) || null;
          }
          /**
           * Get all registered testabilities
           */

        }, {
          key: "getAllTestabilities",
          value: function getAllTestabilities() {
            return Array.from(this._applications.values());
          }
          /**
           * Get all registered applications(root elements)
           */

        }, {
          key: "getAllRootElements",
          value: function getAllRootElements() {
            return Array.from(this._applications.keys());
          }
          /**
           * Find testability of a node in the Tree
           * @param elem node
           * @param findInAncestors whether finding testability in ancestors if testability was not found in
           * current node
           */

        }, {
          key: "findTestabilityInTree",
          value: function findTestabilityInTree(elem) {
            var findInAncestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
            return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);
          }
        }]);

        return TestabilityRegistry;
      }();

      TestabilityRegistry.ɵfac = function TestabilityRegistry_Factory(t) {
        return new (t || TestabilityRegistry)();
      };

      TestabilityRegistry.ɵprov = ɵɵdefineInjectable({
        token: TestabilityRegistry,
        factory: TestabilityRegistry.ɵfac
      });

      TestabilityRegistry.ctorParameters = function () {
        return [];
      };
      /*@__PURE__*/


      (function () {
        setClassMetadata(TestabilityRegistry, [{
          type: Injectable
        }], function () {
          return [];
        }, null);
      })();

      var _NoopGetTestability = /*#__PURE__*/function () {
        function _NoopGetTestability() {
          _classCallCheck(this, _NoopGetTestability);
        }

        _createClass2(_NoopGetTestability, [{
          key: "addToWindow",
          value: function addToWindow(registry) {}
        }, {
          key: "findTestabilityInTree",
          value: function findTestabilityInTree(registry, elem, findInAncestors) {
            return null;
          }
        }]);

        return _NoopGetTestability;
      }();
      /**
       * Set the {@link GetTestability} implementation used by the Angular testing framework.
       * @publicApi
       */


      function setTestabilityGetter(getter) {
        _testabilityGetter = getter;
      }

      var _testabilityGetter = new _NoopGetTestability();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`.
       *
       * For more information on how to run and debug tests with either Ivy or View Engine (legacy),
       * please see [BAZEL.md](./docs/BAZEL.md).
       */


      var _devMode = true;
      var _runModeLocked = false;
      /**
       * Returns whether Angular is in development mode. After called once,
       * the value is locked and won't change any more.
       *
       * By default, this is true, unless a user calls `enableProdMode` before calling this.
       *
       * @publicApi
       */

      function isDevMode() {
        _runModeLocked = true;
        return _devMode;
      }
      /**
       * Disable Angular's development mode, which turns off assertions and other
       * checks within the framework.
       *
       * One important assertion this disables verifies that a change detection pass
       * does not result in additional changes to any bindings (also known as
       * unidirectional data flow).
       *
       * @publicApi
       */


      function enableProdMode() {
        if (_runModeLocked) {
          throw new Error('Cannot enable prod mode after platform setup.');
        } // The below check is there so when ngDevMode is set via terser
        // `global['ngDevMode'] = false;` is also dropped.


        if (typeof ngDevMode === undefined || !!ngDevMode) {
          _global['ngDevMode'] = false;
        }

        _devMode = false;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _platform;

      var compileNgModuleFactory = compileNgModuleFactory__POST_R3__;

      function compileNgModuleFactory__PRE_R3__(injector, options, moduleType) {
        var compilerFactory = injector.get(CompilerFactory);
        var compiler = compilerFactory.createCompiler([options]);
        return compiler.compileModuleAsync(moduleType);
      }

      function compileNgModuleFactory__POST_R3__(injector, options, moduleType) {
        ngDevMode && assertNgModuleType(moduleType);
        var moduleFactory = new NgModuleFactory$1(moduleType); // All of the logic below is irrelevant for AOT-compiled code.

        if (typeof ngJitMode !== 'undefined' && !ngJitMode) {
          return Promise.resolve(moduleFactory);
        }

        var compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options); // Configure the compiler to use the provided options. This call may fail when multiple modules
        // are bootstrapped with incompatible options, as a component can only be compiled according to
        // a single set of options.

        setJitOptions({
          defaultEncapsulation: _lastDefined(compilerOptions.map(function (opts) {
            return opts.defaultEncapsulation;
          })),
          preserveWhitespaces: _lastDefined(compilerOptions.map(function (opts) {
            return opts.preserveWhitespaces;
          }))
        });

        if (isComponentResourceResolutionQueueEmpty()) {
          return Promise.resolve(moduleFactory);
        }

        var compilerProviders = _mergeArrays(compilerOptions.map(function (o) {
          return o.providers;
        })); // In case there are no compiler providers, we just return the module factory as
        // there won't be any resource loader. This can happen with Ivy, because AOT compiled
        // modules can be still passed through "bootstrapModule". In that case we shouldn't
        // unnecessarily require the JIT compiler.


        if (compilerProviders.length === 0) {
          return Promise.resolve(moduleFactory);
        }

        var compiler = getCompilerFacade();
        var compilerInjector = Injector.create({
          providers: compilerProviders
        });
        var resourceLoader = compilerInjector.get(compiler.ResourceLoader); // The resource loader can also return a string while the "resolveComponentResources"
        // always expects a promise. Therefore we need to wrap the returned value in a promise.

        return resolveComponentResources(function (url) {
          return Promise.resolve(resourceLoader.get(url));
        }).then(function () {
          return moduleFactory;
        });
      } // the `window.ng` global utilities are only available in non-VE versions of
      // Angular. The function switch below will make sure that the code is not
      // included into Angular when PRE mode is active.


      function publishDefaultGlobalUtils__PRE_R3__() {}

      function publishDefaultGlobalUtils__POST_R3__() {
        ngDevMode && publishDefaultGlobalUtils();
      }

      var publishDefaultGlobalUtils$1 = publishDefaultGlobalUtils__POST_R3__;
      var isBoundToModule = isBoundToModule__POST_R3__;

      function isBoundToModule__PRE_R3__(cf) {
        return cf instanceof ComponentFactoryBoundToModule;
      }

      function isBoundToModule__POST_R3__(cf) {
        return cf.isBoundToModule;
      }

      var ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');
      /**
       * A token for third-party components that can register themselves with NgProbe.
       *
       * @publicApi
       */

      var NgProbeToken = function NgProbeToken(name, token) {
        _classCallCheck(this, NgProbeToken);

        this.name = name;
        this.token = token;
      };
      /**
       * Creates a platform.
       * Platforms must be created on launch using this function.
       *
       * @publicApi
       */


      function createPlatform(injector) {
        if (_platform && !_platform.destroyed && !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {
          throw new Error('There can be only one platform. Destroy the previous one to create a new one.');
        }

        publishDefaultGlobalUtils$1();
        _platform = injector.get(PlatformRef);
        var inits = injector.get(PLATFORM_INITIALIZER, null);
        if (inits) inits.forEach(function (init) {
          return init();
        });
        return _platform;
      }
      /**
       * Creates a factory for a platform. Can be used to provide or override `Providers` specific to
       * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.
       * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories
       * to build up configurations that might be required by different libraries or parts of the
       * application.
       * @param name Identifies the new platform factory.
       * @param providers A set of dependency providers for platforms created with the new factory.
       *
       * @publicApi
       */


      function createPlatformFactory(parentPlatformFactory, name) {
        var providers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
        var desc = "Platform: ".concat(name);
        var marker = new InjectionToken(desc);
        return function () {
          var extraProviders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
          var platform = getPlatform();

          if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {
            if (parentPlatformFactory) {
              parentPlatformFactory(providers.concat(extraProviders).concat({
                provide: marker,
                useValue: true
              }));
            } else {
              var injectedProviders = providers.concat(extraProviders).concat({
                provide: marker,
                useValue: true
              }, {
                provide: INJECTOR_SCOPE,
                useValue: 'platform'
              });
              createPlatform(Injector.create({
                providers: injectedProviders,
                name: desc
              }));
            }
          }

          return assertPlatform(marker);
        };
      }
      /**
       * Checks that there is currently a platform that contains the given token as a provider.
       *
       * @publicApi
       */


      function assertPlatform(requiredToken) {
        var platform = getPlatform();

        if (!platform) {
          throw new Error('No platform exists!');
        }

        if (!platform.injector.get(requiredToken, null)) {
          throw new Error('A platform with a different configuration has been created. Please destroy it first.');
        }

        return platform;
      }
      /**
       * Destroys the current Angular platform and all Angular applications on the page.
       * Destroys all modules and listeners registered with the platform.
       *
       * @publicApi
       */


      function destroyPlatform() {
        if (_platform && !_platform.destroyed) {
          _platform.destroy();
        }
      }
      /**
       * Returns the current platform.
       *
       * @publicApi
       */


      function getPlatform() {
        return _platform && !_platform.destroyed ? _platform : null;
      }
      /**
       * The Angular platform is the entry point for Angular on a web page.
       * Each page has exactly one platform. Services (such as reflection) which are common
       * to every Angular application running on the page are bound in its scope.
       * A page's platform is initialized implicitly when a platform is created using a platform
       * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.
       *
       * @publicApi
       */


      var PlatformRef = /*#__PURE__*/function () {
        /** @internal */
        function PlatformRef(_injector) {
          _classCallCheck(this, PlatformRef);

          this._injector = _injector;
          this._modules = [];
          this._destroyListeners = [];
          this._destroyed = false;
        }
        /**
         * Creates an instance of an `@NgModule` for the given platform for offline compilation.
         *
         * @usageNotes
         *
         * The following example creates the NgModule for a browser platform.
         *
         * ```typescript
         * my_module.ts:
         *
         * @NgModule({
         *   imports: [BrowserModule]
         * })
         * class MyModule {}
         *
         * main.ts:
         * import {MyModuleNgFactory} from './my_module.ngfactory';
         * import {platformBrowser} from '@angular/platform-browser';
         *
         * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
         * ```
         */


        _createClass2(PlatformRef, [{
          key: "bootstrapModuleFactory",
          value: function bootstrapModuleFactory(moduleFactory, options) {
            var _this492 = this;

            // Note: We need to create the NgZone _before_ we instantiate the module,
            // as instantiating the module creates some providers eagerly.
            // So we create a mini parent injector that just contains the new NgZone and
            // pass that as parent to the NgModuleFactory.
            var ngZoneOption = options ? options.ngZone : undefined;
            var ngZoneEventCoalescing = options && options.ngZoneEventCoalescing || false;
            var ngZone = getNgZone(ngZoneOption, ngZoneEventCoalescing);
            var providers = [{
              provide: NgZone,
              useValue: ngZone
            }]; // Attention: Don't use ApplicationRef.run here,
            // as we want to be sure that all possible constructor calls are inside `ngZone.run`!

            return ngZone.run(function () {
              var ngZoneInjector = Injector.create({
                providers: providers,
                parent: _this492.injector,
                name: moduleFactory.moduleType.name
              });
              var moduleRef = moduleFactory.create(ngZoneInjector);
              var exceptionHandler = moduleRef.injector.get(ErrorHandler, null);

              if (!exceptionHandler) {
                throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');
              }

              ngZone.runOutsideAngular(function () {
                var subscription = ngZone.onError.subscribe({
                  next: function next(error) {
                    exceptionHandler.handleError(error);
                  }
                });
                moduleRef.onDestroy(function () {
                  remove(_this492._modules, moduleRef);
                  subscription.unsubscribe();
                });
              });
              return _callAndReportToErrorHandler(exceptionHandler, ngZone, function () {
                var initStatus = moduleRef.injector.get(ApplicationInitStatus);
                initStatus.runInitializers();
                return initStatus.donePromise.then(function () {
                  if (ivyEnabled) {
                    // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy
                    var localeId = moduleRef.injector.get(LOCALE_ID$1, DEFAULT_LOCALE_ID);
                    setLocaleId(localeId || DEFAULT_LOCALE_ID);
                  }

                  _this492._moduleDoBootstrap(moduleRef);

                  return moduleRef;
                });
              });
            });
          }
          /**
           * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
           *
           * @usageNotes
           * ### Simple Example
           *
           * ```typescript
           * @NgModule({
           *   imports: [BrowserModule]
           * })
           * class MyModule {}
           *
           * let moduleRef = platformBrowser().bootstrapModule(MyModule);
           * ```
           *
           */

        }, {
          key: "bootstrapModule",
          value: function bootstrapModule(moduleType) {
            var _this493 = this;

            var compilerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
            var options = optionsReducer({}, compilerOptions);
            return compileNgModuleFactory(this.injector, options, moduleType).then(function (moduleFactory) {
              return _this493.bootstrapModuleFactory(moduleFactory, options);
            });
          }
        }, {
          key: "_moduleDoBootstrap",
          value: function _moduleDoBootstrap(moduleRef) {
            var appRef = moduleRef.injector.get(ApplicationRef);

            if (moduleRef._bootstrapComponents.length > 0) {
              moduleRef._bootstrapComponents.forEach(function (f) {
                return appRef.bootstrap(f);
              });
            } else if (moduleRef.instance.ngDoBootstrap) {
              moduleRef.instance.ngDoBootstrap(appRef);
            } else {
              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.");
            }

            this._modules.push(moduleRef);
          }
          /**
           * Registers a listener to be called when the platform is destroyed.
           */

        }, {
          key: "onDestroy",
          value: function onDestroy(callback) {
            this._destroyListeners.push(callback);
          }
          /**
           * Retrieves the platform {@link Injector}, which is the parent injector for
           * every Angular application on the page and provides singleton providers.
           */

        }, {
          key: "injector",
          get: function get() {
            return this._injector;
          }
          /**
           * Destroys the current Angular platform and all Angular applications on the page.
           * Destroys all modules and listeners registered with the platform.
           */

        }, {
          key: "destroy",
          value: function destroy() {
            if (this._destroyed) {
              throw new Error('The platform has already been destroyed!');
            }

            this._modules.slice().forEach(function (module) {
              return module.destroy();
            });

            this._destroyListeners.forEach(function (listener) {
              return listener();
            });

            this._destroyed = true;
          }
        }, {
          key: "destroyed",
          get: function get() {
            return this._destroyed;
          }
        }]);

        return PlatformRef;
      }();

      PlatformRef.ɵfac = function PlatformRef_Factory(t) {
        return new (t || PlatformRef)(ɵɵinject(Injector));
      };

      PlatformRef.ɵprov = ɵɵdefineInjectable({
        token: PlatformRef,
        factory: PlatformRef.ɵfac
      });

      PlatformRef.ctorParameters = function () {
        return [{
          type: Injector
        }];
      };
      /*@__PURE__*/


      (function () {
        setClassMetadata(PlatformRef, [{
          type: Injectable
        }], function () {
          return [{
            type: Injector
          }];
        }, null);
      })();

      function getNgZone(ngZoneOption, ngZoneEventCoalescing) {
        var ngZone;

        if (ngZoneOption === 'noop') {
          ngZone = new NoopNgZone();
        } else {
          ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) || new NgZone({
            enableLongStackTrace: isDevMode(),
            shouldCoalesceEventChangeDetection: ngZoneEventCoalescing
          });
        }

        return ngZone;
      }

      function _callAndReportToErrorHandler(errorHandler, ngZone, callback) {
        try {
          var result = callback();

          if (isPromise(result)) {
            return result["catch"](function (e) {
              ngZone.runOutsideAngular(function () {
                return errorHandler.handleError(e);
              }); // rethrow as the exception handler might not do it

              throw e;
            });
          }

          return result;
        } catch (e) {
          ngZone.runOutsideAngular(function () {
            return errorHandler.handleError(e);
          }); // rethrow as the exception handler might not do it

          throw e;
        }
      }

      function optionsReducer(dst, objs) {
        if (Array.isArray(objs)) {
          dst = objs.reduce(optionsReducer, dst);
        } else {
          dst = Object.assign(Object.assign({}, dst), objs);
        }

        return dst;
      }
      /**
       * A reference to an Angular application running on a page.
       *
       * @usageNotes
       *
       * {@a is-stable-examples}
       * ### isStable examples and caveats
       *
       * Note two important points about `isStable`, demonstrated in the examples below:
       * - the application will never be stable if you start any kind
       * of recurrent asynchronous task when the application starts
       * (for example for a polling process, started with a `setInterval`, a `setTimeout`
       * or using RxJS operators like `interval`);
       * - the `isStable` Observable runs outside of the Angular zone.
       *
       * Let's imagine that you start a recurrent task
       * (here incrementing a counter, using RxJS `interval`),
       * and at the same time subscribe to `isStable`.
       *
       * ```
       * constructor(appRef: ApplicationRef) {
       *   appRef.isStable.pipe(
       *      filter(stable => stable)
       *   ).subscribe(() => console.log('App is stable now');
       *   interval(1000).subscribe(counter => console.log(counter));
       * }
       * ```
       * In this example, `isStable` will never emit `true`,
       * and the trace "App is stable now" will never get logged.
       *
       * If you want to execute something when the app is stable,
       * you have to wait for the application to be stable
       * before starting your polling process.
       *
       * ```
       * constructor(appRef: ApplicationRef) {
       *   appRef.isStable.pipe(
       *     first(stable => stable),
       *     tap(stable => console.log('App is stable now')),
       *     switchMap(() => interval(1000))
       *   ).subscribe(counter => console.log(counter));
       * }
       * ```
       * In this example, the trace "App is stable now" will be logged
       * and then the counter starts incrementing every second.
       *
       * Note also that this Observable runs outside of the Angular zone,
       * which means that the code in the subscription
       * to this Observable will not trigger the change detection.
       *
       * Let's imagine that instead of logging the counter value,
       * you update a field of your component
       * and display it in its template.
       *
       * ```
       * constructor(appRef: ApplicationRef) {
       *   appRef.isStable.pipe(
       *     first(stable => stable),
       *     switchMap(() => interval(1000))
       *   ).subscribe(counter => this.value = counter);
       * }
       * ```
       * As the `isStable` Observable runs outside the zone,
       * the `value` field will be updated properly,
       * but the template will not be refreshed!
       *
       * You'll have to manually trigger the change detection to update the template.
       *
       * ```
       * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {
       *   appRef.isStable.pipe(
       *     first(stable => stable),
       *     switchMap(() => interval(1000))
       *   ).subscribe(counter => {
       *     this.value = counter;
       *     cd.detectChanges();
       *   });
       * }
       * ```
       *
       * Or make the subscription callback run inside the zone.
       *
       * ```
       * constructor(appRef: ApplicationRef, zone: NgZone) {
       *   appRef.isStable.pipe(
       *     first(stable => stable),
       *     switchMap(() => interval(1000))
       *   ).subscribe(counter => zone.run(() => this.value = counter));
       * }
       * ```
       *
       * @publicApi
       */


      var ApplicationRef = /*#__PURE__*/function () {
        /** @internal */
        function ApplicationRef(_zone, _console, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {
          var _this494 = this;

          _classCallCheck(this, ApplicationRef);

          this._zone = _zone;
          this._console = _console;
          this._injector = _injector;
          this._exceptionHandler = _exceptionHandler;
          this._componentFactoryResolver = _componentFactoryResolver;
          this._initStatus = _initStatus;
          /** @internal */

          this._bootstrapListeners = [];
          this._views = [];
          this._runningTick = false;
          this._stable = true;
          /**
           * Get a list of component types registered to this application.
           * This list is populated even before the component is created.
           */

          this.componentTypes = [];
          /**
           * Get a list of components registered to this application.
           */

          this.components = [];
          this._onMicrotaskEmptySubscription = this._zone.onMicrotaskEmpty.subscribe({
            next: function next() {
              _this494._zone.run(function () {
                _this494.tick();
              });
            }
          });
          var isCurrentlyStable = new rxjs__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (observer) {
            _this494._stable = _this494._zone.isStable && !_this494._zone.hasPendingMacrotasks && !_this494._zone.hasPendingMicrotasks;

            _this494._zone.runOutsideAngular(function () {
              observer.next(_this494._stable);
              observer.complete();
            });
          });
          var isStable = new rxjs__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (observer) {
            // Create the subscription to onStable outside the Angular Zone so that
            // the callback is run outside the Angular Zone.
            var stableSub;

            _this494._zone.runOutsideAngular(function () {
              stableSub = _this494._zone.onStable.subscribe(function () {
                NgZone.assertNotInAngularZone(); // Check whether there are no pending macro/micro tasks in the next tick
                // to allow for NgZone to update the state.

                scheduleMicroTask(function () {
                  if (!_this494._stable && !_this494._zone.hasPendingMacrotasks && !_this494._zone.hasPendingMicrotasks) {
                    _this494._stable = true;
                    observer.next(true);
                  }
                });
              });
            });

            var unstableSub = _this494._zone.onUnstable.subscribe(function () {
              NgZone.assertInAngularZone();

              if (_this494._stable) {
                _this494._stable = false;

                _this494._zone.runOutsideAngular(function () {
                  observer.next(false);
                });
              }
            });

            return function () {
              stableSub.unsubscribe();
              unstableSub.unsubscribe();
            };
          });
          this.isStable = Object(rxjs__WEBPACK_IMPORTED_MODULE_0__["merge"])(isCurrentlyStable, isStable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["share"])()));
        }
        /**
         * Bootstrap a new component at the root level of the application.
         *
         * @usageNotes
         * ### Bootstrap process
         *
         * When bootstrapping a new root component into an application, Angular mounts the
         * specified application component onto DOM elements identified by the componentType's
         * selector and kicks off automatic change detection to finish initializing the component.
         *
         * Optionally, a component can be mounted onto a DOM element that does not match the
         * componentType's selector.
         *
         * ### Example
         * {@example core/ts/platform/platform.ts region='longform'}
         */


        _createClass2(ApplicationRef, [{
          key: "bootstrap",
          value: function bootstrap(componentOrFactory, rootSelectorOrNode) {
            var _this495 = this;

            if (!this._initStatus.done) {
              throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');
            }

            var componentFactory;

            if (componentOrFactory instanceof ComponentFactory) {
              componentFactory = componentOrFactory;
            } else {
              componentFactory = this._componentFactoryResolver.resolveComponentFactory(componentOrFactory);
            }

            this.componentTypes.push(componentFactory.componentType); // Create a factory associated with the current module if it's not bound to some other

            var ngModule = isBoundToModule(componentFactory) ? undefined : this._injector.get(NgModuleRef);
            var selectorOrNode = rootSelectorOrNode || componentFactory.selector;
            var compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);
            var nativeElement = compRef.location.nativeElement;
            var testability = compRef.injector.get(Testability, null);
            var testabilityRegistry = testability && compRef.injector.get(TestabilityRegistry);

            if (testability && testabilityRegistry) {
              testabilityRegistry.registerApplication(nativeElement, testability);
            }

            compRef.onDestroy(function () {
              _this495.detachView(compRef.hostView);

              remove(_this495.components, compRef);

              if (testabilityRegistry) {
                testabilityRegistry.unregisterApplication(nativeElement);
              }
            });

            this._loadComponent(compRef);

            if (isDevMode()) {
              this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode.");
            }

            return compRef;
          }
          /**
           * Invoke this method to explicitly process change detection and its side-effects.
           *
           * In development mode, `tick()` also performs a second change detection cycle to ensure that no
           * further changes are detected. If additional changes are picked up during this second cycle,
           * bindings in the app have side-effects that cannot be resolved in a single change detection
           * pass.
           * In this case, Angular throws an error, since an Angular application can only have one change
           * detection pass during which all change detection must complete.
           */

        }, {
          key: "tick",
          value: function tick() {
            var _this496 = this;

            if (this._runningTick) {
              throw new Error('ApplicationRef.tick is called recursively');
            }

            try {
              this._runningTick = true;

              var _iterator60 = _createForOfIteratorHelper(this._views),
                  _step59;

              try {
                for (_iterator60.s(); !(_step59 = _iterator60.n()).done;) {
                  var _view2 = _step59.value;

                  _view2.detectChanges();
                } // Note that we have still left the `isDevMode()` condition in order to avoid
                // creating a breaking change for projects that still use the View Engine.

              } catch (err) {
                _iterator60.e(err);
              } finally {
                _iterator60.f();
              }

              if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) {
                var _iterator61 = _createForOfIteratorHelper(this._views),
                    _step60;

                try {
                  for (_iterator61.s(); !(_step60 = _iterator61.n()).done;) {
                    var view = _step60.value;
                    view.checkNoChanges();
                  }
                } catch (err) {
                  _iterator61.e(err);
                } finally {
                  _iterator61.f();
                }
              }
            } catch (e) {
              // Attention: Don't rethrow as it could cancel subscriptions to Observables!
              this._zone.runOutsideAngular(function () {
                return _this496._exceptionHandler.handleError(e);
              });
            } finally {
              this._runningTick = false;
            }
          }
          /**
           * Attaches a view so that it will be dirty checked.
           * The view will be automatically detached when it is destroyed.
           * This will throw if the view is already attached to a ViewContainer.
           */

        }, {
          key: "attachView",
          value: function attachView(viewRef) {
            var view = viewRef;

            this._views.push(view);

            view.attachToAppRef(this);
          }
          /**
           * Detaches a view from dirty checking again.
           */

        }, {
          key: "detachView",
          value: function detachView(viewRef) {
            var view = viewRef;
            remove(this._views, view);
            view.detachFromAppRef();
          }
        }, {
          key: "_loadComponent",
          value: function _loadComponent(componentRef) {
            this.attachView(componentRef.hostView);
            this.tick();
            this.components.push(componentRef); // Get the listeners lazily to prevent DI cycles.

            var listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);

            listeners.forEach(function (listener) {
              return listener(componentRef);
            });
          }
          /** @internal */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this._views.slice().forEach(function (view) {
              return view.destroy();
            });

            this._onMicrotaskEmptySubscription.unsubscribe();
          }
          /**
           * Returns the number of attached views.
           */

        }, {
          key: "viewCount",
          get: function get() {
            return this._views.length;
          }
        }]);

        return ApplicationRef;
      }();

      ApplicationRef.ɵfac = function ApplicationRef_Factory(t) {
        return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Console), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ComponentFactoryResolver), ɵɵinject(ApplicationInitStatus));
      };

      ApplicationRef.ɵprov = ɵɵdefineInjectable({
        token: ApplicationRef,
        factory: ApplicationRef.ɵfac
      });

      ApplicationRef.ctorParameters = function () {
        return [{
          type: NgZone
        }, {
          type: Console
        }, {
          type: Injector
        }, {
          type: ErrorHandler
        }, {
          type: ComponentFactoryResolver
        }, {
          type: ApplicationInitStatus
        }];
      };
      /*@__PURE__*/


      (function () {
        setClassMetadata(ApplicationRef, [{
          type: Injectable
        }], function () {
          return [{
            type: NgZone
          }, {
            type: Console
          }, {
            type: Injector
          }, {
            type: ErrorHandler
          }, {
            type: ComponentFactoryResolver
          }, {
            type: ApplicationInitStatus
          }];
        }, null);
      })();

      function remove(list, el) {
        var index = list.indexOf(el);

        if (index > -1) {
          list.splice(index, 1);
        }
      }

      function _lastDefined(args) {
        for (var i = args.length - 1; i >= 0; i--) {
          if (args[i] !== undefined) {
            return args[i];
          }
        }

        return undefined;
      }

      function _mergeArrays(parts) {
        var result = [];
        parts.forEach(function (part) {
          return part && result.push.apply(result, _toConsumableArray(part));
        });
        return result;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Used to load ng module factories.
       *
       * @publicApi
       * @deprecated the `string` form of `loadChildren` is deprecated, and `NgModuleFactoryLoader` is
       * part of its implementation. See `LoadChildren` for more details.
       */


      var NgModuleFactoryLoader = function NgModuleFactoryLoader() {
        _classCallCheck(this, NgModuleFactoryLoader);
      };

      function getModuleFactory__PRE_R3__(id) {
        var factory = getRegisteredNgModuleType(id);
        if (!factory) throw noModuleError(id);
        return factory;
      }

      function getModuleFactory__POST_R3__(id) {
        var type = getRegisteredNgModuleType(id);
        if (!type) throw noModuleError(id);
        return new NgModuleFactory$1(type);
      }
      /**
       * Returns the NgModuleFactory with the given id, if it exists and has been loaded.
       * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module
       * cannot be found.
       * @publicApi
       */


      var getModuleFactory = getModuleFactory__POST_R3__;

      function noModuleError(id) {
        return new Error("No module with ID ".concat(id, " loaded"));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _SEPARATOR = '#';
      var FACTORY_CLASS_SUFFIX = 'NgFactory';
      /**
       * Configuration for SystemJsNgModuleLoader.
       * token.
       *
       * @publicApi
       * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoaderConfig`
       * is part of its implementation. See `LoadChildren` for more details.
       */

      var SystemJsNgModuleLoaderConfig = function SystemJsNgModuleLoaderConfig() {
        _classCallCheck(this, SystemJsNgModuleLoaderConfig);
      };

      var DEFAULT_CONFIG = {
        factoryPathPrefix: '',
        factoryPathSuffix: '.ngfactory'
      };
      /**
       * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory
       * @publicApi
       * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoader` is
       * part of its implementation. See `LoadChildren` for more details.
       */

      var SystemJsNgModuleLoader = /*#__PURE__*/function () {
        function SystemJsNgModuleLoader(_compiler, config) {
          _classCallCheck(this, SystemJsNgModuleLoader);

          this._compiler = _compiler;
          this._config = config || DEFAULT_CONFIG;
        }

        _createClass2(SystemJsNgModuleLoader, [{
          key: "load",
          value: function load(path) {
            var legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler;
            return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path);
          }
        }, {
          key: "loadAndCompile",
          value: function loadAndCompile(path) {
            var _this497 = this;

            var _path$split = path.split(_SEPARATOR),
                _path$split2 = _slicedToArray(_path$split, 2),
                module = _path$split2[0],
                exportName = _path$split2[1];

            if (exportName === undefined) {
              exportName = 'default';
            }

            return __webpack_require__("zn8P")(module).then(function (module) {
              return module[exportName];
            }).then(function (type) {
              return checkNotEmpty(type, module, exportName);
            }).then(function (type) {
              return _this497._compiler.compileModuleAsync(type);
            });
          }
        }, {
          key: "loadFactory",
          value: function loadFactory(path) {
            var _path$split3 = path.split(_SEPARATOR),
                _path$split4 = _slicedToArray(_path$split3, 2),
                module = _path$split4[0],
                exportName = _path$split4[1];

            var factoryClassSuffix = FACTORY_CLASS_SUFFIX;

            if (exportName === undefined) {
              exportName = 'default';
              factoryClassSuffix = '';
            }

            return __webpack_require__("zn8P")(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix).then(function (module) {
              return module[exportName + factoryClassSuffix];
            }).then(function (factory) {
              return checkNotEmpty(factory, module, exportName);
            });
          }
        }]);

        return SystemJsNgModuleLoader;
      }();

      SystemJsNgModuleLoader.ɵfac = function SystemJsNgModuleLoader_Factory(t) {
        return new (t || SystemJsNgModuleLoader)(ɵɵinject(Compiler), ɵɵinject(SystemJsNgModuleLoaderConfig, 8));
      };

      SystemJsNgModuleLoader.ɵprov = ɵɵdefineInjectable({
        token: SystemJsNgModuleLoader,
        factory: SystemJsNgModuleLoader.ɵfac
      });

      SystemJsNgModuleLoader.ctorParameters = function () {
        return [{
          type: Compiler
        }, {
          type: SystemJsNgModuleLoaderConfig,
          decorators: [{
            type: Optional
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        setClassMetadata(SystemJsNgModuleLoader, [{
          type: Injectable
        }], function () {
          return [{
            type: Compiler
          }, {
            type: SystemJsNgModuleLoaderConfig,
            decorators: [{
              type: Optional
            }]
          }];
        }, null);
      })();

      function checkNotEmpty(value, modulePath, exportName) {
        if (!value) {
          throw new Error("Cannot find '".concat(exportName, "' in '").concat(modulePath, "'"));
        }

        return value;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Represents an Angular [view](guide/glossary#view "Definition").
       *
       * @see {@link ChangeDetectorRef#usage-notes Change detection usage}
       *
       * @publicApi
       */


      var ViewRef$1 = /*#__PURE__*/function (_ChangeDetectorRef) {
        _inherits(ViewRef$1, _ChangeDetectorRef);

        var _super235 = _createSuper(ViewRef$1);

        function ViewRef$1() {
          _classCallCheck(this, ViewRef$1);

          return _super235.apply(this, arguments);
        }

        return ViewRef$1;
      }(ChangeDetectorRef);
      /**
       * Represents an Angular [view](guide/glossary#view) in a view container.
       * An [embedded view](guide/glossary#view-tree) can be referenced from a component
       * other than the hosting component whose template defines it, or it can be defined
       * independently by a `TemplateRef`.
       *
       * Properties of elements in a view can change, but the structure (number and order) of elements in
       * a view cannot. Change the structure of elements by inserting, moving, or
       * removing nested views in a view container.
       *
       * @see `ViewContainerRef`
       *
       * @usageNotes
       *
       * The following template breaks down into two separate `TemplateRef` instances,
       * an outer one and an inner one.
       *
       * ```
       * Count: {{items.length}}
       * <ul>
       *   <li *ngFor="let  item of items">{{item}}</li>
       * </ul>
       * ```
       *
       * This is the outer `TemplateRef`:
       *
       * ```
       * Count: {{items.length}}
       * <ul>
       *   <ng-template ngFor let-item [ngForOf]="items"></ng-template>
       * </ul>
       * ```
       *
       * This is the inner `TemplateRef`:
       *
       * ```
       *   <li>{{item}}</li>
       * ```
       *
       * The outer and inner `TemplateRef` instances are assembled into views as follows:
       *
       * ```
       * <!-- ViewRef: outer-0 -->
       * Count: 2
       * <ul>
       *   <ng-template view-container-ref></ng-template>
       *   <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->
       *   <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->
       * </ul>
       * <!-- /ViewRef: outer-0 -->
       * ```
       * @publicApi
       */


      var EmbeddedViewRef = /*#__PURE__*/function (_ViewRef$) {
        _inherits(EmbeddedViewRef, _ViewRef$);

        var _super236 = _createSuper(EmbeddedViewRef);

        function EmbeddedViewRef() {
          _classCallCheck(this, EmbeddedViewRef);

          return _super236.apply(this, arguments);
        }

        return EmbeddedViewRef;
      }(ViewRef$1);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @publicApi
       */


      var DebugEventListener = function DebugEventListener(name, callback) {
        _classCallCheck(this, DebugEventListener);

        this.name = name;
        this.callback = callback;
      };

      var DebugNode__PRE_R3__ = /*#__PURE__*/function () {
        function DebugNode__PRE_R3__(nativeNode, parent, _debugContext) {
          _classCallCheck(this, DebugNode__PRE_R3__);

          this.listeners = [];
          this.parent = null;
          this._debugContext = _debugContext;
          this.nativeNode = nativeNode;

          if (parent && parent instanceof DebugElement__PRE_R3__) {
            parent.addChild(this);
          }
        }

        _createClass2(DebugNode__PRE_R3__, [{
          key: "injector",
          get: function get() {
            return this._debugContext.injector;
          }
        }, {
          key: "componentInstance",
          get: function get() {
            return this._debugContext.component;
          }
        }, {
          key: "context",
          get: function get() {
            return this._debugContext.context;
          }
        }, {
          key: "references",
          get: function get() {
            return this._debugContext.references;
          }
        }, {
          key: "providerTokens",
          get: function get() {
            return this._debugContext.providerTokens;
          }
        }]);

        return DebugNode__PRE_R3__;
      }();

      var DebugElement__PRE_R3__ = /*#__PURE__*/function (_DebugNode__PRE_R3__) {
        _inherits(DebugElement__PRE_R3__, _DebugNode__PRE_R3__);

        var _super237 = _createSuper(DebugElement__PRE_R3__);

        function DebugElement__PRE_R3__(nativeNode, parent, _debugContext) {
          var _this498;

          _classCallCheck(this, DebugElement__PRE_R3__);

          _this498 = _super237.call(this, nativeNode, parent, _debugContext);
          _this498.properties = {};
          _this498.attributes = {};
          _this498.classes = {};
          _this498.styles = {};
          _this498.childNodes = [];
          _this498.nativeElement = nativeNode;
          return _this498;
        }

        _createClass2(DebugElement__PRE_R3__, [{
          key: "addChild",
          value: function addChild(child) {
            if (child) {
              this.childNodes.push(child);
              child.parent = this;
            }
          }
        }, {
          key: "removeChild",
          value: function removeChild(child) {
            var childIndex = this.childNodes.indexOf(child);

            if (childIndex !== -1) {
              child.parent = null;
              this.childNodes.splice(childIndex, 1);
            }
          }
        }, {
          key: "insertChildrenAfter",
          value: function insertChildrenAfter(child, newChildren) {
            var _this499 = this;

            var siblingIndex = this.childNodes.indexOf(child);

            if (siblingIndex !== -1) {
              var _this$childNodes;

              (_this$childNodes = this.childNodes).splice.apply(_this$childNodes, [siblingIndex + 1, 0].concat(_toConsumableArray(newChildren)));

              newChildren.forEach(function (c) {
                if (c.parent) {
                  c.parent.removeChild(c);
                }

                child.parent = _this499;
              });
            }
          }
        }, {
          key: "insertBefore",
          value: function insertBefore(refChild, newChild) {
            var refIndex = this.childNodes.indexOf(refChild);

            if (refIndex === -1) {
              this.addChild(newChild);
            } else {
              if (newChild.parent) {
                newChild.parent.removeChild(newChild);
              }

              newChild.parent = this;
              this.childNodes.splice(refIndex, 0, newChild);
            }
          }
        }, {
          key: "query",
          value: function query(predicate) {
            var results = this.queryAll(predicate);
            return results[0] || null;
          }
        }, {
          key: "queryAll",
          value: function queryAll(predicate) {
            var matches = [];

            _queryElementChildren(this, predicate, matches);

            return matches;
          }
        }, {
          key: "queryAllNodes",
          value: function queryAllNodes(predicate) {
            var matches = [];

            _queryNodeChildren(this, predicate, matches);

            return matches;
          }
        }, {
          key: "children",
          get: function get() {
            return this.childNodes //
            .filter(function (node) {
              return node instanceof DebugElement__PRE_R3__;
            });
          }
        }, {
          key: "triggerEventHandler",
          value: function triggerEventHandler(eventName, eventObj) {
            this.listeners.forEach(function (listener) {
              if (listener.name == eventName) {
                listener.callback(eventObj);
              }
            });
          }
        }]);

        return DebugElement__PRE_R3__;
      }(DebugNode__PRE_R3__);
      /**
       * @publicApi
       */


      function asNativeElements(debugEls) {
        return debugEls.map(function (el) {
          return el.nativeElement;
        });
      }

      function _queryElementChildren(element, predicate, matches) {
        element.childNodes.forEach(function (node) {
          if (node instanceof DebugElement__PRE_R3__) {
            if (predicate(node)) {
              matches.push(node);
            }

            _queryElementChildren(node, predicate, matches);
          }
        });
      }

      function _queryNodeChildren(parentNode, predicate, matches) {
        if (parentNode instanceof DebugElement__PRE_R3__) {
          parentNode.childNodes.forEach(function (node) {
            if (predicate(node)) {
              matches.push(node);
            }

            if (node instanceof DebugElement__PRE_R3__) {
              _queryNodeChildren(node, predicate, matches);
            }
          });
        }
      }

      var DebugNode__POST_R3__ = /*#__PURE__*/function () {
        function DebugNode__POST_R3__(nativeNode) {
          _classCallCheck(this, DebugNode__POST_R3__);

          this.nativeNode = nativeNode;
        }

        _createClass2(DebugNode__POST_R3__, [{
          key: "parent",
          get: function get() {
            var parent = this.nativeNode.parentNode;
            return parent ? new DebugElement__POST_R3__(parent) : null;
          }
        }, {
          key: "injector",
          get: function get() {
            return getInjector(this.nativeNode);
          }
        }, {
          key: "componentInstance",
          get: function get() {
            var nativeElement = this.nativeNode;
            return nativeElement && (getComponent(nativeElement) || getOwningComponent(nativeElement));
          }
        }, {
          key: "context",
          get: function get() {
            return getComponent(this.nativeNode) || getContext(this.nativeNode);
          }
        }, {
          key: "listeners",
          get: function get() {
            return getListeners(this.nativeNode).filter(function (listener) {
              return listener.type === 'dom';
            });
          }
        }, {
          key: "references",
          get: function get() {
            return getLocalRefs(this.nativeNode);
          }
        }, {
          key: "providerTokens",
          get: function get() {
            return getInjectionTokens(this.nativeNode);
          }
        }]);

        return DebugNode__POST_R3__;
      }();

      var DebugElement__POST_R3__ = /*#__PURE__*/function (_DebugNode__POST_R3__) {
        _inherits(DebugElement__POST_R3__, _DebugNode__POST_R3__);

        var _super238 = _createSuper(DebugElement__POST_R3__);

        function DebugElement__POST_R3__(nativeNode) {
          _classCallCheck(this, DebugElement__POST_R3__);

          ngDevMode && assertDomNode(nativeNode);
          return _super238.call(this, nativeNode);
        }

        _createClass2(DebugElement__POST_R3__, [{
          key: "nativeElement",
          get: function get() {
            return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;
          }
        }, {
          key: "name",
          get: function get() {
            try {
              var context = loadLContext(this.nativeNode);
              var lView = context.lView;
              var tData = lView[TVIEW].data;
              var tNode = tData[context.nodeIndex];
              return tNode.value;
            } catch (e) {
              return this.nativeNode.nodeName;
            }
          }
          /**
           *  Gets a map of property names to property values for an element.
           *
           *  This map includes:
           *  - Regular property bindings (e.g. `[id]="id"`)
           *  - Host property bindings (e.g. `host: { '[id]': "id" }`)
           *  - Interpolated property bindings (e.g. `id="{{ value }}")
           *
           *  It does not include:
           *  - input property bindings (e.g. `[myCustomInput]="value"`)
           *  - attribute bindings (e.g. `[attr.role]="menu"`)
           */

        }, {
          key: "properties",
          get: function get() {
            var context = loadLContext(this.nativeNode, false);

            if (context == null) {
              return {};
            }

            var lView = context.lView;
            var tData = lView[TVIEW].data;
            var tNode = tData[context.nodeIndex];
            var properties = {}; // Collect properties from the DOM.

            copyDomProperties(this.nativeElement, properties); // Collect properties from the bindings. This is needed for animation renderer which has
            // synthetic properties which don't get reflected into the DOM.

            collectPropertyBindings(properties, tNode, lView, tData);
            return properties;
          }
        }, {
          key: "attributes",
          get: function get() {
            var attributes = {};
            var element = this.nativeElement;

            if (!element) {
              return attributes;
            }

            var context = loadLContext(element, false);

            if (context == null) {
              return {};
            }

            var lView = context.lView;
            var tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs;
            var lowercaseTNodeAttrs = []; // For debug nodes we take the element's attribute directly from the DOM since it allows us
            // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones
            // that are set through `Renderer2`). The problem is that the browser will lowercase all names,
            // however since we have the attributes already on the TNode, we can preserve the case by going
            // through them once, adding them to the `attributes` map and putting their lower-cased name
            // into an array. Afterwards when we're going through the native DOM attributes, we can check
            // whether we haven't run into an attribute already through the TNode.

            if (tNodeAttrs) {
              var i = 0;

              while (i < tNodeAttrs.length) {
                var attrName = tNodeAttrs[i]; // Stop as soon as we hit a marker. We only care about the regular attributes. Everything
                // else will be handled below when we read the final attributes off the DOM.

                if (typeof attrName !== 'string') break;
                var attrValue = tNodeAttrs[i + 1];
                attributes[attrName] = attrValue;
                lowercaseTNodeAttrs.push(attrName.toLowerCase());
                i += 2;
              }
            }

            var eAttrs = element.attributes;

            for (var _i32 = 0; _i32 < eAttrs.length; _i32++) {
              var attr = eAttrs[_i32];
              var lowercaseName = attr.name.toLowerCase(); // Make sure that we don't assign the same attribute both in its
              // case-sensitive form and the lower-cased one from the browser.

              if (lowercaseTNodeAttrs.indexOf(lowercaseName) === -1) {
                // Save the lowercase name to align the behavior between browsers.
                // IE preserves the case, while all other browser convert it to lower case.
                attributes[lowercaseName] = attr.value;
              }
            }

            return attributes;
          }
        }, {
          key: "styles",
          get: function get() {
            if (this.nativeElement && this.nativeElement.style) {
              return this.nativeElement.style;
            }

            return {};
          }
        }, {
          key: "classes",
          get: function get() {
            var result = {};
            var element = this.nativeElement; // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.

            var className = element.className;
            var classes = className && typeof className !== 'string' ? className.baseVal.split(' ') : className.split(' ');
            classes.forEach(function (value) {
              return result[value] = true;
            });
            return result;
          }
        }, {
          key: "childNodes",
          get: function get() {
            var childNodes = this.nativeNode.childNodes;
            var children = [];

            for (var i = 0; i < childNodes.length; i++) {
              var element = childNodes[i];
              children.push(getDebugNode__POST_R3__(element));
            }

            return children;
          }
        }, {
          key: "children",
          get: function get() {
            var nativeElement = this.nativeElement;
            if (!nativeElement) return [];
            var childNodes = nativeElement.children;
            var children = [];

            for (var i = 0; i < childNodes.length; i++) {
              var element = childNodes[i];
              children.push(getDebugNode__POST_R3__(element));
            }

            return children;
          }
        }, {
          key: "query",
          value: function query(predicate) {
            var results = this.queryAll(predicate);
            return results[0] || null;
          }
        }, {
          key: "queryAll",
          value: function queryAll(predicate) {
            var matches = [];

            _queryAllR3(this, predicate, matches, true);

            return matches;
          }
        }, {
          key: "queryAllNodes",
          value: function queryAllNodes(predicate) {
            var matches = [];

            _queryAllR3(this, predicate, matches, false);

            return matches;
          }
        }, {
          key: "triggerEventHandler",
          value: function triggerEventHandler(eventName, eventObj) {
            var node = this.nativeNode;
            var invokedListeners = [];
            this.listeners.forEach(function (listener) {
              if (listener.name === eventName) {
                var callback = listener.callback;
                callback.call(node, eventObj);
                invokedListeners.push(callback);
              }
            }); // We need to check whether `eventListeners` exists, because it's something
            // that Zone.js only adds to `EventTarget` in browser environments.

            if (typeof node.eventListeners === 'function') {
              // Note that in Ivy we wrap event listeners with a call to `event.preventDefault` in some
              // cases. We use '__ngUnwrap__' as a special token that gives us access to the actual event
              // listener.
              node.eventListeners(eventName).forEach(function (listener) {
                // In order to ensure that we can detect the special __ngUnwrap__ token described above, we
                // use `toString` on the listener and see if it contains the token. We use this approach to
                // ensure that it still worked with compiled code since it cannot remove or rename string
                // literals. We also considered using a special function name (i.e. if(listener.name ===
                // special)) but that was more cumbersome and we were also concerned the compiled code could
                // strip the name, turning the condition in to ("" === "") and always returning true.
                if (listener.toString().indexOf('__ngUnwrap__') !== -1) {
                  var unwrappedListener = listener('__ngUnwrap__');
                  return invokedListeners.indexOf(unwrappedListener) === -1 && unwrappedListener.call(node, eventObj);
                }
              });
            }
          }
        }]);

        return DebugElement__POST_R3__;
      }(DebugNode__POST_R3__);

      function copyDomProperties(element, properties) {
        if (element) {
          // Skip own properties (as those are patched)
          var obj = Object.getPrototypeOf(element);
          var NodePrototype = Node.prototype;

          while (obj !== null && obj !== NodePrototype) {
            var descriptors = Object.getOwnPropertyDescriptors(obj);

            for (var key in descriptors) {
              if (!key.startsWith('__') && !key.startsWith('on')) {
                // don't include properties starting with `__` and `on`.
                // `__` are patched values which should not be included.
                // `on` are listeners which also should not be included.
                var value = element[key];

                if (isPrimitiveValue(value)) {
                  properties[key] = value;
                }
              }
            }

            obj = Object.getPrototypeOf(obj);
          }
        }
      }

      function isPrimitiveValue(value) {
        return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' || value === null;
      }

      function _queryAllR3(parentElement, predicate, matches, elementsOnly) {
        var context = loadLContext(parentElement.nativeNode, false);

        if (context !== null) {
          var parentTNode = context.lView[TVIEW].data[context.nodeIndex];

          _queryNodeChildrenR3(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);
        } else {
          // If the context is null, then `parentElement` was either created with Renderer2 or native DOM
          // APIs.
          _queryNativeNodeDescendants(parentElement.nativeNode, predicate, matches, elementsOnly);
        }
      }
      /**
       * Recursively match the current TNode against the predicate, and goes on with the next ones.
       *
       * @param tNode the current TNode
       * @param lView the LView of this TNode
       * @param predicate the predicate to match
       * @param matches the list of positive matches
       * @param elementsOnly whether only elements should be searched
       * @param rootNativeNode the root native node on which predicate should not be matched
       */


      function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {
        ngDevMode && assertTNodeForLView(tNode, lView);
        var nativeNode = getNativeByTNodeOrNull(tNode, lView); // For each type of TNode, specific logic is executed.

        if (tNode.type & (3
        /* AnyRNode */
        | 8
        /* ElementContainer */
        )) {
          // Case 1: the TNode is an element
          // The native node has to be checked.
          _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);

          if (isComponentHost(tNode)) {
            // If the element is the host of a component, then all nodes in its view have to be processed.
            // Note: the component's content (tNode.child) will be processed from the insertion points.
            var componentView = getComponentLViewByIndex(tNode.index, lView);

            if (componentView && componentView[TVIEW].firstChild) {
              _queryNodeChildrenR3(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);
            }
          } else {
            if (tNode.child) {
              // Otherwise, its children have to be processed.
              _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
            } // We also have to query the DOM directly in order to catch elements inserted through
            // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple
            // times. ViewEngine could do it more efficiently, because all the insertions go through
            // Renderer2, however that's not the case in Ivy. This approach is being used because:
            // 1. Matching the ViewEngine behavior would mean potentially introducing a depedency
            //    from `Renderer2` to Ivy which could bring Ivy code into ViewEngine.
            // 2. We would have to make `Renderer3` "know" about debug nodes.
            // 3. It allows us to capture nodes that were inserted directly via the DOM.


            nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly);
          } // In all cases, if a dynamic container exists for this node, each view inside it has to be
          // processed.


          var nodeOrContainer = lView[tNode.index];

          if (isLContainer(nodeOrContainer)) {
            _queryNodeChildrenInContainerR3(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);
          }
        } else if (tNode.type & 4
        /* Container */
        ) {
          // Case 2: the TNode is a container
          // The native node has to be checked.
          var lContainer = lView[tNode.index];

          _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode); // Each view inside the container has to be processed.


          _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);
        } else if (tNode.type & 16
        /* Projection */
        ) {
          // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).
          // The nodes projected at this location all need to be processed.
          var _componentView = lView[DECLARATION_COMPONENT_VIEW];
          var componentHost = _componentView[T_HOST];
          var head = componentHost.projection[tNode.projection];

          if (Array.isArray(head)) {
            var _iterator62 = _createForOfIteratorHelper(head),
                _step61;

            try {
              for (_iterator62.s(); !(_step61 = _iterator62.n()).done;) {
                var _nativeNode2 = _step61.value;

                _addQueryMatchR3(_nativeNode2, predicate, matches, elementsOnly, rootNativeNode);
              }
            } catch (err) {
              _iterator62.e(err);
            } finally {
              _iterator62.f();
            }
          } else if (head) {
            var nextLView = _componentView[PARENT];
            var nextTNode = nextLView[TVIEW].data[head.index];

            _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);
          }
        } else if (tNode.child) {
          // Case 4: the TNode is a view.
          _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
        } // We don't want to go to the next sibling of the root node.


        if (rootNativeNode !== nativeNode) {
          // To determine the next node to be processed, we need to use the next or the projectionNext
          // link, depending on whether the current node has been projected.
          var _nextTNode = tNode.flags & 4
          /* isProjected */
          ? tNode.projectionNext : tNode.next;

          if (_nextTNode) {
            _queryNodeChildrenR3(_nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);
          }
        }
      }
      /**
       * Process all TNodes in a given container.
       *
       * @param lContainer the container to be processed
       * @param predicate the predicate to match
       * @param matches the list of positive matches
       * @param elementsOnly whether only elements should be searched
       * @param rootNativeNode the root native node on which predicate should not be matched
       */


      function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode) {
        for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
          var childView = lContainer[i];
          var firstChild = childView[TVIEW].firstChild;

          if (firstChild) {
            _queryNodeChildrenR3(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);
          }
        }
      }
      /**
       * Match the current native node against the predicate.
       *
       * @param nativeNode the current native node
       * @param predicate the predicate to match
       * @param matches the list of positive matches
       * @param elementsOnly whether only elements should be searched
       * @param rootNativeNode the root native node on which predicate should not be matched
       */


      function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {
        if (rootNativeNode !== nativeNode) {
          var debugNode = getDebugNode$1(nativeNode);

          if (!debugNode) {
            return;
          } // Type of the "predicate and "matches" array are set based on the value of
          // the "elementsOnly" parameter. TypeScript is not able to properly infer these
          // types with generics, so we manually cast the parameters accordingly.


          if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) && matches.indexOf(debugNode) === -1) {
            matches.push(debugNode);
          } else if (!elementsOnly && predicate(debugNode) && matches.indexOf(debugNode) === -1) {
            matches.push(debugNode);
          }
        }
      }
      /**
       * Match all the descendants of a DOM node against a predicate.
       *
       * @param nativeNode the current native node
       * @param predicate the predicate to match
       * @param matches the list where matches are stored
       * @param elementsOnly whether only elements should be searched
       */


      function _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnly) {
        var nodes = parentNode.childNodes;
        var length = nodes.length;

        for (var i = 0; i < length; i++) {
          var node = nodes[i];
          var debugNode = getDebugNode$1(node);

          if (debugNode) {
            if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) && matches.indexOf(debugNode) === -1) {
              matches.push(debugNode);
            } else if (!elementsOnly && predicate(debugNode) && matches.indexOf(debugNode) === -1) {
              matches.push(debugNode);
            }

            _queryNativeNodeDescendants(node, predicate, matches, elementsOnly);
          }
        }
      }
      /**
       * Iterates through the property bindings for a given node and generates
       * a map of property names to values. This map only contains property bindings
       * defined in templates, not in host bindings.
       */


      function collectPropertyBindings(properties, tNode, lView, tData) {
        var bindingIndexes = tNode.propertyBindings;

        if (bindingIndexes !== null) {
          for (var i = 0; i < bindingIndexes.length; i++) {
            var bindingIndex = bindingIndexes[i];
            var propMetadata = tData[bindingIndex];
            var metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);
            var propertyName = metadataParts[0];

            if (metadataParts.length > 1) {
              var value = metadataParts[1];

              for (var j = 1; j < metadataParts.length - 1; j++) {
                value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];
              }

              properties[propertyName] = value;
            } else {
              properties[propertyName] = lView[bindingIndex];
            }
          }
        }
      } // Need to keep the nodes in a global Map so that multiple angular apps are supported.


      var _nativeNodeToDebugNode = new Map();

      function getDebugNode__PRE_R3__(nativeNode) {
        return _nativeNodeToDebugNode.get(nativeNode) || null;
      }

      var NG_DEBUG_PROPERTY = '__ng_debug__';

      function getDebugNode__POST_R3__(nativeNode) {
        if (nativeNode instanceof Node) {
          if (!nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY)) {
            nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ? new DebugElement__POST_R3__(nativeNode) : new DebugNode__POST_R3__(nativeNode);
          }

          return nativeNode[NG_DEBUG_PROPERTY];
        }

        return null;
      }
      /**
       * @publicApi
       */


      var getDebugNode$1 = getDebugNode__POST_R3__;

      function getDebugNodeR2__PRE_R3__(nativeNode) {
        return getDebugNode__PRE_R3__(nativeNode);
      }

      function getDebugNodeR2__POST_R3__(_nativeNode) {
        return null;
      }

      var getDebugNodeR2 = getDebugNodeR2__POST_R3__;

      function getAllDebugNodes() {
        return Array.from(_nativeNodeToDebugNode.values());
      }

      function indexDebugNode(node) {
        _nativeNodeToDebugNode.set(node.nativeNode, node);
      }

      function removeDebugNodeFromIndex(node) {
        _nativeNodeToDebugNode["delete"](node.nativeNode);
      }
      /**
       * @publicApi
       */


      var DebugNode = DebugNode__POST_R3__;
      /**
       * @publicApi
       */

      var DebugElement = DebugElement__POST_R3__;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var _CORE_PLATFORM_PROVIDERS = [// Set a default platform name for platforms that don't set it explicitly.
      {
        provide: PLATFORM_ID,
        useValue: 'unknown'
      }, {
        provide: PlatformRef,
        deps: [Injector]
      }, {
        provide: TestabilityRegistry,
        deps: []
      }, {
        provide: Console,
        deps: []
      }];
      /**
       * This platform has to be included in any other platform
       *
       * @publicApi
       */

      var platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      function _iterableDiffersFactory() {
        return defaultIterableDiffers;
      }

      function _keyValueDiffersFactory() {
        return defaultKeyValueDiffers;
      }

      function _localeFactory(locale) {
        locale = locale || getGlobalLocale();

        if (ivyEnabled) {
          setLocaleId(locale);
        }

        return locale;
      }
      /**
       * Work out the locale from the potential global properties.
       *
       * * Closure Compiler: use `goog.LOCALE`.
       * * Ivy enabled: use `$localize.locale`
       */


      function getGlobalLocale() {
        if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode && typeof goog !== 'undefined' && goog.LOCALE !== 'en') {
          // * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.
          // * In order to preserve backwards compatibility, we use Angular default value over
          //   Closure Compiler's one.
          return goog.LOCALE;
        } else {
          // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
          // COMPILE-TIME INLINER.
          //
          // * During compile time inlining of translations the expression will be replaced
          //   with a string literal that is the current locale. Other forms of this expression are not
          //   guaranteed to be replaced.
          //
          // * During runtime translation evaluation, the developer is required to set `$localize.locale`
          //   if required, or just to provide their own `LOCALE_ID` provider.
          return ivyEnabled && typeof $localize !== 'undefined' && $localize.locale || DEFAULT_LOCALE_ID;
        }
      }

      var ɵ0$f = USD_CURRENCY_CODE;
      /**
       * A built-in [dependency injection token](guide/glossary#di-token)
       * that is used to configure the root injector for bootstrapping.
       */

      var APPLICATION_MODULE_PROVIDERS = [{
        provide: ApplicationRef,
        useClass: ApplicationRef,
        deps: [NgZone, Console, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]
      }, {
        provide: SCHEDULER,
        deps: [NgZone],
        useFactory: zoneSchedulerFactory
      }, {
        provide: ApplicationInitStatus,
        useClass: ApplicationInitStatus,
        deps: [[new Optional(), APP_INITIALIZER]]
      }, {
        provide: Compiler,
        useClass: Compiler,
        deps: []
      }, APP_ID_RANDOM_PROVIDER, {
        provide: IterableDiffers,
        useFactory: _iterableDiffersFactory,
        deps: []
      }, {
        provide: KeyValueDiffers,
        useFactory: _keyValueDiffersFactory,
        deps: []
      }, {
        provide: LOCALE_ID$1,
        useFactory: _localeFactory,
        deps: [[new Inject(LOCALE_ID$1), new Optional(), new SkipSelf()]]
      }, {
        provide: DEFAULT_CURRENCY_CODE,
        useValue: ɵ0$f
      }];
      /**
       * Schedule work at next available slot.
       *
       * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped
       * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.
       * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.
       *
       * @param ngZone NgZone to use for scheduling.
       */

      function zoneSchedulerFactory(ngZone) {
        var queue = [];
        ngZone.onStable.subscribe(function () {
          while (queue.length) {
            queue.pop()();
          }
        });
        return function (fn) {
          queue.push(fn);
        };
      }
      /**
       * Configures the root injector for an app with
       * providers of `@angular/core` dependencies that `ApplicationRef` needs
       * to bootstrap components.
       *
       * Re-exported by `BrowserModule`, which is included automatically in the root
       * `AppModule` when you create a new app with the CLI `new` command.
       *
       * @publicApi
       */


      var ApplicationModule = // Inject ApplicationRef to make it eager...
      function ApplicationModule(appRef) {
        _classCallCheck(this, ApplicationModule);
      };

      ApplicationModule.ɵmod = ɵɵdefineNgModule({
        type: ApplicationModule
      });
      ApplicationModule.ɵinj = ɵɵdefineInjector({
        factory: function ApplicationModule_Factory(t) {
          return new (t || ApplicationModule)(ɵɵinject(ApplicationRef));
        },
        providers: APPLICATION_MODULE_PROVIDERS
      });

      ApplicationModule.ctorParameters = function () {
        return [{
          type: ApplicationRef
        }];
      };
      /*@__PURE__*/


      (function () {
        setClassMetadata(ApplicationModule, [{
          type: NgModule,
          args: [{
            providers: APPLICATION_MODULE_PROVIDERS
          }]
        }], function () {
          return [{
            type: ApplicationRef
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function anchorDef(flags, matchedQueriesDsl, ngContentIndex, childCount, handleEvent, templateFactory) {
        flags |= 1
        /* TypeElement */
        ;

        var _splitMatchedQueriesD2 = splitMatchedQueriesDsl(matchedQueriesDsl),
            matchedQueries = _splitMatchedQueriesD2.matchedQueries,
            references = _splitMatchedQueriesD2.references,
            matchedQueryIds = _splitMatchedQueriesD2.matchedQueryIds;

        var template = templateFactory ? resolveDefinition(templateFactory) : null;
        return {
          // will bet set by the view definition
          nodeIndex: -1,
          parent: null,
          renderParent: null,
          bindingIndex: -1,
          outputIndex: -1,
          // regular values
          flags: flags,
          checkIndex: -1,
          childFlags: 0,
          directChildFlags: 0,
          childMatchedQueries: 0,
          matchedQueries: matchedQueries,
          matchedQueryIds: matchedQueryIds,
          references: references,
          ngContentIndex: ngContentIndex,
          childCount: childCount,
          bindings: [],
          bindingFlags: 0,
          outputs: [],
          element: {
            ns: null,
            name: null,
            attrs: null,
            template: template,
            componentProvider: null,
            componentView: null,
            componentRendererType: null,
            publicProviders: null,
            allProviders: null,
            handleEvent: handleEvent || NOOP
          },
          provider: null,
          text: null,
          query: null,
          ngContent: null
        };
      }

      function elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childCount, namespaceAndName) {
        var fixedAttrs = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [];
        var bindings = arguments.length > 7 ? arguments[7] : undefined;
        var outputs = arguments.length > 8 ? arguments[8] : undefined;
        var handleEvent = arguments.length > 9 ? arguments[9] : undefined;
        var componentView = arguments.length > 10 ? arguments[10] : undefined;
        var componentRendererType = arguments.length > 11 ? arguments[11] : undefined;

        if (!handleEvent) {
          handleEvent = NOOP;
        }

        var _splitMatchedQueriesD3 = splitMatchedQueriesDsl(matchedQueriesDsl),
            matchedQueries = _splitMatchedQueriesD3.matchedQueries,
            references = _splitMatchedQueriesD3.references,
            matchedQueryIds = _splitMatchedQueriesD3.matchedQueryIds;

        var ns = null;
        var name = null;

        if (namespaceAndName) {
          var _splitNamespace = splitNamespace(namespaceAndName);

          var _splitNamespace2 = _slicedToArray(_splitNamespace, 2);

          ns = _splitNamespace2[0];
          name = _splitNamespace2[1];
        }

        bindings = bindings || [];
        var bindingDefs = [];

        for (var i = 0; i < bindings.length; i++) {
          var _bindings$i = _slicedToArray(bindings[i], 3),
              bindingFlags = _bindings$i[0],
              _namespaceAndName = _bindings$i[1],
              suffixOrSecurityContext = _bindings$i[2];

          var _splitNamespace3 = splitNamespace(_namespaceAndName),
              _splitNamespace4 = _slicedToArray(_splitNamespace3, 2),
              _ns = _splitNamespace4[0],
              _name = _splitNamespace4[1];

          var securityContext = undefined;
          var suffix = undefined;

          switch (bindingFlags & 15
          /* Types */
          ) {
            case 4
            /* TypeElementStyle */
            :
              suffix = suffixOrSecurityContext;
              break;

            case 1
            /* TypeElementAttribute */
            :
            case 8
            /* TypeProperty */
            :
              securityContext = suffixOrSecurityContext;
              break;
          }

          bindingDefs[i] = {
            flags: bindingFlags,
            ns: _ns,
            name: _name,
            nonMinifiedName: _name,
            securityContext: securityContext,
            suffix: suffix
          };
        }

        outputs = outputs || [];
        var outputDefs = [];

        for (var _i33 = 0; _i33 < outputs.length; _i33++) {
          var _outputs$_i = _slicedToArray(outputs[_i33], 2),
              target = _outputs$_i[0],
              eventName = _outputs$_i[1];

          outputDefs[_i33] = {
            type: 0
            /* ElementOutput */
            ,
            target: target,
            eventName: eventName,
            propName: null
          };
        }

        fixedAttrs = fixedAttrs || [];
        var attrs = fixedAttrs.map(function (_ref89) {
          var _ref90 = _slicedToArray(_ref89, 2),
              namespaceAndName = _ref90[0],
              value = _ref90[1];

          var _splitNamespace5 = splitNamespace(namespaceAndName),
              _splitNamespace6 = _slicedToArray(_splitNamespace5, 2),
              ns = _splitNamespace6[0],
              name = _splitNamespace6[1];

          return [ns, name, value];
        });
        componentRendererType = resolveRendererType2(componentRendererType);

        if (componentView) {
          flags |= 33554432
          /* ComponentView */
          ;
        }

        flags |= 1
        /* TypeElement */
        ;
        return {
          // will bet set by the view definition
          nodeIndex: -1,
          parent: null,
          renderParent: null,
          bindingIndex: -1,
          outputIndex: -1,
          // regular values
          checkIndex: checkIndex,
          flags: flags,
          childFlags: 0,
          directChildFlags: 0,
          childMatchedQueries: 0,
          matchedQueries: matchedQueries,
          matchedQueryIds: matchedQueryIds,
          references: references,
          ngContentIndex: ngContentIndex,
          childCount: childCount,
          bindings: bindingDefs,
          bindingFlags: calcBindingFlags(bindingDefs),
          outputs: outputDefs,
          element: {
            ns: ns,
            name: name,
            attrs: attrs,
            template: null,
            // will bet set by the view definition
            componentProvider: null,
            componentView: componentView || null,
            componentRendererType: componentRendererType,
            publicProviders: null,
            allProviders: null,
            handleEvent: handleEvent || NOOP
          },
          provider: null,
          text: null,
          query: null,
          ngContent: null
        };
      }

      function createElement(view, renderHost, def) {
        var elDef = def.element;
        var rootSelectorOrNode = view.root.selectorOrNode;
        var renderer = view.renderer;
        var el;

        if (view.parent || !rootSelectorOrNode) {
          if (elDef.name) {
            el = renderer.createElement(elDef.name, elDef.ns);
          } else {
            el = renderer.createComment('');
          }

          var parentEl = getParentRenderElement(view, renderHost, def);

          if (parentEl) {
            renderer.appendChild(parentEl, el);
          }
        } else {
          // when using native Shadow DOM, do not clear the root element contents to allow slot projection
          var preserveContent = !!elDef.componentRendererType && elDef.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom;
          el = renderer.selectRootElement(rootSelectorOrNode, preserveContent);
        }

        if (elDef.attrs) {
          for (var i = 0; i < elDef.attrs.length; i++) {
            var _elDef$attrs$i = _slicedToArray(elDef.attrs[i], 3),
                ns = _elDef$attrs$i[0],
                name = _elDef$attrs$i[1],
                value = _elDef$attrs$i[2];

            renderer.setAttribute(el, name, value, ns);
          }
        }

        return el;
      }

      function listenToElementOutputs(view, compView, def, el) {
        for (var i = 0; i < def.outputs.length; i++) {
          var output = def.outputs[i];
          var handleEventClosure = renderEventHandlerClosure(view, def.nodeIndex, elementEventFullName(output.target, output.eventName));
          var listenTarget = output.target;
          var listenerView = view;

          if (output.target === 'component') {
            listenTarget = null;
            listenerView = compView;
          }

          var disposable = listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);
          view.disposables[def.outputIndex + i] = disposable;
        }
      }

      function renderEventHandlerClosure(view, index, eventName) {
        return function (event) {
          return dispatchEvent(view, index, eventName, event);
        };
      }

      function checkAndUpdateElementInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
        var bindLen = def.bindings.length;
        var changed = false;
        if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0)) changed = true;
        if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1)) changed = true;
        if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2)) changed = true;
        if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3)) changed = true;
        if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4)) changed = true;
        if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5)) changed = true;
        if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6)) changed = true;
        if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7)) changed = true;
        if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8)) changed = true;
        if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9)) changed = true;
        return changed;
      }

      function checkAndUpdateElementDynamic(view, def, values) {
        var changed = false;

        for (var i = 0; i < values.length; i++) {
          if (checkAndUpdateElementValue(view, def, i, values[i])) changed = true;
        }

        return changed;
      }

      function checkAndUpdateElementValue(view, def, bindingIdx, value) {
        if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {
          return false;
        }

        var binding = def.bindings[bindingIdx];
        var elData = asElementData(view, def.nodeIndex);
        var renderNode = elData.renderElement;
        var name = binding.name;

        switch (binding.flags & 15
        /* Types */
        ) {
          case 1
          /* TypeElementAttribute */
          :
            setElementAttribute$1(view, binding, renderNode, binding.ns, name, value);
            break;

          case 2
          /* TypeElementClass */
          :
            setElementClass(view, renderNode, name, value);
            break;

          case 4
          /* TypeElementStyle */
          :
            setElementStyle(view, binding, renderNode, name, value);
            break;

          case 8
          /* TypeProperty */
          :
            var bindView = def.flags & 33554432
            /* ComponentView */
            && binding.flags & 32
            /* SyntheticHostProperty */
            ? elData.componentView : view;
            setElementProperty(bindView, binding, renderNode, name, value);
            break;
        }

        return true;
      }

      function setElementAttribute$1(view, binding, renderNode, ns, name, value) {
        var securityContext = binding.securityContext;
        var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;
        renderValue = renderValue != null ? renderValue.toString() : null;
        var renderer = view.renderer;

        if (value != null) {
          renderer.setAttribute(renderNode, name, renderValue, ns);
        } else {
          renderer.removeAttribute(renderNode, name, ns);
        }
      }

      function setElementClass(view, renderNode, name, value) {
        var renderer = view.renderer;

        if (value) {
          renderer.addClass(renderNode, name);
        } else {
          renderer.removeClass(renderNode, name);
        }
      }

      function setElementStyle(view, binding, renderNode, name, value) {
        var renderValue = view.root.sanitizer.sanitize(SecurityContext.STYLE, value);

        if (renderValue != null) {
          renderValue = renderValue.toString();
          var unit = binding.suffix;

          if (unit != null) {
            renderValue = renderValue + unit;
          }
        } else {
          renderValue = null;
        }

        var renderer = view.renderer;

        if (renderValue != null) {
          renderer.setStyle(renderNode, name, renderValue);
        } else {
          renderer.removeStyle(renderNode, name);
        }
      }

      function setElementProperty(view, binding, renderNode, name, value) {
        var securityContext = binding.securityContext;
        var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;
        view.renderer.setProperty(renderNode, name, renderValue);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function queryDef(flags, id, bindings) {
        var bindingDefs = [];

        for (var propName in bindings) {
          var bindingType = bindings[propName];
          bindingDefs.push({
            propName: propName,
            bindingType: bindingType
          });
        }

        return {
          // will bet set by the view definition
          nodeIndex: -1,
          parent: null,
          renderParent: null,
          bindingIndex: -1,
          outputIndex: -1,
          // regular values
          // TODO(vicb): check
          checkIndex: -1,
          flags: flags,
          childFlags: 0,
          directChildFlags: 0,
          childMatchedQueries: 0,
          ngContentIndex: -1,
          matchedQueries: {},
          matchedQueryIds: 0,
          references: {},
          childCount: 0,
          bindings: [],
          bindingFlags: 0,
          outputs: [],
          element: null,
          provider: null,
          text: null,
          query: {
            id: id,
            filterId: filterQueryId(id),
            bindings: bindingDefs
          },
          ngContent: null
        };
      }

      function createQuery() {
        return new QueryList();
      }

      function dirtyParentQueries(view) {
        var queryIds = view.def.nodeMatchedQueries;

        while (view.parent && isEmbeddedView(view)) {
          var tplDef = view.parentNodeDef;
          view = view.parent; // content queries

          var end = tplDef.nodeIndex + tplDef.childCount;

          for (var i = 0; i <= end; i++) {
            var nodeDef = view.def.nodes[i];

            if (nodeDef.flags & 67108864
            /* TypeContentQuery */
            && nodeDef.flags & 536870912
            /* DynamicQuery */
            && (nodeDef.query.filterId & queryIds) === nodeDef.query.filterId) {
              asQueryList(view, i).setDirty();
            }

            if (nodeDef.flags & 1
            /* TypeElement */
            && i + nodeDef.childCount < tplDef.nodeIndex || !(nodeDef.childFlags & 67108864
            /* TypeContentQuery */
            ) || !(nodeDef.childFlags & 536870912
            /* DynamicQuery */
            )) {
              // skip elements that don't contain the template element or no query.
              i += nodeDef.childCount;
            }
          }
        } // view queries


        if (view.def.nodeFlags & 134217728
        /* TypeViewQuery */
        ) {
          for (var _i34 = 0; _i34 < view.def.nodes.length; _i34++) {
            var _nodeDef = view.def.nodes[_i34];

            if (_nodeDef.flags & 134217728
            /* TypeViewQuery */
            && _nodeDef.flags & 536870912
            /* DynamicQuery */
            ) {
              asQueryList(view, _i34).setDirty();
            } // only visit the root nodes


            _i34 += _nodeDef.childCount;
          }
        }
      }

      function checkAndUpdateQuery(view, nodeDef) {
        var queryList = asQueryList(view, nodeDef.nodeIndex);

        if (!queryList.dirty) {
          return;
        }

        var directiveInstance;
        var newValues = undefined;

        if (nodeDef.flags & 67108864
        /* TypeContentQuery */
        ) {
          var _elementDef = nodeDef.parent.parent;
          newValues = calcQueryValues(view, _elementDef.nodeIndex, _elementDef.nodeIndex + _elementDef.childCount, nodeDef.query, []);
          directiveInstance = asProviderData(view, nodeDef.parent.nodeIndex).instance;
        } else if (nodeDef.flags & 134217728
        /* TypeViewQuery */
        ) {
          newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query, []);
          directiveInstance = view.component;
        }

        queryList.reset(newValues);
        var bindings = nodeDef.query.bindings;
        var notify = false;

        for (var i = 0; i < bindings.length; i++) {
          var binding = bindings[i];
          var boundValue = void 0;

          switch (binding.bindingType) {
            case 0
            /* First */
            :
              boundValue = queryList.first;
              break;

            case 1
            /* All */
            :
              boundValue = queryList;
              notify = true;
              break;
          }

          directiveInstance[binding.propName] = boundValue;
        }

        if (notify) {
          queryList.notifyOnChanges();
        }
      }

      function calcQueryValues(view, startIndex, endIndex, queryDef, values) {
        for (var i = startIndex; i <= endIndex; i++) {
          var nodeDef = view.def.nodes[i];
          var valueType = nodeDef.matchedQueries[queryDef.id];

          if (valueType != null) {
            values.push(getQueryValue(view, nodeDef, valueType));
          }

          if (nodeDef.flags & 1
          /* TypeElement */
          && nodeDef.element.template && (nodeDef.element.template.nodeMatchedQueries & queryDef.filterId) === queryDef.filterId) {
            var elementData = asElementData(view, i); // check embedded views that were attached at the place of their template,
            // but process child nodes first if some match the query (see issue #16568)

            if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {
              calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);
              i += nodeDef.childCount;
            }

            if (nodeDef.flags & 16777216
            /* EmbeddedViews */
            ) {
              var embeddedViews = elementData.viewContainer._embeddedViews;

              for (var k = 0; k < embeddedViews.length; k++) {
                var embeddedView = embeddedViews[k];
                var dvc = declaredViewContainer(embeddedView);

                if (dvc && dvc === elementData) {
                  calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);
                }
              }
            }

            var projectedViews = elementData.template._projectedViews;

            if (projectedViews) {
              for (var _k = 0; _k < projectedViews.length; _k++) {
                var projectedView = projectedViews[_k];
                calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);
              }
            }
          }

          if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) {
            // if no child matches the query, skip the children.
            i += nodeDef.childCount;
          }
        }

        return values;
      }

      function getQueryValue(view, nodeDef, queryValueType) {
        if (queryValueType != null) {
          // a match
          switch (queryValueType) {
            case 1
            /* RenderElement */
            :
              return asElementData(view, nodeDef.nodeIndex).renderElement;

            case 0
            /* ElementRef */
            :
              return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);

            case 2
            /* TemplateRef */
            :
              return asElementData(view, nodeDef.nodeIndex).template;

            case 3
            /* ViewContainerRef */
            :
              return asElementData(view, nodeDef.nodeIndex).viewContainer;

            case 4
            /* Provider */
            :
              return asProviderData(view, nodeDef.nodeIndex).instance;
          }
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function ngContentDef(ngContentIndex, index) {
        return {
          // will bet set by the view definition
          nodeIndex: -1,
          parent: null,
          renderParent: null,
          bindingIndex: -1,
          outputIndex: -1,
          // regular values
          checkIndex: -1,
          flags: 8
          /* TypeNgContent */
          ,
          childFlags: 0,
          directChildFlags: 0,
          childMatchedQueries: 0,
          matchedQueries: {},
          matchedQueryIds: 0,
          references: {},
          ngContentIndex: ngContentIndex,
          childCount: 0,
          bindings: [],
          bindingFlags: 0,
          outputs: [],
          element: null,
          provider: null,
          text: null,
          query: null,
          ngContent: {
            index: index
          }
        };
      }

      function appendNgContent(view, renderHost, def) {
        var parentEl = getParentRenderElement(view, renderHost, def);

        if (!parentEl) {
          // Nothing to do if there is no parent element.
          return;
        }

        var ngContentIndex = def.ngContent.index;
        visitProjectedRenderNodes(view, ngContentIndex, 1
        /* AppendChild */
        , parentEl, null, undefined);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function purePipeDef(checkIndex, argCount) {
        // argCount + 1 to include the pipe as first arg
        return _pureExpressionDef(128
        /* TypePurePipe */
        , checkIndex, newArray(argCount + 1));
      }

      function pureArrayDef(checkIndex, argCount) {
        return _pureExpressionDef(32
        /* TypePureArray */
        , checkIndex, newArray(argCount));
      }

      function pureObjectDef(checkIndex, propToIndex) {
        var keys = Object.keys(propToIndex);
        var nbKeys = keys.length;
        var propertyNames = [];

        for (var i = 0; i < nbKeys; i++) {
          var key = keys[i];
          var index = propToIndex[key];
          propertyNames.push(key);
        }

        return _pureExpressionDef(64
        /* TypePureObject */
        , checkIndex, propertyNames);
      }

      function _pureExpressionDef(flags, checkIndex, propertyNames) {
        var bindings = [];

        for (var i = 0; i < propertyNames.length; i++) {
          var prop = propertyNames[i];
          bindings.push({
            flags: 8
            /* TypeProperty */
            ,
            name: prop,
            ns: null,
            nonMinifiedName: prop,
            securityContext: null,
            suffix: null
          });
        }

        return {
          // will bet set by the view definition
          nodeIndex: -1,
          parent: null,
          renderParent: null,
          bindingIndex: -1,
          outputIndex: -1,
          // regular values
          checkIndex: checkIndex,
          flags: flags,
          childFlags: 0,
          directChildFlags: 0,
          childMatchedQueries: 0,
          matchedQueries: {},
          matchedQueryIds: 0,
          references: {},
          ngContentIndex: -1,
          childCount: 0,
          bindings: bindings,
          bindingFlags: calcBindingFlags(bindings),
          outputs: [],
          element: null,
          provider: null,
          text: null,
          query: null,
          ngContent: null
        };
      }

      function createPureExpression(view, def) {
        return {
          value: undefined
        };
      }

      function checkAndUpdatePureExpressionInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
        var bindings = def.bindings;
        var changed = false;
        var bindLen = bindings.length;
        if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true;
        if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true;
        if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true;
        if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true;
        if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true;
        if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true;
        if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true;
        if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true;
        if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true;
        if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true;

        if (changed) {
          var data = asPureExpressionData(view, def.nodeIndex);
          var value;

          switch (def.flags & 201347067
          /* Types */
          ) {
            case 32
            /* TypePureArray */
            :
              value = [];
              if (bindLen > 0) value.push(v0);
              if (bindLen > 1) value.push(v1);
              if (bindLen > 2) value.push(v2);
              if (bindLen > 3) value.push(v3);
              if (bindLen > 4) value.push(v4);
              if (bindLen > 5) value.push(v5);
              if (bindLen > 6) value.push(v6);
              if (bindLen > 7) value.push(v7);
              if (bindLen > 8) value.push(v8);
              if (bindLen > 9) value.push(v9);
              break;

            case 64
            /* TypePureObject */
            :
              value = {};
              if (bindLen > 0) value[bindings[0].name] = v0;
              if (bindLen > 1) value[bindings[1].name] = v1;
              if (bindLen > 2) value[bindings[2].name] = v2;
              if (bindLen > 3) value[bindings[3].name] = v3;
              if (bindLen > 4) value[bindings[4].name] = v4;
              if (bindLen > 5) value[bindings[5].name] = v5;
              if (bindLen > 6) value[bindings[6].name] = v6;
              if (bindLen > 7) value[bindings[7].name] = v7;
              if (bindLen > 8) value[bindings[8].name] = v8;
              if (bindLen > 9) value[bindings[9].name] = v9;
              break;

            case 128
            /* TypePurePipe */
            :
              var pipe = v0;

              switch (bindLen) {
                case 1:
                  value = pipe.transform(v0);
                  break;

                case 2:
                  value = pipe.transform(v1);
                  break;

                case 3:
                  value = pipe.transform(v1, v2);
                  break;

                case 4:
                  value = pipe.transform(v1, v2, v3);
                  break;

                case 5:
                  value = pipe.transform(v1, v2, v3, v4);
                  break;

                case 6:
                  value = pipe.transform(v1, v2, v3, v4, v5);
                  break;

                case 7:
                  value = pipe.transform(v1, v2, v3, v4, v5, v6);
                  break;

                case 8:
                  value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);
                  break;

                case 9:
                  value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);
                  break;

                case 10:
                  value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);
                  break;
              }

              break;
          }

          data.value = value;
        }

        return changed;
      }

      function checkAndUpdatePureExpressionDynamic(view, def, values) {
        var bindings = def.bindings;
        var changed = false;

        for (var i = 0; i < values.length; i++) {
          // Note: We need to loop over all values, so that
          // the old values are updates as well!
          if (checkAndUpdateBinding(view, def, i, values[i])) {
            changed = true;
          }
        }

        if (changed) {
          var data = asPureExpressionData(view, def.nodeIndex);
          var value;

          switch (def.flags & 201347067
          /* Types */
          ) {
            case 32
            /* TypePureArray */
            :
              value = values;
              break;

            case 64
            /* TypePureObject */
            :
              value = {};

              for (var _i35 = 0; _i35 < values.length; _i35++) {
                value[bindings[_i35].name] = values[_i35];
              }

              break;

            case 128
            /* TypePurePipe */
            :
              var pipe = values[0];
              var params = values.slice(1);
              value = pipe.transform.apply(pipe, _toConsumableArray(params));
              break;
          }

          data.value = value;
        }

        return changed;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function textDef(checkIndex, ngContentIndex, staticText) {
        var bindings = [];

        for (var i = 1; i < staticText.length; i++) {
          bindings[i - 1] = {
            flags: 8
            /* TypeProperty */
            ,
            name: null,
            ns: null,
            nonMinifiedName: null,
            securityContext: null,
            suffix: staticText[i]
          };
        }

        return {
          // will bet set by the view definition
          nodeIndex: -1,
          parent: null,
          renderParent: null,
          bindingIndex: -1,
          outputIndex: -1,
          // regular values
          checkIndex: checkIndex,
          flags: 2
          /* TypeText */
          ,
          childFlags: 0,
          directChildFlags: 0,
          childMatchedQueries: 0,
          matchedQueries: {},
          matchedQueryIds: 0,
          references: {},
          ngContentIndex: ngContentIndex,
          childCount: 0,
          bindings: bindings,
          bindingFlags: 8
          /* TypeProperty */
          ,
          outputs: [],
          element: null,
          provider: null,
          text: {
            prefix: staticText[0]
          },
          query: null,
          ngContent: null
        };
      }

      function createText(view, renderHost, def) {
        var renderNode;
        var renderer = view.renderer;
        renderNode = renderer.createText(def.text.prefix);
        var parentEl = getParentRenderElement(view, renderHost, def);

        if (parentEl) {
          renderer.appendChild(parentEl, renderNode);
        }

        return {
          renderText: renderNode
        };
      }

      function checkAndUpdateTextInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
        var changed = false;
        var bindings = def.bindings;
        var bindLen = bindings.length;
        if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true;
        if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true;
        if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true;
        if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true;
        if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true;
        if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true;
        if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true;
        if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true;
        if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true;
        if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true;

        if (changed) {
          var value = def.text.prefix;
          if (bindLen > 0) value += _addInterpolationPart(v0, bindings[0]);
          if (bindLen > 1) value += _addInterpolationPart(v1, bindings[1]);
          if (bindLen > 2) value += _addInterpolationPart(v2, bindings[2]);
          if (bindLen > 3) value += _addInterpolationPart(v3, bindings[3]);
          if (bindLen > 4) value += _addInterpolationPart(v4, bindings[4]);
          if (bindLen > 5) value += _addInterpolationPart(v5, bindings[5]);
          if (bindLen > 6) value += _addInterpolationPart(v6, bindings[6]);
          if (bindLen > 7) value += _addInterpolationPart(v7, bindings[7]);
          if (bindLen > 8) value += _addInterpolationPart(v8, bindings[8]);
          if (bindLen > 9) value += _addInterpolationPart(v9, bindings[9]);
          var _renderNode = asTextData(view, def.nodeIndex).renderText;
          view.renderer.setValue(_renderNode, value);
        }

        return changed;
      }

      function checkAndUpdateTextDynamic(view, def, values) {
        var bindings = def.bindings;
        var changed = false;

        for (var i = 0; i < values.length; i++) {
          // Note: We need to loop over all values, so that
          // the old values are updates as well!
          if (checkAndUpdateBinding(view, def, i, values[i])) {
            changed = true;
          }
        }

        if (changed) {
          var value = '';

          for (var _i36 = 0; _i36 < values.length; _i36++) {
            value = value + _addInterpolationPart(values[_i36], bindings[_i36]);
          }

          value = def.text.prefix + value;
          var _renderNode2 = asTextData(view, def.nodeIndex).renderText;
          view.renderer.setValue(_renderNode2, value);
        }

        return changed;
      }

      function _addInterpolationPart(value, binding) {
        var valueStr = value != null ? value.toString() : '';
        return valueStr + binding.suffix;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function viewDef(flags, nodes, updateDirectives, updateRenderer) {
        // clone nodes and set auto calculated values
        var viewBindingCount = 0;
        var viewDisposableCount = 0;
        var viewNodeFlags = 0;
        var viewRootNodeFlags = 0;
        var viewMatchedQueries = 0;
        var currentParent = null;
        var currentRenderParent = null;
        var currentElementHasPublicProviders = false;
        var currentElementHasPrivateProviders = false;
        var lastRenderRootNode = null;

        for (var i = 0; i < nodes.length; i++) {
          var node = nodes[i];
          node.nodeIndex = i;
          node.parent = currentParent;
          node.bindingIndex = viewBindingCount;
          node.outputIndex = viewDisposableCount;
          node.renderParent = currentRenderParent;
          viewNodeFlags |= node.flags;
          viewMatchedQueries |= node.matchedQueryIds;

          if (node.element) {
            var elDef = node.element;
            elDef.publicProviders = currentParent ? currentParent.element.publicProviders : Object.create(null);
            elDef.allProviders = elDef.publicProviders; // Note: We assume that all providers of an element are before any child element!

            currentElementHasPublicProviders = false;
            currentElementHasPrivateProviders = false;

            if (node.element.template) {
              viewMatchedQueries |= node.element.template.nodeMatchedQueries;
            }
          }

          validateNode(currentParent, node, nodes.length);
          viewBindingCount += node.bindings.length;
          viewDisposableCount += node.outputs.length;

          if (!currentRenderParent && node.flags & 3
          /* CatRenderNode */
          ) {
            lastRenderRootNode = node;
          }

          if (node.flags & 20224
          /* CatProvider */
          ) {
            if (!currentElementHasPublicProviders) {
              currentElementHasPublicProviders = true; // Use prototypical inheritance to not get O(n^2) complexity...

              currentParent.element.publicProviders = Object.create(currentParent.element.publicProviders);
              currentParent.element.allProviders = currentParent.element.publicProviders;
            }

            var isPrivateService = (node.flags & 8192
            /* PrivateProvider */
            ) !== 0;
            var isComponent = (node.flags & 32768
            /* Component */
            ) !== 0;

            if (!isPrivateService || isComponent) {
              currentParent.element.publicProviders[tokenKey(node.provider.token)] = node;
            } else {
              if (!currentElementHasPrivateProviders) {
                currentElementHasPrivateProviders = true; // Use prototypical inheritance to not get O(n^2) complexity...

                currentParent.element.allProviders = Object.create(currentParent.element.publicProviders);
              }

              currentParent.element.allProviders[tokenKey(node.provider.token)] = node;
            }

            if (isComponent) {
              currentParent.element.componentProvider = node;
            }
          }

          if (currentParent) {
            currentParent.childFlags |= node.flags;
            currentParent.directChildFlags |= node.flags;
            currentParent.childMatchedQueries |= node.matchedQueryIds;

            if (node.element && node.element.template) {
              currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;
            }
          } else {
            viewRootNodeFlags |= node.flags;
          }

          if (node.childCount > 0) {
            currentParent = node;

            if (!isNgContainer(node)) {
              currentRenderParent = node;
            }
          } else {
            // When the current node has no children, check if it is the last children of its parent.
            // When it is, propagate the flags up.
            // The loop is required because an element could be the last transitive children of several
            // elements. We loop to either the root or the highest opened element (= with remaining
            // children)
            while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) {
              var newParent = currentParent.parent;

              if (newParent) {
                newParent.childFlags |= currentParent.childFlags;
                newParent.childMatchedQueries |= currentParent.childMatchedQueries;
              }

              currentParent = newParent; // We also need to update the render parent & account for ng-container

              if (currentParent && isNgContainer(currentParent)) {
                currentRenderParent = currentParent.renderParent;
              } else {
                currentRenderParent = currentParent;
              }
            }
          }
        }

        var handleEvent = function handleEvent(view, nodeIndex, eventName, event) {
          return nodes[nodeIndex].element.handleEvent(view, eventName, event);
        };

        return {
          // Will be filled later...
          factory: null,
          nodeFlags: viewNodeFlags,
          rootNodeFlags: viewRootNodeFlags,
          nodeMatchedQueries: viewMatchedQueries,
          flags: flags,
          nodes: nodes,
          updateDirectives: updateDirectives || NOOP,
          updateRenderer: updateRenderer || NOOP,
          handleEvent: handleEvent,
          bindingCount: viewBindingCount,
          outputCount: viewDisposableCount,
          lastRenderRootNode: lastRenderRootNode
        };
      }

      function isNgContainer(node) {
        return (node.flags & 1
        /* TypeElement */
        ) !== 0 && node.element.name === null;
      }

      function validateNode(parent, node, nodeCount) {
        var template = node.element && node.element.template;

        if (template) {
          if (!template.lastRenderRootNode) {
            throw new Error("Illegal State: Embedded templates without nodes are not allowed!");
          }

          if (template.lastRenderRootNode && template.lastRenderRootNode.flags & 16777216
          /* EmbeddedViews */
          ) {
            throw new Error("Illegal State: Last root node of a template can't have embedded views, at index ".concat(node.nodeIndex, "!"));
          }
        }

        if (node.flags & 20224
        /* CatProvider */
        ) {
          var parentFlags = parent ? parent.flags : 0;

          if ((parentFlags & 1
          /* TypeElement */
          ) === 0) {
            throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index ".concat(node.nodeIndex, "!"));
          }
        }

        if (node.query) {
          if (node.flags & 67108864
          /* TypeContentQuery */
          && (!parent || (parent.flags & 16384
          /* TypeDirective */
          ) === 0)) {
            throw new Error("Illegal State: Content Query nodes need to be children of directives, at index ".concat(node.nodeIndex, "!"));
          }

          if (node.flags & 134217728
          /* TypeViewQuery */
          && parent) {
            throw new Error("Illegal State: View Query nodes have to be top level nodes, at index ".concat(node.nodeIndex, "!"));
          }
        }

        if (node.childCount) {
          var parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;

          if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {
            throw new Error("Illegal State: childCount of node leads outside of parent, at index ".concat(node.nodeIndex, "!"));
          }
        }
      }

      function createEmbeddedView(parent, anchorDef, viewDef, context) {
        // embedded views are seen as siblings to the anchor, so we need
        // to get the parent of the anchor and use it as parentIndex.
        var view = createView(parent.root, parent.renderer, parent, anchorDef, viewDef);
        initView(view, parent.component, context);
        createViewNodes(view);
        return view;
      }

      function createRootView(root, def, context) {
        var view = createView(root, root.renderer, null, null, def);
        initView(view, context, context);
        createViewNodes(view);
        return view;
      }

      function createComponentView(parentView, nodeDef, viewDef, hostElement) {
        var rendererType = nodeDef.element.componentRendererType;
        var compRenderer;

        if (!rendererType) {
          compRenderer = parentView.root.renderer;
        } else {
          compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);
        }

        return createView(parentView.root, compRenderer, parentView, nodeDef.element.componentProvider, viewDef);
      }

      function createView(root, renderer, parent, parentNodeDef, def) {
        var nodes = new Array(def.nodes.length);
        var disposables = def.outputCount ? new Array(def.outputCount) : null;
        var view = {
          def: def,
          parent: parent,
          viewContainerParent: null,
          parentNodeDef: parentNodeDef,
          context: null,
          component: null,
          nodes: nodes,
          state: 13
          /* CatInit */
          ,
          root: root,
          renderer: renderer,
          oldValues: new Array(def.bindingCount),
          disposables: disposables,
          initIndex: -1
        };
        return view;
      }

      function initView(view, component, context) {
        view.component = component;
        view.context = context;
      }

      function createViewNodes(view) {
        var renderHost;

        if (isComponentView(view)) {
          var hostDef = view.parentNodeDef;
          renderHost = asElementData(view.parent, hostDef.parent.nodeIndex).renderElement;
        }

        var def = view.def;
        var nodes = view.nodes;

        for (var i = 0; i < def.nodes.length; i++) {
          var nodeDef = def.nodes[i];
          Services.setCurrentNode(view, i);
          var nodeData = void 0;

          switch (nodeDef.flags & 201347067
          /* Types */
          ) {
            case 1
            /* TypeElement */
            :
              var el = createElement(view, renderHost, nodeDef);
              var componentView = undefined;

              if (nodeDef.flags & 33554432
              /* ComponentView */
              ) {
                var compViewDef = resolveDefinition(nodeDef.element.componentView);
                componentView = Services.createComponentView(view, nodeDef, compViewDef, el);
              }

              listenToElementOutputs(view, componentView, nodeDef, el);
              nodeData = {
                renderElement: el,
                componentView: componentView,
                viewContainer: null,
                template: nodeDef.element.template ? createTemplateData(view, nodeDef) : undefined
              };

              if (nodeDef.flags & 16777216
              /* EmbeddedViews */
              ) {
                nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);
              }

              break;

            case 2
            /* TypeText */
            :
              nodeData = createText(view, renderHost, nodeDef);
              break;

            case 512
            /* TypeClassProvider */
            :
            case 1024
            /* TypeFactoryProvider */
            :
            case 2048
            /* TypeUseExistingProvider */
            :
            case 256
            /* TypeValueProvider */
            :
              {
                nodeData = nodes[i];

                if (!nodeData && !(nodeDef.flags & 4096
                /* LazyProvider */
                )) {
                  var instance = createProviderInstance(view, nodeDef);
                  nodeData = {
                    instance: instance
                  };
                }

                break;
              }

            case 16
            /* TypePipe */
            :
              {
                var _instance = createPipeInstance(view, nodeDef);

                nodeData = {
                  instance: _instance
                };
                break;
              }

            case 16384
            /* TypeDirective */
            :
              {
                nodeData = nodes[i];

                if (!nodeData) {
                  var _instance2 = createDirectiveInstance(view, nodeDef);

                  nodeData = {
                    instance: _instance2
                  };
                }

                if (nodeDef.flags & 32768
                /* Component */
                ) {
                  var compView = asElementData(view, nodeDef.parent.nodeIndex).componentView;
                  initView(compView, nodeData.instance, nodeData.instance);
                }

                break;
              }

            case 32
            /* TypePureArray */
            :
            case 64
            /* TypePureObject */
            :
            case 128
            /* TypePurePipe */
            :
              nodeData = createPureExpression(view, nodeDef);
              break;

            case 67108864
            /* TypeContentQuery */
            :
            case 134217728
            /* TypeViewQuery */
            :
              nodeData = createQuery();
              break;

            case 8
            /* TypeNgContent */
            :
              appendNgContent(view, renderHost, nodeDef); // no runtime data needed for NgContent...

              nodeData = undefined;
              break;
          }

          nodes[i] = nodeData;
        } // Create the ViewData.nodes of component views after we created everything else,
        // so that e.g. ng-content works


        execComponentViewsAction(view, ViewAction.CreateViewNodes); // fill static content and view queries

        execQueriesAction(view, 67108864
        /* TypeContentQuery */
        | 134217728
        /* TypeViewQuery */
        , 268435456
        /* StaticQuery */
        , 0
        /* CheckAndUpdate */
        );
      }

      function checkNoChangesView(view) {
        markProjectedViewsForCheck(view);
        Services.updateDirectives(view, 1
        /* CheckNoChanges */
        );
        execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);
        Services.updateRenderer(view, 1
        /* CheckNoChanges */
        );
        execComponentViewsAction(view, ViewAction.CheckNoChanges); // Note: We don't check queries for changes as we didn't do this in v2.x.
        // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.

        view.state &= ~(64
        /* CheckProjectedViews */
        | 32
        /* CheckProjectedView */
        );
      }

      function checkAndUpdateView(view) {
        if (view.state & 1
        /* BeforeFirstCheck */
        ) {
          view.state &= ~1
          /* BeforeFirstCheck */
          ;
          view.state |= 2
          /* FirstCheck */
          ;
        } else {
          view.state &= ~2
          /* FirstCheck */
          ;
        }

        shiftInitState(view, 0
        /* InitState_BeforeInit */
        , 256
        /* InitState_CallingOnInit */
        );
        markProjectedViewsForCheck(view);
        Services.updateDirectives(view, 0
        /* CheckAndUpdate */
        );
        execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);
        execQueriesAction(view, 67108864
        /* TypeContentQuery */
        , 536870912
        /* DynamicQuery */
        , 0
        /* CheckAndUpdate */
        );
        var callInit = shiftInitState(view, 256
        /* InitState_CallingOnInit */
        , 512
        /* InitState_CallingAfterContentInit */
        );
        callLifecycleHooksChildrenFirst(view, 2097152
        /* AfterContentChecked */
        | (callInit ? 1048576
        /* AfterContentInit */
        : 0));
        Services.updateRenderer(view, 0
        /* CheckAndUpdate */
        );
        execComponentViewsAction(view, ViewAction.CheckAndUpdate);
        execQueriesAction(view, 134217728
        /* TypeViewQuery */
        , 536870912
        /* DynamicQuery */
        , 0
        /* CheckAndUpdate */
        );
        callInit = shiftInitState(view, 512
        /* InitState_CallingAfterContentInit */
        , 768
        /* InitState_CallingAfterViewInit */
        );
        callLifecycleHooksChildrenFirst(view, 8388608
        /* AfterViewChecked */
        | (callInit ? 4194304
        /* AfterViewInit */
        : 0));

        if (view.def.flags & 2
        /* OnPush */
        ) {
          view.state &= ~8
          /* ChecksEnabled */
          ;
        }

        view.state &= ~(64
        /* CheckProjectedViews */
        | 32
        /* CheckProjectedView */
        );
        shiftInitState(view, 768
        /* InitState_CallingAfterViewInit */
        , 1024
        /* InitState_AfterInit */
        );
      }

      function checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
        if (argStyle === 0
        /* Inline */
        ) {
          return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
        } else {
          return checkAndUpdateNodeDynamic(view, nodeDef, v0);
        }
      }

      function markProjectedViewsForCheck(view) {
        var def = view.def;

        if (!(def.nodeFlags & 4
        /* ProjectedTemplate */
        )) {
          return;
        }

        for (var i = 0; i < def.nodes.length; i++) {
          var nodeDef = def.nodes[i];

          if (nodeDef.flags & 4
          /* ProjectedTemplate */
          ) {
            var projectedViews = asElementData(view, i).template._projectedViews;

            if (projectedViews) {
              for (var _i37 = 0; _i37 < projectedViews.length; _i37++) {
                var projectedView = projectedViews[_i37];
                projectedView.state |= 32
                /* CheckProjectedView */
                ;
                markParentViewsForCheckProjectedViews(projectedView, view);
              }
            }
          } else if ((nodeDef.childFlags & 4
          /* ProjectedTemplate */
          ) === 0) {
            // a parent with leafs
            // no child is a component,
            // then skip the children
            i += nodeDef.childCount;
          }
        }
      }

      function checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
        switch (nodeDef.flags & 201347067
        /* Types */
        ) {
          case 1
          /* TypeElement */
          :
            return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);

          case 2
          /* TypeText */
          :
            return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);

          case 16384
          /* TypeDirective */
          :
            return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);

          case 32
          /* TypePureArray */
          :
          case 64
          /* TypePureObject */
          :
          case 128
          /* TypePurePipe */
          :
            return checkAndUpdatePureExpressionInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);

          default:
            throw 'unreachable';
        }
      }

      function checkAndUpdateNodeDynamic(view, nodeDef, values) {
        switch (nodeDef.flags & 201347067
        /* Types */
        ) {
          case 1
          /* TypeElement */
          :
            return checkAndUpdateElementDynamic(view, nodeDef, values);

          case 2
          /* TypeText */
          :
            return checkAndUpdateTextDynamic(view, nodeDef, values);

          case 16384
          /* TypeDirective */
          :
            return checkAndUpdateDirectiveDynamic(view, nodeDef, values);

          case 32
          /* TypePureArray */
          :
          case 64
          /* TypePureObject */
          :
          case 128
          /* TypePurePipe */
          :
            return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);

          default:
            throw 'unreachable';
        }
      }

      function checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
        if (argStyle === 0
        /* Inline */
        ) {
          checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
        } else {
          checkNoChangesNodeDynamic(view, nodeDef, v0);
        } // Returning false is ok here as we would have thrown in case of a change.


        return false;
      }

      function checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
        var bindLen = nodeDef.bindings.length;
        if (bindLen > 0) checkBindingNoChanges(view, nodeDef, 0, v0);
        if (bindLen > 1) checkBindingNoChanges(view, nodeDef, 1, v1);
        if (bindLen > 2) checkBindingNoChanges(view, nodeDef, 2, v2);
        if (bindLen > 3) checkBindingNoChanges(view, nodeDef, 3, v3);
        if (bindLen > 4) checkBindingNoChanges(view, nodeDef, 4, v4);
        if (bindLen > 5) checkBindingNoChanges(view, nodeDef, 5, v5);
        if (bindLen > 6) checkBindingNoChanges(view, nodeDef, 6, v6);
        if (bindLen > 7) checkBindingNoChanges(view, nodeDef, 7, v7);
        if (bindLen > 8) checkBindingNoChanges(view, nodeDef, 8, v8);
        if (bindLen > 9) checkBindingNoChanges(view, nodeDef, 9, v9);
      }

      function checkNoChangesNodeDynamic(view, nodeDef, values) {
        for (var i = 0; i < values.length; i++) {
          checkBindingNoChanges(view, nodeDef, i, values[i]);
        }
      }
      /**
       * Workaround https://github.com/angular/tsickle/issues/497
       * @suppress {misplacedTypeAnnotation}
       */


      function checkNoChangesQuery(view, nodeDef) {
        var queryList = asQueryList(view, nodeDef.nodeIndex);

        if (queryList.dirty) {
          throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, nodeDef.nodeIndex), "Query ".concat(nodeDef.query.id, " not dirty"), "Query ".concat(nodeDef.query.id, " dirty"), (view.state & 1
          /* BeforeFirstCheck */
          ) !== 0);
        }
      }

      function destroyView(view) {
        if (view.state & 128
        /* Destroyed */
        ) {
          return;
        }

        execEmbeddedViewsAction(view, ViewAction.Destroy);
        execComponentViewsAction(view, ViewAction.Destroy);
        callLifecycleHooksChildrenFirst(view, 131072
        /* OnDestroy */
        );

        if (view.disposables) {
          for (var i = 0; i < view.disposables.length; i++) {
            view.disposables[i]();
          }
        }

        detachProjectedView(view);

        if (view.renderer.destroyNode) {
          destroyViewNodes(view);
        }

        if (isComponentView(view)) {
          view.renderer.destroy();
        }

        view.state |= 128
        /* Destroyed */
        ;
      }

      function destroyViewNodes(view) {
        var len = view.def.nodes.length;

        for (var i = 0; i < len; i++) {
          var def = view.def.nodes[i];

          if (def.flags & 1
          /* TypeElement */
          ) {
            view.renderer.destroyNode(asElementData(view, i).renderElement);
          } else if (def.flags & 2
          /* TypeText */
          ) {
            view.renderer.destroyNode(asTextData(view, i).renderText);
          } else if (def.flags & 67108864
          /* TypeContentQuery */
          || def.flags & 134217728
          /* TypeViewQuery */
          ) {
            asQueryList(view, i).destroy();
          }
        }
      }

      var ViewAction;

      (function (ViewAction) {
        ViewAction[ViewAction["CreateViewNodes"] = 0] = "CreateViewNodes";
        ViewAction[ViewAction["CheckNoChanges"] = 1] = "CheckNoChanges";
        ViewAction[ViewAction["CheckNoChangesProjectedViews"] = 2] = "CheckNoChangesProjectedViews";
        ViewAction[ViewAction["CheckAndUpdate"] = 3] = "CheckAndUpdate";
        ViewAction[ViewAction["CheckAndUpdateProjectedViews"] = 4] = "CheckAndUpdateProjectedViews";
        ViewAction[ViewAction["Destroy"] = 5] = "Destroy";
      })(ViewAction || (ViewAction = {}));

      function execComponentViewsAction(view, action) {
        var def = view.def;

        if (!(def.nodeFlags & 33554432
        /* ComponentView */
        )) {
          return;
        }

        for (var i = 0; i < def.nodes.length; i++) {
          var nodeDef = def.nodes[i];

          if (nodeDef.flags & 33554432
          /* ComponentView */
          ) {
            // a leaf
            callViewAction(asElementData(view, i).componentView, action);
          } else if ((nodeDef.childFlags & 33554432
          /* ComponentView */
          ) === 0) {
            // a parent with leafs
            // no child is a component,
            // then skip the children
            i += nodeDef.childCount;
          }
        }
      }

      function execEmbeddedViewsAction(view, action) {
        var def = view.def;

        if (!(def.nodeFlags & 16777216
        /* EmbeddedViews */
        )) {
          return;
        }

        for (var i = 0; i < def.nodes.length; i++) {
          var nodeDef = def.nodes[i];

          if (nodeDef.flags & 16777216
          /* EmbeddedViews */
          ) {
            // a leaf
            var embeddedViews = asElementData(view, i).viewContainer._embeddedViews;

            for (var k = 0; k < embeddedViews.length; k++) {
              callViewAction(embeddedViews[k], action);
            }
          } else if ((nodeDef.childFlags & 16777216
          /* EmbeddedViews */
          ) === 0) {
            // a parent with leafs
            // no child is a component,
            // then skip the children
            i += nodeDef.childCount;
          }
        }
      }

      function callViewAction(view, action) {
        var viewState = view.state;

        switch (action) {
          case ViewAction.CheckNoChanges:
            if ((viewState & 128
            /* Destroyed */
            ) === 0) {
              if ((viewState & 12
              /* CatDetectChanges */
              ) === 12
              /* CatDetectChanges */
              ) {
                checkNoChangesView(view);
              } else if (viewState & 64
              /* CheckProjectedViews */
              ) {
                execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);
              }
            }

            break;

          case ViewAction.CheckNoChangesProjectedViews:
            if ((viewState & 128
            /* Destroyed */
            ) === 0) {
              if (viewState & 32
              /* CheckProjectedView */
              ) {
                checkNoChangesView(view);
              } else if (viewState & 64
              /* CheckProjectedViews */
              ) {
                execProjectedViewsAction(view, action);
              }
            }

            break;

          case ViewAction.CheckAndUpdate:
            if ((viewState & 128
            /* Destroyed */
            ) === 0) {
              if ((viewState & 12
              /* CatDetectChanges */
              ) === 12
              /* CatDetectChanges */
              ) {
                checkAndUpdateView(view);
              } else if (viewState & 64
              /* CheckProjectedViews */
              ) {
                execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);
              }
            }

            break;

          case ViewAction.CheckAndUpdateProjectedViews:
            if ((viewState & 128
            /* Destroyed */
            ) === 0) {
              if (viewState & 32
              /* CheckProjectedView */
              ) {
                checkAndUpdateView(view);
              } else if (viewState & 64
              /* CheckProjectedViews */
              ) {
                execProjectedViewsAction(view, action);
              }
            }

            break;

          case ViewAction.Destroy:
            // Note: destroyView recurses over all views,
            // so we don't need to special case projected views here.
            destroyView(view);
            break;

          case ViewAction.CreateViewNodes:
            createViewNodes(view);
            break;
        }
      }

      function execProjectedViewsAction(view, action) {
        execEmbeddedViewsAction(view, action);
        execComponentViewsAction(view, action);
      }

      function execQueriesAction(view, queryFlags, staticDynamicQueryFlag, checkType) {
        if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {
          return;
        }

        var nodeCount = view.def.nodes.length;

        for (var i = 0; i < nodeCount; i++) {
          var nodeDef = view.def.nodes[i];

          if (nodeDef.flags & queryFlags && nodeDef.flags & staticDynamicQueryFlag) {
            Services.setCurrentNode(view, nodeDef.nodeIndex);

            switch (checkType) {
              case 0
              /* CheckAndUpdate */
              :
                checkAndUpdateQuery(view, nodeDef);
                break;

              case 1
              /* CheckNoChanges */
              :
                checkNoChangesQuery(view, nodeDef);
                break;
            }
          }

          if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) {
            // no child has a matching query
            // then skip the children
            i += nodeDef.childCount;
          }
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var initialized = false;

      function initServicesIfNeeded() {
        if (initialized) {
          return;
        }

        initialized = true;
        var services = isDevMode() ? createDebugServices() : createProdServices();
        Services.setCurrentNode = services.setCurrentNode;
        Services.createRootView = services.createRootView;
        Services.createEmbeddedView = services.createEmbeddedView;
        Services.createComponentView = services.createComponentView;
        Services.createNgModuleRef = services.createNgModuleRef;
        Services.overrideProvider = services.overrideProvider;
        Services.overrideComponentView = services.overrideComponentView;
        Services.clearOverrides = services.clearOverrides;
        Services.checkAndUpdateView = services.checkAndUpdateView;
        Services.checkNoChangesView = services.checkNoChangesView;
        Services.destroyView = services.destroyView;
        Services.resolveDep = resolveDep;
        Services.createDebugContext = services.createDebugContext;
        Services.handleEvent = services.handleEvent;
        Services.updateDirectives = services.updateDirectives;
        Services.updateRenderer = services.updateRenderer;
        Services.dirtyParentQueries = dirtyParentQueries;
      }

      function createProdServices() {
        return {
          setCurrentNode: function setCurrentNode() {},
          createRootView: createProdRootView,
          createEmbeddedView: createEmbeddedView,
          createComponentView: createComponentView,
          createNgModuleRef: createNgModuleRef,
          overrideProvider: NOOP,
          overrideComponentView: NOOP,
          clearOverrides: NOOP,
          checkAndUpdateView: checkAndUpdateView,
          checkNoChangesView: checkNoChangesView,
          destroyView: destroyView,
          createDebugContext: function createDebugContext(view, nodeIndex) {
            return new DebugContext_(view, nodeIndex);
          },
          handleEvent: function handleEvent(view, nodeIndex, eventName, event) {
            return view.def.handleEvent(view, nodeIndex, eventName, event);
          },
          updateDirectives: function updateDirectives(view, checkType) {
            return view.def.updateDirectives(checkType === 0
            /* CheckAndUpdate */
            ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view);
          },
          updateRenderer: function updateRenderer(view, checkType) {
            return view.def.updateRenderer(checkType === 0
            /* CheckAndUpdate */
            ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view);
          }
        };
      }

      function createDebugServices() {
        return {
          setCurrentNode: debugSetCurrentNode,
          createRootView: debugCreateRootView,
          createEmbeddedView: debugCreateEmbeddedView,
          createComponentView: debugCreateComponentView,
          createNgModuleRef: debugCreateNgModuleRef,
          overrideProvider: debugOverrideProvider,
          overrideComponentView: debugOverrideComponentView,
          clearOverrides: debugClearOverrides,
          checkAndUpdateView: debugCheckAndUpdateView,
          checkNoChangesView: debugCheckNoChangesView,
          destroyView: debugDestroyView,
          createDebugContext: function createDebugContext(view, nodeIndex) {
            return new DebugContext_(view, nodeIndex);
          },
          handleEvent: debugHandleEvent,
          updateDirectives: debugUpdateDirectives,
          updateRenderer: debugUpdateRenderer
        };
      }

      function createProdRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {
        var rendererFactory = ngModule.injector.get(RendererFactory2);
        return createRootView(createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode), def, context);
      }

      function debugCreateRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {
        var rendererFactory = ngModule.injector.get(RendererFactory2);
        var root = createRootData(elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes, rootSelectorOrNode);
        var defWithOverride = applyProviderOverridesToView(def);
        return callWithDebugContext(DebugAction.create, createRootView, null, [root, defWithOverride, context]);
      }

      function createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode) {
        var sanitizer = ngModule.injector.get(Sanitizer);
        var errorHandler = ngModule.injector.get(ErrorHandler);
        var renderer = rendererFactory.createRenderer(null, null);
        return {
          ngModule: ngModule,
          injector: elInjector,
          projectableNodes: projectableNodes,
          selectorOrNode: rootSelectorOrNode,
          sanitizer: sanitizer,
          rendererFactory: rendererFactory,
          renderer: renderer,
          errorHandler: errorHandler
        };
      }

      function debugCreateEmbeddedView(parentView, anchorDef, viewDef, context) {
        var defWithOverride = applyProviderOverridesToView(viewDef);
        return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]);
      }

      function debugCreateComponentView(parentView, nodeDef, viewDef, hostElement) {
        var overrideComponentView = viewDefOverrides.get(nodeDef.element.componentProvider.provider.token);

        if (overrideComponentView) {
          viewDef = overrideComponentView;
        } else {
          viewDef = applyProviderOverridesToView(viewDef);
        }

        return callWithDebugContext(DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef, hostElement]);
      }

      function debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) {
        var defWithOverride = applyProviderOverridesToNgModule(def);
        return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);
      }

      var providerOverrides = new Map();
      var providerOverridesWithScope = new Map();
      var viewDefOverrides = new Map();

      function debugOverrideProvider(override) {
        providerOverrides.set(override.token, override);
        var injectableDef;

        if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) && typeof injectableDef.providedIn === 'function') {
          providerOverridesWithScope.set(override.token, override);
        }
      }

      function debugOverrideComponentView(comp, compFactory) {
        var hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));
        var compViewDef = resolveDefinition(hostViewDef.nodes[0].element.componentView);
        viewDefOverrides.set(comp, compViewDef);
      }

      function debugClearOverrides() {
        providerOverrides.clear();
        providerOverridesWithScope.clear();
        viewDefOverrides.clear();
      } // Notes about the algorithm:
      // 1) Locate the providers of an element and check if one of them was overwritten
      // 2) Change the providers of that element
      //
      // We only create new datastructures if we need to, to keep perf impact
      // reasonable.


      function applyProviderOverridesToView(def) {
        if (providerOverrides.size === 0) {
          return def;
        }

        var elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);

        if (elementIndicesWithOverwrittenProviders.length === 0) {
          return def;
        } // clone the whole view definition,
        // as it maintains references between the nodes that are hard to update.


        def = def.factory(function () {
          return NOOP;
        });

        for (var i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {
          applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);
        }

        return def;

        function findElementIndicesWithOverwrittenProviders(def) {
          var elIndicesWithOverwrittenProviders = [];
          var lastElementDef = null;

          for (var _i38 = 0; _i38 < def.nodes.length; _i38++) {
            var nodeDef = def.nodes[_i38];

            if (nodeDef.flags & 1
            /* TypeElement */
            ) {
              lastElementDef = nodeDef;
            }

            if (lastElementDef && nodeDef.flags & 3840
            /* CatProviderNoDirective */
            && providerOverrides.has(nodeDef.provider.token)) {
              elIndicesWithOverwrittenProviders.push(lastElementDef.nodeIndex);
              lastElementDef = null;
            }
          }

          return elIndicesWithOverwrittenProviders;
        }

        function applyProviderOverridesToElement(viewDef, elIndex) {
          for (var _i39 = elIndex + 1; _i39 < viewDef.nodes.length; _i39++) {
            var nodeDef = viewDef.nodes[_i39];

            if (nodeDef.flags & 1
            /* TypeElement */
            ) {
              // stop at the next element
              return;
            }

            if (nodeDef.flags & 3840
            /* CatProviderNoDirective */
            ) {
              var provider = nodeDef.provider;
              var override = providerOverrides.get(provider.token);

              if (override) {
                nodeDef.flags = nodeDef.flags & ~3840
                /* CatProviderNoDirective */
                | override.flags;
                provider.deps = splitDepsDsl(override.deps);
                provider.value = override.value;
              }
            }
          }
        }
      } // Notes about the algorithm:
      // We only create new datastructures if we need to, to keep perf impact
      // reasonable.


      function applyProviderOverridesToNgModule(def) {
        var _calcHasOverrides = calcHasOverrides(def),
            hasOverrides = _calcHasOverrides.hasOverrides,
            hasDeprecatedOverrides = _calcHasOverrides.hasDeprecatedOverrides;

        if (!hasOverrides) {
          return def;
        } // clone the whole view definition,
        // as it maintains references between the nodes that are hard to update.


        def = def.factory(function () {
          return NOOP;
        });
        applyProviderOverrides(def);
        return def;

        function calcHasOverrides(def) {
          var hasOverrides = false;
          var hasDeprecatedOverrides = false;

          if (providerOverrides.size === 0) {
            return {
              hasOverrides: hasOverrides,
              hasDeprecatedOverrides: hasDeprecatedOverrides
            };
          }

          def.providers.forEach(function (node) {
            var override = providerOverrides.get(node.token);

            if (node.flags & 3840
            /* CatProviderNoDirective */
            && override) {
              hasOverrides = true;
              hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;
            }
          });
          def.modules.forEach(function (module) {
            providerOverridesWithScope.forEach(function (override, token) {
              if (getInjectableDef(token).providedIn === module) {
                hasOverrides = true;
                hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;
              }
            });
          });
          return {
            hasOverrides: hasOverrides,
            hasDeprecatedOverrides: hasDeprecatedOverrides
          };
        }

        function applyProviderOverrides(def) {
          for (var i = 0; i < def.providers.length; i++) {
            var provider = def.providers[i];

            if (hasDeprecatedOverrides) {
              // We had a bug where me made
              // all providers lazy. Keep this logic behind a flag
              // for migrating existing users.
              provider.flags |= 4096
              /* LazyProvider */
              ;
            }

            var override = providerOverrides.get(provider.token);

            if (override) {
              provider.flags = provider.flags & ~3840
              /* CatProviderNoDirective */
              | override.flags;
              provider.deps = splitDepsDsl(override.deps);
              provider.value = override.value;
            }
          }

          if (providerOverridesWithScope.size > 0) {
            var moduleSet = new Set(def.modules);
            providerOverridesWithScope.forEach(function (override, token) {
              if (moduleSet.has(getInjectableDef(token).providedIn)) {
                var _provider = {
                  token: token,
                  flags: override.flags | (hasDeprecatedOverrides ? 4096
                  /* LazyProvider */
                  : 0
                  /* None */
                  ),
                  deps: splitDepsDsl(override.deps),
                  value: override.value,
                  index: def.providers.length
                };
                def.providers.push(_provider);
                def.providersByKey[tokenKey(token)] = _provider;
              }
            });
          }
        }
      }

      function prodCheckAndUpdateNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
        var nodeDef = view.def.nodes[checkIndex];
        checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
        return nodeDef.flags & 224
        /* CatPureExpression */
        ? asPureExpressionData(view, checkIndex).value : undefined;
      }

      function prodCheckNoChangesNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
        var nodeDef = view.def.nodes[checkIndex];
        checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
        return nodeDef.flags & 224
        /* CatPureExpression */
        ? asPureExpressionData(view, checkIndex).value : undefined;
      }

      function debugCheckAndUpdateView(view) {
        return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);
      }

      function debugCheckNoChangesView(view) {
        return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);
      }

      function debugDestroyView(view) {
        return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);
      }

      var DebugAction;

      (function (DebugAction) {
        DebugAction[DebugAction["create"] = 0] = "create";
        DebugAction[DebugAction["detectChanges"] = 1] = "detectChanges";
        DebugAction[DebugAction["checkNoChanges"] = 2] = "checkNoChanges";
        DebugAction[DebugAction["destroy"] = 3] = "destroy";
        DebugAction[DebugAction["handleEvent"] = 4] = "handleEvent";
      })(DebugAction || (DebugAction = {}));

      var _currentAction;

      var _currentView;

      var _currentNodeIndex;

      function debugSetCurrentNode(view, nodeIndex) {
        _currentView = view;
        _currentNodeIndex = nodeIndex;
      }

      function debugHandleEvent(view, nodeIndex, eventName, event) {
        debugSetCurrentNode(view, nodeIndex);
        return callWithDebugContext(DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);
      }

      function debugUpdateDirectives(view, checkType) {
        if (view.state & 128
        /* Destroyed */
        ) {
          throw viewDestroyedError(DebugAction[_currentAction]);
        }

        debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));
        return view.def.updateDirectives(debugCheckDirectivesFn, view);

        function debugCheckDirectivesFn(view, nodeIndex, argStyle) {
          var nodeDef = view.def.nodes[nodeIndex];

          for (var _len42 = arguments.length, values = new Array(_len42 > 3 ? _len42 - 3 : 0), _key43 = 3; _key43 < _len42; _key43++) {
            values[_key43 - 3] = arguments[_key43];
          }

          if (checkType === 0
          /* CheckAndUpdate */
          ) {
            debugCheckAndUpdateNode(view, nodeDef, argStyle, values);
          } else {
            debugCheckNoChangesNode(view, nodeDef, argStyle, values);
          }

          if (nodeDef.flags & 16384
          /* TypeDirective */
          ) {
            debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));
          }

          return nodeDef.flags & 224
          /* CatPureExpression */
          ? asPureExpressionData(view, nodeDef.nodeIndex).value : undefined;
        }
      }

      function debugUpdateRenderer(view, checkType) {
        if (view.state & 128
        /* Destroyed */
        ) {
          throw viewDestroyedError(DebugAction[_currentAction]);
        }

        debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));
        return view.def.updateRenderer(debugCheckRenderNodeFn, view);

        function debugCheckRenderNodeFn(view, nodeIndex, argStyle) {
          var nodeDef = view.def.nodes[nodeIndex];

          for (var _len43 = arguments.length, values = new Array(_len43 > 3 ? _len43 - 3 : 0), _key44 = 3; _key44 < _len43; _key44++) {
            values[_key44 - 3] = arguments[_key44];
          }

          if (checkType === 0
          /* CheckAndUpdate */
          ) {
            debugCheckAndUpdateNode(view, nodeDef, argStyle, values);
          } else {
            debugCheckNoChangesNode(view, nodeDef, argStyle, values);
          }

          if (nodeDef.flags & 3
          /* CatRenderNode */
          ) {
            debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));
          }

          return nodeDef.flags & 224
          /* CatPureExpression */
          ? asPureExpressionData(view, nodeDef.nodeIndex).value : undefined;
        }
      }

      function debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) {
        var changed = checkAndUpdateNode.apply(void 0, [view, nodeDef, argStyle].concat(_toConsumableArray(givenValues)));

        if (changed) {
          var values = argStyle === 1
          /* Dynamic */
          ? givenValues[0] : givenValues;

          if (nodeDef.flags & 16384
          /* TypeDirective */
          ) {
            var bindingValues = {};

            for (var i = 0; i < nodeDef.bindings.length; i++) {
              var binding = nodeDef.bindings[i];
              var value = values[i];

              if (binding.flags & 8
              /* TypeProperty */
              ) {
                bindingValues[normalizeDebugBindingName(binding.nonMinifiedName)] = normalizeDebugBindingValue(value);
              }
            }

            var elDef = nodeDef.parent;
            var el = asElementData(view, elDef.nodeIndex).renderElement;

            if (!elDef.element.name) {
              // a comment.
              view.renderer.setValue(el, escapeCommentText("bindings=".concat(JSON.stringify(bindingValues, null, 2))));
            } else {
              // a regular element.
              for (var attr in bindingValues) {
                var _value12 = bindingValues[attr];

                if (_value12 != null) {
                  view.renderer.setAttribute(el, attr, _value12);
                } else {
                  view.renderer.removeAttribute(el, attr);
                }
              }
            }
          }
        }
      }

      function debugCheckNoChangesNode(view, nodeDef, argStyle, values) {
        checkNoChangesNode.apply(void 0, [view, nodeDef, argStyle].concat(_toConsumableArray(values)));
      }

      function nextDirectiveWithBinding(view, nodeIndex) {
        for (var i = nodeIndex; i < view.def.nodes.length; i++) {
          var nodeDef = view.def.nodes[i];

          if (nodeDef.flags & 16384
          /* TypeDirective */
          && nodeDef.bindings && nodeDef.bindings.length) {
            return i;
          }
        }

        return null;
      }

      function nextRenderNodeWithBinding(view, nodeIndex) {
        for (var i = nodeIndex; i < view.def.nodes.length; i++) {
          var nodeDef = view.def.nodes[i];

          if (nodeDef.flags & 3
          /* CatRenderNode */
          && nodeDef.bindings && nodeDef.bindings.length) {
            return i;
          }
        }

        return null;
      }

      var DebugContext_ = /*#__PURE__*/function () {
        function DebugContext_(view, nodeIndex) {
          _classCallCheck(this, DebugContext_);

          this.view = view;
          this.nodeIndex = nodeIndex;

          if (nodeIndex == null) {
            this.nodeIndex = nodeIndex = 0;
          }

          this.nodeDef = view.def.nodes[nodeIndex];
          var elDef = this.nodeDef;
          var elView = view;

          while (elDef && (elDef.flags & 1
          /* TypeElement */
          ) === 0) {
            elDef = elDef.parent;
          }

          if (!elDef) {
            while (!elDef && elView) {
              elDef = viewParentEl(elView);
              elView = elView.parent;
            }
          }

          this.elDef = elDef;
          this.elView = elView;
        }

        _createClass2(DebugContext_, [{
          key: "elOrCompView",
          get: function get() {
            // Has to be done lazily as we use the DebugContext also during creation of elements...
            return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view;
          }
        }, {
          key: "injector",
          get: function get() {
            return createInjector$1(this.elView, this.elDef);
          }
        }, {
          key: "component",
          get: function get() {
            return this.elOrCompView.component;
          }
        }, {
          key: "context",
          get: function get() {
            return this.elOrCompView.context;
          }
        }, {
          key: "providerTokens",
          get: function get() {
            var tokens = [];

            if (this.elDef) {
              for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {
                var childDef = this.elView.def.nodes[i];

                if (childDef.flags & 20224
                /* CatProvider */
                ) {
                  tokens.push(childDef.provider.token);
                }

                i += childDef.childCount;
              }
            }

            return tokens;
          }
        }, {
          key: "references",
          get: function get() {
            var references = {};

            if (this.elDef) {
              collectReferences(this.elView, this.elDef, references);

              for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {
                var childDef = this.elView.def.nodes[i];

                if (childDef.flags & 20224
                /* CatProvider */
                ) {
                  collectReferences(this.elView, childDef, references);
                }

                i += childDef.childCount;
              }
            }

            return references;
          }
        }, {
          key: "componentRenderElement",
          get: function get() {
            var elData = findHostElement(this.elOrCompView);
            return elData ? elData.renderElement : undefined;
          }
        }, {
          key: "renderNode",
          get: function get() {
            return this.nodeDef.flags & 2
            /* TypeText */
            ? renderNode(this.view, this.nodeDef) : renderNode(this.elView, this.elDef);
          }
        }, {
          key: "logError",
          value: function logError(console) {
            for (var _len44 = arguments.length, values = new Array(_len44 > 1 ? _len44 - 1 : 0), _key45 = 1; _key45 < _len44; _key45++) {
              values[_key45 - 1] = arguments[_key45];
            }

            var logViewDef;
            var logNodeIndex;

            if (this.nodeDef.flags & 2
            /* TypeText */
            ) {
              logViewDef = this.view.def;
              logNodeIndex = this.nodeDef.nodeIndex;
            } else {
              logViewDef = this.elView.def;
              logNodeIndex = this.elDef.nodeIndex;
            } // Note: we only generate a log function for text and element nodes
            // to make the generated code as small as possible.


            var renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);
            var currRenderNodeIndex = -1;

            var nodeLogger = function nodeLogger() {
              currRenderNodeIndex++;

              if (currRenderNodeIndex === renderNodeIndex) {
                var _console$error;

                return (_console$error = console.error).bind.apply(_console$error, [console].concat(values));
              } else {
                return NOOP;
              }
            };

            logViewDef.factory(nodeLogger);

            if (currRenderNodeIndex < renderNodeIndex) {
              console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');
              console.error.apply(console, values);
            }
          }
        }]);

        return DebugContext_;
      }();

      function getRenderNodeIndex(viewDef, nodeIndex) {
        var renderNodeIndex = -1;

        for (var i = 0; i <= nodeIndex; i++) {
          var nodeDef = viewDef.nodes[i];

          if (nodeDef.flags & 3
          /* CatRenderNode */
          ) {
            renderNodeIndex++;
          }
        }

        return renderNodeIndex;
      }

      function findHostElement(view) {
        while (view && !isComponentView(view)) {
          view = view.parent;
        }

        if (view.parent) {
          return asElementData(view.parent, viewParentEl(view).nodeIndex);
        }

        return null;
      }

      function collectReferences(view, nodeDef, references) {
        for (var refName in nodeDef.references) {
          references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);
        }
      }

      function callWithDebugContext(action, fn, self, args) {
        var oldAction = _currentAction;
        var oldView = _currentView;
        var oldNodeIndex = _currentNodeIndex;

        try {
          _currentAction = action;
          var result = fn.apply(self, args);
          _currentView = oldView;
          _currentNodeIndex = oldNodeIndex;
          _currentAction = oldAction;
          return result;
        } catch (e) {
          if (isViewDebugError(e) || !_currentView) {
            throw e;
          }

          throw viewWrappedDebugError(e, getCurrentDebugContext());
        }
      }

      function getCurrentDebugContext() {
        return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;
      }

      var DebugRendererFactory2 = /*#__PURE__*/function () {
        function DebugRendererFactory2(delegate) {
          _classCallCheck(this, DebugRendererFactory2);

          this.delegate = delegate;
        }

        _createClass2(DebugRendererFactory2, [{
          key: "createRenderer",
          value: function createRenderer(element, renderData) {
            return new DebugRenderer2(this.delegate.createRenderer(element, renderData));
          }
        }, {
          key: "begin",
          value: function begin() {
            if (this.delegate.begin) {
              this.delegate.begin();
            }
          }
        }, {
          key: "end",
          value: function end() {
            if (this.delegate.end) {
              this.delegate.end();
            }
          }
        }, {
          key: "whenRenderingDone",
          value: function whenRenderingDone() {
            if (this.delegate.whenRenderingDone) {
              return this.delegate.whenRenderingDone();
            }

            return Promise.resolve(null);
          }
        }]);

        return DebugRendererFactory2;
      }();

      var DebugRenderer2 = /*#__PURE__*/function () {
        function DebugRenderer2(delegate) {
          _classCallCheck(this, DebugRenderer2);

          this.delegate = delegate;
          /**
           * Factory function used to create a `DebugContext` when a node is created.
           *
           * The `DebugContext` allows to retrieve information about the nodes that are useful in tests.
           *
           * The factory is configurable so that the `DebugRenderer2` could instantiate either a View Engine
           * or a Render context.
           */

          this.debugContextFactory = getCurrentDebugContext;
          this.data = this.delegate.data;
        }

        _createClass2(DebugRenderer2, [{
          key: "createDebugContext",
          value: function createDebugContext(nativeElement) {
            return this.debugContextFactory(nativeElement);
          }
        }, {
          key: "destroyNode",
          value: function destroyNode(node) {
            var debugNode = getDebugNode$1(node);
            removeDebugNodeFromIndex(debugNode);

            if (debugNode instanceof DebugNode__PRE_R3__) {
              debugNode.listeners.length = 0;
            }

            if (this.delegate.destroyNode) {
              this.delegate.destroyNode(node);
            }
          }
        }, {
          key: "destroy",
          value: function destroy() {
            this.delegate.destroy();
          }
        }, {
          key: "createElement",
          value: function createElement(name, namespace) {
            var el = this.delegate.createElement(name, namespace);
            var debugCtx = this.createDebugContext(el);

            if (debugCtx) {
              var debugEl = new DebugElement__PRE_R3__(el, null, debugCtx);
              debugEl.name = name;
              indexDebugNode(debugEl);
            }

            return el;
          }
        }, {
          key: "createComment",
          value: function createComment(value) {
            var comment = this.delegate.createComment(escapeCommentText(value));
            var debugCtx = this.createDebugContext(comment);

            if (debugCtx) {
              indexDebugNode(new DebugNode__PRE_R3__(comment, null, debugCtx));
            }

            return comment;
          }
        }, {
          key: "createText",
          value: function createText(value) {
            var text = this.delegate.createText(value);
            var debugCtx = this.createDebugContext(text);

            if (debugCtx) {
              indexDebugNode(new DebugNode__PRE_R3__(text, null, debugCtx));
            }

            return text;
          }
        }, {
          key: "appendChild",
          value: function appendChild(parent, newChild) {
            var debugEl = getDebugNode$1(parent);
            var debugChildEl = getDebugNode$1(newChild);

            if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {
              debugEl.addChild(debugChildEl);
            }

            this.delegate.appendChild(parent, newChild);
          }
        }, {
          key: "insertBefore",
          value: function insertBefore(parent, newChild, refChild, isMove) {
            var debugEl = getDebugNode$1(parent);
            var debugChildEl = getDebugNode$1(newChild);
            var debugRefEl = getDebugNode$1(refChild);

            if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {
              debugEl.insertBefore(debugRefEl, debugChildEl);
            }

            this.delegate.insertBefore(parent, newChild, refChild, isMove);
          }
        }, {
          key: "removeChild",
          value: function removeChild(parent, oldChild) {
            var debugEl = getDebugNode$1(parent);
            var debugChildEl = getDebugNode$1(oldChild);

            if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {
              debugEl.removeChild(debugChildEl);
            }

            this.delegate.removeChild(parent, oldChild);
          }
        }, {
          key: "selectRootElement",
          value: function selectRootElement(selectorOrNode, preserveContent) {
            var el = this.delegate.selectRootElement(selectorOrNode, preserveContent);
            var debugCtx = getCurrentDebugContext();

            if (debugCtx) {
              indexDebugNode(new DebugElement__PRE_R3__(el, null, debugCtx));
            }

            return el;
          }
        }, {
          key: "setAttribute",
          value: function setAttribute(el, name, value, namespace) {
            var debugEl = getDebugNode$1(el);

            if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {
              var fullName = namespace ? namespace + ':' + name : name;
              debugEl.attributes[fullName] = value;
            }

            this.delegate.setAttribute(el, name, value, namespace);
          }
        }, {
          key: "removeAttribute",
          value: function removeAttribute(el, name, namespace) {
            var debugEl = getDebugNode$1(el);

            if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {
              var fullName = namespace ? namespace + ':' + name : name;
              debugEl.attributes[fullName] = null;
            }

            this.delegate.removeAttribute(el, name, namespace);
          }
        }, {
          key: "addClass",
          value: function addClass(el, name) {
            var debugEl = getDebugNode$1(el);

            if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {
              debugEl.classes[name] = true;
            }

            this.delegate.addClass(el, name);
          }
        }, {
          key: "removeClass",
          value: function removeClass(el, name) {
            var debugEl = getDebugNode$1(el);

            if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {
              debugEl.classes[name] = false;
            }

            this.delegate.removeClass(el, name);
          }
        }, {
          key: "setStyle",
          value: function setStyle(el, style, value, flags) {
            var debugEl = getDebugNode$1(el);

            if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {
              debugEl.styles[style] = value;
            }

            this.delegate.setStyle(el, style, value, flags);
          }
        }, {
          key: "removeStyle",
          value: function removeStyle(el, style, flags) {
            var debugEl = getDebugNode$1(el);

            if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {
              debugEl.styles[style] = null;
            }

            this.delegate.removeStyle(el, style, flags);
          }
        }, {
          key: "setProperty",
          value: function setProperty(el, name, value) {
            var debugEl = getDebugNode$1(el);

            if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {
              debugEl.properties[name] = value;
            }

            this.delegate.setProperty(el, name, value);
          }
        }, {
          key: "listen",
          value: function listen(target, eventName, callback) {
            if (typeof target !== 'string') {
              var debugEl = getDebugNode$1(target);

              if (debugEl) {
                debugEl.listeners.push(new DebugEventListener(eventName, callback));
              }
            }

            return this.delegate.listen(target, eventName, callback);
          }
        }, {
          key: "parentNode",
          value: function parentNode(node) {
            return this.delegate.parentNode(node);
          }
        }, {
          key: "nextSibling",
          value: function nextSibling(node) {
            return this.delegate.nextSibling(node);
          }
        }, {
          key: "setValue",
          value: function setValue(node, value) {
            return this.delegate.setValue(node, value);
          }
        }]);

        return DebugRenderer2;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function overrideProvider(override) {
        initServicesIfNeeded();
        return Services.overrideProvider(override);
      }

      function overrideComponentView(comp, componentFactory) {
        initServicesIfNeeded();
        return Services.overrideComponentView(comp, componentFactory);
      }

      function clearOverrides() {
        initServicesIfNeeded();
        return Services.clearOverrides();
      } // Attention: this function is called as top level function.
      // Putting any logic in here will destroy closure tree shaking!


      function createNgModuleFactory(ngModuleType, bootstrapComponents, defFactory) {
        return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);
      }

      function cloneNgModuleDefinition(def) {
        var providers = Array.from(def.providers);
        var modules = Array.from(def.modules);
        var providersByKey = {};

        for (var key in def.providersByKey) {
          providersByKey[key] = def.providersByKey[key];
        }

        return {
          factory: def.factory,
          scope: def.scope,
          providers: providers,
          modules: modules,
          providersByKey: providersByKey
        };
      }

      var NgModuleFactory_ = /*#__PURE__*/function (_NgModuleFactory2) {
        _inherits(NgModuleFactory_, _NgModuleFactory2);

        var _super239 = _createSuper(NgModuleFactory_);

        function NgModuleFactory_(moduleType, _bootstrapComponents, _ngModuleDefFactory) {
          var _this500;

          _classCallCheck(this, NgModuleFactory_);

          // Attention: this ctor is called as top level function.
          // Putting any logic in here will destroy closure tree shaking!
          _this500 = _super239.call(this);
          _this500.moduleType = moduleType;
          _this500._bootstrapComponents = _bootstrapComponents;
          _this500._ngModuleDefFactory = _ngModuleDefFactory;
          return _this500;
        }

        _createClass2(NgModuleFactory_, [{
          key: "create",
          value: function create(parentInjector) {
            initServicesIfNeeded(); // Clone the NgModuleDefinition so that any tree shakeable provider definition
            // added to this instance of the NgModuleRef doesn't affect the cached copy.
            // See https://github.com/angular/angular/issues/25018.

            var def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory));
            return Services.createNgModuleRef(this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);
          }
        }]);

        return NgModuleFactory_;
      }(NgModuleFactory);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // clang-format on

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      if (typeof ngDevMode !== 'undefined' && ngDevMode) {
        // This helper is to give a reasonable error message to people upgrading to v9 that have not yet
        // installed `@angular/localize` in their app.
        // tslint:disable-next-line: no-toplevel-property-access
        _global.$localize = _global.$localize || function () {
          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.)');
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // This file only reexports content of the `src` folder. Keep it that way.

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Generated bundle index. Do not edit.
       */
      //# sourceMappingURL=core.js.map

      /***/

    },

    /***/
    "gGGD":
    /*!*************************************************************************************!*\
      !*** ./node_modules/@ionic-native/core/__ivy_ngcc__/decorators/cordova-instance.js ***!
      \*************************************************************************************/

    /*! exports provided: cordovaInstance */

    /***/
    function gGGD(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "cordovaInstance", function () {
        return cordovaInstance;
      });
      /* harmony import */


      var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./common */
      "yR3O");

      function cordovaInstance(pluginObj, methodName, config, args) {
        args = Array.from(args);
        return Object(_common__WEBPACK_IMPORTED_MODULE_0__["wrapInstance"])(pluginObj, methodName, config).apply(this, args);
      } //# sourceMappingURL=cordova-instance.js.map

      /***/

    },

    /***/
    "gRHU":
    /*!*********************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/Observer.js ***!
      \*********************************************************/

    /*! exports provided: empty */

    /***/
    function gRHU(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "empty", function () {
        return empty;
      });
      /* harmony import */


      var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./config */
      "2fFW");
      /* harmony import */


      var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./util/hostReportError */
      "NJ4a");

      var empty = {
        closed: true,
        next: function next(value) {},
        error: function error(err) {
          if (_config__WEBPACK_IMPORTED_MODULE_0__["config"].useDeprecatedSynchronousErrorHandling) {
            throw err;
          } else {
            Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_1__["hostReportError"])(err);
          }
        },
        complete: function complete() {}
      }; //# sourceMappingURL=Observer.js.map

      /***/
    },

    /***/
    "gcYM":
    /*!***********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/throttleTime.js ***!
      \***********************************************************************/

    /*! exports provided: throttleTime */

    /***/
    function gcYM(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "throttleTime", function () {
        return throttleTime;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../scheduler/async */
      "D0XW");
      /* harmony import */


      var _throttle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./throttle */
      "yuhW");

      function throttleTime(duration) {
        var scheduler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
        var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _throttle__WEBPACK_IMPORTED_MODULE_2__["defaultThrottleConfig"];
        return function (source) {
          return source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing));
        };
      }

      var ThrottleTimeOperator = /*#__PURE__*/function () {
        function ThrottleTimeOperator(duration, scheduler, leading, trailing) {
          _classCallCheck(this, ThrottleTimeOperator);

          this.duration = duration;
          this.scheduler = scheduler;
          this.leading = leading;
          this.trailing = trailing;
        }

        _createClass2(ThrottleTimeOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));
          }
        }]);

        return ThrottleTimeOperator;
      }();

      var ThrottleTimeSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_33) {
        _inherits(ThrottleTimeSubscriber, _Subscriber__WEBPACK_33);

        var _super240 = _createSuper(ThrottleTimeSubscriber);

        function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {
          var _this501;

          _classCallCheck(this, ThrottleTimeSubscriber);

          _this501 = _super240.call(this, destination);
          _this501.duration = duration;
          _this501.scheduler = scheduler;
          _this501.leading = leading;
          _this501.trailing = trailing;
          _this501._hasTrailingValue = false;
          _this501._trailingValue = null;
          return _this501;
        }

        _createClass2(ThrottleTimeSubscriber, [{
          key: "_next",
          value: function _next(value) {
            if (this.throttled) {
              if (this.trailing) {
                this._trailingValue = value;
                this._hasTrailingValue = true;
              }
            } else {
              this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, {
                subscriber: this
              }));

              if (this.leading) {
                this.destination.next(value);
              } else if (this.trailing) {
                this._trailingValue = value;
                this._hasTrailingValue = true;
              }
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            if (this._hasTrailingValue) {
              this.destination.next(this._trailingValue);
              this.destination.complete();
            } else {
              this.destination.complete();
            }
          }
        }, {
          key: "clearThrottle",
          value: function clearThrottle() {
            var throttled = this.throttled;

            if (throttled) {
              if (this.trailing && this._hasTrailingValue) {
                this.destination.next(this._trailingValue);
                this._trailingValue = null;
                this._hasTrailingValue = false;
              }

              throttled.unsubscribe();
              this.remove(throttled);
              this.throttled = null;
            }
          }
        }]);

        return ThrottleTimeSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]);

      function dispatchNext(arg) {
        var subscriber = arg.subscriber;
        subscriber.clearThrottle();
      } //# sourceMappingURL=throttleTime.js.map

      /***/

    },

    /***/
    "gtzJ":
    /*!***************************************************!*\
      !*** ./node_modules/@sentry/minimal/esm/index.js ***!
      \***************************************************/

    /*! exports provided: captureException, captureMessage, captureEvent, configureScope, addBreadcrumb, setContext, setExtras, setTags, setExtra, setTag, setUser, withScope, _callOnClient, startTransaction */

    /***/
    function gtzJ(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "captureException", function () {
        return captureException;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "captureMessage", function () {
        return captureMessage;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "captureEvent", function () {
        return captureEvent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "configureScope", function () {
        return configureScope;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "addBreadcrumb", function () {
        return addBreadcrumb;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setContext", function () {
        return setContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setExtras", function () {
        return setExtras;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setTags", function () {
        return setTags;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setExtra", function () {
        return setExtra;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setTag", function () {
        return setTag;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setUser", function () {
        return setUser;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "withScope", function () {
        return withScope;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "_callOnClient", function () {
        return _callOnClient;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "startTransaction", function () {
        return startTransaction;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_hub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/hub */
      "uzXi");
      /**
       * This calls a function on the current hub.
       * @param method function to call on hub.
       * @param args to pass to function.
       */
      // eslint-disable-next-line @typescript-eslint/no-explicit-any


      function callOnHub(method) {
        var args = [];

        for (var _i = 1; _i < arguments.length; _i++) {
          args[_i - 1] = arguments[_i];
        }

        var hub = Object(_sentry_hub__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])();

        if (hub && hub[method]) {
          // eslint-disable-next-line @typescript-eslint/no-explicit-any
          return hub[method].apply(hub, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args));
        }

        throw new Error("No hub defined or " + method + " was not found on the hub, please open a bug report.");
      }
      /**
       * Captures an exception event and sends it to Sentry.
       *
       * @param exception An exception-like object.
       * @returns The generated eventId.
       */
      // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types


      function captureException(exception, captureContext) {
        var syntheticException;

        try {
          throw new Error('Sentry syntheticException');
        } catch (exception) {
          syntheticException = exception;
        }

        return callOnHub('captureException', exception, {
          captureContext: captureContext,
          originalException: exception,
          syntheticException: syntheticException
        });
      }
      /**
       * Captures a message event and sends it to Sentry.
       *
       * @param message The message to send to Sentry.
       * @param level Define the level of the message.
       * @returns The generated eventId.
       */


      function captureMessage(message, captureContext) {
        var syntheticException;

        try {
          throw new Error(message);
        } catch (exception) {
          syntheticException = exception;
        } // This is necessary to provide explicit scopes upgrade, without changing the original
        // arity of the `captureMessage(message, level)` method.


        var level = typeof captureContext === 'string' ? captureContext : undefined;
        var context = typeof captureContext !== 'string' ? {
          captureContext: captureContext
        } : undefined;
        return callOnHub('captureMessage', message, level, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
          originalException: message,
          syntheticException: syntheticException
        }, context));
      }
      /**
       * Captures a manually created event and sends it to Sentry.
       *
       * @param event The event to send to Sentry.
       * @returns The generated eventId.
       */


      function captureEvent(event) {
        return callOnHub('captureEvent', event);
      }
      /**
       * Callback to set context information onto the scope.
       * @param callback Callback function that receives Scope.
       */


      function configureScope(callback) {
        callOnHub('configureScope', callback);
      }
      /**
       * Records a new breadcrumb which will be attached to future events.
       *
       * Breadcrumbs will be added to subsequent events to provide more context on
       * user's actions prior to an error or crash.
       *
       * @param breadcrumb The breadcrumb to record.
       */


      function addBreadcrumb(breadcrumb) {
        callOnHub('addBreadcrumb', breadcrumb);
      }
      /**
       * Sets context data with the given name.
       * @param name of the context
       * @param context Any kind of data. This data will be normalized.
       */
      // eslint-disable-next-line @typescript-eslint/no-explicit-any


      function setContext(name, context) {
        callOnHub('setContext', name, context);
      }
      /**
       * Set an object that will be merged sent as extra data with the event.
       * @param extras Extras object to merge into current context.
       */


      function setExtras(extras) {
        callOnHub('setExtras', extras);
      }
      /**
       * Set an object that will be merged sent as tags data with the event.
       * @param tags Tags context object to merge into current context.
       */


      function setTags(tags) {
        callOnHub('setTags', tags);
      }
      /**
       * Set key:value that will be sent as extra data with the event.
       * @param key String of extra
       * @param extra Any kind of data. This data will be normalized.
       */


      function setExtra(key, extra) {
        callOnHub('setExtra', key, extra);
      }
      /**
       * Set key:value that will be sent as tags data with the event.
       *
       * Can also be used to unset a tag, by passing `undefined`.
       *
       * @param key String key of tag
       * @param value Value of tag
       */


      function setTag(key, value) {
        callOnHub('setTag', key, value);
      }
      /**
       * Updates user context information for future events.
       *
       * @param user User context object to be set in the current context. Pass `null` to unset the user.
       */


      function setUser(user) {
        callOnHub('setUser', user);
      }
      /**
       * Creates a new scope with and executes the given operation within.
       * The scope is automatically removed once the operation
       * finishes or throws.
       *
       * This is essentially a convenience function for:
       *
       *     pushScope();
       *     callback();
       *     popScope();
       *
       * @param callback that will be enclosed into push/popScope.
       */


      function withScope(callback) {
        callOnHub('withScope', callback);
      }
      /**
       * Calls a function on the latest client. Use this with caution, it's meant as
       * in "internal" helper so we don't need to expose every possible function in
       * the shim. It is not guaranteed that the client actually implements the
       * function.
       *
       * @param method The method to call on the client/client.
       * @param args Arguments to pass to the client/fontend.
       * @hidden
       */
      // eslint-disable-next-line @typescript-eslint/no-explicit-any


      function _callOnClient(method) {
        var args = [];

        for (var _i = 1; _i < arguments.length; _i++) {
          args[_i - 1] = arguments[_i];
        }

        callOnHub.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(['_invokeClient', method], args));
      }
      /**
       * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
       *
       * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a
       * new child span within the transaction or any span, call the respective `.startChild()` method.
       *
       * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.
       *
       * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its
       * finished child spans will be sent to Sentry.
       *
       * @param context Properties of the new `Transaction`.
       * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent
       * default values). See {@link Options.tracesSampler}.
       *
       * @returns The transaction which was just started
       */


      function startTransaction(context, customSamplingContext) {
        return callOnHub('startTransaction', Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, context), customSamplingContext);
      } //# sourceMappingURL=index.js.map

      /***/

    },

    /***/
    "hKy8":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/pairs.js ***!
      \*****************************************************************/

    /*! exports provided: pairs, dispatch */

    /***/
    function hKy8(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "pairs", function () {
        return pairs;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "dispatch", function () {
        return dispatch;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Subscription */
      "quSY");

      function pairs(obj, scheduler) {
        if (!scheduler) {
          return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
            var keys = Object.keys(obj);

            for (var i = 0; i < keys.length && !subscriber.closed; i++) {
              var key = keys[i];

              if (obj.hasOwnProperty(key)) {
                subscriber.next([key, obj[key]]);
              }
            }

            subscriber.complete();
          });
        } else {
          return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
            var keys = Object.keys(obj);
            var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
            subscription.add(scheduler.schedule(dispatch, 0, {
              keys: keys,
              index: 0,
              subscriber: subscriber,
              subscription: subscription,
              obj: obj
            }));
            return subscription;
          });
        }
      }

      function dispatch(state) {
        var keys = state.keys,
            index = state.index,
            subscriber = state.subscriber,
            subscription = state.subscription,
            obj = state.obj;

        if (!subscriber.closed) {
          if (index < keys.length) {
            var key = keys[index];
            subscriber.next([key, obj[key]]);
            subscription.add(this.schedule({
              keys: keys,
              index: index + 1,
              subscriber: subscriber,
              subscription: subscription,
              obj: obj
            }));
          } else {
            subscriber.complete();
          }
        }
      } //# sourceMappingURL=pairs.js.map

      /***/

    },

    /***/
    "hNpR":
    /*!*****************************************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/getVisibilityWatcher.js ***!
      \*****************************************************************************************/

    /*! exports provided: getVisibilityWatcher */

    /***/
    function hNpR(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getVisibilityWatcher", function () {
        return getVisibilityWatcher;
      });
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _onHidden__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./onHidden */
      "6mNm");
      /*
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *     https://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var firstHiddenTime = -1;

      var initHiddenTime = function initHiddenTime() {
        return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getGlobalObject"])().document.visibilityState === 'hidden' ? 0 : Infinity;
      };

      var trackChanges = function trackChanges() {
        // Update the time if/when the document becomes hidden.
        Object(_onHidden__WEBPACK_IMPORTED_MODULE_1__["onHidden"])(function (_a) {
          var timeStamp = _a.timeStamp;
          firstHiddenTime = timeStamp;
        }, true);
      };

      var getVisibilityWatcher = function getVisibilityWatcher() {
        if (firstHiddenTime < 0) {
          // If the document is hidden when this code runs, assume it was hidden
          // since navigation start. This isn't a perfect heuristic, but it's the
          // best we can do until an API is available to support querying past
          // visibilityState.
          firstHiddenTime = initHiddenTime();
          trackChanges();
        }

        return {
          get firstHiddenTime() {
            return firstHiddenTime;
          }

        };
      }; //# sourceMappingURL=getVisibilityWatcher.js.map

      /***/

    },

    /***/
    "hj4m":
    /*!*****************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/parsers.js ***!
      \*****************************************************/

    /*! exports provided: exceptionFromStacktrace, eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent */

    /***/
    function hj4m(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "exceptionFromStacktrace", function () {
        return exceptionFromStacktrace;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "eventFromPlainObject", function () {
        return eventFromPlainObject;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "eventFromStacktrace", function () {
        return eventFromStacktrace;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "prepareFramesForEvent", function () {
        return prepareFramesForEvent;
      });
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _tracekit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./tracekit */
      "yCKT");

      var STACKTRACE_LIMIT = 50;
      /**
       * This function creates an exception from an TraceKitStackTrace
       * @param stacktrace TraceKitStackTrace that will be converted to an exception
       * @hidden
       */

      function exceptionFromStacktrace(stacktrace) {
        var frames = prepareFramesForEvent(stacktrace.stack);
        var exception = {
          type: stacktrace.name,
          value: stacktrace.message
        };

        if (frames && frames.length) {
          exception.stacktrace = {
            frames: frames
          };
        }

        if (exception.type === undefined && exception.value === '') {
          exception.value = 'Unrecoverable error caught';
        }

        return exception;
      }
      /**
       * @hidden
       */


      function eventFromPlainObject(exception, syntheticException, rejection) {
        var event = {
          exception: {
            values: [{
              type: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["isEvent"])(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',
              value: "Non-Error " + (rejection ? 'promise rejection' : 'exception') + " captured with keys: " + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["extractExceptionKeysForMessage"])(exception)
            }]
          },
          extra: {
            __serialized__: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["normalizeToSize"])(exception)
          }
        };

        if (syntheticException) {
          var stacktrace = Object(_tracekit__WEBPACK_IMPORTED_MODULE_1__["computeStackTrace"])(syntheticException);
          var frames_1 = prepareFramesForEvent(stacktrace.stack);
          event.stacktrace = {
            frames: frames_1
          };
        }

        return event;
      }
      /**
       * @hidden
       */


      function eventFromStacktrace(stacktrace) {
        var exception = exceptionFromStacktrace(stacktrace);
        return {
          exception: {
            values: [exception]
          }
        };
      }
      /**
       * @hidden
       */


      function prepareFramesForEvent(stack) {
        if (!stack || !stack.length) {
          return [];
        }

        var localStack = stack;
        var firstFrameFunction = localStack[0].func || '';
        var lastFrameFunction = localStack[localStack.length - 1].func || ''; // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)

        if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {
          localStack = localStack.slice(1);
        } // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)


        if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {
          localStack = localStack.slice(0, -1);
        } // The frame where the crash happened, should be the last entry in the array


        return localStack.slice(0, STACKTRACE_LIMIT).map(function (frame) {
          return {
            colno: frame.column === null ? undefined : frame.column,
            filename: frame.url || localStack[0].url,
            "function": frame.func || '?',
            in_app: true,
            lineno: frame.line === null ? undefined : frame.line
          };
        }).reverse();
      } //# sourceMappingURL=parsers.js.map

      /***/

    },

    /***/
    "hxh6":
    /*!*************************************************!*\
      !*** ./node_modules/@sentry/angular/esm/sdk.js ***!
      \*************************************************/

    /*! exports provided: init */

    /***/
    function hxh6(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "init", function () {
        return init;
      });
      /* harmony import */


      var _sentry_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/browser */
      "WSEr");
      /**
       * Inits the Angular SDK
       */


      function init(options) {
        options._metadata = options._metadata || {};
        options._metadata.sdk = {
          name: 'sentry.javascript.angular',
          packages: [{
            name: 'npm:@sentry/angular',
            version: _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["SDK_VERSION"]
          }],
          version: _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["SDK_VERSION"]
        };
        Object(_sentry_browser__WEBPACK_IMPORTED_MODULE_0__["init"])(options);
      } //# sourceMappingURL=sdk.js.map

      /***/

    },

    /***/
    "iKkX":
    /*!*******************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduler/VirtualTimeScheduler.js ***!
      \*******************************************************************************/

    /*! exports provided: VirtualTimeScheduler, VirtualAction */

    /***/
    function iKkX(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function () {
        return VirtualTimeScheduler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VirtualAction", function () {
        return VirtualAction;
      });
      /* harmony import */


      var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./AsyncAction */
      "3N8a");
      /* harmony import */


      var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./AsyncScheduler */
      "IjjT");

      var VirtualTimeScheduler = /*#__PURE__*/function (_AsyncScheduler__WEBP3) {
        _inherits(VirtualTimeScheduler, _AsyncScheduler__WEBP3);

        var _super241 = _createSuper(VirtualTimeScheduler);

        function VirtualTimeScheduler() {
          var _this502;

          var SchedulerAction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : VirtualAction;
          var maxFrames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.POSITIVE_INFINITY;

          _classCallCheck(this, VirtualTimeScheduler);

          _this502 = _super241.call(this, SchedulerAction, function () {
            return _this502.frame;
          });
          _this502.maxFrames = maxFrames;
          _this502.frame = 0;
          _this502.index = -1;
          return _this502;
        }

        _createClass2(VirtualTimeScheduler, [{
          key: "flush",
          value: function flush() {
            var actions = this.actions,
                maxFrames = this.maxFrames;
            var error, action;

            while ((action = actions[0]) && action.delay <= maxFrames) {
              actions.shift();
              this.frame = action.delay;

              if (error = action.execute(action.state, action.delay)) {
                break;
              }
            }

            if (error) {
              while (action = actions.shift()) {
                action.unsubscribe();
              }

              throw error;
            }
          }
        }]);

        return VirtualTimeScheduler;
      }(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]);

      VirtualTimeScheduler.frameTimeFactor = 10;

      var VirtualAction = /*#__PURE__*/function (_AsyncAction__WEBPACK4) {
        _inherits(VirtualAction, _AsyncAction__WEBPACK4);

        var _super242 = _createSuper(VirtualAction);

        function VirtualAction(scheduler, work) {
          var _this503;

          var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : scheduler.index += 1;

          _classCallCheck(this, VirtualAction);

          _this503 = _super242.call(this, scheduler, work);
          _this503.scheduler = scheduler;
          _this503.work = work;
          _this503.index = index;
          _this503.active = true;
          _this503.index = scheduler.index = index;
          return _this503;
        }

        _createClass2(VirtualAction, [{
          key: "schedule",
          value: function schedule(state) {
            var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;

            if (!this.id) {
              return _get(_getPrototypeOf(VirtualAction.prototype), "schedule", this).call(this, state, delay);
            }

            this.active = false;
            var action = new VirtualAction(this.scheduler, this.work);
            this.add(action);
            return action.schedule(state, delay);
          }
        }, {
          key: "requestAsyncId",
          value: function requestAsyncId(scheduler, id) {
            var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
            this.delay = scheduler.frame + delay;
            var actions = scheduler.actions;
            actions.push(this);
            actions.sort(VirtualAction.sortActions);
            return true;
          }
        }, {
          key: "recycleAsyncId",
          value: function recycleAsyncId(scheduler, id) {
            var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
            return undefined;
          }
        }, {
          key: "_execute",
          value: function _execute(state, delay) {
            if (this.active === true) {
              return _get(_getPrototypeOf(VirtualAction.prototype), "_execute", this).call(this, state, delay);
            }
          }
        }], [{
          key: "sortActions",
          value: function sortActions(a, b) {
            if (a.delay === b.delay) {
              if (a.index === b.index) {
                return 0;
              } else if (a.index > b.index) {
                return 1;
              } else {
                return -1;
              }
            } else if (a.delay > b.delay) {
              return 1;
            } else {
              return -1;
            }
          }
        }]);

        return VirtualAction;
      }(_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]); //# sourceMappingURL=VirtualTimeScheduler.js.map

      /***/

    },

    /***/
    "itXk":
    /*!*************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/combineLatest.js ***!
      \*************************************************************************/

    /*! exports provided: combineLatest, CombineLatestOperator, CombineLatestSubscriber */

    /***/
    function itXk(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "combineLatest", function () {
        return combineLatest;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CombineLatestOperator", function () {
        return CombineLatestOperator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CombineLatestSubscriber", function () {
        return CombineLatestSubscriber;
      });
      /* harmony import */


      var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../util/isScheduler */
      "z+Ro");
      /* harmony import */


      var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/isArray */
      "DH7j");
      /* harmony import */


      var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../OuterSubscriber */
      "l7GE");
      /* harmony import */


      var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../util/subscribeToResult */
      "ZUHj");
      /* harmony import */


      var _fromArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./fromArray */
      "yCtX");

      var NONE = {};

      function combineLatest() {
        for (var _len45 = arguments.length, observables = new Array(_len45), _key46 = 0; _key46 < _len45; _key46++) {
          observables[_key46] = arguments[_key46];
        }

        var resultSelector = undefined;
        var scheduler = undefined;

        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(observables[observables.length - 1])) {
          scheduler = observables.pop();
        }

        if (typeof observables[observables.length - 1] === 'function') {
          resultSelector = observables.pop();
        }

        if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(observables[0])) {
          observables = observables[0];
        }

        return Object(_fromArray__WEBPACK_IMPORTED_MODULE_4__["fromArray"])(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
      }

      var CombineLatestOperator = /*#__PURE__*/function () {
        function CombineLatestOperator(resultSelector) {
          _classCallCheck(this, CombineLatestOperator);

          this.resultSelector = resultSelector;
        }

        _createClass2(CombineLatestOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
          }
        }]);

        return CombineLatestOperator;
      }();

      var CombineLatestSubscriber = /*#__PURE__*/function (_OuterSubscriber__WEB4) {
        _inherits(CombineLatestSubscriber, _OuterSubscriber__WEB4);

        var _super243 = _createSuper(CombineLatestSubscriber);

        function CombineLatestSubscriber(destination, resultSelector) {
          var _this504;

          _classCallCheck(this, CombineLatestSubscriber);

          _this504 = _super243.call(this, destination);
          _this504.resultSelector = resultSelector;
          _this504.active = 0;
          _this504.values = [];
          _this504.observables = [];
          return _this504;
        }

        _createClass2(CombineLatestSubscriber, [{
          key: "_next",
          value: function _next(observable) {
            this.values.push(NONE);
            this.observables.push(observable);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var observables = this.observables;
            var len = observables.length;

            if (len === 0) {
              this.destination.complete();
            } else {
              this.active = len;
              this.toRespond = len;

              for (var i = 0; i < len; i++) {
                var observable = observables[i];
                this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, observable, undefined, i));
              }
            }
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete(unused) {
            if ((this.active -= 1) === 0) {
              this.destination.complete();
            }
          }
        }, {
          key: "notifyNext",
          value: function notifyNext(_outerValue, innerValue, outerIndex) {
            var values = this.values;
            var oldVal = values[outerIndex];
            var toRespond = !this.toRespond ? 0 : oldVal === NONE ? --this.toRespond : this.toRespond;
            values[outerIndex] = innerValue;

            if (toRespond === 0) {
              if (this.resultSelector) {
                this._tryResultSelector(values);
              } else {
                this.destination.next(values.slice());
              }
            }
          }
        }, {
          key: "_tryResultSelector",
          value: function _tryResultSelector(values) {
            var result;

            try {
              result = this.resultSelector.apply(this, values);
            } catch (err) {
              this.destination.error(err);
              return;
            }

            this.destination.next(result);
          }
        }]);

        return CombineLatestSubscriber;
      }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]); //# sourceMappingURL=combineLatest.js.map

      /***/

    },

    /***/
    "jZKg":
    /*!************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduleArray.js ***!
      \************************************************************************/

    /*! exports provided: scheduleArray */

    /***/
    function jZKg(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "scheduleArray", function () {
        return scheduleArray;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Subscription */
      "quSY");

      function scheduleArray(input, scheduler) {
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
          var i = 0;
          sub.add(scheduler.schedule(function () {
            if (i === input.length) {
              subscriber.complete();
              return;
            }

            subscriber.next(input[i++]);

            if (!subscriber.closed) {
              sub.add(this.schedule());
            }
          }));
          return sub;
        });
      } //# sourceMappingURL=scheduleArray.js.map

      /***/

    },

    /***/
    "jhN1":
    /*!******************************************************************************************!*\
      !*** ./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js ***!
      \******************************************************************************************/

    /*! exports provided: ɵgetDOM, BrowserModule, BrowserTransferStateModule, By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, Meta, Title, TransferState, VERSION, disableDebugTools, enableDebugTools, makeStateKey, platformBrowser, ɵBROWSER_SANITIZATION_PROVIDERS, ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__, ɵBrowserDomAdapter, ɵBrowserGetTestability, ɵDomEventsPlugin, ɵDomRendererFactory2, ɵDomSanitizerImpl, ɵDomSharedStylesHost, ɵELEMENT_PROBE_PROVIDERS, ɵELEMENT_PROBE_PROVIDERS__POST_R3__, ɵHAMMER_PROVIDERS__POST_R3__, ɵHammerGesturesPlugin, ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, ɵKeyEventsPlugin, ɵNAMESPACE_URIS, ɵSharedStylesHost, ɵTRANSITION_ID, ɵangular_packages_platform_browser_platform_browser_a, ɵangular_packages_platform_browser_platform_browser_b, ɵangular_packages_platform_browser_platform_browser_c, ɵangular_packages_platform_browser_platform_browser_d, ɵangular_packages_platform_browser_platform_browser_e, ɵangular_packages_platform_browser_platform_browser_f, ɵangular_packages_platform_browser_platform_browser_g, ɵangular_packages_platform_browser_platform_browser_h, ɵangular_packages_platform_browser_platform_browser_i, ɵangular_packages_platform_browser_platform_browser_j, ɵangular_packages_platform_browser_platform_browser_k, ɵangular_packages_platform_browser_platform_browser_l, ɵangular_packages_platform_browser_platform_browser_m, ɵangular_packages_platform_browser_platform_browser_n, ɵangular_packages_platform_browser_platform_browser_o, ɵescapeHtml, ɵflattenStyles, ɵinitDomAdapter, ɵshimContentAttribute, ɵshimHostAttribute */

    /***/
    function jhN1(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BrowserModule", function () {
        return BrowserModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BrowserTransferStateModule", function () {
        return BrowserTransferStateModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "By", function () {
        return By;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DomSanitizer", function () {
        return DomSanitizer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "EVENT_MANAGER_PLUGINS", function () {
        return EVENT_MANAGER_PLUGINS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "EventManager", function () {
        return EventManager;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HAMMER_GESTURE_CONFIG", function () {
        return HAMMER_GESTURE_CONFIG;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HAMMER_LOADER", function () {
        return HAMMER_LOADER;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HammerGestureConfig", function () {
        return HammerGestureConfig;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HammerModule", function () {
        return HammerModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Meta", function () {
        return Meta;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Title", function () {
        return Title;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TransferState", function () {
        return TransferState;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VERSION", function () {
        return VERSION;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "disableDebugTools", function () {
        return disableDebugTools;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "enableDebugTools", function () {
        return enableDebugTools;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "makeStateKey", function () {
        return makeStateKey;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "platformBrowser", function () {
        return platformBrowser;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵBROWSER_SANITIZATION_PROVIDERS", function () {
        return BROWSER_SANITIZATION_PROVIDERS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__", function () {
        return BROWSER_SANITIZATION_PROVIDERS__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵBrowserDomAdapter", function () {
        return BrowserDomAdapter;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵBrowserGetTestability", function () {
        return BrowserGetTestability;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵDomEventsPlugin", function () {
        return DomEventsPlugin;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵDomRendererFactory2", function () {
        return DomRendererFactory2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵDomSanitizerImpl", function () {
        return DomSanitizerImpl;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵDomSharedStylesHost", function () {
        return DomSharedStylesHost;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵELEMENT_PROBE_PROVIDERS", function () {
        return ELEMENT_PROBE_PROVIDERS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵELEMENT_PROBE_PROVIDERS__POST_R3__", function () {
        return ELEMENT_PROBE_PROVIDERS__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵHAMMER_PROVIDERS__POST_R3__", function () {
        return HAMMER_PROVIDERS__POST_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵHammerGesturesPlugin", function () {
        return HammerGesturesPlugin;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS", function () {
        return INTERNAL_BROWSER_PLATFORM_PROVIDERS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵKeyEventsPlugin", function () {
        return KeyEventsPlugin;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNAMESPACE_URIS", function () {
        return NAMESPACE_URIS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵSharedStylesHost", function () {
        return SharedStylesHost;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵTRANSITION_ID", function () {
        return TRANSITION_ID;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_a", function () {
        return errorHandler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_b", function () {
        return _document;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_c", function () {
        return BROWSER_MODULE_PROVIDERS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_d", function () {
        return createMeta;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_e", function () {
        return createTitle;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_f", function () {
        return initTransferState;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_g", function () {
        return EventManagerPlugin;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_h", function () {
        return HAMMER_PROVIDERS__PRE_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_i", function () {
        return HAMMER_PROVIDERS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_j", function () {
        return domSanitizerImplFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_k", function () {
        return appInitializerFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_l", function () {
        return SERVER_TRANSITION_PROVIDERS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_m", function () {
        return _createNgProbeR2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_n", function () {
        return ELEMENT_PROBE_PROVIDERS__PRE_R3__;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_o", function () {
        return GenericBrowserDomAdapter;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵescapeHtml", function () {
        return escapeHtml;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵflattenStyles", function () {
        return flattenStyles;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵinitDomAdapter", function () {
        return initDomAdapter;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵshimContentAttribute", function () {
        return shimContentAttribute;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵshimHostAttribute", function () {
        return shimHostAttribute;
      });
      /* harmony import */


      var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @angular/common */
      "ofXK");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "ɵgetDOM", function () {
        return _angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"];
      });
      /**
       * @license Angular v11.0.9
       * (c) 2010-2020 Google LLC. https://angular.io/
       * License: MIT
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Provides DOM operations in any browser environment.
       *
       * @security Tread carefully! Interacting with the DOM directly is dangerous and
       * can introduce XSS risks.
       */


      var GenericBrowserDomAdapter = /*#__PURE__*/function (_angular_common__WEBP) {
        _inherits(GenericBrowserDomAdapter, _angular_common__WEBP);

        var _super244 = _createSuper(GenericBrowserDomAdapter);

        function GenericBrowserDomAdapter() {
          _classCallCheck(this, GenericBrowserDomAdapter);

          return _super244.call(this);
        }

        _createClass2(GenericBrowserDomAdapter, [{
          key: "supportsDOMEvents",
          value: function supportsDOMEvents() {
            return true;
          }
        }]);

        return GenericBrowserDomAdapter;
      }(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵDomAdapter"]);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ɵ0 = function ɵ0() {
        if (_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['Node']) {
          return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['Node'].prototype.contains || function (node) {
            return !!(this.compareDocumentPosition(node) & 16);
          };
        }

        return undefined;
      };

      var nodeContains = ɵ0();
      /**
       * A `DomAdapter` powered by full browser DOM APIs.
       *
       * @security Tread carefully! Interacting with the DOM directly is dangerous and
       * can introduce XSS risks.
       */

      /* tslint:disable:requireParameterType no-console */

      var BrowserDomAdapter = /*#__PURE__*/function (_GenericBrowserDomAda) {
        _inherits(BrowserDomAdapter, _GenericBrowserDomAda);

        var _super245 = _createSuper(BrowserDomAdapter);

        function BrowserDomAdapter() {
          _classCallCheck(this, BrowserDomAdapter);

          return _super245.apply(this, arguments);
        }

        _createClass2(BrowserDomAdapter, [{
          key: "getProperty",
          value: function getProperty(el, name) {
            return el[name];
          }
        }, {
          key: "log",
          value: function log(error) {
            if (window.console) {
              window.console.log && window.console.log(error);
            }
          }
        }, {
          key: "logGroup",
          value: function logGroup(error) {
            if (window.console) {
              window.console.group && window.console.group(error);
            }
          }
        }, {
          key: "logGroupEnd",
          value: function logGroupEnd() {
            if (window.console) {
              window.console.groupEnd && window.console.groupEnd();
            }
          }
        }, {
          key: "onAndCancel",
          value: function onAndCancel(el, evt, listener) {
            el.addEventListener(evt, listener, false); // Needed to follow Dart's subscription semantic, until fix of
            // https://code.google.com/p/dart/issues/detail?id=17406

            return function () {
              el.removeEventListener(evt, listener, false);
            };
          }
        }, {
          key: "dispatchEvent",
          value: function dispatchEvent(el, evt) {
            el.dispatchEvent(evt);
          }
        }, {
          key: "remove",
          value: function remove(node) {
            if (node.parentNode) {
              node.parentNode.removeChild(node);
            }

            return node;
          }
        }, {
          key: "getValue",
          value: function getValue(el) {
            return el.value;
          }
        }, {
          key: "createElement",
          value: function createElement(tagName, doc) {
            doc = doc || this.getDefaultDocument();
            return doc.createElement(tagName);
          }
        }, {
          key: "createHtmlDocument",
          value: function createHtmlDocument() {
            return document.implementation.createHTMLDocument('fakeTitle');
          }
        }, {
          key: "getDefaultDocument",
          value: function getDefaultDocument() {
            return document;
          }
        }, {
          key: "isElementNode",
          value: function isElementNode(node) {
            return node.nodeType === Node.ELEMENT_NODE;
          }
        }, {
          key: "isShadowRoot",
          value: function isShadowRoot(node) {
            return node instanceof DocumentFragment;
          }
        }, {
          key: "getGlobalEventTarget",
          value: function getGlobalEventTarget(doc, target) {
            if (target === 'window') {
              return window;
            }

            if (target === 'document') {
              return doc;
            }

            if (target === 'body') {
              return doc.body;
            }

            return null;
          }
        }, {
          key: "getHistory",
          value: function getHistory() {
            return window.history;
          }
        }, {
          key: "getLocation",
          value: function getLocation() {
            return window.location;
          }
        }, {
          key: "getBaseHref",
          value: function getBaseHref(doc) {
            var href = getBaseElementHref();
            return href == null ? null : relativePath(href);
          }
        }, {
          key: "resetBaseElement",
          value: function resetBaseElement() {
            baseElement = null;
          }
        }, {
          key: "getUserAgent",
          value: function getUserAgent() {
            return window.navigator.userAgent;
          }
        }, {
          key: "performanceNow",
          value: function performanceNow() {
            // performance.now() is not available in all browsers, see
            // https://caniuse.com/high-resolution-time
            return window.performance && window.performance.now ? window.performance.now() : new Date().getTime();
          }
        }, {
          key: "supportsCookies",
          value: function supportsCookies() {
            return true;
          }
        }, {
          key: "getCookie",
          value: function getCookie(name) {
            return Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵparseCookieValue"])(document.cookie, name);
          }
        }], [{
          key: "makeCurrent",
          value: function makeCurrent() {
            Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵsetRootDomAdapter"])(new BrowserDomAdapter());
          }
        }]);

        return BrowserDomAdapter;
      }(GenericBrowserDomAdapter);

      var baseElement = null;

      function getBaseElementHref() {
        if (!baseElement) {
          baseElement = document.querySelector('base');

          if (!baseElement) {
            return null;
          }
        }

        return baseElement.getAttribute('href');
      } // based on urlUtils.js in AngularJS 1


      var urlParsingNode;

      function relativePath(url) {
        if (!urlParsingNode) {
          urlParsingNode = document.createElement('a');
        }

        urlParsingNode.setAttribute('href', url);
        return urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * An id that identifies a particular application being bootstrapped, that should
       * match across the client/server boundary.
       */


      var TRANSITION_ID = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('TRANSITION_ID');

      function appInitializerFactory(transitionId, document, injector) {
        return function () {
          // Wait for all application initializers to be completed before removing the styles set by
          // the server.
          injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationInitStatus"]).donePromise.then(function () {
            var dom = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])();
            var styles = Array.prototype.slice.apply(document.querySelectorAll("style[ng-transition]"));
            styles.filter(function (el) {
              return el.getAttribute('ng-transition') === transitionId;
            }).forEach(function (el) {
              return dom.remove(el);
            });
          });
        };
      }

      var SERVER_TRANSITION_PROVIDERS = [{
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_INITIALIZER"],
        useFactory: appInitializerFactory,
        deps: [TRANSITION_ID, _angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]],
        multi: true
      }];
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var BrowserGetTestability = /*#__PURE__*/function () {
        function BrowserGetTestability() {
          _classCallCheck(this, BrowserGetTestability);
        }

        _createClass2(BrowserGetTestability, [{
          key: "addToWindow",
          value: function addToWindow(registry) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAngularTestability'] = function (elem) {
              var findInAncestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
              var testability = registry.findTestabilityInTree(elem, findInAncestors);

              if (testability == null) {
                throw new Error('Could not find testability for element.');
              }

              return testability;
            };

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAllAngularTestabilities'] = function () {
              return registry.getAllTestabilities();
            };

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAllAngularRootElements'] = function () {
              return registry.getAllRootElements();
            };

            var whenAllStable = function whenAllStable(callback
            /** TODO #9100 */
            ) {
              var testabilities = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAllAngularTestabilities']();

              var count = testabilities.length;
              var didWork = false;

              var decrement = function decrement(didWork_
              /** TODO #9100 */
              ) {
                didWork = didWork || didWork_;
                count--;

                if (count == 0) {
                  callback(didWork);
                }
              };

              testabilities.forEach(function (testability
              /** TODO #9100 */
              ) {
                testability.whenStable(decrement);
              });
            };

            if (!_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['frameworkStabilizers']) {
              _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['frameworkStabilizers'] = [];
            }

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['frameworkStabilizers'].push(whenAllStable);
          }
        }, {
          key: "findTestabilityInTree",
          value: function findTestabilityInTree(registry, elem, findInAncestors) {
            if (elem == null) {
              return null;
            }

            var t = registry.getTestability(elem);

            if (t != null) {
              return t;
            } else if (!findInAncestors) {
              return null;
            }

            if (Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().isShadowRoot(elem)) {
              return this.findTestabilityInTree(registry, elem.host, true);
            }

            return this.findTestabilityInTree(registry, elem.parentElement, true);
          }
        }], [{
          key: "init",
          value: function init() {
            Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["setTestabilityGetter"])(new BrowserGetTestability());
          }
        }]);

        return BrowserGetTestability;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var CAMEL_CASE_REGEXP = /([A-Z])/g;
      var DASH_CASE_REGEXP = /-([a-z])/g;

      function camelCaseToDashCase(input) {
        return input.replace(CAMEL_CASE_REGEXP, function () {
          for (var _len46 = arguments.length, m = new Array(_len46), _key47 = 0; _key47 < _len46; _key47++) {
            m[_key47] = arguments[_key47];
          }

          return '-' + m[1].toLowerCase();
        });
      }

      function dashCaseToCamelCase(input) {
        return input.replace(DASH_CASE_REGEXP, function () {
          for (var _len47 = arguments.length, m = new Array(_len47), _key48 = 0; _key48 < _len47; _key48++) {
            m[_key48] = arguments[_key48];
          }

          return m[1].toUpperCase();
        });
      }
      /**
       * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if
       * `name` is `'probe'`.
       * @param name Name under which it will be exported. Keep in mind this will be a property of the
       * global `ng` object.
       * @param value The value to export.
       */


      function exportNgVar(name, value) {
        if (typeof COMPILED === 'undefined' || !COMPILED) {
          // Note: we can't export `ng` when using closure enhanced optimization as:
          // - closure declares globals itself for minified names, which sometimes clobber our `ng` global
          // - we can't declare a closure extern as the namespace `ng` is already used within Google
          //   for typings for angularJS (via `goog.provide('ng....')`).
          var ng = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['ng'] = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['ng'] || {};
          ng[name] = value;
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ɵ0$1 = function ɵ0$1() {
        return {
          'ApplicationRef': _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"],
          'NgZone': _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        };
      };

      var CORE_TOKENS = ɵ0$1();
      var INSPECT_GLOBAL_NAME = 'probe';
      var CORE_TOKENS_GLOBAL_NAME = 'coreTokens';
      /**
       * Returns a {@link DebugElement} for the given native DOM element, or
       * null if the given native element does not have an Angular view associated
       * with it.
       */

      function inspectNativeElementR2(element) {
        return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵgetDebugNodeR2"])(element);
      }

      function _createNgProbeR2(coreTokens) {
        exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElementR2);
        exportNgVar(CORE_TOKENS_GLOBAL_NAME, Object.assign(Object.assign({}, CORE_TOKENS), _ngProbeTokensToMap(coreTokens || [])));
        return function () {
          return inspectNativeElementR2;
        };
      }

      function _ngProbeTokensToMap(tokens) {
        return tokens.reduce(function (prev, t) {
          return prev[t.name] = t.token, prev;
        }, {});
      }
      /**
       * In Ivy, we don't support NgProbe because we have our own set of testing utilities
       * with more robust functionality.
       *
       * We shouldn't bring in NgProbe because it prevents DebugNode and friends from
       * tree-shaking properly.
       */


      var ELEMENT_PROBE_PROVIDERS__POST_R3__ = [];
      /**
       * Providers which support debugging Angular applications (e.g. via `ng.probe`).
       */

      var ELEMENT_PROBE_PROVIDERS__PRE_R3__ = [{
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_INITIALIZER"],
        useFactory: _createNgProbeR2,
        deps: [[_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgProbeToken"], new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()]],
        multi: true
      }];
      var ELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS__POST_R3__;
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * The injection token for the event-manager plug-in service.
       *
       * @publicApi
       */

      var EVENT_MANAGER_PLUGINS = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('EventManagerPlugins');
      /**
       * An injectable service that provides event management for Angular
       * through a browser plug-in.
       *
       * @publicApi
       */

      var EventManager = /*#__PURE__*/function () {
        /**
         * Initializes an instance of the event-manager service.
         */
        function EventManager(plugins, _zone) {
          var _this505 = this;

          _classCallCheck(this, EventManager);

          this._zone = _zone;
          this._eventNameToPlugin = new Map();
          plugins.forEach(function (p) {
            return p.manager = _this505;
          });
          this._plugins = plugins.slice().reverse();
        }
        /**
         * Registers a handler for a specific element and event.
         *
         * @param element The HTML element to receive event notifications.
         * @param eventName The name of the event to listen for.
         * @param handler A function to call when the notification occurs. Receives the
         * event object as an argument.
         * @returns  A callback function that can be used to remove the handler.
         */


        _createClass2(EventManager, [{
          key: "addEventListener",
          value: function addEventListener(element, eventName, handler) {
            var plugin = this._findPluginFor(eventName);

            return plugin.addEventListener(element, eventName, handler);
          }
          /**
           * Registers a global handler for an event in a target view.
           *
           * @param target A target for global event notifications. One of "window", "document", or "body".
           * @param eventName The name of the event to listen for.
           * @param handler A function to call when the notification occurs. Receives the
           * event object as an argument.
           * @returns A callback function that can be used to remove the handler.
           */

        }, {
          key: "addGlobalEventListener",
          value: function addGlobalEventListener(target, eventName, handler) {
            var plugin = this._findPluginFor(eventName);

            return plugin.addGlobalEventListener(target, eventName, handler);
          }
          /**
           * Retrieves the compilation zone in which event listeners are registered.
           */

        }, {
          key: "getZone",
          value: function getZone() {
            return this._zone;
          }
          /** @internal */

        }, {
          key: "_findPluginFor",
          value: function _findPluginFor(eventName) {
            var plugin = this._eventNameToPlugin.get(eventName);

            if (plugin) {
              return plugin;
            }

            var plugins = this._plugins;

            for (var i = 0; i < plugins.length; i++) {
              var _plugin = plugins[i];

              if (_plugin.supports(eventName)) {
                this._eventNameToPlugin.set(eventName, _plugin);

                return _plugin;
              }
            }

            throw new Error("No event manager plugin found for event ".concat(eventName));
          }
        }]);

        return EventManager;
      }();

      EventManager.ɵfac = function EventManager_Factory(t) {
        return new (t || EventManager)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](EVENT_MANAGER_PLUGINS), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]));
      };

      EventManager.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: EventManager,
        factory: EventManager.ɵfac
      });

      EventManager.ctorParameters = function () {
        return [{
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [EVENT_MANAGER_PLUGINS]
          }]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](EventManager, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [{
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [EVENT_MANAGER_PLUGINS]
            }]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }];
        }, null);
      })();

      var EventManagerPlugin = /*#__PURE__*/function () {
        function EventManagerPlugin(_doc) {
          _classCallCheck(this, EventManagerPlugin);

          this._doc = _doc;
        }

        _createClass2(EventManagerPlugin, [{
          key: "addGlobalEventListener",
          value: function addGlobalEventListener(element, eventName, handler) {
            var target = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().getGlobalEventTarget(this._doc, element);

            if (!target) {
              throw new Error("Unsupported event target ".concat(target, " for event ").concat(eventName));
            }

            return this.addEventListener(target, eventName, handler);
          }
        }]);

        return EventManagerPlugin;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var SharedStylesHost = /*#__PURE__*/function () {
        function SharedStylesHost() {
          _classCallCheck(this, SharedStylesHost);

          /** @internal */
          this._stylesSet = new Set();
        }

        _createClass2(SharedStylesHost, [{
          key: "addStyles",
          value: function addStyles(styles) {
            var _this506 = this;

            var additions = new Set();
            styles.forEach(function (style) {
              if (!_this506._stylesSet.has(style)) {
                _this506._stylesSet.add(style);

                additions.add(style);
              }
            });
            this.onStylesAdded(additions);
          }
        }, {
          key: "onStylesAdded",
          value: function onStylesAdded(additions) {}
        }, {
          key: "getAllStyles",
          value: function getAllStyles() {
            return Array.from(this._stylesSet);
          }
        }]);

        return SharedStylesHost;
      }();

      SharedStylesHost.ɵfac = function SharedStylesHost_Factory(t) {
        return new (t || SharedStylesHost)();
      };

      SharedStylesHost.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: SharedStylesHost,
        factory: SharedStylesHost.ɵfac
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](SharedStylesHost, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [];
        }, null);
      })();

      var DomSharedStylesHost = /*#__PURE__*/function (_SharedStylesHost) {
        _inherits(DomSharedStylesHost, _SharedStylesHost);

        var _super246 = _createSuper(DomSharedStylesHost);

        function DomSharedStylesHost(_doc) {
          var _this507;

          _classCallCheck(this, DomSharedStylesHost);

          _this507 = _super246.call(this);
          _this507._doc = _doc;
          _this507._hostNodes = new Set();
          _this507._styleNodes = new Set();

          _this507._hostNodes.add(_doc.head);

          return _this507;
        }

        _createClass2(DomSharedStylesHost, [{
          key: "_addStylesToHost",
          value: function _addStylesToHost(styles, host) {
            var _this508 = this;

            styles.forEach(function (style) {
              var styleEl = _this508._doc.createElement('style');

              styleEl.textContent = style;

              _this508._styleNodes.add(host.appendChild(styleEl));
            });
          }
        }, {
          key: "addHost",
          value: function addHost(hostNode) {
            this._addStylesToHost(this._stylesSet, hostNode);

            this._hostNodes.add(hostNode);
          }
        }, {
          key: "removeHost",
          value: function removeHost(hostNode) {
            this._hostNodes["delete"](hostNode);
          }
        }, {
          key: "onStylesAdded",
          value: function onStylesAdded(additions) {
            var _this509 = this;

            this._hostNodes.forEach(function (hostNode) {
              return _this509._addStylesToHost(additions, hostNode);
            });
          }
        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this._styleNodes.forEach(function (styleNode) {
              return Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().remove(styleNode);
            });
          }
        }]);

        return DomSharedStylesHost;
      }(SharedStylesHost);

      DomSharedStylesHost.ɵfac = function DomSharedStylesHost_Factory(t) {
        return new (t || DomSharedStylesHost)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]));
      };

      DomSharedStylesHost.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: DomSharedStylesHost,
        factory: DomSharedStylesHost.ɵfac
      });

      DomSharedStylesHost.ctorParameters = function () {
        return [{
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomSharedStylesHost, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [{
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var NAMESPACE_URIS = {
        'svg': 'http://www.w3.org/2000/svg',
        'xhtml': 'http://www.w3.org/1999/xhtml',
        'xlink': 'http://www.w3.org/1999/xlink',
        'xml': 'http://www.w3.org/XML/1998/namespace',
        'xmlns': 'http://www.w3.org/2000/xmlns/'
      };
      var COMPONENT_REGEX = /%COMP%/g;
      var NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;
      var COMPONENT_VARIABLE = '%COMP%';
      var HOST_ATTR = "_nghost-".concat(COMPONENT_VARIABLE);
      var CONTENT_ATTR = "_ngcontent-".concat(COMPONENT_VARIABLE);

      function shimContentAttribute(componentShortId) {
        return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);
      }

      function shimHostAttribute(componentShortId) {
        return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);
      }

      function flattenStyles(compId, styles, target) {
        for (var i = 0; i < styles.length; i++) {
          var style = styles[i];

          if (Array.isArray(style)) {
            flattenStyles(compId, style, target);
          } else {
            style = style.replace(COMPONENT_REGEX, compId);
            target.push(style);
          }
        }

        return target;
      }

      function decoratePreventDefault(eventHandler) {
        // `DebugNode.triggerEventHandler` needs to know if the listener was created with
        // decoratePreventDefault or is a listener added outside the Angular context so it can handle the
        // two differently. In the first case, the special '__ngUnwrap__' token is passed to the unwrap
        // the listener (see below).
        return function (event) {
          // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function
          // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The debug_node
          // can inspect the listener toString contents for the existence of this special token. Because
          // the token is a string literal, it is ensured to not be modified by compiled code.
          if (event === '__ngUnwrap__') {
            return eventHandler;
          }

          var allowDefaultBehavior = eventHandler(event);

          if (allowDefaultBehavior === false) {
            // TODO(tbosch): move preventDefault into event plugins...
            event.preventDefault();
            event.returnValue = false;
          }

          return undefined;
        };
      }

      var hasLoggedNativeEncapsulationWarning = false;

      var DomRendererFactory2 = /*#__PURE__*/function () {
        function DomRendererFactory2(eventManager, sharedStylesHost, appId) {
          _classCallCheck(this, DomRendererFactory2);

          this.eventManager = eventManager;
          this.sharedStylesHost = sharedStylesHost;
          this.appId = appId;
          this.rendererByCompId = new Map();
          this.defaultRenderer = new DefaultDomRenderer2(eventManager);
        }

        _createClass2(DomRendererFactory2, [{
          key: "createRenderer",
          value: function createRenderer(element, type) {
            if (!element || !type) {
              return this.defaultRenderer;
            }

            switch (type.encapsulation) {
              case _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].Emulated:
                {
                  var renderer = this.rendererByCompId.get(type.id);

                  if (!renderer) {
                    renderer = new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type, this.appId);
                    this.rendererByCompId.set(type.id, renderer);
                  }

                  renderer.applyToHost(element);
                  return renderer;
                }

              case 1:
              case _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].ShadowDom:
                // TODO(FW-2290): remove the `case 1:` fallback logic and the warning in v12.
                if ((typeof ngDevMode === 'undefined' || ngDevMode) && !hasLoggedNativeEncapsulationWarning && type.encapsulation === 1) {
                  hasLoggedNativeEncapsulationWarning = true;
                  console.warn('ViewEncapsulation.Native is no longer supported. Falling back to ViewEncapsulation.ShadowDom. The fallback will be removed in v12.');
                }

                return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);

              default:
                {
                  if (!this.rendererByCompId.has(type.id)) {
                    var styles = flattenStyles(type.id, type.styles, []);
                    this.sharedStylesHost.addStyles(styles);
                    this.rendererByCompId.set(type.id, this.defaultRenderer);
                  }

                  return this.defaultRenderer;
                }
            }
          }
        }, {
          key: "begin",
          value: function begin() {}
        }, {
          key: "end",
          value: function end() {}
        }]);

        return DomRendererFactory2;
      }();

      DomRendererFactory2.ɵfac = function DomRendererFactory2_Factory(t) {
        return new (t || DomRendererFactory2)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](EventManager), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](DomSharedStylesHost), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]));
      };

      DomRendererFactory2.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: DomRendererFactory2,
        factory: DomRendererFactory2.ɵfac
      });

      DomRendererFactory2.ctorParameters = function () {
        return [{
          type: EventManager
        }, {
          type: DomSharedStylesHost
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomRendererFactory2, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [{
            type: EventManager
          }, {
            type: DomSharedStylesHost
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]]
            }]
          }];
        }, null);
      })();

      var DefaultDomRenderer2 = /*#__PURE__*/function () {
        function DefaultDomRenderer2(eventManager) {
          _classCallCheck(this, DefaultDomRenderer2);

          this.eventManager = eventManager;
          this.data = Object.create(null);
        }

        _createClass2(DefaultDomRenderer2, [{
          key: "destroy",
          value: function destroy() {}
        }, {
          key: "createElement",
          value: function createElement(name, namespace) {
            if (namespace) {
              // In cases where Ivy (not ViewEngine) is giving us the actual namespace, the look up by key
              // will result in undefined, so we just return the namespace here.
              return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);
            }

            return document.createElement(name);
          }
        }, {
          key: "createComment",
          value: function createComment(value) {
            return document.createComment(value);
          }
        }, {
          key: "createText",
          value: function createText(value) {
            return document.createTextNode(value);
          }
        }, {
          key: "appendChild",
          value: function appendChild(parent, newChild) {
            parent.appendChild(newChild);
          }
        }, {
          key: "insertBefore",
          value: function insertBefore(parent, newChild, refChild) {
            if (parent) {
              parent.insertBefore(newChild, refChild);
            }
          }
        }, {
          key: "removeChild",
          value: function removeChild(parent, oldChild) {
            if (parent) {
              parent.removeChild(oldChild);
            }
          }
        }, {
          key: "selectRootElement",
          value: function selectRootElement(selectorOrNode, preserveContent) {
            var el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) : selectorOrNode;

            if (!el) {
              throw new Error("The selector \"".concat(selectorOrNode, "\" did not match any elements"));
            }

            if (!preserveContent) {
              el.textContent = '';
            }

            return el;
          }
        }, {
          key: "parentNode",
          value: function parentNode(node) {
            return node.parentNode;
          }
        }, {
          key: "nextSibling",
          value: function nextSibling(node) {
            return node.nextSibling;
          }
        }, {
          key: "setAttribute",
          value: function setAttribute(el, name, value, namespace) {
            if (namespace) {
              name = namespace + ':' + name; // TODO(FW-811): Ivy may cause issues here because it's passing around
              // full URIs for namespaces, therefore this lookup will fail.

              var namespaceUri = NAMESPACE_URIS[namespace];

              if (namespaceUri) {
                el.setAttributeNS(namespaceUri, name, value);
              } else {
                el.setAttribute(name, value);
              }
            } else {
              el.setAttribute(name, value);
            }
          }
        }, {
          key: "removeAttribute",
          value: function removeAttribute(el, name, namespace) {
            if (namespace) {
              // TODO(FW-811): Ivy may cause issues here because it's passing around
              // full URIs for namespaces, therefore this lookup will fail.
              var namespaceUri = NAMESPACE_URIS[namespace];

              if (namespaceUri) {
                el.removeAttributeNS(namespaceUri, name);
              } else {
                // TODO(FW-811): Since ivy is passing around full URIs for namespaces
                // this could result in properties like `http://www.w3.org/2000/svg:cx="123"`,
                // which is wrong.
                el.removeAttribute("".concat(namespace, ":").concat(name));
              }
            } else {
              el.removeAttribute(name);
            }
          }
        }, {
          key: "addClass",
          value: function addClass(el, name) {
            el.classList.add(name);
          }
        }, {
          key: "removeClass",
          value: function removeClass(el, name) {
            el.classList.remove(name);
          }
        }, {
          key: "setStyle",
          value: function setStyle(el, style, value, flags) {
            if (flags & (_angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].DashCase | _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].Important)) {
              el.style.setProperty(style, value, flags & _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].Important ? 'important' : '');
            } else {
              el.style[style] = value;
            }
          }
        }, {
          key: "removeStyle",
          value: function removeStyle(el, style, flags) {
            if (flags & _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].DashCase) {
              el.style.removeProperty(style);
            } else {
              // IE requires '' instead of null
              // see https://github.com/angular/angular/issues/7916
              el.style[style] = '';
            }
          }
        }, {
          key: "setProperty",
          value: function setProperty(el, name, value) {
            NG_DEV_MODE && checkNoSyntheticProp(name, 'property');
            el[name] = value;
          }
        }, {
          key: "setValue",
          value: function setValue(node, value) {
            node.nodeValue = value;
          }
        }, {
          key: "listen",
          value: function listen(target, event, callback) {
            NG_DEV_MODE && checkNoSyntheticProp(event, 'listener');

            if (typeof target === 'string') {
              return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));
            }

            return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));
          }
        }]);

        return DefaultDomRenderer2;
      }();

      var ɵ0$2 = function ɵ0$2() {
        return '@'.charCodeAt(0);
      };

      var AT_CHARCODE = ɵ0$2();

      function checkNoSyntheticProp(name, nameKind) {
        if (name.charCodeAt(0) === AT_CHARCODE) {
          throw new Error("Found the synthetic ".concat(nameKind, " ").concat(name, ". Please include either \"BrowserAnimationsModule\" or \"NoopAnimationsModule\" in your application."));
        }
      }

      var EmulatedEncapsulationDomRenderer2 = /*#__PURE__*/function (_DefaultDomRenderer) {
        _inherits(EmulatedEncapsulationDomRenderer2, _DefaultDomRenderer);

        var _super247 = _createSuper(EmulatedEncapsulationDomRenderer2);

        function EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, component, appId) {
          var _this510;

          _classCallCheck(this, EmulatedEncapsulationDomRenderer2);

          _this510 = _super247.call(this, eventManager);
          _this510.component = component;
          var styles = flattenStyles(appId + '-' + component.id, component.styles, []);
          sharedStylesHost.addStyles(styles);
          _this510.contentAttr = shimContentAttribute(appId + '-' + component.id);
          _this510.hostAttr = shimHostAttribute(appId + '-' + component.id);
          return _this510;
        }

        _createClass2(EmulatedEncapsulationDomRenderer2, [{
          key: "applyToHost",
          value: function applyToHost(element) {
            _get(_getPrototypeOf(EmulatedEncapsulationDomRenderer2.prototype), "setAttribute", this).call(this, element, this.hostAttr, '');
          }
        }, {
          key: "createElement",
          value: function createElement(parent, name) {
            var el = _get(_getPrototypeOf(EmulatedEncapsulationDomRenderer2.prototype), "createElement", this).call(this, parent, name);

            _get(_getPrototypeOf(EmulatedEncapsulationDomRenderer2.prototype), "setAttribute", this).call(this, el, this.contentAttr, '');

            return el;
          }
        }]);

        return EmulatedEncapsulationDomRenderer2;
      }(DefaultDomRenderer2);

      var ShadowDomRenderer = /*#__PURE__*/function (_DefaultDomRenderer2) {
        _inherits(ShadowDomRenderer, _DefaultDomRenderer2);

        var _super248 = _createSuper(ShadowDomRenderer);

        function ShadowDomRenderer(eventManager, sharedStylesHost, hostEl, component) {
          var _this511;

          _classCallCheck(this, ShadowDomRenderer);

          _this511 = _super248.call(this, eventManager);
          _this511.sharedStylesHost = sharedStylesHost;
          _this511.hostEl = hostEl;
          _this511.shadowRoot = hostEl.attachShadow({
            mode: 'open'
          });

          _this511.sharedStylesHost.addHost(_this511.shadowRoot);

          var styles = flattenStyles(component.id, component.styles, []);

          for (var i = 0; i < styles.length; i++) {
            var styleEl = document.createElement('style');
            styleEl.textContent = styles[i];

            _this511.shadowRoot.appendChild(styleEl);
          }

          return _this511;
        }

        _createClass2(ShadowDomRenderer, [{
          key: "nodeOrShadowRoot",
          value: function nodeOrShadowRoot(node) {
            return node === this.hostEl ? this.shadowRoot : node;
          }
        }, {
          key: "destroy",
          value: function destroy() {
            this.sharedStylesHost.removeHost(this.shadowRoot);
          }
        }, {
          key: "appendChild",
          value: function appendChild(parent, newChild) {
            return _get(_getPrototypeOf(ShadowDomRenderer.prototype), "appendChild", this).call(this, this.nodeOrShadowRoot(parent), newChild);
          }
        }, {
          key: "insertBefore",
          value: function insertBefore(parent, newChild, refChild) {
            return _get(_getPrototypeOf(ShadowDomRenderer.prototype), "insertBefore", this).call(this, this.nodeOrShadowRoot(parent), newChild, refChild);
          }
        }, {
          key: "removeChild",
          value: function removeChild(parent, oldChild) {
            return _get(_getPrototypeOf(ShadowDomRenderer.prototype), "removeChild", this).call(this, this.nodeOrShadowRoot(parent), oldChild);
          }
        }, {
          key: "parentNode",
          value: function parentNode(node) {
            return this.nodeOrShadowRoot(_get(_getPrototypeOf(ShadowDomRenderer.prototype), "parentNode", this).call(this, this.nodeOrShadowRoot(node)));
          }
        }]);

        return ShadowDomRenderer;
      }(DefaultDomRenderer2);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var DomEventsPlugin = /*#__PURE__*/function (_EventManagerPlugin) {
        _inherits(DomEventsPlugin, _EventManagerPlugin);

        var _super249 = _createSuper(DomEventsPlugin);

        function DomEventsPlugin(doc) {
          _classCallCheck(this, DomEventsPlugin);

          return _super249.call(this, doc);
        } // This plugin should come last in the list of plugins, because it accepts all
        // events.


        _createClass2(DomEventsPlugin, [{
          key: "supports",
          value: function supports(eventName) {
            return true;
          }
        }, {
          key: "addEventListener",
          value: function addEventListener(element, eventName, handler) {
            var _this512 = this;

            element.addEventListener(eventName, handler, false);
            return function () {
              return _this512.removeEventListener(element, eventName, handler);
            };
          }
        }, {
          key: "removeEventListener",
          value: function removeEventListener(target, eventName, callback) {
            return target.removeEventListener(eventName, callback);
          }
        }]);

        return DomEventsPlugin;
      }(EventManagerPlugin);

      DomEventsPlugin.ɵfac = function DomEventsPlugin_Factory(t) {
        return new (t || DomEventsPlugin)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]));
      };

      DomEventsPlugin.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: DomEventsPlugin,
        factory: DomEventsPlugin.ɵfac
      });

      DomEventsPlugin.ctorParameters = function () {
        return [{
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomEventsPlugin, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [{
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Supported HammerJS recognizer event names.
       */


      var EVENT_NAMES = {
        // pan
        'pan': true,
        'panstart': true,
        'panmove': true,
        'panend': true,
        'pancancel': true,
        'panleft': true,
        'panright': true,
        'panup': true,
        'pandown': true,
        // pinch
        'pinch': true,
        'pinchstart': true,
        'pinchmove': true,
        'pinchend': true,
        'pinchcancel': true,
        'pinchin': true,
        'pinchout': true,
        // press
        'press': true,
        'pressup': true,
        // rotate
        'rotate': true,
        'rotatestart': true,
        'rotatemove': true,
        'rotateend': true,
        'rotatecancel': true,
        // swipe
        'swipe': true,
        'swipeleft': true,
        'swiperight': true,
        'swipeup': true,
        'swipedown': true,
        // tap
        'tap': true
      };
      /**
       * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular.
       * @see `HammerGestureConfig`
       *
       * @ngModule HammerModule
       * @publicApi
       */

      var HAMMER_GESTURE_CONFIG = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('HammerGestureConfig');
      /**
       * Injection token used to provide a {@link HammerLoader} to Angular.
       *
       * @publicApi
       */

      var HAMMER_LOADER = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('HammerLoader');
      /**
       * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)
       * for gesture recognition. Configures specific event recognition.
       * @publicApi
       */

      var HammerGestureConfig = /*#__PURE__*/function () {
        function HammerGestureConfig() {
          _classCallCheck(this, HammerGestureConfig);

          /**
           * A set of supported event names for gestures to be used in Angular.
           * Angular supports all built-in recognizers, as listed in
           * [HammerJS documentation](https://hammerjs.github.io/).
           */
          this.events = [];
          /**
           * Maps gesture event names to a set of configuration options
           * that specify overrides to the default values for specific properties.
           *
           * The key is a supported event name to be configured,
           * and the options object contains a set of properties, with override values
           * to be applied to the named recognizer event.
           * For example, to disable recognition of the rotate event, specify
           *  `{"rotate": {"enable": false}}`.
           *
           * Properties that are not present take the HammerJS default values.
           * For information about which properties are supported for which events,
           * and their allowed and default values, see
           * [HammerJS documentation](https://hammerjs.github.io/).
           *
           */

          this.overrides = {};
        }
        /**
         * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)
         * and attaches it to a given HTML element.
         * @param element The element that will recognize gestures.
         * @returns A HammerJS event-manager object.
         */


        _createClass2(HammerGestureConfig, [{
          key: "buildHammer",
          value: function buildHammer(element) {
            var mc = new Hammer(element, this.options);
            mc.get('pinch').set({
              enable: true
            });
            mc.get('rotate').set({
              enable: true
            });

            for (var eventName in this.overrides) {
              mc.get(eventName).set(this.overrides[eventName]);
            }

            return mc;
          }
        }]);

        return HammerGestureConfig;
      }();

      HammerGestureConfig.ɵfac = function HammerGestureConfig_Factory(t) {
        return new (t || HammerGestureConfig)();
      };

      HammerGestureConfig.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: HammerGestureConfig,
        factory: HammerGestureConfig.ɵfac
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](HammerGestureConfig, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [];
        }, null);
      })();
      /**
       * Event plugin that adds Hammer support to an application.
       *
       * @ngModule HammerModule
       */


      var HammerGesturesPlugin = /*#__PURE__*/function (_EventManagerPlugin2) {
        _inherits(HammerGesturesPlugin, _EventManagerPlugin2);

        var _super250 = _createSuper(HammerGesturesPlugin);

        function HammerGesturesPlugin(doc, _config, console, loader) {
          var _this513;

          _classCallCheck(this, HammerGesturesPlugin);

          _this513 = _super250.call(this, doc);
          _this513._config = _config;
          _this513.console = console;
          _this513.loader = loader;
          return _this513;
        }

        _createClass2(HammerGesturesPlugin, [{
          key: "supports",
          value: function supports(eventName) {
            if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {
              return false;
            }

            if (!window.Hammer && !this.loader) {
              this.console.warn("The \"".concat(eventName, "\" event cannot be bound because Hammer.JS is not ") + "loaded and no custom loader has been specified.");
              return false;
            }

            return true;
          }
        }, {
          key: "addEventListener",
          value: function addEventListener(element, eventName, handler) {
            var _this514 = this;

            var zone = this.manager.getZone();
            eventName = eventName.toLowerCase(); // If Hammer is not present but a loader is specified, we defer adding the event listener
            // until Hammer is loaded.

            if (!window.Hammer && this.loader) {
              // This `addEventListener` method returns a function to remove the added listener.
              // Until Hammer is loaded, the returned function needs to *cancel* the registration rather
              // than remove anything.
              var cancelRegistration = false;

              var deregister = function deregister() {
                cancelRegistration = true;
              };

              this.loader().then(function () {
                // If Hammer isn't actually loaded when the custom loader resolves, give up.
                if (!window.Hammer) {
                  _this514.console.warn("The custom HAMMER_LOADER completed, but Hammer.JS is not present.");

                  deregister = function deregister() {};

                  return;
                }

                if (!cancelRegistration) {
                  // Now that Hammer is loaded and the listener is being loaded for real,
                  // the deregistration function changes from canceling registration to removal.
                  deregister = _this514.addEventListener(element, eventName, handler);
                }
              })["catch"](function () {
                _this514.console.warn("The \"".concat(eventName, "\" event cannot be bound because the custom ") + "Hammer.JS loader failed.");

                deregister = function deregister() {};
              }); // Return a function that *executes* `deregister` (and not `deregister` itself) so that we
              // can change the behavior of `deregister` once the listener is added. Using a closure in
              // this way allows us to avoid any additional data structures to track listener removal.

              return function () {
                deregister();
              };
            }

            return zone.runOutsideAngular(function () {
              // Creating the manager bind events, must be done outside of angular
              var mc = _this514._config.buildHammer(element);

              var callback = function callback(eventObj) {
                zone.runGuarded(function () {
                  handler(eventObj);
                });
              };

              mc.on(eventName, callback);
              return function () {
                mc.off(eventName, callback); // destroy mc to prevent memory leak

                if (typeof mc.destroy === 'function') {
                  mc.destroy();
                }
              };
            });
          }
        }, {
          key: "isCustomEvent",
          value: function isCustomEvent(eventName) {
            return this._config.events.indexOf(eventName) > -1;
          }
        }]);

        return HammerGesturesPlugin;
      }(EventManagerPlugin);

      HammerGesturesPlugin.ɵfac = function HammerGesturesPlugin_Factory(t) {
        return new (t || HammerGesturesPlugin)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](HAMMER_GESTURE_CONFIG), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](HAMMER_LOADER, 8));
      };

      HammerGesturesPlugin.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: HammerGesturesPlugin,
        factory: HammerGesturesPlugin.ɵfac
      });

      HammerGesturesPlugin.ctorParameters = function () {
        return [{
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
          }]
        }, {
          type: HammerGestureConfig,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [HAMMER_GESTURE_CONFIG]
          }]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [HAMMER_LOADER]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](HammerGesturesPlugin, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [{
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
            }]
          }, {
            type: HammerGestureConfig,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [HAMMER_GESTURE_CONFIG]
            }]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [HAMMER_LOADER]
            }]
          }];
        }, null);
      })();
      /**
       * In Ivy, support for Hammer gestures is optional, so applications must
       * import the `HammerModule` at root to turn on support. This means that
       * Hammer-specific code can be tree-shaken away if not needed.
       */


      var HAMMER_PROVIDERS__POST_R3__ = [];
      /**
       * In View Engine, support for Hammer gestures is built-in by default.
       */

      var HAMMER_PROVIDERS__PRE_R3__ = [{
        provide: EVENT_MANAGER_PLUGINS,
        useClass: HammerGesturesPlugin,
        multi: true,
        deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], HAMMER_GESTURE_CONFIG, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"], [new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), HAMMER_LOADER]]
      }, {
        provide: HAMMER_GESTURE_CONFIG,
        useClass: HammerGestureConfig,
        deps: []
      }];
      var HAMMER_PROVIDERS = HAMMER_PROVIDERS__POST_R3__;
      /**
       * Adds support for HammerJS.
       *
       * Import this module at the root of your application so that Angular can work with
       * HammerJS to detect gesture events.
       *
       * Note that applications still need to include the HammerJS script itself. This module
       * simply sets up the coordination layer between HammerJS and Angular's EventManager.
       *
       * @publicApi
       */

      var HammerModule = function HammerModule() {
        _classCallCheck(this, HammerModule);
      };

      HammerModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({
        type: HammerModule
      });
      HammerModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({
        factory: function HammerModule_Factory(t) {
          return new (t || HammerModule)();
        },
        providers: HAMMER_PROVIDERS__PRE_R3__
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](HammerModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"],
          args: [{
            providers: HAMMER_PROVIDERS__PRE_R3__
          }]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Defines supported modifiers for key events.
       */


      var MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];
      var DOM_KEY_LOCATION_NUMPAD = 3; // Map to convert some key or keyIdentifier values to what will be returned by getEventKey

      var _keyMap = {
        // The following values are here for cross-browser compatibility and to match the W3C standard
        // cf https://www.w3.org/TR/DOM-Level-3-Events-key/
        '\b': 'Backspace',
        '\t': 'Tab',
        '\x7F': 'Delete',
        '\x1B': 'Escape',
        'Del': 'Delete',
        'Esc': 'Escape',
        'Left': 'ArrowLeft',
        'Right': 'ArrowRight',
        'Up': 'ArrowUp',
        'Down': 'ArrowDown',
        'Menu': 'ContextMenu',
        'Scroll': 'ScrollLock',
        'Win': 'OS'
      }; // There is a bug in Chrome for numeric keypad keys:
      // https://code.google.com/p/chromium/issues/detail?id=155654
      // 1, 2, 3 ... are reported as A, B, C ...

      var _chromeNumKeyPadMap = {
        'A': '1',
        'B': '2',
        'C': '3',
        'D': '4',
        'E': '5',
        'F': '6',
        'G': '7',
        'H': '8',
        'I': '9',
        'J': '*',
        'K': '+',
        'M': '-',
        'N': '.',
        'O': '/',
        '\x60': '0',
        '\x90': 'NumLock'
      };

      var ɵ0$3 = function ɵ0$3(event) {
        return event.altKey;
      },
          ɵ1 = function ɵ1(event) {
        return event.ctrlKey;
      },
          ɵ2 = function ɵ2(event) {
        return event.metaKey;
      },
          ɵ3 = function ɵ3(event) {
        return event.shiftKey;
      };
      /**
       * Retrieves modifiers from key-event objects.
       */


      var MODIFIER_KEY_GETTERS = {
        'alt': ɵ0$3,
        'control': ɵ1,
        'meta': ɵ2,
        'shift': ɵ3
      };
      /**
       * @publicApi
       * A browser plug-in that provides support for handling of key events in Angular.
       */

      var KeyEventsPlugin = /*#__PURE__*/function (_EventManagerPlugin3) {
        _inherits(KeyEventsPlugin, _EventManagerPlugin3);

        var _super251 = _createSuper(KeyEventsPlugin);

        /**
         * Initializes an instance of the browser plug-in.
         * @param doc The document in which key events will be detected.
         */
        function KeyEventsPlugin(doc) {
          _classCallCheck(this, KeyEventsPlugin);

          return _super251.call(this, doc);
        }
        /**
         * Reports whether a named key event is supported.
         * @param eventName The event name to query.
         * @return True if the named key event is supported.
         */


        _createClass2(KeyEventsPlugin, [{
          key: "supports",
          value: function supports(eventName) {
            return KeyEventsPlugin.parseEventName(eventName) != null;
          }
          /**
           * Registers a handler for a specific element and key event.
           * @param element The HTML element to receive event notifications.
           * @param eventName The name of the key event to listen for.
           * @param handler A function to call when the notification occurs. Receives the
           * event object as an argument.
           * @returns The key event that was registered.
           */

        }, {
          key: "addEventListener",
          value: function addEventListener(element, eventName, handler) {
            var parsedEvent = KeyEventsPlugin.parseEventName(eventName);
            var outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());
            return this.manager.getZone().runOutsideAngular(function () {
              return Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);
            });
          }
        }], [{
          key: "parseEventName",
          value: function parseEventName(eventName) {
            var parts = eventName.toLowerCase().split('.');
            var domEventName = parts.shift();

            if (parts.length === 0 || !(domEventName === 'keydown' || domEventName === 'keyup')) {
              return null;
            }

            var key = KeyEventsPlugin._normalizeKey(parts.pop());

            var fullKey = '';
            MODIFIER_KEYS.forEach(function (modifierName) {
              var index = parts.indexOf(modifierName);

              if (index > -1) {
                parts.splice(index, 1);
                fullKey += modifierName + '.';
              }
            });
            fullKey += key;

            if (parts.length != 0 || key.length === 0) {
              // returning null instead of throwing to let another plugin process the event
              return null;
            } // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming.
            //       The code must remain in the `result['domEventName']` form.
            // return {domEventName, fullKey};


            var result = {};
            result['domEventName'] = domEventName;
            result['fullKey'] = fullKey;
            return result;
          }
        }, {
          key: "getEventFullKey",
          value: function getEventFullKey(event) {
            var fullKey = '';
            var key = getEventKey(event);
            key = key.toLowerCase();

            if (key === ' ') {
              key = 'space'; // for readability
            } else if (key === '.') {
              key = 'dot'; // because '.' is used as a separator in event names
            }

            MODIFIER_KEYS.forEach(function (modifierName) {
              if (modifierName != key) {
                var modifierGetter = MODIFIER_KEY_GETTERS[modifierName];

                if (modifierGetter(event)) {
                  fullKey += modifierName + '.';
                }
              }
            });
            fullKey += key;
            return fullKey;
          }
          /**
           * Configures a handler callback for a key event.
           * @param fullKey The event name that combines all simultaneous keystrokes.
           * @param handler The function that responds to the key event.
           * @param zone The zone in which the event occurred.
           * @returns A callback function.
           */

        }, {
          key: "eventCallback",
          value: function eventCallback(fullKey, handler, zone) {
            return function (event
            /** TODO #9100 */
            ) {
              if (KeyEventsPlugin.getEventFullKey(event) === fullKey) {
                zone.runGuarded(function () {
                  return handler(event);
                });
              }
            };
          }
          /** @internal */

        }, {
          key: "_normalizeKey",
          value: function _normalizeKey(keyName) {
            // TODO: switch to a Map if the mapping grows too much
            switch (keyName) {
              case 'esc':
                return 'escape';

              default:
                return keyName;
            }
          }
        }]);

        return KeyEventsPlugin;
      }(EventManagerPlugin);

      KeyEventsPlugin.ɵfac = function KeyEventsPlugin_Factory(t) {
        return new (t || KeyEventsPlugin)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]));
      };

      KeyEventsPlugin.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: KeyEventsPlugin,
        factory: KeyEventsPlugin.ɵfac
      });

      KeyEventsPlugin.ctorParameters = function () {
        return [{
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](KeyEventsPlugin, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [{
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
            }]
          }];
        }, null);
      })();

      function getEventKey(event) {
        var key = event.key;

        if (key == null) {
          key = event.keyIdentifier; // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and
          // Safari cf
          // https://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces

          if (key == null) {
            return 'Unidentified';
          }

          if (key.startsWith('U+')) {
            key = String.fromCharCode(parseInt(key.substring(2), 16));

            if (event.location === DOM_KEY_LOCATION_NUMPAD && _chromeNumKeyPadMap.hasOwnProperty(key)) {
              // There is a bug in Chrome for numeric keypad keys:
              // https://code.google.com/p/chromium/issues/detail?id=155654
              // 1, 2, 3 ... are reported as A, B, C ...
              key = _chromeNumKeyPadMap[key];
            }
          }
        }

        return _keyMap[key] || key;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
       * values to be safe to use in the different DOM contexts.
       *
       * For example, when binding a URL in an `<a [href]="someValue">` hyperlink, `someValue` will be
       * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on
       * the website.
       *
       * In specific situations, it might be necessary to disable sanitization, for example if the
       * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.
       * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`
       * methods, and then binding to that value from the template.
       *
       * These situations should be very rare, and extraordinary care must be taken to avoid creating a
       * Cross Site Scripting (XSS) security bug!
       *
       * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as
       * close as possible to the source of the value, to make it easy to verify no security bug is
       * created by its use.
       *
       * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that
       * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous
       * code. The sanitizer leaves safe values intact.
       *
       * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in
       * sanitization for the value passed in. Carefully check and audit all values and code paths going
       * into this call. Make sure any user data is appropriately escaped for this security context.
       * For more detail, see the [Security Guide](https://g.co/ng/security).
       *
       * @publicApi
       */


      var DomSanitizer = function DomSanitizer() {
        _classCallCheck(this, DomSanitizer);
      };

      DomSanitizer.ɵfac = function DomSanitizer_Factory(t) {
        return new (t || DomSanitizer)();
      };

      DomSanitizer.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: function DomSanitizer_Factory() {
          return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(DomSanitizerImpl);
        },
        token: DomSanitizer,
        providedIn: "root"
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomSanitizer, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root',
            useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () {
              return DomSanitizerImpl;
            })
          }]
        }], null, null);
      })();

      function domSanitizerImplFactory(injector) {
        return new DomSanitizerImpl(injector.get(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]));
      }

      var DomSanitizerImpl = /*#__PURE__*/function (_DomSanitizer) {
        _inherits(DomSanitizerImpl, _DomSanitizer);

        var _super252 = _createSuper(DomSanitizerImpl);

        function DomSanitizerImpl(_doc) {
          var _this515;

          _classCallCheck(this, DomSanitizerImpl);

          _this515 = _super252.call(this);
          _this515._doc = _doc;
          return _this515;
        }

        _createClass2(DomSanitizerImpl, [{
          key: "sanitize",
          value: function sanitize(ctx, value) {
            if (value == null) return null;

            switch (ctx) {
              case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].NONE:
                return value;

              case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].HTML:
                if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "HTML"
                /* Html */
                )) {
                  return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value);
                }

                return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵ_sanitizeHtml"])(this._doc, String(value));

              case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].STYLE:
                if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "Style"
                /* Style */
                )) {
                  return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value);
                }

                return value;

              case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].SCRIPT:
                if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "Script"
                /* Script */
                )) {
                  return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value);
                }

                throw new Error('unsafe value used in a script context');

              case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].URL:
                var type = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵgetSanitizationBypassType"])(value);

                if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "URL"
                /* Url */
                )) {
                  return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value);
                }

                return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵ_sanitizeUrl"])(String(value));

              case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].RESOURCE_URL:
                if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "ResourceURL"
                /* ResourceUrl */
                )) {
                  return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value);
                }

                throw new Error('unsafe value used in a resource URL context (see https://g.co/ng/security#xss)');

              default:
                throw new Error("Unexpected SecurityContext ".concat(ctx, " (see https://g.co/ng/security#xss)"));
            }
          }
        }, {
          key: "bypassSecurityTrustHtml",
          value: function bypassSecurityTrustHtml(value) {
            return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustHtml"])(value);
          }
        }, {
          key: "bypassSecurityTrustStyle",
          value: function bypassSecurityTrustStyle(value) {
            return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustStyle"])(value);
          }
        }, {
          key: "bypassSecurityTrustScript",
          value: function bypassSecurityTrustScript(value) {
            return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustScript"])(value);
          }
        }, {
          key: "bypassSecurityTrustUrl",
          value: function bypassSecurityTrustUrl(value) {
            return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustUrl"])(value);
          }
        }, {
          key: "bypassSecurityTrustResourceUrl",
          value: function bypassSecurityTrustResourceUrl(value) {
            return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustResourceUrl"])(value);
          }
        }]);

        return DomSanitizerImpl;
      }(DomSanitizer);

      DomSanitizerImpl.ɵfac = function DomSanitizerImpl_Factory(t) {
        return new (t || DomSanitizerImpl)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]));
      };

      DomSanitizerImpl.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: function DomSanitizerImpl_Factory() {
          return domSanitizerImplFactory(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["INJECTOR"]));
        },
        token: DomSanitizerImpl,
        providedIn: "root"
      });

      DomSanitizerImpl.ctorParameters = function () {
        return [{
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomSanitizerImpl, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root',
            useFactory: domSanitizerImplFactory,
            deps: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]]
          }]
        }], function () {
          return [{
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function initDomAdapter() {
        BrowserDomAdapter.makeCurrent();
        BrowserGetTestability.init();
      }

      function errorHandler() {
        return new _angular_core__WEBPACK_IMPORTED_MODULE_1__["ErrorHandler"]();
      }

      function _document() {
        // Tell ivy about the global document
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetDocument"])(document);
        return document;
      }

      var ɵ0$4 = _angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵPLATFORM_BROWSER_ID"];
      var INTERNAL_BROWSER_PLATFORM_PROVIDERS = [{
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"],
        useValue: ɵ0$4
      }, {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_INITIALIZER"],
        useValue: initDomAdapter,
        multi: true
      }, {
        provide: _angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],
        useFactory: _document,
        deps: []
      }];
      var BROWSER_SANITIZATION_PROVIDERS__PRE_R3__ = [{
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Sanitizer"],
        useExisting: DomSanitizer
      }, {
        provide: DomSanitizer,
        useClass: DomSanitizerImpl,
        deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
      }];
      var BROWSER_SANITIZATION_PROVIDERS__POST_R3__ = [];
      /**
       * @security Replacing built-in sanitization providers exposes the application to XSS risks.
       * Attacker-controlled data introduced by an unsanitized provider could expose your
       * application to XSS risks. For more detail, see the [Security Guide](https://g.co/ng/security).
       * @publicApi
       */

      var BROWSER_SANITIZATION_PROVIDERS = BROWSER_SANITIZATION_PROVIDERS__POST_R3__;
      /**
       * A factory function that returns a `PlatformRef` instance associated with browser service
       * providers.
       *
       * @publicApi
       */

      var platformBrowser = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["createPlatformFactory"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["platformCore"], 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);
      var BROWSER_MODULE_PROVIDERS = [BROWSER_SANITIZATION_PROVIDERS, {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵINJECTOR_SCOPE"],
        useValue: 'root'
      }, {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ErrorHandler"],
        useFactory: errorHandler,
        deps: []
      }, {
        provide: EVENT_MANAGER_PLUGINS,
        useClass: DomEventsPlugin,
        multi: true,
        deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"]]
      }, {
        provide: EVENT_MANAGER_PLUGINS,
        useClass: KeyEventsPlugin,
        multi: true,
        deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
      }, HAMMER_PROVIDERS, {
        provide: DomRendererFactory2,
        useClass: DomRendererFactory2,
        deps: [EventManager, DomSharedStylesHost, _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]]
      }, {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererFactory2"],
        useExisting: DomRendererFactory2
      }, {
        provide: SharedStylesHost,
        useExisting: DomSharedStylesHost
      }, {
        provide: DomSharedStylesHost,
        useClass: DomSharedStylesHost,
        deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
      }, {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Testability"],
        useClass: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Testability"],
        deps: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]]
      }, {
        provide: EventManager,
        useClass: EventManager,
        deps: [EVENT_MANAGER_PLUGINS, _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]]
      }, ELEMENT_PROBE_PROVIDERS];
      /**
       * Exports required infrastructure for all Angular apps.
       * Included by default in all Angular apps created with the CLI
       * `new` command.
       * Re-exports `CommonModule` and `ApplicationModule`, making their
       * exports and providers available to all apps.
       *
       * @publicApi
       */

      var BrowserModule = /*#__PURE__*/function () {
        function BrowserModule(parentModule) {
          _classCallCheck(this, BrowserModule);

          if (parentModule) {
            throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.");
          }
        }
        /**
         * Configures a browser-based app to transition from a server-rendered app, if
         * one is present on the page.
         *
         * @param params An object containing an identifier for the app to transition.
         * The ID must match between the client and server versions of the app.
         * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.
         */


        _createClass2(BrowserModule, null, [{
          key: "withServerTransition",
          value: function withServerTransition(params) {
            return {
              ngModule: BrowserModule,
              providers: [{
                provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"],
                useValue: params.appId
              }, {
                provide: TRANSITION_ID,
                useExisting: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]
              }, SERVER_TRANSITION_PROVIDERS]
            };
          }
        }]);

        return BrowserModule;
      }();

      BrowserModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({
        type: BrowserModule
      });
      BrowserModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({
        factory: function BrowserModule_Factory(t) {
          return new (t || BrowserModule)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](BrowserModule, 12));
        },
        providers: BROWSER_MODULE_PROVIDERS,
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationModule"]]
      });

      BrowserModule.ctorParameters = function () {
        return [{
          type: BrowserModule,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [BrowserModule]
          }]
        }];
      };

      (function () {
        (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsetNgModuleScope"](BrowserModule, {
          exports: function exports() {
            return [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationModule"]];
          }
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](BrowserModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"],
          args: [{
            providers: BROWSER_MODULE_PROVIDERS,
            exports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationModule"]]
          }]
        }], function () {
          return [{
            type: BrowserModule,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [BrowserModule]
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Factory to create a `Meta` service instance for the current DOM document.
       */


      function createMeta() {
        return new Meta(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]));
      }
      /**
       * A service for managing HTML `<meta>` tags.
       *
       * Properties of the `MetaDefinition` object match the attributes of the
       * HTML `<meta>` tag. These tags define document metadata that is important for
       * things like configuring a Content Security Policy, defining browser compatibility
       * and security settings, setting HTTP Headers, defining rich content for social sharing,
       * and Search Engine Optimization (SEO).
       *
       * To identify specific `<meta>` tags in a document, use an attribute selection
       * string in the format `"tag_attribute='value string'"`.
       * For example, an `attrSelector` value of `"name='description'"` matches a tag
       * whose `name` attribute has the value `"description"`.
       * Selectors are used with the `querySelector()` Document method,
       * in the format `meta[{attrSelector}]`.
       *
       * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)
       * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)
       *
       *
       * @publicApi
       */


      var Meta = /*#__PURE__*/function () {
        function Meta(_doc) {
          _classCallCheck(this, Meta);

          this._doc = _doc;
          this._dom = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])();
        }
        /**
         * Retrieves or creates a specific `<meta>` tag element in the current HTML document.
         * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
         * values in the provided tag definition, and verifies that all other attribute values are equal.
         * If an existing element is found, it is returned and is not modified in any way.
         * @param tag The definition of a `<meta>` element to match or create.
         * @param forceCreation True to create a new element without checking whether one already exists.
         * @returns The existing element with the same attributes and values if found,
         * the new element if no match is found, or `null` if the tag parameter is not defined.
         */


        _createClass2(Meta, [{
          key: "addTag",
          value: function addTag(tag) {
            var forceCreation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
            if (!tag) return null;
            return this._getOrCreateElement(tag, forceCreation);
          }
          /**
           * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.
           * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
           * values in the provided tag definition, and verifies that all other attribute values are equal.
           * @param tags An array of tag definitions to match or create.
           * @param forceCreation True to create new elements without checking whether they already exist.
           * @returns The matching elements if found, or the new elements.
           */

        }, {
          key: "addTags",
          value: function addTags(tags) {
            var _this516 = this;

            var forceCreation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
            if (!tags) return [];
            return tags.reduce(function (result, tag) {
              if (tag) {
                result.push(_this516._getOrCreateElement(tag, forceCreation));
              }

              return result;
            }, []);
          }
          /**
           * Retrieves a `<meta>` tag element in the current HTML document.
           * @param attrSelector The tag attribute and value to match against, in the format
           * `"tag_attribute='value string'"`.
           * @returns The matching element, if any.
           */

        }, {
          key: "getTag",
          value: function getTag(attrSelector) {
            if (!attrSelector) return null;
            return this._doc.querySelector("meta[".concat(attrSelector, "]")) || null;
          }
          /**
           * Retrieves a set of `<meta>` tag elements in the current HTML document.
           * @param attrSelector The tag attribute and value to match against, in the format
           * `"tag_attribute='value string'"`.
           * @returns The matching elements, if any.
           */

        }, {
          key: "getTags",
          value: function getTags(attrSelector) {
            if (!attrSelector) return [];

            var list
            /*NodeList*/
            = this._doc.querySelectorAll("meta[".concat(attrSelector, "]"));

            return list ? [].slice.call(list) : [];
          }
          /**
           * Modifies an existing `<meta>` tag element in the current HTML document.
           * @param tag The tag description with which to replace the existing tag content.
           * @param selector A tag attribute and value to match against, to identify
           * an existing tag. A string in the format `"tag_attribute=`value string`"`.
           * If not supplied, matches a tag with the same `name` or `property` attribute value as the
           * replacement tag.
           * @return The modified element.
           */

        }, {
          key: "updateTag",
          value: function updateTag(tag, selector) {
            if (!tag) return null;
            selector = selector || this._parseSelector(tag);
            var meta = this.getTag(selector);

            if (meta) {
              return this._setMetaElementAttributes(tag, meta);
            }

            return this._getOrCreateElement(tag, true);
          }
          /**
           * Removes an existing `<meta>` tag element from the current HTML document.
           * @param attrSelector A tag attribute and value to match against, to identify
           * an existing tag. A string in the format `"tag_attribute=`value string`"`.
           */

        }, {
          key: "removeTag",
          value: function removeTag(attrSelector) {
            this.removeTagElement(this.getTag(attrSelector));
          }
          /**
           * Removes an existing `<meta>` tag element from the current HTML document.
           * @param meta The tag definition to match against to identify an existing tag.
           */

        }, {
          key: "removeTagElement",
          value: function removeTagElement(meta) {
            if (meta) {
              this._dom.remove(meta);
            }
          }
        }, {
          key: "_getOrCreateElement",
          value: function _getOrCreateElement(meta) {
            var forceCreation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

            if (!forceCreation) {
              var selector = this._parseSelector(meta);

              var elem = this.getTag(selector); // It's allowed to have multiple elements with the same name so it's not enough to
              // just check that element with the same name already present on the page. We also need to
              // check if element has tag attributes

              if (elem && this._containsAttributes(meta, elem)) return elem;
            }

            var element = this._dom.createElement('meta');

            this._setMetaElementAttributes(meta, element);

            var head = this._doc.getElementsByTagName('head')[0];

            head.appendChild(element);
            return element;
          }
        }, {
          key: "_setMetaElementAttributes",
          value: function _setMetaElementAttributes(tag, el) {
            var _this517 = this;

            Object.keys(tag).forEach(function (prop) {
              return el.setAttribute(_this517._getMetaKeyMap(prop), tag[prop]);
            });
            return el;
          }
        }, {
          key: "_parseSelector",
          value: function _parseSelector(tag) {
            var attr = tag.name ? 'name' : 'property';
            return "".concat(attr, "=\"").concat(tag[attr], "\"");
          }
        }, {
          key: "_containsAttributes",
          value: function _containsAttributes(tag, elem) {
            var _this518 = this;

            return Object.keys(tag).every(function (key) {
              return elem.getAttribute(_this518._getMetaKeyMap(key)) === tag[key];
            });
          }
        }, {
          key: "_getMetaKeyMap",
          value: function _getMetaKeyMap(prop) {
            return META_KEYS_MAP[prop] || prop;
          }
        }]);

        return Meta;
      }();

      Meta.ɵfac = function Meta_Factory(t) {
        return new (t || Meta)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]));
      };

      Meta.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: createMeta,
        token: Meta,
        providedIn: "root"
      });

      Meta.ctorParameters = function () {
        return [{
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](Meta, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root',
            useFactory: createMeta,
            deps: []
          }]
        }], function () {
          return [{
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
            }]
          }];
        }, null);
      })();
      /**
       * Mapping for MetaDefinition properties with their correct meta attribute names
       */


      var META_KEYS_MAP = {
        httpEquiv: 'http-equiv'
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Factory to create Title service.
       */

      function createTitle() {
        return new Title(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]));
      }
      /**
       * A service that can be used to get and set the title of a current HTML document.
       *
       * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)
       * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements
       * (representing the `<title>` tag). Instead, this service can be used to set and get the current
       * title value.
       *
       * @publicApi
       */


      var Title = /*#__PURE__*/function () {
        function Title(_doc) {
          _classCallCheck(this, Title);

          this._doc = _doc;
        }
        /**
         * Get the title of the current HTML document.
         */


        _createClass2(Title, [{
          key: "getTitle",
          value: function getTitle() {
            return this._doc.title;
          }
          /**
           * Set the title of the current HTML document.
           * @param newTitle
           */

        }, {
          key: "setTitle",
          value: function setTitle(newTitle) {
            this._doc.title = newTitle || '';
          }
        }]);

        return Title;
      }();

      Title.ɵfac = function Title_Factory(t) {
        return new (t || Title)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]));
      };

      Title.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
        factory: createTitle,
        token: Title,
        providedIn: "root"
      });

      Title.ctorParameters = function () {
        return [{
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](Title, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root',
            useFactory: createTitle,
            deps: []
          }]
        }], function () {
          return [{
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var win = typeof window !== 'undefined' && window || {};
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      var ChangeDetectionPerfRecord = function ChangeDetectionPerfRecord(msPerTick, numTicks) {
        _classCallCheck(this, ChangeDetectionPerfRecord);

        this.msPerTick = msPerTick;
        this.numTicks = numTicks;
      };
      /**
       * Entry point for all Angular profiling-related debug tools. This object
       * corresponds to the `ng.profiler` in the dev console.
       */


      var AngularProfiler = /*#__PURE__*/function () {
        function AngularProfiler(ref) {
          _classCallCheck(this, AngularProfiler);

          this.appRef = ref.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"]);
        } // tslint:disable:no-console

        /**
         * Exercises change detection in a loop and then prints the average amount of
         * time in milliseconds how long a single round of change detection takes for
         * the current state of the UI. It runs a minimum of 5 rounds for a minimum
         * of 500 milliseconds.
         *
         * Optionally, a user may pass a `config` parameter containing a map of
         * options. Supported options are:
         *
         * `record` (boolean) - causes the profiler to record a CPU profile while
         * it exercises the change detector. Example:
         *
         * ```
         * ng.profiler.timeChangeDetection({record: true})
         * ```
         */


        _createClass2(AngularProfiler, [{
          key: "timeChangeDetection",
          value: function timeChangeDetection(config) {
            var record = config && config['record'];
            var profileName = 'Change Detection'; // Profiler is not available in Android browsers without dev tools opened

            var isProfilerAvailable = win.console.profile != null;

            if (record && isProfilerAvailable) {
              win.console.profile(profileName);
            }

            var start = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().performanceNow();
            var numTicks = 0;

            while (numTicks < 5 || Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().performanceNow() - start < 500) {
              this.appRef.tick();
              numTicks++;
            }

            var end = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().performanceNow();

            if (record && isProfilerAvailable) {
              win.console.profileEnd(profileName);
            }

            var msPerTick = (end - start) / numTicks;
            win.console.log("ran ".concat(numTicks, " change detection cycles"));
            win.console.log("".concat(msPerTick.toFixed(2), " ms per check"));
            return new ChangeDetectionPerfRecord(msPerTick, numTicks);
          }
        }]);

        return AngularProfiler;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var PROFILER_GLOBAL_NAME = 'profiler';
      /**
       * Enabled Angular debug tools that are accessible via your browser's
       * developer console.
       *
       * Usage:
       *
       * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)
       * 1. Type `ng.` (usually the console will show auto-complete suggestion)
       * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`
       *    then hit Enter.
       *
       * @publicApi
       */

      function enableDebugTools(ref) {
        exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));
        return ref;
      }
      /**
       * Disables Angular tools.
       *
       * @publicApi
       */


      function disableDebugTools() {
        exportNgVar(PROFILER_GLOBAL_NAME, null);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function escapeHtml(text) {
        var escapedText = {
          '&': '&a;',
          '"': '&q;',
          '\'': '&s;',
          '<': '&l;',
          '>': '&g;'
        };
        return text.replace(/[&"'<>]/g, function (s) {
          return escapedText[s];
        });
      }

      function unescapeHtml(text) {
        var unescapedText = {
          '&a;': '&',
          '&q;': '"',
          '&s;': '\'',
          '&l;': '<',
          '&g;': '>'
        };
        return text.replace(/&[^;]+;/g, function (s) {
          return unescapedText[s];
        });
      }
      /**
       * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
       *
       * Example:
       *
       * ```
       * const COUNTER_KEY = makeStateKey<number>('counter');
       * let value = 10;
       *
       * transferState.set(COUNTER_KEY, value);
       * ```
       *
       * @publicApi
       */


      function makeStateKey(key) {
        return key;
      }
      /**
       * A key value store that is transferred from the application on the server side to the application
       * on the client side.
       *
       * `TransferState` will be available as an injectable token. To use it import
       * `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client.
       *
       * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only
       * boolean, number, string, null and non-class objects will be serialized and deserialized in a
       * non-lossy manner.
       *
       * @publicApi
       */


      var TransferState = /*#__PURE__*/function () {
        function TransferState() {
          _classCallCheck(this, TransferState);

          this.store = {};
          this.onSerializeCallbacks = {};
        }
        /** @internal */


        _createClass2(TransferState, [{
          key: "get",
          value:
          /**
           * Get the value corresponding to a key. Return `defaultValue` if key is not found.
           */
          function get(key, defaultValue) {
            return this.store[key] !== undefined ? this.store[key] : defaultValue;
          }
          /**
           * Set the value corresponding to a key.
           */

        }, {
          key: "set",
          value: function set(key, value) {
            this.store[key] = value;
          }
          /**
           * Remove a key from the store.
           */

        }, {
          key: "remove",
          value: function remove(key) {
            delete this.store[key];
          }
          /**
           * Test whether a key exists in the store.
           */

        }, {
          key: "hasKey",
          value: function hasKey(key) {
            return this.store.hasOwnProperty(key);
          }
          /**
           * Register a callback to provide the value for a key when `toJson` is called.
           */

        }, {
          key: "onSerialize",
          value: function onSerialize(key, callback) {
            this.onSerializeCallbacks[key] = callback;
          }
          /**
           * Serialize the current state of the store to JSON.
           */

        }, {
          key: "toJson",
          value: function toJson() {
            // Call the onSerialize callbacks and put those values into the store.
            for (var key in this.onSerializeCallbacks) {
              if (this.onSerializeCallbacks.hasOwnProperty(key)) {
                try {
                  this.store[key] = this.onSerializeCallbacks[key]();
                } catch (e) {
                  console.warn('Exception in onSerialize callback: ', e);
                }
              }
            }

            return JSON.stringify(this.store);
          }
        }], [{
          key: "init",
          value: function init(initState) {
            var transferState = new TransferState();
            transferState.store = initState;
            return transferState;
          }
        }]);

        return TransferState;
      }();

      TransferState.ɵfac = function TransferState_Factory(t) {
        return new (t || TransferState)();
      };

      TransferState.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: TransferState,
        factory: TransferState.ɵfac
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](TransferState, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [];
        }, null);
      })();

      function initTransferState(doc, appId) {
        // Locate the script tag with the JSON data transferred from the server.
        // The id of the script tag is set to the Angular appId + 'state'.
        var script = doc.getElementById(appId + '-state');
        var initialState = {};

        if (script && script.textContent) {
          try {
            initialState = JSON.parse(unescapeHtml(script.textContent));
          } catch (e) {
            console.warn('Exception while restoring TransferState for app ' + appId, e);
          }
        }

        return TransferState.init(initialState);
      }
      /**
       * NgModule to install on the client side while using the `TransferState` to transfer state from
       * server to client.
       *
       * @publicApi
       */


      var BrowserTransferStateModule = function BrowserTransferStateModule() {
        _classCallCheck(this, BrowserTransferStateModule);
      };

      BrowserTransferStateModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({
        type: BrowserTransferStateModule
      });
      BrowserTransferStateModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({
        factory: function BrowserTransferStateModule_Factory(t) {
          return new (t || BrowserTransferStateModule)();
        },
        providers: [{
          provide: TransferState,
          useFactory: initTransferState,
          deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]]
        }]
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](BrowserTransferStateModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"],
          args: [{
            providers: [{
              provide: TransferState,
              useFactory: initTransferState,
              deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]]
            }]
          }]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Predicates for use with {@link DebugElement}'s query functions.
       *
       * @publicApi
       */


      var By = /*#__PURE__*/function () {
        function By() {
          _classCallCheck(this, By);
        }

        _createClass2(By, null, [{
          key: "all",
          value:
          /**
           * Match all nodes.
           *
           * @usageNotes
           * ### Example
           *
           * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
           */
          function all() {
            return function () {
              return true;
            };
          }
          /**
           * Match elements by the given CSS selector.
           *
           * @usageNotes
           * ### Example
           *
           * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
           */

        }, {
          key: "css",
          value: function css(selector) {
            return function (debugElement) {
              return debugElement.nativeElement != null ? elementMatches(debugElement.nativeElement, selector) : false;
            };
          }
          /**
           * Match nodes that have the given directive present.
           *
           * @usageNotes
           * ### Example
           *
           * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
           */

        }, {
          key: "directive",
          value: function directive(type) {
            return function (debugNode) {
              return debugNode.providerTokens.indexOf(type) !== -1;
            };
          }
        }]);

        return By;
      }();

      function elementMatches(n, selector) {
        if (Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().isElementNode(n)) {
          return n.matches && n.matches(selector) || n.msMatchesSelector && n.msMatchesSelector(selector) || n.webkitMatchesSelector && n.webkitMatchesSelector(selector);
        }

        return false;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @publicApi
       */


      var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Version"]('11.0.9');
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // This file only reexports content of the `src` folder. Keep it that way.

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Generated bundle index. Do not edit.
       */
      //# sourceMappingURL=platform-browser.js.map

      /***/
    },

    /***/
    "jrpr":
    /*!*******************************************************!*\
      !*** ./node_modules/@sentry/types/esm/transaction.js ***!
      \*******************************************************/

    /*! exports provided: TransactionSamplingMethod */

    /***/
    function jrpr(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TransactionSamplingMethod", function () {
        return TransactionSamplingMethod;
      });

      var TransactionSamplingMethod;

      (function (TransactionSamplingMethod) {
        TransactionSamplingMethod["Explicit"] = "explicitly_set";
        TransactionSamplingMethod["Sampler"] = "client_sampler";
        TransactionSamplingMethod["Rate"] = "client_rate";
        TransactionSamplingMethod["Inheritance"] = "inheritance";
      })(TransactionSamplingMethod || (TransactionSamplingMethod = {})); //# sourceMappingURL=transaction.js.map

      /***/

    },

    /***/
    "jtHE":
    /*!**************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/ReplaySubject.js ***!
      \**************************************************************/

    /*! exports provided: ReplaySubject */

    /***/
    function jtHE(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ReplaySubject", function () {
        return ReplaySubject;
      });
      /* harmony import */


      var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./Subject */
      "XNiG");
      /* harmony import */


      var _scheduler_queue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./scheduler/queue */
      "qgXg");
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./Subscription */
      "quSY");
      /* harmony import */


      var _operators_observeOn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./operators/observeOn */
      "pxpQ");
      /* harmony import */


      var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./util/ObjectUnsubscribedError */
      "9ppp");
      /* harmony import */


      var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./SubjectSubscription */
      "Ylt2");

      var ReplaySubject = /*#__PURE__*/function (_Subject__WEBPACK_IMP5) {
        _inherits(ReplaySubject, _Subject__WEBPACK_IMP5);

        var _super253 = _createSuper(ReplaySubject);

        function ReplaySubject() {
          var _this519;

          var bufferSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.POSITIVE_INFINITY;
          var windowTime = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.POSITIVE_INFINITY;
          var scheduler = arguments.length > 2 ? arguments[2] : undefined;

          _classCallCheck(this, ReplaySubject);

          _this519 = _super253.call(this);
          _this519.scheduler = scheduler;
          _this519._events = [];
          _this519._infiniteTimeWindow = false;
          _this519._bufferSize = bufferSize < 1 ? 1 : bufferSize;
          _this519._windowTime = windowTime < 1 ? 1 : windowTime;

          if (windowTime === Number.POSITIVE_INFINITY) {
            _this519._infiniteTimeWindow = true;
            _this519.next = _this519.nextInfiniteTimeWindow;
          } else {
            _this519.next = _this519.nextTimeWindow;
          }

          return _this519;
        }

        _createClass2(ReplaySubject, [{
          key: "nextInfiniteTimeWindow",
          value: function nextInfiniteTimeWindow(value) {
            if (!this.isStopped) {
              var _events = this._events;

              _events.push(value);

              if (_events.length > this._bufferSize) {
                _events.shift();
              }
            }

            _get(_getPrototypeOf(ReplaySubject.prototype), "next", this).call(this, value);
          }
        }, {
          key: "nextTimeWindow",
          value: function nextTimeWindow(value) {
            if (!this.isStopped) {
              this._events.push(new ReplayEvent(this._getNow(), value));

              this._trimBufferThenGetEvents();
            }

            _get(_getPrototypeOf(ReplaySubject.prototype), "next", this).call(this, value);
          }
        }, {
          key: "_subscribe",
          value: function _subscribe(subscriber) {
            var _infiniteTimeWindow = this._infiniteTimeWindow;

            var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();

            var scheduler = this.scheduler;
            var len = _events.length;
            var subscription;

            if (this.closed) {
              throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
            } else if (this.isStopped || this.hasError) {
              subscription = _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
            } else {
              this.observers.push(subscriber);
              subscription = new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__["SubjectSubscription"](this, subscriber);
            }

            if (scheduler) {
              subscriber.add(subscriber = new _operators_observeOn__WEBPACK_IMPORTED_MODULE_3__["ObserveOnSubscriber"](subscriber, scheduler));
            }

            if (_infiniteTimeWindow) {
              for (var i = 0; i < len && !subscriber.closed; i++) {
                subscriber.next(_events[i]);
              }
            } else {
              for (var _i40 = 0; _i40 < len && !subscriber.closed; _i40++) {
                subscriber.next(_events[_i40].value);
              }
            }

            if (this.hasError) {
              subscriber.error(this.thrownError);
            } else if (this.isStopped) {
              subscriber.complete();
            }

            return subscription;
          }
        }, {
          key: "_getNow",
          value: function _getNow() {
            return (this.scheduler || _scheduler_queue__WEBPACK_IMPORTED_MODULE_1__["queue"]).now();
          }
        }, {
          key: "_trimBufferThenGetEvents",
          value: function _trimBufferThenGetEvents() {
            var now = this._getNow();

            var _bufferSize = this._bufferSize;
            var _windowTime = this._windowTime;
            var _events = this._events;
            var eventsCount = _events.length;
            var spliceCount = 0;

            while (spliceCount < eventsCount) {
              if (now - _events[spliceCount].time < _windowTime) {
                break;
              }

              spliceCount++;
            }

            if (eventsCount > _bufferSize) {
              spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
            }

            if (spliceCount > 0) {
              _events.splice(0, spliceCount);
            }

            return _events;
          }
        }]);

        return ReplaySubject;
      }(_Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]);

      var ReplayEvent = function ReplayEvent(time, value) {
        _classCallCheck(this, ReplayEvent);

        this.time = time;
        this.value = value;
      }; //# sourceMappingURL=ReplaySubject.js.map

      /***/

    },

    /***/
    "kJWO":
    /*!******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/symbol/observable.js ***!
      \******************************************************************/

    /*! exports provided: observable */

    /***/
    function kJWO(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "observable", function () {
        return observable;
      });

      var observable = function () {
        return typeof Symbol === 'function' && Symbol.observable || '@@observable';
      }(); //# sourceMappingURL=observable.js.map

      /***/

    },

    /***/
    "kU1M":
    /*!*******************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/operators/index.js ***!
      \*******************************************************/

    /*! exports provided: audit, auditTime, buffer, bufferCount, bufferTime, bufferToggle, bufferWhen, catchError, combineAll, combineLatest, concat, concatAll, concatMap, concatMapTo, count, debounce, debounceTime, defaultIfEmpty, delay, delayWhen, dematerialize, distinct, distinctUntilChanged, distinctUntilKeyChanged, elementAt, endWith, every, exhaust, exhaustMap, expand, filter, finalize, find, findIndex, first, groupBy, ignoreElements, isEmpty, last, map, mapTo, materialize, max, merge, mergeAll, mergeMap, flatMap, mergeMapTo, mergeScan, min, multicast, observeOn, onErrorResumeNext, pairwise, partition, pluck, publish, publishBehavior, publishLast, publishReplay, race, reduce, repeat, repeatWhen, retry, retryWhen, refCount, sample, sampleTime, scan, sequenceEqual, share, shareReplay, single, skip, skipLast, skipUntil, skipWhile, startWith, subscribeOn, switchAll, switchMap, switchMapTo, take, takeLast, takeUntil, takeWhile, tap, throttle, throttleTime, throwIfEmpty, timeInterval, timeout, timeoutWith, timestamp, toArray, window, windowCount, windowTime, windowToggle, windowWhen, withLatestFrom, zip, zipAll */

    /***/
    function kU1M(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../internal/operators/audit */
      "tnsW");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "audit", function () {
        return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"];
      });
      /* harmony import */


      var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../internal/operators/auditTime */
      "3UWI");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "auditTime", function () {
        return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"];
      });
      /* harmony import */


      var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../internal/operators/buffer */
      "p9/F");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "buffer", function () {
        return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"];
      });
      /* harmony import */


      var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../internal/operators/bufferCount */
      "9M8c");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "bufferCount", function () {
        return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"];
      });
      /* harmony import */


      var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ../internal/operators/bufferTime */
      "OsX3");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "bufferTime", function () {
        return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"];
      });
      /* harmony import */


      var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ../internal/operators/bufferToggle */
      "FD9M");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "bufferToggle", function () {
        return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"];
      });
      /* harmony import */


      var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ../internal/operators/bufferWhen */
      "PfrF");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "bufferWhen", function () {
        return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"];
      });
      /* harmony import */


      var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! ../internal/operators/catchError */
      "JIr8");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "catchError", function () {
        return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"];
      });
      /* harmony import */


      var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
      /*! ../internal/operators/combineAll */
      "7wxJ");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "combineAll", function () {
        return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"];
      });
      /* harmony import */


      var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
      /*! ../internal/operators/combineLatest */
      "fFD9");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "combineLatest", function () {
        return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"];
      });
      /* harmony import */


      var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
      /*! ../internal/operators/concat */
      "f29J");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "concat", function () {
        return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"];
      });
      /* harmony import */


      var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
      /*! ../internal/operators/concatAll */
      "0EUg");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "concatAll", function () {
        return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"];
      });
      /* harmony import */


      var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
      /*! ../internal/operators/concatMap */
      "bOdf");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "concatMap", function () {
        return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"];
      });
      /* harmony import */


      var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(
      /*! ../internal/operators/concatMapTo */
      "q7zd");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "concatMapTo", function () {
        return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"];
      });
      /* harmony import */


      var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(
      /*! ../internal/operators/count */
      "HrJb");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "count", function () {
        return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"];
      });
      /* harmony import */


      var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(
      /*! ../internal/operators/debounce */
      "6eBy");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "debounce", function () {
        return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"];
      });
      /* harmony import */


      var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(
      /*! ../internal/operators/debounceTime */
      "Kj3r");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "debounceTime", function () {
        return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"];
      });
      /* harmony import */


      var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(
      /*! ../internal/operators/defaultIfEmpty */
      "xbPD");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function () {
        return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"];
      });
      /* harmony import */


      var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(
      /*! ../internal/operators/delay */
      "3E0/");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "delay", function () {
        return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"];
      });
      /* harmony import */


      var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(
      /*! ../internal/operators/delayWhen */
      "coGc");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "delayWhen", function () {
        return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"];
      });
      /* harmony import */


      var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(
      /*! ../internal/operators/dematerialize */
      "kgNN");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "dematerialize", function () {
        return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"];
      });
      /* harmony import */


      var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(
      /*! ../internal/operators/distinct */
      "02Lk");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "distinct", function () {
        return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"];
      });
      /* harmony import */


      var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(
      /*! ../internal/operators/distinctUntilChanged */
      "/uUt");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function () {
        return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"];
      });
      /* harmony import */


      var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(
      /*! ../internal/operators/distinctUntilKeyChanged */
      "PZkE");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function () {
        return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"];
      });
      /* harmony import */


      var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(
      /*! ../internal/operators/elementAt */
      "9ihq");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "elementAt", function () {
        return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"];
      });
      /* harmony import */


      var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(
      /*! ../internal/operators/endWith */
      "0Pi8");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "endWith", function () {
        return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__["endWith"];
      });
      /* harmony import */


      var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(
      /*! ../internal/operators/every */
      "Gi4w");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "every", function () {
        return _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__["every"];
      });
      /* harmony import */


      var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(
      /*! ../internal/operators/exhaust */
      "zt7V");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "exhaust", function () {
        return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__["exhaust"];
      });
      /* harmony import */


      var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(
      /*! ../internal/operators/exhaustMap */
      "XqQ8");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "exhaustMap", function () {
        return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__["exhaustMap"];
      });
      /* harmony import */


      var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(
      /*! ../internal/operators/expand */
      "FQpF");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "expand", function () {
        return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__["expand"];
      });
      /* harmony import */


      var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(
      /*! ../internal/operators/filter */
      "pLZG");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "filter", function () {
        return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__["filter"];
      });
      /* harmony import */


      var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(
      /*! ../internal/operators/finalize */
      "nYR2");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "finalize", function () {
        return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__["finalize"];
      });
      /* harmony import */


      var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(
      /*! ../internal/operators/find */
      "cBqT");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "find", function () {
        return _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__["find"];
      });
      /* harmony import */


      var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(
      /*! ../internal/operators/findIndex */
      "K7De");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "findIndex", function () {
        return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__["findIndex"];
      });
      /* harmony import */


      var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(
      /*! ../internal/operators/first */
      "SxV6");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "first", function () {
        return _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__["first"];
      });
      /* harmony import */


      var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(
      /*! ../internal/operators/groupBy */
      "OQgR");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "groupBy", function () {
        return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__["groupBy"];
      });
      /* harmony import */


      var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(
      /*! ../internal/operators/ignoreElements */
      "4A3s");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "ignoreElements", function () {
        return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__["ignoreElements"];
      });
      /* harmony import */


      var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(
      /*! ../internal/operators/isEmpty */
      "m2j4");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isEmpty", function () {
        return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__["isEmpty"];
      });
      /* harmony import */


      var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(
      /*! ../internal/operators/last */
      "NJ9Y");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "last", function () {
        return _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__["last"];
      });
      /* harmony import */


      var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(
      /*! ../internal/operators/map */
      "lJxs");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "map", function () {
        return _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__["map"];
      });
      /* harmony import */


      var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(
      /*! ../internal/operators/mapTo */
      "CqXF");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "mapTo", function () {
        return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__["mapTo"];
      });
      /* harmony import */


      var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(
      /*! ../internal/operators/materialize */
      "dkDA");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "materialize", function () {
        return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__["materialize"];
      });
      /* harmony import */


      var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(
      /*! ../internal/operators/max */
      "yI9Y");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "max", function () {
        return _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__["max"];
      });
      /* harmony import */


      var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(
      /*! ../internal/operators/merge */
      "q92s");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "merge", function () {
        return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__["merge"];
      });
      /* harmony import */


      var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(
      /*! ../internal/operators/mergeAll */
      "bHdf");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "mergeAll", function () {
        return _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__["mergeAll"];
      });
      /* harmony import */


      var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(
      /*! ../internal/operators/mergeMap */
      "5+tZ");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "mergeMap", function () {
        return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "flatMap", function () {
        return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["flatMap"];
      });
      /* harmony import */


      var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(
      /*! ../internal/operators/mergeMapTo */
      "UXbc");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "mergeMapTo", function () {
        return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__["mergeMapTo"];
      });
      /* harmony import */


      var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(
      /*! ../internal/operators/mergeScan */
      "51Bx");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "mergeScan", function () {
        return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__["mergeScan"];
      });
      /* harmony import */


      var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(
      /*! ../internal/operators/min */
      "FZB8");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "min", function () {
        return _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__["min"];
      });
      /* harmony import */


      var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(
      /*! ../internal/operators/multicast */
      "oB13");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "multicast", function () {
        return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__["multicast"];
      });
      /* harmony import */


      var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(
      /*! ../internal/operators/observeOn */
      "pxpQ");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "observeOn", function () {
        return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__["observeOn"];
      });
      /* harmony import */


      var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(
      /*! ../internal/operators/onErrorResumeNext */
      "uTdr");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function () {
        return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__["onErrorResumeNext"];
      });
      /* harmony import */


      var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(
      /*! ../internal/operators/pairwise */
      "Zy1z");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "pairwise", function () {
        return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__["pairwise"];
      });
      /* harmony import */


      var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(
      /*! ../internal/operators/partition */
      "A3iJ");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "partition", function () {
        return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__["partition"];
      });
      /* harmony import */


      var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(
      /*! ../internal/operators/pluck */
      "wO+i");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "pluck", function () {
        return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__["pluck"];
      });
      /* harmony import */


      var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(
      /*! ../internal/operators/publish */
      "NfdI");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "publish", function () {
        return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__["publish"];
      });
      /* harmony import */


      var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(
      /*! ../internal/operators/publishBehavior */
      "UGaM");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "publishBehavior", function () {
        return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__["publishBehavior"];
      });
      /* harmony import */


      var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(
      /*! ../internal/operators/publishLast */
      "qZ0a");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "publishLast", function () {
        return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__["publishLast"];
      });
      /* harmony import */


      var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(
      /*! ../internal/operators/publishReplay */
      "05l1");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "publishReplay", function () {
        return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__["publishReplay"];
      });
      /* harmony import */


      var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(
      /*! ../internal/operators/race */
      "4f8F");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "race", function () {
        return _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__["race"];
      });
      /* harmony import */


      var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(
      /*! ../internal/operators/reduce */
      "128B");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "reduce", function () {
        return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__["reduce"];
      });
      /* harmony import */


      var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(
      /*! ../internal/operators/repeat */
      "/d8p");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "repeat", function () {
        return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__["repeat"];
      });
      /* harmony import */


      var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(
      /*! ../internal/operators/repeatWhen */
      "Gqsl");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "repeatWhen", function () {
        return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__["repeatWhen"];
      });
      /* harmony import */


      var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(
      /*! ../internal/operators/retry */
      "un/a");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "retry", function () {
        return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__["retry"];
      });
      /* harmony import */


      var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(
      /*! ../internal/operators/retryWhen */
      "MtjB");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "retryWhen", function () {
        return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__["retryWhen"];
      });
      /* harmony import */


      var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(
      /*! ../internal/operators/refCount */
      "x+ZX");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "refCount", function () {
        return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__["refCount"];
      });
      /* harmony import */


      var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(
      /*! ../internal/operators/sample */
      "c6ID");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "sample", function () {
        return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__["sample"];
      });
      /* harmony import */


      var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(
      /*! ../internal/operators/sampleTime */
      "1Ykd");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "sampleTime", function () {
        return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__["sampleTime"];
      });
      /* harmony import */


      var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(
      /*! ../internal/operators/scan */
      "Kqap");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "scan", function () {
        return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__["scan"];
      });
      /* harmony import */


      var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(
      /*! ../internal/operators/sequenceEqual */
      "Zyez");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "sequenceEqual", function () {
        return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__["sequenceEqual"];
      });
      /* harmony import */


      var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(
      /*! ../internal/operators/share */
      "w1tV");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "share", function () {
        return _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__["share"];
      });
      /* harmony import */


      var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(
      /*! ../internal/operators/shareReplay */
      "UXun");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "shareReplay", function () {
        return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__["shareReplay"];
      });
      /* harmony import */


      var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(
      /*! ../internal/operators/single */
      "cx9U");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "single", function () {
        return _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__["single"];
      });
      /* harmony import */


      var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(
      /*! ../internal/operators/skip */
      "zP0r");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "skip", function () {
        return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__["skip"];
      });
      /* harmony import */


      var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(
      /*! ../internal/operators/skipLast */
      "kagm");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "skipLast", function () {
        return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__["skipLast"];
      });
      /* harmony import */


      var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(
      /*! ../internal/operators/skipUntil */
      "vqkR");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "skipUntil", function () {
        return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__["skipUntil"];
      });
      /* harmony import */


      var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(
      /*! ../internal/operators/skipWhile */
      "32Ea");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "skipWhile", function () {
        return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__["skipWhile"];
      });
      /* harmony import */


      var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(
      /*! ../internal/operators/startWith */
      "JX91");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "startWith", function () {
        return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__["startWith"];
      });
      /* harmony import */


      var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(
      /*! ../internal/operators/subscribeOn */
      "tf+s");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "subscribeOn", function () {
        return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__["subscribeOn"];
      });
      /* harmony import */


      var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(
      /*! ../internal/operators/switchAll */
      "Y6wi");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "switchAll", function () {
        return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__["switchAll"];
      });
      /* harmony import */


      var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(
      /*! ../internal/operators/switchMap */
      "eIep");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "switchMap", function () {
        return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__["switchMap"];
      });
      /* harmony import */


      var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(
      /*! ../internal/operators/switchMapTo */
      "aGrj");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "switchMapTo", function () {
        return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__["switchMapTo"];
      });
      /* harmony import */


      var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(
      /*! ../internal/operators/take */
      "IzEk");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "take", function () {
        return _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__["take"];
      });
      /* harmony import */


      var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(
      /*! ../internal/operators/takeLast */
      "BFxc");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "takeLast", function () {
        return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__["takeLast"];
      });
      /* harmony import */


      var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(
      /*! ../internal/operators/takeUntil */
      "1G5W");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "takeUntil", function () {
        return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__["takeUntil"];
      });
      /* harmony import */


      var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(
      /*! ../internal/operators/takeWhile */
      "GJmQ");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "takeWhile", function () {
        return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__["takeWhile"];
      });
      /* harmony import */


      var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(
      /*! ../internal/operators/tap */
      "vkgz");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "tap", function () {
        return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__["tap"];
      });
      /* harmony import */


      var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(
      /*! ../internal/operators/throttle */
      "yuhW");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "throttle", function () {
        return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__["throttle"];
      });
      /* harmony import */


      var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(
      /*! ../internal/operators/throttleTime */
      "gcYM");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "throttleTime", function () {
        return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__["throttleTime"];
      });
      /* harmony import */


      var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(
      /*! ../internal/operators/throwIfEmpty */
      "XDbj");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function () {
        return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__["throwIfEmpty"];
      });
      /* harmony import */


      var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(
      /*! ../internal/operators/timeInterval */
      "4hIw");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "timeInterval", function () {
        return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__["timeInterval"];
      });
      /* harmony import */


      var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(
      /*! ../internal/operators/timeout */
      "tS1D");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "timeout", function () {
        return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__["timeout"];
      });
      /* harmony import */


      var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(
      /*! ../internal/operators/timeoutWith */
      "syX2");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "timeoutWith", function () {
        return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__["timeoutWith"];
      });
      /* harmony import */


      var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(
      /*! ../internal/operators/timestamp */
      "r0WS");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "timestamp", function () {
        return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__["timestamp"];
      });
      /* harmony import */


      var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(
      /*! ../internal/operators/toArray */
      "IAdc");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "toArray", function () {
        return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__["toArray"];
      });
      /* harmony import */


      var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(
      /*! ../internal/operators/window */
      "mk5/");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "window", function () {
        return _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__["window"];
      });
      /* harmony import */


      var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(
      /*! ../internal/operators/windowCount */
      "lpKW");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "windowCount", function () {
        return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__["windowCount"];
      });
      /* harmony import */


      var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(
      /*! ../internal/operators/windowTime */
      "UHp3");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "windowTime", function () {
        return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__["windowTime"];
      });
      /* harmony import */


      var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(
      /*! ../internal/operators/windowToggle */
      "sTY7");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "windowToggle", function () {
        return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__["windowToggle"];
      });
      /* harmony import */


      var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(
      /*! ../internal/operators/windowWhen */
      "pXlZ");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "windowWhen", function () {
        return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__["windowWhen"];
      });
      /* harmony import */


      var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(
      /*! ../internal/operators/withLatestFrom */
      "zp1y");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "withLatestFrom", function () {
        return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__["withLatestFrom"];
      });
      /* harmony import */


      var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(
      /*! ../internal/operators/zip */
      "GjHo");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "zip", function () {
        return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__["zip"];
      });
      /* harmony import */


      var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(
      /*! ../internal/operators/zipAll */
      "JmF6");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "zipAll", function () {
        return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"];
      }); //# sourceMappingURL=index.js.map

      /***/

    },

    /***/
    "kWuB":
    /*!****************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/client.js ***!
      \****************************************************/

    /*! exports provided: BrowserClient */

    /***/
    function kWuB(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BrowserClient", function () {
        return BrowserClient;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/core */
      "wBhU");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _backend__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./backend */
      "y/t4");
      /* harmony import */


      var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./helpers */
      "vzc1");
      /* harmony import */


      var _integrations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./integrations */
      "4kjc");
      /**
       * The Sentry Browser SDK Client.
       *
       * @see BrowserOptions for documentation on configuration options.
       * @see SentryClient for usage documentation.
       */


      var BrowserClient =
      /** @class */
      function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BrowserClient, _super);
        /**
         * Creates a new Browser SDK instance.
         *
         * @param options Configuration options for this SDK.
         */

        function BrowserClient(options) {
          if (options === void 0) {
            options = {};
          }

          var _this = this;

          options._metadata = options._metadata || {};
          options._metadata.sdk = options._metadata.sdk || {
            name: 'sentry.javascript.browser',
            packages: [{
              name: 'npm:@sentry/browser',
              version: _sentry_core__WEBPACK_IMPORTED_MODULE_1__["SDK_VERSION"]
            }],
            version: _sentry_core__WEBPACK_IMPORTED_MODULE_1__["SDK_VERSION"]
          };
          _this = _super.call(this, _backend__WEBPACK_IMPORTED_MODULE_3__["BrowserBackend"], options) || this;
          return _this;
        }
        /**
         * Show a report dialog to the user to send feedback to a specific event.
         *
         * @param options Set individual options for the dialog
         */


        BrowserClient.prototype.showReportDialog = function (options) {
          if (options === void 0) {
            options = {};
          } // doesn't work without a document (React Native)


          var document = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["getGlobalObject"])().document;

          if (!document) {
            return;
          }

          if (!this._isEnabled()) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].error('Trying to call showReportDialog with Sentry Client disabled');

            return;
          }

          Object(_helpers__WEBPACK_IMPORTED_MODULE_4__["injectReportDialog"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, options), {
            dsn: options.dsn || this.getDsn()
          }));
        };
        /**
         * @inheritDoc
         */


        BrowserClient.prototype._prepareEvent = function (event, scope, hint) {
          event.platform = event.platform || 'javascript';
          return _super.prototype._prepareEvent.call(this, event, scope, hint);
        };
        /**
         * @inheritDoc
         */


        BrowserClient.prototype._sendEvent = function (event) {
          var integration = this.getIntegration(_integrations__WEBPACK_IMPORTED_MODULE_5__["Breadcrumbs"]);

          if (integration) {
            integration.addSentryBreadcrumb(event);
          }

          _super.prototype._sendEvent.call(this, event);
        };

        return BrowserClient;
      }(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["BaseClient"]); //# sourceMappingURL=client.js.map

      /***/

    },

    /***/
    "kagm":
    /*!*******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/skipLast.js ***!
      \*******************************************************************/

    /*! exports provided: skipLast */

    /***/
    function kagm(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "skipLast", function () {
        return skipLast;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/ArgumentOutOfRangeError */
      "4I5i");

      function skipLast(count) {
        return function (source) {
          return source.lift(new SkipLastOperator(count));
        };
      }

      var SkipLastOperator = /*#__PURE__*/function () {
        function SkipLastOperator(_skipCount) {
          _classCallCheck(this, SkipLastOperator);

          this._skipCount = _skipCount;

          if (this._skipCount < 0) {
            throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__["ArgumentOutOfRangeError"]();
          }
        }

        _createClass2(SkipLastOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            if (this._skipCount === 0) {
              return source.subscribe(new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](subscriber));
            } else {
              return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));
            }
          }
        }]);

        return SkipLastOperator;
      }();

      var SkipLastSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_34) {
        _inherits(SkipLastSubscriber, _Subscriber__WEBPACK_34);

        var _super254 = _createSuper(SkipLastSubscriber);

        function SkipLastSubscriber(destination, _skipCount) {
          var _this520;

          _classCallCheck(this, SkipLastSubscriber);

          _this520 = _super254.call(this, destination);
          _this520._skipCount = _skipCount;
          _this520._count = 0;
          _this520._ring = new Array(_skipCount);
          return _this520;
        }

        _createClass2(SkipLastSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var skipCount = this._skipCount;
            var count = this._count++;

            if (count < skipCount) {
              this._ring[count] = value;
            } else {
              var currentIndex = count % skipCount;
              var ring = this._ring;
              var oldValue = ring[currentIndex];
              ring[currentIndex] = value;
              this.destination.next(oldValue);
            }
          }
        }]);

        return SkipLastSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=skipLast.js.map

      /***/

    },

    /***/
    "kdvv":
    /*!************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/time.js ***!
      \************************************************/

    /*! exports provided: dateTimestampInSeconds, timestampInSeconds, timestampWithMs, usingPerformanceAPI, _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin */

    /***/
    function kdvv(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* WEBPACK VAR INJECTION */


      (function (module) {
        /* harmony export (binding) */
        __webpack_require__.d(__webpack_exports__, "dateTimestampInSeconds", function () {
          return dateTimestampInSeconds;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "timestampInSeconds", function () {
          return timestampInSeconds;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "timestampWithMs", function () {
          return timestampWithMs;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "usingPerformanceAPI", function () {
          return usingPerformanceAPI;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "_browserPerformanceTimeOriginMode", function () {
          return _browserPerformanceTimeOriginMode;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "browserPerformanceTimeOrigin", function () {
          return browserPerformanceTimeOrigin;
        });
        /* harmony import */


        var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
        /*! ./global */
        "z+RT");
        /* harmony import */


        var _node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
        /*! ./node */
        "+A1k");
        /**
         * A TimestampSource implementation for environments that do not support the Performance Web API natively.
         *
         * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier
         * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It
         * is more obvious to explain "why does my span have negative duration" than "why my spans have zero duration".
         */


        var dateTimestampSource = {
          nowSeconds: function nowSeconds() {
            return Date.now() / 1000;
          }
        };
        /**
         * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not
         * support the API.
         *
         * Wrapping the native API works around differences in behavior from different browsers.
         */

        function getBrowserPerformance() {
          var performance = Object(_global__WEBPACK_IMPORTED_MODULE_0__["getGlobalObject"])().performance;

          if (!performance || !performance.now) {
            return undefined;
          } // Replace performance.timeOrigin with our own timeOrigin based on Date.now().
          //
          // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +
          // performance.now() gives a date arbitrarily in the past.
          //
          // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is
          // undefined.
          //
          // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to
          // interact with data coming out of performance entries.
          //
          // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that
          // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes
          // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have
          // observed skews that can be as long as days, weeks or months.
          //
          // See https://github.com/getsentry/sentry-javascript/issues/2590.
          //
          // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload
          // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation
          // transactions of long-lived web pages.


          var timeOrigin = Date.now() - performance.now();
          return {
            now: function now() {
              return performance.now();
            },
            timeOrigin: timeOrigin
          };
        }
        /**
         * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't
         * implement the API.
         */


        function getNodePerformance() {
          try {
            var perfHooks = Object(_node__WEBPACK_IMPORTED_MODULE_1__["dynamicRequire"])(module, 'perf_hooks');
            return perfHooks.performance;
          } catch (_) {
            return undefined;
          }
        }
        /**
         * The Performance API implementation for the current platform, if available.
         */


        var platformPerformance = Object(_node__WEBPACK_IMPORTED_MODULE_1__["isNodeEnv"])() ? getNodePerformance() : getBrowserPerformance();
        var timestampSource = platformPerformance === undefined ? dateTimestampSource : {
          nowSeconds: function nowSeconds() {
            return (platformPerformance.timeOrigin + platformPerformance.now()) / 1000;
          }
        };
        /**
         * Returns a timestamp in seconds since the UNIX epoch using the Date API.
         */

        var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);
        /**
         * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the
         * availability of the Performance API.
         *
         * See `usingPerformanceAPI` to test whether the Performance API is used.
         *
         * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is
         * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The
         * skew can grow to arbitrary amounts like days, weeks or months.
         * See https://github.com/getsentry/sentry-javascript/issues/2590.
         */

        var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource); // Re-exported with an old name for backwards-compatibility.

        var timestampWithMs = timestampInSeconds;
        /**
         * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.
         */

        var usingPerformanceAPI = platformPerformance !== undefined;
        /**
         * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.
         */

        var _browserPerformanceTimeOriginMode;
        /**
         * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the
         * performance API is available.
         */


        var browserPerformanceTimeOrigin = function () {
          // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or
          // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin
          // data as reliable if they are within a reasonable threshold of the current time.
          var performance = Object(_global__WEBPACK_IMPORTED_MODULE_0__["getGlobalObject"])().performance;

          if (!performance || !performance.now) {
            _browserPerformanceTimeOriginMode = 'none';
            return undefined;
          }

          var threshold = 3600 * 1000;
          var performanceNow = performance.now();
          var dateNow = Date.now(); // if timeOrigin isn't available set delta to threshold so it isn't used

          var timeOriginDelta = performance.timeOrigin ? Math.abs(performance.timeOrigin + performanceNow - dateNow) : threshold;
          var timeOriginIsReliable = timeOriginDelta < threshold; // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin
          // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.
          // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always
          // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the
          // Date API.
          // eslint-disable-next-line deprecation/deprecation

          var navigationStart = performance.timing && performance.timing.navigationStart;
          var hasNavigationStart = typeof navigationStart === 'number'; // if navigationStart isn't available set delta to threshold so it isn't used

          var navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;
          var navigationStartIsReliable = navigationStartDelta < threshold;

          if (timeOriginIsReliable || navigationStartIsReliable) {
            // Use the more reliable time origin
            if (timeOriginDelta <= navigationStartDelta) {
              _browserPerformanceTimeOriginMode = 'timeOrigin';
              return performance.timeOrigin;
            } else {
              _browserPerformanceTimeOriginMode = 'navigationStart';
              return navigationStart;
            }
          } // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.


          _browserPerformanceTimeOriginMode = 'dateNow';
          return dateNow;
        }(); //# sourceMappingURL=time.js.map

        /* WEBPACK VAR INJECTION */

      }).call(this, __webpack_require__(
      /*! ./../../../webpack/buildin/harmony-module.js */
      "3UD+")(module));
      /***/
    },

    /***/
    "kerP":
    /*!***********************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/web-vitals/getFID.js ***!
      \***********************************************************************/

    /*! exports provided: getFID */

    /***/
    function kerP(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getFID", function () {
        return getFID;
      });
      /* harmony import */


      var _lib_bindReporter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./lib/bindReporter */
      "Fm1u");
      /* harmony import */


      var _lib_getVisibilityWatcher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./lib/getVisibilityWatcher */
      "hNpR");
      /* harmony import */


      var _lib_initMetric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./lib/initMetric */
      "bjvM");
      /* harmony import */


      var _lib_observe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./lib/observe */
      "MaC4");
      /* harmony import */


      var _lib_onHidden__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./lib/onHidden */
      "6mNm");
      /*
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *     https://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var getFID = function getFID(onReport, reportAllChanges) {
        var visibilityWatcher = Object(_lib_getVisibilityWatcher__WEBPACK_IMPORTED_MODULE_1__["getVisibilityWatcher"])();
        var metric = Object(_lib_initMetric__WEBPACK_IMPORTED_MODULE_2__["initMetric"])('FID');
        var report;

        var entryHandler = function entryHandler(entry) {
          // Only report if the page wasn't hidden prior to the first input.
          if (report && entry.startTime < visibilityWatcher.firstHiddenTime) {
            metric.value = entry.processingStart - entry.startTime;
            metric.entries.push(entry);
            report(true);
          }
        };

        var po = Object(_lib_observe__WEBPACK_IMPORTED_MODULE_3__["observe"])('first-input', entryHandler);

        if (po) {
          report = Object(_lib_bindReporter__WEBPACK_IMPORTED_MODULE_0__["bindReporter"])(onReport, metric, reportAllChanges);
          Object(_lib_onHidden__WEBPACK_IMPORTED_MODULE_4__["onHidden"])(function () {
            po.takeRecords().map(entryHandler);
            po.disconnect();
          }, true);
        }
      }; //# sourceMappingURL=getFID.js.map

      /***/

    },

    /***/
    "kgNN":
    /*!************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/dematerialize.js ***!
      \************************************************************************/

    /*! exports provided: dematerialize */

    /***/
    function kgNN(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "dematerialize", function () {
        return dematerialize;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function dematerialize() {
        return function dematerializeOperatorFunction(source) {
          return source.lift(new DeMaterializeOperator());
        };
      }

      var DeMaterializeOperator = /*#__PURE__*/function () {
        function DeMaterializeOperator() {
          _classCallCheck(this, DeMaterializeOperator);
        }

        _createClass2(DeMaterializeOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new DeMaterializeSubscriber(subscriber));
          }
        }]);

        return DeMaterializeOperator;
      }();

      var DeMaterializeSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_35) {
        _inherits(DeMaterializeSubscriber, _Subscriber__WEBPACK_35);

        var _super255 = _createSuper(DeMaterializeSubscriber);

        function DeMaterializeSubscriber(destination) {
          _classCallCheck(this, DeMaterializeSubscriber);

          return _super255.call(this, destination);
        }

        _createClass2(DeMaterializeSubscriber, [{
          key: "_next",
          value: function _next(value) {
            value.observe(this.destination);
          }
        }]);

        return DeMaterializeSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=dematerialize.js.map

      /***/

    },

    /***/
    "l5mm":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/interval.js ***!
      \********************************************************************/

    /*! exports provided: interval */

    /***/
    function l5mm(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "interval", function () {
        return interval;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../scheduler/async */
      "D0XW");
      /* harmony import */


      var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../util/isNumeric */
      "Y7HM");

      function interval() {
        var period = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
        var scheduler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];

        if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(period) || period < 0) {
          period = 0;
        }

        if (!scheduler || typeof scheduler.schedule !== 'function') {
          scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
        }

        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          subscriber.add(scheduler.schedule(dispatch, period, {
            subscriber: subscriber,
            counter: 0,
            period: period
          }));
          return subscriber;
        });
      }

      function dispatch(state) {
        var subscriber = state.subscriber,
            counter = state.counter,
            period = state.period;
        subscriber.next(counter);
        this.schedule({
          subscriber: subscriber,
          counter: counter + 1,
          period: period
        }, period);
      } //# sourceMappingURL=interval.js.map

      /***/

    },

    /***/
    "l7GE":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js ***!
      \****************************************************************/

    /*! exports provided: OuterSubscriber */

    /***/
    function l7GE(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "OuterSubscriber", function () {
        return OuterSubscriber;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./Subscriber */
      "7o/Q");

      var OuterSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_36) {
        _inherits(OuterSubscriber, _Subscriber__WEBPACK_36);

        var _super256 = _createSuper(OuterSubscriber);

        function OuterSubscriber() {
          _classCallCheck(this, OuterSubscriber);

          return _super256.apply(this, arguments);
        }

        _createClass2(OuterSubscriber, [{
          key: "notifyNext",
          value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
            this.destination.next(innerValue);
          }
        }, {
          key: "notifyError",
          value: function notifyError(error, innerSub) {
            this.destination.error(error);
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete(innerSub) {
            this.destination.complete();
          }
        }]);

        return OuterSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=OuterSubscriber.js.map

      /***/

    },

    /***/
    "lJxs":
    /*!**************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/map.js ***!
      \**************************************************************/

    /*! exports provided: map, MapOperator */

    /***/
    function lJxs(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "map", function () {
        return map;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MapOperator", function () {
        return MapOperator;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function map(project, thisArg) {
        return function mapOperation(source) {
          if (typeof project !== 'function') {
            throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
          }

          return source.lift(new MapOperator(project, thisArg));
        };
      }

      var MapOperator = /*#__PURE__*/function () {
        function MapOperator(project, thisArg) {
          _classCallCheck(this, MapOperator);

          this.project = project;
          this.thisArg = thisArg;
        }

        _createClass2(MapOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));
          }
        }]);

        return MapOperator;
      }();

      var MapSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_37) {
        _inherits(MapSubscriber, _Subscriber__WEBPACK_37);

        var _super257 = _createSuper(MapSubscriber);

        function MapSubscriber(destination, project, thisArg) {
          var _this521;

          _classCallCheck(this, MapSubscriber);

          _this521 = _super257.call(this, destination);
          _this521.project = project;
          _this521.count = 0;
          _this521.thisArg = thisArg || _assertThisInitialized(_this521);
          return _this521;
        }

        _createClass2(MapSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var result;

            try {
              result = this.project.call(this.thisArg, value, this.count++);
            } catch (err) {
              this.destination.error(err);
              return;
            }

            this.destination.next(result);
          }
        }]);

        return MapSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=map.js.map

      /***/

    },

    /***/
    "lW6c":
    /*!*********************************************!*\
      !*** ./node_modules/@sentry/hub/esm/hub.js ***!
      \*********************************************/

    /*! exports provided: API_VERSION, Hub, getMainCarrier, makeMain, getCurrentHub, getActiveDomain, getHubFromCarrier, setHubOnCarrier */

    /***/
    function lW6c(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "API_VERSION", function () {
        return API_VERSION;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Hub", function () {
        return Hub;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getMainCarrier", function () {
        return getMainCarrier;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "makeMain", function () {
        return makeMain;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getCurrentHub", function () {
        return getCurrentHub;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getActiveDomain", function () {
        return getActiveDomain;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getHubFromCarrier", function () {
        return getHubFromCarrier;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setHubOnCarrier", function () {
        return setHubOnCarrier;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/types */
      "PIsB");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _scope__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./scope */
      "KjyA");
      /* harmony import */


      var _session__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./session */
      "xS++");
      /* eslint-disable max-lines */

      /**
       * API compatibility version of this hub.
       *
       * WARNING: This number should only be increased when the global interface
       * changes and new methods are introduced.
       *
       * @hidden
       */


      var API_VERSION = 4;
      /**
       * Default maximum number of breadcrumbs added to an event. Can be overwritten
       * with {@link Options.maxBreadcrumbs}.
       */

      var DEFAULT_BREADCRUMBS = 100;
      /**
       * @inheritDoc
       */

      var Hub =
      /** @class */
      function () {
        /**
         * Creates a new instance of the hub, will push one {@link Layer} into the
         * internal stack on creation.
         *
         * @param client bound to the hub.
         * @param scope bound to the hub.
         * @param version number, higher number means higher priority.
         */
        function Hub(client, scope, _version) {
          if (scope === void 0) {
            scope = new _scope__WEBPACK_IMPORTED_MODULE_3__["Scope"]();
          }

          if (_version === void 0) {
            _version = API_VERSION;
          }

          this._version = _version;
          /** Is a {@link Layer}[] containing the client and scope */

          this._stack = [{}];
          this.getStackTop().scope = scope;

          if (client) {
            this.bindClient(client);
          }
        }
        /**
         * @inheritDoc
         */


        Hub.prototype.isOlderThan = function (version) {
          return this._version < version;
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.bindClient = function (client) {
          var top = this.getStackTop();
          top.client = client;

          if (client && client.setupIntegrations) {
            client.setupIntegrations();
          }
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.pushScope = function () {
          // We want to clone the content of prev scope
          var scope = _scope__WEBPACK_IMPORTED_MODULE_3__["Scope"].clone(this.getScope());

          this.getStack().push({
            client: this.getClient(),
            scope: scope
          });
          return scope;
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.popScope = function () {
          if (this.getStack().length <= 1) return false;
          return !!this.getStack().pop();
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.withScope = function (callback) {
          var scope = this.pushScope();

          try {
            callback(scope);
          } finally {
            this.popScope();
          }
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.getClient = function () {
          return this.getStackTop().client;
        };
        /** Returns the scope of the top stack. */


        Hub.prototype.getScope = function () {
          return this.getStackTop().scope;
        };
        /** Returns the scope stack for domains or the process. */


        Hub.prototype.getStack = function () {
          return this._stack;
        };
        /** Returns the topmost scope layer in the order domain > local > process. */


        Hub.prototype.getStackTop = function () {
          return this._stack[this._stack.length - 1];
        };
        /**
         * @inheritDoc
         */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types


        Hub.prototype.captureException = function (exception, hint) {
          var eventId = this._lastEventId = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["uuid4"])();
          var finalHint = hint; // If there's no explicit hint provided, mimic the same thing that would happen
          // in the minimal itself to create a consistent behavior.
          // We don't do this in the client, as it's the lowest level API, and doing this,
          // would prevent user from having full control over direct calls.

          if (!hint) {
            var syntheticException = void 0;

            try {
              throw new Error('Sentry syntheticException');
            } catch (exception) {
              syntheticException = exception;
            }

            finalHint = {
              originalException: exception,
              syntheticException: syntheticException
            };
          }

          this._invokeClient('captureException', exception, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, finalHint), {
            event_id: eventId
          }));

          return eventId;
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.captureMessage = function (message, level, hint) {
          var eventId = this._lastEventId = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["uuid4"])();
          var finalHint = hint; // If there's no explicit hint provided, mimic the same thing that would happen
          // in the minimal itself to create a consistent behavior.
          // We don't do this in the client, as it's the lowest level API, and doing this,
          // would prevent user from having full control over direct calls.

          if (!hint) {
            var syntheticException = void 0;

            try {
              throw new Error(message);
            } catch (exception) {
              syntheticException = exception;
            }

            finalHint = {
              originalException: message,
              syntheticException: syntheticException
            };
          }

          this._invokeClient('captureMessage', message, level, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, finalHint), {
            event_id: eventId
          }));

          return eventId;
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.captureEvent = function (event, hint) {
          var eventId = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["uuid4"])();

          if (event.type !== 'transaction') {
            this._lastEventId = eventId;
          }

          this._invokeClient('captureEvent', event, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, hint), {
            event_id: eventId
          }));

          return eventId;
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.lastEventId = function () {
          return this._lastEventId;
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.addBreadcrumb = function (breadcrumb, hint) {
          var _a = this.getStackTop(),
              scope = _a.scope,
              client = _a.client;

          if (!scope || !client) return; // eslint-disable-next-line @typescript-eslint/unbound-method

          var _b = client.getOptions && client.getOptions() || {},
              _c = _b.beforeBreadcrumb,
              beforeBreadcrumb = _c === void 0 ? null : _c,
              _d = _b.maxBreadcrumbs,
              maxBreadcrumbs = _d === void 0 ? DEFAULT_BREADCRUMBS : _d;

          if (maxBreadcrumbs <= 0) return;
          var timestamp = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["dateTimestampInSeconds"])();
          var mergedBreadcrumb = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
            timestamp: timestamp
          }, breadcrumb);
          var finalBreadcrumb = beforeBreadcrumb ? Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["consoleSandbox"])(function () {
            return beforeBreadcrumb(mergedBreadcrumb, hint);
          }) : mergedBreadcrumb;
          if (finalBreadcrumb === null) return;
          scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.setUser = function (user) {
          var scope = this.getScope();
          if (scope) scope.setUser(user);
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.setTags = function (tags) {
          var scope = this.getScope();
          if (scope) scope.setTags(tags);
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.setExtras = function (extras) {
          var scope = this.getScope();
          if (scope) scope.setExtras(extras);
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.setTag = function (key, value) {
          var scope = this.getScope();
          if (scope) scope.setTag(key, value);
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.setExtra = function (key, extra) {
          var scope = this.getScope();
          if (scope) scope.setExtra(key, extra);
        };
        /**
         * @inheritDoc
         */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any


        Hub.prototype.setContext = function (name, context) {
          var scope = this.getScope();
          if (scope) scope.setContext(name, context);
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.configureScope = function (callback) {
          var _a = this.getStackTop(),
              scope = _a.scope,
              client = _a.client;

          if (scope && client) {
            callback(scope);
          }
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.run = function (callback) {
          var oldHub = makeMain(this);

          try {
            callback(this);
          } finally {
            makeMain(oldHub);
          }
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.getIntegration = function (integration) {
          var client = this.getClient();
          if (!client) return null;

          try {
            return client.getIntegration(integration);
          } catch (_oO) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].warn("Cannot retrieve integration " + integration.id + " from the current Hub");

            return null;
          }
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.startSpan = function (context) {
          return this._callExtensionMethod('startSpan', context);
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.startTransaction = function (context, customSamplingContext) {
          return this._callExtensionMethod('startTransaction', context, customSamplingContext);
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.traceHeaders = function () {
          return this._callExtensionMethod('traceHeaders');
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.captureSession = function (endSession) {
          if (endSession === void 0) {
            endSession = false;
          } // both send the update and pull the session from the scope


          if (endSession) {
            return this.endSession();
          } // only send the update


          this._sendSessionUpdate();
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.endSession = function () {
          var _a, _b, _c, _d, _e;

          (_c = (_b = (_a = this.getStackTop()) === null || _a === void 0 ? void 0 : _a.scope) === null || _b === void 0 ? void 0 : _b.getSession()) === null || _c === void 0 ? void 0 : _c.close();

          this._sendSessionUpdate(); // the session is over; take it off of the scope


          (_e = (_d = this.getStackTop()) === null || _d === void 0 ? void 0 : _d.scope) === null || _e === void 0 ? void 0 : _e.setSession();
        };
        /**
         * @inheritDoc
         */


        Hub.prototype.startSession = function (context) {
          var _a = this.getStackTop(),
              scope = _a.scope,
              client = _a.client;

          var _b = client && client.getOptions() || {},
              release = _b.release,
              environment = _b.environment; // Will fetch userAgent if called from browser sdk


          var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["getGlobalObject"])();
          var userAgent = (global.navigator || {}).userAgent;
          var session = new _session__WEBPACK_IMPORTED_MODULE_4__["Session"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
            release: release,
            environment: environment
          }, scope && {
            user: scope.getUser()
          }), userAgent && {
            userAgent: userAgent
          }), context));

          if (scope) {
            // End existing session if there's one
            var currentSession = scope.getSession && scope.getSession();

            if (currentSession && currentSession.status === _sentry_types__WEBPACK_IMPORTED_MODULE_1__["SessionStatus"].Ok) {
              currentSession.update({
                status: _sentry_types__WEBPACK_IMPORTED_MODULE_1__["SessionStatus"].Exited
              });
            }

            this.endSession(); // Afterwards we set the new session on the scope

            scope.setSession(session);
          }

          return session;
        };
        /**
         * Sends the current Session on the scope
         */


        Hub.prototype._sendSessionUpdate = function () {
          var _a = this.getStackTop(),
              scope = _a.scope,
              client = _a.client;

          if (!scope) return;
          var session = scope.getSession && scope.getSession();

          if (session) {
            if (client && client.captureSession) {
              client.captureSession(session);
            }
          }
        };
        /**
         * Internal helper function to call a method on the top client if it exists.
         *
         * @param method The method to call on the client.
         * @param args Arguments to pass to the client function.
         */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any


        Hub.prototype._invokeClient = function (method) {
          var _a;

          var args = [];

          for (var _i = 1; _i < arguments.length; _i++) {
            args[_i - 1] = arguments[_i];
          }

          var _b = this.getStackTop(),
              scope = _b.scope,
              client = _b.client;

          if (client && client[method]) {
            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
            (_a = client)[method].apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args, [scope]));
          }
        };
        /**
         * Calls global extension method and binding current instance to the function call
         */
        // @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)
        // eslint-disable-next-line @typescript-eslint/no-explicit-any


        Hub.prototype._callExtensionMethod = function (method) {
          var args = [];

          for (var _i = 1; _i < arguments.length; _i++) {
            args[_i - 1] = arguments[_i];
          }

          var carrier = getMainCarrier();
          var sentry = carrier.__SENTRY__;

          if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {
            return sentry.extensions[method].apply(this, args);
          }

          _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].warn("Extension method " + method + " couldn't be found, doing nothing.");
        };

        return Hub;
      }();
      /**
       * Returns the global shim registry.
       *
       * FIXME: This function is problematic, because despite always returning a valid Carrier,
       * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check
       * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.
       **/


      function getMainCarrier() {
        var carrier = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["getGlobalObject"])();
        carrier.__SENTRY__ = carrier.__SENTRY__ || {
          extensions: {},
          hub: undefined
        };
        return carrier;
      }
      /**
       * Replaces the current main hub with the passed one on the global object
       *
       * @returns The old replaced hub
       */


      function makeMain(hub) {
        var registry = getMainCarrier();
        var oldHub = getHubFromCarrier(registry);
        setHubOnCarrier(registry, hub);
        return oldHub;
      }
      /**
       * Returns the default hub instance.
       *
       * If a hub is already registered in the global carrier but this module
       * contains a more recent version, it replaces the registered version.
       * Otherwise, the currently registered hub will be returned.
       */


      function getCurrentHub() {
        // Get main carrier (global for every environment)
        var registry = getMainCarrier(); // If there's no hub, or its an old API, assign a new one

        if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {
          setHubOnCarrier(registry, new Hub());
        } // Prefer domains over global if they are there (applicable only to Node environment)


        if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["isNodeEnv"])()) {
          return getHubFromActiveDomain(registry);
        } // Return hub that lives on a global object


        return getHubFromCarrier(registry);
      }
      /**
       * Returns the active domain, if one exists
       * @deprecated No longer used; remove in v7
       * @returns The domain, or undefined if there is no active domain
       */
      // eslint-disable-next-line deprecation/deprecation


      function getActiveDomain() {
        _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');

        var sentry = getMainCarrier().__SENTRY__;

        return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
      }
      /**
       * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist
       * @returns discovered hub
       */


      function getHubFromActiveDomain(registry) {
        var _a, _b, _c;

        try {
          var activeDomain = (_c = (_b = (_a = getMainCarrier().__SENTRY__) === null || _a === void 0 ? void 0 : _a.extensions) === null || _b === void 0 ? void 0 : _b.domain) === null || _c === void 0 ? void 0 : _c.active; // If there's no active domain, just return global hub

          if (!activeDomain) {
            return getHubFromCarrier(registry);
          } // If there's no hub on current domain, or it's an old API, assign a new one


          if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {
            var registryHubTopStack = getHubFromCarrier(registry).getStackTop();
            setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, _scope__WEBPACK_IMPORTED_MODULE_3__["Scope"].clone(registryHubTopStack.scope)));
          } // Return hub that lives on a domain


          return getHubFromCarrier(activeDomain);
        } catch (_Oo) {
          // Return hub that lives on a global object
          return getHubFromCarrier(registry);
        }
      }
      /**
       * This will tell whether a carrier has a hub on it or not
       * @param carrier object
       */


      function hasHubOnCarrier(carrier) {
        return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);
      }
      /**
       * This will create a new {@link Hub} and add to the passed object on
       * __SENTRY__.hub.
       * @param carrier object
       * @hidden
       */


      function getHubFromCarrier(carrier) {
        if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) return carrier.__SENTRY__.hub;
        carrier.__SENTRY__ = carrier.__SENTRY__ || {};
        carrier.__SENTRY__.hub = new Hub();
        return carrier.__SENTRY__.hub;
      }
      /**
       * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute
       * @param carrier object
       * @param hub Hub
       * @returns A boolean indicating success or failure
       */


      function setHubOnCarrier(carrier, hub) {
        if (!carrier) return false;
        carrier.__SENTRY__ = carrier.__SENTRY__ || {};
        carrier.__SENTRY__.hub = hub;
        return true;
      } //# sourceMappingURL=hub.js.map

      /***/

    },

    /***/
    "lddD":
    /*!**********************************************************************!*\
      !*** ./node_modules/@sentry/core/esm/integrations/inboundfilters.js ***!
      \**********************************************************************/

    /*! exports provided: InboundFilters */

    /***/
    function lddD(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "InboundFilters", function () {
        return InboundFilters;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_hub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/hub */
      "uzXi");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF"); // "Script error." is hard coded into browsers for errors that it can't read.
      // this is the result of a script being pulled in from an external domain and CORS.


      var DEFAULT_IGNORE_ERRORS = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/];
      /** Inbound filters configurable by the user */

      var InboundFilters =
      /** @class */
      function () {
        function InboundFilters(_options) {
          if (_options === void 0) {
            _options = {};
          }

          this._options = _options;
          /**
           * @inheritDoc
           */

          this.name = InboundFilters.id;
        }
        /**
         * @inheritDoc
         */


        InboundFilters.prototype.setupOnce = function () {
          Object(_sentry_hub__WEBPACK_IMPORTED_MODULE_1__["addGlobalEventProcessor"])(function (event) {
            var hub = Object(_sentry_hub__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])();

            if (!hub) {
              return event;
            }

            var self = hub.getIntegration(InboundFilters);

            if (self) {
              var client = hub.getClient();
              var clientOptions = client ? client.getOptions() : {}; // This checks prevents most of the occurrences of the bug linked below:
              // https://github.com/getsentry/sentry-javascript/issues/2622
              // The bug is caused by multiple SDK instances, where one is minified and one is using non-mangled code.
              // Unfortunatelly we cannot fix it reliably (thus reserved property in rollup's terser config),
              // as we cannot force people using multiple instances in their apps to sync SDK versions.

              var options = typeof self._mergeOptions === 'function' ? self._mergeOptions(clientOptions) : {};

              if (typeof self._shouldDropEvent !== 'function') {
                return event;
              }

              return self._shouldDropEvent(event, options) ? null : event;
            }

            return event;
          });
        };
        /** JSDoc */


        InboundFilters.prototype._shouldDropEvent = function (event, options) {
          if (this._isSentryError(event, options)) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].warn("Event dropped due to being internal Sentry Error.\nEvent: " + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["getEventDescription"])(event));

            return true;
          }

          if (this._isIgnoredError(event, options)) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: " + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["getEventDescription"])(event));

            return true;
          }

          if (this._isDeniedUrl(event, options)) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].warn("Event dropped due to being matched by `denyUrls` option.\nEvent: " + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["getEventDescription"])(event) + ".\nUrl: " + this._getEventFilterUrl(event));

            return true;
          }

          if (!this._isAllowedUrl(event, options)) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: " + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["getEventDescription"])(event) + ".\nUrl: " + this._getEventFilterUrl(event));

            return true;
          }

          return false;
        };
        /** JSDoc */


        InboundFilters.prototype._isSentryError = function (event, options) {
          if (!options.ignoreInternal) {
            return false;
          }

          try {
            return event && event.exception && event.exception.values && event.exception.values[0] && event.exception.values[0].type === 'SentryError' || false;
          } catch (_oO) {
            return false;
          }
        };
        /** JSDoc */


        InboundFilters.prototype._isIgnoredError = function (event, options) {
          if (!options.ignoreErrors || !options.ignoreErrors.length) {
            return false;
          }

          return this._getPossibleEventMessages(event).some(function (message) {
            // Not sure why TypeScript complains here...
            return options.ignoreErrors.some(function (pattern) {
              return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["isMatchingPattern"])(message, pattern);
            });
          });
        };
        /** JSDoc */


        InboundFilters.prototype._isDeniedUrl = function (event, options) {
          // TODO: Use Glob instead?
          if (!options.denyUrls || !options.denyUrls.length) {
            return false;
          }

          var url = this._getEventFilterUrl(event);

          return !url ? false : options.denyUrls.some(function (pattern) {
            return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["isMatchingPattern"])(url, pattern);
          });
        };
        /** JSDoc */


        InboundFilters.prototype._isAllowedUrl = function (event, options) {
          // TODO: Use Glob instead?
          if (!options.allowUrls || !options.allowUrls.length) {
            return true;
          }

          var url = this._getEventFilterUrl(event);

          return !url ? true : options.allowUrls.some(function (pattern) {
            return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["isMatchingPattern"])(url, pattern);
          });
        };
        /** JSDoc */


        InboundFilters.prototype._mergeOptions = function (clientOptions) {
          if (clientOptions === void 0) {
            clientOptions = {};
          }

          return {
            allowUrls: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this._options.whitelistUrls || [], this._options.allowUrls || [], clientOptions.whitelistUrls || [], clientOptions.allowUrls || []),
            denyUrls: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this._options.blacklistUrls || [], this._options.denyUrls || [], clientOptions.blacklistUrls || [], clientOptions.denyUrls || []),
            ignoreErrors: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this._options.ignoreErrors || [], clientOptions.ignoreErrors || [], DEFAULT_IGNORE_ERRORS),
            ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true
          };
        };
        /** JSDoc */


        InboundFilters.prototype._getPossibleEventMessages = function (event) {
          if (event.message) {
            return [event.message];
          }

          if (event.exception) {
            try {
              var _a = event.exception.values && event.exception.values[0] || {},
                  _b = _a.type,
                  type = _b === void 0 ? '' : _b,
                  _c = _a.value,
                  value = _c === void 0 ? '' : _c;

              return ["" + value, type + ": " + value];
            } catch (oO) {
              _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].error("Cannot extract message for event " + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["getEventDescription"])(event));

              return [];
            }
          }

          return [];
        };
        /** JSDoc */


        InboundFilters.prototype._getLastValidUrl = function (frames) {
          if (frames === void 0) {
            frames = [];
          }

          var _a, _b;

          for (var i = frames.length - 1; i >= 0; i--) {
            var frame = frames[i];

            if (((_a = frame) === null || _a === void 0 ? void 0 : _a.filename) !== '<anonymous>' && ((_b = frame) === null || _b === void 0 ? void 0 : _b.filename) !== '[native code]') {
              return frame.filename || null;
            }
          }

          return null;
        };
        /** JSDoc */


        InboundFilters.prototype._getEventFilterUrl = function (event) {
          try {
            if (event.stacktrace) {
              var frames_1 = event.stacktrace.frames;
              return this._getLastValidUrl(frames_1);
            }

            if (event.exception) {
              var frames_2 = event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;
              return this._getLastValidUrl(frames_2);
            }

            return null;
          } catch (oO) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].error("Cannot extract url for event " + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["getEventDescription"])(event));

            return null;
          }
        };
        /**
         * @inheritDoc
         */


        InboundFilters.id = 'InboundFilters';
        return InboundFilters;
      }(); //# sourceMappingURL=inboundfilters.js.map

      /***/

    },

    /***/
    "lg1s":
    /*!*****************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/loader.js ***!
      \*****************************************************/

    /*! exports provided: defineCustomElements */

    /***/
    function lg1s(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "defineCustomElements", function () {
        return defineCustomElements;
      });
      /* harmony import */


      var _index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./index-7a8b7a1c.js */
      "wEJo");
      /* harmony import */


      var _app_globals_fd807b9a_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./app-globals-fd807b9a.js */
      "FBKn");
      /* harmony import */


      var _ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./ionic-global-63a97a32.js */
      "E/Mt");
      /*
       Stencil Client Patch Esm v2.5.0 | MIT Licensed | https://stenciljs.com
       */


      var patchEsm = function patchEsm() {
        // NOTE!! This fn cannot use async/await!
        // @ts-ignore
        if (!(_index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__["C"] && _index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__["C"].supports && _index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__["C"].supports('color', 'var(--c)'))) {
          // @ts-ignore
          return __webpack_require__.e(
          /*! import() | polyfills-css-shim */
          "polyfills-css-shim").then(__webpack_require__.t.bind(null,
          /*! ./css-shim-2ccf4dec.js */
          "9qUq", 7)).then(function () {
            if (_index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__["p"].$cssShim$ = _index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__["w"].__cssshim) {
              return _index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__["p"].$cssShim$.i();
            } else {
              // for better minification
              return 0;
            }
          });
        }

        return Object(_index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__["a"])();
      };

      var defineCustomElements = function defineCustomElements(win, options) {
        if (typeof window === 'undefined') return Promise.resolve();
        return patchEsm().then(function () {
          Object(_app_globals_fd807b9a_js__WEBPACK_IMPORTED_MODULE_1__["g"])();
          return Object(_index_7a8b7a1c_js__WEBPACK_IMPORTED_MODULE_0__["b"])(JSON.parse("[[\"ion-select_3\",[[2,\"ion-select-popover\",{\"header\":[1],\"subHeader\":[1,\"sub-header\"],\"message\":[1],\"options\":[16]},[[0,\"ionChange\",\"onSelect\"]]],[33,\"ion-select\",{\"disabled\":[4],\"cancelText\":[1,\"cancel-text\"],\"okText\":[1,\"ok-text\"],\"placeholder\":[1],\"name\":[1],\"selectedText\":[1,\"selected-text\"],\"multiple\":[4],\"interface\":[1],\"interfaceOptions\":[8,\"interface-options\"],\"compareWith\":[1,\"compare-with\"],\"value\":[1032],\"isExpanded\":[32],\"open\":[64]}],[1,\"ion-select-option\",{\"disabled\":[4],\"value\":[8]}]]],[\"ion-menu_3\",[[33,\"ion-menu-button\",{\"color\":[513],\"disabled\":[4],\"menu\":[1],\"autoHide\":[4,\"auto-hide\"],\"type\":[1],\"visible\":[32]},[[16,\"ionMenuChange\",\"visibilityChanged\"],[16,\"ionSplitPaneVisible\",\"visibilityChanged\"]]],[33,\"ion-menu\",{\"contentId\":[513,\"content-id\"],\"menuId\":[513,\"menu-id\"],\"type\":[1025],\"disabled\":[1028],\"side\":[513],\"swipeGesture\":[4,\"swipe-gesture\"],\"maxEdgeStart\":[2,\"max-edge-start\"],\"isPaneVisible\":[32],\"isEndSide\":[32],\"isOpen\":[64],\"isActive\":[64],\"open\":[64],\"close\":[64],\"toggle\":[64],\"setOpen\":[64]},[[16,\"ionSplitPaneVisible\",\"onSplitPaneChanged\"],[2,\"click\",\"onBackdropClick\"],[0,\"keydown\",\"onKeydown\"]]],[1,\"ion-menu-toggle\",{\"menu\":[1],\"autoHide\":[4,\"auto-hide\"],\"visible\":[32]},[[16,\"ionMenuChange\",\"visibilityChanged\"],[16,\"ionSplitPaneVisible\",\"visibilityChanged\"]]]]],[\"ion-action-sheet\",[[34,\"ion-action-sheet\",{\"overlayIndex\":[2,\"overlay-index\"],\"keyboardClose\":[4,\"keyboard-close\"],\"enterAnimation\":[16],\"leaveAnimation\":[16],\"buttons\":[16],\"cssClass\":[1,\"css-class\"],\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"header\":[1],\"subHeader\":[1,\"sub-header\"],\"translucent\":[4],\"animated\":[4],\"htmlAttributes\":[16],\"present\":[64],\"dismiss\":[64],\"onDidDismiss\":[64],\"onWillDismiss\":[64]}]]],[\"ion-fab_3\",[[33,\"ion-fab-button\",{\"color\":[513],\"activated\":[4],\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"routerDirection\":[1,\"router-direction\"],\"routerAnimation\":[16],\"target\":[1],\"show\":[4],\"translucent\":[4],\"type\":[1],\"size\":[1],\"closeIcon\":[1,\"close-icon\"]}],[1,\"ion-fab\",{\"horizontal\":[1],\"vertical\":[1],\"edge\":[4],\"activated\":[1028],\"close\":[64]}],[1,\"ion-fab-list\",{\"activated\":[4],\"side\":[1]}]]],[\"ion-refresher_2\",[[0,\"ion-refresher-content\",{\"pullingIcon\":[1025,\"pulling-icon\"],\"pullingText\":[1,\"pulling-text\"],\"refreshingSpinner\":[1025,\"refreshing-spinner\"],\"refreshingText\":[1,\"refreshing-text\"]}],[32,\"ion-refresher\",{\"pullMin\":[2,\"pull-min\"],\"pullMax\":[2,\"pull-max\"],\"closeDuration\":[1,\"close-duration\"],\"snapbackDuration\":[1,\"snapback-duration\"],\"pullFactor\":[2,\"pull-factor\"],\"disabled\":[4],\"nativeRefresher\":[32],\"state\":[32],\"complete\":[64],\"cancel\":[64],\"getProgress\":[64]}]]],[\"ion-alert\",[[34,\"ion-alert\",{\"overlayIndex\":[2,\"overlay-index\"],\"keyboardClose\":[4,\"keyboard-close\"],\"enterAnimation\":[16],\"leaveAnimation\":[16],\"cssClass\":[1,\"css-class\"],\"header\":[1],\"subHeader\":[1,\"sub-header\"],\"message\":[1],\"buttons\":[16],\"inputs\":[1040],\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"translucent\":[4],\"animated\":[4],\"htmlAttributes\":[16],\"present\":[64],\"dismiss\":[64],\"onDidDismiss\":[64],\"onWillDismiss\":[64]},[[4,\"keydown\",\"onKeydown\"]]]]],[\"ion-back-button\",[[33,\"ion-back-button\",{\"color\":[513],\"defaultHref\":[1025,\"default-href\"],\"disabled\":[516],\"icon\":[1],\"text\":[1],\"type\":[1],\"routerAnimation\":[16]}]]],[\"ion-loading\",[[34,\"ion-loading\",{\"overlayIndex\":[2,\"overlay-index\"],\"keyboardClose\":[4,\"keyboard-close\"],\"enterAnimation\":[16],\"leaveAnimation\":[16],\"message\":[1],\"cssClass\":[1,\"css-class\"],\"duration\":[2],\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"showBackdrop\":[4,\"show-backdrop\"],\"spinner\":[1025],\"translucent\":[4],\"animated\":[4],\"htmlAttributes\":[16],\"present\":[64],\"dismiss\":[64],\"onDidDismiss\":[64],\"onWillDismiss\":[64]}]]],[\"ion-toast\",[[33,\"ion-toast\",{\"overlayIndex\":[2,\"overlay-index\"],\"color\":[513],\"enterAnimation\":[16],\"leaveAnimation\":[16],\"cssClass\":[1,\"css-class\"],\"duration\":[2],\"header\":[1],\"message\":[1],\"keyboardClose\":[4,\"keyboard-close\"],\"position\":[1],\"buttons\":[16],\"translucent\":[4],\"animated\":[4],\"htmlAttributes\":[16],\"present\":[64],\"dismiss\":[64],\"onDidDismiss\":[64],\"onWillDismiss\":[64]}]]],[\"ion-card_5\",[[33,\"ion-card\",{\"color\":[513],\"button\":[4],\"type\":[1],\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"routerDirection\":[1,\"router-direction\"],\"routerAnimation\":[16],\"target\":[1]}],[32,\"ion-card-content\"],[33,\"ion-card-header\",{\"color\":[513],\"translucent\":[4]}],[33,\"ion-card-subtitle\",{\"color\":[513]}],[33,\"ion-card-title\",{\"color\":[513]}]]],[\"ion-item-option_3\",[[33,\"ion-item-option\",{\"color\":[513],\"disabled\":[4],\"download\":[1],\"expandable\":[4],\"href\":[1],\"rel\":[1],\"target\":[1],\"type\":[1]}],[32,\"ion-item-options\",{\"side\":[1],\"fireSwipeEvent\":[64]}],[0,\"ion-item-sliding\",{\"disabled\":[4],\"state\":[32],\"getOpenAmount\":[64],\"getSlidingRatio\":[64],\"open\":[64],\"close\":[64],\"closeOpened\":[64]}]]],[\"ion-infinite-scroll_2\",[[32,\"ion-infinite-scroll-content\",{\"loadingSpinner\":[1025,\"loading-spinner\"],\"loadingText\":[1,\"loading-text\"]}],[0,\"ion-infinite-scroll\",{\"threshold\":[1],\"disabled\":[4],\"position\":[1],\"isLoading\":[32],\"complete\":[64]}]]],[\"ion-reorder_2\",[[33,\"ion-reorder\",null,[[2,\"click\",\"onClick\"]]],[0,\"ion-reorder-group\",{\"disabled\":[4],\"state\":[32],\"complete\":[64]}]]],[\"ion-segment_2\",[[33,\"ion-segment-button\",{\"disabled\":[4],\"layout\":[1],\"type\":[1],\"value\":[1],\"checked\":[32]}],[33,\"ion-segment\",{\"color\":[513],\"disabled\":[4],\"scrollable\":[4],\"swipeGesture\":[4,\"swipe-gesture\"],\"value\":[1025],\"activated\":[32]}]]],[\"ion-tab-bar_2\",[[33,\"ion-tab-button\",{\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"layout\":[1025],\"selected\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"ionTabBarChanged\",\"onTabBarChanged\"]]],[33,\"ion-tab-bar\",{\"color\":[513],\"selectedTab\":[1,\"selected-tab\"],\"translucent\":[4],\"keyboardVisible\":[32]}]]],[\"ion-chip\",[[33,\"ion-chip\",{\"color\":[513],\"outline\":[4],\"disabled\":[4]}]]],[\"ion-modal\",[[34,\"ion-modal\",{\"overlayIndex\":[2,\"overlay-index\"],\"delegate\":[16],\"keyboardClose\":[4,\"keyboard-close\"],\"enterAnimation\":[16],\"leaveAnimation\":[16],\"component\":[1],\"componentProps\":[16],\"cssClass\":[1,\"css-class\"],\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"showBackdrop\":[4,\"show-backdrop\"],\"animated\":[4],\"swipeToClose\":[4,\"swipe-to-close\"],\"presentingElement\":[16],\"htmlAttributes\":[16],\"present\":[64],\"dismiss\":[64],\"onDidDismiss\":[64],\"onWillDismiss\":[64]}]]],[\"ion-popover\",[[34,\"ion-popover\",{\"delegate\":[16],\"overlayIndex\":[2,\"overlay-index\"],\"enterAnimation\":[16],\"leaveAnimation\":[16],\"component\":[1],\"componentProps\":[16],\"keyboardClose\":[4,\"keyboard-close\"],\"cssClass\":[1,\"css-class\"],\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"event\":[8],\"showBackdrop\":[4,\"show-backdrop\"],\"translucent\":[4],\"animated\":[4],\"htmlAttributes\":[16],\"present\":[64],\"dismiss\":[64],\"onDidDismiss\":[64],\"onWillDismiss\":[64]}]]],[\"ion-searchbar\",[[34,\"ion-searchbar\",{\"color\":[513],\"animated\":[4],\"autocomplete\":[1],\"autocorrect\":[1],\"cancelButtonIcon\":[1,\"cancel-button-icon\"],\"cancelButtonText\":[1,\"cancel-button-text\"],\"clearIcon\":[1,\"clear-icon\"],\"debounce\":[2],\"disabled\":[4],\"inputmode\":[1],\"enterkeyhint\":[1],\"placeholder\":[1],\"searchIcon\":[1,\"search-icon\"],\"showCancelButton\":[1,\"show-cancel-button\"],\"showClearButton\":[1,\"show-clear-button\"],\"spellcheck\":[4],\"type\":[1],\"value\":[1025],\"focused\":[32],\"noAnimate\":[32],\"setFocus\":[64],\"getInputElement\":[64]}]]],[\"ion-app_8\",[[0,\"ion-app\"],[34,\"ion-buttons\",{\"collapse\":[4]}],[1,\"ion-content\",{\"color\":[513],\"fullscreen\":[4],\"forceOverscroll\":[1028,\"force-overscroll\"],\"scrollX\":[4,\"scroll-x\"],\"scrollY\":[4,\"scroll-y\"],\"scrollEvents\":[4,\"scroll-events\"],\"getScrollElement\":[64],\"scrollToTop\":[64],\"scrollToBottom\":[64],\"scrollByPoint\":[64],\"scrollToPoint\":[64]},[[8,\"appload\",\"onAppLoad\"],[2,\"click\",\"onClick\"]]],[36,\"ion-footer\",{\"translucent\":[4]}],[36,\"ion-header\",{\"collapse\":[1],\"translucent\":[4]}],[1,\"ion-router-outlet\",{\"mode\":[1025],\"delegate\":[16],\"animated\":[4],\"animation\":[16],\"swipeHandler\":[16],\"commit\":[64],\"setRouteId\":[64],\"getRouteId\":[64]}],[33,\"ion-title\",{\"color\":[513],\"size\":[1]}],[33,\"ion-toolbar\",{\"color\":[513]},[[0,\"ionStyle\",\"childrenStyle\"]]]]],[\"ion-route_4\",[[0,\"ion-route\",{\"url\":[1],\"component\":[1],\"componentProps\":[16],\"beforeLeave\":[16],\"beforeEnter\":[16]}],[0,\"ion-route-redirect\",{\"from\":[1],\"to\":[1]}],[0,\"ion-router\",{\"root\":[1],\"useHash\":[4,\"use-hash\"],\"canTransition\":[64],\"push\":[64],\"back\":[64],\"printDebug\":[64],\"navChanged\":[64]},[[8,\"popstate\",\"onPopState\"],[4,\"ionBackButton\",\"onBackButton\"]]],[1,\"ion-router-link\",{\"color\":[513],\"href\":[1],\"rel\":[1],\"routerDirection\":[1,\"router-direction\"],\"routerAnimation\":[16],\"target\":[1]}]]],[\"ion-avatar_3\",[[33,\"ion-avatar\"],[33,\"ion-badge\",{\"color\":[513]}],[1,\"ion-thumbnail\"]]],[\"ion-col_3\",[[1,\"ion-col\",{\"offset\":[1],\"offsetXs\":[1,\"offset-xs\"],\"offsetSm\":[1,\"offset-sm\"],\"offsetMd\":[1,\"offset-md\"],\"offsetLg\":[1,\"offset-lg\"],\"offsetXl\":[1,\"offset-xl\"],\"pull\":[1],\"pullXs\":[1,\"pull-xs\"],\"pullSm\":[1,\"pull-sm\"],\"pullMd\":[1,\"pull-md\"],\"pullLg\":[1,\"pull-lg\"],\"pullXl\":[1,\"pull-xl\"],\"push\":[1],\"pushXs\":[1,\"push-xs\"],\"pushSm\":[1,\"push-sm\"],\"pushMd\":[1,\"push-md\"],\"pushLg\":[1,\"push-lg\"],\"pushXl\":[1,\"push-xl\"],\"size\":[1],\"sizeXs\":[1,\"size-xs\"],\"sizeSm\":[1,\"size-sm\"],\"sizeMd\":[1,\"size-md\"],\"sizeLg\":[1,\"size-lg\"],\"sizeXl\":[1,\"size-xl\"]},[[9,\"resize\",\"onResize\"]]],[1,\"ion-grid\",{\"fixed\":[4]}],[1,\"ion-row\"]]],[\"ion-nav_2\",[[1,\"ion-nav\",{\"delegate\":[16],\"swipeGesture\":[1028,\"swipe-gesture\"],\"animated\":[4],\"animation\":[16],\"rootParams\":[16],\"root\":[1],\"push\":[64],\"insert\":[64],\"insertPages\":[64],\"pop\":[64],\"popTo\":[64],\"popToRoot\":[64],\"removeIndex\":[64],\"setRoot\":[64],\"setPages\":[64],\"setRouteId\":[64],\"getRouteId\":[64],\"getActive\":[64],\"getByIndex\":[64],\"canGoBack\":[64],\"getPrevious\":[64]}],[0,\"ion-nav-link\",{\"component\":[1],\"componentProps\":[16],\"routerDirection\":[1,\"router-direction\"],\"routerAnimation\":[16]}]]],[\"ion-slide_2\",[[0,\"ion-slide\"],[36,\"ion-slides\",{\"options\":[8],\"pager\":[4],\"scrollbar\":[4],\"update\":[64],\"updateAutoHeight\":[64],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"getActiveIndex\":[64],\"getPreviousIndex\":[64],\"length\":[64],\"isEnd\":[64],\"isBeginning\":[64],\"startAutoplay\":[64],\"stopAutoplay\":[64],\"lockSwipeToNext\":[64],\"lockSwipeToPrev\":[64],\"lockSwipes\":[64],\"getSwiper\":[64]}]]],[\"ion-tab_2\",[[1,\"ion-tab\",{\"active\":[1028],\"delegate\":[16],\"tab\":[1],\"component\":[1],\"setActive\":[64]}],[1,\"ion-tabs\",{\"useRouter\":[1028,\"use-router\"],\"selectedTab\":[32],\"select\":[64],\"getTab\":[64],\"getSelected\":[64],\"setRouteId\":[64],\"getRouteId\":[64]}]]],[\"ion-checkbox\",[[33,\"ion-checkbox\",{\"color\":[513],\"name\":[1],\"checked\":[1028],\"indeterminate\":[1028],\"disabled\":[4],\"value\":[1]}]]],[\"ion-img\",[[1,\"ion-img\",{\"alt\":[1],\"src\":[1],\"loadSrc\":[32],\"loadError\":[32]}]]],[\"ion-input\",[[34,\"ion-input\",{\"fireFocusEvents\":[4,\"fire-focus-events\"],\"color\":[513],\"accept\":[1],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autofocus\":[4],\"clearInput\":[4,\"clear-input\"],\"clearOnEdit\":[4,\"clear-on-edit\"],\"debounce\":[2],\"disabled\":[4],\"enterkeyhint\":[1],\"inputmode\":[1],\"max\":[1],\"maxlength\":[2],\"min\":[1],\"minlength\":[2],\"multiple\":[4],\"name\":[1],\"pattern\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"step\":[1],\"size\":[2],\"type\":[1],\"value\":[1032],\"hasFocus\":[32],\"setFocus\":[64],\"setBlur\":[64],\"getInputElement\":[64]}]]],[\"ion-progress-bar\",[[33,\"ion-progress-bar\",{\"type\":[1],\"reversed\":[4],\"value\":[2],\"buffer\":[2],\"color\":[513]}]]],[\"ion-range\",[[33,\"ion-range\",{\"color\":[513],\"debounce\":[2],\"name\":[1],\"dualKnobs\":[4,\"dual-knobs\"],\"min\":[2],\"max\":[2],\"pin\":[4],\"snaps\":[4],\"step\":[2],\"ticks\":[4],\"disabled\":[4],\"value\":[1026],\"ratioA\":[32],\"ratioB\":[32],\"pressedKnob\":[32]}]]],[\"ion-split-pane\",[[33,\"ion-split-pane\",{\"contentId\":[513,\"content-id\"],\"disabled\":[4],\"when\":[8],\"visible\":[32]}]]],[\"ion-text\",[[1,\"ion-text\",{\"color\":[513]}]]],[\"ion-textarea\",[[34,\"ion-textarea\",{\"fireFocusEvents\":[4,\"fire-focus-events\"],\"color\":[513],\"autocapitalize\":[1],\"autofocus\":[4],\"clearOnEdit\":[1028,\"clear-on-edit\"],\"debounce\":[2],\"disabled\":[4],\"inputmode\":[1],\"enterkeyhint\":[1],\"maxlength\":[2],\"minlength\":[2],\"name\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"cols\":[2],\"rows\":[2],\"wrap\":[1],\"autoGrow\":[4,\"auto-grow\"],\"value\":[1025],\"hasFocus\":[32],\"setFocus\":[64],\"setBlur\":[64],\"getInputElement\":[64]}]]],[\"ion-toggle\",[[33,\"ion-toggle\",{\"color\":[513],\"name\":[1],\"checked\":[1028],\"disabled\":[4],\"value\":[1],\"activated\":[32]}]]],[\"ion-virtual-scroll\",[[0,\"ion-virtual-scroll\",{\"approxItemHeight\":[2,\"approx-item-height\"],\"approxHeaderHeight\":[2,\"approx-header-height\"],\"approxFooterHeight\":[2,\"approx-footer-height\"],\"headerFn\":[16],\"footerFn\":[16],\"items\":[16],\"itemHeight\":[16],\"headerHeight\":[16],\"footerHeight\":[16],\"renderItem\":[16],\"renderHeader\":[16],\"renderFooter\":[16],\"nodeRender\":[16],\"domRender\":[16],\"totalHeight\":[32],\"positionForItem\":[64],\"checkRange\":[64],\"checkEnd\":[64]},[[9,\"resize\",\"onResize\"]]]]],[\"ion-datetime_3\",[[34,\"ion-picker\",{\"overlayIndex\":[2,\"overlay-index\"],\"keyboardClose\":[4,\"keyboard-close\"],\"enterAnimation\":[16],\"leaveAnimation\":[16],\"buttons\":[16],\"columns\":[16],\"cssClass\":[1,\"css-class\"],\"duration\":[2],\"showBackdrop\":[4,\"show-backdrop\"],\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"animated\":[4],\"htmlAttributes\":[16],\"presented\":[32],\"present\":[64],\"dismiss\":[64],\"onDidDismiss\":[64],\"onWillDismiss\":[64],\"getColumn\":[64]}],[33,\"ion-datetime\",{\"name\":[1],\"disabled\":[4],\"readonly\":[4],\"min\":[1025],\"max\":[1025],\"displayFormat\":[1,\"display-format\"],\"displayTimezone\":[1,\"display-timezone\"],\"pickerFormat\":[1,\"picker-format\"],\"cancelText\":[1,\"cancel-text\"],\"doneText\":[1,\"done-text\"],\"yearValues\":[8,\"year-values\"],\"monthValues\":[8,\"month-values\"],\"dayValues\":[8,\"day-values\"],\"hourValues\":[8,\"hour-values\"],\"minuteValues\":[8,\"minute-values\"],\"monthNames\":[1,\"month-names\"],\"monthShortNames\":[1,\"month-short-names\"],\"dayNames\":[1,\"day-names\"],\"dayShortNames\":[1,\"day-short-names\"],\"pickerOptions\":[16],\"placeholder\":[1],\"value\":[1025],\"isExpanded\":[32],\"open\":[64]}],[32,\"ion-picker-column\",{\"col\":[16]}]]],[\"ion-radio_2\",[[33,\"ion-radio\",{\"color\":[513],\"name\":[1],\"disabled\":[4],\"value\":[8],\"checked\":[32],\"buttonTabindex\":[32],\"setFocus\":[64],\"setButtonTabindex\":[64]}],[0,\"ion-radio-group\",{\"allowEmptySelection\":[4,\"allow-empty-selection\"],\"name\":[1],\"value\":[1032]},[[4,\"keydown\",\"onKeydown\"]]]]],[\"ion-spinner\",[[1,\"ion-spinner\",{\"color\":[513],\"duration\":[2],\"name\":[1],\"paused\":[4]}]]],[\"ion-backdrop\",[[33,\"ion-backdrop\",{\"visible\":[4],\"tappable\":[4],\"stopPropagation\":[4,\"stop-propagation\"]},[[2,\"click\",\"onMouseDown\"]]]]],[\"ion-ripple-effect\",[[1,\"ion-ripple-effect\",{\"type\":[1],\"addRipple\":[64]}]]],[\"ion-button_2\",[[33,\"ion-button\",{\"color\":[513],\"buttonType\":[1025,\"button-type\"],\"disabled\":[516],\"expand\":[513],\"fill\":[1537],\"routerDirection\":[1,\"router-direction\"],\"routerAnimation\":[16],\"download\":[1],\"href\":[1],\"rel\":[1],\"shape\":[513],\"size\":[513],\"strong\":[4],\"target\":[1],\"type\":[1]}],[1,\"ion-icon\",{\"mode\":[1025],\"color\":[1],\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"ios\":[1],\"md\":[1],\"flipRtl\":[4,\"flip-rtl\"],\"name\":[513],\"src\":[1],\"icon\":[8],\"size\":[1],\"lazy\":[4],\"sanitize\":[4],\"svgContent\":[32],\"isVisible\":[32]}]]],[\"ion-item_8\",[[33,\"ion-item-divider\",{\"color\":[513],\"sticky\":[4]}],[32,\"ion-item-group\"],[33,\"ion-note\",{\"color\":[513]}],[1,\"ion-skeleton-text\",{\"animated\":[4]}],[49,\"ion-item\",{\"color\":[513],\"button\":[4],\"detail\":[4],\"detailIcon\":[1,\"detail-icon\"],\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"lines\":[1],\"routerAnimation\":[16],\"routerDirection\":[1,\"router-direction\"],\"target\":[1],\"type\":[1],\"multipleInputs\":[32],\"focusable\":[32]},[[0,\"ionColor\",\"labelColorChanged\"],[0,\"ionStyle\",\"itemStyle\"]]],[34,\"ion-label\",{\"color\":[513],\"position\":[1],\"noAnimate\":[32]}],[32,\"ion-list\",{\"lines\":[1],\"inset\":[4],\"closeSlidingItems\":[64]}],[33,\"ion-list-header\",{\"color\":[513],\"lines\":[1]}]]]]"), options);
        });
      };
      /***/

    },

    /***/
    "lk7i":
    /*!***********************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/index.js ***!
      \***********************************************************/

    /*! exports provided: BrowserTracing, instrumentOutgoingRequests, defaultRequestInstrumentationOptions */

    /***/
    function lk7i(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _browsertracing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./browsertracing */
      "zHkj");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "BrowserTracing", function () {
        return _browsertracing__WEBPACK_IMPORTED_MODULE_0__["BrowserTracing"];
      });
      /* harmony import */


      var _request__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./request */
      "crS0");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "instrumentOutgoingRequests", function () {
        return _request__WEBPACK_IMPORTED_MODULE_1__["instrumentOutgoingRequests"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "defaultRequestInstrumentationOptions", function () {
        return _request__WEBPACK_IMPORTED_MODULE_1__["defaultRequestInstrumentationOptions"];
      }); //# sourceMappingURL=index.js.map

      /***/

    },

    /***/
    "lpKW":
    /*!**********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/windowCount.js ***!
      \**********************************************************************/

    /*! exports provided: windowCount */

    /***/
    function lpKW(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "windowCount", function () {
        return windowCount;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Subject */
      "XNiG");

      function windowCount(windowSize) {
        var startWindowEvery = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
        return function windowCountOperatorFunction(source) {
          return source.lift(new WindowCountOperator(windowSize, startWindowEvery));
        };
      }

      var WindowCountOperator = /*#__PURE__*/function () {
        function WindowCountOperator(windowSize, startWindowEvery) {
          _classCallCheck(this, WindowCountOperator);

          this.windowSize = windowSize;
          this.startWindowEvery = startWindowEvery;
        }

        _createClass2(WindowCountOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));
          }
        }]);

        return WindowCountOperator;
      }();

      var WindowCountSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_38) {
        _inherits(WindowCountSubscriber, _Subscriber__WEBPACK_38);

        var _super258 = _createSuper(WindowCountSubscriber);

        function WindowCountSubscriber(destination, windowSize, startWindowEvery) {
          var _this522;

          _classCallCheck(this, WindowCountSubscriber);

          _this522 = _super258.call(this, destination);
          _this522.destination = destination;
          _this522.windowSize = windowSize;
          _this522.startWindowEvery = startWindowEvery;
          _this522.windows = [new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]()];
          _this522.count = 0;
          destination.next(_this522.windows[0]);
          return _this522;
        }

        _createClass2(WindowCountSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var startWindowEvery = this.startWindowEvery > 0 ? this.startWindowEvery : this.windowSize;
            var destination = this.destination;
            var windowSize = this.windowSize;
            var windows = this.windows;
            var len = windows.length;

            for (var i = 0; i < len && !this.closed; i++) {
              windows[i].next(value);
            }

            var c = this.count - windowSize + 1;

            if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {
              windows.shift().complete();
            }

            if (++this.count % startWindowEvery === 0 && !this.closed) {
              var _window4 = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();

              windows.push(_window4);
              destination.next(_window4);
            }
          }
        }, {
          key: "_error",
          value: function _error(err) {
            var windows = this.windows;

            if (windows) {
              while (windows.length > 0 && !this.closed) {
                windows.shift().error(err);
              }
            }

            this.destination.error(err);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var windows = this.windows;

            if (windows) {
              while (windows.length > 0 && !this.closed) {
                windows.shift().complete();
              }
            }

            this.destination.complete();
          }
        }, {
          key: "_unsubscribe",
          value: function _unsubscribe() {
            this.count = 0;
            this.windows = null;
          }
        }]);

        return WindowCountSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=windowCount.js.map

      /***/

    },

    /***/
    "m/P+":
    /*!*****************************************************************************!*\
      !*** ./node_modules/@ionic-native/in-app-browser/__ivy_ngcc__/ngx/index.js ***!
      \*****************************************************************************/

    /*! exports provided: InAppBrowserObject, InAppBrowser */

    /***/
    function mP(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "InAppBrowserObject", function () {
        return InAppBrowserObject;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "InAppBrowser", function () {
        return InAppBrowser;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _ionic_native_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @ionic-native/core */
      "C6fG");
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! rxjs */
      "qCKp");

      var InAppBrowserObject =
      /** @class */
      function () {
        /**
         * Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser.
         * @param {string} url     The URL to load.
         * @param {string} [target="self"]  The target in which to load the URL, an optional parameter that defaults to _self.
         *                 _self: Opens in the WebView if the URL is in the white list, otherwise it opens in the InAppBrowser.
         *                 _blank: Opens in the InAppBrowser.
         *                 _system: Opens in the system's web browser.
         * @param {string | InAppBrowserOptions} [options] Options for the InAppBrowser. Optional, defaulting to: location=yes.
         *                 The options string must not contain any blank space, and each feature's
         *                 name/value pairs must be separated by a comma. Feature names are case insensitive.
         */
        function InAppBrowserObject(url, target, options) {
          try {
            if (options && typeof options !== 'string') {
              options = Object.keys(options).map(function (key) {
                return key + "=" + options[key];
              }).join(',');
            }

            this._objectInstance = cordova.InAppBrowser.open(url, target, options);
          } catch (e) {
            if (typeof window !== 'undefined') {
              window.open(url, target);
            }

            console.warn('Native: InAppBrowser is not installed or you are running on a browser. Falling back to window.open.');
          }
        }

        InAppBrowserObject.prototype._loadAfterBeforeload = function (strUrl) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordovaInstance"])(this, "_loadAfterBeforeload", {
            "sync": true
          }, arguments);
        };

        InAppBrowserObject.prototype.show = function () {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordovaInstance"])(this, "show", {
            "sync": true
          }, arguments);
        };

        InAppBrowserObject.prototype.close = function () {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordovaInstance"])(this, "close", {
            "sync": true
          }, arguments);
        };

        InAppBrowserObject.prototype.hide = function () {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordovaInstance"])(this, "hide", {
            "sync": true
          }, arguments);
        };

        InAppBrowserObject.prototype.executeScript = function (script) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordovaInstance"])(this, "executeScript", {}, arguments);
        };

        InAppBrowserObject.prototype.insertCSS = function (css) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordovaInstance"])(this, "insertCSS", {}, arguments);
        };

        InAppBrowserObject.prototype.on = function (event) {
          var _this = this;

          return function () {
            if (Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["instanceAvailability"])(_this) === true) {
              return new rxjs__WEBPACK_IMPORTED_MODULE_3__["Observable"](function (observer) {
                _this._objectInstance.addEventListener(event, observer.next.bind(observer));

                return function () {
                  return _this._objectInstance.removeEventListener(event, observer.next.bind(observer));
                };
              });
            }
          }();
        };

        InAppBrowserObject.prototype.on = function (event) {
          var _this = this;

          return function () {
            if (Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["instanceAvailability"])(_this) === true) {
              return new rxjs__WEBPACK_IMPORTED_MODULE_3__["Observable"](function (observer) {
                _this._objectInstance.addEventListener(event, observer.next.bind(observer));

                return function () {
                  return _this._objectInstance.removeEventListener(event, observer.next.bind(observer));
                };
              });
            }
          }();
        };

        return InAppBrowserObject;
      }();

      var InAppBrowser =
      /** @class */
      function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(InAppBrowser, _super);

        function InAppBrowser() {
          return _super !== null && _super.apply(this, arguments) || this;
        }
        /**
         * Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser.
         * @param  url {string}     The URL to load.
         * @param  target {string}  The target in which to load the URL, an optional parameter that defaults to _self.
         * @param  options {string} Options for the InAppBrowser. Optional, defaulting to: location=yes.
         *                 The options string must not contain any blank space, and each feature's
         *                 name/value pairs must be separated by a comma. Feature names are case insensitive.
         * @returns {InAppBrowserObject}
         */


        InAppBrowser.prototype.create = function (url, target, options) {
          return new InAppBrowserObject(url, target, options);
        };

        InAppBrowser.pluginName = "InAppBrowser";
        InAppBrowser.plugin = "cordova-plugin-inappbrowser";
        InAppBrowser.pluginRef = "cordova.InAppBrowser";
        InAppBrowser.repo = "https://github.com/apache/cordova-plugin-inappbrowser";
        InAppBrowser.platforms = ["AmazonFire OS", "Android", "Browser", "iOS", "macOS", "Windows"];

        InAppBrowser.ɵfac = function InAppBrowser_Factory(t) {
          return ɵInAppBrowser_BaseFactory(t || InAppBrowser);
        };

        InAppBrowser.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
          token: InAppBrowser,
          factory: function factory(t) {
            return InAppBrowser.ɵfac(t);
          }
        });

        var ɵInAppBrowser_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetInheritedFactory"](InAppBrowser);
        /*@__PURE__*/


        (function () {
          _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](InAppBrowser, [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
          }], null, null);
        })();

        return InAppBrowser;
      }(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["IonicNativePlugin"]); //# sourceMappingURL=data:application/json;charset=utf-8;base64, 

      /***/

    },

    /***/
    "m2j4":
    /*!******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/isEmpty.js ***!
      \******************************************************************/

    /*! exports provided: isEmpty */

    /***/
    function m2j4(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isEmpty", function () {
        return isEmpty;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function isEmpty() {
        return function (source) {
          return source.lift(new IsEmptyOperator());
        };
      }

      var IsEmptyOperator = /*#__PURE__*/function () {
        function IsEmptyOperator() {
          _classCallCheck(this, IsEmptyOperator);
        }

        _createClass2(IsEmptyOperator, [{
          key: "call",
          value: function call(observer, source) {
            return source.subscribe(new IsEmptySubscriber(observer));
          }
        }]);

        return IsEmptyOperator;
      }();

      var IsEmptySubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_39) {
        _inherits(IsEmptySubscriber, _Subscriber__WEBPACK_39);

        var _super259 = _createSuper(IsEmptySubscriber);

        function IsEmptySubscriber(destination) {
          _classCallCheck(this, IsEmptySubscriber);

          return _super259.call(this, destination);
        }

        _createClass2(IsEmptySubscriber, [{
          key: "notifyComplete",
          value: function notifyComplete(isEmpty) {
            var destination = this.destination;
            destination.next(isEmpty);
            destination.complete();
          }
        }, {
          key: "_next",
          value: function _next(value) {
            this.notifyComplete(false);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.notifyComplete(true);
          }
        }]);

        return IsEmptySubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=isEmpty.js.map

      /***/

    },

    /***/
    "mCNh":
    /*!**********************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/pipe.js ***!
      \**********************************************************/

    /*! exports provided: pipe, pipeFromArray */

    /***/
    function mCNh(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "pipe", function () {
        return pipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "pipeFromArray", function () {
        return pipeFromArray;
      });
      /* harmony import */


      var _identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./identity */
      "SpAZ");

      function pipe() {
        for (var _len48 = arguments.length, fns = new Array(_len48), _key49 = 0; _key49 < _len48; _key49++) {
          fns[_key49] = arguments[_key49];
        }

        return pipeFromArray(fns);
      }

      function pipeFromArray(fns) {
        if (fns.length === 0) {
          return _identity__WEBPACK_IMPORTED_MODULE_0__["identity"];
        }

        if (fns.length === 1) {
          return fns[0];
        }

        return function piped(input) {
          return fns.reduce(function (prev, fn) {
            return fn(prev);
          }, input);
        };
      } //# sourceMappingURL=pipe.js.map

      /***/

    },

    /***/
    "meiF":
    /*!*****************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/animation-096c6391.js ***!
      \*****************************************************************/

    /*! exports provided: c */

    /***/
    function meiF(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "c", function () {
        return createAnimation;
      });
      /* harmony import */


      var _helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./helpers-dd7e4b7b.js */
      "1vRN");

      var animationPrefix;
      /**
       * Web Animations requires hyphenated CSS properties
       * to be written in camelCase when animating
       */

      var processKeyframes = function processKeyframes(keyframes) {
        keyframes.forEach(function (keyframe) {
          for (var key in keyframe) {
            if (keyframe.hasOwnProperty(key)) {
              var value = keyframe[key];

              if (key === 'easing') {
                var newKey = 'animation-timing-function';
                keyframe[newKey] = value;
                delete keyframe[key];
              } else {
                var _newKey = convertCamelCaseToHypen(key);

                if (_newKey !== key) {
                  keyframe[_newKey] = value;
                  delete keyframe[key];
                }
              }
            }
          }
        });
        return keyframes;
      };

      var convertCamelCaseToHypen = function convertCamelCaseToHypen(str) {
        return str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
      };

      var getAnimationPrefix = function getAnimationPrefix(el) {
        if (animationPrefix === undefined) {
          var supportsUnprefixed = el.style.animationName !== undefined;
          var supportsWebkitPrefix = el.style.webkitAnimationName !== undefined;
          animationPrefix = !supportsUnprefixed && supportsWebkitPrefix ? '-webkit-' : '';
        }

        return animationPrefix;
      };

      var setStyleProperty = function setStyleProperty(element, propertyName, value) {
        var prefix = propertyName.startsWith('animation') ? getAnimationPrefix(element) : '';
        element.style.setProperty(prefix + propertyName, value);
      };

      var removeStyleProperty = function removeStyleProperty(element, propertyName) {
        var prefix = propertyName.startsWith('animation') ? getAnimationPrefix(element) : '';
        element.style.removeProperty(prefix + propertyName);
      };

      var animationEnd = function animationEnd(el, callback) {
        var unRegTrans;
        var opts = {
          passive: true
        };

        var unregister = function unregister() {
          if (unRegTrans) {
            unRegTrans();
          }
        };

        var onTransitionEnd = function onTransitionEnd(ev) {
          if (el === ev.target) {
            unregister();
            callback(ev);
          }
        };

        if (el) {
          el.addEventListener('webkitAnimationEnd', onTransitionEnd, opts);
          el.addEventListener('animationend', onTransitionEnd, opts);

          unRegTrans = function unRegTrans() {
            el.removeEventListener('webkitAnimationEnd', onTransitionEnd, opts);
            el.removeEventListener('animationend', onTransitionEnd, opts);
          };
        }

        return unregister;
      };

      var generateKeyframeRules = function generateKeyframeRules() {
        var keyframes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
        return keyframes.map(function (keyframe) {
          var offset = keyframe.offset;
          var frameString = [];

          for (var property in keyframe) {
            if (keyframe.hasOwnProperty(property) && property !== 'offset') {
              frameString.push("".concat(property, ": ").concat(keyframe[property], ";"));
            }
          }

          return "".concat(offset * 100, "% { ").concat(frameString.join(' '), " }");
        }).join(' ');
      };

      var keyframeIds = [];

      var generateKeyframeName = function generateKeyframeName(keyframeRules) {
        var index = keyframeIds.indexOf(keyframeRules);

        if (index < 0) {
          index = keyframeIds.push(keyframeRules) - 1;
        }

        return "ion-animation-".concat(index);
      };

      var getStyleContainer = function getStyleContainer(element) {
        var rootNode = element.getRootNode();
        return rootNode.head || rootNode;
      };

      var createKeyframeStylesheet = function createKeyframeStylesheet(keyframeName, keyframeRules, element) {
        var styleContainer = getStyleContainer(element);
        var keyframePrefix = getAnimationPrefix(element);
        var existingStylesheet = styleContainer.querySelector('#' + keyframeName);

        if (existingStylesheet) {
          return existingStylesheet;
        }

        var stylesheet = (element.ownerDocument || document).createElement('style');
        stylesheet.id = keyframeName;
        stylesheet.textContent = "@".concat(keyframePrefix, "keyframes ").concat(keyframeName, " { ").concat(keyframeRules, " } @").concat(keyframePrefix, "keyframes ").concat(keyframeName, "-alt { ").concat(keyframeRules, " }");
        styleContainer.appendChild(stylesheet);
        return stylesheet;
      };

      var addClassToArray = function addClassToArray() {
        var classes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
        var className = arguments.length > 1 ? arguments[1] : undefined;

        if (className !== undefined) {
          var classNameToAppend = Array.isArray(className) ? className : [className];
          return [].concat(_toConsumableArray(classes), _toConsumableArray(classNameToAppend));
        }

        return classes;
      };

      var createAnimation = function createAnimation(animationId) {
        var _delay;

        var _duration;

        var _easing;

        var _iterations;

        var _fill;

        var _direction;

        var _keyframes = [];
        var beforeAddClasses = [];
        var beforeRemoveClasses = [];
        var initialized = false;
        var parentAnimation;
        var beforeStylesValue = {};
        var afterAddClasses = [];
        var afterRemoveClasses = [];
        var afterStylesValue = {};
        var numAnimationsRunning = 0;
        var shouldForceLinearEasing = false;
        var shouldForceSyncPlayback = false;
        var cssAnimationsTimerFallback;
        var forceDirectionValue;
        var forceDurationValue;
        var forceDelayValue;
        var willComplete = true;
        var finished = false;
        var shouldCalculateNumAnimations = true;
        var keyframeName;
        var ani;
        var id = animationId;
        var onFinishCallbacks = [];
        var onFinishOneTimeCallbacks = [];
        var elements = [];
        var childAnimations = [];
        var stylesheets = [];
        var _beforeAddReadFunctions = [];
        var _beforeAddWriteFunctions = [];
        var _afterAddReadFunctions = [];
        var _afterAddWriteFunctions = [];
        var webAnimations = [];
        var supportsAnimationEffect = typeof AnimationEffect === 'function' || typeof window.AnimationEffect === 'function';
        var supportsWebAnimations = typeof Element === 'function' && typeof Element.prototype.animate === 'function' && supportsAnimationEffect;
        var ANIMATION_END_FALLBACK_PADDING_MS = 100;

        var getWebAnimations = function getWebAnimations() {
          return webAnimations;
        };

        var destroy = function destroy(clearStyleSheets) {
          childAnimations.forEach(function (childAnimation) {
            childAnimation.destroy(clearStyleSheets);
          });
          cleanUp(clearStyleSheets);
          elements.length = 0;
          childAnimations.length = 0;
          _keyframes.length = 0;
          clearOnFinish();
          initialized = false;
          shouldCalculateNumAnimations = true;
          return ani;
        };
        /**
         * Cancels any Web Animations, removes
         * any animation properties from the
         * animation's elements, and removes the
         * animation's stylesheets from the DOM.
         */


        var cleanUp = function cleanUp(clearStyleSheets) {
          cleanUpElements();

          if (clearStyleSheets) {
            cleanUpStyleSheets();
          }
        };

        var resetFlags = function resetFlags() {
          shouldForceLinearEasing = false;
          shouldForceSyncPlayback = false;
          shouldCalculateNumAnimations = true;
          forceDirectionValue = undefined;
          forceDurationValue = undefined;
          forceDelayValue = undefined;
          numAnimationsRunning = 0;
          finished = false;
          willComplete = true;
        };

        var onFinish = function onFinish(callback, opts) {
          var callbacks = opts && opts.oneTimeCallback ? onFinishOneTimeCallbacks : onFinishCallbacks;
          callbacks.push({
            c: callback,
            o: opts
          });
          return ani;
        };

        var clearOnFinish = function clearOnFinish() {
          onFinishCallbacks.length = 0;
          onFinishOneTimeCallbacks.length = 0;
          return ani;
        };
        /**
         * Cancels any Web Animations and removes
         * any animation properties from the
         * the animation's elements.
         */


        var cleanUpElements = function cleanUpElements() {
          if (supportsWebAnimations) {
            webAnimations.forEach(function (animation) {
              animation.cancel();
            });
            webAnimations.length = 0;
          } else {
            var elementsArray = elements.slice();
            Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(function () {
              elementsArray.forEach(function (element) {
                removeStyleProperty(element, 'animation-name');
                removeStyleProperty(element, 'animation-duration');
                removeStyleProperty(element, 'animation-timing-function');
                removeStyleProperty(element, 'animation-iteration-count');
                removeStyleProperty(element, 'animation-delay');
                removeStyleProperty(element, 'animation-play-state');
                removeStyleProperty(element, 'animation-fill-mode');
                removeStyleProperty(element, 'animation-direction');
              });
            });
          }
        };
        /**
         * Removes the animation's stylesheets
         * from the DOM.
         */


        var cleanUpStyleSheets = function cleanUpStyleSheets() {
          stylesheets.forEach(function (stylesheet) {
            /**
             * When sharing stylesheets, it's possible
             * for another animation to have already
             * cleaned up a particular stylesheet
             */
            if (stylesheet && stylesheet.parentNode) {
              stylesheet.parentNode.removeChild(stylesheet);
            }
          });
          stylesheets.length = 0;
        };

        var beforeAddRead = function beforeAddRead(readFn) {
          _beforeAddReadFunctions.push(readFn);

          return ani;
        };

        var beforeAddWrite = function beforeAddWrite(writeFn) {
          _beforeAddWriteFunctions.push(writeFn);

          return ani;
        };

        var afterAddRead = function afterAddRead(readFn) {
          _afterAddReadFunctions.push(readFn);

          return ani;
        };

        var afterAddWrite = function afterAddWrite(writeFn) {
          _afterAddWriteFunctions.push(writeFn);

          return ani;
        };

        var beforeAddClass = function beforeAddClass(className) {
          beforeAddClasses = addClassToArray(beforeAddClasses, className);
          return ani;
        };

        var beforeRemoveClass = function beforeRemoveClass(className) {
          beforeRemoveClasses = addClassToArray(beforeRemoveClasses, className);
          return ani;
        };
        /**
         * Set CSS inline styles to the animation's
         * elements before the animation begins.
         */


        var beforeStyles = function beforeStyles() {
          var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
          beforeStylesValue = styles;
          return ani;
        };
        /**
         * Clear CSS inline styles from the animation's
         * elements before the animation begins.
         */


        var beforeClearStyles = function beforeClearStyles() {
          var propertyNames = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];

          var _iterator63 = _createForOfIteratorHelper(propertyNames),
              _step62;

          try {
            for (_iterator63.s(); !(_step62 = _iterator63.n()).done;) {
              var property = _step62.value;
              beforeStylesValue[property] = '';
            }
          } catch (err) {
            _iterator63.e(err);
          } finally {
            _iterator63.f();
          }

          return ani;
        };

        var afterAddClass = function afterAddClass(className) {
          afterAddClasses = addClassToArray(afterAddClasses, className);
          return ani;
        };

        var afterRemoveClass = function afterRemoveClass(className) {
          afterRemoveClasses = addClassToArray(afterRemoveClasses, className);
          return ani;
        };

        var afterStyles = function afterStyles() {
          var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
          afterStylesValue = styles;
          return ani;
        };

        var afterClearStyles = function afterClearStyles() {
          var propertyNames = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];

          var _iterator64 = _createForOfIteratorHelper(propertyNames),
              _step63;

          try {
            for (_iterator64.s(); !(_step63 = _iterator64.n()).done;) {
              var property = _step63.value;
              afterStylesValue[property] = '';
            }
          } catch (err) {
            _iterator64.e(err);
          } finally {
            _iterator64.f();
          }

          return ani;
        };

        var getFill = function getFill() {
          if (_fill !== undefined) {
            return _fill;
          }

          if (parentAnimation) {
            return parentAnimation.getFill();
          }

          return 'both';
        };

        var getDirection = function getDirection() {
          if (forceDirectionValue !== undefined) {
            return forceDirectionValue;
          }

          if (_direction !== undefined) {
            return _direction;
          }

          if (parentAnimation) {
            return parentAnimation.getDirection();
          }

          return 'normal';
        };

        var getEasing = function getEasing() {
          if (shouldForceLinearEasing) {
            return 'linear';
          }

          if (_easing !== undefined) {
            return _easing;
          }

          if (parentAnimation) {
            return parentAnimation.getEasing();
          }

          return 'linear';
        };

        var getDuration = function getDuration() {
          if (shouldForceSyncPlayback) {
            return 0;
          }

          if (forceDurationValue !== undefined) {
            return forceDurationValue;
          }

          if (_duration !== undefined) {
            return _duration;
          }

          if (parentAnimation) {
            return parentAnimation.getDuration();
          }

          return 0;
        };

        var getIterations = function getIterations() {
          if (_iterations !== undefined) {
            return _iterations;
          }

          if (parentAnimation) {
            return parentAnimation.getIterations();
          }

          return 1;
        };

        var getDelay = function getDelay() {
          if (forceDelayValue !== undefined) {
            return forceDelayValue;
          }

          if (_delay !== undefined) {
            return _delay;
          }

          if (parentAnimation) {
            return parentAnimation.getDelay();
          }

          return 0;
        };

        var getKeyframes = function getKeyframes() {
          return _keyframes;
        };

        var direction = function direction(animationDirection) {
          _direction = animationDirection;
          update(true);
          return ani;
        };

        var fill = function fill(animationFill) {
          _fill = animationFill;
          update(true);
          return ani;
        };

        var delay = function delay(animationDelay) {
          _delay = animationDelay;
          update(true);
          return ani;
        };

        var easing = function easing(animationEasing) {
          _easing = animationEasing;
          update(true);
          return ani;
        };

        var duration = function duration(animationDuration) {
          /**
           * CSS Animation Durations of 0ms work fine on Chrome
           * but do not run on Safari, so force it to 1ms to
           * get it to run on both platforms.
           */
          if (!supportsWebAnimations && animationDuration === 0) {
            animationDuration = 1;
          }

          _duration = animationDuration;
          update(true);
          return ani;
        };

        var iterations = function iterations(animationIterations) {
          _iterations = animationIterations;
          update(true);
          return ani;
        };

        var parent = function parent(animation) {
          parentAnimation = animation;
          return ani;
        };

        var addElement = function addElement(el) {
          if (el != null) {
            if (el.nodeType === 1) {
              elements.push(el);
            } else if (el.length >= 0) {
              for (var i = 0; i < el.length; i++) {
                elements.push(el[i]);
              }
            } else {
              console.error('Invalid addElement value');
            }
          }

          return ani;
        };

        var addAnimation = function addAnimation(animationToAdd) {
          if (animationToAdd != null) {
            if (Array.isArray(animationToAdd)) {
              var _iterator65 = _createForOfIteratorHelper(animationToAdd),
                  _step64;

              try {
                for (_iterator65.s(); !(_step64 = _iterator65.n()).done;) {
                  var animation = _step64.value;
                  animation.parent(ani);
                  childAnimations.push(animation);
                }
              } catch (err) {
                _iterator65.e(err);
              } finally {
                _iterator65.f();
              }
            } else {
              animationToAdd.parent(ani);
              childAnimations.push(animationToAdd);
            }
          }

          return ani;
        };

        var keyframes = function keyframes(keyframeValues) {
          _keyframes = keyframeValues;
          return ani;
        };
        /**
         * Run all "before" animation hooks.
         */


        var beforeAnimation = function beforeAnimation() {
          // Runs all before read callbacks
          _beforeAddReadFunctions.forEach(function (callback) {
            return callback();
          }); // Runs all before write callbacks


          _beforeAddWriteFunctions.forEach(function (callback) {
            return callback();
          }); // Updates styles and classes before animation runs


          var addClasses = beforeAddClasses;
          var removeClasses = beforeRemoveClasses;
          var styles = beforeStylesValue;
          elements.forEach(function (el) {
            var elementClassList = el.classList;
            addClasses.forEach(function (c) {
              return elementClassList.add(c);
            });
            removeClasses.forEach(function (c) {
              return elementClassList.remove(c);
            });

            for (var property in styles) {
              if (styles.hasOwnProperty(property)) {
                setStyleProperty(el, property, styles[property]);
              }
            }
          });
        };
        /**
         * Run all "after" animation hooks.
         */


        var afterAnimation = function afterAnimation() {
          clearCSSAnimationsTimeout(); // Runs all after read callbacks

          _afterAddReadFunctions.forEach(function (callback) {
            return callback();
          }); // Runs all after write callbacks


          _afterAddWriteFunctions.forEach(function (callback) {
            return callback();
          }); // Updates styles and classes before animation ends


          var currentStep = willComplete ? 1 : 0;
          var addClasses = afterAddClasses;
          var removeClasses = afterRemoveClasses;
          var styles = afterStylesValue;
          elements.forEach(function (el) {
            var elementClassList = el.classList;
            addClasses.forEach(function (c) {
              return elementClassList.add(c);
            });
            removeClasses.forEach(function (c) {
              return elementClassList.remove(c);
            });

            for (var property in styles) {
              if (styles.hasOwnProperty(property)) {
                setStyleProperty(el, property, styles[property]);
              }
            }
          });
          onFinishCallbacks.forEach(function (onFinishCallback) {
            return onFinishCallback.c(currentStep, ani);
          });
          onFinishOneTimeCallbacks.forEach(function (onFinishCallback) {
            return onFinishCallback.c(currentStep, ani);
          });
          onFinishOneTimeCallbacks.length = 0;
          shouldCalculateNumAnimations = true;

          if (willComplete) {
            finished = true;
          }

          willComplete = true;
        };

        var animationFinish = function animationFinish() {
          if (numAnimationsRunning === 0) {
            return;
          }

          numAnimationsRunning--;

          if (numAnimationsRunning === 0) {
            afterAnimation();

            if (parentAnimation) {
              parentAnimation.animationFinish();
            }
          }
        };

        var initializeCSSAnimation = function initializeCSSAnimation() {
          var toggleAnimationName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
          cleanUpStyleSheets();
          var processedKeyframes = processKeyframes(_keyframes);
          elements.forEach(function (element) {
            if (processedKeyframes.length > 0) {
              var keyframeRules = generateKeyframeRules(processedKeyframes);
              keyframeName = animationId !== undefined ? animationId : generateKeyframeName(keyframeRules);
              var stylesheet = createKeyframeStylesheet(keyframeName, keyframeRules, element);
              stylesheets.push(stylesheet);
              setStyleProperty(element, 'animation-duration', "".concat(getDuration(), "ms"));
              setStyleProperty(element, 'animation-timing-function', getEasing());
              setStyleProperty(element, 'animation-delay', "".concat(getDelay(), "ms"));
              setStyleProperty(element, 'animation-fill-mode', getFill());
              setStyleProperty(element, 'animation-direction', getDirection());
              var iterationsCount = getIterations() === Infinity ? 'infinite' : getIterations().toString();
              setStyleProperty(element, 'animation-iteration-count', iterationsCount);
              setStyleProperty(element, 'animation-play-state', 'paused');

              if (toggleAnimationName) {
                setStyleProperty(element, 'animation-name', "".concat(stylesheet.id, "-alt"));
              }

              Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(function () {
                setStyleProperty(element, 'animation-name', stylesheet.id || null);
              });
            }
          });
        };

        var initializeWebAnimation = function initializeWebAnimation() {
          elements.forEach(function (element) {
            var animation = element.animate(_keyframes, {
              id: id,
              delay: getDelay(),
              duration: getDuration(),
              easing: getEasing(),
              iterations: getIterations(),
              fill: getFill(),
              direction: getDirection()
            });
            animation.pause();
            webAnimations.push(animation);
          });

          if (webAnimations.length > 0) {
            webAnimations[0].onfinish = function () {
              animationFinish();
            };
          }
        };

        var initializeAnimation = function initializeAnimation() {
          var toggleAnimationName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
          beforeAnimation();

          if (_keyframes.length > 0) {
            if (supportsWebAnimations) {
              initializeWebAnimation();
            } else {
              initializeCSSAnimation(toggleAnimationName);
            }
          }

          initialized = true;
        };

        var setAnimationStep = function setAnimationStep(step) {
          step = Math.min(Math.max(step, 0), 0.9999);

          if (supportsWebAnimations) {
            webAnimations.forEach(function (animation) {
              animation.currentTime = animation.effect.getComputedTiming().delay + getDuration() * step;
              animation.pause();
            });
          } else {
            var animationDuration = "-".concat(getDuration() * step, "ms");
            elements.forEach(function (element) {
              if (_keyframes.length > 0) {
                setStyleProperty(element, 'animation-delay', animationDuration);
                setStyleProperty(element, 'animation-play-state', 'paused');
              }
            });
          }
        };

        var updateWebAnimation = function updateWebAnimation(step) {
          webAnimations.forEach(function (animation) {
            animation.effect.updateTiming({
              delay: getDelay(),
              duration: getDuration(),
              easing: getEasing(),
              iterations: getIterations(),
              fill: getFill(),
              direction: getDirection()
            });
          });

          if (step !== undefined) {
            setAnimationStep(step);
          }
        };

        var updateCSSAnimation = function updateCSSAnimation() {
          var toggleAnimationName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
          var step = arguments.length > 1 ? arguments[1] : undefined;
          Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(function () {
            elements.forEach(function (element) {
              setStyleProperty(element, 'animation-name', keyframeName || null);
              setStyleProperty(element, 'animation-duration', "".concat(getDuration(), "ms"));
              setStyleProperty(element, 'animation-timing-function', getEasing());
              setStyleProperty(element, 'animation-delay', step !== undefined ? "-".concat(step * getDuration(), "ms") : "".concat(getDelay(), "ms"));
              setStyleProperty(element, 'animation-fill-mode', getFill() || null);
              setStyleProperty(element, 'animation-direction', getDirection() || null);
              var iterationsCount = getIterations() === Infinity ? 'infinite' : getIterations().toString();
              setStyleProperty(element, 'animation-iteration-count', iterationsCount);

              if (toggleAnimationName) {
                setStyleProperty(element, 'animation-name', "".concat(keyframeName, "-alt"));
              }

              Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(function () {
                setStyleProperty(element, 'animation-name', keyframeName || null);
              });
            });
          });
        };

        var update = function update() {
          var deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
          var toggleAnimationName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
          var step = arguments.length > 2 ? arguments[2] : undefined;

          if (deep) {
            childAnimations.forEach(function (animation) {
              animation.update(deep, toggleAnimationName, step);
            });
          }

          if (supportsWebAnimations) {
            updateWebAnimation(step);
          } else {
            updateCSSAnimation(toggleAnimationName, step);
          }

          return ani;
        };

        var progressStart = function progressStart() {
          var forceLinearEasing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
          var step = arguments.length > 1 ? arguments[1] : undefined;
          childAnimations.forEach(function (animation) {
            animation.progressStart(forceLinearEasing, step);
          });
          pauseAnimation();
          shouldForceLinearEasing = forceLinearEasing;

          if (!initialized) {
            initializeAnimation();
          } else {
            update(false, true, step);
          }

          return ani;
        };

        var progressStep = function progressStep(step) {
          childAnimations.forEach(function (animation) {
            animation.progressStep(step);
          });
          setAnimationStep(step);
          return ani;
        };

        var progressEnd = function progressEnd(playTo, step, dur) {
          shouldForceLinearEasing = false;
          childAnimations.forEach(function (animation) {
            animation.progressEnd(playTo, step, dur);
          });

          if (dur !== undefined) {
            forceDurationValue = dur;
          }

          finished = false; // tslint:disable-next-line: strict-boolean-conditions

          willComplete = true;

          if (playTo === 0) {
            forceDirectionValue = getDirection() === 'reverse' ? 'normal' : 'reverse';

            if (forceDirectionValue === 'reverse') {
              willComplete = false;
            }

            if (supportsWebAnimations) {
              update();
              setAnimationStep(1 - step);
            } else {
              forceDelayValue = (1 - step) * getDuration() * -1;
              update(false, false);
            }
          } else if (playTo === 1) {
            if (supportsWebAnimations) {
              update();
              setAnimationStep(step);
            } else {
              forceDelayValue = step * getDuration() * -1;
              update(false, false);
            }
          }

          if (playTo !== undefined) {
            onFinish(function () {
              forceDurationValue = undefined;
              forceDirectionValue = undefined;
              forceDelayValue = undefined;
            }, {
              oneTimeCallback: true
            });

            if (!parentAnimation) {
              play();
            }
          }

          return ani;
        };

        var pauseAnimation = function pauseAnimation() {
          if (initialized) {
            if (supportsWebAnimations) {
              webAnimations.forEach(function (animation) {
                animation.pause();
              });
            } else {
              elements.forEach(function (element) {
                setStyleProperty(element, 'animation-play-state', 'paused');
              });
            }
          }
        };

        var pause = function pause() {
          childAnimations.forEach(function (animation) {
            animation.pause();
          });
          pauseAnimation();
          return ani;
        };

        var onAnimationEndFallback = function onAnimationEndFallback() {
          cssAnimationsTimerFallback = undefined;
          animationFinish();
        };

        var clearCSSAnimationsTimeout = function clearCSSAnimationsTimeout() {
          if (cssAnimationsTimerFallback) {
            clearTimeout(cssAnimationsTimerFallback);
          }
        };

        var playCSSAnimations = function playCSSAnimations() {
          clearCSSAnimationsTimeout();
          Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(function () {
            elements.forEach(function (element) {
              if (_keyframes.length > 0) {
                setStyleProperty(element, 'animation-play-state', 'running');
              }
            });
          });

          if (_keyframes.length === 0 || elements.length === 0) {
            animationFinish();
          } else {
            /**
             * This is a catchall in the event that a CSS Animation did not finish.
             * The Web Animations API has mechanisms in place for preventing this.
             * CSS Animations will not fire an `animationend` event
             * for elements with `display: none`. The Web Animations API
             * accounts for this, but using raw CSS Animations requires
             * this workaround.
             */
            var animationDelay = getDelay() || 0;
            var animationDuration = getDuration() || 0;
            var animationIterations = getIterations() || 1; // No need to set a timeout when animation has infinite iterations

            if (isFinite(animationIterations)) {
              cssAnimationsTimerFallback = setTimeout(onAnimationEndFallback, animationDelay + animationDuration * animationIterations + ANIMATION_END_FALLBACK_PADDING_MS);
            }

            animationEnd(elements[0], function () {
              clearCSSAnimationsTimeout();
              /**
               * Ensure that clean up
               * is always done a frame
               * before the onFinish handlers
               * are fired. Otherwise, there
               * may be flickering if a new
               * animation is started on the same
               * element too quickly
               *
               * TODO: Is there a cleaner way to do this?
               */

              Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(function () {
                clearCSSAnimationPlayState();
                Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(animationFinish);
              });
            });
          }
        };

        var clearCSSAnimationPlayState = function clearCSSAnimationPlayState() {
          elements.forEach(function (element) {
            removeStyleProperty(element, 'animation-duration');
            removeStyleProperty(element, 'animation-delay');
            removeStyleProperty(element, 'animation-play-state');
          });
        };

        var playWebAnimations = function playWebAnimations() {
          webAnimations.forEach(function (animation) {
            animation.play();
          });

          if (_keyframes.length === 0 || elements.length === 0) {
            animationFinish();
          }
        };

        var resetAnimation = function resetAnimation() {
          if (supportsWebAnimations) {
            setAnimationStep(0);
            updateWebAnimation();
          } else {
            updateCSSAnimation();
          }
        };

        var play = function play(opts) {
          return new Promise(function (resolve) {
            if (opts && opts.sync) {
              shouldForceSyncPlayback = true;
              onFinish(function () {
                return shouldForceSyncPlayback = false;
              }, {
                oneTimeCallback: true
              });
            }

            if (!initialized) {
              initializeAnimation();
            }

            if (finished) {
              resetAnimation();
              finished = false;
            }

            if (shouldCalculateNumAnimations) {
              numAnimationsRunning = childAnimations.length + 1;
              shouldCalculateNumAnimations = false;
            }

            onFinish(function () {
              return resolve();
            }, {
              oneTimeCallback: true
            });
            childAnimations.forEach(function (animation) {
              animation.play();
            });

            if (supportsWebAnimations) {
              playWebAnimations();
            } else {
              playCSSAnimations();
            }
          });
        };

        var stop = function stop() {
          childAnimations.forEach(function (animation) {
            animation.stop();
          });

          if (initialized) {
            cleanUpElements();
            initialized = false;
          }

          resetFlags();
        };

        var from = function from(property, value) {
          var firstFrame = _keyframes[0];

          if (firstFrame !== undefined && (firstFrame.offset === undefined || firstFrame.offset === 0)) {
            firstFrame[property] = value;
          } else {
            _keyframes = [_defineProperty({
              offset: 0
            }, property, value)].concat(_toConsumableArray(_keyframes));
          }

          return ani;
        };

        var to = function to(property, value) {
          var lastFrame = _keyframes[_keyframes.length - 1];

          if (lastFrame !== undefined && (lastFrame.offset === undefined || lastFrame.offset === 1)) {
            lastFrame[property] = value;
          } else {
            _keyframes = [].concat(_toConsumableArray(_keyframes), [_defineProperty({
              offset: 1
            }, property, value)]);
          }

          return ani;
        };

        var fromTo = function fromTo(property, fromValue, toValue) {
          return from(property, fromValue).to(property, toValue);
        };

        return ani = {
          parentAnimation: parentAnimation,
          elements: elements,
          childAnimations: childAnimations,
          id: id,
          animationFinish: animationFinish,
          from: from,
          to: to,
          fromTo: fromTo,
          parent: parent,
          play: play,
          pause: pause,
          stop: stop,
          destroy: destroy,
          keyframes: keyframes,
          addAnimation: addAnimation,
          addElement: addElement,
          update: update,
          fill: fill,
          direction: direction,
          iterations: iterations,
          duration: duration,
          easing: easing,
          delay: delay,
          getWebAnimations: getWebAnimations,
          getKeyframes: getKeyframes,
          getFill: getFill,
          getDirection: getDirection,
          getDelay: getDelay,
          getIterations: getIterations,
          getEasing: getEasing,
          getDuration: getDuration,
          afterAddRead: afterAddRead,
          afterAddWrite: afterAddWrite,
          afterClearStyles: afterClearStyles,
          afterStyles: afterStyles,
          afterRemoveClass: afterRemoveClass,
          afterAddClass: afterAddClass,
          beforeAddRead: beforeAddRead,
          beforeAddWrite: beforeAddWrite,
          beforeClearStyles: beforeClearStyles,
          beforeStyles: beforeStyles,
          beforeRemoveClass: beforeRemoveClass,
          beforeAddClass: beforeAddClass,
          onFinish: onFinish,
          progressStart: progressStart,
          progressStep: progressStep,
          progressEnd: progressEnd
        };
      };
      /***/

    },

    /***/
    "mk5/":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/window.js ***!
      \*****************************************************************/

    /*! exports provided: window */

    /***/
    function mk5(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "window", function () {
        return window;
      });
      /* harmony import */


      var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subject */
      "XNiG");
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function window(windowBoundaries) {
        return function windowOperatorFunction(source) {
          return source.lift(new WindowOperator(windowBoundaries));
        };
      }

      var WindowOperator = /*#__PURE__*/function () {
        function WindowOperator(windowBoundaries) {
          _classCallCheck(this, WindowOperator);

          this.windowBoundaries = windowBoundaries;
        }

        _createClass2(WindowOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            var windowSubscriber = new WindowSubscriber(subscriber);
            var sourceSubscription = source.subscribe(windowSubscriber);

            if (!sourceSubscription.closed) {
              windowSubscriber.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(this.windowBoundaries, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](windowSubscriber)));
            }

            return sourceSubscription;
          }
        }]);

        return WindowOperator;
      }();

      var WindowSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP15) {
        _inherits(WindowSubscriber, _innerSubscribe__WEBP15);

        var _super260 = _createSuper(WindowSubscriber);

        function WindowSubscriber(destination) {
          var _this523;

          _classCallCheck(this, WindowSubscriber);

          _this523 = _super260.call(this, destination);
          _this523.window = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
          destination.next(_this523.window);
          return _this523;
        }

        _createClass2(WindowSubscriber, [{
          key: "notifyNext",
          value: function notifyNext() {
            this.openWindow();
          }
        }, {
          key: "notifyError",
          value: function notifyError(error) {
            this._error(error);
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            this._complete();
          }
        }, {
          key: "_next",
          value: function _next(value) {
            this.window.next(value);
          }
        }, {
          key: "_error",
          value: function _error(err) {
            this.window.error(err);
            this.destination.error(err);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.window.complete();
            this.destination.complete();
          }
        }, {
          key: "_unsubscribe",
          value: function _unsubscribe() {
            this.window = null;
          }
        }, {
          key: "openWindow",
          value: function openWindow() {
            var prevWindow = this.window;

            if (prevWindow) {
              prevWindow.complete();
            }

            var destination = this.destination;
            var newWindow = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
            destination.next(newWindow);
          }
        }]);

        return WindowSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"]); //# sourceMappingURL=window.js.map

      /***/

    },

    /***/
    "mlxB":
    /*!************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/isDate.js ***!
      \************************************************************/

    /*! exports provided: isDate */

    /***/
    function mlxB(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isDate", function () {
        return isDate;
      });

      function isDate(value) {
        return value instanceof Date && !isNaN(+value);
      } //# sourceMappingURL=isDate.js.map

      /***/

    },

    /***/
    "mqiu":
    /*!****************************************************************************************************!*\
      !*** ./node_modules/@ngx-translate/http-loader/__ivy_ngcc__/fesm2015/ngx-translate-http-loader.js ***!
      \****************************************************************************************************/

    /*! exports provided: TranslateHttpLoader */

    /***/
    function mqiu(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TranslateHttpLoader", function () {
        return TranslateHttpLoader;
      });
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
       */


      var TranslateHttpLoader = /*#__PURE__*/function () {
        /**
         * @param {?} http
         * @param {?=} prefix
         * @param {?=} suffix
         */
        function TranslateHttpLoader(http) {
          var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "/assets/i18n/";
          var suffix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ".json";

          _classCallCheck(this, TranslateHttpLoader);

          this.http = http;
          this.prefix = prefix;
          this.suffix = suffix;
        }
        /**
         * Gets the translations from the server
         * @param {?} lang
         * @return {?}
         */


        _createClass2(TranslateHttpLoader, [{
          key: "getTranslation",
          value: function getTranslation(lang) {
            return this.http.get("".concat(this.prefix).concat(lang).concat(this.suffix));
          }
        }]);

        return TranslateHttpLoader;
      }();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
       */

      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
       */
      //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXRyYW5zbGF0ZS1odHRwLWxvYWRlci5qcyIsInNvdXJjZXMiOlsiQG5neC10cmFuc2xhdGUvaHR0cC1sb2FkZXIvbGliL2h0dHAtbG9hZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFJQSxNQUFhLG1CQUFtQjtBQUFHO0FBQVE7QUFDdkM7QUFBMEI7QUFBMEI7QUFBUSxJQUE5RCxZQUFvQixJQUFnQixFQUFTLFNBQWlCLGVBQWUsRUFBUyxTQUFpQixPQUFPO0FBQUksUUFBOUYsU0FBSSxHQUFKLElBQUksQ0FBWTtBQUFDLFFBQVEsV0FBTSxHQUFOLE1BQU0sQ0FBMEI7QUFBQyxRQUFRLFdBQU0sR0FBTixNQUFNLENBQWtCO0FBQUMsS0FBRztBQUNwSDtBQUVDO0FBQ0U7QUFDaUI7QUFBbUI7QUFBUSxJQUF0QyxjQUFjLENBQUMsSUFBWTtBQUFJLFFBQ3BDLE9BQU8sSUFBSSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsR0FBRyxJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksR0FBRyxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQztBQUNoRSxLQUFHO0FBQ0gsQ0FBQztBQUNEO0FBQUM7QUFBSTtBQUFrQztBQUFnRjtBQUFJO0FBQUM7QUFBSTtBQUFrQztBQUFnRjtBQUFJO0FBQUM7O0FBVkEsQUFBQSxBQUFBLEFBQ0EsQUFBQSxBQUFBLEFBQUEsQUFBQSxBQUFBLEFBQUEsQUFBQSxBQUFBLEFBQUEsQUFBQSxBQUFBLEFBQUEsQUFBQSxBQUFBLEFBQUEsQUFBQSxBQUFBLEFBQUEsQUFBQSxBQUFBLEFBQUEsQUFBQSxBQUFBLEFBQUEsQUFLQSxBQUFBLEFBQUEsQUFBQSxBQUNBLEFBQUEsQUFBQSxBQUFBLEFBQUEsQUFBQSxBQUFBLEFBQUEsQUFBQSxBQUFBLEFBQUEsQUFBQSxBQUFBLEFBQUEsQUFBQSxBQUFBLEFBQUEsQUFBQSxBQUFBLEFBQUEsQUFBQSxBQUNBLEFBQ0EiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge0h0dHBDbGllbnR9IGZyb20gXCJAYW5ndWxhci9jb21tb24vaHR0cFwiO1xuaW1wb3J0IHtUcmFuc2xhdGVMb2FkZXJ9IGZyb20gXCJAbmd4LXRyYW5zbGF0ZS9jb3JlXCI7XG5pbXBvcnQge09ic2VydmFibGV9IGZyb20gJ3J4anMnO1xuXG5leHBvcnQgY2xhc3MgVHJhbnNsYXRlSHR0cExvYWRlciBpbXBsZW1lbnRzIFRyYW5zbGF0ZUxvYWRlciB7XG4gIGNvbnN0cnVjdG9yKHByaXZhdGUgaHR0cDogSHR0cENsaWVudCwgcHVibGljIHByZWZpeDogc3RyaW5nID0gXCIvYXNzZXRzL2kxOG4vXCIsIHB1YmxpYyBzdWZmaXg6IHN0cmluZyA9IFwiLmpzb25cIikge31cblxuICAvKipcbiAgICogR2V0cyB0aGUgdHJhbnNsYXRpb25zIGZyb20gdGhlIHNlcnZlclxuICAgKi9cbiAgcHVibGljIGdldFRyYW5zbGF0aW9uKGxhbmc6IHN0cmluZyk6IE9ic2VydmFibGU8T2JqZWN0PiB7XG4gICAgcmV0dXJuIHRoaXMuaHR0cC5nZXQoYCR7dGhpcy5wcmVmaXh9JHtsYW5nfSR7dGhpcy5zdWZmaXh9YCk7XG4gIH1cbn1cbiJdfQ==

      /***/

    },

    /***/
    "mrSG":
    /*!*****************************************!*\
      !*** ./node_modules/tslib/tslib.es6.js ***!
      \*****************************************/

    /*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet */

    /***/
    function mrSG(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__extends", function () {
        return __extends;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__assign", function () {
        return _assign2;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__rest", function () {
        return __rest;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__decorate", function () {
        return __decorate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__param", function () {
        return __param;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__metadata", function () {
        return __metadata;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__awaiter", function () {
        return __awaiter;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__generator", function () {
        return __generator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__createBinding", function () {
        return __createBinding;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__exportStar", function () {
        return __exportStar;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__values", function () {
        return __values;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__read", function () {
        return __read;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__spread", function () {
        return __spread;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__spreadArrays", function () {
        return __spreadArrays;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__spreadArray", function () {
        return __spreadArray;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__await", function () {
        return __await;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function () {
        return __asyncGenerator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function () {
        return __asyncDelegator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__asyncValues", function () {
        return __asyncValues;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function () {
        return __makeTemplateObject;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__importStar", function () {
        return __importStar;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__importDefault", function () {
        return __importDefault;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__classPrivateFieldGet", function () {
        return __classPrivateFieldGet;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "__classPrivateFieldSet", function () {
        return __classPrivateFieldSet;
      });
      /*! *****************************************************************************
      Copyright (c) Microsoft Corporation.
      
      Permission to use, copy, modify, and/or distribute this software for any
      purpose with or without fee is hereby granted.
      
      THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
      REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
      AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
      INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
      LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
      OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
      PERFORMANCE OF THIS SOFTWARE.
      ***************************************************************************** */

      /* global Reflect, Promise */


      var _extendStatics2 = function extendStatics(d, b) {
        _extendStatics2 = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function (d, b) {
          d.__proto__ = b;
        } || function (d, b) {
          for (var p in b) {
            if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
          }
        };

        return _extendStatics2(d, b);
      };

      function __extends(d, b) {
        if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");

        _extendStatics2(d, b);

        function __() {
          this.constructor = d;
        }

        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      }

      var _assign2 = function __assign() {
        _assign2 = Object.assign || function __assign(t) {
          for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];

            for (var p in s) {
              if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
            }
          }

          return t;
        };

        return _assign2.apply(this, arguments);
      };

      function __rest(s, e) {
        var t = {};

        for (var p in s) {
          if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
        }

        if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
          if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
        }
        return t;
      }

      function __decorate(decorators, target, key, desc) {
        var c = arguments.length,
            r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
            d;
        if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
          if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
        }
        return c > 3 && r && Object.defineProperty(target, key, r), r;
      }

      function __param(paramIndex, decorator) {
        return function (target, key) {
          decorator(target, key, paramIndex);
        };
      }

      function __metadata(metadataKey, metadataValue) {
        if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
      }

      function __awaiter(thisArg, _arguments, P, generator) {
        function adopt(value) {
          return value instanceof P ? value : new P(function (resolve) {
            resolve(value);
          });
        }

        return new (P || (P = Promise))(function (resolve, reject) {
          function fulfilled(value) {
            try {
              step(generator.next(value));
            } catch (e) {
              reject(e);
            }
          }

          function rejected(value) {
            try {
              step(generator["throw"](value));
            } catch (e) {
              reject(e);
            }
          }

          function step(result) {
            result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
          }

          step((generator = generator.apply(thisArg, _arguments || [])).next());
        });
      }

      function __generator(thisArg, body) {
        var _ = {
          label: 0,
          sent: function sent() {
            if (t[0] & 1) throw t[1];
            return t[1];
          },
          trys: [],
          ops: []
        },
            f,
            y,
            t,
            g;
        return g = {
          next: verb(0),
          "throw": verb(1),
          "return": verb(2)
        }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
          return this;
        }), g;

        function verb(n) {
          return function (v) {
            return step([n, v]);
          };
        }

        function step(op) {
          if (f) throw new TypeError("Generator is already executing.");

          while (_) {
            try {
              if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
              if (y = 0, t) op = [op[0] & 2, t.value];

              switch (op[0]) {
                case 0:
                case 1:
                  t = op;
                  break;

                case 4:
                  _.label++;
                  return {
                    value: op[1],
                    done: false
                  };

                case 5:
                  _.label++;
                  y = op[1];
                  op = [0];
                  continue;

                case 7:
                  op = _.ops.pop();

                  _.trys.pop();

                  continue;

                default:
                  if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
                    _ = 0;
                    continue;
                  }

                  if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
                    _.label = op[1];
                    break;
                  }

                  if (op[0] === 6 && _.label < t[1]) {
                    _.label = t[1];
                    t = op;
                    break;
                  }

                  if (t && _.label < t[2]) {
                    _.label = t[2];

                    _.ops.push(op);

                    break;
                  }

                  if (t[2]) _.ops.pop();

                  _.trys.pop();

                  continue;
              }

              op = body.call(thisArg, _);
            } catch (e) {
              op = [6, e];
              y = 0;
            } finally {
              f = t = 0;
            }
          }

          if (op[0] & 5) throw op[1];
          return {
            value: op[0] ? op[1] : void 0,
            done: true
          };
        }
      }

      var __createBinding = Object.create ? function (o, m, k, k2) {
        if (k2 === undefined) k2 = k;
        Object.defineProperty(o, k2, {
          enumerable: true,
          get: function get() {
            return m[k];
          }
        });
      } : function (o, m, k, k2) {
        if (k2 === undefined) k2 = k;
        o[k2] = m[k];
      };

      function __exportStar(m, o) {
        for (var p in m) {
          if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
        }
      }

      function __values(o) {
        var s = typeof Symbol === "function" && Symbol.iterator,
            m = s && o[s],
            i = 0;
        if (m) return m.call(o);
        if (o && typeof o.length === "number") return {
          next: function next() {
            if (o && i >= o.length) o = void 0;
            return {
              value: o && o[i++],
              done: !o
            };
          }
        };
        throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
      }

      function __read(o, n) {
        var m = typeof Symbol === "function" && o[Symbol.iterator];
        if (!m) return o;
        var i = m.call(o),
            r,
            ar = [],
            e;

        try {
          while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
            ar.push(r.value);
          }
        } catch (error) {
          e = {
            error: error
          };
        } finally {
          try {
            if (r && !r.done && (m = i["return"])) m.call(i);
          } finally {
            if (e) throw e.error;
          }
        }

        return ar;
      }
      /** @deprecated */


      function __spread() {
        for (var ar = [], i = 0; i < arguments.length; i++) {
          ar = ar.concat(__read(arguments[i]));
        }

        return ar;
      }
      /** @deprecated */


      function __spreadArrays() {
        for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
          s += arguments[i].length;
        }

        for (var r = Array(s), k = 0, i = 0; i < il; i++) {
          for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
            r[k] = a[j];
          }
        }

        return r;
      }

      function __spreadArray(to, from, pack) {
        if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
          if (ar || !(i in from)) {
            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
          }
        }
        return to.concat(ar || Array.prototype.slice.call(from));
      }

      function __await(v) {
        return this instanceof __await ? (this.v = v, this) : new __await(v);
      }

      function __asyncGenerator(thisArg, _arguments, generator) {
        if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
        var g = generator.apply(thisArg, _arguments || []),
            i,
            q = [];
        return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
          return this;
        }, i;

        function verb(n) {
          if (g[n]) i[n] = function (v) {
            return new Promise(function (a, b) {
              q.push([n, v, a, b]) > 1 || resume(n, v);
            });
          };
        }

        function resume(n, v) {
          try {
            step(g[n](v));
          } catch (e) {
            settle(q[0][3], e);
          }
        }

        function step(r) {
          r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
        }

        function fulfill(value) {
          resume("next", value);
        }

        function reject(value) {
          resume("throw", value);
        }

        function settle(f, v) {
          if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
        }
      }

      function __asyncDelegator(o) {
        var i, p;
        return i = {}, verb("next"), verb("throw", function (e) {
          throw e;
        }), verb("return"), i[Symbol.iterator] = function () {
          return this;
        }, i;

        function verb(n, f) {
          i[n] = o[n] ? function (v) {
            return (p = !p) ? {
              value: __await(o[n](v)),
              done: n === "return"
            } : f ? f(v) : v;
          } : f;
        }
      }

      function __asyncValues(o) {
        if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
        var m = o[Symbol.asyncIterator],
            i;
        return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
          return this;
        }, i);

        function verb(n) {
          i[n] = o[n] && function (v) {
            return new Promise(function (resolve, reject) {
              v = o[n](v), settle(resolve, reject, v.done, v.value);
            });
          };
        }

        function settle(resolve, reject, d, v) {
          Promise.resolve(v).then(function (v) {
            resolve({
              value: v,
              done: d
            });
          }, reject);
        }
      }

      function __makeTemplateObject(cooked, raw) {
        if (Object.defineProperty) {
          Object.defineProperty(cooked, "raw", {
            value: raw
          });
        } else {
          cooked.raw = raw;
        }

        return cooked;
      }

      ;

      var __setModuleDefault = Object.create ? function (o, v) {
        Object.defineProperty(o, "default", {
          enumerable: true,
          value: v
        });
      } : function (o, v) {
        o["default"] = v;
      };

      function __importStar(mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k in mod) {
          if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
        }

        __setModuleDefault(result, mod);

        return result;
      }

      function __importDefault(mod) {
        return mod && mod.__esModule ? mod : {
          "default": mod
        };
      }

      function __classPrivateFieldGet(receiver, state, kind, f) {
        if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
        if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
        return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
      }

      function __classPrivateFieldSet(receiver, state, value, kind, f) {
        if (kind === "m") throw new TypeError("Private method is not writable");
        if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
        if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
        return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
      }
      /***/

    },

    /***/
    "mvbY":
    /*!***********************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/integrations/node/express.js ***!
      \***********************************************************************/

    /*! exports provided: Express */

    /***/
    function mvbY(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Express", function () {
        return Express;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /**
       * Express integration
       *
       * Provides an request and error handler for Express framework as well as tracing capabilities
       */


      var Express =
      /** @class */
      function () {
        /**
         * @inheritDoc
         */
        function Express(options) {
          if (options === void 0) {
            options = {};
          }
          /**
           * @inheritDoc
           */


          this.name = Express.id;
          this._router = options.router || options.app;
          this._methods = (Array.isArray(options.methods) ? options.methods : []).concat('use');
        }
        /**
         * @inheritDoc
         */


        Express.prototype.setupOnce = function () {
          if (!this._router) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error('ExpressIntegration is missing an Express instance');

            return;
          }

          instrumentMiddlewares(this._router, this._methods);
        };
        /**
         * @inheritDoc
         */


        Express.id = 'Express';
        return Express;
      }();
      /**
       * Wraps original middleware function in a tracing call, which stores the info about the call as a span,
       * and finishes it once the middleware is done invoking.
       *
       * Express middlewares have 3 various forms, thus we have to take care of all of them:
       * // sync
       * app.use(function (req, res) { ... })
       * // async
       * app.use(function (req, res, next) { ... })
       * // error handler
       * app.use(function (err, req, res, next) { ... })
       *
       * They all internally delegate to the `router[method]` of the given application instance.
       */
      // eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any


      function wrap(fn, method) {
        var arity = fn.length;

        switch (arity) {
          case 2:
            {
              return function (req, res) {
                var transaction = res.__sentry_transaction;

                if (transaction) {
                  var span_1 = transaction.startChild({
                    description: fn.name,
                    op: "middleware." + method
                  });
                  res.once('finish', function () {
                    span_1.finish();
                  });
                }

                return fn.call(this, req, res);
              };
            }

          case 3:
            {
              return function (req, res, next) {
                var _a;

                var transaction = res.__sentry_transaction;
                var span = (_a = transaction) === null || _a === void 0 ? void 0 : _a.startChild({
                  description: fn.name,
                  op: "middleware." + method
                });
                fn.call(this, req, res, function () {
                  var args = [];

                  for (var _i = 0; _i < arguments.length; _i++) {
                    args[_i] = arguments[_i];
                  }

                  var _a;

                  (_a = span) === null || _a === void 0 ? void 0 : _a.finish();
                  next.call.apply(next, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([this], args));
                });
              };
            }

          case 4:
            {
              return function (err, req, res, next) {
                var _a;

                var transaction = res.__sentry_transaction;
                var span = (_a = transaction) === null || _a === void 0 ? void 0 : _a.startChild({
                  description: fn.name,
                  op: "middleware." + method
                });
                fn.call(this, err, req, res, function () {
                  var args = [];

                  for (var _i = 0; _i < arguments.length; _i++) {
                    args[_i] = arguments[_i];
                  }

                  var _a;

                  (_a = span) === null || _a === void 0 ? void 0 : _a.finish();
                  next.call.apply(next, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([this], args));
                });
              };
            }

          default:
            {
              throw new Error("Express middleware takes 2-4 arguments. Got: " + arity);
            }
        }
      }
      /**
       * Takes all the function arguments passed to the original `app` or `router` method, eg. `app.use` or `router.use`
       * and wraps every function, as well as array of functions with a call to our `wrap` method.
       * We have to take care of the arrays as well as iterate over all of the arguments,
       * as `app.use` can accept middlewares in few various forms.
       *
       * app.use([<path>], <fn>)
       * app.use([<path>], <fn>, ...<fn>)
       * app.use([<path>], ...<fn>[])
       */


      function wrapMiddlewareArgs(args, method) {
        return args.map(function (arg) {
          if (typeof arg === 'function') {
            return wrap(arg, method);
          }

          if (Array.isArray(arg)) {
            return arg.map(function (a) {
              if (typeof a === 'function') {
                return wrap(a, method);
              }

              return a;
            });
          }

          return arg;
        });
      }
      /**
       * Patches original router to utilize our tracing functionality
       */


      function patchMiddleware(router, method) {
        var originalCallback = router[method];

        router[method] = function () {
          var args = [];

          for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
          }

          return originalCallback.call.apply(originalCallback, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([this], wrapMiddlewareArgs(args, method)));
        };

        return router;
      }
      /**
       * Patches original router methods
       */


      function instrumentMiddlewares(router, methods) {
        if (methods === void 0) {
          methods = [];
        }

        methods.forEach(function (method) {
          return patchMiddleware(router, method);
        });
      } //# sourceMappingURL=express.js.map

      /***/

    },

    /***/
    "n6bG":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/isFunction.js ***!
      \****************************************************************/

    /*! exports provided: isFunction */

    /***/
    function n6bG(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isFunction", function () {
        return isFunction;
      });

      function isFunction(x) {
        return typeof x === 'function';
      } //# sourceMappingURL=isFunction.js.map

      /***/

    },

    /***/
    "nXHh":
    /*!**************************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/transports/index.js ***!
      \**************************************************************/

    /*! exports provided: BaseTransport, FetchTransport, XHRTransport */

    /***/
    function nXHh(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./base */
      "DTjN");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "BaseTransport", function () {
        return _base__WEBPACK_IMPORTED_MODULE_0__["BaseTransport"];
      });
      /* harmony import */


      var _fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./fetch */
      "2O0U");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "FetchTransport", function () {
        return _fetch__WEBPACK_IMPORTED_MODULE_1__["FetchTransport"];
      });
      /* harmony import */


      var _xhr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./xhr */
      "MT+3");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "XHRTransport", function () {
        return _xhr__WEBPACK_IMPORTED_MODULE_2__["XHRTransport"];
      }); //# sourceMappingURL=index.js.map

      /***/

    },

    /***/
    "nYR2":
    /*!*******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/finalize.js ***!
      \*******************************************************************/

    /*! exports provided: finalize */

    /***/
    function nYR2(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "finalize", function () {
        return finalize;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Subscription */
      "quSY");

      function finalize(callback) {
        return function (source) {
          return source.lift(new FinallyOperator(callback));
        };
      }

      var FinallyOperator = /*#__PURE__*/function () {
        function FinallyOperator(callback) {
          _classCallCheck(this, FinallyOperator);

          this.callback = callback;
        }

        _createClass2(FinallyOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new FinallySubscriber(subscriber, this.callback));
          }
        }]);

        return FinallyOperator;
      }();

      var FinallySubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_40) {
        _inherits(FinallySubscriber, _Subscriber__WEBPACK_40);

        var _super261 = _createSuper(FinallySubscriber);

        function FinallySubscriber(destination, callback) {
          var _this524;

          _classCallCheck(this, FinallySubscriber);

          _this524 = _super261.call(this, destination);

          _this524.add(new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](callback));

          return _this524;
        }

        return FinallySubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=finalize.js.map

      /***/

    },

    /***/
    "ngJS":
    /*!**********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToArray.js ***!
      \**********************************************************************/

    /*! exports provided: subscribeToArray */

    /***/
    function ngJS(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "subscribeToArray", function () {
        return subscribeToArray;
      });

      var subscribeToArray = function subscribeToArray(array) {
        return function (subscriber) {
          for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {
            subscriber.next(array[i]);
          }

          subscriber.complete();
        };
      }; //# sourceMappingURL=subscribeToArray.js.map

      /***/

    },

    /***/
    "nmNn":
    /*!********************************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/integrations/useragent.js ***!
      \********************************************************************/

    /*! exports provided: UserAgent */

    /***/
    function nmNn(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "UserAgent", function () {
        return UserAgent;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/core */
      "wBhU");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");

      var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["getGlobalObject"])();
      /** UserAgent */

      var UserAgent =
      /** @class */
      function () {
        function UserAgent() {
          /**
           * @inheritDoc
           */
          this.name = UserAgent.id;
        }
        /**
         * @inheritDoc
         */


        UserAgent.prototype.setupOnce = function () {
          Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["addGlobalEventProcessor"])(function (event) {
            var _a, _b, _c;

            if (Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])().getIntegration(UserAgent)) {
              // if none of the information we want exists, don't bother
              if (!global.navigator && !global.location && !global.document) {
                return event;
              } // grab as much info as exists and add it to the event


              var url = ((_a = event.request) === null || _a === void 0 ? void 0 : _a.url) || ((_b = global.location) === null || _b === void 0 ? void 0 : _b.href);
              var referrer = (global.document || {}).referrer;
              var userAgent = (global.navigator || {}).userAgent;
              var headers = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, (_c = event.request) === null || _c === void 0 ? void 0 : _c.headers), referrer && {
                Referer: referrer
              }), userAgent && {
                'User-Agent': userAgent
              });
              var request = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, url && {
                url: url
              }), {
                headers: headers
              });
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, event), {
                request: request
              });
            }

            return event;
          });
        };
        /**
         * @inheritDoc
         */


        UserAgent.id = 'UserAgent';
        return UserAgent;
      }(); //# sourceMappingURL=useragent.js.map

      /***/

    },

    /***/
    "oB13":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/multicast.js ***!
      \********************************************************************/

    /*! exports provided: multicast, MulticastOperator */

    /***/
    function oB13(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "multicast", function () {
        return multicast;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MulticastOperator", function () {
        return MulticastOperator;
      });
      /* harmony import */


      var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../observable/ConnectableObservable */
      "EQ5u");

      function multicast(subjectOrSubjectFactory, selector) {
        return function multicastOperatorFunction(source) {
          var subjectFactory;

          if (typeof subjectOrSubjectFactory === 'function') {
            subjectFactory = subjectOrSubjectFactory;
          } else {
            subjectFactory = function subjectFactory() {
              return subjectOrSubjectFactory;
            };
          }

          if (typeof selector === 'function') {
            return source.lift(new MulticastOperator(subjectFactory, selector));
          }

          var connectable = Object.create(source, _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__["connectableObservableDescriptor"]);
          connectable.source = source;
          connectable.subjectFactory = subjectFactory;
          return connectable;
        };
      }

      var MulticastOperator = /*#__PURE__*/function () {
        function MulticastOperator(subjectFactory, selector) {
          _classCallCheck(this, MulticastOperator);

          this.subjectFactory = subjectFactory;
          this.selector = selector;
        }

        _createClass2(MulticastOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            var selector = this.selector;
            var subject = this.subjectFactory();
            var subscription = selector(subject).subscribe(subscriber);
            subscription.add(source.subscribe(subject));
            return subscription;
          }
        }]);

        return MulticastOperator;
      }(); //# sourceMappingURL=multicast.js.map

      /***/

    },

    /***/
    "oMcV":
    /*!*****************************************************!*\
      !*** ./node_modules/@sentry/core/esm/baseclient.js ***!
      \*****************************************************/

    /*! exports provided: BaseClient */

    /***/
    function oMcV(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BaseClient", function () {
        return BaseClient;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_hub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/hub */
      "uzXi");
      /* harmony import */


      var _sentry_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/types */
      "PIsB");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _integration__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./integration */
      "METY");
      /* eslint-disable max-lines */


      var ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.";
      /**
       * Base implementation for all JavaScript SDK clients.
       *
       * Call the constructor with the corresponding backend constructor and options
       * specific to the client subclass. To access these options later, use
       * {@link Client.getOptions}. Also, the Backend instance is available via
       * {@link Client.getBackend}.
       *
       * If a Dsn is specified in the options, it will be parsed and stored. Use
       * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is
       * invalid, the constructor will throw a {@link SentryException}. Note that
       * without a valid Dsn, the SDK will not send any events to Sentry.
       *
       * Before sending an event via the backend, it is passed through
       * {@link BaseClient._prepareEvent} to add SDK information and scope data
       * (breadcrumbs and context). To add more custom information, override this
       * method and extend the resulting prepared event.
       *
       * To issue automatically created events (e.g. via instrumentation), use
       * {@link Client.captureEvent}. It will prepare the event and pass it through
       * the callback lifecycle. To issue auto-breadcrumbs, use
       * {@link Client.addBreadcrumb}.
       *
       * @example
       * class NodeClient extends BaseClient<NodeBackend, NodeOptions> {
       *   public constructor(options: NodeOptions) {
       *     super(NodeBackend, options);
       *   }
       *
       *   // ...
       * }
       */

      var BaseClient =
      /** @class */
      function () {
        /**
         * Initializes this client instance.
         *
         * @param backendClass A constructor function to create the backend.
         * @param options Options for the client.
         */
        function BaseClient(backendClass, options) {
          /** Array of used integrations. */
          this._integrations = {};
          /** Number of calls being processed */

          this._numProcessing = 0;
          this._backend = new backendClass(options);
          this._options = options;

          if (options.dsn) {
            this._dsn = new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["Dsn"](options.dsn);
          }
        }
        /**
         * @inheritDoc
         */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types


        BaseClient.prototype.captureException = function (exception, hint, scope) {
          var _this = this; // ensure we haven't captured this very object before


          if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["checkOrSetAlreadyCaught"])(exception)) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].log(ALREADY_SEEN_ERROR);

            return;
          }

          var eventId = hint && hint.event_id;

          this._process(this._getBackend().eventFromException(exception, hint).then(function (event) {
            return _this._captureEvent(event, hint, scope);
          }).then(function (result) {
            eventId = result;
          }));

          return eventId;
        };
        /**
         * @inheritDoc
         */


        BaseClient.prototype.captureMessage = function (message, level, hint, scope) {
          var _this = this;

          var eventId = hint && hint.event_id;
          var promisedEvent = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["isPrimitive"])(message) ? this._getBackend().eventFromMessage(String(message), level, hint) : this._getBackend().eventFromException(message, hint);

          this._process(promisedEvent.then(function (event) {
            return _this._captureEvent(event, hint, scope);
          }).then(function (result) {
            eventId = result;
          }));

          return eventId;
        };
        /**
         * @inheritDoc
         */


        BaseClient.prototype.captureEvent = function (event, hint, scope) {
          var _a; // ensure we haven't captured this very object before


          if (((_a = hint) === null || _a === void 0 ? void 0 : _a.originalException) && Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["checkOrSetAlreadyCaught"])(hint.originalException)) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].log(ALREADY_SEEN_ERROR);

            return;
          }

          var eventId = hint && hint.event_id;

          this._process(this._captureEvent(event, hint, scope).then(function (result) {
            eventId = result;
          }));

          return eventId;
        };
        /**
         * @inheritDoc
         */


        BaseClient.prototype.captureSession = function (session) {
          if (!this._isEnabled()) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].warn('SDK not enabled, will not capture session.');

            return;
          }

          if (!(typeof session.release === 'string')) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].warn('Discarded session because of missing or non-string release');
          } else {
            this._sendSession(session); // After sending, we set init false to indicate it's not the first occurrence


            session.update({
              init: false
            });
          }
        };
        /**
         * @inheritDoc
         */


        BaseClient.prototype.getDsn = function () {
          return this._dsn;
        };
        /**
         * @inheritDoc
         */


        BaseClient.prototype.getOptions = function () {
          return this._options;
        };
        /**
         * @inheritDoc
         */


        BaseClient.prototype.getTransport = function () {
          return this._getBackend().getTransport();
        };
        /**
         * @inheritDoc
         */


        BaseClient.prototype.flush = function (timeout) {
          var _this = this;

          return this._isClientDoneProcessing(timeout).then(function (clientFinished) {
            return _this.getTransport().close(timeout).then(function (transportFlushed) {
              return clientFinished && transportFlushed;
            });
          });
        };
        /**
         * @inheritDoc
         */


        BaseClient.prototype.close = function (timeout) {
          var _this = this;

          return this.flush(timeout).then(function (result) {
            _this.getOptions().enabled = false;
            return result;
          });
        };
        /**
         * Sets up the integrations
         */


        BaseClient.prototype.setupIntegrations = function () {
          if (this._isEnabled() && !this._integrations.initialized) {
            this._integrations = Object(_integration__WEBPACK_IMPORTED_MODULE_4__["setupIntegrations"])(this._options);
          }
        };
        /**
         * @inheritDoc
         */


        BaseClient.prototype.getIntegration = function (integration) {
          try {
            return this._integrations[integration.id] || null;
          } catch (_oO) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].warn("Cannot retrieve integration " + integration.id + " from the current Client");

            return null;
          }
        };
        /** Updates existing session based on the provided event */


        BaseClient.prototype._updateSessionFromEvent = function (session, event) {
          var e_1, _a;

          var crashed = false;
          var errored = false;
          var exceptions = event.exception && event.exception.values;

          if (exceptions) {
            errored = true;

            try {
              for (var exceptions_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(exceptions), exceptions_1_1 = exceptions_1.next(); !exceptions_1_1.done; exceptions_1_1 = exceptions_1.next()) {
                var ex = exceptions_1_1.value;
                var mechanism = ex.mechanism;

                if (mechanism && mechanism.handled === false) {
                  crashed = true;
                  break;
                }
              }
            } catch (e_1_1) {
              e_1 = {
                error: e_1_1
              };
            } finally {
              try {
                if (exceptions_1_1 && !exceptions_1_1.done && (_a = exceptions_1["return"])) _a.call(exceptions_1);
              } finally {
                if (e_1) throw e_1.error;
              }
            }
          } // A session is updated and that session update is sent in only one of the two following scenarios:
          // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update
          // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update


          var sessionNonTerminal = session.status === _sentry_types__WEBPACK_IMPORTED_MODULE_2__["SessionStatus"].Ok;
          var shouldUpdateAndSend = sessionNonTerminal && session.errors === 0 || sessionNonTerminal && crashed;

          if (shouldUpdateAndSend) {
            session.update(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, crashed && {
              status: _sentry_types__WEBPACK_IMPORTED_MODULE_2__["SessionStatus"].Crashed
            }), {
              errors: session.errors || Number(errored || crashed)
            }));
            this.captureSession(session);
          }
        };
        /** Deliver captured session to Sentry */


        BaseClient.prototype._sendSession = function (session) {
          this._getBackend().sendSession(session);
        };
        /**
         * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying
         * "no" (resolving to `false`) in order to give the client a chance to potentially finish first.
         *
         * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not
         * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to
         * `true`.
         * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and
         * `false` otherwise
         */


        BaseClient.prototype._isClientDoneProcessing = function (timeout) {
          var _this = this;

          return new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SyncPromise"](function (resolve) {
            var ticked = 0;
            var tick = 1;
            var interval = setInterval(function () {
              if (_this._numProcessing == 0) {
                clearInterval(interval);
                resolve(true);
              } else {
                ticked += tick;

                if (timeout && ticked >= timeout) {
                  clearInterval(interval);
                  resolve(false);
                }
              }
            }, tick);
          });
        };
        /** Returns the current backend. */


        BaseClient.prototype._getBackend = function () {
          return this._backend;
        };
        /** Determines whether this SDK is enabled and a valid Dsn is present. */


        BaseClient.prototype._isEnabled = function () {
          return this.getOptions().enabled !== false && this._dsn !== undefined;
        };
        /**
         * Adds common information to events.
         *
         * The information includes release and environment from `options`,
         * breadcrumbs and context (extra, tags and user) from the scope.
         *
         * Information that is already present in the event is never overwritten. For
         * nested objects, such as the context, keys are merged.
         *
         * @param event The original event.
         * @param hint May contain additional information about the original exception.
         * @param scope A scope containing event metadata.
         * @returns A new event with more information.
         */


        BaseClient.prototype._prepareEvent = function (event, scope, hint) {
          var _this = this;

          var _a = this.getOptions().normalizeDepth,
              normalizeDepth = _a === void 0 ? 3 : _a;
          var prepared = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, event), {
            event_id: event.event_id || (hint && hint.event_id ? hint.event_id : Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["uuid4"])()),
            timestamp: event.timestamp || Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["dateTimestampInSeconds"])()
          });

          this._applyClientOptions(prepared);

          this._applyIntegrationsMetadata(prepared); // If we have scope given to us, use it as the base for further modifications.
          // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.


          var finalScope = scope;

          if (hint && hint.captureContext) {
            finalScope = _sentry_hub__WEBPACK_IMPORTED_MODULE_1__["Scope"].clone(finalScope).update(hint.captureContext);
          } // We prepare the result here with a resolved Event.


          var result = _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SyncPromise"].resolve(prepared); // This should be the last thing called, since we want that
          // {@link Hub.addEventProcessor} gets the finished prepared event.


          if (finalScope) {
            // In case we have a hub we reassign it.
            result = finalScope.applyToEvent(prepared, hint);
          }

          return result.then(function (evt) {
            if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {
              return _this._normalizeEvent(evt, normalizeDepth);
            }

            return evt;
          });
        };
        /**
         * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.
         * Normalized keys:
         * - `breadcrumbs.data`
         * - `user`
         * - `contexts`
         * - `extra`
         * @param event Event
         * @returns Normalized event
         */


        BaseClient.prototype._normalizeEvent = function (event, depth) {
          if (!event) {
            return null;
          }

          var normalized = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, event), event.breadcrumbs && {
            breadcrumbs: event.breadcrumbs.map(function (b) {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, b), b.data && {
                data: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["normalize"])(b.data, depth)
              });
            })
          }), event.user && {
            user: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["normalize"])(event.user, depth)
          }), event.contexts && {
            contexts: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["normalize"])(event.contexts, depth)
          }), event.extra && {
            extra: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["normalize"])(event.extra, depth)
          }); // event.contexts.trace stores information about a Transaction. Similarly,
          // event.spans[] stores information about child Spans. Given that a
          // Transaction is conceptually a Span, normalization should apply to both
          // Transactions and Spans consistently.
          // For now the decision is to skip normalization of Transactions and Spans,
          // so this block overwrites the normalized event to add back the original
          // Transaction information prior to normalization.

          if (event.contexts && event.contexts.trace) {
            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
            normalized.contexts.trace = event.contexts.trace;
          }

          var _a = this.getOptions()._experiments,
              _experiments = _a === void 0 ? {} : _a;

          if (_experiments.ensureNoCircularStructures) {
            return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["normalize"])(normalized);
          }

          return normalized;
        };
        /**
         *  Enhances event using the client configuration.
         *  It takes care of all "static" values like environment, release and `dist`,
         *  as well as truncating overly long values.
         * @param event event instance to be enhanced
         */


        BaseClient.prototype._applyClientOptions = function (event) {
          var options = this.getOptions();
          var environment = options.environment,
              release = options.release,
              dist = options.dist,
              _a = options.maxValueLength,
              maxValueLength = _a === void 0 ? 250 : _a;

          if (!('environment' in event)) {
            event.environment = 'environment' in options ? environment : 'production';
          }

          if (event.release === undefined && release !== undefined) {
            event.release = release;
          }

          if (event.dist === undefined && dist !== undefined) {
            event.dist = dist;
          }

          if (event.message) {
            event.message = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["truncate"])(event.message, maxValueLength);
          }

          var exception = event.exception && event.exception.values && event.exception.values[0];

          if (exception && exception.value) {
            exception.value = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["truncate"])(exception.value, maxValueLength);
          }

          var request = event.request;

          if (request && request.url) {
            request.url = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["truncate"])(request.url, maxValueLength);
          }
        };
        /**
         * This function adds all used integrations to the SDK info in the event.
         * @param event The event that will be filled with all integrations.
         */


        BaseClient.prototype._applyIntegrationsMetadata = function (event) {
          var integrationsArray = Object.keys(this._integrations);

          if (integrationsArray.length > 0) {
            event.sdk = event.sdk || {};
            event.sdk.integrations = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(event.sdk.integrations || [], integrationsArray);
          }
        };
        /**
         * Tells the backend to send this event
         * @param event The Sentry event to send
         */


        BaseClient.prototype._sendEvent = function (event) {
          this._getBackend().sendEvent(event);
        };
        /**
         * Processes the event and logs an error in case of rejection
         * @param event
         * @param hint
         * @param scope
         */


        BaseClient.prototype._captureEvent = function (event, hint, scope) {
          return this._processEvent(event, hint, scope).then(function (finalEvent) {
            return finalEvent.event_id;
          }, function (reason) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["logger"].error(reason);

            return undefined;
          });
        };
        /**
         * Processes an event (either error or message) and sends it to Sentry.
         *
         * This also adds breadcrumbs and context information to the event. However,
         * platform specific meta data (such as the User's IP address) must be added
         * by the SDK implementor.
         *
         *
         * @param event The event to send to Sentry.
         * @param hint May contain additional information about the original exception.
         * @param scope A scope containing event metadata.
         * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
         */


        BaseClient.prototype._processEvent = function (event, hint, scope) {
          var _this = this;

          var _a, _b; // eslint-disable-next-line @typescript-eslint/unbound-method


          var _c = this.getOptions(),
              beforeSend = _c.beforeSend,
              sampleRate = _c.sampleRate;

          var transport = this.getTransport();

          if (!this._isEnabled()) {
            return _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SyncPromise"].reject(new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SentryError"]('SDK not enabled, will not capture event.'));
          }

          var isTransaction = event.type === 'transaction'; // 1.0 === 100% events are sent
          // 0.0 === 0% events are sent
          // Sampling for transaction happens somewhere else

          if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {
            (_b = (_a = transport).recordLostEvent) === null || _b === void 0 ? void 0 : _b.call(_a, _sentry_types__WEBPACK_IMPORTED_MODULE_2__["Outcome"].SampleRate, 'event');
            return _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SyncPromise"].reject(new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SentryError"]("Discarding event because it's not included in the random sample (sampling rate = " + sampleRate + ")"));
          }

          return this._prepareEvent(event, scope, hint).then(function (prepared) {
            var _a, _b;

            if (prepared === null) {
              (_b = (_a = transport).recordLostEvent) === null || _b === void 0 ? void 0 : _b.call(_a, _sentry_types__WEBPACK_IMPORTED_MODULE_2__["Outcome"].EventProcessor, event.type || 'event');
              throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SentryError"]('An event processor returned null, will not send event.');
            }

            var isInternalException = hint && hint.data && hint.data.__sentry__ === true;

            if (isInternalException || isTransaction || !beforeSend) {
              return prepared;
            }

            var beforeSendResult = beforeSend(prepared, hint);
            return _this._ensureBeforeSendRv(beforeSendResult);
          }).then(function (processedEvent) {
            var _a, _b;

            if (processedEvent === null) {
              (_b = (_a = transport).recordLostEvent) === null || _b === void 0 ? void 0 : _b.call(_a, _sentry_types__WEBPACK_IMPORTED_MODULE_2__["Outcome"].BeforeSend, event.type || 'event');
              throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SentryError"]('`beforeSend` returned `null`, will not send event.');
            }

            var session = scope && scope.getSession && scope.getSession();

            if (!isTransaction && session) {
              _this._updateSessionFromEvent(session, processedEvent);
            }

            _this._sendEvent(processedEvent);

            return processedEvent;
          }).then(null, function (reason) {
            if (reason instanceof _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SentryError"]) {
              throw reason;
            }

            _this.captureException(reason, {
              data: {
                __sentry__: true
              },
              originalException: reason
            });

            throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SentryError"]("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: " + reason);
          });
        };
        /**
         * Occupies the client with processing and event
         */


        BaseClient.prototype._process = function (promise) {
          var _this = this;

          this._numProcessing += 1;
          void promise.then(function (value) {
            _this._numProcessing -= 1;
            return value;
          }, function (reason) {
            _this._numProcessing -= 1;
            return reason;
          });
        };
        /**
         * Verifies that return value of configured `beforeSend` is of expected type.
         */


        BaseClient.prototype._ensureBeforeSendRv = function (rv) {
          var nullErr = '`beforeSend` method has to return `null` or a valid event.';

          if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["isThenable"])(rv)) {
            return rv.then(function (event) {
              if (!(Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["isPlainObject"])(event) || event === null)) {
                throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SentryError"](nullErr);
              }

              return event;
            }, function (e) {
              throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SentryError"]("beforeSend rejected with " + e);
            });
          } else if (!(Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["isPlainObject"])(rv) || rv === null)) {
            throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__["SentryError"](nullErr);
          }

          return rv;
        };

        return BaseClient;
      }(); //# sourceMappingURL=baseclient.js.map

      /***/

    },

    /***/
    "ofXK":
    /*!**********************************************************************!*\
      !*** ./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js ***!
      \**********************************************************************/

    /*! exports provided: APP_BASE_HREF, AsyncPipe, CommonModule, CurrencyPipe, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PathLocationStrategy, PercentPipe, PlatformLocation, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, VERSION, ViewportScroller, WeekDay, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi, registerLocaleData, ɵBrowserPlatformLocation, ɵDomAdapter, ɵNullViewportScroller, ɵPLATFORM_BROWSER_ID, ɵPLATFORM_SERVER_ID, ɵPLATFORM_WORKER_APP_ID, ɵPLATFORM_WORKER_UI_ID, ɵangular_packages_common_common_a, ɵangular_packages_common_common_b, ɵangular_packages_common_common_c, ɵangular_packages_common_common_d, ɵangular_packages_common_common_e, ɵangular_packages_common_common_f, ɵgetDOM, ɵparseCookieValue, ɵsetRootDomAdapter */

    /***/
    function ofXK(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "APP_BASE_HREF", function () {
        return APP_BASE_HREF;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AsyncPipe", function () {
        return AsyncPipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CommonModule", function () {
        return CommonModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CurrencyPipe", function () {
        return CurrencyPipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DOCUMENT", function () {
        return DOCUMENT;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DatePipe", function () {
        return DatePipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DecimalPipe", function () {
        return DecimalPipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormStyle", function () {
        return FormStyle;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormatWidth", function () {
        return FormatWidth;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HashLocationStrategy", function () {
        return HashLocationStrategy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "I18nPluralPipe", function () {
        return I18nPluralPipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "I18nSelectPipe", function () {
        return I18nSelectPipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "JsonPipe", function () {
        return JsonPipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "KeyValuePipe", function () {
        return KeyValuePipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LOCATION_INITIALIZED", function () {
        return LOCATION_INITIALIZED;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Location", function () {
        return Location;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LocationStrategy", function () {
        return LocationStrategy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LowerCasePipe", function () {
        return LowerCasePipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgClass", function () {
        return NgClass;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgComponentOutlet", function () {
        return NgComponentOutlet;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgForOf", function () {
        return NgForOf;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgForOfContext", function () {
        return NgForOfContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgIf", function () {
        return NgIf;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgIfContext", function () {
        return NgIfContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgLocaleLocalization", function () {
        return NgLocaleLocalization;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgLocalization", function () {
        return NgLocalization;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgPlural", function () {
        return NgPlural;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgPluralCase", function () {
        return NgPluralCase;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgStyle", function () {
        return NgStyle;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgSwitch", function () {
        return NgSwitch;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgSwitchCase", function () {
        return NgSwitchCase;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgSwitchDefault", function () {
        return NgSwitchDefault;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NgTemplateOutlet", function () {
        return NgTemplateOutlet;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NumberFormatStyle", function () {
        return NumberFormatStyle;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NumberSymbol", function () {
        return NumberSymbol;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PathLocationStrategy", function () {
        return PathLocationStrategy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PercentPipe", function () {
        return PercentPipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PlatformLocation", function () {
        return PlatformLocation;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Plural", function () {
        return Plural;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SlicePipe", function () {
        return SlicePipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TitleCasePipe", function () {
        return TitleCasePipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TranslationWidth", function () {
        return TranslationWidth;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "UpperCasePipe", function () {
        return UpperCasePipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VERSION", function () {
        return VERSION;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ViewportScroller", function () {
        return ViewportScroller;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "WeekDay", function () {
        return WeekDay;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "formatCurrency", function () {
        return formatCurrency;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "formatDate", function () {
        return formatDate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "formatNumber", function () {
        return formatNumber;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "formatPercent", function () {
        return formatPercent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getCurrencySymbol", function () {
        return getCurrencySymbol;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleCurrencyCode", function () {
        return getLocaleCurrencyCode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleCurrencyName", function () {
        return getLocaleCurrencyName;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleCurrencySymbol", function () {
        return getLocaleCurrencySymbol;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleDateFormat", function () {
        return getLocaleDateFormat;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleDateTimeFormat", function () {
        return getLocaleDateTimeFormat;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleDayNames", function () {
        return getLocaleDayNames;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleDayPeriods", function () {
        return getLocaleDayPeriods;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleDirection", function () {
        return getLocaleDirection;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleEraNames", function () {
        return getLocaleEraNames;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleExtraDayPeriodRules", function () {
        return getLocaleExtraDayPeriodRules;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleExtraDayPeriods", function () {
        return getLocaleExtraDayPeriods;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleFirstDayOfWeek", function () {
        return getLocaleFirstDayOfWeek;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleId", function () {
        return getLocaleId;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleMonthNames", function () {
        return getLocaleMonthNames;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleNumberFormat", function () {
        return getLocaleNumberFormat;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleNumberSymbol", function () {
        return getLocaleNumberSymbol;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocalePluralCase", function () {
        return getLocalePluralCase;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleTimeFormat", function () {
        return getLocaleTimeFormat;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocaleWeekEndRange", function () {
        return getLocaleWeekEndRange;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getNumberOfCurrencyDigits", function () {
        return getNumberOfCurrencyDigits;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isPlatformBrowser", function () {
        return isPlatformBrowser;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isPlatformServer", function () {
        return isPlatformServer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isPlatformWorkerApp", function () {
        return isPlatformWorkerApp;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isPlatformWorkerUi", function () {
        return isPlatformWorkerUi;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "registerLocaleData", function () {
        return registerLocaleData;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵBrowserPlatformLocation", function () {
        return BrowserPlatformLocation;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵDomAdapter", function () {
        return DomAdapter;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵNullViewportScroller", function () {
        return NullViewportScroller;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_BROWSER_ID", function () {
        return PLATFORM_BROWSER_ID;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_SERVER_ID", function () {
        return PLATFORM_SERVER_ID;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_WORKER_APP_ID", function () {
        return PLATFORM_WORKER_APP_ID;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_WORKER_UI_ID", function () {
        return PLATFORM_WORKER_UI_ID;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_a", function () {
        return useBrowserPlatformLocation;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_b", function () {
        return createBrowserPlatformLocation;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_c", function () {
        return createLocation;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_d", function () {
        return provideLocationStrategy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_e", function () {
        return COMMON_DIRECTIVES;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_f", function () {
        return COMMON_PIPES;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵgetDOM", function () {
        return getDOM;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵparseCookieValue", function () {
        return parseCookieValue;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵsetRootDomAdapter", function () {
        return setRootDomAdapter;
      });
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /**
       * @license Angular v11.0.9
       * (c) 2010-2020 Google LLC. https://angular.io/
       * License: MIT
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _DOM = null;

      function getDOM() {
        return _DOM;
      }

      function setDOM(adapter) {
        _DOM = adapter;
      }

      function setRootDomAdapter(adapter) {
        if (!_DOM) {
          _DOM = adapter;
        }
      }
      /* tslint:disable:requireParameterType */

      /**
       * Provides DOM operations in an environment-agnostic way.
       *
       * @security Tread carefully! Interacting with the DOM directly is dangerous and
       * can introduce XSS risks.
       */


      var DomAdapter = function DomAdapter() {
        _classCallCheck(this, DomAdapter);
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A DI Token representing the main rendering context. In a browser this is the DOM Document.
       *
       * Note: Document might not be available in the Application Context when Application and Rendering
       * Contexts are not the same (e.g. when running the application in a Web Worker).
       *
       * @publicApi
       */


      var DOCUMENT = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('DocumentToken');
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * This class should not be used directly by an application developer. Instead, use
       * {@link Location}.
       *
       * `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be
       * platform-agnostic.
       * This means that we can have different implementation of `PlatformLocation` for the different
       * platforms that Angular supports. For example, `@angular/platform-browser` provides an
       * implementation specific to the browser environment, while `@angular/platform-server` provides
       * one suitable for use with server-side rendering.
       *
       * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}
       * when they need to interact with the DOM APIs like pushState, popState, etc.
       *
       * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly
       * by the {@link Router} in order to navigate between routes. Since all interactions between {@link
       * Router} /
       * {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation`
       * class, they are all platform-agnostic.
       *
       * @publicApi
       */

      var PlatformLocation = function PlatformLocation() {
        _classCallCheck(this, PlatformLocation);
      };

      PlatformLocation.ɵfac = function PlatformLocation_Factory(t) {
        return new (t || PlatformLocation)();
      };

      PlatformLocation.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({
        factory: useBrowserPlatformLocation,
        token: PlatformLocation,
        providedIn: "platform"
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PlatformLocation, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"],
          args: [{
            providedIn: 'platform',
            // See #23917
            useFactory: useBrowserPlatformLocation
          }]
        }], null, null);
      })();

      function useBrowserPlatformLocation() {
        return Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(BrowserPlatformLocation);
      }
      /**
       * @description
       * Indicates when a location is initialized.
       *
       * @publicApi
       */


      var LOCATION_INITIALIZED = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('Location Initialized');
      /**
       * `PlatformLocation` encapsulates all of the direct calls to platform APIs.
       * This class should not be used directly by an application developer. Instead, use
       * {@link Location}.
       */

      var BrowserPlatformLocation = /*#__PURE__*/function (_PlatformLocation) {
        _inherits(BrowserPlatformLocation, _PlatformLocation);

        var _super262 = _createSuper(BrowserPlatformLocation);

        function BrowserPlatformLocation(_doc) {
          var _this525;

          _classCallCheck(this, BrowserPlatformLocation);

          _this525 = _super262.call(this);
          _this525._doc = _doc;

          _this525._init();

          return _this525;
        } // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it

        /** @internal */


        _createClass2(BrowserPlatformLocation, [{
          key: "_init",
          value: function _init() {
            this.location = getDOM().getLocation();
            this._history = getDOM().getHistory();
          }
        }, {
          key: "getBaseHrefFromDOM",
          value: function getBaseHrefFromDOM() {
            return getDOM().getBaseHref(this._doc);
          }
        }, {
          key: "onPopState",
          value: function onPopState(fn) {
            getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('popstate', fn, false);
          }
        }, {
          key: "onHashChange",
          value: function onHashChange(fn) {
            getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('hashchange', fn, false);
          }
        }, {
          key: "href",
          get: function get() {
            return this.location.href;
          }
        }, {
          key: "protocol",
          get: function get() {
            return this.location.protocol;
          }
        }, {
          key: "hostname",
          get: function get() {
            return this.location.hostname;
          }
        }, {
          key: "port",
          get: function get() {
            return this.location.port;
          }
        }, {
          key: "pathname",
          get: function get() {
            return this.location.pathname;
          },
          set: function set(newPath) {
            this.location.pathname = newPath;
          }
        }, {
          key: "search",
          get: function get() {
            return this.location.search;
          }
        }, {
          key: "hash",
          get: function get() {
            return this.location.hash;
          }
        }, {
          key: "pushState",
          value: function pushState(state, title, url) {
            if (supportsState()) {
              this._history.pushState(state, title, url);
            } else {
              this.location.hash = url;
            }
          }
        }, {
          key: "replaceState",
          value: function replaceState(state, title, url) {
            if (supportsState()) {
              this._history.replaceState(state, title, url);
            } else {
              this.location.hash = url;
            }
          }
        }, {
          key: "forward",
          value: function forward() {
            this._history.forward();
          }
        }, {
          key: "back",
          value: function back() {
            this._history.back();
          }
        }, {
          key: "getState",
          value: function getState() {
            return this._history.state;
          }
        }]);

        return BrowserPlatformLocation;
      }(PlatformLocation);

      BrowserPlatformLocation.ɵfac = function BrowserPlatformLocation_Factory(t) {
        return new (t || BrowserPlatformLocation)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](DOCUMENT));
      };

      BrowserPlatformLocation.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({
        factory: createBrowserPlatformLocation,
        token: BrowserPlatformLocation,
        providedIn: "platform"
      });

      BrowserPlatformLocation.ctorParameters = function () {
        return [{
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [DOCUMENT]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](BrowserPlatformLocation, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"],
          args: [{
            providedIn: 'platform',
            // See #23917
            useFactory: createBrowserPlatformLocation
          }]
        }], function () {
          return [{
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [DOCUMENT]
            }]
          }];
        }, null);
      })();

      function supportsState() {
        return !!window.history.pushState;
      }

      function createBrowserPlatformLocation() {
        return new BrowserPlatformLocation(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(DOCUMENT));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Joins two parts of a URL with a slash if needed.
       *
       * @param start  URL string
       * @param end    URL string
       *
       *
       * @returns The joined URL string.
       */


      function joinWithSlash(start, end) {
        if (start.length == 0) {
          return end;
        }

        if (end.length == 0) {
          return start;
        }

        var slashes = 0;

        if (start.endsWith('/')) {
          slashes++;
        }

        if (end.startsWith('/')) {
          slashes++;
        }

        if (slashes == 2) {
          return start + end.substring(1);
        }

        if (slashes == 1) {
          return start + end;
        }

        return start + '/' + end;
      }
      /**
       * Removes a trailing slash from a URL string if needed.
       * Looks for the first occurrence of either `#`, `?`, or the end of the
       * line as `/` characters and removes the trailing slash if one exists.
       *
       * @param url URL string.
       *
       * @returns The URL string, modified if needed.
       */


      function stripTrailingSlash(url) {
        var match = url.match(/#|\?|$/);
        var pathEndIdx = match && match.index || url.length;
        var droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);
        return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);
      }
      /**
       * Normalizes URL parameters by prepending with `?` if needed.
       *
       * @param  params String of URL parameters.
       *
       * @returns The normalized URL parameters string.
       */


      function normalizeQueryParams(params) {
        return params && params[0] !== '?' ? '?' + params : params;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Enables the `Location` service to read route state from the browser's URL.
       * Angular provides two strategies:
       * `HashLocationStrategy` and `PathLocationStrategy`.
       *
       * Applications should use the `Router` or `Location` services to
       * interact with application route state.
       *
       * For instance, `HashLocationStrategy` produces URLs like
       * <code class="no-auto-link">http://example.com#/foo</code>,
       * and `PathLocationStrategy` produces
       * <code class="no-auto-link">http://example.com/foo</code> as an equivalent URL.
       *
       * See these two classes for more.
       *
       * @publicApi
       */


      var LocationStrategy = function LocationStrategy() {
        _classCallCheck(this, LocationStrategy);
      };

      LocationStrategy.ɵfac = function LocationStrategy_Factory(t) {
        return new (t || LocationStrategy)();
      };

      LocationStrategy.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({
        factory: provideLocationStrategy,
        token: LocationStrategy,
        providedIn: "root"
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LocationStrategy, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"],
          args: [{
            providedIn: 'root',
            useFactory: provideLocationStrategy
          }]
        }], null, null);
      })();

      function provideLocationStrategy(platformLocation) {
        // See #23917
        var location = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(DOCUMENT).location;
        return new PathLocationStrategy(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(PlatformLocation), location && location.origin || '');
      }
      /**
       * A predefined [DI token](guide/glossary#di-token) for the base href
       * to be used with the `PathLocationStrategy`.
       * The base href is the URL prefix that should be preserved when generating
       * and recognizing URLs.
       *
       * @usageNotes
       *
       * The following example shows how to use this token to configure the root app injector
       * with a base href value, so that the DI framework can supply the dependency anywhere in the app.
       *
       * ```typescript
       * import {Component, NgModule} from '@angular/core';
       * import {APP_BASE_HREF} from '@angular/common';
       *
       * @NgModule({
       *   providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]
       * })
       * class AppModule {}
       * ```
       *
       * @publicApi
       */


      var APP_BASE_HREF = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('appBaseHref');
      /**
       * @description
       * A {@link LocationStrategy} used to configure the {@link Location} service to
       * represent its state in the
       * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the
       * browser's URL.
       *
       * If you're using `PathLocationStrategy`, you must provide a {@link APP_BASE_HREF}
       * or add a `<base href>` element to the document.
       *
       * For instance, if you provide an `APP_BASE_HREF` of `'/my/app/'` and call
       * `location.go('/foo')`, the browser's URL will become
       * `example.com/my/app/foo`. To ensure all relative URIs resolve correctly,
       * the `<base href>` and/or `APP_BASE_HREF` should end with a `/`.
       *
       * Similarly, if you add `<base href='/my/app/'/>` to the document and call
       * `location.go('/foo')`, the browser's URL will become
       * `example.com/my/app/foo`.
       *
       * Note that when using `PathLocationStrategy`, neither the query nor
       * the fragment in the `<base href>` will be preserved, as outlined
       * by the [RFC](https://tools.ietf.org/html/rfc3986#section-5.2.2).
       *
       * @usageNotes
       *
       * ### Example
       *
       * {@example common/location/ts/path_location_component.ts region='LocationComponent'}
       *
       * @publicApi
       */

      var PathLocationStrategy = /*#__PURE__*/function (_LocationStrategy) {
        _inherits(PathLocationStrategy, _LocationStrategy);

        var _super263 = _createSuper(PathLocationStrategy);

        function PathLocationStrategy(_platformLocation, href) {
          var _this526;

          _classCallCheck(this, PathLocationStrategy);

          _this526 = _super263.call(this);
          _this526._platformLocation = _platformLocation;

          if (href == null) {
            href = _this526._platformLocation.getBaseHrefFromDOM();
          }

          if (href == null) {
            throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");
          }

          _this526._baseHref = href;
          return _this526;
        }

        _createClass2(PathLocationStrategy, [{
          key: "onPopState",
          value: function onPopState(fn) {
            this._platformLocation.onPopState(fn);

            this._platformLocation.onHashChange(fn);
          }
        }, {
          key: "getBaseHref",
          value: function getBaseHref() {
            return this._baseHref;
          }
        }, {
          key: "prepareExternalUrl",
          value: function prepareExternalUrl(internal) {
            return joinWithSlash(this._baseHref, internal);
          }
        }, {
          key: "path",
          value: function path() {
            var includeHash = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
            var pathname = this._platformLocation.pathname + normalizeQueryParams(this._platformLocation.search);
            var hash = this._platformLocation.hash;
            return hash && includeHash ? "".concat(pathname).concat(hash) : pathname;
          }
        }, {
          key: "pushState",
          value: function pushState(state, title, url, queryParams) {
            var externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));

            this._platformLocation.pushState(state, title, externalUrl);
          }
        }, {
          key: "replaceState",
          value: function replaceState(state, title, url, queryParams) {
            var externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));

            this._platformLocation.replaceState(state, title, externalUrl);
          }
        }, {
          key: "forward",
          value: function forward() {
            this._platformLocation.forward();
          }
        }, {
          key: "back",
          value: function back() {
            this._platformLocation.back();
          }
        }]);

        return PathLocationStrategy;
      }(LocationStrategy);

      PathLocationStrategy.ɵfac = function PathLocationStrategy_Factory(t) {
        return new (t || PathLocationStrategy)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PlatformLocation), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](APP_BASE_HREF, 8));
      };

      PathLocationStrategy.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: PathLocationStrategy,
        factory: PathLocationStrategy.ɵfac
      });

      PathLocationStrategy.ctorParameters = function () {
        return [{
          type: PlatformLocation
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [APP_BASE_HREF]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PathLocationStrategy, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], function () {
          return [{
            type: PlatformLocation
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [APP_BASE_HREF]
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description
       * A {@link LocationStrategy} used to configure the {@link Location} service to
       * represent its state in the
       * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)
       * of the browser's URL.
       *
       * For instance, if you call `location.go('/foo')`, the browser's URL will become
       * `example.com#/foo`.
       *
       * @usageNotes
       *
       * ### Example
       *
       * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}
       *
       * @publicApi
       */


      var HashLocationStrategy = /*#__PURE__*/function (_LocationStrategy2) {
        _inherits(HashLocationStrategy, _LocationStrategy2);

        var _super264 = _createSuper(HashLocationStrategy);

        function HashLocationStrategy(_platformLocation, _baseHref) {
          var _this527;

          _classCallCheck(this, HashLocationStrategy);

          _this527 = _super264.call(this);
          _this527._platformLocation = _platformLocation;
          _this527._baseHref = '';

          if (_baseHref != null) {
            _this527._baseHref = _baseHref;
          }

          return _this527;
        }

        _createClass2(HashLocationStrategy, [{
          key: "onPopState",
          value: function onPopState(fn) {
            this._platformLocation.onPopState(fn);

            this._platformLocation.onHashChange(fn);
          }
        }, {
          key: "getBaseHref",
          value: function getBaseHref() {
            return this._baseHref;
          }
        }, {
          key: "path",
          value: function path() {
            var includeHash = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
            // the hash value is always prefixed with a `#`
            // and if it is empty then it will stay empty
            var path = this._platformLocation.hash;
            if (path == null) path = '#';
            return path.length > 0 ? path.substring(1) : path;
          }
        }, {
          key: "prepareExternalUrl",
          value: function prepareExternalUrl(internal) {
            var url = joinWithSlash(this._baseHref, internal);
            return url.length > 0 ? '#' + url : url;
          }
        }, {
          key: "pushState",
          value: function pushState(state, title, path, queryParams) {
            var url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));

            if (url.length == 0) {
              url = this._platformLocation.pathname;
            }

            this._platformLocation.pushState(state, title, url);
          }
        }, {
          key: "replaceState",
          value: function replaceState(state, title, path, queryParams) {
            var url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));

            if (url.length == 0) {
              url = this._platformLocation.pathname;
            }

            this._platformLocation.replaceState(state, title, url);
          }
        }, {
          key: "forward",
          value: function forward() {
            this._platformLocation.forward();
          }
        }, {
          key: "back",
          value: function back() {
            this._platformLocation.back();
          }
        }]);

        return HashLocationStrategy;
      }(LocationStrategy);

      HashLocationStrategy.ɵfac = function HashLocationStrategy_Factory(t) {
        return new (t || HashLocationStrategy)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PlatformLocation), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](APP_BASE_HREF, 8));
      };

      HashLocationStrategy.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: HashLocationStrategy,
        factory: HashLocationStrategy.ɵfac
      });

      HashLocationStrategy.ctorParameters = function () {
        return [{
          type: PlatformLocation
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [APP_BASE_HREF]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HashLocationStrategy, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], function () {
          return [{
            type: PlatformLocation
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [APP_BASE_HREF]
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description
       *
       * A service that applications can use to interact with a browser's URL.
       *
       * Depending on the `LocationStrategy` used, `Location` persists
       * to the URL's path or the URL's hash segment.
       *
       * @usageNotes
       *
       * It's better to use the `Router#navigate` service to trigger route changes. Use
       * `Location` only if you need to interact with or create normalized URLs outside of
       * routing.
       *
       * `Location` is responsible for normalizing the URL against the application's base href.
       * A normalized URL is absolute from the URL host, includes the application's base href, and has no
       * trailing slash:
       * - `/my/app/user/123` is normalized
       * - `my/app/user/123` **is not** normalized
       * - `/my/app/user/123/` **is not** normalized
       *
       * ### Example
       *
       * <code-example path='common/location/ts/path_location_component.ts'
       * region='LocationComponent'></code-example>
       *
       * @publicApi
       */


      var Location = /*#__PURE__*/function () {
        function Location(platformStrategy, platformLocation) {
          var _this528 = this;

          _classCallCheck(this, Location);

          /** @internal */
          this._subject = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          /** @internal */

          this._urlChangeListeners = [];
          this._platformStrategy = platformStrategy;

          var browserBaseHref = this._platformStrategy.getBaseHref();

          this._platformLocation = platformLocation;
          this._baseHref = stripTrailingSlash(_stripIndexHtml(browserBaseHref));

          this._platformStrategy.onPopState(function (ev) {
            _this528._subject.emit({
              'url': _this528.path(true),
              'pop': true,
              'state': ev.state,
              'type': ev.type
            });
          });
        }
        /**
         * Normalizes the URL path for this location.
         *
         * @param includeHash True to include an anchor fragment in the path.
         *
         * @returns The normalized URL path.
         */
        // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is
        // removed.


        _createClass2(Location, [{
          key: "path",
          value: function path() {
            var includeHash = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
            return this.normalize(this._platformStrategy.path(includeHash));
          }
          /**
           * Reports the current state of the location history.
           * @returns The current value of the `history.state` object.
           */

        }, {
          key: "getState",
          value: function getState() {
            return this._platformLocation.getState();
          }
          /**
           * Normalizes the given path and compares to the current normalized path.
           *
           * @param path The given URL path.
           * @param query Query parameters.
           *
           * @returns True if the given URL path is equal to the current normalized path, false
           * otherwise.
           */

        }, {
          key: "isCurrentPathEqualTo",
          value: function isCurrentPathEqualTo(path) {
            var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
            return this.path() == this.normalize(path + normalizeQueryParams(query));
          }
          /**
           * Normalizes a URL path by stripping any trailing slashes.
           *
           * @param url String representing a URL.
           *
           * @returns The normalized URL string.
           */

        }, {
          key: "normalize",
          value: function normalize(url) {
            return Location.stripTrailingSlash(_stripBaseHref(this._baseHref, _stripIndexHtml(url)));
          }
          /**
           * Normalizes an external URL path.
           * If the given URL doesn't begin with a leading slash (`'/'`), adds one
           * before normalizing. Adds a hash if `HashLocationStrategy` is
           * in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.
           *
           * @param url String representing a URL.
           *
           * @returns  A normalized platform-specific URL.
           */

        }, {
          key: "prepareExternalUrl",
          value: function prepareExternalUrl(url) {
            if (url && url[0] !== '/') {
              url = '/' + url;
            }

            return this._platformStrategy.prepareExternalUrl(url);
          } // TODO: rename this method to pushState

          /**
           * Changes the browser's URL to a normalized version of a given URL, and pushes a
           * new item onto the platform's history.
           *
           * @param path  URL path to normalize.
           * @param query Query parameters.
           * @param state Location history state.
           *
           */

        }, {
          key: "go",
          value: function go(path) {
            var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
            var state = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

            this._platformStrategy.pushState(state, '', path, query);

            this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);
          }
          /**
           * Changes the browser's URL to a normalized version of the given URL, and replaces
           * the top item on the platform's history stack.
           *
           * @param path  URL path to normalize.
           * @param query Query parameters.
           * @param state Location history state.
           */

        }, {
          key: "replaceState",
          value: function replaceState(path) {
            var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
            var state = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

            this._platformStrategy.replaceState(state, '', path, query);

            this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);
          }
          /**
           * Navigates forward in the platform's history.
           */

        }, {
          key: "forward",
          value: function forward() {
            this._platformStrategy.forward();
          }
          /**
           * Navigates back in the platform's history.
           */

        }, {
          key: "back",
          value: function back() {
            this._platformStrategy.back();
          }
          /**
           * Registers a URL change listener. Use to catch updates performed by the Angular
           * framework that are not detectible through "popstate" or "hashchange" events.
           *
           * @param fn The change handler function, which take a URL and a location history state.
           */

        }, {
          key: "onUrlChange",
          value: function onUrlChange(fn) {
            var _this529 = this;

            this._urlChangeListeners.push(fn);

            if (!this._urlChangeSubscription) {
              this._urlChangeSubscription = this.subscribe(function (v) {
                _this529._notifyUrlChangeListeners(v.url, v.state);
              });
            }
          }
          /** @internal */

        }, {
          key: "_notifyUrlChangeListeners",
          value: function _notifyUrlChangeListeners() {
            var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
            var state = arguments.length > 1 ? arguments[1] : undefined;

            this._urlChangeListeners.forEach(function (fn) {
              return fn(url, state);
            });
          }
          /**
           * Subscribes to the platform's `popState` events.
           *
           * @param value Event that is triggered when the state history changes.
           * @param exception The exception to throw.
           *
           * @returns Subscribed events.
           */

        }, {
          key: "subscribe",
          value: function subscribe(onNext, onThrow, onReturn) {
            return this._subject.subscribe({
              next: onNext,
              error: onThrow,
              complete: onReturn
            });
          }
        }]);

        return Location;
      }();

      Location.ɵfac = function Location_Factory(t) {
        return new (t || Location)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](LocationStrategy), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PlatformLocation));
      };
      /**
       * Normalizes URL parameters by prepending with `?` if needed.
       *
       * @param  params String of URL parameters.
       *
       * @returns The normalized URL parameters string.
       */


      Location.normalizeQueryParams = normalizeQueryParams;
      /**
       * Joins two parts of a URL with a slash if needed.
       *
       * @param start  URL string
       * @param end    URL string
       *
       *
       * @returns The joined URL string.
       */

      Location.joinWithSlash = joinWithSlash;
      /**
       * Removes a trailing slash from a URL string if needed.
       * Looks for the first occurrence of either `#`, `?`, or the end of the
       * line as `/` characters and removes the trailing slash if one exists.
       *
       * @param url URL string.
       *
       * @returns The URL string, modified if needed.
       */

      Location.stripTrailingSlash = stripTrailingSlash;
      Location.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({
        factory: createLocation,
        token: Location,
        providedIn: "root"
      });

      Location.ctorParameters = function () {
        return [{
          type: LocationStrategy
        }, {
          type: PlatformLocation
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](Location, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"],
          args: [{
            providedIn: 'root',
            // See #23917
            useFactory: createLocation
          }]
        }], function () {
          return [{
            type: LocationStrategy
          }, {
            type: PlatformLocation
          }];
        }, null);
      })();

      function createLocation() {
        return new Location(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(LocationStrategy), Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(PlatformLocation));
      }

      function _stripBaseHref(baseHref, url) {
        return baseHref && url.startsWith(baseHref) ? url.substring(baseHref.length) : url;
      }

      function _stripIndexHtml(url) {
        return url.replace(/\/index.html$/, '');
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /** @internal */


      var CURRENCIES_EN = {
        'ADP': [undefined, undefined, 0],
        'AFN': [undefined, undefined, 0],
        'ALL': [undefined, undefined, 0],
        'AMD': [undefined, undefined, 2],
        'AOA': [undefined, 'Kz'],
        'ARS': [undefined, '$'],
        'AUD': ['A$', '$'],
        'BAM': [undefined, 'KM'],
        'BBD': [undefined, '$'],
        'BDT': [undefined, '৳'],
        'BHD': [undefined, undefined, 3],
        'BIF': [undefined, undefined, 0],
        'BMD': [undefined, '$'],
        'BND': [undefined, '$'],
        'BOB': [undefined, 'Bs'],
        'BRL': ['R$'],
        'BSD': [undefined, '$'],
        'BWP': [undefined, 'P'],
        'BYN': [undefined, 'р.', 2],
        'BYR': [undefined, undefined, 0],
        'BZD': [undefined, '$'],
        'CAD': ['CA$', '$', 2],
        'CHF': [undefined, undefined, 2],
        'CLF': [undefined, undefined, 4],
        'CLP': [undefined, '$', 0],
        'CNY': ['CN¥', '¥'],
        'COP': [undefined, '$', 2],
        'CRC': [undefined, '₡', 2],
        'CUC': [undefined, '$'],
        'CUP': [undefined, '$'],
        'CZK': [undefined, 'Kč', 2],
        'DJF': [undefined, undefined, 0],
        'DKK': [undefined, 'kr', 2],
        'DOP': [undefined, '$'],
        'EGP': [undefined, 'E£'],
        'ESP': [undefined, '₧', 0],
        'EUR': ['€'],
        'FJD': [undefined, '$'],
        'FKP': [undefined, '£'],
        'GBP': ['£'],
        'GEL': [undefined, '₾'],
        'GIP': [undefined, '£'],
        'GNF': [undefined, 'FG', 0],
        'GTQ': [undefined, 'Q'],
        'GYD': [undefined, '$', 2],
        'HKD': ['HK$', '$'],
        'HNL': [undefined, 'L'],
        'HRK': [undefined, 'kn'],
        'HUF': [undefined, 'Ft', 2],
        'IDR': [undefined, 'Rp', 2],
        'ILS': ['₪'],
        'INR': ['₹'],
        'IQD': [undefined, undefined, 0],
        'IRR': [undefined, undefined, 0],
        'ISK': [undefined, 'kr', 0],
        'ITL': [undefined, undefined, 0],
        'JMD': [undefined, '$'],
        'JOD': [undefined, undefined, 3],
        'JPY': ['¥', undefined, 0],
        'KHR': [undefined, '៛'],
        'KMF': [undefined, 'CF', 0],
        'KPW': [undefined, '₩', 0],
        'KRW': ['₩', undefined, 0],
        'KWD': [undefined, undefined, 3],
        'KYD': [undefined, '$'],
        'KZT': [undefined, '₸'],
        'LAK': [undefined, '₭', 0],
        'LBP': [undefined, 'L£', 0],
        'LKR': [undefined, 'Rs'],
        'LRD': [undefined, '$'],
        'LTL': [undefined, 'Lt'],
        'LUF': [undefined, undefined, 0],
        'LVL': [undefined, 'Ls'],
        'LYD': [undefined, undefined, 3],
        'MGA': [undefined, 'Ar', 0],
        'MGF': [undefined, undefined, 0],
        'MMK': [undefined, 'K', 0],
        'MNT': [undefined, '₮', 2],
        'MRO': [undefined, undefined, 0],
        'MUR': [undefined, 'Rs', 2],
        'MXN': ['MX$', '$'],
        'MYR': [undefined, 'RM'],
        'NAD': [undefined, '$'],
        'NGN': [undefined, '₦'],
        'NIO': [undefined, 'C$'],
        'NOK': [undefined, 'kr', 2],
        'NPR': [undefined, 'Rs'],
        'NZD': ['NZ$', '$'],
        'OMR': [undefined, undefined, 3],
        'PHP': [undefined, '₱'],
        'PKR': [undefined, 'Rs', 2],
        'PLN': [undefined, 'zł'],
        'PYG': [undefined, '₲', 0],
        'RON': [undefined, 'lei'],
        'RSD': [undefined, undefined, 0],
        'RUB': [undefined, '₽'],
        'RUR': [undefined, 'р.'],
        'RWF': [undefined, 'RF', 0],
        'SBD': [undefined, '$'],
        'SEK': [undefined, 'kr', 2],
        'SGD': [undefined, '$'],
        'SHP': [undefined, '£'],
        'SLL': [undefined, undefined, 0],
        'SOS': [undefined, undefined, 0],
        'SRD': [undefined, '$'],
        'SSP': [undefined, '£'],
        'STD': [undefined, undefined, 0],
        'STN': [undefined, 'Db'],
        'SYP': [undefined, '£', 0],
        'THB': [undefined, '฿'],
        'TMM': [undefined, undefined, 0],
        'TND': [undefined, undefined, 3],
        'TOP': [undefined, 'T$'],
        'TRL': [undefined, undefined, 0],
        'TRY': [undefined, '₺'],
        'TTD': [undefined, '$'],
        'TWD': ['NT$', '$', 2],
        'TZS': [undefined, undefined, 2],
        'UAH': [undefined, '₴'],
        'UGX': [undefined, undefined, 0],
        'USD': ['$'],
        'UYI': [undefined, undefined, 0],
        'UYU': [undefined, '$'],
        'UYW': [undefined, undefined, 4],
        'UZS': [undefined, undefined, 2],
        'VEF': [undefined, 'Bs', 2],
        'VND': ['₫', undefined, 0],
        'VUV': [undefined, undefined, 0],
        'XAF': ['FCFA', undefined, 0],
        'XCD': ['EC$', '$'],
        'XOF': ['CFA', undefined, 0],
        'XPF': ['CFPF', undefined, 0],
        'XXX': ['¤'],
        'YER': [undefined, undefined, 0],
        'ZAR': [undefined, 'R'],
        'ZMK': [undefined, undefined, 0],
        'ZMW': [undefined, 'ZK'],
        'ZWD': [undefined, undefined, 0]
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Format styles that can be used to represent numbers.
       * @see `getLocaleNumberFormat()`.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */

      var NumberFormatStyle;

      (function (NumberFormatStyle) {
        NumberFormatStyle[NumberFormatStyle["Decimal"] = 0] = "Decimal";
        NumberFormatStyle[NumberFormatStyle["Percent"] = 1] = "Percent";
        NumberFormatStyle[NumberFormatStyle["Currency"] = 2] = "Currency";
        NumberFormatStyle[NumberFormatStyle["Scientific"] = 3] = "Scientific";
      })(NumberFormatStyle || (NumberFormatStyle = {}));
      /**
       * Plurality cases used for translating plurals to different languages.
       *
       * @see `NgPlural`
       * @see `NgPluralCase`
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      var Plural;

      (function (Plural) {
        Plural[Plural["Zero"] = 0] = "Zero";
        Plural[Plural["One"] = 1] = "One";
        Plural[Plural["Two"] = 2] = "Two";
        Plural[Plural["Few"] = 3] = "Few";
        Plural[Plural["Many"] = 4] = "Many";
        Plural[Plural["Other"] = 5] = "Other";
      })(Plural || (Plural = {}));
      /**
       * Context-dependant translation forms for strings.
       * Typically the standalone version is for the nominative form of the word,
       * and the format version is used for the genitive case.
       * @see [CLDR website](http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles)
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      var FormStyle;

      (function (FormStyle) {
        FormStyle[FormStyle["Format"] = 0] = "Format";
        FormStyle[FormStyle["Standalone"] = 1] = "Standalone";
      })(FormStyle || (FormStyle = {}));
      /**
       * String widths available for translations.
       * The specific character widths are locale-specific.
       * Examples are given for the word "Sunday" in English.
       *
       * @publicApi
       */


      var TranslationWidth;

      (function (TranslationWidth) {
        /** 1 character for `en-US`. For example: 'S' */
        TranslationWidth[TranslationWidth["Narrow"] = 0] = "Narrow";
        /** 3 characters for `en-US`. For example: 'Sun' */

        TranslationWidth[TranslationWidth["Abbreviated"] = 1] = "Abbreviated";
        /** Full length for `en-US`. For example: "Sunday" */

        TranslationWidth[TranslationWidth["Wide"] = 2] = "Wide";
        /** 2 characters for `en-US`, For example: "Su" */

        TranslationWidth[TranslationWidth["Short"] = 3] = "Short";
      })(TranslationWidth || (TranslationWidth = {}));
      /**
       * String widths available for date-time formats.
       * The specific character widths are locale-specific.
       * Examples are given for `en-US`.
       *
       * @see `getLocaleDateFormat()`
       * @see `getLocaleTimeFormat()``
       * @see `getLocaleDateTimeFormat()`
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       * @publicApi
       */


      var FormatWidth;

      (function (FormatWidth) {
        /**
         * For `en-US`, 'M/d/yy, h:mm a'`
         * (Example: `6/15/15, 9:03 AM`)
         */
        FormatWidth[FormatWidth["Short"] = 0] = "Short";
        /**
         * For `en-US`, `'MMM d, y, h:mm:ss a'`
         * (Example: `Jun 15, 2015, 9:03:01 AM`)
         */

        FormatWidth[FormatWidth["Medium"] = 1] = "Medium";
        /**
         * For `en-US`, `'MMMM d, y, h:mm:ss a z'`
         * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`)
         */

        FormatWidth[FormatWidth["Long"] = 2] = "Long";
        /**
         * For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'`
         * (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`)
         */

        FormatWidth[FormatWidth["Full"] = 3] = "Full";
      })(FormatWidth || (FormatWidth = {}));
      /**
       * Symbols that can be used to replace placeholders in number patterns.
       * Examples are based on `en-US` values.
       *
       * @see `getLocaleNumberSymbol()`
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      var NumberSymbol;

      (function (NumberSymbol) {
        /**
         * Decimal separator.
         * For `en-US`, the dot character.
         * Example : 2,345`.`67
         */
        NumberSymbol[NumberSymbol["Decimal"] = 0] = "Decimal";
        /**
         * Grouping separator, typically for thousands.
         * For `en-US`, the comma character.
         * Example: 2`,`345.67
         */

        NumberSymbol[NumberSymbol["Group"] = 1] = "Group";
        /**
         * List-item separator.
         * Example: "one, two, and three"
         */

        NumberSymbol[NumberSymbol["List"] = 2] = "List";
        /**
         * Sign for percentage (out of 100).
         * Example: 23.4%
         */

        NumberSymbol[NumberSymbol["PercentSign"] = 3] = "PercentSign";
        /**
         * Sign for positive numbers.
         * Example: +23
         */

        NumberSymbol[NumberSymbol["PlusSign"] = 4] = "PlusSign";
        /**
         * Sign for negative numbers.
         * Example: -23
         */

        NumberSymbol[NumberSymbol["MinusSign"] = 5] = "MinusSign";
        /**
         * Computer notation for exponential value (n times a power of 10).
         * Example: 1.2E3
         */

        NumberSymbol[NumberSymbol["Exponential"] = 6] = "Exponential";
        /**
         * Human-readable format of exponential.
         * Example: 1.2x103
         */

        NumberSymbol[NumberSymbol["SuperscriptingExponent"] = 7] = "SuperscriptingExponent";
        /**
         * Sign for permille (out of 1000).
         * Example: 23.4‰
         */

        NumberSymbol[NumberSymbol["PerMille"] = 8] = "PerMille";
        /**
         * Infinity, can be used with plus and minus.
         * Example: ∞, +∞, -∞
         */

        NumberSymbol[NumberSymbol["Infinity"] = 9] = "Infinity";
        /**
         * Not a number.
         * Example: NaN
         */

        NumberSymbol[NumberSymbol["NaN"] = 10] = "NaN";
        /**
         * Symbol used between time units.
         * Example: 10:52
         */

        NumberSymbol[NumberSymbol["TimeSeparator"] = 11] = "TimeSeparator";
        /**
         * Decimal separator for currency values (fallback to `Decimal`).
         * Example: $2,345.67
         */

        NumberSymbol[NumberSymbol["CurrencyDecimal"] = 12] = "CurrencyDecimal";
        /**
         * Group separator for currency values (fallback to `Group`).
         * Example: $2,345.67
         */

        NumberSymbol[NumberSymbol["CurrencyGroup"] = 13] = "CurrencyGroup";
      })(NumberSymbol || (NumberSymbol = {}));
      /**
       * The value for each day of the week, based on the `en-US` locale
       *
       * @publicApi
       */


      var WeekDay;

      (function (WeekDay) {
        WeekDay[WeekDay["Sunday"] = 0] = "Sunday";
        WeekDay[WeekDay["Monday"] = 1] = "Monday";
        WeekDay[WeekDay["Tuesday"] = 2] = "Tuesday";
        WeekDay[WeekDay["Wednesday"] = 3] = "Wednesday";
        WeekDay[WeekDay["Thursday"] = 4] = "Thursday";
        WeekDay[WeekDay["Friday"] = 5] = "Friday";
        WeekDay[WeekDay["Saturday"] = 6] = "Saturday";
      })(WeekDay || (WeekDay = {}));
      /**
       * Retrieves the locale ID from the currently loaded locale.
       * The loaded locale could be, for example, a global one rather than a regional one.
       * @param locale A locale code, such as `fr-FR`.
       * @returns The locale code. For example, `fr`.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleId(locale) {
        return Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale)[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].LocaleId];
      }
      /**
       * Retrieves day period strings for the given locale.
       *
       * @param locale A locale code for the locale format rules to use.
       * @param formStyle The required grammatical form.
       * @param width The required character width.
       * @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleDayPeriods(locale, formStyle, width) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        var amPmData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DayPeriodsFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DayPeriodsStandalone]];
        var amPm = getLastDefinedValue(amPmData, formStyle);
        return getLastDefinedValue(amPm, width);
      }
      /**
       * Retrieves days of the week for the given locale, using the Gregorian calendar.
       *
       * @param locale A locale code for the locale format rules to use.
       * @param formStyle The required grammatical form.
       * @param width The required character width.
       * @returns An array of localized name strings.
       * For example,`[Sunday, Monday, ... Saturday]` for `en-US`.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleDayNames(locale, formStyle, width) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        var daysData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DaysFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DaysStandalone]];
        var days = getLastDefinedValue(daysData, formStyle);
        return getLastDefinedValue(days, width);
      }
      /**
       * Retrieves months of the year for the given locale, using the Gregorian calendar.
       *
       * @param locale A locale code for the locale format rules to use.
       * @param formStyle The required grammatical form.
       * @param width The required character width.
       * @returns An array of localized name strings.
       * For example,  `[January, February, ...]` for `en-US`.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleMonthNames(locale, formStyle, width) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        var monthsData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].MonthsFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].MonthsStandalone]];
        var months = getLastDefinedValue(monthsData, formStyle);
        return getLastDefinedValue(months, width);
      }
      /**
       * Retrieves Gregorian-calendar eras for the given locale.
       * @param locale A locale code for the locale format rules to use.
       * @param width The required character width.
      
       * @returns An array of localized era strings.
       * For example, `[AD, BC]` for `en-US`.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleEraNames(locale, width) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        var erasData = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Eras];
        return getLastDefinedValue(erasData, width);
      }
      /**
       * Retrieves the first day of the week for the given locale.
       *
       * @param locale A locale code for the locale format rules to use.
       * @returns A day index number, using the 0-based week-day index for `en-US`
       * (Sunday = 0, Monday = 1, ...).
       * For example, for `fr-FR`, returns 1 to indicate that the first day is Monday.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleFirstDayOfWeek(locale) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].FirstDayOfWeek];
      }
      /**
       * Range of week days that are considered the week-end for the given locale.
       *
       * @param locale A locale code for the locale format rules to use.
       * @returns The range of day values, `[startDay, endDay]`.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleWeekEndRange(locale) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].WeekendRange];
      }
      /**
       * Retrieves a localized date-value formating string.
       *
       * @param locale A locale code for the locale format rules to use.
       * @param width The format type.
       * @returns The localized formating string.
       * @see `FormatWidth`
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleDateFormat(locale, width) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        return getLastDefinedValue(data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DateFormat], width);
      }
      /**
       * Retrieves a localized time-value formatting string.
       *
       * @param locale A locale code for the locale format rules to use.
       * @param width The format type.
       * @returns The localized formatting string.
       * @see `FormatWidth`
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
      
       * @publicApi
       */


      function getLocaleTimeFormat(locale, width) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        return getLastDefinedValue(data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].TimeFormat], width);
      }
      /**
       * Retrieves a localized date-time formatting string.
       *
       * @param locale A locale code for the locale format rules to use.
       * @param width The format type.
       * @returns The localized formatting string.
       * @see `FormatWidth`
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleDateTimeFormat(locale, width) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        var dateTimeFormatData = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DateTimeFormat];
        return getLastDefinedValue(dateTimeFormatData, width);
      }
      /**
       * Retrieves a localized number symbol that can be used to replace placeholders in number formats.
       * @param locale The locale code.
       * @param symbol The symbol to localize.
       * @returns The character for the localized symbol.
       * @see `NumberSymbol`
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleNumberSymbol(locale, symbol) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        var res = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][symbol];

        if (typeof res === 'undefined') {
          if (symbol === NumberSymbol.CurrencyDecimal) {
            return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][NumberSymbol.Decimal];
          } else if (symbol === NumberSymbol.CurrencyGroup) {
            return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][NumberSymbol.Group];
          }
        }

        return res;
      }
      /**
       * Retrieves a number format for a given locale.
       *
       * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00`
       * when used to format the number 12345.678 could result in "12'345,678". That would happen if the
       * grouping separator for your language is an apostrophe, and the decimal separator is a comma.
       *
       * <b>Important:</b> The characters `.` `,` `0` `#` (and others below) are special placeholders
       * that stand for the decimal separator, and so on, and are NOT real characters.
       * You must NOT "translate" the placeholders. For example, don't change `.` to `,` even though in
       * your language the decimal point is written with a comma. The symbols should be replaced by the
       * local equivalents, using the appropriate `NumberSymbol` for your language.
       *
       * Here are the special characters used in number patterns:
       *
       * | Symbol | Meaning |
       * |--------|---------|
       * | . | Replaced automatically by the character used for the decimal point. |
       * | , | Replaced by the "grouping" (thousands) separator. |
       * | 0 | Replaced by a digit (or zero if there aren't enough digits). |
       * | # | Replaced by a digit (or nothing if there aren't enough). |
       * | ¤ | Replaced by a currency symbol, such as $ or USD. |
       * | % | Marks a percent format. The % symbol may change position, but must be retained. |
       * | E | Marks a scientific format. The E symbol may change position, but must be retained. |
       * | ' | Special characters used as literal characters are quoted with ASCII single quotes. |
       *
       * @param locale A locale code for the locale format rules to use.
       * @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.)
       * @returns The localized format string.
       * @see `NumberFormatStyle`
       * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns)
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleNumberFormat(locale, type) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberFormats][type];
      }
      /**
       * Retrieves the symbol used to represent the currency for the main country
       * corresponding to a given locale. For example, '$' for `en-US`.
       *
       * @param locale A locale code for the locale format rules to use.
       * @returns The localized symbol character,
       * or `null` if the main country cannot be determined.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleCurrencySymbol(locale) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].CurrencySymbol] || null;
      }
      /**
       * Retrieves the name of the currency for the main country corresponding
       * to a given locale. For example, 'US Dollar' for `en-US`.
       * @param locale A locale code for the locale format rules to use.
       * @returns The currency name,
       * or `null` if the main country cannot be determined.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleCurrencyName(locale) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].CurrencyName] || null;
      }
      /**
       * Retrieves the default currency code for the given locale.
       *
       * The default is defined as the first currency which is still in use.
       *
       * @param locale The code of the locale whose currency code we want.
       * @returns The code of the default currency for the given locale.
       *
       * @publicApi
       */


      function getLocaleCurrencyCode(locale) {
        return Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵgetLocaleCurrencyCode"])(locale);
      }
      /**
       * Retrieves the currency values for a given locale.
       * @param locale A locale code for the locale format rules to use.
       * @returns The currency values.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       */


      function getLocaleCurrencies(locale) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Currencies];
      }
      /**
       * @alias core/ɵgetLocalePluralCase
       * @publicApi
       */


      var getLocalePluralCase = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵgetLocalePluralCase"];

      function checkFullData(data) {
        if (!data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData]) {
          throw new Error("Missing extra locale data for the locale \"".concat(data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].LocaleId], "\". Use \"registerLocaleData\" to load new data. See the \"I18n guide\" on angular.io to know more."));
        }
      }
      /**
       * Retrieves locale-specific rules used to determine which day period to use
       * when more than one period is defined for a locale.
       *
       * There is a rule for each defined day period. The
       * first rule is applied to the first day period and so on.
       * Fall back to AM/PM when no rules are available.
       *
       * A rule can specify a period as time range, or as a single time value.
       *
       * This functionality is only available when you have loaded the full locale data.
       * See the ["I18n guide"](guide/i18n#i18n-pipes).
       *
       * @param locale A locale code for the locale format rules to use.
       * @returns The rules for the locale, a single time value or array of *from-time, to-time*,
       * or null if no periods are available.
       *
       * @see `getLocaleExtraDayPeriods()`
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleExtraDayPeriodRules(locale) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        checkFullData(data);
        var rules = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][2
        /* ExtraDayPeriodsRules */
        ] || [];
        return rules.map(function (rule) {
          if (typeof rule === 'string') {
            return extractTime(rule);
          }

          return [extractTime(rule[0]), extractTime(rule[1])];
        });
      }
      /**
       * Retrieves locale-specific day periods, which indicate roughly how a day is broken up
       * in different languages.
       * For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight.
       *
       * This functionality is only available when you have loaded the full locale data.
       * See the ["I18n guide"](guide/i18n#i18n-pipes).
       *
       * @param locale A locale code for the locale format rules to use.
       * @param formStyle The required grammatical form.
       * @param width The required character width.
       * @returns The translated day-period strings.
       * @see `getLocaleExtraDayPeriodRules()`
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLocaleExtraDayPeriods(locale, formStyle, width) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        checkFullData(data);
        var dayPeriodsData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][0
        /* ExtraDayPeriodFormats */
        ], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][1
        /* ExtraDayPeriodStandalone */
        ]];
        var dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];
        return getLastDefinedValue(dayPeriods, width) || [];
      }
      /**
       * Retrieves the writing direction of a specified locale
       * @param locale A locale code for the locale format rules to use.
       * @publicApi
       * @returns 'rtl' or 'ltr'
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       */


      function getLocaleDirection(locale) {
        var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
        return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Directionality];
      }
      /**
       * Retrieves the first value that is defined in an array, going backwards from an index position.
       *
       * To avoid repeating the same data (as when the "format" and "standalone" forms are the same)
       * add the first value to the locale data arrays, and add other values only if they are different.
       *
       * @param data The data array to retrieve from.
       * @param index A 0-based index into the array to start from.
       * @returns The value immediately before the given index position.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getLastDefinedValue(data, index) {
        for (var i = index; i > -1; i--) {
          if (typeof data[i] !== 'undefined') {
            return data[i];
          }
        }

        throw new Error('Locale data API: locale data undefined');
      }
      /**
       * Extracts the hours and minutes from a string like "15:45"
       */


      function extractTime(time) {
        var _time$split = time.split(':'),
            _time$split2 = _slicedToArray(_time$split, 2),
            h = _time$split2[0],
            m = _time$split2[1];

        return {
          hours: +h,
          minutes: +m
        };
      }
      /**
       * Retrieves the currency symbol for a given currency code.
       *
       * For example, for the default `en-US` locale, the code `USD` can
       * be represented by the narrow symbol `$` or the wide symbol `US$`.
       *
       * @param code The currency code.
       * @param format The format, `wide` or `narrow`.
       * @param locale A locale code for the locale format rules to use.
       *
       * @returns The symbol, or the currency code if no symbol is available.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function getCurrencySymbol(code, format) {
        var locale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'en';
        var currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];
        var symbolNarrow = currency[1
        /* SymbolNarrow */
        ];

        if (format === 'narrow' && typeof symbolNarrow === 'string') {
          return symbolNarrow;
        }

        return currency[0
        /* Symbol */
        ] || code;
      } // Most currencies have cents, that's why the default is 2


      var DEFAULT_NB_OF_CURRENCY_DIGITS = 2;
      /**
       * Reports the number of decimal digits for a given currency.
       * The value depends upon the presence of cents in that particular currency.
       *
       * @param code The currency code.
       * @returns The number of decimal digits, typically 0 or 2.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */

      function getNumberOfCurrencyDigits(code) {
        var digits;
        var currency = CURRENCIES_EN[code];

        if (currency) {
          digits = currency[2
          /* NbOfDigits */
          ];
        }

        return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ISO8601_DATE_REGEX = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; //    1        2       3         4          5          6          7          8  9     10      11

      var NAMED_FORMATS = {};
      var DATE_FORMATS_SPLIT = /((?:[^GyYMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;
      var ZoneWidth;

      (function (ZoneWidth) {
        ZoneWidth[ZoneWidth["Short"] = 0] = "Short";
        ZoneWidth[ZoneWidth["ShortGMT"] = 1] = "ShortGMT";
        ZoneWidth[ZoneWidth["Long"] = 2] = "Long";
        ZoneWidth[ZoneWidth["Extended"] = 3] = "Extended";
      })(ZoneWidth || (ZoneWidth = {}));

      var DateType;

      (function (DateType) {
        DateType[DateType["FullYear"] = 0] = "FullYear";
        DateType[DateType["Month"] = 1] = "Month";
        DateType[DateType["Date"] = 2] = "Date";
        DateType[DateType["Hours"] = 3] = "Hours";
        DateType[DateType["Minutes"] = 4] = "Minutes";
        DateType[DateType["Seconds"] = 5] = "Seconds";
        DateType[DateType["FractionalSeconds"] = 6] = "FractionalSeconds";
        DateType[DateType["Day"] = 7] = "Day";
      })(DateType || (DateType = {}));

      var TranslationType;

      (function (TranslationType) {
        TranslationType[TranslationType["DayPeriods"] = 0] = "DayPeriods";
        TranslationType[TranslationType["Days"] = 1] = "Days";
        TranslationType[TranslationType["Months"] = 2] = "Months";
        TranslationType[TranslationType["Eras"] = 3] = "Eras";
      })(TranslationType || (TranslationType = {}));
      /**
       * @ngModule CommonModule
       * @description
       *
       * Formats a date according to locale rules.
       *
       * @param value The date to format, as a Date, or a number (milliseconds since UTC epoch)
       * or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime).
       * @param format The date-time components to include. See `DatePipe` for details.
       * @param locale A locale code for the locale format rules to use.
       * @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`),
       * or a standard UTC/GMT or continental US time zone abbreviation.
       * If not specified, uses host system settings.
       *
       * @returns The formatted date string.
       *
       * @see `DatePipe`
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function formatDate(value, format, locale, timezone) {
        var date = toDate(value);
        var namedFormat = getNamedFormat(locale, format);
        format = namedFormat || format;
        var parts = [];
        var match;

        while (format) {
          match = DATE_FORMATS_SPLIT.exec(format);

          if (match) {
            parts = parts.concat(match.slice(1));
            var part = parts.pop();

            if (!part) {
              break;
            }

            format = part;
          } else {
            parts.push(format);
            break;
          }
        }

        var dateTimezoneOffset = date.getTimezoneOffset();

        if (timezone) {
          dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
          date = convertTimezoneToLocal(date, timezone, true);
        }

        var text = '';
        parts.forEach(function (value) {
          var dateFormatter = getDateFormatter(value);
          text += dateFormatter ? dateFormatter(date, locale, dateTimezoneOffset) : value === '\'\'' ? '\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\'');
        });
        return text;
      }

      function getNamedFormat(locale, format) {
        var localeId = getLocaleId(locale);
        NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};

        if (NAMED_FORMATS[localeId][format]) {
          return NAMED_FORMATS[localeId][format];
        }

        var formatValue = '';

        switch (format) {
          case 'shortDate':
            formatValue = getLocaleDateFormat(locale, FormatWidth.Short);
            break;

          case 'mediumDate':
            formatValue = getLocaleDateFormat(locale, FormatWidth.Medium);
            break;

          case 'longDate':
            formatValue = getLocaleDateFormat(locale, FormatWidth.Long);
            break;

          case 'fullDate':
            formatValue = getLocaleDateFormat(locale, FormatWidth.Full);
            break;

          case 'shortTime':
            formatValue = getLocaleTimeFormat(locale, FormatWidth.Short);
            break;

          case 'mediumTime':
            formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium);
            break;

          case 'longTime':
            formatValue = getLocaleTimeFormat(locale, FormatWidth.Long);
            break;

          case 'fullTime':
            formatValue = getLocaleTimeFormat(locale, FormatWidth.Full);
            break;

          case 'short':
            var shortTime = getNamedFormat(locale, 'shortTime');
            var shortDate = getNamedFormat(locale, 'shortDate');
            formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);
            break;

          case 'medium':
            var mediumTime = getNamedFormat(locale, 'mediumTime');
            var mediumDate = getNamedFormat(locale, 'mediumDate');
            formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);
            break;

          case 'long':
            var longTime = getNamedFormat(locale, 'longTime');
            var longDate = getNamedFormat(locale, 'longDate');
            formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);
            break;

          case 'full':
            var fullTime = getNamedFormat(locale, 'fullTime');
            var fullDate = getNamedFormat(locale, 'fullDate');
            formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);
            break;
        }

        if (formatValue) {
          NAMED_FORMATS[localeId][format] = formatValue;
        }

        return formatValue;
      }

      function formatDateTime(str, opt_values) {
        if (opt_values) {
          str = str.replace(/\{([^}]+)}/g, function (match, key) {
            return opt_values != null && key in opt_values ? opt_values[key] : match;
          });
        }

        return str;
      }

      function padNumber(num, digits) {
        var minusSign = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '-';
        var trim = arguments.length > 3 ? arguments[3] : undefined;
        var negWrap = arguments.length > 4 ? arguments[4] : undefined;
        var neg = '';

        if (num < 0 || negWrap && num <= 0) {
          if (negWrap) {
            num = -num + 1;
          } else {
            num = -num;
            neg = minusSign;
          }
        }

        var strNum = String(num);

        while (strNum.length < digits) {
          strNum = '0' + strNum;
        }

        if (trim) {
          strNum = strNum.substr(strNum.length - digits);
        }

        return neg + strNum;
      }

      function formatFractionalSeconds(milliseconds, digits) {
        var strMs = padNumber(milliseconds, 3);
        return strMs.substr(0, digits);
      }
      /**
       * Returns a date formatter that transforms a date into its locale digit representation
       */


      function dateGetter(name, size) {
        var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
        var trim = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
        var negWrap = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
        return function (date, locale) {
          var part = getDatePart(name, date);

          if (offset > 0 || part > -offset) {
            part += offset;
          }

          if (name === DateType.Hours) {
            if (part === 0 && offset === -12) {
              part = 12;
            }
          } else if (name === DateType.FractionalSeconds) {
            return formatFractionalSeconds(part, size);
          }

          var localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);
          return padNumber(part, size, localeMinus, trim, negWrap);
        };
      }

      function getDatePart(part, date) {
        switch (part) {
          case DateType.FullYear:
            return date.getFullYear();

          case DateType.Month:
            return date.getMonth();

          case DateType.Date:
            return date.getDate();

          case DateType.Hours:
            return date.getHours();

          case DateType.Minutes:
            return date.getMinutes();

          case DateType.Seconds:
            return date.getSeconds();

          case DateType.FractionalSeconds:
            return date.getMilliseconds();

          case DateType.Day:
            return date.getDay();

          default:
            throw new Error("Unknown DateType value \"".concat(part, "\"."));
        }
      }
      /**
       * Returns a date formatter that transforms a date into its locale string representation
       */


      function dateStrGetter(name, width) {
        var form = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : FormStyle.Format;
        var extended = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
        return function (date, locale) {
          return getDateTranslation(date, locale, name, width, form, extended);
        };
      }
      /**
       * Returns the locale translation of a date for a given form, type and width
       */


      function getDateTranslation(date, locale, name, width, form, extended) {
        switch (name) {
          case TranslationType.Months:
            return getLocaleMonthNames(locale, form, width)[date.getMonth()];

          case TranslationType.Days:
            return getLocaleDayNames(locale, form, width)[date.getDay()];

          case TranslationType.DayPeriods:
            var currentHours = date.getHours();
            var currentMinutes = date.getMinutes();

            if (extended) {
              var rules = getLocaleExtraDayPeriodRules(locale);
              var dayPeriods = getLocaleExtraDayPeriods(locale, form, width);
              var index = rules.findIndex(function (rule) {
                if (Array.isArray(rule)) {
                  // morning, afternoon, evening, night
                  var _rule = _slicedToArray(rule, 2),
                      from = _rule[0],
                      to = _rule[1];

                  var afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes;
                  var beforeTo = currentHours < to.hours || currentHours === to.hours && currentMinutes < to.minutes; // We must account for normal rules that span a period during the day (e.g. 6am-9am)
                  // where `from` is less (earlier) than `to`. But also rules that span midnight (e.g.
                  // 10pm - 5am) where `from` is greater (later!) than `to`.
                  //
                  // In the first case the current time must be BOTH after `from` AND before `to`
                  // (e.g. 8am is after 6am AND before 10am).
                  //
                  // In the second case the current time must be EITHER after `from` OR before `to`
                  // (e.g. 4am is before 5am but not after 10pm; and 11pm is not before 5am but it is
                  // after 10pm).

                  if (from.hours < to.hours) {
                    if (afterFrom && beforeTo) {
                      return true;
                    }
                  } else if (afterFrom || beforeTo) {
                    return true;
                  }
                } else {
                  // noon or midnight
                  if (rule.hours === currentHours && rule.minutes === currentMinutes) {
                    return true;
                  }
                }

                return false;
              });

              if (index !== -1) {
                return dayPeriods[index];
              }
            } // if no rules for the day periods, we use am/pm by default


            return getLocaleDayPeriods(locale, form, width)[currentHours < 12 ? 0 : 1];

          case TranslationType.Eras:
            return getLocaleEraNames(locale, width)[date.getFullYear() <= 0 ? 0 : 1];

          default:
            // This default case is not needed by TypeScript compiler, as the switch is exhaustive.
            // However Closure Compiler does not understand that and reports an error in typed mode.
            // The `throw new Error` below works around the problem, and the unexpected: never variable
            // makes sure tsc still checks this code is unreachable.
            var unexpected = name;
            throw new Error("unexpected translation type ".concat(unexpected));
        }
      }
      /**
       * Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or
       * GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30,
       * extended = +04:30)
       */


      function timeZoneGetter(width) {
        return function (date, locale, offset) {
          var zone = -1 * offset;
          var minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);
          var hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);

          switch (width) {
            case ZoneWidth.Short:
              return (zone >= 0 ? '+' : '') + padNumber(hours, 2, minusSign) + padNumber(Math.abs(zone % 60), 2, minusSign);

            case ZoneWidth.ShortGMT:
              return 'GMT' + (zone >= 0 ? '+' : '') + padNumber(hours, 1, minusSign);

            case ZoneWidth.Long:
              return 'GMT' + (zone >= 0 ? '+' : '') + padNumber(hours, 2, minusSign) + ':' + padNumber(Math.abs(zone % 60), 2, minusSign);

            case ZoneWidth.Extended:
              if (offset === 0) {
                return 'Z';
              } else {
                return (zone >= 0 ? '+' : '') + padNumber(hours, 2, minusSign) + ':' + padNumber(Math.abs(zone % 60), 2, minusSign);
              }

            default:
              throw new Error("Unknown zone width \"".concat(width, "\""));
          }
        };
      }

      var JANUARY = 0;
      var THURSDAY = 4;

      function getFirstThursdayOfYear(year) {
        var firstDayOfYear = new Date(year, JANUARY, 1).getDay();
        return new Date(year, 0, 1 + (firstDayOfYear <= THURSDAY ? THURSDAY : THURSDAY + 7) - firstDayOfYear);
      }

      function getThursdayThisWeek(datetime) {
        return new Date(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay()));
      }

      function weekGetter(size) {
        var monthBased = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
        return function (date, locale) {
          var result;

          if (monthBased) {
            var nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;
            var today = date.getDate();
            result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);
          } else {
            var thisThurs = getThursdayThisWeek(date); // Some days of a year are part of next year according to ISO 8601.
            // Compute the firstThurs from the year of this week's Thursday

            var firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear());
            var diff = thisThurs.getTime() - firstThurs.getTime();
            result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week
          }

          return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
        };
      }
      /**
       * Returns a date formatter that provides the week-numbering year for the input date.
       */


      function weekNumberingYearGetter(size) {
        var trim = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
        return function (date, locale) {
          var thisThurs = getThursdayThisWeek(date);
          var weekNumberingYear = thisThurs.getFullYear();
          return padNumber(weekNumberingYear, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim);
        };
      }

      var DATE_FORMATS = {}; // Based on CLDR formats:
      // See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
      // See also explanations: http://cldr.unicode.org/translation/date-time
      // TODO(ocombe): support all missing cldr formats: Y, U, Q, D, F, e, c, j, J, C, A, v, V, X, x

      function getDateFormatter(format) {
        if (DATE_FORMATS[format]) {
          return DATE_FORMATS[format];
        }

        var formatter;

        switch (format) {
          // Era name (AD/BC)
          case 'G':
          case 'GG':
          case 'GGG':
            formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated);
            break;

          case 'GGGG':
            formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide);
            break;

          case 'GGGGG':
            formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow);
            break;
          // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199)

          case 'y':
            formatter = dateGetter(DateType.FullYear, 1, 0, false, true);
            break;
          // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)

          case 'yy':
            formatter = dateGetter(DateType.FullYear, 2, 0, true, true);
            break;
          // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10)

          case 'yyy':
            formatter = dateGetter(DateType.FullYear, 3, 0, false, true);
            break;
          // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010)

          case 'yyyy':
            formatter = dateGetter(DateType.FullYear, 4, 0, false, true);
            break;
          // 1 digit representation of the week-numbering year, e.g. (AD 1 => 1, AD 199 => 199)

          case 'Y':
            formatter = weekNumberingYearGetter(1);
            break;
          // 2 digit representation of the week-numbering year, padded (00-99). (e.g. AD 2001 => 01, AD
          // 2010 => 10)

          case 'YY':
            formatter = weekNumberingYearGetter(2, true);
            break;
          // 3 digit representation of the week-numbering year, padded (000-999). (e.g. AD 1 => 001, AD
          // 2010 => 2010)

          case 'YYY':
            formatter = weekNumberingYearGetter(3);
            break;
          // 4 digit representation of the week-numbering year (e.g. AD 1 => 0001, AD 2010 => 2010)

          case 'YYYY':
            formatter = weekNumberingYearGetter(4);
            break;
          // Month of the year (1-12), numeric

          case 'M':
          case 'L':
            formatter = dateGetter(DateType.Month, 1, 1);
            break;

          case 'MM':
          case 'LL':
            formatter = dateGetter(DateType.Month, 2, 1);
            break;
          // Month of the year (January, ...), string, format

          case 'MMM':
            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated);
            break;

          case 'MMMM':
            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide);
            break;

          case 'MMMMM':
            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow);
            break;
          // Month of the year (January, ...), string, standalone

          case 'LLL':
            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);
            break;

          case 'LLLL':
            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);
            break;

          case 'LLLLL':
            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);
            break;
          // Week of the year (1, ... 52)

          case 'w':
            formatter = weekGetter(1);
            break;

          case 'ww':
            formatter = weekGetter(2);
            break;
          // Week of the month (1, ...)

          case 'W':
            formatter = weekGetter(1, true);
            break;
          // Day of the month (1-31)

          case 'd':
            formatter = dateGetter(DateType.Date, 1);
            break;

          case 'dd':
            formatter = dateGetter(DateType.Date, 2);
            break;
          // Day of the Week

          case 'E':
          case 'EE':
          case 'EEE':
            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated);
            break;

          case 'EEEE':
            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide);
            break;

          case 'EEEEE':
            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow);
            break;

          case 'EEEEEE':
            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short);
            break;
          // Generic period of the day (am-pm)

          case 'a':
          case 'aa':
          case 'aaa':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated);
            break;

          case 'aaaa':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide);
            break;

          case 'aaaaa':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow);
            break;
          // Extended period of the day (midnight, at night, ...), standalone

          case 'b':
          case 'bb':
          case 'bbb':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true);
            break;

          case 'bbbb':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true);
            break;

          case 'bbbbb':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true);
            break;
          // Extended period of the day (midnight, night, ...), standalone

          case 'B':
          case 'BB':
          case 'BBB':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true);
            break;

          case 'BBBB':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);
            break;

          case 'BBBBB':
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);
            break;
          // Hour in AM/PM, (1-12)

          case 'h':
            formatter = dateGetter(DateType.Hours, 1, -12);
            break;

          case 'hh':
            formatter = dateGetter(DateType.Hours, 2, -12);
            break;
          // Hour of the day (0-23)

          case 'H':
            formatter = dateGetter(DateType.Hours, 1);
            break;
          // Hour in day, padded (00-23)

          case 'HH':
            formatter = dateGetter(DateType.Hours, 2);
            break;
          // Minute of the hour (0-59)

          case 'm':
            formatter = dateGetter(DateType.Minutes, 1);
            break;

          case 'mm':
            formatter = dateGetter(DateType.Minutes, 2);
            break;
          // Second of the minute (0-59)

          case 's':
            formatter = dateGetter(DateType.Seconds, 1);
            break;

          case 'ss':
            formatter = dateGetter(DateType.Seconds, 2);
            break;
          // Fractional second

          case 'S':
            formatter = dateGetter(DateType.FractionalSeconds, 1);
            break;

          case 'SS':
            formatter = dateGetter(DateType.FractionalSeconds, 2);
            break;

          case 'SSS':
            formatter = dateGetter(DateType.FractionalSeconds, 3);
            break;
          // Timezone ISO8601 short format (-0430)

          case 'Z':
          case 'ZZ':
          case 'ZZZ':
            formatter = timeZoneGetter(ZoneWidth.Short);
            break;
          // Timezone ISO8601 extended format (-04:30)

          case 'ZZZZZ':
            formatter = timeZoneGetter(ZoneWidth.Extended);
            break;
          // Timezone GMT short format (GMT+4)

          case 'O':
          case 'OO':
          case 'OOO': // Should be location, but fallback to format O instead because we don't have the data yet

          case 'z':
          case 'zz':
          case 'zzz':
            formatter = timeZoneGetter(ZoneWidth.ShortGMT);
            break;
          // Timezone GMT long format (GMT+0430)

          case 'OOOO':
          case 'ZZZZ': // Should be location, but fallback to format O instead because we don't have the data yet

          case 'zzzz':
            formatter = timeZoneGetter(ZoneWidth.Long);
            break;

          default:
            return null;
        }

        DATE_FORMATS[format] = formatter;
        return formatter;
      }

      function timezoneToOffset(timezone, fallback) {
        // Support: IE 11 only, Edge 13-15+
        // IE/Edge do not "understand" colon (`:`) in timezone
        timezone = timezone.replace(/:/g, '');
        var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
        return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
      }

      function addDateMinutes(date, minutes) {
        date = new Date(date.getTime());
        date.setMinutes(date.getMinutes() + minutes);
        return date;
      }

      function convertTimezoneToLocal(date, timezone, reverse) {
        var reverseValue = reverse ? -1 : 1;
        var dateTimezoneOffset = date.getTimezoneOffset();
        var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
        return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));
      }
      /**
       * Converts a value to date.
       *
       * Supported input formats:
       * - `Date`
       * - number: timestamp
       * - string: numeric (e.g. "1234"), ISO and date strings in a format supported by
       *   [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).
       *   Note: ISO strings without time return a date without timeoffset.
       *
       * Throws if unable to convert to a date.
       */


      function toDate(value) {
        if (isDate(value)) {
          return value;
        }

        if (typeof value === 'number' && !isNaN(value)) {
          return new Date(value);
        }

        if (typeof value === 'string') {
          value = value.trim();
          var parsedNb = parseFloat(value); // any string that only contains numbers, like "1234" but not like "1234hello"

          if (!isNaN(value - parsedNb)) {
            return new Date(parsedNb);
          }

          if (/^(\d{4}-\d{1,2}-\d{1,2})$/.test(value)) {
            /* For ISO Strings without time the day, month and year must be extracted from the ISO String
            before Date creation to avoid time offset and errors in the new Date.
            If we only replace '-' with ',' in the ISO String ("2015,01,01"), and try to create a new
            date, some browsers (e.g. IE 9) will throw an invalid Date error.
            If we leave the '-' ("2015-01-01") and try to create a new Date("2015-01-01") the timeoffset
            is applied.
            Note: ISO months are 0 for January, 1 for February, ... */
            var _value$split$map3 = value.split('-').map(function (val) {
              return +val;
            }),
                _value$split$map4 = _slicedToArray(_value$split$map3, 3),
                y = _value$split$map4[0],
                m = _value$split$map4[1],
                d = _value$split$map4[2];

            return new Date(y, m - 1, d);
          }

          var match;

          if (match = value.match(ISO8601_DATE_REGEX)) {
            return isoStringToDate(match);
          }
        }

        var date = new Date(value);

        if (!isDate(date)) {
          throw new Error("Unable to convert \"".concat(value, "\" into a date"));
        }

        return date;
      }
      /**
       * Converts a date in ISO8601 to a Date.
       * Used instead of `Date.parse` because of browser discrepancies.
       */


      function isoStringToDate(match) {
        var date = new Date(0);
        var tzHour = 0;
        var tzMin = 0; // match[8] means that the string contains "Z" (UTC) or a timezone like "+01:00" or "+0100"

        var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;
        var timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like "+01:00" or "+0100"

        if (match[9]) {
          tzHour = Number(match[9] + match[10]);
          tzMin = Number(match[9] + match[11]);
        }

        dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));
        var h = Number(match[4] || 0) - tzHour;
        var m = Number(match[5] || 0) - tzMin;
        var s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)
        // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`
        // becomes `999ms`.

        var ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);
        timeSetter.call(date, h, m, s, ms);
        return date;
      }

      function isDate(value) {
        return value instanceof Date && !isNaN(value.valueOf());
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var NUMBER_FORMAT_REGEXP = /^(\d+)?\.((\d+)(-(\d+))?)?$/;
      var MAX_DIGITS = 22;
      var DECIMAL_SEP = '.';
      var ZERO_CHAR = '0';
      var PATTERN_SEP = ';';
      var GROUP_SEP = ',';
      var DIGIT_CHAR = '#';
      var CURRENCY_CHAR = '¤';
      var PERCENT_CHAR = '%';
      /**
       * Transforms a number to a locale string based on a style and a format.
       */

      function formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo) {
        var isPercent = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
        var formattedText = '';
        var isZero = false;

        if (!isFinite(value)) {
          formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);
        } else {
          var parsedNumber = parseNumber(value);

          if (isPercent) {
            parsedNumber = toPercent(parsedNumber);
          }

          var minInt = pattern.minInt;
          var minFraction = pattern.minFrac;
          var maxFraction = pattern.maxFrac;

          if (digitsInfo) {
            var parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);

            if (parts === null) {
              throw new Error("".concat(digitsInfo, " is not a valid digit info"));
            }

            var minIntPart = parts[1];
            var minFractionPart = parts[3];
            var maxFractionPart = parts[5];

            if (minIntPart != null) {
              minInt = parseIntAutoRadix(minIntPart);
            }

            if (minFractionPart != null) {
              minFraction = parseIntAutoRadix(minFractionPart);
            }

            if (maxFractionPart != null) {
              maxFraction = parseIntAutoRadix(maxFractionPart);
            } else if (minFractionPart != null && minFraction > maxFraction) {
              maxFraction = minFraction;
            }
          }

          roundNumber(parsedNumber, minFraction, maxFraction);
          var digits = parsedNumber.digits;
          var integerLen = parsedNumber.integerLen;
          var exponent = parsedNumber.exponent;
          var decimals = [];
          isZero = digits.every(function (d) {
            return !d;
          }); // pad zeros for small numbers

          for (; integerLen < minInt; integerLen++) {
            digits.unshift(0);
          } // pad zeros for small numbers


          for (; integerLen < 0; integerLen++) {
            digits.unshift(0);
          } // extract decimals digits


          if (integerLen > 0) {
            decimals = digits.splice(integerLen, digits.length);
          } else {
            decimals = digits;
            digits = [0];
          } // format the integer digits with grouping separators


          var groups = [];

          if (digits.length >= pattern.lgSize) {
            groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));
          }

          while (digits.length > pattern.gSize) {
            groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));
          }

          if (digits.length) {
            groups.unshift(digits.join(''));
          }

          formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol)); // append the decimal digits

          if (decimals.length) {
            formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join('');
          }

          if (exponent) {
            formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent;
          }
        }

        if (value < 0 && !isZero) {
          formattedText = pattern.negPre + formattedText + pattern.negSuf;
        } else {
          formattedText = pattern.posPre + formattedText + pattern.posSuf;
        }

        return formattedText;
      }
      /**
       * @ngModule CommonModule
       * @description
       *
       * Formats a number as currency using locale rules.
       *
       * @param value The number to format.
       * @param locale A locale code for the locale format rules to use.
       * @param currency A string containing the currency symbol or its name,
       * such as "$" or "Canadian Dollar". Used in output string, but does not affect the operation
       * of the function.
       * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)
       * currency code, such as `USD` for the US dollar and `EUR` for the euro.
       * Used to determine the number of digits in the decimal part.
       * @param digitInfo Decimal representation options, specified by a string in the following format:
       * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.
       *
       * @returns The formatted currency value.
       *
       * @see `formatNumber()`
       * @see `DecimalPipe`
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function formatCurrency(value, locale, currency, currencyCode, digitsInfo) {
        var format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);
        var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
        pattern.minFrac = getNumberOfCurrencyDigits(currencyCode);
        pattern.maxFrac = pattern.minFrac;
        var res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);
        return res.replace(CURRENCY_CHAR, currency) // if we have 2 time the currency character, the second one is ignored
        .replace(CURRENCY_CHAR, '') // If there is a spacing between currency character and the value and
        // the currency character is supressed by passing an empty string, the
        // spacing character would remain as part of the string. Then we
        // should remove it.
        .trim();
      }
      /**
       * @ngModule CommonModule
       * @description
       *
       * Formats a number as a percentage according to locale rules.
       *
       * @param value The number to format.
       * @param locale A locale code for the locale format rules to use.
       * @param digitInfo Decimal representation options, specified by a string in the following format:
       * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.
       *
       * @returns The formatted percentage value.
       *
       * @see `formatNumber()`
       * @see `DecimalPipe`
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       * @publicApi
       *
       */


      function formatPercent(value, locale, digitsInfo) {
        var format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);
        var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
        var res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true);
        return res.replace(new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign));
      }
      /**
       * @ngModule CommonModule
       * @description
       *
       * Formats a number as text, with group sizing, separator, and other
       * parameters based on the locale.
       *
       * @param value The number to format.
       * @param locale A locale code for the locale format rules to use.
       * @param digitInfo Decimal representation options, specified by a string in the following format:
       * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.
       *
       * @returns The formatted text string.
       * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
       *
       * @publicApi
       */


      function formatNumber(value, locale, digitsInfo) {
        var format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);
        var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
        return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);
      }

      function parseNumberFormat(format) {
        var minusSign = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '-';
        var p = {
          minInt: 1,
          minFrac: 0,
          maxFrac: 0,
          posPre: '',
          posSuf: '',
          negPre: '',
          negSuf: '',
          gSize: 0,
          lgSize: 0
        };
        var patternParts = format.split(PATTERN_SEP);
        var positive = patternParts[0];
        var negative = patternParts[1];
        var positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ? positive.split(DECIMAL_SEP) : [positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1), positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)],
            integer = positiveParts[0],
            fraction = positiveParts[1] || '';
        p.posPre = integer.substr(0, integer.indexOf(DIGIT_CHAR));

        for (var i = 0; i < fraction.length; i++) {
          var ch = fraction.charAt(i);

          if (ch === ZERO_CHAR) {
            p.minFrac = p.maxFrac = i + 1;
          } else if (ch === DIGIT_CHAR) {
            p.maxFrac = i + 1;
          } else {
            p.posSuf += ch;
          }
        }

        var groups = integer.split(GROUP_SEP);
        p.gSize = groups[1] ? groups[1].length : 0;
        p.lgSize = groups[2] || groups[1] ? (groups[2] || groups[1]).length : 0;

        if (negative) {
          var trunkLen = positive.length - p.posPre.length - p.posSuf.length,
              pos = negative.indexOf(DIGIT_CHAR);
          p.negPre = negative.substr(0, pos).replace(/'/g, '');
          p.negSuf = negative.substr(pos + trunkLen).replace(/'/g, '');
        } else {
          p.negPre = minusSign + p.posPre;
          p.negSuf = p.posSuf;
        }

        return p;
      } // Transforms a parsed number into a percentage by multiplying it by 100


      function toPercent(parsedNumber) {
        // if the number is 0, don't do anything
        if (parsedNumber.digits[0] === 0) {
          return parsedNumber;
        } // Getting the current number of decimals


        var fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;

        if (parsedNumber.exponent) {
          parsedNumber.exponent += 2;
        } else {
          if (fractionLen === 0) {
            parsedNumber.digits.push(0, 0);
          } else if (fractionLen === 1) {
            parsedNumber.digits.push(0);
          }

          parsedNumber.integerLen += 2;
        }

        return parsedNumber;
      }
      /**
       * Parses a number.
       * Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/
       */


      function parseNumber(num) {
        var numStr = Math.abs(num) + '';
        var exponent = 0,
            digits,
            integerLen;
        var i, j, zeros; // Decimal point?

        if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {
          numStr = numStr.replace(DECIMAL_SEP, '');
        } // Exponential form?


        if ((i = numStr.search(/e/i)) > 0) {
          // Work out the exponent.
          if (integerLen < 0) integerLen = i;
          integerLen += +numStr.slice(i + 1);
          numStr = numStr.substring(0, i);
        } else if (integerLen < 0) {
          // There was no decimal point or exponent so it is an integer.
          integerLen = numStr.length;
        } // Count the number of leading zeros.


        for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) {
          /* empty */
        }

        if (i === (zeros = numStr.length)) {
          // The digits are all zero.
          digits = [0];
          integerLen = 1;
        } else {
          // Count the number of trailing zeros
          zeros--;

          while (numStr.charAt(zeros) === ZERO_CHAR) {
            zeros--;
          } // Trailing zeros are insignificant so ignore them


          integerLen -= i;
          digits = []; // Convert string to array of digits without leading/trailing zeros.

          for (j = 0; i <= zeros; i++, j++) {
            digits[j] = Number(numStr.charAt(i));
          }
        } // If the number overflows the maximum allowed digits then use an exponent.


        if (integerLen > MAX_DIGITS) {
          digits = digits.splice(0, MAX_DIGITS - 1);
          exponent = integerLen - 1;
          integerLen = 1;
        }

        return {
          digits: digits,
          exponent: exponent,
          integerLen: integerLen
        };
      }
      /**
       * Round the parsed number to the specified number of decimal places
       * This function changes the parsedNumber in-place
       */


      function roundNumber(parsedNumber, minFrac, maxFrac) {
        if (minFrac > maxFrac) {
          throw new Error("The minimum number of digits after fraction (".concat(minFrac, ") is higher than the maximum (").concat(maxFrac, ")."));
        }

        var digits = parsedNumber.digits;
        var fractionLen = digits.length - parsedNumber.integerLen;
        var fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac); // The index of the digit to where rounding is to occur

        var roundAt = fractionSize + parsedNumber.integerLen;
        var digit = digits[roundAt];

        if (roundAt > 0) {
          // Drop fractional digits beyond `roundAt`
          digits.splice(Math.max(parsedNumber.integerLen, roundAt)); // Set non-fractional digits beyond `roundAt` to 0

          for (var j = roundAt; j < digits.length; j++) {
            digits[j] = 0;
          }
        } else {
          // We rounded to zero so reset the parsedNumber
          fractionLen = Math.max(0, fractionLen);
          parsedNumber.integerLen = 1;
          digits.length = Math.max(1, roundAt = fractionSize + 1);
          digits[0] = 0;

          for (var i = 1; i < roundAt; i++) {
            digits[i] = 0;
          }
        }

        if (digit >= 5) {
          if (roundAt - 1 < 0) {
            for (var k = 0; k > roundAt; k--) {
              digits.unshift(0);
              parsedNumber.integerLen++;
            }

            digits.unshift(1);
            parsedNumber.integerLen++;
          } else {
            digits[roundAt - 1]++;
          }
        } // Pad out with zeros to get the required fraction length


        for (; fractionLen < Math.max(0, fractionSize); fractionLen++) {
          digits.push(0);
        }

        var dropTrailingZeros = fractionSize !== 0; // Minimal length = nb of decimals required + current nb of integers
        // Any number besides that is optional and can be removed if it's a trailing 0

        var minLen = minFrac + parsedNumber.integerLen; // Do any carrying, e.g. a digit was rounded up to 10

        var carry = digits.reduceRight(function (carry, d, i, digits) {
          d = d + carry;
          digits[i] = d < 10 ? d : d - 10; // d % 10

          if (dropTrailingZeros) {
            // Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52)
            if (digits[i] === 0 && i >= minLen) {
              digits.pop();
            } else {
              dropTrailingZeros = false;
            }
          }

          return d >= 10 ? 1 : 0; // Math.floor(d / 10);
        }, 0);

        if (carry) {
          digits.unshift(carry);
          parsedNumber.integerLen++;
        }
      }

      function parseIntAutoRadix(text) {
        var result = parseInt(text);

        if (isNaN(result)) {
          throw new Error('Invalid integer literal when parsing ' + text);
        }

        return result;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @publicApi
       */


      var NgLocalization = function NgLocalization() {
        _classCallCheck(this, NgLocalization);
      };
      /**
       * Returns the plural category for a given value.
       * - "=value" when the case exists,
       * - the plural category otherwise
       */


      function getPluralCategory(value, cases, ngLocalization, locale) {
        var key = "=".concat(value);

        if (cases.indexOf(key) > -1) {
          return key;
        }

        key = ngLocalization.getPluralCategory(value, locale);

        if (cases.indexOf(key) > -1) {
          return key;
        }

        if (cases.indexOf('other') > -1) {
          return 'other';
        }

        throw new Error("No plural message found for value \"".concat(value, "\""));
      }
      /**
       * Returns the plural case based on the locale
       *
       * @publicApi
       */


      var NgLocaleLocalization = /*#__PURE__*/function (_NgLocalization) {
        _inherits(NgLocaleLocalization, _NgLocalization);

        var _super265 = _createSuper(NgLocaleLocalization);

        function NgLocaleLocalization(locale) {
          var _this530;

          _classCallCheck(this, NgLocaleLocalization);

          _this530 = _super265.call(this);
          _this530.locale = locale;
          return _this530;
        }

        _createClass2(NgLocaleLocalization, [{
          key: "getPluralCategory",
          value: function getPluralCategory(value, locale) {
            var plural = getLocalePluralCase(locale || this.locale)(value);

            switch (plural) {
              case Plural.Zero:
                return 'zero';

              case Plural.One:
                return 'one';

              case Plural.Two:
                return 'two';

              case Plural.Few:
                return 'few';

              case Plural.Many:
                return 'many';

              default:
                return 'other';
            }
          }
        }]);

        return NgLocaleLocalization;
      }(NgLocalization);

      NgLocaleLocalization.ɵfac = function NgLocaleLocalization_Factory(t) {
        return new (t || NgLocaleLocalization)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]));
      };

      NgLocaleLocalization.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: NgLocaleLocalization,
        factory: NgLocaleLocalization.ɵfac
      });

      NgLocaleLocalization.ctorParameters = function () {
        return [{
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgLocaleLocalization, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], function () {
          return [{
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Register global data to be used internally by Angular. See the
       * ["I18n guide"](guide/i18n#i18n-pipes) to know how to import additional locale data.
       *
       * The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1
       *
       * @publicApi
       */


      function registerLocaleData(data, localeId, extraData) {
        return Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵregisterLocaleData"])(data, localeId, extraData);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function parseCookieValue(cookieStr, name) {
        name = encodeURIComponent(name);

        var _iterator66 = _createForOfIteratorHelper(cookieStr.split(';')),
            _step65;

        try {
          for (_iterator66.s(); !(_step65 = _iterator66.n()).done;) {
            var cookie = _step65.value;
            var eqIndex = cookie.indexOf('=');

            var _ref93 = eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)],
                _ref94 = _slicedToArray(_ref93, 2),
                cookieName = _ref94[0],
                cookieValue = _ref94[1];

            if (cookieName.trim() === name) {
              return decodeURIComponent(cookieValue);
            }
          }
        } catch (err) {
          _iterator66.e(err);
        } finally {
          _iterator66.f();
        }

        return null;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @ngModule CommonModule
       *
       * @usageNotes
       * ```
       *     <some-element [ngClass]="'first second'">...</some-element>
       *
       *     <some-element [ngClass]="['first', 'second']">...</some-element>
       *
       *     <some-element [ngClass]="{'first': true, 'second': true, 'third': false}">...</some-element>
       *
       *     <some-element [ngClass]="stringExp|arrayExp|objExp">...</some-element>
       *
       *     <some-element [ngClass]="{'class1 class2 class3' : true}">...</some-element>
       * ```
       *
       * @description
       *
       * Adds and removes CSS classes on an HTML element.
       *
       * The CSS classes are updated as follows, depending on the type of the expression evaluation:
       * - `string` - the CSS classes listed in the string (space delimited) are added,
       * - `Array` - the CSS classes declared as Array elements are added,
       * - `Object` - keys are CSS classes that get added when the expression given in the value
       *              evaluates to a truthy value, otherwise they are removed.
       *
       * @publicApi
       */


      var NgClass = /*#__PURE__*/function () {
        function NgClass(_iterableDiffers, _keyValueDiffers, _ngEl, _renderer) {
          _classCallCheck(this, NgClass);

          this._iterableDiffers = _iterableDiffers;
          this._keyValueDiffers = _keyValueDiffers;
          this._ngEl = _ngEl;
          this._renderer = _renderer;
          this._iterableDiffer = null;
          this._keyValueDiffer = null;
          this._initialClasses = [];
          this._rawClass = null;
        }

        _createClass2(NgClass, [{
          key: "klass",
          set: function set(value) {
            this._removeClasses(this._initialClasses);

            this._initialClasses = typeof value === 'string' ? value.split(/\s+/) : [];

            this._applyClasses(this._initialClasses);

            this._applyClasses(this._rawClass);
          }
        }, {
          key: "ngClass",
          set: function set(value) {
            this._removeClasses(this._rawClass);

            this._applyClasses(this._initialClasses);

            this._iterableDiffer = null;
            this._keyValueDiffer = null;
            this._rawClass = typeof value === 'string' ? value.split(/\s+/) : value;

            if (this._rawClass) {
              if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisListLikeIterable"])(this._rawClass)) {
                this._iterableDiffer = this._iterableDiffers.find(this._rawClass).create();
              } else {
                this._keyValueDiffer = this._keyValueDiffers.find(this._rawClass).create();
              }
            }
          }
        }, {
          key: "ngDoCheck",
          value: function ngDoCheck() {
            if (this._iterableDiffer) {
              var iterableChanges = this._iterableDiffer.diff(this._rawClass);

              if (iterableChanges) {
                this._applyIterableChanges(iterableChanges);
              }
            } else if (this._keyValueDiffer) {
              var keyValueChanges = this._keyValueDiffer.diff(this._rawClass);

              if (keyValueChanges) {
                this._applyKeyValueChanges(keyValueChanges);
              }
            }
          }
        }, {
          key: "_applyKeyValueChanges",
          value: function _applyKeyValueChanges(changes) {
            var _this531 = this;

            changes.forEachAddedItem(function (record) {
              return _this531._toggleClass(record.key, record.currentValue);
            });
            changes.forEachChangedItem(function (record) {
              return _this531._toggleClass(record.key, record.currentValue);
            });
            changes.forEachRemovedItem(function (record) {
              if (record.previousValue) {
                _this531._toggleClass(record.key, false);
              }
            });
          }
        }, {
          key: "_applyIterableChanges",
          value: function _applyIterableChanges(changes) {
            var _this532 = this;

            changes.forEachAddedItem(function (record) {
              if (typeof record.item === 'string') {
                _this532._toggleClass(record.item, true);
              } else {
                throw new Error("NgClass can only toggle CSS classes expressed as strings, got ".concat(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(record.item)));
              }
            });
            changes.forEachRemovedItem(function (record) {
              return _this532._toggleClass(record.item, false);
            });
          }
          /**
           * Applies a collection of CSS classes to the DOM element.
           *
           * For argument of type Set and Array CSS class names contained in those collections are always
           * added.
           * For argument of type Map CSS class name in the map's key is toggled based on the value (added
           * for truthy and removed for falsy).
           */

        }, {
          key: "_applyClasses",
          value: function _applyClasses(rawClassVal) {
            var _this533 = this;

            if (rawClassVal) {
              if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {
                rawClassVal.forEach(function (klass) {
                  return _this533._toggleClass(klass, true);
                });
              } else {
                Object.keys(rawClassVal).forEach(function (klass) {
                  return _this533._toggleClass(klass, !!rawClassVal[klass]);
                });
              }
            }
          }
          /**
           * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup
           * purposes.
           */

        }, {
          key: "_removeClasses",
          value: function _removeClasses(rawClassVal) {
            var _this534 = this;

            if (rawClassVal) {
              if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {
                rawClassVal.forEach(function (klass) {
                  return _this534._toggleClass(klass, false);
                });
              } else {
                Object.keys(rawClassVal).forEach(function (klass) {
                  return _this534._toggleClass(klass, false);
                });
              }
            }
          }
        }, {
          key: "_toggleClass",
          value: function _toggleClass(klass, enabled) {
            var _this535 = this;

            klass = klass.trim();

            if (klass) {
              klass.split(/\s+/g).forEach(function (klass) {
                if (enabled) {
                  _this535._renderer.addClass(_this535._ngEl.nativeElement, klass);
                } else {
                  _this535._renderer.removeClass(_this535._ngEl.nativeElement, klass);
                }
              });
            }
          }
        }]);

        return NgClass;
      }();

      NgClass.ɵfac = function NgClass_Factory(t) {
        return new (t || NgClass)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]));
      };

      NgClass.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgClass,
        selectors: [["", "ngClass", ""]],
        inputs: {
          klass: ["class", "klass"],
          ngClass: "ngClass"
        }
      });

      NgClass.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
        }];
      };

      NgClass.propDecorators = {
        klass: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['class']
        }],
        ngClass: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['ngClass']
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgClass, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ngClass]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
          }];
        }, {
          klass: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['class']
          }],
          ngClass: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['ngClass']
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Instantiates a single {@link Component} type and inserts its Host View into current View.
       * `NgComponentOutlet` provides a declarative approach for dynamic component creation.
       *
       * `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and
       * any existing component will get destroyed.
       *
       * @usageNotes
       *
       * ### Fine tune control
       *
       * You can control the component creation process by using the following optional attributes:
       *
       * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for
       * the Component. Defaults to the injector of the current view container.
       *
       * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content
       * section of the component, if exists.
       *
       * * `ngComponentOutletNgModuleFactory`: Optional module factory to allow dynamically loading other
       * module, then load a component from that module.
       *
       * ### Syntax
       *
       * Simple
       * ```
       * <ng-container *ngComponentOutlet="componentTypeExpression"></ng-container>
       * ```
       *
       * Customized injector/content
       * ```
       * <ng-container *ngComponentOutlet="componentTypeExpression;
       *                                   injector: injectorExpression;
       *                                   content: contentNodesExpression;">
       * </ng-container>
       * ```
       *
       * Customized ngModuleFactory
       * ```
       * <ng-container *ngComponentOutlet="componentTypeExpression;
       *                                   ngModuleFactory: moduleFactory;">
       * </ng-container>
       * ```
       *
       * ### A simple example
       *
       * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'}
       *
       * A more complete example with additional options:
       *
       * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'}
       *
       * @publicApi
       * @ngModule CommonModule
       */


      var NgComponentOutlet = /*#__PURE__*/function () {
        function NgComponentOutlet(_viewContainerRef) {
          _classCallCheck(this, NgComponentOutlet);

          this._viewContainerRef = _viewContainerRef;
          this._componentRef = null;
          this._moduleRef = null;
        }

        _createClass2(NgComponentOutlet, [{
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            this._viewContainerRef.clear();

            this._componentRef = null;

            if (this.ngComponentOutlet) {
              var elInjector = this.ngComponentOutletInjector || this._viewContainerRef.parentInjector;

              if (changes['ngComponentOutletNgModuleFactory']) {
                if (this._moduleRef) this._moduleRef.destroy();

                if (this.ngComponentOutletNgModuleFactory) {
                  var parentModule = elInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModuleRef"]);
                  this._moduleRef = this.ngComponentOutletNgModuleFactory.create(parentModule.injector);
                } else {
                  this._moduleRef = null;
                }
              }

              var componentFactoryResolver = this._moduleRef ? this._moduleRef.componentFactoryResolver : elInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ComponentFactoryResolver"]);
              var componentFactory = componentFactoryResolver.resolveComponentFactory(this.ngComponentOutlet);
              this._componentRef = this._viewContainerRef.createComponent(componentFactory, this._viewContainerRef.length, elInjector, this.ngComponentOutletContent);
            }
          }
        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            if (this._moduleRef) this._moduleRef.destroy();
          }
        }]);

        return NgComponentOutlet;
      }();

      NgComponentOutlet.ɵfac = function NgComponentOutlet_Factory(t) {
        return new (t || NgComponentOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]));
      };

      NgComponentOutlet.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgComponentOutlet,
        selectors: [["", "ngComponentOutlet", ""]],
        inputs: {
          ngComponentOutlet: "ngComponentOutlet",
          ngComponentOutletInjector: "ngComponentOutletInjector",
          ngComponentOutletContent: "ngComponentOutletContent",
          ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]]
      });

      NgComponentOutlet.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
        }];
      };

      NgComponentOutlet.propDecorators = {
        ngComponentOutlet: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        ngComponentOutletInjector: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        ngComponentOutletContent: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        ngComponentOutletNgModuleFactory: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgComponentOutlet, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ngComponentOutlet]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
          }];
        }, {
          ngComponentOutlet: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          ngComponentOutletInjector: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          ngComponentOutletContent: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          ngComponentOutletNgModuleFactory: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @publicApi
       */


      var NgForOfContext = /*#__PURE__*/function () {
        function NgForOfContext($implicit, ngForOf, index, count) {
          _classCallCheck(this, NgForOfContext);

          this.$implicit = $implicit;
          this.ngForOf = ngForOf;
          this.index = index;
          this.count = count;
        }

        _createClass2(NgForOfContext, [{
          key: "first",
          get: function get() {
            return this.index === 0;
          }
        }, {
          key: "last",
          get: function get() {
            return this.index === this.count - 1;
          }
        }, {
          key: "even",
          get: function get() {
            return this.index % 2 === 0;
          }
        }, {
          key: "odd",
          get: function get() {
            return !this.even;
          }
        }]);

        return NgForOfContext;
      }();
      /**
       * A [structural directive](guide/structural-directives) that renders
       * a template for each item in a collection.
       * The directive is placed on an element, which becomes the parent
       * of the cloned templates.
       *
       * The `ngForOf` directive is generally used in the
       * [shorthand form](guide/structural-directives#the-asterisk--prefix) `*ngFor`.
       * In this form, the template to be rendered for each iteration is the content
       * of an anchor element containing the directive.
       *
       * The following example shows the shorthand syntax with some options,
       * contained in an `<li>` element.
       *
       * ```
       * <li *ngFor="let item of items; index as i; trackBy: trackByFn">...</li>
       * ```
       *
       * The shorthand form expands into a long form that uses the `ngForOf` selector
       * on an `<ng-template>` element.
       * The content of the `<ng-template>` element is the `<li>` element that held the
       * short-form directive.
       *
       * Here is the expanded version of the short-form example.
       *
       * ```
       * <ng-template ngFor let-item [ngForOf]="items" let-i="index" [ngForTrackBy]="trackByFn">
       *   <li>...</li>
       * </ng-template>
       * ```
       *
       * Angular automatically expands the shorthand syntax as it compiles the template.
       * The context for each embedded view is logically merged to the current component
       * context according to its lexical position.
       *
       * When using the shorthand syntax, Angular allows only [one structural directive
       * on an element](guide/structural-directives#one-structural-directive-per-host-element).
       * If you want to iterate conditionally, for example,
       * put the `*ngIf` on a container element that wraps the `*ngFor` element.
       * For futher discussion, see
       * [Structural Directives](guide/structural-directives#one-per-element).
       *
       * @usageNotes
       *
       * ### Local variables
       *
       * `NgForOf` provides exported values that can be aliased to local variables.
       * For example:
       *
       *  ```
       * <li *ngFor="let user of users; index as i; first as isFirst">
       *    {{i}}/{{users.length}}. {{user}} <span *ngIf="isFirst">default</span>
       * </li>
       * ```
       *
       * The following exported values can be aliased to local variables:
       *
       * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`).
       * - `ngForOf: NgIterable<T>`: The value of the iterable expression. Useful when the expression is
       * more complex then a property access, for example when using the async pipe (`userStreams |
       * async`).
       * - `index: number`: The index of the current item in the iterable.
       * - `count: number`: The length of the iterable.
       * - `first: boolean`: True when the item is the first item in the iterable.
       * - `last: boolean`: True when the item is the last item in the iterable.
       * - `even: boolean`: True when the item has an even index in the iterable.
       * - `odd: boolean`: True when the item has an odd index in the iterable.
       *
       * ### Change propagation
       *
       * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM:
       *
       * * When an item is added, a new instance of the template is added to the DOM.
       * * When an item is removed, its template instance is removed from the DOM.
       * * When items are reordered, their respective templates are reordered in the DOM.
       *
       * Angular uses object identity to track insertions and deletions within the iterator and reproduce
       * those changes in the DOM. This has important implications for animations and any stateful
       * controls that are present, such as `<input>` elements that accept user input. Inserted rows can
       * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state
       * such as user input.
       * For more on animations, see [Transitions and Triggers](guide/transition-and-triggers).
       *
       * The identities of elements in the iterator can change while the data does not.
       * This can happen, for example, if the iterator is produced from an RPC to the server, and that
       * RPC is re-run. Even if the data hasn't changed, the second response produces objects with
       * different identities, and Angular must tear down the entire DOM and rebuild it (as if all old
       * elements were deleted and all new elements inserted).
       *
       * To avoid this expensive operation, you can customize the default tracking algorithm.
       * by supplying the `trackBy` option to `NgForOf`.
       * `trackBy` takes a function that has two arguments: `index` and `item`.
       * If `trackBy` is given, Angular tracks changes by the return value of the function.
       *
       * @see [Structural Directives](guide/structural-directives)
       * @ngModule CommonModule
       * @publicApi
       */


      var NgForOf = /*#__PURE__*/function () {
        function NgForOf(_viewContainer, _template, _differs) {
          _classCallCheck(this, NgForOf);

          this._viewContainer = _viewContainer;
          this._template = _template;
          this._differs = _differs;
          this._ngForOf = null;
          this._ngForOfDirty = true;
          this._differ = null;
        }
        /**
         * The value of the iterable expression, which can be used as a
         * [template input variable](guide/structural-directives#template-input-variable).
         */


        _createClass2(NgForOf, [{
          key: "ngForOf",
          set: function set(ngForOf) {
            this._ngForOf = ngForOf;
            this._ngForOfDirty = true;
          }
          /**
           * A function that defines how to track changes for items in the iterable.
           *
           * When items are added, moved, or removed in the iterable,
           * the directive must re-render the appropriate DOM nodes.
           * To minimize churn in the DOM, only nodes that have changed
           * are re-rendered.
           *
           * By default, the change detector assumes that
           * the object instance identifies the node in the iterable.
           * When this function is supplied, the directive uses
           * the result of calling this function to identify the item node,
           * rather than the identity of the object itself.
           *
           * The function receives two inputs,
           * the iteration index and the associated node data.
           */

        }, {
          key: "ngForTrackBy",
          get: function get() {
            return this._trackByFn;
          }
          /**
           * A reference to the template that is stamped out for each item in the iterable.
           * @see [template reference variable](guide/template-reference-variables)
           */
          ,
          set: function set(fn) {
            if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') {
              // TODO(vicb): use a log service once there is a public one available
              if (console && console.warn) {
                console.warn("trackBy must be a function, but received ".concat(JSON.stringify(fn), ". ") + "See https://angular.io/api/common/NgForOf#change-propagation for more information.");
              }
            }

            this._trackByFn = fn;
          }
        }, {
          key: "ngForTemplate",
          set: function set(value) {
            // TODO(TS2.1): make TemplateRef<Partial<NgForRowOf<T>>> once we move to TS v2.1
            // The current type is too restrictive; a template that just uses index, for example,
            // should be acceptable.
            if (value) {
              this._template = value;
            }
          }
          /**
           * Applies the changes when needed.
           */

        }, {
          key: "ngDoCheck",
          value: function ngDoCheck() {
            if (this._ngForOfDirty) {
              this._ngForOfDirty = false; // React on ngForOf changes only once all inputs have been initialized

              var value = this._ngForOf;

              if (!this._differ && value) {
                try {
                  this._differ = this._differs.find(value).create(this.ngForTrackBy);
                } catch (_a) {
                  throw new Error("Cannot find a differ supporting object '".concat(value, "' of type '").concat(getTypeName(value), "'. NgFor only supports binding to Iterables such as Arrays."));
                }
              }
            }

            if (this._differ) {
              var changes = this._differ.diff(this._ngForOf);

              if (changes) this._applyChanges(changes);
            }
          }
        }, {
          key: "_applyChanges",
          value: function _applyChanges(changes) {
            var _this536 = this;

            var insertTuples = [];
            changes.forEachOperation(function (item, adjustedPreviousIndex, currentIndex) {
              if (item.previousIndex == null) {
                // NgForOf is never "null" or "undefined" here because the differ detected
                // that a new item needs to be inserted from the iterable. This implies that
                // there is an iterable value for "_ngForOf".
                var view = _this536._viewContainer.createEmbeddedView(_this536._template, new NgForOfContext(null, _this536._ngForOf, -1, -1), currentIndex === null ? undefined : currentIndex);

                var tuple = new RecordViewTuple(item, view);
                insertTuples.push(tuple);
              } else if (currentIndex == null) {
                _this536._viewContainer.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);
              } else if (adjustedPreviousIndex !== null) {
                var _view3 = _this536._viewContainer.get(adjustedPreviousIndex);

                _this536._viewContainer.move(_view3, currentIndex);

                var _tuple = new RecordViewTuple(item, _view3);

                insertTuples.push(_tuple);
              }
            });

            for (var i = 0; i < insertTuples.length; i++) {
              this._perViewChange(insertTuples[i].view, insertTuples[i].record);
            }

            for (var _i41 = 0, ilen = this._viewContainer.length; _i41 < ilen; _i41++) {
              var viewRef = this._viewContainer.get(_i41);

              viewRef.context.index = _i41;
              viewRef.context.count = ilen;
              viewRef.context.ngForOf = this._ngForOf;
            }

            changes.forEachIdentityChange(function (record) {
              var viewRef = _this536._viewContainer.get(record.currentIndex);

              viewRef.context.$implicit = record.item;
            });
          }
        }, {
          key: "_perViewChange",
          value: function _perViewChange(view, record) {
            view.context.$implicit = record.item;
          }
          /**
           * Asserts the correct type of the context for the template that `NgForOf` will render.
           *
           * The presence of this method is a signal to the Ivy template type-check compiler that the
           * `NgForOf` structural directive renders its template with a specific context type.
           */

        }], [{
          key: "ngTemplateContextGuard",
          value: function ngTemplateContextGuard(dir, ctx) {
            return true;
          }
        }]);

        return NgForOf;
      }();

      NgForOf.ɵfac = function NgForOf_Factory(t) {
        return new (t || NgForOf)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"]));
      };

      NgForOf.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgForOf,
        selectors: [["", "ngFor", "", "ngForOf", ""]],
        inputs: {
          ngForOf: "ngForOf",
          ngForTrackBy: "ngForTrackBy",
          ngForTemplate: "ngForTemplate"
        }
      });

      NgForOf.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"]
        }];
      };

      NgForOf.propDecorators = {
        ngForOf: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        ngForTrackBy: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        ngForTemplate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgForOf, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ngFor][ngForOf]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"]
          }];
        }, {
          ngForOf: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          ngForTrackBy: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          ngForTemplate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();

      var RecordViewTuple = function RecordViewTuple(record, view) {
        _classCallCheck(this, RecordViewTuple);

        this.record = record;
        this.view = view;
      };

      function getTypeName(type) {
        return type['name'] || typeof type;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A structural directive that conditionally includes a template based on the value of
       * an expression coerced to Boolean.
       * When the expression evaluates to true, Angular renders the template
       * provided in a `then` clause, and when  false or null,
       * Angular renders the template provided in an optional `else` clause. The default
       * template for the `else` clause is blank.
       *
       * A [shorthand form](guide/structural-directives#the-asterisk--prefix) of the directive,
       * `*ngIf="condition"`, is generally used, provided
       * as an attribute of the anchor element for the inserted template.
       * Angular expands this into a more explicit version, in which the anchor element
       * is contained in an `<ng-template>` element.
       *
       * Simple form with shorthand syntax:
       *
       * ```
       * <div *ngIf="condition">Content to render when condition is true.</div>
       * ```
       *
       * Simple form with expanded syntax:
       *
       * ```
       * <ng-template [ngIf]="condition"><div>Content to render when condition is
       * true.</div></ng-template>
       * ```
       *
       * Form with an "else" block:
       *
       * ```
       * <div *ngIf="condition; else elseBlock">Content to render when condition is true.</div>
       * <ng-template #elseBlock>Content to render when condition is false.</ng-template>
       * ```
       *
       * Shorthand form with "then" and "else" blocks:
       *
       * ```
       * <div *ngIf="condition; then thenBlock else elseBlock"></div>
       * <ng-template #thenBlock>Content to render when condition is true.</ng-template>
       * <ng-template #elseBlock>Content to render when condition is false.</ng-template>
       * ```
       *
       * Form with storing the value locally:
       *
       * ```
       * <div *ngIf="condition as value; else elseBlock">{{value}}</div>
       * <ng-template #elseBlock>Content to render when value is null.</ng-template>
       * ```
       *
       * @usageNotes
       *
       * The `*ngIf` directive is most commonly used to conditionally show an inline template,
       * as seen in the following  example.
       * The default `else` template is blank.
       *
       * {@example common/ngIf/ts/module.ts region='NgIfSimple'}
       *
       * ### Showing an alternative template using `else`
       *
       * To display a template when `expression` evaluates to false, use an `else` template
       * binding as shown in the following example.
       * The `else` binding points to an `<ng-template>`  element labeled `#elseBlock`.
       * The template can be defined anywhere in the component view, but is typically placed right after
       * `ngIf` for readability.
       *
       * {@example common/ngIf/ts/module.ts region='NgIfElse'}
       *
       * ### Using an external `then` template
       *
       * In the previous example, the then-clause template is specified inline, as the content of the
       * tag that contains the `ngIf` directive. You can also specify a template that is defined
       * externally, by referencing a labeled `<ng-template>` element. When you do this, you can
       * change which template to use at runtime, as shown in the following example.
       *
       * {@example common/ngIf/ts/module.ts region='NgIfThenElse'}
       *
       * ### Storing a conditional result in a variable
       *
       * You might want to show a set of properties from the same object. If you are waiting
       * for asynchronous data, the object can be undefined.
       * In this case, you can use `ngIf` and store the result of the condition in a local
       * variable as shown in the the following example.
       *
       * {@example common/ngIf/ts/module.ts region='NgIfAs'}
       *
       * This code uses only one `AsyncPipe`, so only one subscription is created.
       * The conditional statement stores the result of `userStream|async` in the local variable `user`.
       * You can then bind the local `user` repeatedly.
       *
       * The conditional displays the data only if `userStream` returns a value,
       * so you don't need to use the
       * safe-navigation-operator (`?.`)
       * to guard against null values when accessing properties.
       * You can display an alternative template while waiting for the data.
       *
       * ### Shorthand syntax
       *
       * The shorthand syntax `*ngIf` expands into two separate template specifications
       * for the "then" and "else" clauses. For example, consider the following shorthand statement,
       * that is meant to show a loading page while waiting for data to be loaded.
       *
       * ```
       * <div class="hero-list" *ngIf="heroes else loading">
       *  ...
       * </div>
       *
       * <ng-template #loading>
       *  <div>Loading...</div>
       * </ng-template>
       * ```
       *
       * You can see that the "else" clause references the `<ng-template>`
       * with the `#loading` label, and the template for the "then" clause
       * is provided as the content of the anchor element.
       *
       * However, when Angular expands the shorthand syntax, it creates
       * another `<ng-template>` tag, with `ngIf` and `ngIfElse` directives.
       * The anchor element containing the template for the "then" clause becomes
       * the content of this unlabeled `<ng-template>` tag.
       *
       * ```
       * <ng-template [ngIf]="heroes" [ngIfElse]="loading">
       *  <div class="hero-list">
       *   ...
       *  </div>
       * </ng-template>
       *
       * <ng-template #loading>
       *  <div>Loading...</div>
       * </ng-template>
       * ```
       *
       * The presence of the implicit template object has implications for the nesting of
       * structural directives. For more on this subject, see
       * [Structural Directives](https://angular.io/guide/structural-directives#one-per-element).
       *
       * @ngModule CommonModule
       * @publicApi
       */


      var NgIf = /*#__PURE__*/function () {
        function NgIf(_viewContainer, templateRef) {
          _classCallCheck(this, NgIf);

          this._viewContainer = _viewContainer;
          this._context = new NgIfContext();
          this._thenTemplateRef = null;
          this._elseTemplateRef = null;
          this._thenViewRef = null;
          this._elseViewRef = null;
          this._thenTemplateRef = templateRef;
        }
        /**
         * The Boolean expression to evaluate as the condition for showing a template.
         */


        _createClass2(NgIf, [{
          key: "ngIf",
          set: function set(condition) {
            this._context.$implicit = this._context.ngIf = condition;

            this._updateView();
          }
          /**
           * A template to show if the condition expression evaluates to true.
           */

        }, {
          key: "ngIfThen",
          set: function set(templateRef) {
            assertTemplate('ngIfThen', templateRef);
            this._thenTemplateRef = templateRef;
            this._thenViewRef = null; // clear previous view if any.

            this._updateView();
          }
          /**
           * A template to show if the condition expression evaluates to false.
           */

        }, {
          key: "ngIfElse",
          set: function set(templateRef) {
            assertTemplate('ngIfElse', templateRef);
            this._elseTemplateRef = templateRef;
            this._elseViewRef = null; // clear previous view if any.

            this._updateView();
          }
        }, {
          key: "_updateView",
          value: function _updateView() {
            if (this._context.$implicit) {
              if (!this._thenViewRef) {
                this._viewContainer.clear();

                this._elseViewRef = null;

                if (this._thenTemplateRef) {
                  this._thenViewRef = this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);
                }
              }
            } else {
              if (!this._elseViewRef) {
                this._viewContainer.clear();

                this._thenViewRef = null;

                if (this._elseTemplateRef) {
                  this._elseViewRef = this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);
                }
              }
            }
          }
          /**
           * Asserts the correct type of the context for the template that `NgIf` will render.
           *
           * The presence of this method is a signal to the Ivy template type-check compiler that the
           * `NgIf` structural directive renders its template with a specific context type.
           */

        }], [{
          key: "ngTemplateContextGuard",
          value: function ngTemplateContextGuard(dir, ctx) {
            return true;
          }
        }]);

        return NgIf;
      }();

      NgIf.ɵfac = function NgIf_Factory(t) {
        return new (t || NgIf)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]));
      };

      NgIf.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgIf,
        selectors: [["", "ngIf", ""]],
        inputs: {
          ngIf: "ngIf",
          ngIfThen: "ngIfThen",
          ngIfElse: "ngIfElse"
        }
      });

      NgIf.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }];
      };

      NgIf.propDecorators = {
        ngIf: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        ngIfThen: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        ngIfElse: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgIf, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ngIf]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }];
        }, {
          ngIf: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          ngIfThen: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          ngIfElse: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();
      /**
       * @publicApi
       */


      var NgIfContext = function NgIfContext() {
        _classCallCheck(this, NgIfContext);

        this.$implicit = null;
        this.ngIf = null;
      };

      function assertTemplate(property, templateRef) {
        var isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);

        if (!isTemplateRefOrNull) {
          throw new Error("".concat(property, " must be a TemplateRef, but received '").concat(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(templateRef), "'."));
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var SwitchView = /*#__PURE__*/function () {
        function SwitchView(_viewContainerRef, _templateRef) {
          _classCallCheck(this, SwitchView);

          this._viewContainerRef = _viewContainerRef;
          this._templateRef = _templateRef;
          this._created = false;
        }

        _createClass2(SwitchView, [{
          key: "create",
          value: function create() {
            this._created = true;

            this._viewContainerRef.createEmbeddedView(this._templateRef);
          }
        }, {
          key: "destroy",
          value: function destroy() {
            this._created = false;

            this._viewContainerRef.clear();
          }
        }, {
          key: "enforceState",
          value: function enforceState(created) {
            if (created && !this._created) {
              this.create();
            } else if (!created && this._created) {
              this.destroy();
            }
          }
        }]);

        return SwitchView;
      }();
      /**
       * @ngModule CommonModule
       *
       * @description
       * The `[ngSwitch]` directive on a container specifies an expression to match against.
       * The expressions to match are provided by `ngSwitchCase` directives on views within the container.
       * - Every view that matches is rendered.
       * - If there are no matches, a view with the `ngSwitchDefault` directive is rendered.
       * - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase`
       * or `ngSwitchDefault` directive are preserved at the location.
       *
       * @usageNotes
       * Define a container element for the directive, and specify the switch expression
       * to match against as an attribute:
       *
       * ```
       * <container-element [ngSwitch]="switch_expression">
       * ```
       *
       * Within the container, `*ngSwitchCase` statements specify the match expressions
       * as attributes. Include `*ngSwitchDefault` as the final case.
       *
       * ```
       * <container-element [ngSwitch]="switch_expression">
       *    <some-element *ngSwitchCase="match_expression_1">...</some-element>
       * ...
       *    <some-element *ngSwitchDefault>...</some-element>
       * </container-element>
       * ```
       *
       * ### Usage Examples
       *
       * The following example shows how to use more than one case to display the same view:
       *
       * ```
       * <container-element [ngSwitch]="switch_expression">
       *   <!-- the same view can be shown in more than one case -->
       *   <some-element *ngSwitchCase="match_expression_1">...</some-element>
       *   <some-element *ngSwitchCase="match_expression_2">...</some-element>
       *   <some-other-element *ngSwitchCase="match_expression_3">...</some-other-element>
       *   <!--default case when there are no matches -->
       *   <some-element *ngSwitchDefault>...</some-element>
       * </container-element>
       * ```
       *
       * The following example shows how cases can be nested:
       * ```
       * <container-element [ngSwitch]="switch_expression">
       *       <some-element *ngSwitchCase="match_expression_1">...</some-element>
       *       <some-element *ngSwitchCase="match_expression_2">...</some-element>
       *       <some-other-element *ngSwitchCase="match_expression_3">...</some-other-element>
       *       <ng-container *ngSwitchCase="match_expression_3">
       *         <!-- use a ng-container to group multiple root nodes -->
       *         <inner-element></inner-element>
       *         <inner-other-element></inner-other-element>
       *       </ng-container>
       *       <some-element *ngSwitchDefault>...</some-element>
       *     </container-element>
       * ```
       *
       * @publicApi
       * @see `NgSwitchCase`
       * @see `NgSwitchDefault`
       * @see [Structural Directives](guide/structural-directives)
       *
       */


      var NgSwitch = /*#__PURE__*/function () {
        function NgSwitch() {
          _classCallCheck(this, NgSwitch);

          this._defaultUsed = false;
          this._caseCount = 0;
          this._lastCaseCheckIndex = 0;
          this._lastCasesMatched = false;
        }

        _createClass2(NgSwitch, [{
          key: "ngSwitch",
          set: function set(newValue) {
            this._ngSwitch = newValue;

            if (this._caseCount === 0) {
              this._updateDefaultCases(true);
            }
          }
          /** @internal */

        }, {
          key: "_addCase",
          value: function _addCase() {
            return this._caseCount++;
          }
          /** @internal */

        }, {
          key: "_addDefault",
          value: function _addDefault(view) {
            if (!this._defaultViews) {
              this._defaultViews = [];
            }

            this._defaultViews.push(view);
          }
          /** @internal */

        }, {
          key: "_matchCase",
          value: function _matchCase(value) {
            var matched = value == this._ngSwitch;
            this._lastCasesMatched = this._lastCasesMatched || matched;
            this._lastCaseCheckIndex++;

            if (this._lastCaseCheckIndex === this._caseCount) {
              this._updateDefaultCases(!this._lastCasesMatched);

              this._lastCaseCheckIndex = 0;
              this._lastCasesMatched = false;
            }

            return matched;
          }
        }, {
          key: "_updateDefaultCases",
          value: function _updateDefaultCases(useDefault) {
            if (this._defaultViews && useDefault !== this._defaultUsed) {
              this._defaultUsed = useDefault;

              for (var i = 0; i < this._defaultViews.length; i++) {
                var defaultView = this._defaultViews[i];
                defaultView.enforceState(useDefault);
              }
            }
          }
        }]);

        return NgSwitch;
      }();

      NgSwitch.ɵfac = function NgSwitch_Factory(t) {
        return new (t || NgSwitch)();
      };

      NgSwitch.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgSwitch,
        selectors: [["", "ngSwitch", ""]],
        inputs: {
          ngSwitch: "ngSwitch"
        }
      });
      NgSwitch.propDecorators = {
        ngSwitch: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitch, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ngSwitch]'
          }]
        }], function () {
          return [];
        }, {
          ngSwitch: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();
      /**
       * @ngModule CommonModule
       *
       * @description
       * Provides a switch case expression to match against an enclosing `ngSwitch` expression.
       * When the expressions match, the given `NgSwitchCase` template is rendered.
       * If multiple match expressions match the switch expression value, all of them are displayed.
       *
       * @usageNotes
       *
       * Within a switch container, `*ngSwitchCase` statements specify the match expressions
       * as attributes. Include `*ngSwitchDefault` as the final case.
       *
       * ```
       * <container-element [ngSwitch]="switch_expression">
       *   <some-element *ngSwitchCase="match_expression_1">...</some-element>
       *   ...
       *   <some-element *ngSwitchDefault>...</some-element>
       * </container-element>
       * ```
       *
       * Each switch-case statement contains an in-line HTML template or template reference
       * that defines the subtree to be selected if the value of the match expression
       * matches the value of the switch expression.
       *
       * Unlike JavaScript, which uses strict equality, Angular uses loose equality.
       * This means that the empty string, `""` matches 0.
       *
       * @publicApi
       * @see `NgSwitch`
       * @see `NgSwitchDefault`
       *
       */


      var NgSwitchCase = /*#__PURE__*/function () {
        function NgSwitchCase(viewContainer, templateRef, ngSwitch) {
          _classCallCheck(this, NgSwitchCase);

          this.ngSwitch = ngSwitch;

          ngSwitch._addCase();

          this._view = new SwitchView(viewContainer, templateRef);
        }
        /**
         * Performs case matching. For internal use only.
         */


        _createClass2(NgSwitchCase, [{
          key: "ngDoCheck",
          value: function ngDoCheck() {
            this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));
          }
        }]);

        return NgSwitchCase;
      }();

      NgSwitchCase.ɵfac = function NgSwitchCase_Factory(t) {
        return new (t || NgSwitchCase)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgSwitch, 1));
      };

      NgSwitchCase.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgSwitchCase,
        selectors: [["", "ngSwitchCase", ""]],
        inputs: {
          ngSwitchCase: "ngSwitchCase"
        }
      });

      NgSwitchCase.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }, {
          type: NgSwitch,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
          }]
        }];
      };

      NgSwitchCase.propDecorators = {
        ngSwitchCase: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitchCase, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ngSwitchCase]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }, {
            type: NgSwitch,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
            }]
          }];
        }, {
          ngSwitchCase: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();
      /**
       * @ngModule CommonModule
       *
       * @description
       *
       * Creates a view that is rendered when no `NgSwitchCase` expressions
       * match the `NgSwitch` expression.
       * This statement should be the final case in an `NgSwitch`.
       *
       * @publicApi
       * @see `NgSwitch`
       * @see `NgSwitchCase`
       *
       */


      var NgSwitchDefault = function NgSwitchDefault(viewContainer, templateRef, ngSwitch) {
        _classCallCheck(this, NgSwitchDefault);

        ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
      };

      NgSwitchDefault.ɵfac = function NgSwitchDefault_Factory(t) {
        return new (t || NgSwitchDefault)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgSwitch, 1));
      };

      NgSwitchDefault.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgSwitchDefault,
        selectors: [["", "ngSwitchDefault", ""]]
      });

      NgSwitchDefault.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }, {
          type: NgSwitch,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitchDefault, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ngSwitchDefault]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }, {
            type: NgSwitch,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @ngModule CommonModule
       *
       * @usageNotes
       * ```
       * <some-element [ngPlural]="value">
       *   <ng-template ngPluralCase="=0">there is nothing</ng-template>
       *   <ng-template ngPluralCase="=1">there is one</ng-template>
       *   <ng-template ngPluralCase="few">there are a few</ng-template>
       * </some-element>
       * ```
       *
       * @description
       *
       * Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization.
       *
       * Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees
       * that match the switch expression's pluralization category.
       *
       * To use this directive you must provide a container element that sets the `[ngPlural]` attribute
       * to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their
       * expression:
       * - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value
       *   matches the switch expression exactly,
       * - otherwise, the view will be treated as a "category match", and will only display if exact
       *   value matches aren't found and the value maps to its category for the defined locale.
       *
       * See http://cldr.unicode.org/index/cldr-spec/plural-rules
       *
       * @publicApi
       */


      var NgPlural = /*#__PURE__*/function () {
        function NgPlural(_localization) {
          _classCallCheck(this, NgPlural);

          this._localization = _localization;
          this._caseViews = {};
        }

        _createClass2(NgPlural, [{
          key: "ngPlural",
          set: function set(value) {
            this._switchValue = value;

            this._updateView();
          }
        }, {
          key: "addCase",
          value: function addCase(value, switchView) {
            this._caseViews[value] = switchView;
          }
        }, {
          key: "_updateView",
          value: function _updateView() {
            this._clearViews();

            var cases = Object.keys(this._caseViews);
            var key = getPluralCategory(this._switchValue, cases, this._localization);

            this._activateView(this._caseViews[key]);
          }
        }, {
          key: "_clearViews",
          value: function _clearViews() {
            if (this._activeView) this._activeView.destroy();
          }
        }, {
          key: "_activateView",
          value: function _activateView(view) {
            if (view) {
              this._activeView = view;

              this._activeView.create();
            }
          }
        }]);

        return NgPlural;
      }();

      NgPlural.ɵfac = function NgPlural_Factory(t) {
        return new (t || NgPlural)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgLocalization));
      };

      NgPlural.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgPlural,
        selectors: [["", "ngPlural", ""]],
        inputs: {
          ngPlural: "ngPlural"
        }
      });

      NgPlural.ctorParameters = function () {
        return [{
          type: NgLocalization
        }];
      };

      NgPlural.propDecorators = {
        ngPlural: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgPlural, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ngPlural]'
          }]
        }], function () {
          return [{
            type: NgLocalization
          }];
        }, {
          ngPlural: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();
      /**
       * @ngModule CommonModule
       *
       * @description
       *
       * Creates a view that will be added/removed from the parent {@link NgPlural} when the
       * given expression matches the plural expression according to CLDR rules.
       *
       * @usageNotes
       * ```
       * <some-element [ngPlural]="value">
       *   <ng-template ngPluralCase="=0">...</ng-template>
       *   <ng-template ngPluralCase="other">...</ng-template>
       * </some-element>
       *```
       *
       * See {@link NgPlural} for more details and example.
       *
       * @publicApi
       */


      var NgPluralCase = function NgPluralCase(value, template, viewContainer, ngPlural) {
        _classCallCheck(this, NgPluralCase);

        this.value = value;
        var isANumber = !isNaN(Number(value));
        ngPlural.addCase(isANumber ? "=".concat(value) : value, new SwitchView(viewContainer, template));
      };

      NgPluralCase.ɵfac = function NgPluralCase_Factory(t) {
        return new (t || NgPluralCase)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinjectAttribute"]('ngPluralCase'), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgPlural, 1));
      };

      NgPluralCase.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgPluralCase,
        selectors: [["", "ngPluralCase", ""]]
      });

      NgPluralCase.ctorParameters = function () {
        return [{
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"],
            args: ['ngPluralCase']
          }]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
        }, {
          type: NgPlural,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgPluralCase, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ngPluralCase]'
          }]
        }], function () {
          return [{
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"],
              args: ['ngPluralCase']
            }]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
          }, {
            type: NgPlural,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"]
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @ngModule CommonModule
       *
       * @usageNotes
       *
       * Set the font of the containing element to the result of an expression.
       *
       * ```
       * <some-element [ngStyle]="{'font-style': styleExp}">...</some-element>
       * ```
       *
       * Set the width of the containing element to a pixel value returned by an expression.
       *
       * ```
       * <some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element>
       * ```
       *
       * Set a collection of style values using an expression that returns key-value pairs.
       *
       * ```
       * <some-element [ngStyle]="objExp">...</some-element>
       * ```
       *
       * @description
       *
       * An attribute directive that updates styles for the containing HTML element.
       * Sets one or more style properties, specified as colon-separated key-value pairs.
       * The key is a style name, with an optional `.<unit>` suffix
       * (such as 'top.px', 'font-style.em').
       * The value is an expression to be evaluated.
       * The resulting non-null value, expressed in the given unit,
       * is assigned to the given style property.
       * If the result of evaluation is null, the corresponding style is removed.
       *
       * @publicApi
       */


      var NgStyle = /*#__PURE__*/function () {
        function NgStyle(_ngEl, _differs, _renderer) {
          _classCallCheck(this, NgStyle);

          this._ngEl = _ngEl;
          this._differs = _differs;
          this._renderer = _renderer;
          this._ngStyle = null;
          this._differ = null;
        }

        _createClass2(NgStyle, [{
          key: "ngStyle",
          set: function set(values) {
            this._ngStyle = values;

            if (!this._differ && values) {
              this._differ = this._differs.find(values).create();
            }
          }
        }, {
          key: "ngDoCheck",
          value: function ngDoCheck() {
            if (this._differ) {
              var changes = this._differ.diff(this._ngStyle);

              if (changes) {
                this._applyChanges(changes);
              }
            }
          }
        }, {
          key: "_setStyle",
          value: function _setStyle(nameAndUnit, value) {
            var _nameAndUnit$split = nameAndUnit.split('.'),
                _nameAndUnit$split2 = _slicedToArray(_nameAndUnit$split, 2),
                name = _nameAndUnit$split2[0],
                unit = _nameAndUnit$split2[1];

            value = value != null && unit ? "".concat(value).concat(unit) : value;

            if (value != null) {
              this._renderer.setStyle(this._ngEl.nativeElement, name, value);
            } else {
              this._renderer.removeStyle(this._ngEl.nativeElement, name);
            }
          }
        }, {
          key: "_applyChanges",
          value: function _applyChanges(changes) {
            var _this537 = this;

            changes.forEachRemovedItem(function (record) {
              return _this537._setStyle(record.key, null);
            });
            changes.forEachAddedItem(function (record) {
              return _this537._setStyle(record.key, record.currentValue);
            });
            changes.forEachChangedItem(function (record) {
              return _this537._setStyle(record.key, record.currentValue);
            });
          }
        }]);

        return NgStyle;
      }();

      NgStyle.ɵfac = function NgStyle_Factory(t) {
        return new (t || NgStyle)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]));
      };

      NgStyle.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgStyle,
        selectors: [["", "ngStyle", ""]],
        inputs: {
          ngStyle: "ngStyle"
        }
      });

      NgStyle.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
        }];
      };

      NgStyle.propDecorators = {
        ngStyle: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
          args: ['ngStyle']
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgStyle, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ngStyle]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
          }];
        }, {
          ngStyle: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
            args: ['ngStyle']
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @ngModule CommonModule
       *
       * @description
       *
       * Inserts an embedded view from a prepared `TemplateRef`.
       *
       * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.
       * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding
       * by the local template `let` declarations.
       *
       * @usageNotes
       * ```
       * <ng-container *ngTemplateOutlet="templateRefExp; context: contextExp"></ng-container>
       * ```
       *
       * Using the key `$implicit` in the context object will set its value as default.
       *
       * ### Example
       *
       * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}
       *
       * @publicApi
       */


      var NgTemplateOutlet = /*#__PURE__*/function () {
        function NgTemplateOutlet(_viewContainerRef) {
          _classCallCheck(this, NgTemplateOutlet);

          this._viewContainerRef = _viewContainerRef;
          this._viewRef = null;
          /**
           * A context object to attach to the {@link EmbeddedViewRef}. This should be an
           * object, the object's keys will be available for binding by the local template `let`
           * declarations.
           * Using the key `$implicit` in the context object will set its value as default.
           */

          this.ngTemplateOutletContext = null;
          /**
           * A string defining the template reference and optionally the context object for the template.
           */

          this.ngTemplateOutlet = null;
        }

        _createClass2(NgTemplateOutlet, [{
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            var recreateView = this._shouldRecreateView(changes);

            if (recreateView) {
              var viewContainerRef = this._viewContainerRef;

              if (this._viewRef) {
                viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef));
              }

              this._viewRef = this.ngTemplateOutlet ? viewContainerRef.createEmbeddedView(this.ngTemplateOutlet, this.ngTemplateOutletContext) : null;
            } else if (this._viewRef && this.ngTemplateOutletContext) {
              this._updateExistingContext(this.ngTemplateOutletContext);
            }
          }
          /**
           * We need to re-create existing embedded view if:
           * - templateRef has changed
           * - context has changes
           *
           * We mark context object as changed when the corresponding object
           * shape changes (new properties are added or existing properties are removed).
           * In other words we consider context with the same properties as "the same" even
           * if object reference changes (see https://github.com/angular/angular/issues/13407).
           */

        }, {
          key: "_shouldRecreateView",
          value: function _shouldRecreateView(changes) {
            var ctxChange = changes['ngTemplateOutletContext'];
            return !!changes['ngTemplateOutlet'] || ctxChange && this._hasContextShapeChanged(ctxChange);
          }
        }, {
          key: "_hasContextShapeChanged",
          value: function _hasContextShapeChanged(ctxChange) {
            var prevCtxKeys = Object.keys(ctxChange.previousValue || {});
            var currCtxKeys = Object.keys(ctxChange.currentValue || {});

            if (prevCtxKeys.length === currCtxKeys.length) {
              var _iterator67 = _createForOfIteratorHelper(currCtxKeys),
                  _step66;

              try {
                for (_iterator67.s(); !(_step66 = _iterator67.n()).done;) {
                  var propName = _step66.value;

                  if (prevCtxKeys.indexOf(propName) === -1) {
                    return true;
                  }
                }
              } catch (err) {
                _iterator67.e(err);
              } finally {
                _iterator67.f();
              }

              return false;
            }

            return true;
          }
        }, {
          key: "_updateExistingContext",
          value: function _updateExistingContext(ctx) {
            for (var _i42 = 0, _Object$keys6 = Object.keys(ctx); _i42 < _Object$keys6.length; _i42++) {
              var propName = _Object$keys6[_i42];
              this._viewRef.context[propName] = this.ngTemplateOutletContext[propName];
            }
          }
        }]);

        return NgTemplateOutlet;
      }();

      NgTemplateOutlet.ɵfac = function NgTemplateOutlet_Factory(t) {
        return new (t || NgTemplateOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]));
      };

      NgTemplateOutlet.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: NgTemplateOutlet,
        selectors: [["", "ngTemplateOutlet", ""]],
        inputs: {
          ngTemplateOutletContext: "ngTemplateOutletContext",
          ngTemplateOutlet: "ngTemplateOutlet"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]]
      });

      NgTemplateOutlet.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
        }];
      };

      NgTemplateOutlet.propDecorators = {
        ngTemplateOutletContext: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        ngTemplateOutlet: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgTemplateOutlet, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[ngTemplateOutlet]'
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
          }];
        }, {
          ngTemplateOutletContext: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          ngTemplateOutlet: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A collection of Angular directives that are likely to be used in each and every Angular
       * application.
       */


      var COMMON_DIRECTIVES = [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase];
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      function invalidPipeArgumentError(type, value) {
        return Error("InvalidPipeArgument: '".concat(value, "' for pipe '").concat(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(type), "'"));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var ObservableStrategy = /*#__PURE__*/function () {
        function ObservableStrategy() {
          _classCallCheck(this, ObservableStrategy);
        }

        _createClass2(ObservableStrategy, [{
          key: "createSubscription",
          value: function createSubscription(async, updateLatestValue) {
            return async.subscribe({
              next: updateLatestValue,
              error: function error(e) {
                throw e;
              }
            });
          }
        }, {
          key: "dispose",
          value: function dispose(subscription) {
            subscription.unsubscribe();
          }
        }, {
          key: "onDestroy",
          value: function onDestroy(subscription) {
            subscription.unsubscribe();
          }
        }]);

        return ObservableStrategy;
      }();

      var PromiseStrategy = /*#__PURE__*/function () {
        function PromiseStrategy() {
          _classCallCheck(this, PromiseStrategy);
        }

        _createClass2(PromiseStrategy, [{
          key: "createSubscription",
          value: function createSubscription(async, updateLatestValue) {
            return async.then(updateLatestValue, function (e) {
              throw e;
            });
          }
        }, {
          key: "dispose",
          value: function dispose(subscription) {}
        }, {
          key: "onDestroy",
          value: function onDestroy(subscription) {}
        }]);

        return PromiseStrategy;
      }();

      var _promiseStrategy = new PromiseStrategy();

      var _observableStrategy = new ObservableStrategy();
      /**
       * @ngModule CommonModule
       * @description
       *
       * Unwraps a value from an asynchronous primitive.
       *
       * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has
       * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for
       * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid
       * potential memory leaks.
       *
       * @usageNotes
       *
       * ### Examples
       *
       * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the
       * promise.
       *
       * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}
       *
       * It's also possible to use `async` with Observables. The example below binds the `time` Observable
       * to the view. The Observable continuously updates the view with the current time.
       *
       * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}
       *
       * @publicApi
       */


      var AsyncPipe = /*#__PURE__*/function () {
        function AsyncPipe(_ref) {
          _classCallCheck(this, AsyncPipe);

          this._ref = _ref;
          this._latestValue = null;
          this._subscription = null;
          this._obj = null;
          this._strategy = null;
        }

        _createClass2(AsyncPipe, [{
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            if (this._subscription) {
              this._dispose();
            }
          }
        }, {
          key: "transform",
          value: function transform(obj) {
            if (!this._obj) {
              if (obj) {
                this._subscribe(obj);
              }

              return this._latestValue;
            }

            if (obj !== this._obj) {
              this._dispose();

              return this.transform(obj);
            }

            return this._latestValue;
          }
        }, {
          key: "_subscribe",
          value: function _subscribe(obj) {
            var _this538 = this;

            this._obj = obj;
            this._strategy = this._selectStrategy(obj);
            this._subscription = this._strategy.createSubscription(obj, function (value) {
              return _this538._updateLatestValue(obj, value);
            });
          }
        }, {
          key: "_selectStrategy",
          value: function _selectStrategy(obj) {
            if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisPromise"])(obj)) {
              return _promiseStrategy;
            }

            if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisObservable"])(obj)) {
              return _observableStrategy;
            }

            throw invalidPipeArgumentError(AsyncPipe, obj);
          }
        }, {
          key: "_dispose",
          value: function _dispose() {
            this._strategy.dispose(this._subscription);

            this._latestValue = null;
            this._subscription = null;
            this._obj = null;
          }
        }, {
          key: "_updateLatestValue",
          value: function _updateLatestValue(async, value) {
            if (async === this._obj) {
              this._latestValue = value;

              this._ref.markForCheck();
            }
          }
        }]);

        return AsyncPipe;
      }();

      AsyncPipe.ɵfac = function AsyncPipe_Factory(t) {
        return new (t || AsyncPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinjectPipeChangeDetectorRef"]());
      };

      AsyncPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "async",
        type: AsyncPipe,
        pure: false
      });

      AsyncPipe.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AsyncPipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'async',
            pure: false
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Transforms text to all lower case.
       *
       * @see `UpperCasePipe`
       * @see `TitleCasePipe`
       * @usageNotes
       *
       * The following example defines a view that allows the user to enter
       * text, and then uses the pipe to convert the input text to all lower case.
       *
       * <code-example path="common/pipes/ts/lowerupper_pipe.ts" region='LowerUpperPipe'></code-example>
       *
       * @ngModule CommonModule
       * @publicApi
       */


      var LowerCasePipe = /*#__PURE__*/function () {
        function LowerCasePipe() {
          _classCallCheck(this, LowerCasePipe);
        }

        _createClass2(LowerCasePipe, [{
          key: "transform",
          value: function transform(value) {
            if (value == null) return null;

            if (typeof value !== 'string') {
              throw invalidPipeArgumentError(LowerCasePipe, value);
            }

            return value.toLowerCase();
          }
        }]);

        return LowerCasePipe;
      }();

      LowerCasePipe.ɵfac = function LowerCasePipe_Factory(t) {
        return new (t || LowerCasePipe)();
      };

      LowerCasePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "lowercase",
        type: LowerCasePipe,
        pure: true
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LowerCasePipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'lowercase'
          }]
        }], null, null);
      })(); //
      // Regex below matches any Unicode word and compatible with ES5. In ES2018 the same result
      // can be achieved by using /\p{L}\S*/gu and also known as Unicode Property Escapes
      // (https://2ality.com/2017/07/regexp-unicode-property-escapes.html). Since there is no
      // transpilation of this functionality down to ES5 without external tool, the only solution is
      // to use already transpiled form. Example can be found here -
      // https://mothereff.in/regexpu#input=var+regex+%3D+/%5Cp%7BL%7D/u%3B&unicodePropertyEscape=1
      //


      var unicodeWordMatch = /(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D])\S*/g;
      /**
       * Transforms text to title case.
       * Capitalizes the first letter of each word and transforms the
       * rest of the word to lower case.
       * Words are delimited by any whitespace character, such as a space, tab, or line-feed character.
       *
       * @see `LowerCasePipe`
       * @see `UpperCasePipe`
       *
       * @usageNotes
       * The following example shows the result of transforming various strings into title case.
       *
       * <code-example path="common/pipes/ts/titlecase_pipe.ts" region='TitleCasePipe'></code-example>
       *
       * @ngModule CommonModule
       * @publicApi
       */

      var TitleCasePipe = /*#__PURE__*/function () {
        function TitleCasePipe() {
          _classCallCheck(this, TitleCasePipe);
        }

        _createClass2(TitleCasePipe, [{
          key: "transform",
          value: function transform(value) {
            if (value == null) return null;

            if (typeof value !== 'string') {
              throw invalidPipeArgumentError(TitleCasePipe, value);
            }

            return value.replace(unicodeWordMatch, function (txt) {
              return txt[0].toUpperCase() + txt.substr(1).toLowerCase();
            });
          }
        }]);

        return TitleCasePipe;
      }();

      TitleCasePipe.ɵfac = function TitleCasePipe_Factory(t) {
        return new (t || TitleCasePipe)();
      };

      TitleCasePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "titlecase",
        type: TitleCasePipe,
        pure: true
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TitleCasePipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'titlecase'
          }]
        }], null, null);
      })();
      /**
       * Transforms text to all upper case.
       * @see `LowerCasePipe`
       * @see `TitleCasePipe`
       *
       * @ngModule CommonModule
       * @publicApi
       */


      var UpperCasePipe = /*#__PURE__*/function () {
        function UpperCasePipe() {
          _classCallCheck(this, UpperCasePipe);
        }

        _createClass2(UpperCasePipe, [{
          key: "transform",
          value: function transform(value) {
            if (value == null) return null;

            if (typeof value !== 'string') {
              throw invalidPipeArgumentError(UpperCasePipe, value);
            }

            return value.toUpperCase();
          }
        }]);

        return UpperCasePipe;
      }();

      UpperCasePipe.ɵfac = function UpperCasePipe_Factory(t) {
        return new (t || UpperCasePipe)();
      };

      UpperCasePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "uppercase",
        type: UpperCasePipe,
        pure: true
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](UpperCasePipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'uppercase'
          }]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // clang-format off

      /**
       * @ngModule CommonModule
       * @description
       *
       * Formats a date value according to locale rules.
       *
       * Only the `en-US` locale data comes with Angular. To localize dates
       * in another language, you must import the corresponding locale data.
       * See the [I18n guide](guide/i18n#i18n-pipes) for more information.
       *
       * @see `formatDate()`
       *
       *
       * @usageNotes
       *
       * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to
       * reformat the date on every change-detection cycle, treat the date as an immutable object
       * and change the reference when the pipe needs to run again.
       *
       * ### Pre-defined format options
       *
       * | Option        | Equivalent to                       | Examples (given in `en-US` locale)              |
       * |---------------|-------------------------------------|-------------------------------------------------|
       * | `'short'`     | `'M/d/yy, h:mm a'`                  | `6/15/15, 9:03 AM`                              |
       * | `'medium'`    | `'MMM d, y, h:mm:ss a'`             | `Jun 15, 2015, 9:03:01 AM`                      |
       * | `'long'`      | `'MMMM d, y, h:mm:ss a z'`          | `June 15, 2015 at 9:03:01 AM GMT+1`             |
       * | `'full'`      | `'EEEE, MMMM d, y, h:mm:ss a zzzz'` | `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00` |
       * | `'shortDate'` | `'M/d/yy'`                          | `6/15/15`                                       |
       * | `'mediumDate'`| `'MMM d, y'`                        | `Jun 15, 2015`                                  |
       * | `'longDate'`  | `'MMMM d, y'`                       | `June 15, 2015`                                 |
       * | `'fullDate'`  | `'EEEE, MMMM d, y'`                 | `Monday, June 15, 2015`                         |
       * | `'shortTime'` | `'h:mm a'`                          | `9:03 AM`                                       |
       * | `'mediumTime'`| `'h:mm:ss a'`                       | `9:03:01 AM`                                    |
       * | `'longTime'`  | `'h:mm:ss a z'`                     | `9:03:01 AM GMT+1`                              |
       * | `'fullTime'`  | `'h:mm:ss a zzzz'`                  | `9:03:01 AM GMT+01:00`                          |
       *
       * ### Custom format options
       *
       * You can construct a format string using symbols to specify the components
       * of a date-time value, as described in the following table.
       * Format details depend on the locale.
       * Fields marked with (*) are only available in the extra data set for the given locale.
       *
       *  | Field type         | Format      | Description                                                   | Example Value                                              |
       *  |--------------------|-------------|---------------------------------------------------------------|------------------------------------------------------------|
       *  | Era                | G, GG & GGG | Abbreviated                                                   | AD                                                         |
       *  |                    | GGGG        | Wide                                                          | Anno Domini                                                |
       *  |                    | GGGGG       | Narrow                                                        | A                                                          |
       *  | Year               | y           | Numeric: minimum digits                                       | 2, 20, 201, 2017, 20173                                    |
       *  |                    | yy          | Numeric: 2 digits + zero padded                               | 02, 20, 01, 17, 73                                         |
       *  |                    | yyy         | Numeric: 3 digits + zero padded                               | 002, 020, 201, 2017, 20173                                 |
       *  |                    | yyyy        | Numeric: 4 digits or more + zero padded                       | 0002, 0020, 0201, 2017, 20173                              |
       *  | Week-numbering year| Y           | Numeric: minimum digits                                       | 2, 20, 201, 2017, 20173                                    |
       *  |                    | YY          | Numeric: 2 digits + zero padded                               | 02, 20, 01, 17, 73                                         |
       *  |                    | YYY         | Numeric: 3 digits + zero padded                               | 002, 020, 201, 2017, 20173                                 |
       *  |                    | YYYY        | Numeric: 4 digits or more + zero padded                       | 0002, 0020, 0201, 2017, 20173                              |
       *  | Month              | M           | Numeric: 1 digit                                              | 9, 12                                                      |
       *  |                    | MM          | Numeric: 2 digits + zero padded                               | 09, 12                                                     |
       *  |                    | MMM         | Abbreviated                                                   | Sep                                                        |
       *  |                    | MMMM        | Wide                                                          | September                                                  |
       *  |                    | MMMMM       | Narrow                                                        | S                                                          |
       *  | Month standalone   | L           | Numeric: 1 digit                                              | 9, 12                                                      |
       *  |                    | LL          | Numeric: 2 digits + zero padded                               | 09, 12                                                     |
       *  |                    | LLL         | Abbreviated                                                   | Sep                                                        |
       *  |                    | LLLL        | Wide                                                          | September                                                  |
       *  |                    | LLLLL       | Narrow                                                        | S                                                          |
       *  | Week of year       | w           | Numeric: minimum digits                                       | 1... 53                                                    |
       *  |                    | ww          | Numeric: 2 digits + zero padded                               | 01... 53                                                   |
       *  | Week of month      | W           | Numeric: 1 digit                                              | 1... 5                                                     |
       *  | Day of month       | d           | Numeric: minimum digits                                       | 1                                                          |
       *  |                    | dd          | Numeric: 2 digits + zero padded                               | 01                                                          |
       *  | Week day           | E, EE & EEE | Abbreviated                                                   | Tue                                                        |
       *  |                    | EEEE        | Wide                                                          | Tuesday                                                    |
       *  |                    | EEEEE       | Narrow                                                        | T                                                          |
       *  |                    | EEEEEE      | Short                                                         | Tu                                                         |
       *  | Period             | a, aa & aaa | Abbreviated                                                   | am/pm or AM/PM                                             |
       *  |                    | aaaa        | Wide (fallback to `a` when missing)                           | ante meridiem/post meridiem                                |
       *  |                    | aaaaa       | Narrow                                                        | a/p                                                        |
       *  | Period*            | B, BB & BBB | Abbreviated                                                   | mid.                                                       |
       *  |                    | BBBB        | Wide                                                          | am, pm, midnight, noon, morning, afternoon, evening, night |
       *  |                    | BBBBB       | Narrow                                                        | md                                                         |
       *  | Period standalone* | b, bb & bbb | Abbreviated                                                   | mid.                                                       |
       *  |                    | bbbb        | Wide                                                          | am, pm, midnight, noon, morning, afternoon, evening, night |
       *  |                    | bbbbb       | Narrow                                                        | md                                                         |
       *  | Hour 1-12          | h           | Numeric: minimum digits                                       | 1, 12                                                      |
       *  |                    | hh          | Numeric: 2 digits + zero padded                               | 01, 12                                                     |
       *  | Hour 0-23          | H           | Numeric: minimum digits                                       | 0, 23                                                      |
       *  |                    | HH          | Numeric: 2 digits + zero padded                               | 00, 23                                                     |
       *  | Minute             | m           | Numeric: minimum digits                                       | 8, 59                                                      |
       *  |                    | mm          | Numeric: 2 digits + zero padded                               | 08, 59                                                     |
       *  | Second             | s           | Numeric: minimum digits                                       | 0... 59                                                    |
       *  |                    | ss          | Numeric: 2 digits + zero padded                               | 00... 59                                                   |
       *  | Fractional seconds | S           | Numeric: 1 digit                                              | 0... 9                                                     |
       *  |                    | SS          | Numeric: 2 digits + zero padded                               | 00... 99                                                   |
       *  |                    | SSS         | Numeric: 3 digits + zero padded (= milliseconds)              | 000... 999                                                 |
       *  | Zone               | z, zz & zzz | Short specific non location format (fallback to O)            | GMT-8                                                      |
       *  |                    | zzzz        | Long specific non location format (fallback to OOOO)          | GMT-08:00                                                  |
       *  |                    | Z, ZZ & ZZZ | ISO8601 basic format                                          | -0800                                                      |
       *  |                    | ZZZZ        | Long localized GMT format                                     | GMT-8:00                                                   |
       *  |                    | ZZZZZ       | ISO8601 extended format + Z indicator for offset 0 (= XXXXX)  | -08:00                                                     |
       *  |                    | O, OO & OOO | Short localized GMT format                                    | GMT-8                                                      |
       *  |                    | OOOO        | Long localized GMT format                                     | GMT-08:00                                                  |
       *
       * Note that timezone correction is not applied to an ISO string that has no time component, such as "2016-09-19"
       *
       * ### Format examples
       *
       * These examples transform a date into various formats,
       * assuming that `dateObj` is a JavaScript `Date` object for
       * year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11,
       * given in the local time for the `en-US` locale.
       *
       * ```
       * {{ dateObj | date }}               // output is 'Jun 15, 2015'
       * {{ dateObj | date:'medium' }}      // output is 'Jun 15, 2015, 9:43:11 PM'
       * {{ dateObj | date:'shortTime' }}   // output is '9:43 PM'
       * {{ dateObj | date:'mm:ss' }}       // output is '43:11'
       * ```
       *
       * ### Usage example
       *
       * The following component uses a date pipe to display the current date in different formats.
       *
       * ```
       * @Component({
       *  selector: 'date-pipe',
       *  template: `<div>
       *    <p>Today is {{today | date}}</p>
       *    <p>Or if you prefer, {{today | date:'fullDate'}}</p>
       *    <p>The time is {{today | date:'h:mm a z'}}</p>
       *  </div>`
       * })
       * // Get the current date and time as a date-time value.
       * export class DatePipeComponent {
       *   today: number = Date.now();
       * }
       * ```
       *
       * @publicApi
       */
      // clang-format on


      var DatePipe = /*#__PURE__*/function () {
        function DatePipe(locale) {
          _classCallCheck(this, DatePipe);

          this.locale = locale;
        }

        _createClass2(DatePipe, [{
          key: "transform",
          value: function transform(value) {
            var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'mediumDate';
            var timezone = arguments.length > 2 ? arguments[2] : undefined;
            var locale = arguments.length > 3 ? arguments[3] : undefined;
            if (value == null || value === '' || value !== value) return null;

            try {
              return formatDate(value, format, locale || this.locale, timezone);
            } catch (error) {
              throw invalidPipeArgumentError(DatePipe, error.message);
            }
          }
        }]);

        return DatePipe;
      }();

      DatePipe.ɵfac = function DatePipe_Factory(t) {
        return new (t || DatePipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]));
      };

      DatePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "date",
        type: DatePipe,
        pure: true
      });

      DatePipe.ctorParameters = function () {
        return [{
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DatePipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'date',
            pure: true
          }]
        }], function () {
          return [{
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var _INTERPOLATION_REGEXP = /#/g;
      /**
       * @ngModule CommonModule
       * @description
       *
       * Maps a value to a string that pluralizes the value according to locale rules.
       *
       * @usageNotes
       *
       * ### Example
       *
       * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'}
       *
       * @publicApi
       */

      var I18nPluralPipe = /*#__PURE__*/function () {
        function I18nPluralPipe(_localization) {
          _classCallCheck(this, I18nPluralPipe);

          this._localization = _localization;
        }
        /**
         * @param value the number to be formatted
         * @param pluralMap an object that mimics the ICU format, see
         * http://userguide.icu-project.org/formatparse/messages.
         * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
         * default).
         */


        _createClass2(I18nPluralPipe, [{
          key: "transform",
          value: function transform(value, pluralMap, locale) {
            if (value == null) return '';

            if (typeof pluralMap !== 'object' || pluralMap === null) {
              throw invalidPipeArgumentError(I18nPluralPipe, pluralMap);
            }

            var key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);
            return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
          }
        }]);

        return I18nPluralPipe;
      }();

      I18nPluralPipe.ɵfac = function I18nPluralPipe_Factory(t) {
        return new (t || I18nPluralPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgLocalization));
      };

      I18nPluralPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "i18nPlural",
        type: I18nPluralPipe,
        pure: true
      });

      I18nPluralPipe.ctorParameters = function () {
        return [{
          type: NgLocalization
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](I18nPluralPipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'i18nPlural',
            pure: true
          }]
        }], function () {
          return [{
            type: NgLocalization
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @ngModule CommonModule
       * @description
       *
       * Generic selector that displays the string that matches the current value.
       *
       * If none of the keys of the `mapping` match the `value`, then the content
       * of the `other` key is returned when present, otherwise an empty string is returned.
       *
       * @usageNotes
       *
       * ### Example
       *
       * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'}
       *
       * @publicApi
       */


      var I18nSelectPipe = /*#__PURE__*/function () {
        function I18nSelectPipe() {
          _classCallCheck(this, I18nSelectPipe);
        }

        _createClass2(I18nSelectPipe, [{
          key: "transform",
          value:
          /**
           * @param value a string to be internationalized.
           * @param mapping an object that indicates the text that should be displayed
           * for different values of the provided `value`.
           */
          function transform(value, mapping) {
            if (value == null) return '';

            if (typeof mapping !== 'object' || typeof value !== 'string') {
              throw invalidPipeArgumentError(I18nSelectPipe, mapping);
            }

            if (mapping.hasOwnProperty(value)) {
              return mapping[value];
            }

            if (mapping.hasOwnProperty('other')) {
              return mapping['other'];
            }

            return '';
          }
        }]);

        return I18nSelectPipe;
      }();

      I18nSelectPipe.ɵfac = function I18nSelectPipe_Factory(t) {
        return new (t || I18nSelectPipe)();
      };

      I18nSelectPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "i18nSelect",
        type: I18nSelectPipe,
        pure: true
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](I18nSelectPipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'i18nSelect',
            pure: true
          }]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @ngModule CommonModule
       * @description
       *
       * Converts a value into its JSON-format representation.  Useful for debugging.
       *
       * @usageNotes
       *
       * The following component uses a JSON pipe to convert an object
       * to JSON format, and displays the string in both formats for comparison.
       *
       * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}
       *
       * @publicApi
       */


      var JsonPipe = /*#__PURE__*/function () {
        function JsonPipe() {
          _classCallCheck(this, JsonPipe);
        }

        _createClass2(JsonPipe, [{
          key: "transform",
          value:
          /**
           * @param value A value of any type to convert into a JSON-format string.
           */
          function transform(value) {
            return JSON.stringify(value, null, 2);
          }
        }]);

        return JsonPipe;
      }();

      JsonPipe.ɵfac = function JsonPipe_Factory(t) {
        return new (t || JsonPipe)();
      };

      JsonPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "json",
        type: JsonPipe,
        pure: false
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](JsonPipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'json',
            pure: false
          }]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function makeKeyValuePair(key, value) {
        return {
          key: key,
          value: value
        };
      }
      /**
       * @ngModule CommonModule
       * @description
       *
       * Transforms Object or Map into an array of key value pairs.
       *
       * The output array will be ordered by keys.
       * By default the comparator will be by Unicode point value.
       * You can optionally pass a compareFn if your keys are complex types.
       *
       * @usageNotes
       * ### Examples
       *
       * This examples show how an Object or a Map can be iterated by ngFor with the use of this
       * keyvalue pipe.
       *
       * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}
       *
       * @publicApi
       */


      var KeyValuePipe = /*#__PURE__*/function () {
        function KeyValuePipe(differs) {
          _classCallCheck(this, KeyValuePipe);

          this.differs = differs;
          this.keyValues = [];
        }

        _createClass2(KeyValuePipe, [{
          key: "transform",
          value: function transform(input) {
            var _this539 = this;

            var compareFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultComparator;

            if (!input || !(input instanceof Map) && typeof input !== 'object') {
              return null;
            }

            if (!this.differ) {
              // make a differ for whatever type we've been passed in
              this.differ = this.differs.find(input).create();
            }

            var differChanges = this.differ.diff(input);

            if (differChanges) {
              this.keyValues = [];
              differChanges.forEachItem(function (r) {
                _this539.keyValues.push(makeKeyValuePair(r.key, r.currentValue));
              });
              this.keyValues.sort(compareFn);
            }

            return this.keyValues;
          }
        }]);

        return KeyValuePipe;
      }();

      KeyValuePipe.ɵfac = function KeyValuePipe_Factory(t) {
        return new (t || KeyValuePipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]));
      };

      KeyValuePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "keyvalue",
        type: KeyValuePipe,
        pure: false
      });

      KeyValuePipe.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](KeyValuePipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'keyvalue',
            pure: false
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]
          }];
        }, null);
      })();

      function defaultComparator(keyValueA, keyValueB) {
        var a = keyValueA.key;
        var b = keyValueB.key; // if same exit with 0;

        if (a === b) return 0; // make sure that undefined are at the end of the sort.

        if (a === undefined) return 1;
        if (b === undefined) return -1; // make sure that nulls are at the end of the sort.

        if (a === null) return 1;
        if (b === null) return -1;

        if (typeof a == 'string' && typeof b == 'string') {
          return a < b ? -1 : 1;
        }

        if (typeof a == 'number' && typeof b == 'number') {
          return a - b;
        }

        if (typeof a == 'boolean' && typeof b == 'boolean') {
          return a < b ? -1 : 1;
        } // `a` and `b` are of different types. Compare their string values.


        var aString = String(a);
        var bString = String(b);
        return aString == bString ? 0 : aString < bString ? -1 : 1;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @ngModule CommonModule
       * @description
       *
       * Transforms a number into a string,
       * formatted according to locale rules that determine group sizing and
       * separator, decimal-point character, and other locale-specific
       * configurations.
       *
       * If no parameters are specified, the function rounds off to the nearest value using this
       * [rounding method](https://en.wikibooks.org/wiki/Arithmetic/Rounding).
       * The behavior differs from that of the JavaScript ```Math.round()``` function.
       * In the following case for example, the pipe rounds down where
       * ```Math.round()``` rounds up:
       *
       * ```html
       * -2.5 | number:'1.0-0'
       * > -3
       * Math.round(-2.5)
       * > -2
       * ```
       *
       * @see `formatNumber()`
       *
       * @usageNotes
       * The following code shows how the pipe transforms numbers
       * into text strings, according to various format specifications,
       * where the caller's default locale is `en-US`.
       *
       * ### Example
       *
       * <code-example path="common/pipes/ts/number_pipe.ts" region='NumberPipe'></code-example>
       *
       * @publicApi
       */


      var DecimalPipe = /*#__PURE__*/function () {
        function DecimalPipe(_locale) {
          _classCallCheck(this, DecimalPipe);

          this._locale = _locale;
        }

        _createClass2(DecimalPipe, [{
          key: "transform",
          value: function transform(value, digitsInfo, locale) {
            if (!isValue(value)) return null;
            locale = locale || this._locale;

            try {
              var num = strToNumber(value);
              return formatNumber(num, locale, digitsInfo);
            } catch (error) {
              throw invalidPipeArgumentError(DecimalPipe, error.message);
            }
          }
        }]);

        return DecimalPipe;
      }();

      DecimalPipe.ɵfac = function DecimalPipe_Factory(t) {
        return new (t || DecimalPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]));
      };

      DecimalPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "number",
        type: DecimalPipe,
        pure: true
      });

      DecimalPipe.ctorParameters = function () {
        return [{
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DecimalPipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'number'
          }]
        }], function () {
          return [{
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
            }]
          }];
        }, null);
      })();
      /**
       * @ngModule CommonModule
       * @description
       *
       * Transforms a number to a percentage
       * string, formatted according to locale rules that determine group sizing and
       * separator, decimal-point character, and other locale-specific
       * configurations.
       *
       * @see `formatPercent()`
       *
       * @usageNotes
       * The following code shows how the pipe transforms numbers
       * into text strings, according to various format specifications,
       * where the caller's default locale is `en-US`.
       *
       * <code-example path="common/pipes/ts/percent_pipe.ts" region='PercentPipe'></code-example>
       *
       * @publicApi
       */


      var PercentPipe = /*#__PURE__*/function () {
        function PercentPipe(_locale) {
          _classCallCheck(this, PercentPipe);

          this._locale = _locale;
        }

        _createClass2(PercentPipe, [{
          key: "transform",
          value: function transform(value, digitsInfo, locale) {
            if (!isValue(value)) return null;
            locale = locale || this._locale;

            try {
              var num = strToNumber(value);
              return formatPercent(num, locale, digitsInfo);
            } catch (error) {
              throw invalidPipeArgumentError(PercentPipe, error.message);
            }
          }
        }]);

        return PercentPipe;
      }();

      PercentPipe.ɵfac = function PercentPipe_Factory(t) {
        return new (t || PercentPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]));
      };

      PercentPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "percent",
        type: PercentPipe,
        pure: true
      });

      PercentPipe.ctorParameters = function () {
        return [{
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PercentPipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'percent'
          }]
        }], function () {
          return [{
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
            }]
          }];
        }, null);
      })();
      /**
       * @ngModule CommonModule
       * @description
       *
       * Transforms a number to a currency string, formatted according to locale rules
       * that determine group sizing and separator, decimal-point character,
       * and other locale-specific configurations.
       *
       * {@a currency-code-deprecation}
       * <div class="alert is-helpful">
       *
       * **Deprecation notice:**
       *
       * The default currency code is currently always `USD` but this is deprecated from v9.
       *
       * **In v11 the default currency code will be taken from the current locale identified by
       * the `LOCAL_ID` token. See the [i18n guide](guide/i18n#setting-up-the-locale-of-your-app) for
       * more information.**
       *
       * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in
       * your application `NgModule`:
       *
       * ```ts
       * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}
       * ```
       *
       * </div>
       *
       * @see `getCurrencySymbol()`
       * @see `formatCurrency()`
       *
       * @usageNotes
       * The following code shows how the pipe transforms numbers
       * into text strings, according to various format specifications,
       * where the caller's default locale is `en-US`.
       *
       * <code-example path="common/pipes/ts/currency_pipe.ts" region='CurrencyPipe'></code-example>
       *
       * @publicApi
       */


      var CurrencyPipe = /*#__PURE__*/function () {
        function CurrencyPipe(_locale) {
          var _defaultCurrencyCode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'USD';

          _classCallCheck(this, CurrencyPipe);

          this._locale = _locale;
          this._defaultCurrencyCode = _defaultCurrencyCode;
        }

        _createClass2(CurrencyPipe, [{
          key: "transform",
          value: function transform(value, currencyCode) {
            var display = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'symbol';
            var digitsInfo = arguments.length > 3 ? arguments[3] : undefined;
            var locale = arguments.length > 4 ? arguments[4] : undefined;
            if (!isValue(value)) return null;
            locale = locale || this._locale;

            if (typeof display === 'boolean') {
              if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) {
                console.warn("Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are \"code\", \"symbol\" or \"symbol-narrow\".");
              }

              display = display ? 'symbol' : 'code';
            }

            var currency = currencyCode || this._defaultCurrencyCode;

            if (display !== 'code') {
              if (display === 'symbol' || display === 'symbol-narrow') {
                currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);
              } else {
                currency = display;
              }
            }

            try {
              var num = strToNumber(value);
              return formatCurrency(num, locale, currency, currencyCode, digitsInfo);
            } catch (error) {
              throw invalidPipeArgumentError(CurrencyPipe, error.message);
            }
          }
        }]);

        return CurrencyPipe;
      }();

      CurrencyPipe.ɵfac = function CurrencyPipe_Factory(t) {
        return new (t || CurrencyPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_CURRENCY_CODE"]));
      };

      CurrencyPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "currency",
        type: CurrencyPipe,
        pure: true
      });

      CurrencyPipe.ctorParameters = function () {
        return [{
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
          }]
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_CURRENCY_CODE"]]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CurrencyPipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'currency'
          }]
        }], function () {
          return [{
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
            }]
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_CURRENCY_CODE"]]
            }]
          }];
        }, null);
      })();

      function isValue(value) {
        return !(value == null || value === '' || value !== value);
      }
      /**
       * Transforms a string into a number (if needed).
       */


      function strToNumber(value) {
        // Convert strings to numbers
        if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {
          return Number(value);
        }

        if (typeof value !== 'number') {
          throw new Error("".concat(value, " is not a number"));
        }

        return value;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @ngModule CommonModule
       * @description
       *
       * Creates a new `Array` or `String` containing a subset (slice) of the elements.
       *
       * @usageNotes
       *
       * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`
       * and `String.prototype.slice()`.
       *
       * When operating on an `Array`, the returned `Array` is always a copy even when all
       * the elements are being returned.
       *
       * When operating on a blank value, the pipe returns the blank value.
       *
       * ### List Example
       *
       * This `ngFor` example:
       *
       * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}
       *
       * produces the following:
       *
       * ```html
       * <li>b</li>
       * <li>c</li>
       * ```
       *
       * ### String Examples
       *
       * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}
       *
       * @publicApi
       */


      var SlicePipe = /*#__PURE__*/function () {
        function SlicePipe() {
          _classCallCheck(this, SlicePipe);
        }

        _createClass2(SlicePipe, [{
          key: "transform",
          value: function transform(value, start, end) {
            if (value == null) return null;

            if (!this.supports(value)) {
              throw invalidPipeArgumentError(SlicePipe, value);
            }

            return value.slice(start, end);
          }
        }, {
          key: "supports",
          value: function supports(obj) {
            return typeof obj === 'string' || Array.isArray(obj);
          }
        }]);

        return SlicePipe;
      }();

      SlicePipe.ɵfac = function SlicePipe_Factory(t) {
        return new (t || SlicePipe)();
      };

      SlicePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "slice",
        type: SlicePipe,
        pure: false
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](SlicePipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'slice',
            pure: false
          }]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * A collection of Angular pipes that are likely to be used in each and every application.
       */


      var COMMON_PIPES = [AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe];
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // Note: This does not contain the location providers,
      // as they need some platform specific implementations to work.

      /**
       * Exports all the basic Angular directives and pipes,
       * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on.
       * Re-exported by `BrowserModule`, which is included automatically in the root
       * `AppModule` when you create a new app with the CLI `new` command.
       *
       * * The `providers` options configure the NgModule's injector to provide
       * localization dependencies to members.
       * * The `exports` options make the declared directives and pipes available for import
       * by other NgModules.
       *
       * @publicApi
       */

      var CommonModule = function CommonModule() {
        _classCallCheck(this, CommonModule);
      };

      CommonModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
        type: CommonModule
      });
      CommonModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({
        factory: function CommonModule_Factory(t) {
          return new (t || CommonModule)();
        },
        providers: [{
          provide: NgLocalization,
          useClass: NgLocaleLocalization
        }]
      });

      (function () {
        (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](CommonModule, {
          declarations: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe],
          exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CommonModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
          args: [{
            declarations: [COMMON_DIRECTIVES, COMMON_PIPES],
            exports: [COMMON_DIRECTIVES, COMMON_PIPES],
            providers: [{
              provide: NgLocalization,
              useClass: NgLocaleLocalization
            }]
          }]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var PLATFORM_BROWSER_ID = 'browser';
      var PLATFORM_SERVER_ID = 'server';
      var PLATFORM_WORKER_APP_ID = 'browserWorkerApp';
      var PLATFORM_WORKER_UI_ID = 'browserWorkerUi';
      /**
       * Returns whether a platform id represents a browser platform.
       * @publicApi
       */

      function isPlatformBrowser(platformId) {
        return platformId === PLATFORM_BROWSER_ID;
      }
      /**
       * Returns whether a platform id represents a server platform.
       * @publicApi
       */


      function isPlatformServer(platformId) {
        return platformId === PLATFORM_SERVER_ID;
      }
      /**
       * Returns whether a platform id represents a web worker app platform.
       * @publicApi
       */


      function isPlatformWorkerApp(platformId) {
        return platformId === PLATFORM_WORKER_APP_ID;
      }
      /**
       * Returns whether a platform id represents a web worker UI platform.
       * @publicApi
       */


      function isPlatformWorkerUi(platformId) {
        return platformId === PLATFORM_WORKER_UI_ID;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @publicApi
       */


      var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["Version"]('11.0.9');
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.
       *
       * @publicApi
       */

      var ViewportScroller = function ViewportScroller() {
        _classCallCheck(this, ViewportScroller);
      }; // De-sugared tree-shakable injection
      // See #23917

      /** @nocollapse */


      ViewportScroller.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({
        token: ViewportScroller,
        providedIn: 'root',
        factory: function factory() {
          return new BrowserViewportScroller(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(DOCUMENT), window);
        }
      });
      /**
       * Manages the scroll position for a browser window.
       */

      var BrowserViewportScroller = /*#__PURE__*/function () {
        function BrowserViewportScroller(document, window) {
          _classCallCheck(this, BrowserViewportScroller);

          this.document = document;
          this.window = window;

          this.offset = function () {
            return [0, 0];
          };
        }
        /**
         * Configures the top offset used when scrolling to an anchor.
         * @param offset A position in screen coordinates (a tuple with x and y values)
         * or a function that returns the top offset position.
         *
         */


        _createClass2(BrowserViewportScroller, [{
          key: "setOffset",
          value: function setOffset(offset) {
            if (Array.isArray(offset)) {
              this.offset = function () {
                return offset;
              };
            } else {
              this.offset = offset;
            }
          }
          /**
           * Retrieves the current scroll position.
           * @returns The position in screen coordinates.
           */

        }, {
          key: "getScrollPosition",
          value: function getScrollPosition() {
            if (this.supportsScrolling()) {
              return [this.window.pageXOffset, this.window.pageYOffset];
            } else {
              return [0, 0];
            }
          }
          /**
           * Sets the scroll position.
           * @param position The new position in screen coordinates.
           */

        }, {
          key: "scrollToPosition",
          value: function scrollToPosition(position) {
            if (this.supportsScrolling()) {
              this.window.scrollTo(position[0], position[1]);
            }
          }
          /**
           * Scrolls to an element and attempts to focus the element.
           *
           * Note that the function name here is misleading in that the target string may be an ID for a
           * non-anchor element.
           *
           * @param target The ID of an element or name of the anchor.
           *
           * @see https://html.spec.whatwg.org/#the-indicated-part-of-the-document
           * @see https://html.spec.whatwg.org/#scroll-to-fragid
           */

        }, {
          key: "scrollToAnchor",
          value: function scrollToAnchor(target) {
            var _a;

            if (!this.supportsScrolling()) {
              return;
            } // TODO(atscott): The correct behavior for `getElementsByName` would be to also verify that the
            // element is an anchor. However, this could be considered a breaking change and should be
            // done in a major version.


            var elSelected = (_a = this.document.getElementById(target)) !== null && _a !== void 0 ? _a : this.document.getElementsByName(target)[0];

            if (elSelected === undefined) {
              return;
            }

            this.scrollToElement(elSelected); // After scrolling to the element, the spec dictates that we follow the focus steps for the
            // target. Rather than following the robust steps, simply attempt focus.

            this.attemptFocus(elSelected);
          }
          /**
           * Disables automatic scroll restoration provided by the browser.
           */

        }, {
          key: "setHistoryScrollRestoration",
          value: function setHistoryScrollRestoration(scrollRestoration) {
            if (this.supportScrollRestoration()) {
              var history = this.window.history;

              if (history && history.scrollRestoration) {
                history.scrollRestoration = scrollRestoration;
              }
            }
          }
          /**
           * Scrolls to an element using the native offset and the specified offset set on this scroller.
           *
           * The offset can be used when we know that there is a floating header and scrolling naively to an
           * element (ex: `scrollIntoView`) leaves the element hidden behind the floating header.
           */

        }, {
          key: "scrollToElement",
          value: function scrollToElement(el) {
            var rect = el.getBoundingClientRect();
            var left = rect.left + this.window.pageXOffset;
            var top = rect.top + this.window.pageYOffset;
            var offset = this.offset();
            this.window.scrollTo(left - offset[0], top - offset[1]);
          }
          /**
           * Calls `focus` on the `focusTarget` and returns `true` if the element was focused successfully.
           *
           * If `false`, further steps may be necessary to determine a valid substitute to be focused
           * instead.
           *
           * @see https://html.spec.whatwg.org/#get-the-focusable-area
           * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus
           * @see https://html.spec.whatwg.org/#focusable-area
           */

        }, {
          key: "attemptFocus",
          value: function attemptFocus(focusTarget) {
            focusTarget.focus();
            return this.document.activeElement === focusTarget;
          }
          /**
           * We only support scroll restoration when we can get a hold of window.
           * This means that we do not support this behavior when running in a web worker.
           *
           * Lifting this restriction right now would require more changes in the dom adapter.
           * Since webworkers aren't widely used, we will lift it once RouterScroller is
           * battle-tested.
           */

        }, {
          key: "supportScrollRestoration",
          value: function supportScrollRestoration() {
            try {
              if (!this.supportsScrolling()) {
                return false;
              } // The `scrollRestoration` property could be on the `history` instance or its prototype.


              var scrollRestorationDescriptor = getScrollRestorationProperty(this.window.history) || getScrollRestorationProperty(Object.getPrototypeOf(this.window.history)); // We can write to the `scrollRestoration` property if it is a writable data field or it has a
              // setter function.

              return !!scrollRestorationDescriptor && !!(scrollRestorationDescriptor.writable || scrollRestorationDescriptor.set);
            } catch (_a) {
              return false;
            }
          }
        }, {
          key: "supportsScrolling",
          value: function supportsScrolling() {
            try {
              return !!this.window && !!this.window.scrollTo && 'pageXOffset' in this.window;
            } catch (_a) {
              return false;
            }
          }
        }]);

        return BrowserViewportScroller;
      }();

      function getScrollRestorationProperty(obj) {
        return Object.getOwnPropertyDescriptor(obj, 'scrollRestoration');
      }
      /**
       * Provides an empty implementation of the viewport scroller.
       */


      var NullViewportScroller = /*#__PURE__*/function () {
        function NullViewportScroller() {
          _classCallCheck(this, NullViewportScroller);
        }

        _createClass2(NullViewportScroller, [{
          key: "setOffset",
          value:
          /**
           * Empty implementation
           */
          function setOffset(offset) {}
          /**
           * Empty implementation
           */

        }, {
          key: "getScrollPosition",
          value: function getScrollPosition() {
            return [0, 0];
          }
          /**
           * Empty implementation
           */

        }, {
          key: "scrollToPosition",
          value: function scrollToPosition(position) {}
          /**
           * Empty implementation
           */

        }, {
          key: "scrollToAnchor",
          value: function scrollToAnchor(anchor) {}
          /**
           * Empty implementation
           */

        }, {
          key: "setHistoryScrollRestoration",
          value: function setHistoryScrollRestoration(scrollRestoration) {}
        }]);

        return NullViewportScroller;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // This file only reexports content of the `src` folder. Keep it that way.

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Generated bundle index. Do not edit.
       */
      //# sourceMappingURL=common.js.map

      /***/

    },

    /***/
    "omaz":
    /*!*****************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/version.js ***!
      \*****************************************************/

    /*! exports provided: SDK_NAME */

    /***/
    function omaz(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SDK_NAME", function () {
        return SDK_NAME;
      }); // TODO: Remove in the next major release and rely only on @sentry/core SDK_VERSION and SdkInfo metadata


      var SDK_NAME = 'sentry.javascript.browser'; //# sourceMappingURL=version.js.map

      /***/
    },

    /***/
    "ox7Z":
    /*!*************************************************************!*\
      !*** ./node_modules/@sentry/core/esm/integrations/index.js ***!
      \*************************************************************/

    /*! exports provided: FunctionToString, InboundFilters */

    /***/
    function ox7Z(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _functiontostring__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./functiontostring */
      "RDap");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "FunctionToString", function () {
        return _functiontostring__WEBPACK_IMPORTED_MODULE_0__["FunctionToString"];
      });
      /* harmony import */


      var _inboundfilters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./inboundfilters */
      "lddD");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "InboundFilters", function () {
        return _inboundfilters__WEBPACK_IMPORTED_MODULE_1__["InboundFilters"];
      }); //# sourceMappingURL=index.js.map

      /***/

    },

    /***/
    "p9/F":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/buffer.js ***!
      \*****************************************************************/

    /*! exports provided: buffer */

    /***/
    function p9F(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "buffer", function () {
        return buffer;
      });
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function buffer(closingNotifier) {
        return function bufferOperatorFunction(source) {
          return source.lift(new BufferOperator(closingNotifier));
        };
      }

      var BufferOperator = /*#__PURE__*/function () {
        function BufferOperator(closingNotifier) {
          _classCallCheck(this, BufferOperator);

          this.closingNotifier = closingNotifier;
        }

        _createClass2(BufferOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
          }
        }]);

        return BufferOperator;
      }();

      var BufferSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP16) {
        _inherits(BufferSubscriber, _innerSubscribe__WEBP16);

        var _super266 = _createSuper(BufferSubscriber);

        function BufferSubscriber(destination, closingNotifier) {
          var _this540;

          _classCallCheck(this, BufferSubscriber);

          _this540 = _super266.call(this, destination);
          _this540.buffer = [];

          _this540.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(closingNotifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](_assertThisInitialized(_this540))));

          return _this540;
        }

        _createClass2(BufferSubscriber, [{
          key: "_next",
          value: function _next(value) {
            this.buffer.push(value);
          }
        }, {
          key: "notifyNext",
          value: function notifyNext() {
            var buffer = this.buffer;
            this.buffer = [];
            this.destination.next(buffer);
          }
        }]);

        return BufferSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"]); //# sourceMappingURL=buffer.js.map

      /***/

    },

    /***/
    "pLZG":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/filter.js ***!
      \*****************************************************************/

    /*! exports provided: filter */

    /***/
    function pLZG(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "filter", function () {
        return filter;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function filter(predicate, thisArg) {
        return function filterOperatorFunction(source) {
          return source.lift(new FilterOperator(predicate, thisArg));
        };
      }

      var FilterOperator = /*#__PURE__*/function () {
        function FilterOperator(predicate, thisArg) {
          _classCallCheck(this, FilterOperator);

          this.predicate = predicate;
          this.thisArg = thisArg;
        }

        _createClass2(FilterOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
          }
        }]);

        return FilterOperator;
      }();

      var FilterSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_41) {
        _inherits(FilterSubscriber, _Subscriber__WEBPACK_41);

        var _super267 = _createSuper(FilterSubscriber);

        function FilterSubscriber(destination, predicate, thisArg) {
          var _this541;

          _classCallCheck(this, FilterSubscriber);

          _this541 = _super267.call(this, destination);
          _this541.predicate = predicate;
          _this541.thisArg = thisArg;
          _this541.count = 0;
          return _this541;
        }

        _createClass2(FilterSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var result;

            try {
              result = this.predicate.call(this.thisArg, value, this.count++);
            } catch (err) {
              this.destination.error(err);
              return;
            }

            if (result) {
              this.destination.next(value);
            }
          }
        }]);

        return FilterSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=filter.js.map

      /***/

    },

    /***/
    "pLzU":
    /*!*************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToIterable.js ***!
      \*************************************************************************/

    /*! exports provided: subscribeToIterable */

    /***/
    function pLzU(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "subscribeToIterable", function () {
        return subscribeToIterable;
      });
      /* harmony import */


      var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../symbol/iterator */
      "Lhse");

      var subscribeToIterable = function subscribeToIterable(iterable) {
        return function (subscriber) {
          var iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]]();

          do {
            var item = void 0;

            try {
              item = iterator.next();
            } catch (err) {
              subscriber.error(err);
              return subscriber;
            }

            if (item.done) {
              subscriber.complete();
              break;
            }

            subscriber.next(item.value);

            if (subscriber.closed) {
              break;
            }
          } while (true);

          if (typeof iterator["return"] === 'function') {
            subscriber.add(function () {
              if (iterator["return"]) {
                iterator["return"]();
              }
            });
          }

          return subscriber;
        };
      }; //# sourceMappingURL=subscribeToIterable.js.map

      /***/

    },

    /***/
    "pRiV":
    /*!******************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/stacktrace.js ***!
      \******************************************************/

    /*! exports provided: getFunctionName */

    /***/
    function pRiV(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getFunctionName", function () {
        return getFunctionName;
      });

      var defaultFunctionName = '<anonymous>';
      /**
       * Safely extract function name from itself
       */

      function getFunctionName(fn) {
        try {
          if (!fn || typeof fn !== 'function') {
            return defaultFunctionName;
          }

          return fn.name || defaultFunctionName;
        } catch (e) {
          // Just accessing custom props in some Selenium environments
          // can cause a "Permission denied" exception (see raven-js#495).
          return defaultFunctionName;
        }
      } //# sourceMappingURL=stacktrace.js.map

      /***/

    },

    /***/
    "pXlZ":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/windowWhen.js ***!
      \*********************************************************************/

    /*! exports provided: windowWhen */

    /***/
    function pXlZ(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "windowWhen", function () {
        return windowWhen;
      });
      /* harmony import */


      var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subject */
      "XNiG");
      /* harmony import */


      var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../OuterSubscriber */
      "l7GE");
      /* harmony import */


      var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../util/subscribeToResult */
      "ZUHj");

      function windowWhen(closingSelector) {
        return function windowWhenOperatorFunction(source) {
          return source.lift(new WindowOperator(closingSelector));
        };
      }

      var WindowOperator = /*#__PURE__*/function () {
        function WindowOperator(closingSelector) {
          _classCallCheck(this, WindowOperator);

          this.closingSelector = closingSelector;
        }

        _createClass2(WindowOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));
          }
        }]);

        return WindowOperator;
      }();

      var WindowSubscriber = /*#__PURE__*/function (_OuterSubscriber__WEB5) {
        _inherits(WindowSubscriber, _OuterSubscriber__WEB5);

        var _super268 = _createSuper(WindowSubscriber);

        function WindowSubscriber(destination, closingSelector) {
          var _this542;

          _classCallCheck(this, WindowSubscriber);

          _this542 = _super268.call(this, destination);
          _this542.destination = destination;
          _this542.closingSelector = closingSelector;

          _this542.openWindow();

          return _this542;
        }

        _createClass2(WindowSubscriber, [{
          key: "notifyNext",
          value: function notifyNext(_outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) {
            this.openWindow(innerSub);
          }
        }, {
          key: "notifyError",
          value: function notifyError(error) {
            this._error(error);
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete(innerSub) {
            this.openWindow(innerSub);
          }
        }, {
          key: "_next",
          value: function _next(value) {
            this.window.next(value);
          }
        }, {
          key: "_error",
          value: function _error(err) {
            this.window.error(err);
            this.destination.error(err);
            this.unsubscribeClosingNotification();
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.window.complete();
            this.destination.complete();
            this.unsubscribeClosingNotification();
          }
        }, {
          key: "unsubscribeClosingNotification",
          value: function unsubscribeClosingNotification() {
            if (this.closingNotification) {
              this.closingNotification.unsubscribe();
            }
          }
        }, {
          key: "openWindow",
          value: function openWindow() {
            var innerSub = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;

            if (innerSub) {
              this.remove(innerSub);
              innerSub.unsubscribe();
            }

            var prevWindow = this.window;

            if (prevWindow) {
              prevWindow.complete();
            }

            var window = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
            this.destination.next(window);
            var closingNotifier;

            try {
              var closingSelector = this.closingSelector;
              closingNotifier = closingSelector();
            } catch (e) {
              this.destination.error(e);
              this.window.error(e);
              return;
            }

            this.add(this.closingNotification = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, closingNotifier));
          }
        }]);

        return WindowSubscriber;
      }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]); //# sourceMappingURL=windowWhen.js.map

      /***/

    },

    /***/
    "pZxY":
    /*!************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/path.js ***!
      \************************************************/

    /*! exports provided: resolve, relative, normalizePath, isAbsolute, join, dirname, basename */

    /***/
    function pZxY(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "resolve", function () {
        return resolve;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "relative", function () {
        return relative;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "normalizePath", function () {
        return normalizePath;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isAbsolute", function () {
        return isAbsolute;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "join", function () {
        return join;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "dirname", function () {
        return dirname;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "basename", function () {
        return basename;
      }); // Slightly modified (no IE8 support, ES6) and transcribed to TypeScript
      // https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js

      /** JSDoc */


      function normalizeArray(parts, allowAboveRoot) {
        // if the path tries to go above the root, `up` ends up > 0
        var up = 0;

        for (var i = parts.length - 1; i >= 0; i--) {
          var last = parts[i];

          if (last === '.') {
            parts.splice(i, 1);
          } else if (last === '..') {
            parts.splice(i, 1); // eslint-disable-next-line no-plusplus

            up++;
          } else if (up) {
            parts.splice(i, 1); // eslint-disable-next-line no-plusplus

            up--;
          }
        } // if the path is allowed to go above the root, restore leading ..s


        if (allowAboveRoot) {
          // eslint-disable-next-line no-plusplus
          for (; up--; up) {
            parts.unshift('..');
          }
        }

        return parts;
      } // Split a filename into [root, dir, basename, ext], unix version
      // 'root' is just a slash, or nothing.


      var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;
      /** JSDoc */

      function splitPath(filename) {
        var parts = splitPathRe.exec(filename);
        return parts ? parts.slice(1) : [];
      } // path.resolve([from ...], to)
      // posix version

      /** JSDoc */


      function resolve() {
        var args = [];

        for (var _i = 0; _i < arguments.length; _i++) {
          args[_i] = arguments[_i];
        }

        var resolvedPath = '';
        var resolvedAbsolute = false;

        for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
          var path = i >= 0 ? args[i] : '/'; // Skip empty entries

          if (!path) {
            continue;
          }

          resolvedPath = path + "/" + resolvedPath;
          resolvedAbsolute = path.charAt(0) === '/';
        } // At this point the path should be resolved to a full absolute path, but
        // handle relative paths to be safe (might happen when process.cwd() fails)
        // Normalize the path


        resolvedPath = normalizeArray(resolvedPath.split('/').filter(function (p) {
          return !!p;
        }), !resolvedAbsolute).join('/');
        return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';
      }
      /** JSDoc */


      function trim(arr) {
        var start = 0;

        for (; start < arr.length; start++) {
          if (arr[start] !== '') {
            break;
          }
        }

        var end = arr.length - 1;

        for (; end >= 0; end--) {
          if (arr[end] !== '') {
            break;
          }
        }

        if (start > end) {
          return [];
        }

        return arr.slice(start, end - start + 1);
      } // path.relative(from, to)
      // posix version

      /** JSDoc */


      function relative(from, to) {
        /* eslint-disable no-param-reassign */
        from = resolve(from).substr(1);
        to = resolve(to).substr(1);
        /* eslint-enable no-param-reassign */

        var fromParts = trim(from.split('/'));
        var toParts = trim(to.split('/'));
        var length = Math.min(fromParts.length, toParts.length);
        var samePartsLength = length;

        for (var i = 0; i < length; i++) {
          if (fromParts[i] !== toParts[i]) {
            samePartsLength = i;
            break;
          }
        }

        var outputParts = [];

        for (var i = samePartsLength; i < fromParts.length; i++) {
          outputParts.push('..');
        }

        outputParts = outputParts.concat(toParts.slice(samePartsLength));
        return outputParts.join('/');
      } // path.normalize(path)
      // posix version

      /** JSDoc */


      function normalizePath(path) {
        var isPathAbsolute = isAbsolute(path);
        var trailingSlash = path.substr(-1) === '/'; // Normalize the path

        var normalizedPath = normalizeArray(path.split('/').filter(function (p) {
          return !!p;
        }), !isPathAbsolute).join('/');

        if (!normalizedPath && !isPathAbsolute) {
          normalizedPath = '.';
        }

        if (normalizedPath && trailingSlash) {
          normalizedPath += '/';
        }

        return (isPathAbsolute ? '/' : '') + normalizedPath;
      } // posix version

      /** JSDoc */


      function isAbsolute(path) {
        return path.charAt(0) === '/';
      } // posix version

      /** JSDoc */


      function join() {
        var args = [];

        for (var _i = 0; _i < arguments.length; _i++) {
          args[_i] = arguments[_i];
        }

        return normalizePath(args.join('/'));
      }
      /** JSDoc */


      function dirname(path) {
        var result = splitPath(path);
        var root = result[0];
        var dir = result[1];

        if (!root && !dir) {
          // No dirname whatsoever
          return '.';
        }

        if (dir) {
          // It has a dirname, strip trailing slash
          dir = dir.substr(0, dir.length - 1);
        }

        return root + dir;
      }
      /** JSDoc */


      function basename(path, ext) {
        var f = splitPath(path)[2];

        if (ext && f.substr(ext.length * -1) === ext) {
          f = f.substr(0, f.length - ext.length);
        }

        return f;
      } //# sourceMappingURL=path.js.map

      /***/

    },

    /***/
    "pjAE":
    /*!*************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/UnsubscriptionError.js ***!
      \*************************************************************************/

    /*! exports provided: UnsubscriptionError */

    /***/
    function pjAE(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function () {
        return UnsubscriptionError;
      });

      var UnsubscriptionErrorImpl = function () {
        function UnsubscriptionErrorImpl(errors) {
          Error.call(this);
          this.message = errors ? "".concat(errors.length, " errors occurred during unsubscription:\n").concat(errors.map(function (err, i) {
            return "".concat(i + 1, ") ").concat(err.toString());
          }).join('\n  ')) : '';
          this.name = 'UnsubscriptionError';
          this.errors = errors;
          return this;
        }

        UnsubscriptionErrorImpl.prototype = Object.create(Error.prototype);
        return UnsubscriptionErrorImpl;
      }();

      var UnsubscriptionError = UnsubscriptionErrorImpl; //# sourceMappingURL=UnsubscriptionError.js.map

      /***/
    },

    /***/
    "pqa8":
    /*!**********************************************************************************!*\
      !*** ./node_modules/@firebase/firestore/dist/esm5/prebuilt-306f43d8-45d6f0b9.js ***!
      \**********************************************************************************/

    /*! exports provided: C, E, M, Q, T, U, W, X, Z, a, c, j, n, o, q, r, s, t, u, z */

    /***/
    function pqa8(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "C", function () {
        return ya;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "E", function () {
        return sa;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "M", function () {
        return j;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Q", function () {
        return Nc;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "T", function () {
        return ua;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "U", function () {
        return _c;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "W", function () {
        return Ac;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "X", function () {
        return Oc;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Z", function () {
        return Pc;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "a", function () {
        return Tc;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "c", function () {
        return Kc;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "j", function () {
        return Dc;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "n", function () {
        return Vc;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "o", function () {
        return jc;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "q", function () {
        return Ec;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "r", function () {
        return Bc;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "s", function () {
        return qc;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "t", function () {
        return Fc;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "u", function () {
        return Qc;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "z", function () {
        return Cc;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _firebase_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @firebase/util */
      "qOnz");
      /* harmony import */


      var _firebase_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @firebase/logger */
      "q/0M");
      /* harmony import */


      var _firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @firebase/webchannel-wrapper */
      "x7I3");
      /**
       * @license
       * Copyright 2018 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * `ListenSequence` is a monotonic sequence. It is initialized with a minimum value to
       * exceed. All subsequent calls to next will return increasing values. If provided with a
       * `SequenceNumberSyncer`, it will additionally bump its next value when told of a new value, as
       * well as write out sequence numbers that it produces via `next()`.
       */


      var S =
      /** @class */
      function () {
        function t(t, e) {
          var n = this;
          this.previousValue = t, e && (e.sequenceNumberHandler = function (t) {
            return n.t(t);
          }, this.i = function (t) {
            return e.writeSequenceNumber(t);
          });
        }

        return t.prototype.t = function (t) {
          return this.previousValue = Math.max(t, this.previousValue), this.previousValue;
        }, t.prototype.next = function () {
          var t = ++this.previousValue;
          return this.i && this.i(t), t;
        }, t;
      }();

      S.o = -1;
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      var N = {
        // Causes are copied from:
        // https://github.com/grpc/grpc/blob/bceec94ea4fc5f0085d81235d8e1c06798dc341a/include/grpc%2B%2B/impl/codegen/status_code_enum.h

        /** Not an error; returned on success. */
        OK: "ok",

        /** The operation was cancelled (typically by the caller). */
        CANCELLED: "cancelled",

        /** Unknown error or an error from a different error domain. */
        UNKNOWN: "unknown",

        /**
         * Client specified an invalid argument. Note that this differs from
         * FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are
         * problematic regardless of the state of the system (e.g., a malformed file
         * name).
         */
        INVALID_ARGUMENT: "invalid-argument",

        /**
         * Deadline expired before operation could complete. For operations that
         * change the state of the system, this error may be returned even if the
         * operation has completed successfully. For example, a successful response
         * from a server could have been delayed long enough for the deadline to
         * expire.
         */
        DEADLINE_EXCEEDED: "deadline-exceeded",

        /** Some requested entity (e.g., file or directory) was not found. */
        NOT_FOUND: "not-found",

        /**
         * Some entity that we attempted to create (e.g., file or directory) already
         * exists.
         */
        ALREADY_EXISTS: "already-exists",

        /**
         * The caller does not have permission to execute the specified operation.
         * PERMISSION_DENIED must not be used for rejections caused by exhausting
         * some resource (use RESOURCE_EXHAUSTED instead for those errors).
         * PERMISSION_DENIED must not be used if the caller can not be identified
         * (use UNAUTHENTICATED instead for those errors).
         */
        PERMISSION_DENIED: "permission-denied",

        /**
         * The request does not have valid authentication credentials for the
         * operation.
         */
        UNAUTHENTICATED: "unauthenticated",

        /**
         * Some resource has been exhausted, perhaps a per-user quota, or perhaps the
         * entire file system is out of space.
         */
        RESOURCE_EXHAUSTED: "resource-exhausted",

        /**
         * Operation was rejected because the system is not in a state required for
         * the operation's execution. For example, directory to be deleted may be
         * non-empty, an rmdir operation is applied to a non-directory, etc.
         *
         * A litmus test that may help a service implementor in deciding
         * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:
         *  (a) Use UNAVAILABLE if the client can retry just the failing call.
         *  (b) Use ABORTED if the client should retry at a higher-level
         *      (e.g., restarting a read-modify-write sequence).
         *  (c) Use FAILED_PRECONDITION if the client should not retry until
         *      the system state has been explicitly fixed. E.g., if an "rmdir"
         *      fails because the directory is non-empty, FAILED_PRECONDITION
         *      should be returned since the client should not retry unless
         *      they have first fixed up the directory by deleting files from it.
         *  (d) Use FAILED_PRECONDITION if the client performs conditional
         *      REST Get/Update/Delete on a resource and the resource on the
         *      server does not match the condition. E.g., conflicting
         *      read-modify-write on the same resource.
         */
        FAILED_PRECONDITION: "failed-precondition",

        /**
         * The operation was aborted, typically due to a concurrency issue like
         * sequencer check failures, transaction aborts, etc.
         *
         * See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,
         * and UNAVAILABLE.
         */
        ABORTED: "aborted",

        /**
         * Operation was attempted past the valid range. E.g., seeking or reading
         * past end of file.
         *
         * Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed
         * if the system state changes. For example, a 32-bit file system will
         * generate INVALID_ARGUMENT if asked to read at an offset that is not in the
         * range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from
         * an offset past the current file size.
         *
         * There is a fair bit of overlap between FAILED_PRECONDITION and
         * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error)
         * when it applies so that callers who are iterating through a space can
         * easily look for an OUT_OF_RANGE error to detect when they are done.
         */
        OUT_OF_RANGE: "out-of-range",

        /** Operation is not implemented or not supported/enabled in this service. */
        UNIMPLEMENTED: "unimplemented",

        /**
         * Internal errors. Means some invariants expected by underlying System has
         * been broken. If you see one of these errors, Something is very broken.
         */
        INTERNAL: "internal",

        /**
         * The service is currently unavailable. This is a most likely a transient
         * condition and may be corrected by retrying with a backoff.
         *
         * See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,
         * and UNAVAILABLE.
         */
        UNAVAILABLE: "unavailable",

        /** Unrecoverable data loss or corruption. */
        DATA_LOSS: "data-loss"
      },
          D =
      /** @class */
      function (e) {
        /** @hideconstructor */
        function n(
        /**
         * The backend error code associated with this error.
         */
        t,
        /**
         * A custom error description.
         */
        n) {
          var r = this;
          return (r = e.call(this, n) || this).code = t, r.message = n,
          /** The custom name for all FirestoreErrors. */
          r.name = "FirebaseError", // HACK: We write a toString property directly because Error is not a real
          // class and so inheritance does not work correctly. We could alternatively
          // do the same "back-door inheritance" trick that FirebaseError does.
          r.toString = function () {
            return r.name + ": [code=" + r.code + "]: " + r.message;
          }, r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n;
      }(Error),
          A = new _firebase_logger__WEBPACK_IMPORTED_MODULE_2__["Logger"]("@firebase/firestore");
      /** An error returned by a Firestore operation. */
      // Helper methods are needed because variables can't be exported as read/write


      function k() {
        return A.logLevel;
      }
      /**
       * Sets the verbosity of Cloud Firestore logs (debug, error, or silent).
       *
       * @param logLevel - The verbosity you set for activity and error logging. Can
       *   be any of the following values:
       *
       *   <ul>
       *     <li>`debug` for the most verbose logging level, primarily for
       *     debugging.</li>
       *     <li>`error` to log errors only.</li>
       *     <li><code>`silent` to turn off logging.</li>
       *   </ul>
       */


      function C(t) {
        for (var n = [], r = 1; r < arguments.length; r++) {
          n[r - 1] = arguments[r];
        }

        if (A.logLevel <= _firebase_logger__WEBPACK_IMPORTED_MODULE_2__["LogLevel"].DEBUG) {
          var i = n.map(L);
          A.debug.apply(A, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])(["Firestore (8.10.0): " + t], i));
        }
      }

      function x(t) {
        for (var n = [], r = 1; r < arguments.length; r++) {
          n[r - 1] = arguments[r];
        }

        if (A.logLevel <= _firebase_logger__WEBPACK_IMPORTED_MODULE_2__["LogLevel"].ERROR) {
          var i = n.map(L);
          A.error.apply(A, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])(["Firestore (8.10.0): " + t], i));
        }
      }

      function R(t) {
        for (var n = [], r = 1; r < arguments.length; r++) {
          n[r - 1] = arguments[r];
        }

        if (A.logLevel <= _firebase_logger__WEBPACK_IMPORTED_MODULE_2__["LogLevel"].WARN) {
          var i = n.map(L);
          A.warn.apply(A, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])(["Firestore (8.10.0): " + t], i));
        }
      }
      /**
       * Converts an additional log parameter to a string representation.
       */


      function L(t) {
        if ("string" == typeof t) return t;

        try {
          return e = t, JSON.stringify(e);
        } catch (e) {
          // Converting to JSON failed, just log the object directly
          return t;
        }

        var e;
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Unconditionally fails, throwing an Error with the given message.
       * Messages are stripped in production builds.
       *
       * Returns `never` and can be used in expressions:
       * @example
       * let futureVar = fail('not implemented yet');
       */


      function O(t) {
        void 0 === t && (t = "Unexpected state"); // Log the failure in addition to throw an exception, just in case the
        // exception is swallowed.

        var e = "FIRESTORE (8.10.0) INTERNAL ASSERTION FAILED: " + t; // NOTE: We don't use FirestoreError here because these are internal failures
        // that cannot be handled by the user. (Also it would create a circular
        // dependency between the error and assert modules which doesn't work.)

        throw x(e), new Error(e)
        /**
        * Fails if the given assertion condition is false, throwing an Error with the
        * given message if it did.
        *
        * Messages are stripped in production builds.
        */
        ;
      }

      function P(t, e) {
        t || O();
      }
      /**
       * Casts `obj` to `T`. In non-production builds, verifies that `obj` is an
       * instance of `T` before casting.
       */


      function F(t, // eslint-disable-next-line @typescript-eslint/no-explicit-any
      e) {
        return t;
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Generates `nBytes` of random bytes.
       *
       * If `nBytes < 0` , an error will be thrown.
       */


      function M(t) {
        // Polyfills for IE and WebWorker by using `self` and `msCrypto` when `crypto` is not available.
        var e = // eslint-disable-next-line @typescript-eslint/no-explicit-any
        "undefined" != typeof self && (self.crypto || self.msCrypto),
            n = new Uint8Array(t);
        if (e && "function" == typeof e.getRandomValues) e.getRandomValues(n);else // Falls back to Math.random
          for (var r = 0; r < t; r++) {
            n[r] = Math.floor(256 * Math.random());
          }
        return n;
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var V =
      /** @class */
      function () {
        function t() {}

        return t.u = function () {
          for ( // Alphanumeric characters
          var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", e = Math.floor(256 / t.length) * t.length, n = "" // The largest byte value that is a multiple of `char.length`.
          ; n.length < 20;) {
            for (var r = M(40), i = 0; i < r.length; ++i) {
              // Only accept values that are [0, maxMultiple), this ensures they can
              // be evenly mapped to indices of `chars` via a modulo operation.
              n.length < 20 && r[i] < e && (n += t.charAt(r[i] % t.length));
            }
          }

          return n;
        }, t;
      }();

      function q(t, e) {
        return t < e ? -1 : t > e ? 1 : 0;
      }
      /** Helper to compare arrays using isEqual(). */


      function U(t, e, n) {
        return t.length === e.length && t.every(function (t, r) {
          return n(t, e[r]);
        });
      }
      /**
       * Returns the immediate lexicographically-following string. This is useful to
       * construct an inclusive range for indexeddb iterators.
       */


      function B(t) {
        // Return the input string, with an additional NUL byte appended.
        return t + "\0";
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */
      // The earliest date supported by Firestore timestamps (0001-01-01T00:00:00Z).

      /**
       * A `Timestamp` represents a point in time independent of any time zone or
       * calendar, represented as seconds and fractions of seconds at nanosecond
       * resolution in UTC Epoch time.
       *
       * It is encoded using the Proleptic Gregorian Calendar which extends the
       * Gregorian calendar backwards to year one. It is encoded assuming all minutes
       * are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second
       * table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to
       * 9999-12-31T23:59:59.999999999Z.
       *
       * For examples and further specifications, refer to the
       * {@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto | Timestamp definition}.
       */


      var j =
      /** @class */
      function () {
        /**
         * Creates a new timestamp.
         *
         * @param seconds - The number of seconds of UTC time since Unix epoch
         *     1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
         *     9999-12-31T23:59:59Z inclusive.
         * @param nanoseconds - The non-negative fractions of a second at nanosecond
         *     resolution. Negative second values with fractions must still have
         *     non-negative nanoseconds values that count forward in time. Must be
         *     from 0 to 999,999,999 inclusive.
         */
        function t(
        /**
         * The number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
         */
        t,
        /**
         * The fractions of a second at nanosecond resolution.*
         */
        e) {
          if (this.seconds = t, this.nanoseconds = e, e < 0) throw new D(N.INVALID_ARGUMENT, "Timestamp nanoseconds out of range: " + e);
          if (e >= 1e9) throw new D(N.INVALID_ARGUMENT, "Timestamp nanoseconds out of range: " + e);
          if (t < -62135596800) throw new D(N.INVALID_ARGUMENT, "Timestamp seconds out of range: " + t); // This will break in the year 10,000.

          if (t >= 253402300800) throw new D(N.INVALID_ARGUMENT, "Timestamp seconds out of range: " + t);
        }
        /**
         * Creates a new timestamp with the current date, with millisecond precision.
         *
         * @returns a new timestamp representing the current date.
         */


        return t.now = function () {
          return t.fromMillis(Date.now());
        },
        /**
         * Creates a new timestamp from the given date.
         *
         * @param date - The date to initialize the `Timestamp` from.
         * @returns A new `Timestamp` representing the same point in time as the given
         *     date.
         */
        t.fromDate = function (e) {
          return t.fromMillis(e.getTime());
        },
        /**
         * Creates a new timestamp from the given number of milliseconds.
         *
         * @param milliseconds - Number of milliseconds since Unix epoch
         *     1970-01-01T00:00:00Z.
         * @returns A new `Timestamp` representing the same point in time as the given
         *     number of milliseconds.
         */
        t.fromMillis = function (e) {
          var n = Math.floor(e / 1e3);
          return new t(n, Math.floor(1e6 * (e - 1e3 * n)));
        },
        /**
         * Converts a `Timestamp` to a JavaScript `Date` object. This conversion
         * causes a loss of precision since `Date` objects only support millisecond
         * precision.
         *
         * @returns JavaScript `Date` object representing the same point in time as
         *     this `Timestamp`, with millisecond precision.
         */
        t.prototype.toDate = function () {
          return new Date(this.toMillis());
        },
        /**
         * Converts a `Timestamp` to a numeric timestamp (in milliseconds since
         * epoch). This operation causes a loss of precision.
         *
         * @returns The point in time corresponding to this timestamp, represented as
         *     the number of milliseconds since Unix epoch 1970-01-01T00:00:00Z.
         */
        t.prototype.toMillis = function () {
          return 1e3 * this.seconds + this.nanoseconds / 1e6;
        }, t.prototype._compareTo = function (t) {
          return this.seconds === t.seconds ? q(this.nanoseconds, t.nanoseconds) : q(this.seconds, t.seconds);
        },
        /**
         * Returns true if this `Timestamp` is equal to the provided one.
         *
         * @param other - The `Timestamp` to compare against.
         * @returns true if this `Timestamp` is equal to the provided one.
         */
        t.prototype.isEqual = function (t) {
          return t.seconds === this.seconds && t.nanoseconds === this.nanoseconds;
        },
        /** Returns a textual representation of this Timestamp. */
        t.prototype.toString = function () {
          return "Timestamp(seconds=" + this.seconds + ", nanoseconds=" + this.nanoseconds + ")";
        },
        /** Returns a JSON-serializable representation of this Timestamp. */
        t.prototype.toJSON = function () {
          return {
            seconds: this.seconds,
            nanoseconds: this.nanoseconds
          };
        },
        /**
         * Converts this object to a primitive string, which allows Timestamp objects
         * to be compared using the `>`, `<=`, `>=` and `>` operators.
         */
        t.prototype.valueOf = function () {
          // This method returns a string of the form <seconds>.<nanoseconds> where
          // <seconds> is translated to have a non-negative value and both <seconds>
          // and <nanoseconds> are left-padded with zeroes to be a consistent length.
          // Strings with this format then have a lexiographical ordering that matches
          // the expected ordering. The <seconds> translation is done to avoid having
          // a leading negative sign (i.e. a leading '-' character) in its string
          // representation, which would affect its lexiographical ordering.
          var t = this.seconds - -62135596800; // Note: Up to 12 decimal digits are required to represent all valid
          // 'seconds' values.

          return String(t).padStart(12, "0") + "." + String(this.nanoseconds).padStart(9, "0");
        }, t;
      }(),
          K =
      /** @class */
      function () {
        function t(t) {
          this.timestamp = t;
        }

        return t.fromTimestamp = function (e) {
          return new t(e);
        }, t.min = function () {
          return new t(new j(0, 0));
        }, t.prototype.compareTo = function (t) {
          return this.timestamp._compareTo(t.timestamp);
        }, t.prototype.isEqual = function (t) {
          return this.timestamp.isEqual(t.timestamp);
        },
        /** Returns a number representation of the version for use in spec tests. */
        t.prototype.toMicroseconds = function () {
          // Convert to microseconds.
          return 1e6 * this.timestamp.seconds + this.timestamp.nanoseconds / 1e3;
        }, t.prototype.toString = function () {
          return "SnapshotVersion(" + this.timestamp.toString() + ")";
        }, t.prototype.toTimestamp = function () {
          return this.timestamp;
        }, t;
      }();
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * A version of a document in Firestore. This corresponds to the version
       * timestamp, such as update_time or read_time.
       */

      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      function Q(t) {
        var e = 0;

        for (var n in t) {
          Object.prototype.hasOwnProperty.call(t, n) && e++;
        }

        return e;
      }

      function G(t, e) {
        for (var n in t) {
          Object.prototype.hasOwnProperty.call(t, n) && e(n, t[n]);
        }
      }

      function z(t) {
        for (var e in t) {
          if (Object.prototype.hasOwnProperty.call(t, e)) return !1;
        }

        return !0;
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Path represents an ordered sequence of string segments.
       */


      var W =
      /** @class */
      function () {
        function t(t, e, n) {
          void 0 === e ? e = 0 : e > t.length && O(), void 0 === n ? n = t.length - e : n > t.length - e && O(), this.segments = t, this.offset = e, this.len = n;
        }

        return Object.defineProperty(t.prototype, "length", {
          get: function get() {
            return this.len;
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.isEqual = function (e) {
          return 0 === t.comparator(this, e);
        }, t.prototype.child = function (e) {
          var n = this.segments.slice(this.offset, this.limit());
          return e instanceof t ? e.forEach(function (t) {
            n.push(t);
          }) : n.push(e), this.construct(n);
        },
        /** The index of one past the last segment of the path. */
        t.prototype.limit = function () {
          return this.offset + this.length;
        }, t.prototype.popFirst = function (t) {
          return t = void 0 === t ? 1 : t, this.construct(this.segments, this.offset + t, this.length - t);
        }, t.prototype.popLast = function () {
          return this.construct(this.segments, this.offset, this.length - 1);
        }, t.prototype.firstSegment = function () {
          return this.segments[this.offset];
        }, t.prototype.lastSegment = function () {
          return this.get(this.length - 1);
        }, t.prototype.get = function (t) {
          return this.segments[this.offset + t];
        }, t.prototype.isEmpty = function () {
          return 0 === this.length;
        }, t.prototype.isPrefixOf = function (t) {
          if (t.length < this.length) return !1;

          for (var e = 0; e < this.length; e++) {
            if (this.get(e) !== t.get(e)) return !1;
          }

          return !0;
        }, t.prototype.isImmediateParentOf = function (t) {
          if (this.length + 1 !== t.length) return !1;

          for (var e = 0; e < this.length; e++) {
            if (this.get(e) !== t.get(e)) return !1;
          }

          return !0;
        }, t.prototype.forEach = function (t) {
          for (var e = this.offset, n = this.limit(); e < n; e++) {
            t(this.segments[e]);
          }
        }, t.prototype.toArray = function () {
          return this.segments.slice(this.offset, this.limit());
        }, t.comparator = function (t, e) {
          for (var n = Math.min(t.length, e.length), r = 0; r < n; r++) {
            var i = t.get(r),
                o = e.get(r);
            if (i < o) return -1;
            if (i > o) return 1;
          }

          return t.length < e.length ? -1 : t.length > e.length ? 1 : 0;
        }, t;
      }(),
          H =
      /** @class */
      function (e) {
        function n() {
          return null !== e && e.apply(this, arguments) || this;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.construct = function (t, e, r) {
          return new n(t, e, r);
        }, n.prototype.canonicalString = function () {
          // NOTE: The client is ignorant of any path segments containing escape
          // sequences (e.g. __id123__) and just passes them through raw (they exist
          // for legacy reasons and should not be used frequently).
          return this.toArray().join("/");
        }, n.prototype.toString = function () {
          return this.canonicalString();
        },
        /**
         * Creates a resource path from the given slash-delimited string. If multiple
         * arguments are provided, all components are combined. Leading and trailing
         * slashes from all components are ignored.
         */
        n.fromString = function () {
          for (var t = [], e = 0; e < arguments.length; e++) {
            t[e] = arguments[e];
          } // NOTE: The client is ignorant of any path segments containing escape
          // sequences (e.g. __id123__) and just passes them through raw (they exist
          // for legacy reasons and should not be used frequently).


          for (var r = [], i = 0, o = t; i < o.length; i++) {
            var s = o[i];
            if (s.indexOf("//") >= 0) throw new D(N.INVALID_ARGUMENT, "Invalid segment (" + s + "). Paths must not contain // in them."); // Strip leading and traling slashed.

            r.push.apply(r, s.split("/").filter(function (t) {
              return t.length > 0;
            }));
          }

          return new n(r);
        }, n.emptyPath = function () {
          return new n([]);
        }, n;
      }(W),
          Y = /^[_a-zA-Z][_a-zA-Z0-9]*$/,
          $ =
      /** @class */
      function (e) {
        function n() {
          return null !== e && e.apply(this, arguments) || this;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.construct = function (t, e, r) {
          return new n(t, e, r);
        },
        /**
         * Returns true if the string could be used as a segment in a field path
         * without escaping.
         */
        n.isValidIdentifier = function (t) {
          return Y.test(t);
        }, n.prototype.canonicalString = function () {
          return this.toArray().map(function (t) {
            return t = t.replace(/\\/g, "\\\\").replace(/`/g, "\\`"), n.isValidIdentifier(t) || (t = "`" + t + "`"), t;
          }).join(".");
        }, n.prototype.toString = function () {
          return this.canonicalString();
        },
        /**
         * Returns true if this field references the key of a document.
         */
        n.prototype.isKeyField = function () {
          return 1 === this.length && "__name__" === this.get(0);
        },
        /**
         * The field designating the key of a document.
         */
        n.keyField = function () {
          return new n(["__name__"]);
        },
        /**
         * Parses a field string from the given server-formatted string.
         *
         * - Splitting the empty string is not allowed (for now at least).
         * - Empty segments within the string (e.g. if there are two consecutive
         *   separators) are not allowed.
         *
         * TODO(b/37244157): we should make this more strict. Right now, it allows
         * non-identifier path components, even if they aren't escaped.
         */
        n.fromServerFormat = function (t) {
          for (var e = [], r = "", i = 0, o = function o() {
            if (0 === r.length) throw new D(N.INVALID_ARGUMENT, "Invalid field path (" + t + "). Paths must not be empty, begin with '.', end with '.', or contain '..'");
            e.push(r), r = "";
          }, s = !1; i < t.length;) {
            var u = t[i];

            if ("\\" === u) {
              if (i + 1 === t.length) throw new D(N.INVALID_ARGUMENT, "Path has trailing escape character: " + t);
              var a = t[i + 1];
              if ("\\" !== a && "." !== a && "`" !== a) throw new D(N.INVALID_ARGUMENT, "Path has invalid escape sequence: " + t);
              r += a, i += 2;
            } else "`" === u ? (s = !s, i++) : "." !== u || s ? (r += u, i++) : (o(), i++);
          }

          if (o(), s) throw new D(N.INVALID_ARGUMENT, "Unterminated ` in path: " + t);
          return new n(e);
        }, n.emptyPath = function () {
          return new n([]);
        }, n;
      }(W),
          X =
      /** @class */
      function () {
        function t(t) {
          this.fields = t, // TODO(dimond): validation of FieldMask
          // Sort the field mask to support `FieldMask.isEqual()` and assert below.
          t.sort($.comparator)
          /**
          * Verifies that `fieldPath` is included by at least one field in this field
          * mask.
          *
          * This is an O(n) operation, where `n` is the size of the field mask.
          */
          ;
        }

        return t.prototype.covers = function (t) {
          for (var e = 0, n = this.fields; e < n.length; e++) {
            if (n[e].isPrefixOf(t)) return !0;
          }

          return !1;
        }, t.prototype.isEqual = function (t) {
          return U(this.fields, t.fields, function (t, e) {
            return t.isEqual(e);
          });
        }, t;
      }(),
          J =
      /** @class */
      function () {
        function t(t) {
          this.binaryString = t;
        }

        return t.fromBase64String = function (e) {
          return new t(atob(e));
        }, t.fromUint8Array = function (e) {
          return new t(
          /**
          * Helper function to convert an Uint8array to a binary string.
          */
          function (t) {
            for (var e = "", n = 0; n < t.length; ++n) {
              e += String.fromCharCode(t[n]);
            }

            return e;
          }(e));
        }, t.prototype.toBase64 = function () {
          return t = this.binaryString, btoa(t);
          /** Converts a binary string to a Base64 encoded string. */

          var t;
          /** True if and only if the Base64 conversion functions are available. */
        }, t.prototype.toUint8Array = function () {
          return function (t) {
            for (var e = new Uint8Array(t.length), n = 0; n < t.length; n++) {
              e[n] = t.charCodeAt(n);
            }

            return e;
          }(this.binaryString);
        }, t.prototype.approximateByteSize = function () {
          return 2 * this.binaryString.length;
        }, t.prototype.compareTo = function (t) {
          return q(this.binaryString, t.binaryString);
        }, t.prototype.isEqual = function (t) {
          return this.binaryString === t.binaryString;
        }, t;
      }();
      /**
       * A slash-separated path for navigating resources (documents and collections)
       * within Firestore.
       */


      J.EMPTY_BYTE_STRING = new J("");
      var Z = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
      /**
       * Converts the possible Proto values for a timestamp value into a "seconds and
       * nanos" representation.
       */

      function tt(t) {
        // The json interface (for the browser) will return an iso timestamp string,
        // while the proto js library (for node) will return a
        // google.protobuf.Timestamp instance.
        if (P(!!t), "string" == typeof t) {
          // The date string can have higher precision (nanos) than the Date class
          // (millis), so we do some custom parsing here.
          // Parse the nanos right out of the string.
          var e = 0,
              n = Z.exec(t);

          if (P(!!n), n[1]) {
            // Pad the fraction out to 9 digits (nanos).
            var r = n[1];
            r = (r + "000000000").substr(0, 9), e = Number(r);
          } // Parse the date to get the seconds.


          var i = new Date(t);
          return {
            seconds: Math.floor(i.getTime() / 1e3),
            nanos: e
          };
        }

        return {
          seconds: et(t.seconds),
          nanos: et(t.nanos)
        };
      }
      /**
       * Converts the possible Proto types for numbers into a JavaScript number.
       * Returns 0 if the value is not numeric.
       */


      function et(t) {
        // TODO(bjornick): Handle int64 greater than 53 bits.
        return "number" == typeof t ? t : "string" == typeof t ? Number(t) : 0;
      }
      /** Converts the possible Proto types for Blobs into a ByteString. */


      function nt(t) {
        return "string" == typeof t ? J.fromBase64String(t) : J.fromUint8Array(t);
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Represents a locally-applied ServerTimestamp.
       *
       * Server Timestamps are backed by MapValues that contain an internal field
       * `__type__` with a value of `server_timestamp`. The previous value and local
       * write time are stored in its `__previous_value__` and `__local_write_time__`
       * fields respectively.
       *
       * Notes:
       * - ServerTimestampValue instances are created as the result of applying a
       *   transform. They can only exist in the local view of a document. Therefore
       *   they do not need to be parsed or serialized.
       * - When evaluated locally (e.g. for snapshot.data()), they by default
       *   evaluate to `null`. This behavior can be configured by passing custom
       *   FieldValueOptions to value().
       * - With respect to other ServerTimestampValues, they sort by their
       *   localWriteTime.
       */


      function rt(t) {
        var e, n;
        return "server_timestamp" === (null === (n = ((null === (e = null == t ? void 0 : t.mapValue) || void 0 === e ? void 0 : e.fields) || {}).__type__) || void 0 === n ? void 0 : n.stringValue);
      }
      /**
       * Creates a new ServerTimestamp proto value (using the internal format).
       */

      /**
       * Returns the value of the field before this ServerTimestamp was set.
       *
       * Preserving the previous values allows the user to display the last resoled
       * value until the backend responds with the timestamp.
       */


      function it(t) {
        var e = t.mapValue.fields.__previous_value__;
        return rt(e) ? it(e) : e;
      }
      /**
       * Returns the local time at which this timestamp was first set.
       */


      function ot(t) {
        var e = tt(t.mapValue.fields.__local_write_time__.timestampValue);
        return new j(e.seconds, e.nanos);
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /** Sentinel value that sorts before any Mutation Batch ID. */

      /**
       * Returns whether a variable is either undefined or null.
       */


      function st(t) {
        return null == t;
      }
      /** Returns whether the value represents -0. */


      function ut(t) {
        // Detect if the value is -0.0. Based on polyfill from
        // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
        return 0 === t && 1 / t == -1 / 0;
      }
      /**
       * Returns whether a value is an integer and in the safe integer range
       * @param value - The value to test for being an integer and in the safe range
       */


      function at(t) {
        return "number" == typeof t && Number.isInteger(t) && !ut(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var ct =
      /** @class */
      function () {
        function t(t) {
          this.path = t;
        }

        return t.fromPath = function (e) {
          return new t(H.fromString(e));
        }, t.fromName = function (e) {
          return new t(H.fromString(e).popFirst(5));
        },
        /** Returns true if the document is in the specified collectionId. */
        t.prototype.hasCollectionId = function (t) {
          return this.path.length >= 2 && this.path.get(this.path.length - 2) === t;
        }, t.prototype.isEqual = function (t) {
          return null !== t && 0 === H.comparator(this.path, t.path);
        }, t.prototype.toString = function () {
          return this.path.toString();
        }, t.comparator = function (t, e) {
          return H.comparator(t.path, e.path);
        }, t.isDocumentKey = function (t) {
          return t.length % 2 == 0;
        },
        /**
         * Creates and returns a new document key with the given segments.
         *
         * @param segments - The segments of the path to the document
         * @returns A new instance of DocumentKey
         */
        t.fromSegments = function (e) {
          return new t(new H(e.slice()));
        }, t;
      }();
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /** Extracts the backend's type order for the provided value. */


      function ht(t) {
        return "nullValue" in t ? 0
        /* NullValue */
        : "booleanValue" in t ? 1
        /* BooleanValue */
        : "integerValue" in t || "doubleValue" in t ? 2
        /* NumberValue */
        : "timestampValue" in t ? 3
        /* TimestampValue */
        : "stringValue" in t ? 5
        /* StringValue */
        : "bytesValue" in t ? 6
        /* BlobValue */
        : "referenceValue" in t ? 7
        /* RefValue */
        : "geoPointValue" in t ? 8
        /* GeoPointValue */
        : "arrayValue" in t ? 9
        /* ArrayValue */
        : "mapValue" in t ? rt(t) ? 4
        /* ServerTimestampValue */
        : 10
        /* ObjectValue */
        : O();
      }
      /** Tests `left` and `right` for equality based on the backend semantics. */


      function ft(t, e) {
        var n = ht(t);
        if (n !== ht(e)) return !1;

        switch (n) {
          case 0
          /* NullValue */
          :
            return !0;

          case 1
          /* BooleanValue */
          :
            return t.booleanValue === e.booleanValue;

          case 4
          /* ServerTimestampValue */
          :
            return ot(t).isEqual(ot(e));

          case 3
          /* TimestampValue */
          :
            return function (t, e) {
              if ("string" == typeof t.timestampValue && "string" == typeof e.timestampValue && t.timestampValue.length === e.timestampValue.length) // Use string equality for ISO 8601 timestamps
                return t.timestampValue === e.timestampValue;
              var n = tt(t.timestampValue),
                  r = tt(e.timestampValue);
              return n.seconds === r.seconds && n.nanos === r.nanos;
            }(t, e);

          case 5
          /* StringValue */
          :
            return t.stringValue === e.stringValue;

          case 6
          /* BlobValue */
          :
            return function (t, e) {
              return nt(t.bytesValue).isEqual(nt(e.bytesValue));
            }(t, e);

          case 7
          /* RefValue */
          :
            return t.referenceValue === e.referenceValue;

          case 8
          /* GeoPointValue */
          :
            return function (t, e) {
              return et(t.geoPointValue.latitude) === et(e.geoPointValue.latitude) && et(t.geoPointValue.longitude) === et(e.geoPointValue.longitude);
            }(t, e);

          case 2
          /* NumberValue */
          :
            return function (t, e) {
              if ("integerValue" in t && "integerValue" in e) return et(t.integerValue) === et(e.integerValue);

              if ("doubleValue" in t && "doubleValue" in e) {
                var n = et(t.doubleValue),
                    r = et(e.doubleValue);
                return n === r ? ut(n) === ut(r) : isNaN(n) && isNaN(r);
              }

              return !1;
            }(t, e);

          case 9
          /* ArrayValue */
          :
            return U(t.arrayValue.values || [], e.arrayValue.values || [], ft);

          case 10
          /* ObjectValue */
          :
            return function (t, e) {
              var n = t.mapValue.fields || {},
                  r = e.mapValue.fields || {};
              if (Q(n) !== Q(r)) return !1;

              for (var i in n) {
                if (n.hasOwnProperty(i) && (void 0 === r[i] || !ft(n[i], r[i]))) return !1;
              }

              return !0;
            }(t, e);

          default:
            return O();
        }
      }

      function lt(t, e) {
        return void 0 !== (t.values || []).find(function (t) {
          return ft(t, e);
        });
      }

      function dt(t, e) {
        var n = ht(t),
            r = ht(e);
        if (n !== r) return q(n, r);

        switch (n) {
          case 0
          /* NullValue */
          :
            return 0;

          case 1
          /* BooleanValue */
          :
            return q(t.booleanValue, e.booleanValue);

          case 2
          /* NumberValue */
          :
            return function (t, e) {
              var n = et(t.integerValue || t.doubleValue),
                  r = et(e.integerValue || e.doubleValue);
              return n < r ? -1 : n > r ? 1 : n === r ? 0 : // one or both are NaN.
              isNaN(n) ? isNaN(r) ? 0 : -1 : 1;
            }(t, e);

          case 3
          /* TimestampValue */
          :
            return pt(t.timestampValue, e.timestampValue);

          case 4
          /* ServerTimestampValue */
          :
            return pt(ot(t), ot(e));

          case 5
          /* StringValue */
          :
            return q(t.stringValue, e.stringValue);

          case 6
          /* BlobValue */
          :
            return function (t, e) {
              var n = nt(t),
                  r = nt(e);
              return n.compareTo(r);
            }(t.bytesValue, e.bytesValue);

          case 7
          /* RefValue */
          :
            return function (t, e) {
              for (var n = t.split("/"), r = e.split("/"), i = 0; i < n.length && i < r.length; i++) {
                var o = q(n[i], r[i]);
                if (0 !== o) return o;
              }

              return q(n.length, r.length);
            }(t.referenceValue, e.referenceValue);

          case 8
          /* GeoPointValue */
          :
            return function (t, e) {
              var n = q(et(t.latitude), et(e.latitude));
              return 0 !== n ? n : q(et(t.longitude), et(e.longitude));
            }(t.geoPointValue, e.geoPointValue);

          case 9
          /* ArrayValue */
          :
            return function (t, e) {
              for (var n = t.values || [], r = e.values || [], i = 0; i < n.length && i < r.length; ++i) {
                var o = dt(n[i], r[i]);
                if (o) return o;
              }

              return q(n.length, r.length);
            }(t.arrayValue, e.arrayValue);

          case 10
          /* ObjectValue */
          :
            return function (t, e) {
              var n = t.fields || {},
                  r = Object.keys(n),
                  i = e.fields || {},
                  o = Object.keys(i); // Even though MapValues are likely sorted correctly based on their insertion
              // order (e.g. when received from the backend), local modifications can bring
              // elements out of order. We need to re-sort the elements to ensure that
              // canonical IDs are independent of insertion order.

              r.sort(), o.sort();

              for (var s = 0; s < r.length && s < o.length; ++s) {
                var u = q(r[s], o[s]);
                if (0 !== u) return u;
                var a = dt(n[r[s]], i[o[s]]);
                if (0 !== a) return a;
              }

              return q(r.length, o.length);
            }(t.mapValue, e.mapValue);

          default:
            throw O();
        }
      }

      function pt(t, e) {
        if ("string" == typeof t && "string" == typeof e && t.length === e.length) return q(t, e);
        var n = tt(t),
            r = tt(e),
            i = q(n.seconds, r.seconds);
        return 0 !== i ? i : q(n.nanos, r.nanos);
      }

      function yt(t) {
        return vt(t);
      }

      function vt(t) {
        return "nullValue" in t ? "null" : "booleanValue" in t ? "" + t.booleanValue : "integerValue" in t ? "" + t.integerValue : "doubleValue" in t ? "" + t.doubleValue : "timestampValue" in t ? function (t) {
          var e = tt(t);
          return "time(" + e.seconds + "," + e.nanos + ")";
        }(t.timestampValue) : "stringValue" in t ? t.stringValue : "bytesValue" in t ? nt(t.bytesValue).toBase64() : "referenceValue" in t ? (n = t.referenceValue, ct.fromName(n).toString()) : "geoPointValue" in t ? "geo(" + (e = t.geoPointValue).latitude + "," + e.longitude + ")" : "arrayValue" in t ? function (t) {
          for (var e = "[", n = !0, r = 0, i = t.values || []; r < i.length; r++) {
            n ? n = !1 : e += ",", e += vt(i[r]);
          }

          return e + "]";
        }(t.arrayValue) : "mapValue" in t ? function (t) {
          for ( // Iteration order in JavaScript is not guaranteed. To ensure that we generate
          // matching canonical IDs for identical maps, we need to sort the keys.
          var e = "{", n = !0, r = 0, i = Object.keys(t.fields || {}).sort(); r < i.length; r++) {
            var o = i[r];
            n ? n = !1 : e += ",", e += o + ":" + vt(t.fields[o]);
          }

          return e + "}";
        }(t.mapValue) : O();
        var e, n;
      }

      function mt(t, e) {
        return {
          referenceValue: "projects/" + t.projectId + "/databases/" + t.database + "/documents/" + e.path.canonicalString()
        };
      }
      /** Returns true if `value` is an IntegerValue . */


      function gt(t) {
        return !!t && "integerValue" in t;
      }
      /** Returns true if `value` is a DoubleValue. */

      /** Returns true if `value` is an ArrayValue. */


      function wt(t) {
        return !!t && "arrayValue" in t;
      }
      /** Returns true if `value` is a NullValue. */


      function bt(t) {
        return !!t && "nullValue" in t;
      }
      /** Returns true if `value` is NaN. */


      function It(t) {
        return !!t && "doubleValue" in t && isNaN(Number(t.doubleValue));
      }
      /** Returns true if `value` is a MapValue. */


      function Tt(t) {
        return !!t && "mapValue" in t;
      }
      /** Creates a deep copy of `source`. */


      function Et(t) {
        if (t.geoPointValue) return {
          geoPointValue: Object.assign({}, t.geoPointValue)
        };
        if (t.timestampValue && "object" == typeof t.timestampValue) return {
          timestampValue: Object.assign({}, t.timestampValue)
        };

        if (t.mapValue) {
          var e = {
            mapValue: {
              fields: {}
            }
          };
          return G(t.mapValue.fields, function (t, n) {
            return e.mapValue.fields[t] = Et(n);
          }), e;
        }

        if (t.arrayValue) {
          for (var n = {
            arrayValue: {
              values: []
            }
          }, r = 0; r < (t.arrayValue.values || []).length; ++r) {
            n.arrayValue.values[r] = Et(t.arrayValue.values[r]);
          }

          return n;
        }

        return Object.assign({}, t);
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * An ObjectValue represents a MapValue in the Firestore Proto and offers the
       * ability to add and remove fields (via the ObjectValueBuilder).
       */


      var _t =
      /** @class */
      function () {
        function t(t) {
          this.value = t;
        }

        return t.empty = function () {
          return new t({
            mapValue: {}
          });
        },
        /**
         * Returns the value at the given path or null.
         *
         * @param path - the path to search
         * @returns The value at the path or null if the path is not set.
         */
        t.prototype.field = function (t) {
          if (t.isEmpty()) return this.value;

          for (var e = this.value, n = 0; n < t.length - 1; ++n) {
            if (!Tt(e = (e.mapValue.fields || {})[t.get(n)])) return null;
          }

          return (e = (e.mapValue.fields || {})[t.lastSegment()]) || null;
        },
        /**
         * Sets the field to the provided value.
         *
         * @param path - The field path to set.
         * @param value - The value to set.
         */
        t.prototype.set = function (t, e) {
          this.getFieldsMap(t.popLast())[t.lastSegment()] = Et(e);
        },
        /**
         * Sets the provided fields to the provided values.
         *
         * @param data - A map of fields to values (or null for deletes).
         */
        t.prototype.setAll = function (t) {
          var e = this,
              n = $.emptyPath(),
              r = {},
              i = [];
          t.forEach(function (t, o) {
            if (!n.isImmediateParentOf(o)) {
              // Insert the accumulated changes at this parent location
              var s = e.getFieldsMap(n);
              e.applyChanges(s, r, i), r = {}, i = [], n = o.popLast();
            }

            t ? r[o.lastSegment()] = Et(t) : i.push(o.lastSegment());
          });
          var o = this.getFieldsMap(n);
          this.applyChanges(o, r, i);
        },
        /**
         * Removes the field at the specified path. If there is no field at the
         * specified path, nothing is changed.
         *
         * @param path - The field path to remove.
         */
        t.prototype["delete"] = function (t) {
          var e = this.field(t.popLast());
          Tt(e) && e.mapValue.fields && delete e.mapValue.fields[t.lastSegment()];
        }, t.prototype.isEqual = function (t) {
          return ft(this.value, t.value);
        },
        /**
         * Returns the map that contains the leaf element of `path`. If the parent
         * entry does not yet exist, or if it is not a map, a new map will be created.
         */
        t.prototype.getFieldsMap = function (t) {
          var e = this.value;
          e.mapValue.fields || (e.mapValue = {
            fields: {}
          });

          for (var n = 0; n < t.length; ++n) {
            var r = e.mapValue.fields[t.get(n)];
            Tt(r) && r.mapValue.fields || (r = {
              mapValue: {
                fields: {}
              }
            }, e.mapValue.fields[t.get(n)] = r), e = r;
          }

          return e.mapValue.fields;
        },
        /**
         * Modifies `fieldsMap` by adding, replacing or deleting the specified
         * entries.
         */
        t.prototype.applyChanges = function (t, e, n) {
          G(e, function (e, n) {
            return t[e] = n;
          });

          for (var r = 0, i = n; r < i.length; r++) {
            var o = i[r];
            delete t[o];
          }
        }, t.prototype.clone = function () {
          return new t(Et(this.value));
        }, t;
      }();
      /**
       * Returns a FieldMask built from all fields in a MapValue.
       */


      function St(t) {
        var e = [];
        return G(t.fields, function (t, n) {
          var r = new $([t]);

          if (Tt(n)) {
            var i = St(n.mapValue).fields;
            if (0 === i.length) // Preserve the empty map by adding it to the FieldMask.
              e.push(r);else // For nested and non-empty ObjectValues, add the FieldPath of the
              // leaf nodes.
              for (var o = 0, s = i; o < s.length; o++) {
                var u = s[o];
                e.push(r.child(u));
              }
          } else // For nested and non-empty ObjectValues, add the FieldPath of the leaf
            // nodes.
            e.push(r);
        }), new X(e)
        /**
        * @license
        * Copyright 2017 Google LLC
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
        * you may not use this file except in compliance with the License.
        * You may obtain a copy of the License at
        *
        *   http://www.apache.org/licenses/LICENSE-2.0
        *
        * Unless required by applicable law or agreed to in writing, software
        * distributed under the License is distributed on an "AS IS" BASIS,
        * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        * See the License for the specific language governing permissions and
        * limitations under the License.
        */

        /**
        * Represents a document in Firestore with a key, version, data and whether it
        * has local mutations applied to it.
        *
        * Documents can transition between states via `convertToFoundDocument()`,
        * `convertToNoDocument()` and `convertToUnknownDocument()`. If a document does
        * not transition to one of these states even after all mutations have been
        * applied, `isValidDocument()` returns false and the document should be removed
        * from all views.
        */
        ;
      }

      var Nt =
      /** @class */
      function () {
        function t(t, e, n, r, i) {
          this.key = t, this.documentType = e, this.version = n, this.data = r, this.documentState = i
          /**
          * Creates a document with no known version or data, but which can serve as
          * base document for mutations.
          */
          ;
        }

        return t.newInvalidDocument = function (e) {
          return new t(e, 0
          /* INVALID */
          , K.min(), _t.empty(), 0
          /* SYNCED */
          );
        },
        /**
         * Creates a new document that is known to exist with the given data at the
         * given version.
         */
        t.newFoundDocument = function (e, n, r) {
          return new t(e, 1
          /* FOUND_DOCUMENT */
          , n, r, 0
          /* SYNCED */
          );
        },
        /** Creates a new document that is known to not exist at the given version. */
        t.newNoDocument = function (e, n) {
          return new t(e, 2
          /* NO_DOCUMENT */
          , n, _t.empty(), 0
          /* SYNCED */
          );
        },
        /**
         * Creates a new document that is known to exist at the given version but
         * whose data is not known (e.g. a document that was updated without a known
         * base document).
         */
        t.newUnknownDocument = function (e, n) {
          return new t(e, 3
          /* UNKNOWN_DOCUMENT */
          , n, _t.empty(), 2
          /* HAS_COMMITTED_MUTATIONS */
          );
        },
        /**
         * Changes the document type to indicate that it exists and that its version
         * and data are known.
         */
        t.prototype.convertToFoundDocument = function (t, e) {
          return this.version = t, this.documentType = 1
          /* FOUND_DOCUMENT */
          , this.data = e, this.documentState = 0
          /* SYNCED */
          , this;
        },
        /**
         * Changes the document type to indicate that it doesn't exist at the given
         * version.
         */
        t.prototype.convertToNoDocument = function (t) {
          return this.version = t, this.documentType = 2
          /* NO_DOCUMENT */
          , this.data = _t.empty(), this.documentState = 0
          /* SYNCED */
          , this;
        },
        /**
         * Changes the document type to indicate that it exists at a given version but
         * that its data is not known (e.g. a document that was updated without a known
         * base document).
         */
        t.prototype.convertToUnknownDocument = function (t) {
          return this.version = t, this.documentType = 3
          /* UNKNOWN_DOCUMENT */
          , this.data = _t.empty(), this.documentState = 2
          /* HAS_COMMITTED_MUTATIONS */
          , this;
        }, t.prototype.setHasCommittedMutations = function () {
          return this.documentState = 2
          /* HAS_COMMITTED_MUTATIONS */
          , this;
        }, t.prototype.setHasLocalMutations = function () {
          return this.documentState = 1
          /* HAS_LOCAL_MUTATIONS */
          , this;
        }, Object.defineProperty(t.prototype, "hasLocalMutations", {
          get: function get() {
            return 1
            /* HAS_LOCAL_MUTATIONS */
            === this.documentState;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "hasCommittedMutations", {
          get: function get() {
            return 2
            /* HAS_COMMITTED_MUTATIONS */
            === this.documentState;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "hasPendingWrites", {
          get: function get() {
            return this.hasLocalMutations || this.hasCommittedMutations;
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.isValidDocument = function () {
          return 0
          /* INVALID */
          !== this.documentType;
        }, t.prototype.isFoundDocument = function () {
          return 1
          /* FOUND_DOCUMENT */
          === this.documentType;
        }, t.prototype.isNoDocument = function () {
          return 2
          /* NO_DOCUMENT */
          === this.documentType;
        }, t.prototype.isUnknownDocument = function () {
          return 3
          /* UNKNOWN_DOCUMENT */
          === this.documentType;
        }, t.prototype.isEqual = function (e) {
          return e instanceof t && this.key.isEqual(e.key) && this.version.isEqual(e.version) && this.documentType === e.documentType && this.documentState === e.documentState && this.data.isEqual(e.data);
        }, t.prototype.clone = function () {
          return new t(this.key, this.documentType, this.version, this.data.clone(), this.documentState);
        }, t.prototype.toString = function () {
          return "Document(" + this.key + ", " + this.version + ", " + JSON.stringify(this.data.value) + ", {documentType: " + this.documentType + "}), {documentState: " + this.documentState + "})";
        }, t;
      }(),
          Dt = function Dt(t, e, n, r, i, o, s) {
        void 0 === e && (e = null), void 0 === n && (n = []), void 0 === r && (r = []), void 0 === i && (i = null), void 0 === o && (o = null), void 0 === s && (s = null), this.path = t, this.collectionGroup = e, this.orderBy = n, this.filters = r, this.limit = i, this.startAt = o, this.endAt = s, this.h = null;
      };
      /**
       * Compares the value for field `field` in the provided documents. Throws if
       * the field does not exist in both documents.
       */

      /**
       * @license
       * Copyright 2019 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */
      // Visible for testing

      /**
       * Initializes a Target with a path and optional additional query constraints.
       * Path must currently be empty if this is a collection group query.
       *
       * NOTE: you should always construct `Target` from `Query.toTarget` instead of
       * using this factory method, because `Query` provides an implicit `orderBy`
       * property.
       */


      function At(t, e, n, r, i, o, s) {
        return void 0 === e && (e = null), void 0 === n && (n = []), void 0 === r && (r = []), void 0 === i && (i = null), void 0 === o && (o = null), void 0 === s && (s = null), new Dt(t, e, n, r, i, o, s);
      }

      function kt(t) {
        var e = F(t);

        if (null === e.h) {
          var n = e.path.canonicalString();
          null !== e.collectionGroup && (n += "|cg:" + e.collectionGroup), n += "|f:", n += e.filters.map(function (t) {
            return function (t) {
              // TODO(b/29183165): Technically, this won't be unique if two values have
              // the same description, such as the int 3 and the string "3". So we should
              // add the types in here somehow, too.
              return t.field.canonicalString() + t.op.toString() + yt(t.value);
            }(t);
          }).join(","), n += "|ob:", n += e.orderBy.map(function (t) {
            return function (t) {
              // TODO(b/29183165): Make this collision robust.
              return t.field.canonicalString() + t.dir;
            }(t);
          }).join(","), st(e.limit) || (n += "|l:", n += e.limit), e.startAt && (n += "|lb:", n += jt(e.startAt)), e.endAt && (n += "|ub:", n += jt(e.endAt)), e.h = n;
        }

        return e.h;
      }

      function Ct(t, e) {
        if (t.limit !== e.limit) return !1;
        if (t.orderBy.length !== e.orderBy.length) return !1;

        for (var n = 0; n < t.orderBy.length; n++) {
          if (!Qt(t.orderBy[n], e.orderBy[n])) return !1;
        }

        if (t.filters.length !== e.filters.length) return !1;

        for (var r = 0; r < t.filters.length; r++) {
          if (i = t.filters[r], o = e.filters[r], i.op !== o.op || !i.field.isEqual(o.field) || !ft(i.value, o.value)) return !1;
        }

        var i, o;
        return t.collectionGroup === e.collectionGroup && !!t.path.isEqual(e.path) && !!zt(t.startAt, e.startAt) && zt(t.endAt, e.endAt);
      }

      function xt(t) {
        return ct.isDocumentKey(t.path) && null === t.collectionGroup && 0 === t.filters.length;
      }

      var Rt =
      /** @class */
      function (e) {
        function n(t, n, r) {
          var i = this;
          return (i = e.call(this) || this).field = t, i.op = n, i.value = r, i;
        }
        /**
         * Creates a filter based on the provided arguments.
         */


        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.create = function (t, e, r) {
          return t.isKeyField() ? "in"
          /* IN */
          === e || "not-in"
          /* NOT_IN */
          === e ? this.l(t, e, r) : new Lt(t, e, r) : "array-contains"
          /* ARRAY_CONTAINS */
          === e ? new Mt(t, r) : "in"
          /* IN */
          === e ? new Vt(t, r) : "not-in"
          /* NOT_IN */
          === e ? new qt(t, r) : "array-contains-any"
          /* ARRAY_CONTAINS_ANY */
          === e ? new Ut(t, r) : new n(t, e, r);
        }, n.l = function (t, e, n) {
          return "in"
          /* IN */
          === e ? new Ot(t, n) : new Pt(t, n);
        }, n.prototype.matches = function (t) {
          var e = t.data.field(this.field); // Types do not have to match in NOT_EQUAL filters.

          return "!="
          /* NOT_EQUAL */
          === this.op ? null !== e && this.m(dt(e, this.value)) : null !== e && ht(this.value) === ht(e) && this.m(dt(e, this.value)); // Only compare types with matching backend order (such as double and int).
        }, n.prototype.m = function (t) {
          switch (this.op) {
            case "<"
            /* LESS_THAN */
            :
              return t < 0;

            case "<="
            /* LESS_THAN_OR_EQUAL */
            :
              return t <= 0;

            case "=="
            /* EQUAL */
            :
              return 0 === t;

            case "!="
            /* NOT_EQUAL */
            :
              return 0 !== t;

            case ">"
            /* GREATER_THAN */
            :
              return t > 0;

            case ">="
            /* GREATER_THAN_OR_EQUAL */
            :
              return t >= 0;

            default:
              return O();
          }
        }, n.prototype.g = function () {
          return ["<"
          /* LESS_THAN */
          , "<="
          /* LESS_THAN_OR_EQUAL */
          , ">"
          /* GREATER_THAN */
          , ">="
          /* GREATER_THAN_OR_EQUAL */
          , "!="
          /* NOT_EQUAL */
          , "not-in"
          /* NOT_IN */
          ].indexOf(this.op) >= 0;
        }, n;
      }(function () {});

      var Lt =
      /** @class */
      function (e) {
        function n(t, n, r) {
          var i = this;
          return (i = e.call(this, t, n, r) || this).key = ct.fromName(r.referenceValue), i;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.matches = function (t) {
          var e = ct.comparator(t.key, this.key);
          return this.m(e);
        }, n;
      }(Rt),
          Ot =
      /** @class */
      function (e) {
        function n(t, n) {
          var r = this;
          return (r = e.call(this, t, "in"
          /* IN */
          , n) || this).keys = Ft("in"
          /* IN */
          , n), r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.matches = function (t) {
          return this.keys.some(function (e) {
            return e.isEqual(t.key);
          });
        }, n;
      }(Rt),
          Pt =
      /** @class */
      function (e) {
        function n(t, n) {
          var r = this;
          return (r = e.call(this, t, "not-in"
          /* NOT_IN */
          , n) || this).keys = Ft("not-in"
          /* NOT_IN */
          , n), r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.matches = function (t) {
          return !this.keys.some(function (e) {
            return e.isEqual(t.key);
          });
        }, n;
      }(Rt);
      /** Filter that matches on key fields within an array. */


      function Ft(t, e) {
        var n;
        return ((null === (n = e.arrayValue) || void 0 === n ? void 0 : n.values) || []).map(function (t) {
          return ct.fromName(t.referenceValue);
        });
      }
      /** A Filter that implements the array-contains operator. */


      var Mt =
      /** @class */
      function (e) {
        function n(t, n) {
          return e.call(this, t, "array-contains"
          /* ARRAY_CONTAINS */
          , n) || this;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.matches = function (t) {
          var e = t.data.field(this.field);
          return wt(e) && lt(e.arrayValue, this.value);
        }, n;
      }(Rt),
          Vt =
      /** @class */
      function (e) {
        function n(t, n) {
          return e.call(this, t, "in"
          /* IN */
          , n) || this;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.matches = function (t) {
          var e = t.data.field(this.field);
          return null !== e && lt(this.value.arrayValue, e);
        }, n;
      }(Rt),
          qt =
      /** @class */
      function (e) {
        function n(t, n) {
          return e.call(this, t, "not-in"
          /* NOT_IN */
          , n) || this;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.matches = function (t) {
          if (lt(this.value.arrayValue, {
            nullValue: "NULL_VALUE"
          })) return !1;
          var e = t.data.field(this.field);
          return null !== e && !lt(this.value.arrayValue, e);
        }, n;
      }(Rt),
          Ut =
      /** @class */
      function (e) {
        function n(t, n) {
          return e.call(this, t, "array-contains-any"
          /* ARRAY_CONTAINS_ANY */
          , n) || this;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.matches = function (t) {
          var e = this,
              n = t.data.field(this.field);
          return !(!wt(n) || !n.arrayValue.values) && n.arrayValue.values.some(function (t) {
            return lt(e.value.arrayValue, t);
          });
        }, n;
      }(Rt),
          Bt = function Bt(t, e) {
        this.position = t, this.before = e;
      };
      /** A Filter that implements the IN operator. */


      function jt(t) {
        // TODO(b/29183165): Make this collision robust.
        return (t.before ? "b" : "a") + ":" + t.position.map(function (t) {
          return yt(t);
        }).join(",");
      }
      /**
       * An ordering on a field, in some Direction. Direction defaults to ASCENDING.
       */


      var Kt = function Kt(t, e
      /* ASCENDING */
      ) {
        void 0 === e && (e = "asc"), this.field = t, this.dir = e;
      };

      function Qt(t, e) {
        return t.dir === e.dir && t.field.isEqual(e.field);
      }
      /**
       * Returns true if a document sorts before a bound using the provided sort
       * order.
       */


      function Gt(t, e, n) {
        for (var r = 0, i = 0; i < t.position.length; i++) {
          var o = e[i],
              s = t.position[i];
          if (r = o.field.isKeyField() ? ct.comparator(ct.fromName(s.referenceValue), n.key) : dt(s, n.data.field(o.field)), "desc"
          /* DESCENDING */
          === o.dir && (r *= -1), 0 !== r) break;
        }

        return t.before ? r <= 0 : r < 0;
      }

      function zt(t, e) {
        if (null === t) return null === e;
        if (null === e) return !1;
        if (t.before !== e.before || t.position.length !== e.position.length) return !1;

        for (var n = 0; n < t.position.length; n++) {
          if (!ft(t.position[n], e.position[n])) return !1;
        }

        return !0;
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Query encapsulates all the query attributes we support in the SDK. It can
       * be run against the LocalStore, as well as be converted to a `Target` to
       * query the RemoteStore results.
       *
       * Visible for testing.
       */


      var Wt =
      /**
           * Initializes a Query with a path and optional additional query constraints.
           * Path must currently be empty if this is a collection group query.
           */
      function Wt(t, e, n, r, i, o
      /* First */
      , s, u) {
        void 0 === e && (e = null), void 0 === n && (n = []), void 0 === r && (r = []), void 0 === i && (i = null), void 0 === o && (o = "F"), void 0 === s && (s = null), void 0 === u && (u = null), this.path = t, this.collectionGroup = e, this.explicitOrderBy = n, this.filters = r, this.limit = i, this.limitType = o, this.startAt = s, this.endAt = u, this.p = null, // The corresponding `Target` of this `Query` instance.
        this.T = null, this.startAt, this.endAt;
      };
      /** Creates a new Query instance with the options provided. */


      function Ht(t, e, n, r, i, o, s, u) {
        return new Wt(t, e, n, r, i, o, s, u);
      }
      /** Creates a new Query for a query that matches all documents at `path` */


      function Yt(t) {
        return new Wt(t);
      }
      /**
       * Helper to convert a collection group query into a collection query at a
       * specific path. This is used when executing collection group queries, since
       * we have to split the query into a set of collection queries at multiple
       * paths.
       */


      function $t(t) {
        return !st(t.limit) && "F"
        /* First */
        === t.limitType;
      }

      function Xt(t) {
        return !st(t.limit) && "L"
        /* Last */
        === t.limitType;
      }

      function Jt(t) {
        return t.explicitOrderBy.length > 0 ? t.explicitOrderBy[0].field : null;
      }

      function Zt(t) {
        for (var e = 0, n = t.filters; e < n.length; e++) {
          var r = n[e];
          if (r.g()) return r.field;
        }

        return null;
      }
      /**
       * Checks if any of the provided Operators are included in the query and
       * returns the first one that is, or null if none are.
       */

      /**
       * Returns whether the query matches a collection group rather than a specific
       * collection.
       */


      function te(t) {
        return null !== t.collectionGroup;
      }
      /**
       * Returns the implicit order by constraint that is used to execute the Query,
       * which can be different from the order by constraints the user provided (e.g.
       * the SDK and backend always orders by `__name__`).
       */


      function ee(t) {
        var e = F(t);

        if (null === e.p) {
          e.p = [];
          var n = Zt(e),
              r = Jt(e);
          if (null !== n && null === r) // In order to implicitly add key ordering, we must also add the
            // inequality filter field for it to be a valid query.
            // Note that the default inequality field and key ordering is ascending.
            n.isKeyField() || e.p.push(new Kt(n)), e.p.push(new Kt($.keyField(), "asc"
            /* ASCENDING */
            ));else {
            for (var i = !1, o = 0, s = e.explicitOrderBy; o < s.length; o++) {
              var u = s[o];
              e.p.push(u), u.field.isKeyField() && (i = !0);
            }

            if (!i) {
              // The order of the implicit key ordering always matches the last
              // explicit order by
              var a = e.explicitOrderBy.length > 0 ? e.explicitOrderBy[e.explicitOrderBy.length - 1].dir : "asc"
              /* ASCENDING */
              ;
              e.p.push(new Kt($.keyField(), a));
            }
          }
        }

        return e.p;
      }
      /**
       * Converts this `Query` instance to it's corresponding `Target` representation.
       */


      function ne(t) {
        var e = F(t);
        if (!e.T) if ("F"
        /* First */
        === e.limitType) e.T = At(e.path, e.collectionGroup, ee(e), e.filters, e.limit, e.startAt, e.endAt);else {
          for ( // Flip the orderBy directions since we want the last results
          var n = [], r = 0, i = ee(e); r < i.length; r++) {
            var o = i[r],
                s = "desc"
            /* DESCENDING */
            === o.dir ? "asc"
            /* ASCENDING */
            : "desc"
            /* DESCENDING */
            ;
            n.push(new Kt(o.field, s));
          } // We need to swap the cursors to match the now-flipped query ordering.


          var u = e.endAt ? new Bt(e.endAt.position, !e.endAt.before) : null,
              a = e.startAt ? new Bt(e.startAt.position, !e.startAt.before) : null; // Now return as a LimitType.First query.

          e.T = At(e.path, e.collectionGroup, n, e.filters, e.limit, u, a);
        }
        return e.T;
      }

      function re(t, e, n) {
        return new Wt(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);
      }

      function ie(t, e) {
        return Ct(ne(t), ne(e)) && t.limitType === e.limitType;
      } // TODO(b/29183165): This is used to get a unique string from a query to, for
      // example, use as a dictionary key, but the implementation is subject to
      // collisions. Make it collision-free.


      function oe(t) {
        return kt(ne(t)) + "|lt:" + t.limitType;
      }

      function se(t) {
        return "Query(target=" + function (t) {
          var e = t.path.canonicalString();
          return null !== t.collectionGroup && (e += " collectionGroup=" + t.collectionGroup), t.filters.length > 0 && (e += ", filters: [" + t.filters.map(function (t) {
            return (e = t).field.canonicalString() + " " + e.op + " " + yt(e.value);
            /** Returns a debug description for `filter`. */

            var e;
            /** Filter that matches on key fields (i.e. '__name__'). */
          }).join(", ") + "]"), st(t.limit) || (e += ", limit: " + t.limit), t.orderBy.length > 0 && (e += ", orderBy: [" + t.orderBy.map(function (t) {
            return function (t) {
              return t.field.canonicalString() + " (" + t.dir + ")";
            }(t);
          }).join(", ") + "]"), t.startAt && (e += ", startAt: " + jt(t.startAt)), t.endAt && (e += ", endAt: " + jt(t.endAt)), "Target(" + e + ")";
        }(ne(t)) + "; limitType=" + t.limitType + ")";
      }
      /** Returns whether `doc` matches the constraints of `query`. */


      function ue(t, e) {
        return e.isFoundDocument() && function (t, e) {
          var n = e.key.path;
          return null !== t.collectionGroup ? e.key.hasCollectionId(t.collectionGroup) && t.path.isPrefixOf(n) : ct.isDocumentKey(t.path) ? t.path.isEqual(n) : t.path.isImmediateParentOf(n);
        }(t, e) && function (t, e) {
          for (var n = 0, r = t.explicitOrderBy; n < r.length; n++) {
            var i = r[n]; // order by key always matches

            if (!i.field.isKeyField() && null === e.data.field(i.field)) return !1;
          }

          return !0;
        }(t, e) && function (t, e) {
          for (var n = 0, r = t.filters; n < r.length; n++) {
            if (!r[n].matches(e)) return !1;
          }

          return !0;
        }(t, e) && function (t, e) {
          return !(t.startAt && !Gt(t.startAt, ee(t), e)) && (!t.endAt || !Gt(t.endAt, ee(t), e));
        }(t, e);
      }

      function ae(t) {
        return function (e, n) {
          for (var r = !1, i = 0, o = ee(t); i < o.length; i++) {
            var s = o[i],
                u = ce(s, e, n);
            if (0 !== u) return u;
            r = r || s.field.isKeyField();
          }

          return 0;
        };
      }

      function ce(t, e, n) {
        var r = t.field.isKeyField() ? ct.comparator(e.key, n.key) : function (t, e, n) {
          var r = e.data.field(t),
              i = n.data.field(t);
          return null !== r && null !== i ? dt(r, i) : O();
        }(t.field, e, n);

        switch (t.dir) {
          case "asc"
          /* ASCENDING */
          :
            return r;

          case "desc"
          /* DESCENDING */
          :
            return -1 * r;

          default:
            return O();
        }
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Returns an DoubleValue for `value` that is encoded based the serializer's
       * `useProto3Json` setting.
       */


      function he(t, e) {
        if (t.I) {
          if (isNaN(e)) return {
            doubleValue: "NaN"
          };
          if (e === 1 / 0) return {
            doubleValue: "Infinity"
          };
          if (e === -1 / 0) return {
            doubleValue: "-Infinity"
          };
        }

        return {
          doubleValue: ut(e) ? "-0" : e
        };
      }
      /**
       * Returns an IntegerValue for `value`.
       */


      function fe(t) {
        return {
          integerValue: "" + t
        };
      }
      /**
       * Returns a value for a number that's appropriate to put into a proto.
       * The return value is an IntegerValue if it can safely represent the value,
       * otherwise a DoubleValue is returned.
       */


      function le(t, e) {
        return at(e) ? fe(e) : he(t, e);
      }
      /**
       * @license
       * Copyright 2018 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /** Used to represent a field transform on a mutation. */


      var de = function de() {
        // Make sure that the structural type of `TransformOperation` is unique.
        // See https://github.com/microsoft/TypeScript/issues/5451
        this._ = void 0;
      };
      /**
       * Computes the local transform result against the provided `previousValue`,
       * optionally using the provided localWriteTime.
       */


      function pe(t, e, n) {
        return t instanceof me ? function (t, e) {
          var n = {
            fields: {
              __type__: {
                stringValue: "server_timestamp"
              },
              __local_write_time__: {
                timestampValue: {
                  seconds: t.seconds,
                  nanos: t.nanoseconds
                }
              }
            }
          };
          return e && (n.fields.__previous_value__ = e), {
            mapValue: n
          };
        }(n, e) : t instanceof ge ? we(t, e) : t instanceof be ? Ie(t, e) : function (t, e) {
          // PORTING NOTE: Since JavaScript's integer arithmetic is limited to 53 bit
          // precision and resolves overflows by reducing precision, we do not
          // manually cap overflows at 2^63.
          var n = ve(t, e),
              r = Ee(n) + Ee(t.A);
          return gt(n) && gt(t.A) ? fe(r) : he(t.R, r);
        }(t, e);
      }
      /**
       * Computes a final transform result after the transform has been acknowledged
       * by the server, potentially using the server-provided transformResult.
       */


      function ye(t, e, n) {
        // The server just sends null as the transform result for array operations,
        // so we have to calculate a result the same as we do for local
        // applications.
        return t instanceof ge ? we(t, e) : t instanceof be ? Ie(t, e) : n;
      }
      /**
       * If this transform operation is not idempotent, returns the base value to
       * persist for this transform. If a base value is returned, the transform
       * operation is always applied to this base value, even if document has
       * already been updated.
       *
       * Base values provide consistent behavior for non-idempotent transforms and
       * allow us to return the same latency-compensated value even if the backend
       * has already applied the transform operation. The base value is null for
       * idempotent transforms, as they can be re-played even if the backend has
       * already applied them.
       *
       * @returns a base value to store along with the mutation, or null for
       * idempotent transforms.
       */


      function ve(t, e) {
        return t instanceof Te ? gt(n = e) || function (t) {
          return !!t && "doubleValue" in t;
        }(n) ? e : {
          integerValue: 0
        } : null;
        var n;
      }
      /** Transforms a value into a server-generated timestamp. */


      var me =
      /** @class */
      function (e) {
        function n() {
          return null !== e && e.apply(this, arguments) || this;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n;
      }(de),
          ge =
      /** @class */
      function (e) {
        function n(t) {
          var n = this;
          return (n = e.call(this) || this).elements = t, n;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n;
      }(de);
      /** Transforms an array value via a union operation. */


      function we(t, e) {
        for (var n = _e(e), r = function r(t) {
          n.some(function (e) {
            return ft(e, t);
          }) || n.push(t);
        }, i = 0, o = t.elements; i < o.length; i++) {
          r(o[i]);
        }

        return {
          arrayValue: {
            values: n
          }
        };
      }
      /** Transforms an array value via a remove operation. */


      var be =
      /** @class */
      function (e) {
        function n(t) {
          var n = this;
          return (n = e.call(this) || this).elements = t, n;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n;
      }(de);

      function Ie(t, e) {
        for (var n = _e(e), r = function r(t) {
          n = n.filter(function (e) {
            return !ft(e, t);
          });
        }, i = 0, o = t.elements; i < o.length; i++) {
          r(o[i]);
        }

        return {
          arrayValue: {
            values: n
          }
        };
      }
      /**
       * Implements the backend semantics for locally computed NUMERIC_ADD (increment)
       * transforms. Converts all field values to integers or doubles, but unlike the
       * backend does not cap integer values at 2^63. Instead, JavaScript number
       * arithmetic is used and precision loss can occur for values greater than 2^53.
       */


      var Te =
      /** @class */
      function (e) {
        function n(t, n) {
          var r = this;
          return (r = e.call(this) || this).R = t, r.A = n, r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n;
      }(de);

      function Ee(t) {
        return et(t.integerValue || t.doubleValue);
      }

      function _e(t) {
        return wt(t) && t.arrayValue.values ? t.arrayValue.values.slice() : [];
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /** A field path and the TransformOperation to perform upon it. */


      var Se = function Se(t, e) {
        this.field = t, this.transform = e;
      };
      /** The result of successfully applying a mutation to the backend. */


      var Ne = function Ne(
      /**
           * The version at which the mutation was committed:
           *
           * - For most operations, this is the updateTime in the WriteResult.
           * - For deletes, the commitTime of the WriteResponse (because deletes are
           *   not stored and have no updateTime).
           *
           * Note that these versions can be different: No-op writes will not change
           * the updateTime even though the commitTime advances.
           */
      t,
      /**
           * The resulting fields returned from the backend after a mutation
           * containing field transforms has been committed. Contains one FieldValue
           * for each FieldTransform that was in the mutation.
           *
           * Will be empty if the mutation did not contain any field transforms.
           */
      e) {
        this.version = t, this.transformResults = e;
      },
          De =
      /** @class */
      function () {
        function t(t, e) {
          this.updateTime = t, this.exists = e
          /** Creates a new empty Precondition. */
          ;
        }

        return t.none = function () {
          return new t();
        },
        /** Creates a new Precondition with an exists flag. */
        t.exists = function (e) {
          return new t(void 0, e);
        },
        /** Creates a new Precondition based on a version a document exists at. */
        t.updateTime = function (e) {
          return new t(e);
        }, Object.defineProperty(t.prototype, "isNone", {
          /** Returns whether this Precondition is empty. */
          get: function get() {
            return void 0 === this.updateTime && void 0 === this.exists;
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.isEqual = function (t) {
          return this.exists === t.exists && (this.updateTime ? !!t.updateTime && this.updateTime.isEqual(t.updateTime) : !t.updateTime);
        }, t;
      }();
      /**
       * Encodes a precondition for a mutation. This follows the model that the
       * backend accepts with the special case of an explicit "empty" precondition
       * (meaning no precondition).
       */

      /** Returns true if the preconditions is valid for the given document. */


      function Ae(t, e) {
        return void 0 !== t.updateTime ? e.isFoundDocument() && e.version.isEqual(t.updateTime) : void 0 === t.exists || t.exists === e.isFoundDocument();
      }
      /**
       * A mutation describes a self-contained change to a document. Mutations can
       * create, replace, delete, and update subsets of documents.
       *
       * Mutations not only act on the value of the document but also its version.
       *
       * For local mutations (mutations that haven't been committed yet), we preserve
       * the existing version for Set and Patch mutations. For Delete mutations, we
       * reset the version to 0.
       *
       * Here's the expected transition table.
       *
       * MUTATION           APPLIED TO            RESULTS IN
       *
       * SetMutation        Document(v3)          Document(v3)
       * SetMutation        NoDocument(v3)        Document(v0)
       * SetMutation        InvalidDocument(v0)   Document(v0)
       * PatchMutation      Document(v3)          Document(v3)
       * PatchMutation      NoDocument(v3)        NoDocument(v3)
       * PatchMutation      InvalidDocument(v0)   UnknownDocument(v3)
       * DeleteMutation     Document(v3)          NoDocument(v0)
       * DeleteMutation     NoDocument(v3)        NoDocument(v0)
       * DeleteMutation     InvalidDocument(v0)   NoDocument(v0)
       *
       * For acknowledged mutations, we use the updateTime of the WriteResponse as
       * the resulting version for Set and Patch mutations. As deletes have no
       * explicit update time, we use the commitTime of the WriteResponse for
       * Delete mutations.
       *
       * If a mutation is acknowledged by the backend but fails the precondition check
       * locally, we transition to an `UnknownDocument` and rely on Watch to send us
       * the updated version.
       *
       * Field transforms are used only with Patch and Set Mutations. We use the
       * `updateTransforms` message to store transforms, rather than the `transforms`s
       * messages.
       *
       * ## Subclassing Notes
       *
       * Every type of mutation needs to implement its own applyToRemoteDocument() and
       * applyToLocalView() to implement the actual behavior of applying the mutation
       * to some source document (see `applySetMutationToRemoteDocument()` for an
       * example).
       */


      var ke = function ke() {};
      /**
       * Applies this mutation to the given document for the purposes of computing a
       * new remote document. If the input document doesn't match the expected state
       * (e.g. it is invalid or outdated), the document type may transition to
       * unknown.
       *
       * @param mutation - The mutation to apply.
       * @param document - The document to mutate. The input document can be an
       *     invalid document if the client has no knowledge of the pre-mutation state
       *     of the document.
       * @param mutationResult - The result of applying the mutation from the backend.
       */


      function Ce(t, e, n) {
        t instanceof Pe ? function (t, e, n) {
          // Unlike applySetMutationToLocalView, if we're applying a mutation to a
          // remote document the server has accepted the mutation so the precondition
          // must have held.
          var r = t.value.clone(),
              i = Ve(t.fieldTransforms, e, n.transformResults);
          r.setAll(i), e.convertToFoundDocument(n.version, r).setHasCommittedMutations();
        }(t, e, n) : t instanceof Fe ? function (t, e, n) {
          if (Ae(t.precondition, e)) {
            var r = Ve(t.fieldTransforms, e, n.transformResults),
                i = e.data;
            i.setAll(Me(t)), i.setAll(r), e.convertToFoundDocument(n.version, i).setHasCommittedMutations();
          } else e.convertToUnknownDocument(n.version);
        }(t, e, n) : function (t, e, n) {
          // Unlike applyToLocalView, if we're applying a mutation to a remote
          // document the server has accepted the mutation so the precondition must
          // have held.
          e.convertToNoDocument(n.version).setHasCommittedMutations();
        }(0, e, n);
      }
      /**
       * Applies this mutation to the given document for the purposes of computing
       * the new local view of a document. If the input document doesn't match the
       * expected state, the document is not modified.
       *
       * @param mutation - The mutation to apply.
       * @param document - The document to mutate. The input document can be an
       *     invalid document if the client has no knowledge of the pre-mutation state
       *     of the document.
       * @param localWriteTime - A timestamp indicating the local write time of the
       *     batch this mutation is a part of.
       */


      function xe(t, e, n) {
        t instanceof Pe ? function (t, e, n) {
          if (Ae(t.precondition, e)) {
            var r = t.value.clone(),
                i = qe(t.fieldTransforms, n, e);
            r.setAll(i), e.convertToFoundDocument(Oe(e), r).setHasLocalMutations();
          }
        }(t, e, n) : t instanceof Fe ? function (t, e, n) {
          if (Ae(t.precondition, e)) {
            var r = qe(t.fieldTransforms, n, e),
                i = e.data;
            i.setAll(Me(t)), i.setAll(r), e.convertToFoundDocument(Oe(e), i).setHasLocalMutations();
          }
        }(t, e, n) : function (t, e) {
          Ae(t.precondition, e) && // We don't call `setHasLocalMutations()` since we want to be backwards
          // compatible with the existing SDK behavior.
          e.convertToNoDocument(K.min());
        }(t, e);
      }
      /**
       * If this mutation is not idempotent, returns the base value to persist with
       * this mutation. If a base value is returned, the mutation is always applied
       * to this base value, even if document has already been updated.
       *
       * The base value is a sparse object that consists of only the document
       * fields for which this mutation contains a non-idempotent transformation
       * (e.g. a numeric increment). The provided value guarantees consistent
       * behavior for non-idempotent transforms and allow us to return the same
       * latency-compensated value even if the backend has already applied the
       * mutation. The base value is null for idempotent mutations, as they can be
       * re-played even if the backend has already applied them.
       *
       * @returns a base value to store along with the mutation, or null for
       * idempotent mutations.
       */


      function Re(t, e) {
        for (var n = null, r = 0, i = t.fieldTransforms; r < i.length; r++) {
          var o = i[r],
              s = e.data.field(o.field),
              u = ve(o.transform, s || null);
          null != u && (null == n && (n = _t.empty()), n.set(o.field, u));
        }

        return n || null;
      }

      function Le(t, e) {
        return t.type === e.type && !!t.key.isEqual(e.key) && !!t.precondition.isEqual(e.precondition) && !!function (t, e) {
          return void 0 === t && void 0 === e || !(!t || !e) && U(t, e, function (t, e) {
            return function (t, e) {
              return t.field.isEqual(e.field) && function (t, e) {
                return t instanceof ge && e instanceof ge || t instanceof be && e instanceof be ? U(t.elements, e.elements, ft) : t instanceof Te && e instanceof Te ? ft(t.A, e.A) : t instanceof me && e instanceof me;
              }(t.transform, e.transform);
            }(t, e);
          });
        }(t.fieldTransforms, e.fieldTransforms) && (0
        /* Set */
        === t.type ? t.value.isEqual(e.value) : 1
        /* Patch */
        !== t.type || t.data.isEqual(e.data) && t.fieldMask.isEqual(e.fieldMask));
      }
      /**
       * Returns the version from the given document for use as the result of a
       * mutation. Mutations are defined to return the version of the base document
       * only if it is an existing document. Deleted and unknown documents have a
       * post-mutation version of SnapshotVersion.min().
       */


      function Oe(t) {
        return t.isFoundDocument() ? t.version : K.min();
      }
      /**
       * A mutation that creates or replaces the document at the given key with the
       * object value contents.
       */


      var Pe =
      /** @class */
      function (e) {
        function n(t, n, r, i) {
          void 0 === i && (i = []);
          var o = this;
          return (o = e.call(this) || this).key = t, o.value = n, o.precondition = r, o.fieldTransforms = i, o.type = 0
          /* Set */
          , o;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n;
      }(ke),
          Fe =
      /** @class */
      function (e) {
        function n(t, n, r, i, o) {
          void 0 === o && (o = []);
          var s = this;
          return (s = e.call(this) || this).key = t, s.data = n, s.fieldMask = r, s.precondition = i, s.fieldTransforms = o, s.type = 1
          /* Patch */
          , s;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n;
      }(ke);

      function Me(t) {
        var e = new Map();
        return t.fieldMask.fields.forEach(function (n) {
          if (!n.isEmpty()) {
            var r = t.data.field(n);
            e.set(n, r);
          }
        }), e
        /**
        * Creates a list of "transform results" (a transform result is a field value
        * representing the result of applying a transform) for use after a mutation
        * containing transforms has been acknowledged by the server.
        *
        * @param fieldTransforms - The field transforms to apply the result to.
        * @param mutableDocument - The current state of the document after applying all
        * previous mutations.
        * @param serverTransformResults - The transform results received by the server.
        * @returns The transform results list.
        */
        ;
      }

      function Ve(t, e, n) {
        var r = new Map();
        P(t.length === n.length);

        for (var i = 0; i < n.length; i++) {
          var o = t[i],
              s = o.transform,
              u = e.data.field(o.field);
          r.set(o.field, ye(s, u, n[i]));
        }

        return r;
      }
      /**
       * Creates a list of "transform results" (a transform result is a field value
       * representing the result of applying a transform) for use when applying a
       * transform locally.
       *
       * @param fieldTransforms - The field transforms to apply the result to.
       * @param localWriteTime - The local time of the mutation (used to
       *     generate ServerTimestampValues).
       * @param mutableDocument - The current state of the document after applying all
       *     previous mutations.
       * @returns The transform results list.
       */


      function qe(t, e, n) {
        for (var r = new Map(), i = 0, o = t; i < o.length; i++) {
          var s = o[i],
              u = s.transform,
              a = n.data.field(s.field);
          r.set(s.field, pe(u, a, e));
        }

        return r;
      }
      /** A mutation that deletes the document at the given key. */


      var Ue,
          Be,
          je =
      /** @class */
      function (e) {
        function n(t, n) {
          var r = this;
          return (r = e.call(this) || this).key = t, r.precondition = n, r.type = 2
          /* Delete */
          , r.fieldTransforms = [], r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n;
      }(ke),
          Ke =
      /** @class */
      function (e) {
        function n(t, n) {
          var r = this;
          return (r = e.call(this) || this).key = t, r.precondition = n, r.type = 3
          /* Verify */
          , r.fieldTransforms = [], r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n;
      }(ke),
          Qe = // TODO(b/33078163): just use simplest form of existence filter for now
      function Qe(t) {
        this.count = t;
      };
      /**
       * Determines whether an error code represents a permanent error when received
       * in response to a non-write operation.
       *
       * See isPermanentWriteError for classifying write errors.
       */


      function Ge(t) {
        switch (t) {
          case N.OK:
            return O();

          case N.CANCELLED:
          case N.UNKNOWN:
          case N.DEADLINE_EXCEEDED:
          case N.RESOURCE_EXHAUSTED:
          case N.INTERNAL:
          case N.UNAVAILABLE: // Unauthenticated means something went wrong with our token and we need
          // to retry with new credentials which will happen automatically.

          case N.UNAUTHENTICATED:
            return !1;

          case N.INVALID_ARGUMENT:
          case N.NOT_FOUND:
          case N.ALREADY_EXISTS:
          case N.PERMISSION_DENIED:
          case N.FAILED_PRECONDITION: // Aborted might be retried in some scenarios, but that is dependant on
          // the context and should handled individually by the calling code.
          // See https://cloud.google.com/apis/design/errors.

          case N.ABORTED:
          case N.OUT_OF_RANGE:
          case N.UNIMPLEMENTED:
          case N.DATA_LOSS:
            return !0;

          default:
            return O();
        }
      }
      /**
       * Determines whether an error code represents a permanent error when received
       * in response to a write operation.
       *
       * Write operations must be handled specially because as of b/119437764, ABORTED
       * errors on the write stream should be retried too (even though ABORTED errors
       * are not generally retryable).
       *
       * Note that during the initial handshake on the write stream an ABORTED error
       * signals that we should discard our stream token (i.e. it is permanent). This
       * means a handshake error should be classified with isPermanentError, above.
       */

      /**
       * Maps an error Code from GRPC status code number, like 0, 1, or 14. These
       * are not the same as HTTP status codes.
       *
       * @returns The Code equivalent to the given GRPC status code. Fails if there
       *     is no match.
       */


      function ze(t) {
        if (void 0 === t) // This shouldn't normally happen, but in certain error cases (like trying
          // to send invalid proto messages) we may get an error with no GRPC code.
          return x("GRPC error has no .code"), N.UNKNOWN;

        switch (t) {
          case Ue.OK:
            return N.OK;

          case Ue.CANCELLED:
            return N.CANCELLED;

          case Ue.UNKNOWN:
            return N.UNKNOWN;

          case Ue.DEADLINE_EXCEEDED:
            return N.DEADLINE_EXCEEDED;

          case Ue.RESOURCE_EXHAUSTED:
            return N.RESOURCE_EXHAUSTED;

          case Ue.INTERNAL:
            return N.INTERNAL;

          case Ue.UNAVAILABLE:
            return N.UNAVAILABLE;

          case Ue.UNAUTHENTICATED:
            return N.UNAUTHENTICATED;

          case Ue.INVALID_ARGUMENT:
            return N.INVALID_ARGUMENT;

          case Ue.NOT_FOUND:
            return N.NOT_FOUND;

          case Ue.ALREADY_EXISTS:
            return N.ALREADY_EXISTS;

          case Ue.PERMISSION_DENIED:
            return N.PERMISSION_DENIED;

          case Ue.FAILED_PRECONDITION:
            return N.FAILED_PRECONDITION;

          case Ue.ABORTED:
            return N.ABORTED;

          case Ue.OUT_OF_RANGE:
            return N.OUT_OF_RANGE;

          case Ue.UNIMPLEMENTED:
            return N.UNIMPLEMENTED;

          case Ue.DATA_LOSS:
            return N.DATA_LOSS;

          default:
            return O();
        }
      }
      /**
       * Converts an HTTP response's error status to the equivalent error code.
       *
       * @param status - An HTTP error response status ("FAILED_PRECONDITION",
       * "UNKNOWN", etc.)
       * @returns The equivalent Code. Non-matching responses are mapped to
       *     Code.UNKNOWN.
       */


      (Be = Ue || (Ue = {}))[Be.OK = 0] = "OK", Be[Be.CANCELLED = 1] = "CANCELLED", Be[Be.UNKNOWN = 2] = "UNKNOWN", Be[Be.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT", Be[Be.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", Be[Be.NOT_FOUND = 5] = "NOT_FOUND", Be[Be.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", Be[Be.PERMISSION_DENIED = 7] = "PERMISSION_DENIED", Be[Be.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", Be[Be.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED", Be[Be.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", Be[Be.ABORTED = 10] = "ABORTED", Be[Be.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", Be[Be.UNIMPLEMENTED = 12] = "UNIMPLEMENTED", Be[Be.INTERNAL = 13] = "INTERNAL", Be[Be.UNAVAILABLE = 14] = "UNAVAILABLE", Be[Be.DATA_LOSS = 15] = "DATA_LOSS";
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */
      // An immutable sorted map implementation, based on a Left-leaning Red-Black
      // tree.

      var We =
      /** @class */
      function () {
        function t(t, e) {
          this.comparator = t, this.root = e || Ye.EMPTY;
        } // Returns a copy of the map, with the specified key/value added or replaced.


        return t.prototype.insert = function (e, n) {
          return new t(this.comparator, this.root.insert(e, n, this.comparator).copy(null, null, Ye.BLACK, null, null));
        }, // Returns a copy of the map, with the specified key removed.
        t.prototype.remove = function (e) {
          return new t(this.comparator, this.root.remove(e, this.comparator).copy(null, null, Ye.BLACK, null, null));
        }, // Returns the value of the node with the given key, or null.
        t.prototype.get = function (t) {
          for (var e = this.root; !e.isEmpty();) {
            var n = this.comparator(t, e.key);
            if (0 === n) return e.value;
            n < 0 ? e = e.left : n > 0 && (e = e.right);
          }

          return null;
        }, // Returns the index of the element in this sorted map, or -1 if it doesn't
        // exist.
        t.prototype.indexOf = function (t) {
          for ( // Number of nodes that were pruned when descending right
          var e = 0, n = this.root; !n.isEmpty();) {
            var r = this.comparator(t, n.key);
            if (0 === r) return e + n.left.size;
            r < 0 ? n = n.left : ( // Count all nodes left of the node plus the node itself
            e += n.left.size + 1, n = n.right);
          } // Node not found


          return -1;
        }, t.prototype.isEmpty = function () {
          return this.root.isEmpty();
        }, Object.defineProperty(t.prototype, "size", {
          // Returns the total number of nodes in the map.
          get: function get() {
            return this.root.size;
          },
          enumerable: !1,
          configurable: !0
        }), // Returns the minimum key in the map.
        t.prototype.minKey = function () {
          return this.root.minKey();
        }, // Returns the maximum key in the map.
        t.prototype.maxKey = function () {
          return this.root.maxKey();
        }, // Traverses the map in key order and calls the specified action function
        // for each key/value pair. If action returns true, traversal is aborted.
        // Returns the first truthy value returned by action, or the last falsey
        // value returned by action.
        t.prototype.inorderTraversal = function (t) {
          return this.root.inorderTraversal(t);
        }, t.prototype.forEach = function (t) {
          this.inorderTraversal(function (e, n) {
            return t(e, n), !1;
          });
        }, t.prototype.toString = function () {
          var t = [];
          return this.inorderTraversal(function (e, n) {
            return t.push(e + ":" + n), !1;
          }), "{" + t.join(", ") + "}";
        }, // Traverses the map in reverse key order and calls the specified action
        // function for each key/value pair. If action returns true, traversal is
        // aborted.
        // Returns the first truthy value returned by action, or the last falsey
        // value returned by action.
        t.prototype.reverseTraversal = function (t) {
          return this.root.reverseTraversal(t);
        }, // Returns an iterator over the SortedMap.
        t.prototype.getIterator = function () {
          return new He(this.root, null, this.comparator, !1);
        }, t.prototype.getIteratorFrom = function (t) {
          return new He(this.root, t, this.comparator, !1);
        }, t.prototype.getReverseIterator = function () {
          return new He(this.root, null, this.comparator, !0);
        }, t.prototype.getReverseIteratorFrom = function (t) {
          return new He(this.root, t, this.comparator, !0);
        }, t;
      }(),
          He =
      /** @class */
      function () {
        function t(t, e, n, r) {
          this.isReverse = r, this.nodeStack = [];

          for (var i = 1; !t.isEmpty();) {
            if (i = e ? n(t.key, e) : 1, // flip the comparison if we're going in reverse
            r && (i *= -1), i < 0) // This node is less than our start key. ignore it
              t = this.isReverse ? t.left : t.right;else {
              if (0 === i) {
                // This node is exactly equal to our start key. Push it on the stack,
                // but stop iterating;
                this.nodeStack.push(t);
                break;
              } // This node is greater than our start key, add it to the stack and move
              // to the next one


              this.nodeStack.push(t), t = this.isReverse ? t.right : t.left;
            }
          }
        }

        return t.prototype.getNext = function () {
          var t = this.nodeStack.pop(),
              e = {
            key: t.key,
            value: t.value
          };
          if (this.isReverse) for (t = t.left; !t.isEmpty();) {
            this.nodeStack.push(t), t = t.right;
          } else for (t = t.right; !t.isEmpty();) {
            this.nodeStack.push(t), t = t.left;
          }
          return e;
        }, t.prototype.hasNext = function () {
          return this.nodeStack.length > 0;
        }, t.prototype.peek = function () {
          if (0 === this.nodeStack.length) return null;
          var t = this.nodeStack[this.nodeStack.length - 1];
          return {
            key: t.key,
            value: t.value
          };
        }, t;
      }(),
          Ye =
      /** @class */
      function () {
        function t(e, n, r, i, o) {
          this.key = e, this.value = n, this.color = null != r ? r : t.RED, this.left = null != i ? i : t.EMPTY, this.right = null != o ? o : t.EMPTY, this.size = this.left.size + 1 + this.right.size;
        } // Returns a copy of the current node, optionally replacing pieces of it.


        return t.prototype.copy = function (e, n, r, i, o) {
          return new t(null != e ? e : this.key, null != n ? n : this.value, null != r ? r : this.color, null != i ? i : this.left, null != o ? o : this.right);
        }, t.prototype.isEmpty = function () {
          return !1;
        }, // Traverses the tree in key order and calls the specified action function
        // for each node. If action returns true, traversal is aborted.
        // Returns the first truthy value returned by action, or the last falsey
        // value returned by action.
        t.prototype.inorderTraversal = function (t) {
          return this.left.inorderTraversal(t) || t(this.key, this.value) || this.right.inorderTraversal(t);
        }, // Traverses the tree in reverse key order and calls the specified action
        // function for each node. If action returns true, traversal is aborted.
        // Returns the first truthy value returned by action, or the last falsey
        // value returned by action.
        t.prototype.reverseTraversal = function (t) {
          return this.right.reverseTraversal(t) || t(this.key, this.value) || this.left.reverseTraversal(t);
        }, // Returns the minimum node in the tree.
        t.prototype.min = function () {
          return this.left.isEmpty() ? this : this.left.min();
        }, // Returns the maximum key in the tree.
        t.prototype.minKey = function () {
          return this.min().key;
        }, // Returns the maximum key in the tree.
        t.prototype.maxKey = function () {
          return this.right.isEmpty() ? this.key : this.right.maxKey();
        }, // Returns new tree, with the key/value added.
        t.prototype.insert = function (t, e, n) {
          var r = this,
              i = n(t, r.key);
          return (r = i < 0 ? r.copy(null, null, null, r.left.insert(t, e, n), null) : 0 === i ? r.copy(null, e, null, null, null) : r.copy(null, null, null, null, r.right.insert(t, e, n))).fixUp();
        }, t.prototype.removeMin = function () {
          if (this.left.isEmpty()) return t.EMPTY;
          var e = this;
          return e.left.isRed() || e.left.left.isRed() || (e = e.moveRedLeft()), (e = e.copy(null, null, null, e.left.removeMin(), null)).fixUp();
        }, // Returns new tree, with the specified item removed.
        t.prototype.remove = function (e, n) {
          var r,
              i = this;
          if (n(e, i.key) < 0) i.left.isEmpty() || i.left.isRed() || i.left.left.isRed() || (i = i.moveRedLeft()), i = i.copy(null, null, null, i.left.remove(e, n), null);else {
            if (i.left.isRed() && (i = i.rotateRight()), i.right.isEmpty() || i.right.isRed() || i.right.left.isRed() || (i = i.moveRedRight()), 0 === n(e, i.key)) {
              if (i.right.isEmpty()) return t.EMPTY;
              r = i.right.min(), i = i.copy(r.key, r.value, null, null, i.right.removeMin());
            }

            i = i.copy(null, null, null, null, i.right.remove(e, n));
          }
          return i.fixUp();
        }, t.prototype.isRed = function () {
          return this.color;
        }, // Returns new tree after performing any needed rotations.
        t.prototype.fixUp = function () {
          var t = this;
          return t.right.isRed() && !t.left.isRed() && (t = t.rotateLeft()), t.left.isRed() && t.left.left.isRed() && (t = t.rotateRight()), t.left.isRed() && t.right.isRed() && (t = t.colorFlip()), t;
        }, t.prototype.moveRedLeft = function () {
          var t = this.colorFlip();
          return t.right.left.isRed() && (t = (t = (t = t.copy(null, null, null, null, t.right.rotateRight())).rotateLeft()).colorFlip()), t;
        }, t.prototype.moveRedRight = function () {
          var t = this.colorFlip();
          return t.left.left.isRed() && (t = (t = t.rotateRight()).colorFlip()), t;
        }, t.prototype.rotateLeft = function () {
          var e = this.copy(null, null, t.RED, null, this.right.left);
          return this.right.copy(null, null, this.color, e, null);
        }, t.prototype.rotateRight = function () {
          var e = this.copy(null, null, t.RED, this.left.right, null);
          return this.left.copy(null, null, this.color, null, e);
        }, t.prototype.colorFlip = function () {
          var t = this.left.copy(null, null, !this.left.color, null, null),
              e = this.right.copy(null, null, !this.right.color, null, null);
          return this.copy(null, null, !this.color, t, e);
        }, // For testing.
        t.prototype.checkMaxDepth = function () {
          var t = this.check();
          return Math.pow(2, t) <= this.size + 1;
        }, // In a balanced RB tree, the black-depth (number of black nodes) from root to
        // leaves is equal on both sides.  This function verifies that or asserts.
        t.prototype.check = function () {
          if (this.isRed() && this.left.isRed()) throw O();
          if (this.right.isRed()) throw O();
          var t = this.left.check();
          if (t !== this.right.check()) throw O();
          return t + (this.isRed() ? 0 : 1);
        }, t;
      }(); // end SortedMap
      // An iterator over an LLRBNode.
      // end LLRBNode
      // Empty node is shared between all LLRB trees.
      // eslint-disable-next-line @typescript-eslint/no-explicit-any


      Ye.EMPTY = null, Ye.RED = !0, Ye.BLACK = !1, // end LLRBEmptyNode
      Ye.EMPTY = new (
      /** @class */
      function () {
        function t() {
          this.size = 0;
        }

        return Object.defineProperty(t.prototype, "key", {
          get: function get() {
            throw O();
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "value", {
          get: function get() {
            throw O();
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "color", {
          get: function get() {
            throw O();
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "left", {
          get: function get() {
            throw O();
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "right", {
          get: function get() {
            throw O();
          },
          enumerable: !1,
          configurable: !0
        }), // Returns a copy of the current node.
        t.prototype.copy = function (t, e, n, r, i) {
          return this;
        }, // Returns a copy of the tree, with the specified key/value added.
        t.prototype.insert = function (t, e, n) {
          return new Ye(t, e);
        }, // Returns a copy of the tree, with the specified key removed.
        t.prototype.remove = function (t, e) {
          return this;
        }, t.prototype.isEmpty = function () {
          return !0;
        }, t.prototype.inorderTraversal = function (t) {
          return !1;
        }, t.prototype.reverseTraversal = function (t) {
          return !1;
        }, t.prototype.minKey = function () {
          return null;
        }, t.prototype.maxKey = function () {
          return null;
        }, t.prototype.isRed = function () {
          return !1;
        }, // For testing.
        t.prototype.checkMaxDepth = function () {
          return !0;
        }, t.prototype.check = function () {
          return 0;
        }, t;
      }())();
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * SortedSet is an immutable (copy-on-write) collection that holds elements
       * in order specified by the provided comparator.
       *
       * NOTE: if provided comparator returns 0 for two elements, we consider them to
       * be equal!
       */

      var $e =
      /** @class */
      function () {
        function t(t) {
          this.comparator = t, this.data = new We(this.comparator);
        }

        return t.prototype.has = function (t) {
          return null !== this.data.get(t);
        }, t.prototype.first = function () {
          return this.data.minKey();
        }, t.prototype.last = function () {
          return this.data.maxKey();
        }, Object.defineProperty(t.prototype, "size", {
          get: function get() {
            return this.data.size;
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.indexOf = function (t) {
          return this.data.indexOf(t);
        },
        /** Iterates elements in order defined by "comparator" */
        t.prototype.forEach = function (t) {
          this.data.inorderTraversal(function (e, n) {
            return t(e), !1;
          });
        },
        /** Iterates over `elem`s such that: range[0] &lt;= elem &lt; range[1]. */
        t.prototype.forEachInRange = function (t, e) {
          for (var n = this.data.getIteratorFrom(t[0]); n.hasNext();) {
            var r = n.getNext();
            if (this.comparator(r.key, t[1]) >= 0) return;
            e(r.key);
          }
        },
        /**
         * Iterates over `elem`s such that: start &lt;= elem until false is returned.
         */
        t.prototype.forEachWhile = function (t, e) {
          var n;

          for (n = void 0 !== e ? this.data.getIteratorFrom(e) : this.data.getIterator(); n.hasNext();) {
            if (!t(n.getNext().key)) return;
          }
        },
        /** Finds the least element greater than or equal to `elem`. */
        t.prototype.firstAfterOrEqual = function (t) {
          var e = this.data.getIteratorFrom(t);
          return e.hasNext() ? e.getNext().key : null;
        }, t.prototype.getIterator = function () {
          return new Xe(this.data.getIterator());
        }, t.prototype.getIteratorFrom = function (t) {
          return new Xe(this.data.getIteratorFrom(t));
        },
        /** Inserts or updates an element */
        t.prototype.add = function (t) {
          return this.copy(this.data.remove(t).insert(t, !0));
        },
        /** Deletes an element */
        t.prototype["delete"] = function (t) {
          return this.has(t) ? this.copy(this.data.remove(t)) : this;
        }, t.prototype.isEmpty = function () {
          return this.data.isEmpty();
        }, t.prototype.unionWith = function (t) {
          var e = this; // Make sure `result` always refers to the larger one of the two sets.

          return e.size < t.size && (e = t, t = this), t.forEach(function (t) {
            e = e.add(t);
          }), e;
        }, t.prototype.isEqual = function (e) {
          if (!(e instanceof t)) return !1;
          if (this.size !== e.size) return !1;

          for (var n = this.data.getIterator(), r = e.data.getIterator(); n.hasNext();) {
            var i = n.getNext().key,
                o = r.getNext().key;
            if (0 !== this.comparator(i, o)) return !1;
          }

          return !0;
        }, t.prototype.toArray = function () {
          var t = [];
          return this.forEach(function (e) {
            t.push(e);
          }), t;
        }, t.prototype.toString = function () {
          var t = [];
          return this.forEach(function (e) {
            return t.push(e);
          }), "SortedSet(" + t.toString() + ")";
        }, t.prototype.copy = function (e) {
          var n = new t(this.comparator);
          return n.data = e, n;
        }, t;
      }(),
          Xe =
      /** @class */
      function () {
        function t(t) {
          this.iter = t;
        }

        return t.prototype.getNext = function () {
          return this.iter.getNext().key;
        }, t.prototype.hasNext = function () {
          return this.iter.hasNext();
        }, t;
      }(),
          Je = new We(ct.comparator);

      function Ze() {
        return Je;
      }

      var tn = new We(ct.comparator);

      function en() {
        return tn;
      }

      var nn = new We(ct.comparator);

      function rn() {
        return nn;
      }

      var on = new $e(ct.comparator);

      function sn() {
        for (var t = [], e = 0; e < arguments.length; e++) {
          t[e] = arguments[e];
        }

        for (var n = on, r = 0, i = t; r < i.length; r++) {
          var o = i[r];
          n = n.add(o);
        }

        return n;
      }

      var un = new $e(q);

      function an() {
        return un;
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * An event from the RemoteStore. It is split into targetChanges (changes to the
       * state or the set of documents in our watched targets) and documentUpdates
       * (changes to the actual documents).
       */


      var cn =
      /** @class */
      function () {
        function t(
        /**
         * The snapshot version this event brings us up to, or MIN if not set.
         */
        t,
        /**
         * A map from target to changes to the target. See TargetChange.
         */
        e,
        /**
         * A set of targets that is known to be inconsistent. Listens for these
         * targets should be re-established without resume tokens.
         */
        n,
        /**
         * A set of which documents have changed or been deleted, along with the
         * doc's new values (if not deleted).
         */
        r,
        /**
         * A set of which document updates are due only to limbo resolution targets.
         */
        i) {
          this.snapshotVersion = t, this.targetChanges = e, this.targetMismatches = n, this.documentUpdates = r, this.resolvedLimboDocuments = i;
        }
        /**
         * HACK: Views require RemoteEvents in order to determine whether the view is
         * CURRENT, but secondary tabs don't receive remote events. So this method is
         * used to create a synthesized RemoteEvent that can be used to apply a
         * CURRENT status change to a View, for queries executed in a different tab.
         */
        // PORTING NOTE: Multi-tab only


        return t.createSynthesizedRemoteEventForCurrentChange = function (e, n) {
          var r = new Map();
          return r.set(e, hn.createSynthesizedTargetChangeForCurrentChange(e, n)), new t(K.min(), r, an(), Ze(), sn());
        }, t;
      }(),
          hn =
      /** @class */
      function () {
        function t(
        /**
         * An opaque, server-assigned token that allows watching a query to be resumed
         * after disconnecting without retransmitting all the data that matches the
         * query. The resume token essentially identifies a point in time from which
         * the server should resume sending results.
         */
        t,
        /**
         * The "current" (synced) status of this target. Note that "current"
         * has special meaning in the RPC protocol that implies that a target is
         * both up-to-date and consistent with the rest of the watch stream.
         */
        e,
        /**
         * The set of documents that were newly assigned to this target as part of
         * this remote event.
         */
        n,
        /**
         * The set of documents that were already assigned to this target but received
         * an update during this remote event.
         */
        r,
        /**
         * The set of documents that were removed from this target as part of this
         * remote event.
         */
        i) {
          this.resumeToken = t, this.current = e, this.addedDocuments = n, this.modifiedDocuments = r, this.removedDocuments = i
          /**
          * This method is used to create a synthesized TargetChanges that can be used to
          * apply a CURRENT status change to a View (for queries executed in a different
          * tab) or for new queries (to raise snapshots with correct CURRENT status).
          */
          ;
        }

        return t.createSynthesizedTargetChangeForCurrentChange = function (e, n) {
          return new t(J.EMPTY_BYTE_STRING, n, sn(), sn(), sn());
        }, t;
      }(),
          fn = function fn(
      /** The new document applies to all of these targets. */
      t,
      /** The new document is removed from all of these targets. */
      e,
      /** The key of the document for this change. */
      n,
      /**
           * The new document or NoDocument if it was deleted. Is null if the
           * document went out of view without the server sending a new document.
           */
      r) {
        this.v = t, this.removedTargetIds = e, this.key = n, this.P = r;
      },
          ln = function ln(t, e) {
        this.targetId = t, this.V = e;
      },
          dn = function dn(
      /** What kind of change occurred to the watch target. */
      t,
      /** The target IDs that were added/removed/set. */
      e,
      /**
           * An opaque, server-assigned token that allows watching a target to be
           * resumed after disconnecting without retransmitting all the data that
           * matches the target. The resume token essentially identifies a point in
           * time from which the server should resume sending results.
           */
      n
      /** An RPC error indicating why the watch failed. */
      , r) {
        void 0 === n && (n = J.EMPTY_BYTE_STRING), void 0 === r && (r = null), this.state = t, this.targetIds = e, this.resumeToken = n, this.cause = r;
      },
          pn =
      /** @class */
      function () {
        function t() {
          /**
           * The number of pending responses (adds or removes) that we are waiting on.
           * We only consider targets active that have no pending responses.
           */
          this.S = 0,
          /**
               * Keeps track of the document changes since the last raised snapshot.
               *
               * These changes are continuously updated as we receive document updates and
               * always reflect the current set of changes against the last issued snapshot.
               */
          this.D = mn(),
          /** See public getters for explanations of these fields. */
          this.C = J.EMPTY_BYTE_STRING, this.N = !1,
          /**
               * Whether this target state should be included in the next snapshot. We
               * initialize to true so that newly-added targets are included in the next
               * RemoteEvent.
               */
          this.k = !0;
        }

        return Object.defineProperty(t.prototype, "current", {
          /**
           * Whether this target has been marked 'current'.
           *
           * 'Current' has special meaning in the RPC protocol: It implies that the
           * Watch backend has sent us all changes up to the point at which the target
           * was added and that the target is consistent with the rest of the watch
           * stream.
           */
          get: function get() {
            return this.N;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "resumeToken", {
          /** The last resume token sent to us for this target. */
          get: function get() {
            return this.C;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "F", {
          /** Whether this target has pending target adds or target removes. */
          get: function get() {
            return 0 !== this.S;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "$", {
          /** Whether we have modified any state that should trigger a snapshot. */
          get: function get() {
            return this.k;
          },
          enumerable: !1,
          configurable: !0
        }),
        /**
         * Applies the resume token to the TargetChange, but only when it has a new
         * value. Empty resumeTokens are discarded.
         */
        t.prototype.O = function (t) {
          t.approximateByteSize() > 0 && (this.k = !0, this.C = t);
        },
        /**
         * Creates a target change from the current set of changes.
         *
         * To reset the document changes after raising this snapshot, call
         * `clearPendingChanges()`.
         */
        t.prototype.M = function () {
          var t = sn(),
              e = sn(),
              n = sn();
          return this.D.forEach(function (r, i) {
            switch (i) {
              case 0
              /* Added */
              :
                t = t.add(r);
                break;

              case 2
              /* Modified */
              :
                e = e.add(r);
                break;

              case 1
              /* Removed */
              :
                n = n.add(r);
                break;

              default:
                O();
            }
          }), new hn(this.C, this.N, t, e, n);
        },
        /**
         * Resets the document changes and sets `hasPendingChanges` to false.
         */
        t.prototype.L = function () {
          this.k = !1, this.D = mn();
        }, t.prototype.B = function (t, e) {
          this.k = !0, this.D = this.D.insert(t, e);
        }, t.prototype.q = function (t) {
          this.k = !0, this.D = this.D.remove(t);
        }, t.prototype.U = function () {
          this.S += 1;
        }, t.prototype.K = function () {
          this.S -= 1;
        }, t.prototype.j = function () {
          this.k = !0, this.N = !0;
        }, t;
      }(),
          yn =
      /** @class */
      function () {
        function t(t) {
          this.W = t,
          /** The internal state of all tracked targets. */
          this.G = new Map(),
          /** Keeps track of the documents to update since the last raised snapshot. */
          this.H = Ze(),
          /** A mapping of document keys to their set of target IDs. */
          this.J = vn(),
          /**
               * A list of targets with existence filter mismatches. These targets are
               * known to be inconsistent and their listens needs to be re-established by
               * RemoteStore.
               */
          this.Y = new $e(q)
          /**
          * Processes and adds the DocumentWatchChange to the current set of changes.
          */
          ;
        }

        return t.prototype.X = function (t) {
          for (var e = 0, n = t.v; e < n.length; e++) {
            var r = n[e];
            t.P && t.P.isFoundDocument() ? this.Z(r, t.P) : this.tt(r, t.key, t.P);
          }

          for (var i = 0, o = t.removedTargetIds; i < o.length; i++) {
            r = o[i];
            this.tt(r, t.key, t.P);
          }
        },
        /** Processes and adds the WatchTargetChange to the current set of changes. */
        t.prototype.et = function (t) {
          var e = this;
          this.forEachTarget(t, function (n) {
            var r = e.nt(n);

            switch (t.state) {
              case 0
              /* NoChange */
              :
                e.st(n) && r.O(t.resumeToken);
                break;

              case 1
              /* Added */
              :
                // We need to decrement the number of pending acks needed from watch
                // for this targetId.
                r.K(), r.F || // We have a freshly added target, so we need to reset any state
                // that we had previously. This can happen e.g. when remove and add
                // back a target for existence filter mismatches.
                r.L(), r.O(t.resumeToken);
                break;

              case 2
              /* Removed */
              :
                // We need to keep track of removed targets to we can post-filter and
                // remove any target changes.
                // We need to decrement the number of pending acks needed from watch
                // for this targetId.
                r.K(), r.F || e.removeTarget(n);
                break;

              case 3
              /* Current */
              :
                e.st(n) && (r.j(), r.O(t.resumeToken));
                break;

              case 4
              /* Reset */
              :
                e.st(n) && ( // Reset the target and synthesizes removes for all existing
                // documents. The backend will re-add any documents that still
                // match the target before it sends the next global snapshot.
                e.it(n), r.O(t.resumeToken));
                break;

              default:
                O();
            }
          });
        },
        /**
         * Iterates over all targetIds that the watch change applies to: either the
         * targetIds explicitly listed in the change or the targetIds of all currently
         * active targets.
         */
        t.prototype.forEachTarget = function (t, e) {
          var n = this;
          t.targetIds.length > 0 ? t.targetIds.forEach(e) : this.G.forEach(function (t, r) {
            n.st(r) && e(r);
          });
        },
        /**
         * Handles existence filters and synthesizes deletes for filter mismatches.
         * Targets that are invalidated by filter mismatches are added to
         * `pendingTargetResets`.
         */
        t.prototype.rt = function (t) {
          var e = t.targetId,
              n = t.V.count,
              r = this.ot(e);

          if (r) {
            var i = r.target;
            if (xt(i)) {
              if (0 === n) {
                // The existence filter told us the document does not exist. We deduce
                // that this document does not exist and apply a deleted document to
                // our updates. Without applying this deleted document there might be
                // another query that will raise this document as part of a snapshot
                // until it is resolved, essentially exposing inconsistency between
                // queries.
                var o = new ct(i.path);
                this.tt(e, o, Nt.newNoDocument(o, K.min()));
              } else P(1 === n);
            } else this.ct(e) !== n && ( // Existence filter mismatch: We reset the mapping and raise a new
            // snapshot with `isFromCache:true`.
            this.it(e), this.Y = this.Y.add(e));
          }
        },
        /**
         * Converts the currently accumulated state into a remote event at the
         * provided snapshot version. Resets the accumulated changes before returning.
         */
        t.prototype.ut = function (t) {
          var e = this,
              n = new Map();
          this.G.forEach(function (r, i) {
            var o = e.ot(i);

            if (o) {
              if (r.current && xt(o.target)) {
                // Document queries for document that don't exist can produce an empty
                // result set. To update our local cache, we synthesize a document
                // delete if we have not previously received the document. This
                // resolves the limbo state of the document, removing it from
                // limboDocumentRefs.
                // TODO(dimond): Ideally we would have an explicit lookup target
                // instead resulting in an explicit delete message and we could
                // remove this special logic.
                var s = new ct(o.target.path);
                null !== e.H.get(s) || e.at(i, s) || e.tt(i, s, Nt.newNoDocument(s, t));
              }

              r.$ && (n.set(i, r.M()), r.L());
            }
          });
          var r = sn(); // We extract the set of limbo-only document updates as the GC logic
          // special-cases documents that do not appear in the target cache.
          // TODO(gsoltis): Expand on this comment once GC is available in the JS
          // client.

          this.J.forEach(function (t, n) {
            var i = !0;
            n.forEachWhile(function (t) {
              var n = e.ot(t);
              return !n || 2
              /* LimboResolution */
              === n.purpose || (i = !1, !1);
            }), i && (r = r.add(t));
          });
          var i = new cn(t, n, this.Y, this.H, r);
          return this.H = Ze(), this.J = vn(), this.Y = new $e(q), i;
        },
        /**
         * Adds the provided document to the internal list of document updates and
         * its document key to the given target's mapping.
         */
        // Visible for testing.
        t.prototype.Z = function (t, e) {
          if (this.st(t)) {
            var n = this.at(t, e.key) ? 2
            /* Modified */
            : 0
            /* Added */
            ;
            this.nt(t).B(e.key, n), this.H = this.H.insert(e.key, e), this.J = this.J.insert(e.key, this.ht(e.key).add(t));
          }
        },
        /**
         * Removes the provided document from the target mapping. If the
         * document no longer matches the target, but the document's state is still
         * known (e.g. we know that the document was deleted or we received the change
         * that caused the filter mismatch), the new document can be provided
         * to update the remote document cache.
         */
        // Visible for testing.
        t.prototype.tt = function (t, e, n) {
          if (this.st(t)) {
            var r = this.nt(t);
            this.at(t, e) ? r.B(e, 1
            /* Removed */
            ) : // The document may have entered and left the target before we raised a
            // snapshot, so we can just ignore the change.
            r.q(e), this.J = this.J.insert(e, this.ht(e)["delete"](t)), n && (this.H = this.H.insert(e, n));
          }
        }, t.prototype.removeTarget = function (t) {
          this.G["delete"](t);
        },
        /**
         * Returns the current count of documents in the target. This includes both
         * the number of documents that the LocalStore considers to be part of the
         * target as well as any accumulated changes.
         */
        t.prototype.ct = function (t) {
          var e = this.nt(t).M();
          return this.W.getRemoteKeysForTarget(t).size + e.addedDocuments.size - e.removedDocuments.size;
        },
        /**
         * Increment the number of acks needed from watch before we can consider the
         * server to be 'in-sync' with the client's active targets.
         */
        t.prototype.U = function (t) {
          this.nt(t).U();
        }, t.prototype.nt = function (t) {
          var e = this.G.get(t);
          return e || (e = new pn(), this.G.set(t, e)), e;
        }, t.prototype.ht = function (t) {
          var e = this.J.get(t);
          return e || (e = new $e(q), this.J = this.J.insert(t, e)), e;
        },
        /**
         * Verifies that the user is still interested in this target (by calling
         * `getTargetDataForTarget()`) and that we are not waiting for pending ADDs
         * from watch.
         */
        t.prototype.st = function (t) {
          var e = null !== this.ot(t);
          return e || C("WatchChangeAggregator", "Detected inactive target", t), e;
        },
        /**
         * Returns the TargetData for an active target (i.e. a target that the user
         * is still interested in that has no outstanding target change requests).
         */
        t.prototype.ot = function (t) {
          var e = this.G.get(t);
          return e && e.F ? null : this.W.lt(t);
        },
        /**
         * Resets the state of a Watch target to its initial state (e.g. sets
         * 'current' to false, clears the resume token and removes its target mapping
         * from all documents).
         */
        t.prototype.it = function (t) {
          var e = this;
          this.G.set(t, new pn()), this.W.getRemoteKeysForTarget(t).forEach(function (n) {
            e.tt(t, n,
            /*updatedDocument=*/
            null);
          });
        },
        /**
         * Returns whether the LocalStore considers the document to be part of the
         * specified target.
         */
        t.prototype.at = function (t, e) {
          return this.W.getRemoteKeysForTarget(t).has(e);
        }, t;
      }();
      /**
       * A TargetChange specifies the set of changes for a specific target as part of
       * a RemoteEvent. These changes track which documents are added, modified or
       * removed, as well as the target's resume token and whether the target is
       * marked CURRENT.
       * The actual changes *to* documents are not part of the TargetChange since
       * documents may be part of multiple targets.
       */


      function vn() {
        return new We(ct.comparator);
      }

      function mn() {
        return new We(ct.comparator);
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var gn = {
        asc: "ASCENDING",
        desc: "DESCENDING"
      },
          wn = {
        "<": "LESS_THAN",
        "<=": "LESS_THAN_OR_EQUAL",
        ">": "GREATER_THAN",
        ">=": "GREATER_THAN_OR_EQUAL",
        "==": "EQUAL",
        "!=": "NOT_EQUAL",
        "array-contains": "ARRAY_CONTAINS",
        "in": "IN",
        "not-in": "NOT_IN",
        "array-contains-any": "ARRAY_CONTAINS_ANY"
      },
          bn = function bn(t, e) {
        this.databaseId = t, this.I = e;
      };
      /**
       * This class generates JsonObject values for the Datastore API suitable for
       * sending to either GRPC stub methods or via the JSON/HTTP REST API.
       *
       * The serializer supports both Protobuf.js and Proto3 JSON formats. By
       * setting `useProto3Json` to true, the serializer will use the Proto3 JSON
       * format.
       *
       * For a description of the Proto3 JSON format check
       * https://developers.google.com/protocol-buffers/docs/proto3#json
       *
       * TODO(klimt): We can remove the databaseId argument if we keep the full
       * resource name in documents.
       */

      /**
       * Returns a value for a Date that's appropriate to put into a proto.
       */


      function In(t, e) {
        return t.I ? new Date(1e3 * e.seconds).toISOString().replace(/\.\d*/, "").replace("Z", "") + "." + ("000000000" + e.nanoseconds).slice(-9) + "Z" : {
          seconds: "" + e.seconds,
          nanos: e.nanoseconds
        };
      }
      /**
       * Returns a value for bytes that's appropriate to put in a proto.
       *
       * Visible for testing.
       */


      function Tn(t, e) {
        return t.I ? e.toBase64() : e.toUint8Array();
      }
      /**
       * Returns a ByteString based on the proto string value.
       */


      function En(t, e) {
        return In(t, e.toTimestamp());
      }

      function _n(t) {
        return P(!!t), K.fromTimestamp(function (t) {
          var e = tt(t);
          return new j(e.seconds, e.nanos);
        }(t));
      }

      function Sn(t, e) {
        return function (t) {
          return new H(["projects", t.projectId, "databases", t.database]);
        }(t).child("documents").child(e).canonicalString();
      }

      function Nn(t) {
        var e = H.fromString(t);
        return P($n(e)), e;
      }

      function Dn(t, e) {
        return Sn(t.databaseId, e.path);
      }

      function An(t, e) {
        var n = Nn(e);
        if (n.get(1) !== t.databaseId.projectId) throw new D(N.INVALID_ARGUMENT, "Tried to deserialize key from different project: " + n.get(1) + " vs " + t.databaseId.projectId);
        if (n.get(3) !== t.databaseId.database) throw new D(N.INVALID_ARGUMENT, "Tried to deserialize key from different database: " + n.get(3) + " vs " + t.databaseId.database);
        return new ct(Rn(n));
      }

      function kn(t, e) {
        return Sn(t.databaseId, e);
      }

      function Cn(t) {
        var e = Nn(t); // In v1beta1 queries for collections at the root did not have a trailing
        // "/documents". In v1 all resource paths contain "/documents". Preserve the
        // ability to read the v1beta1 form for compatibility with queries persisted
        // in the local target cache.

        return 4 === e.length ? H.emptyPath() : Rn(e);
      }

      function xn(t) {
        return new H(["projects", t.databaseId.projectId, "databases", t.databaseId.database]).canonicalString();
      }

      function Rn(t) {
        return P(t.length > 4 && "documents" === t.get(4)), t.popFirst(5)
        /** Creates a Document proto from key and fields (but no create/update time) */
        ;
      }

      function Ln(t, e, n) {
        return {
          name: Dn(t, e),
          fields: n.value.mapValue.fields
        };
      }

      function On(t, e, n) {
        var r = An(t, e.name),
            i = _n(e.updateTime),
            o = new _t({
          mapValue: {
            fields: e.fields
          }
        }),
            s = Nt.newFoundDocument(r, i, o);

        return n && s.setHasCommittedMutations(), n ? s.setHasCommittedMutations() : s;
      }

      function Pn(t, e) {
        var n;
        if (e instanceof Pe) n = {
          update: Ln(t, e.key, e.value)
        };else if (e instanceof je) n = {
          "delete": Dn(t, e.key)
        };else if (e instanceof Fe) n = {
          update: Ln(t, e.key, e.data),
          updateMask: Yn(e.fieldMask)
        };else {
          if (!(e instanceof Ke)) return O();
          n = {
            verify: Dn(t, e.key)
          };
        }
        return e.fieldTransforms.length > 0 && (n.updateTransforms = e.fieldTransforms.map(function (t) {
          return function (t, e) {
            var n = e.transform;
            if (n instanceof me) return {
              fieldPath: e.field.canonicalString(),
              setToServerValue: "REQUEST_TIME"
            };
            if (n instanceof ge) return {
              fieldPath: e.field.canonicalString(),
              appendMissingElements: {
                values: n.elements
              }
            };
            if (n instanceof be) return {
              fieldPath: e.field.canonicalString(),
              removeAllFromArray: {
                values: n.elements
              }
            };
            if (n instanceof Te) return {
              fieldPath: e.field.canonicalString(),
              increment: n.A
            };
            throw O();
          }(0, t);
        })), e.precondition.isNone || (n.currentDocument = function (t, e) {
          return void 0 !== e.updateTime ? {
            updateTime: En(t, e.updateTime)
          } : void 0 !== e.exists ? {
            exists: e.exists
          } : O();
        }(t, e.precondition)), n;
      }

      function Fn(t, e) {
        var n = e.currentDocument ? function (t) {
          return void 0 !== t.updateTime ? De.updateTime(_n(t.updateTime)) : void 0 !== t.exists ? De.exists(t.exists) : De.none();
        }(e.currentDocument) : De.none(),
            r = e.updateTransforms ? e.updateTransforms.map(function (e) {
          return function (t, e) {
            var n = null;
            if ("setToServerValue" in e) P("REQUEST_TIME" === e.setToServerValue), n = new me();else if ("appendMissingElements" in e) {
              var r = e.appendMissingElements.values || [];
              n = new ge(r);
            } else if ("removeAllFromArray" in e) {
              var i = e.removeAllFromArray.values || [];
              n = new be(i);
            } else "increment" in e ? n = new Te(t, e.increment) : O();
            var o = $.fromServerFormat(e.fieldPath);
            return new Se(o, n);
          }(t, e);
        }) : [];

        if (e.update) {
          e.update.name;
          var i = An(t, e.update.name),
              o = new _t({
            mapValue: {
              fields: e.update.fields
            }
          });

          if (e.updateMask) {
            var s = function (t) {
              var e = t.fieldPaths || [];
              return new X(e.map(function (t) {
                return $.fromServerFormat(t);
              }));
            }(e.updateMask);

            return new Fe(i, o, s, n, r);
          }

          return new Pe(i, o, n, r);
        }

        if (e["delete"]) {
          var u = An(t, e["delete"]);
          return new je(u, n);
        }

        if (e.verify) {
          var a = An(t, e.verify);
          return new Ke(a, n);
        }

        return O();
      }

      function Mn(t, e) {
        return {
          documents: [kn(t, e.path)]
        };
      }

      function Vn(t, e) {
        // Dissect the path into parent, collectionId, and optional key filter.
        var n = {
          structuredQuery: {}
        },
            r = e.path;
        null !== e.collectionGroup ? (n.parent = kn(t, r), n.structuredQuery.from = [{
          collectionId: e.collectionGroup,
          allDescendants: !0
        }]) : (n.parent = kn(t, r.popLast()), n.structuredQuery.from = [{
          collectionId: r.lastSegment()
        }]);

        var i = function (t) {
          if (0 !== t.length) {
            var e = t.map(function (t) {
              // visible for testing
              return function (t) {
                if ("=="
                /* EQUAL */
                === t.op) {
                  if (It(t.value)) return {
                    unaryFilter: {
                      field: Gn(t.field),
                      op: "IS_NAN"
                    }
                  };
                  if (bt(t.value)) return {
                    unaryFilter: {
                      field: Gn(t.field),
                      op: "IS_NULL"
                    }
                  };
                } else if ("!="
                /* NOT_EQUAL */
                === t.op) {
                  if (It(t.value)) return {
                    unaryFilter: {
                      field: Gn(t.field),
                      op: "IS_NOT_NAN"
                    }
                  };
                  if (bt(t.value)) return {
                    unaryFilter: {
                      field: Gn(t.field),
                      op: "IS_NOT_NULL"
                    }
                  };
                }

                return {
                  fieldFilter: {
                    field: Gn(t.field),
                    op: Qn(t.op),
                    value: t.value
                  }
                };
              }(t);
            });
            return 1 === e.length ? e[0] : {
              compositeFilter: {
                op: "AND",
                filters: e
              }
            };
          }
        }(e.filters);

        i && (n.structuredQuery.where = i);

        var o = function (t) {
          if (0 !== t.length) return t.map(function (t) {
            // visible for testing
            return function (t) {
              return {
                field: Gn(t.field),
                direction: Kn(t.dir)
              };
            }(t);
          });
        }(e.orderBy);

        o && (n.structuredQuery.orderBy = o);

        var s = function (t, e) {
          return t.I || st(e) ? e : {
            value: e
          };
        }(t, e.limit);

        return null !== s && (n.structuredQuery.limit = s), e.startAt && (n.structuredQuery.startAt = Bn(e.startAt)), e.endAt && (n.structuredQuery.endAt = Bn(e.endAt)), n;
      }

      function qn(t) {
        var e = Cn(t.parent),
            n = t.structuredQuery,
            r = n.from ? n.from.length : 0,
            i = null;

        if (r > 0) {
          P(1 === r);
          var o = n.from[0];
          o.allDescendants ? i = o.collectionId : e = e.child(o.collectionId);
        }

        var s = [];
        n.where && (s = Un(n.where));
        var u = [];
        n.orderBy && (u = n.orderBy.map(function (t) {
          return function (t) {
            return new Kt(zn(t.field), // visible for testing
            function (t) {
              switch (t) {
                case "ASCENDING":
                  return "asc"
                  /* ASCENDING */
                  ;

                case "DESCENDING":
                  return "desc"
                  /* DESCENDING */
                  ;

                default:
                  return;
              }
            }(t.direction));
          }(t);
        }));
        var a = null;
        n.limit && (a = function (t) {
          var e;
          return st(e = "object" == typeof t ? t.value : t) ? null : e;
        }(n.limit));
        var c = null;
        n.startAt && (c = jn(n.startAt));
        var h = null;
        return n.endAt && (h = jn(n.endAt)), Ht(e, i, u, s, a, "F"
        /* First */
        , c, h);
      }

      function Un(t) {
        return t ? void 0 !== t.unaryFilter ? [Hn(t)] : void 0 !== t.fieldFilter ? [Wn(t)] : void 0 !== t.compositeFilter ? t.compositeFilter.filters.map(function (t) {
          return Un(t);
        }).reduce(function (t, e) {
          return t.concat(e);
        }) : O() : [];
      }

      function Bn(t) {
        return {
          before: t.before,
          values: t.position
        };
      }

      function jn(t) {
        var e = !!t.before,
            n = t.values || [];
        return new Bt(n, e);
      } // visible for testing


      function Kn(t) {
        return gn[t];
      }

      function Qn(t) {
        return wn[t];
      }

      function Gn(t) {
        return {
          fieldPath: t.canonicalString()
        };
      }

      function zn(t) {
        return $.fromServerFormat(t.fieldPath);
      }

      function Wn(t) {
        return Rt.create(zn(t.fieldFilter.field), function (t) {
          switch (t) {
            case "EQUAL":
              return "=="
              /* EQUAL */
              ;

            case "NOT_EQUAL":
              return "!="
              /* NOT_EQUAL */
              ;

            case "GREATER_THAN":
              return ">"
              /* GREATER_THAN */
              ;

            case "GREATER_THAN_OR_EQUAL":
              return ">="
              /* GREATER_THAN_OR_EQUAL */
              ;

            case "LESS_THAN":
              return "<"
              /* LESS_THAN */
              ;

            case "LESS_THAN_OR_EQUAL":
              return "<="
              /* LESS_THAN_OR_EQUAL */
              ;

            case "ARRAY_CONTAINS":
              return "array-contains"
              /* ARRAY_CONTAINS */
              ;

            case "IN":
              return "in"
              /* IN */
              ;

            case "NOT_IN":
              return "not-in"
              /* NOT_IN */
              ;

            case "ARRAY_CONTAINS_ANY":
              return "array-contains-any"
              /* ARRAY_CONTAINS_ANY */
              ;

            case "OPERATOR_UNSPECIFIED":
            default:
              return O();
          }
        }(t.fieldFilter.op), t.fieldFilter.value);
      }

      function Hn(t) {
        switch (t.unaryFilter.op) {
          case "IS_NAN":
            var e = zn(t.unaryFilter.field);
            return Rt.create(e, "=="
            /* EQUAL */
            , {
              doubleValue: NaN
            });

          case "IS_NULL":
            var n = zn(t.unaryFilter.field);
            return Rt.create(n, "=="
            /* EQUAL */
            , {
              nullValue: "NULL_VALUE"
            });

          case "IS_NOT_NAN":
            var r = zn(t.unaryFilter.field);
            return Rt.create(r, "!="
            /* NOT_EQUAL */
            , {
              doubleValue: NaN
            });

          case "IS_NOT_NULL":
            var i = zn(t.unaryFilter.field);
            return Rt.create(i, "!="
            /* NOT_EQUAL */
            , {
              nullValue: "NULL_VALUE"
            });

          case "OPERATOR_UNSPECIFIED":
          default:
            return O();
        }
      }

      function Yn(t) {
        var e = [];
        return t.fields.forEach(function (t) {
          return e.push(t.canonicalString());
        }), {
          fieldPaths: e
        };
      }

      function $n(t) {
        // Resource names have at least 4 components (project ID, database ID)
        return t.length >= 4 && "projects" === t.get(0) && "databases" === t.get(2);
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Encodes a resource path into a IndexedDb-compatible string form.
       */


      function Xn(t) {
        for (var e = "", n = 0; n < t.length; n++) {
          e.length > 0 && (e = Zn(e)), e = Jn(t.get(n), e);
        }

        return Zn(e);
      }
      /** Encodes a single segment of a resource path into the given result */


      function Jn(t, e) {
        for (var n = e, r = t.length, i = 0; i < r; i++) {
          var o = t.charAt(i);

          switch (o) {
            case "\0":
              n += "";
              break;

            case "":
              n += "";
              break;

            default:
              n += o;
          }
        }

        return n;
      }
      /** Encodes a path separator into the given result */


      function Zn(t) {
        return t + "";
      }
      /**
       * Decodes the given IndexedDb-compatible string form of a resource path into
       * a ResourcePath instance. Note that this method is not suitable for use with
       * decoding resource names from the server; those are One Platform format
       * strings.
       */


      function tr(t) {
        // Event the empty path must encode as a path of at least length 2. A path
        // with exactly 2 must be the empty path.
        var e = t.length;
        if (P(e >= 2), 2 === e) return P("" === t.charAt(0) && "" === t.charAt(1)), H.emptyPath(); // Escape characters cannot exist past the second-to-last position in the
        // source value.

        for (var n = e - 2, r = [], i = "", o = 0; o < e;) {
          // The last two characters of a valid encoded path must be a separator, so
          // there must be an end to this segment.
          var s = t.indexOf("", o);

          switch ((s < 0 || s > n) && O(), t.charAt(s + 1)) {
            case "":
              var u = t.substring(o, s),
                  a = void 0;
              0 === i.length ? // Avoid copying for the common case of a segment that excludes \0
              // and \001
              a = u : (a = i += u, i = ""), r.push(a);
              break;

            case "":
              i += t.substring(o, s), i += "\0";
              break;

            case "":
              // The escape character can be used in the output to encode itself.
              i += t.substring(o, s + 1);
              break;

            default:
              O();
          }

          o = s + 2;
        }

        return new H(r);
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Schema Version for the Web client:
       * 1.  Initial version including Mutation Queue, Query Cache, and Remote
       *     Document Cache
       * 2.  Used to ensure a targetGlobal object exists and add targetCount to it. No
       *     longer required because migration 3 unconditionally clears it.
       * 3.  Dropped and re-created Query Cache to deal with cache corruption related
       *     to limbo resolution. Addresses
       *     https://github.com/firebase/firebase-ios-sdk/issues/1548
       * 4.  Multi-Tab Support.
       * 5.  Removal of held write acks.
       * 6.  Create document global for tracking document cache size.
       * 7.  Ensure every cached document has a sentinel row with a sequence number.
       * 8.  Add collection-parent index for Collection Group queries.
       * 9.  Change RemoteDocumentChanges store to be keyed by readTime rather than
       *     an auto-incrementing ID. This is required for Index-Free queries.
       * 10. Rewrite the canonical IDs to the explicit Protobuf-based format.
       * 11. Add bundles and named_queries for bundle support.
       */

      /**
       * Wrapper class to store timestamps (seconds and nanos) in IndexedDb objects.
       */


      var er = function er(t, e) {
        this.seconds = t, this.nanoseconds = e;
      },
          nr = function nr(t,
      /** Whether to allow shared access from multiple tabs. */
      e, n) {
        this.ownerId = t, this.allowTabSynchronization = e, this.leaseTimestampMs = n;
      };
      /**
       * A singleton object to be stored in the 'owner' store in IndexedDb.
       *
       * A given database can have a single primary tab assigned at a given time. That
       * tab must validate that it is still holding the primary lease before every
       * operation that requires locked access. The primary tab should regularly
       * write an updated timestamp to this lease to prevent other tabs from
       * "stealing" the primary lease
       */

      /**
       * Name of the IndexedDb object store.
       *
       * Note that the name 'owner' is chosen to ensure backwards compatibility with
       * older clients that only supported single locked access to the persistence
       * layer.
       */


      nr.store = "owner",
      /**
           * The key string used for the single object that exists in the
           * DbPrimaryClient store.
           */
      nr.key = "owner";
      /**
       * An object to be stored in the 'mutationQueues' store in IndexedDb.
       *
       * Each user gets a single queue of MutationBatches to apply to the server.
       * DbMutationQueue tracks the metadata about the queue.
       */

      var rr = function rr(
      /**
           * The normalized user ID to which this queue belongs.
           */
      t,
      /**
           * An identifier for the highest numbered batch that has been acknowledged
           * by the server. All MutationBatches in this queue with batchIds less
           * than or equal to this value are considered to have been acknowledged by
           * the server.
           *
           * NOTE: this is deprecated and no longer used by the code.
           */
      e,
      /**
           * A stream token that was previously sent by the server.
           *
           * See StreamingWriteRequest in datastore.proto for more details about
           * usage.
           *
           * After sending this token, earlier tokens may not be used anymore so
           * only a single stream token is retained.
           *
           * NOTE: this is deprecated and no longer used by the code.
           */
      n) {
        this.userId = t, this.lastAcknowledgedBatchId = e, this.lastStreamToken = n;
      };
      /** Name of the IndexedDb object store.  */


      rr.store = "mutationQueues",
      /** Keys are automatically assigned via the userId property. */
      rr.keyPath = "userId";
      /**
       * An object to be stored in the 'mutations' store in IndexedDb.
       *
       * Represents a batch of user-level mutations intended to be sent to the server
       * in a single write. Each user-level batch gets a separate DbMutationBatch
       * with a new batchId.
       */

      var ir = function ir(
      /**
           * The normalized user ID to which this batch belongs.
           */
      t,
      /**
           * An identifier for this batch, allocated using an auto-generated key.
           */
      e,
      /**
           * The local write time of the batch, stored as milliseconds since the
           * epoch.
           */
      n,
      /**
           * A list of "mutations" that represent a partial base state from when this
           * write batch was initially created. During local application of the write
           * batch, these baseMutations are applied prior to the real writes in order
           * to override certain document fields from the remote document cache. This
           * is necessary in the case of non-idempotent writes (e.g. `increment()`
           * transforms) to make sure that the local view of the modified documents
           * doesn't flicker if the remote document cache receives the result of the
           * non-idempotent write before the write is removed from the queue.
           *
           * These mutations are never sent to the backend.
           */
      r,
      /**
           * A list of mutations to apply. All mutations will be applied atomically.
           *
           * Mutations are serialized via toMutation().
           */
      i) {
        this.userId = t, this.batchId = e, this.localWriteTimeMs = n, this.baseMutations = r, this.mutations = i;
      };
      /** Name of the IndexedDb object store.  */


      ir.store = "mutations",
      /** Keys are automatically assigned via the userId, batchId properties. */
      ir.keyPath = "batchId",
      /** The index name for lookup of mutations by user. */
      ir.userMutationsIndex = "userMutationsIndex",
      /** The user mutations index is keyed by [userId, batchId] pairs. */
      ir.userMutationsKeyPath = ["userId", "batchId"];
      /**
       * An object to be stored in the 'documentMutations' store in IndexedDb.
       *
       * A manually maintained index of all the mutation batches that affect a given
       * document key. The rows in this table are references based on the contents of
       * DbMutationBatch.mutations.
       */

      var or =
      /** @class */
      function () {
        function t() {}
        /**
         * Creates a [userId] key for use in the DbDocumentMutations index to iterate
         * over all of a user's document mutations.
         */


        return t.prefixForUser = function (t) {
          return [t];
        },
        /**
         * Creates a [userId, encodedPath] key for use in the DbDocumentMutations
         * index to iterate over all at document mutations for a given path or lower.
         */
        t.prefixForPath = function (t, e) {
          return [t, Xn(e)];
        },
        /**
         * Creates a full index key of [userId, encodedPath, batchId] for inserting
         * and deleting into the DbDocumentMutations index.
         */
        t.key = function (t, e, n) {
          return [t, Xn(e), n];
        }, t;
      }();

      or.store = "documentMutations",
      /**
           * Because we store all the useful information for this store in the key,
           * there is no useful information to store as the value. The raw (unencoded)
           * path cannot be stored because IndexedDb doesn't store prototype
           * information.
           */
      or.PLACEHOLDER = new or();
      /**
       * Represents the known absence of a document at a particular version.
       * Stored in IndexedDb as part of a DbRemoteDocument object.
       */

      var sr = function sr(t, e) {
        this.path = t, this.readTime = e;
      },
          ur = function ur(t, e) {
        this.path = t, this.version = e;
      },
          ar = // TODO: We are currently storing full document keys almost three times
      // (once as part of the primary key, once - partly - as `parentPath` and once
      // inside the encoded documents). During our next migration, we should
      // rewrite the primary key as parentPath + document ID which would allow us
      // to drop one value.
      function ar(
      /**
           * Set to an instance of DbUnknownDocument if the data for a document is
           * not known, but it is known that a document exists at the specified
           * version (e.g. it had a successful update applied to it)
           */
      t,
      /**
           * Set to an instance of a DbNoDocument if it is known that no document
           * exists.
           */
      e,
      /**
           * Set to an instance of a Document if there's a cached version of the
           * document.
           */
      n,
      /**
           * Documents that were written to the remote document store based on
           * a write acknowledgment are marked with `hasCommittedMutations`. These
           * documents are potentially inconsistent with the backend's copy and use
           * the write's commit version as their document version.
           */
      r,
      /**
           * When the document was read from the backend. Undefined for data written
           * prior to schema version 9.
           */
      i,
      /**
           * The path of the collection this document is part of. Undefined for data
           * written prior to schema version 9.
           */
      o) {
        this.unknownDocument = t, this.noDocument = e, this.document = n, this.hasCommittedMutations = r, this.readTime = i, this.parentPath = o;
      };
      /**
       * Represents a document that is known to exist but whose data is unknown.
       * Stored in IndexedDb as part of a DbRemoteDocument object.
       */


      ar.store = "remoteDocuments",
      /**
           * An index that provides access to all entries sorted by read time (which
           * corresponds to the last modification time of each row).
           *
           * This index is used to provide a changelog for Multi-Tab.
           */
      ar.readTimeIndex = "readTimeIndex", ar.readTimeIndexPath = "readTime",
      /**
           * An index that provides access to documents in a collection sorted by read
           * time.
           *
           * This index is used to allow the RemoteDocumentCache to fetch newly changed
           * documents in a collection.
           */
      ar.collectionReadTimeIndex = "collectionReadTimeIndex", ar.collectionReadTimeIndexPath = ["parentPath", "readTime"];
      /**
       * Contains a single entry that has metadata about the remote document cache.
       */

      var cr =
      /**
           * @param byteSize - Approximately the total size in bytes of all the
           * documents in the document cache.
           */
      function cr(t) {
        this.byteSize = t;
      };

      cr.store = "remoteDocumentGlobal", cr.key = "remoteDocumentGlobalKey";
      /**
       * An object to be stored in the 'targets' store in IndexedDb.
       *
       * This is based on and should be kept in sync with the proto used in the iOS
       * client.
       *
       * Each query the client listens to against the server is tracked on disk so
       * that the query can be efficiently resumed on restart.
       */

      var hr = function hr(
      /**
           * An auto-generated sequential numeric identifier for the query.
           *
           * Queries are stored using their canonicalId as the key, but these
           * canonicalIds can be quite long so we additionally assign a unique
           * queryId which can be used by referenced data structures (e.g.
           * indexes) to minimize the on-disk cost.
           */
      t,
      /**
           * The canonical string representing this query. This is not unique.
           */
      e,
      /**
           * The last readTime received from the Watch Service for this query.
           *
           * This is the same value as TargetChange.read_time in the protos.
           */
      n,
      /**
           * An opaque, server-assigned token that allows watching a query to be
           * resumed after disconnecting without retransmitting all the data
           * that matches the query. The resume token essentially identifies a
           * point in time from which the server should resume sending results.
           *
           * This is related to the snapshotVersion in that the resumeToken
           * effectively also encodes that value, but the resumeToken is opaque
           * and sometimes encodes additional information.
           *
           * A consequence of this is that the resumeToken should be used when
           * asking the server to reason about where this client is in the watch
           * stream, but the client should use the snapshotVersion for its own
           * purposes.
           *
           * This is the same value as TargetChange.resume_token in the protos.
           */
      r,
      /**
           * A sequence number representing the last time this query was
           * listened to, used for garbage collection purposes.
           *
           * Conventionally this would be a timestamp value, but device-local
           * clocks are unreliable and they must be able to create new listens
           * even while disconnected. Instead this should be a monotonically
           * increasing number that's incremented on each listen call.
           *
           * This is different from the queryId since the queryId is an
           * immutable identifier assigned to the Query on first use while
           * lastListenSequenceNumber is updated every time the query is
           * listened to.
           */
      i,
      /**
           * Denotes the maximum snapshot version at which the associated query view
           * contained no limbo documents.  Undefined for data written prior to
           * schema version 9.
           */
      o,
      /**
           * The query for this target.
           *
           * Because canonical ids are not unique we must store the actual query. We
           * use the proto to have an object we can persist without having to
           * duplicate translation logic to and from a `Query` object.
           */
      s) {
        this.targetId = t, this.canonicalId = e, this.readTime = n, this.resumeToken = r, this.lastListenSequenceNumber = i, this.lastLimboFreeSnapshotVersion = o, this.query = s;
      };

      hr.store = "targets",
      /** Keys are automatically assigned via the targetId property. */
      hr.keyPath = "targetId",
      /** The name of the queryTargets index. */
      hr.queryTargetsIndexName = "queryTargetsIndex",
      /**
           * The index of all canonicalIds to the targets that they match. This is not
           * a unique mapping because canonicalId does not promise a unique name for all
           * possible queries, so we append the targetId to make the mapping unique.
           */
      hr.queryTargetsKeyPath = ["canonicalId", "targetId"];
      /**
       * An object representing an association between a target and a document, or a
       * sentinel row marking the last sequence number at which a document was used.
       * Each document cached must have a corresponding sentinel row before lru
       * garbage collection is enabled.
       *
       * The target associations and sentinel rows are co-located so that orphaned
       * documents and their sequence numbers can be identified efficiently via a scan
       * of this store.
       */

      var fr = function fr(
      /**
           * The targetId identifying a target or 0 for a sentinel row.
           */
      t,
      /**
           * The path to the document, as encoded in the key.
           */
      e,
      /**
           * If this is a sentinel row, this should be the sequence number of the last
           * time the document specified by `path` was used. Otherwise, it should be
           * `undefined`.
           */
      n) {
        this.targetId = t, this.path = e, this.sequenceNumber = n;
      };
      /** Name of the IndexedDb object store.  */


      fr.store = "targetDocuments",
      /** Keys are automatically assigned via the targetId, path properties. */
      fr.keyPath = ["targetId", "path"],
      /** The index name for the reverse index. */
      fr.documentTargetsIndex = "documentTargetsIndex",
      /** We also need to create the reverse index for these properties. */
      fr.documentTargetsKeyPath = ["path", "targetId"];
      /**
       * A record of global state tracked across all Targets, tracked separately
       * to avoid the need for extra indexes.
       *
       * This should be kept in-sync with the proto used in the iOS client.
       */

      var lr = function lr(
      /**
           * The highest numbered target id across all targets.
           *
           * See DbTarget.targetId.
           */
      t,
      /**
           * The highest numbered lastListenSequenceNumber across all targets.
           *
           * See DbTarget.lastListenSequenceNumber.
           */
      e,
      /**
           * A global snapshot version representing the last consistent snapshot we
           * received from the backend. This is monotonically increasing and any
           * snapshots received from the backend prior to this version (e.g. for
           * targets resumed with a resumeToken) should be suppressed (buffered)
           * until the backend has caught up to this snapshot version again. This
           * prevents our cache from ever going backwards in time.
           */
      n,
      /**
           * The number of targets persisted.
           */
      r) {
        this.highestTargetId = t, this.highestListenSequenceNumber = e, this.lastRemoteSnapshotVersion = n, this.targetCount = r;
      };
      /**
       * The key string used for the single object that exists in the
       * DbTargetGlobal store.
       */


      lr.key = "targetGlobalKey", lr.store = "targetGlobal";
      /**
       * An object representing an association between a Collection id (e.g. 'messages')
       * to a parent path (e.g. '/chats/123') that contains it as a (sub)collection.
       * This is used to efficiently find all collections to query when performing
       * a Collection Group query.
       */

      var dr = function dr(
      /**
           * The collectionId (e.g. 'messages')
           */
      t,
      /**
           * The path to the parent (either a document location or an empty path for
           * a root-level collection).
           */
      e) {
        this.collectionId = t, this.parent = e;
      };
      /** Name of the IndexedDb object store. */


      dr.store = "collectionParents",
      /** Keys are automatically assigned via the collectionId, parent properties. */
      dr.keyPath = ["collectionId", "parent"];
      /**
       * A record of the metadata state of each client.
       *
       * PORTING NOTE: This is used to synchronize multi-tab state and does not need
       * to be ported to iOS or Android.
       */

      var pr = function pr( // Note: Previous schema versions included a field
      // "lastProcessedDocumentChangeId". Don't use anymore.

      /** The auto-generated client id assigned at client startup. */
      t,
      /** The last time this state was updated. */
      e,
      /** Whether the client's network connection is enabled. */
      n,
      /** Whether this client is running in a foreground tab. */
      r) {
        this.clientId = t, this.updateTimeMs = e, this.networkEnabled = n, this.inForeground = r;
      };
      /** Name of the IndexedDb object store. */


      pr.store = "clientMetadata",
      /** Keys are automatically assigned via the clientId properties. */
      pr.keyPath = "clientId";
      /**
       * A object representing a bundle loaded by the SDK.
       */

      var yr = function yr(
      /** The ID of the loaded bundle. */
      t,
      /** The create time of the loaded bundle. */
      e,
      /** The schema version of the loaded bundle. */
      n) {
        this.bundleId = t, this.createTime = e, this.version = n;
      };
      /** Name of the IndexedDb object store. */


      yr.store = "bundles", yr.keyPath = "bundleId";
      /**
       * A object representing a named query loaded by the SDK via a bundle.
       */

      var vr = function vr(
      /** The name of the query. */
      t,
      /** The read time of the results saved in the bundle from the named query. */
      e,
      /** The query saved in the bundle. */
      n) {
        this.name = t, this.readTime = e, this.bundledQuery = n;
      };
      /** Name of the IndexedDb object store. */


      vr.store = "namedQueries", vr.keyPath = "name"; // Visible for testing

      var mr = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])([], [rr.store, ir.store, or.store, ar.store, hr.store, nr.store, lr.store, fr.store]), [pr.store])), [cr.store])), [dr.store])), [yr.store, vr.store]),
          gr = "The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",
          wr =
      /** @class */
      function () {
        function t() {
          this.onCommittedListeners = [];
        }

        return t.prototype.addOnCommittedListener = function (t) {
          this.onCommittedListeners.push(t);
        }, t.prototype.raiseOnCommittedEvent = function () {
          this.onCommittedListeners.forEach(function (t) {
            return t();
          });
        }, t;
      }(),
          br = function br() {
        var t = this;
        this.promise = new Promise(function (e, n) {
          t.resolve = e, t.reject = n;
        });
      },
          Ir =
      /** @class */
      function () {
        function t(t) {
          var e = this; // NOTE: next/catchCallback will always point to our own wrapper functions,
          // not the user's raw next() or catch() callbacks.

          this.nextCallback = null, this.catchCallback = null, // When the operation resolves, we'll set result or error and mark isDone.
          this.result = void 0, this.error = void 0, this.isDone = !1, // Set to true when .then() or .catch() are called and prevents additional
          // chaining.
          this.callbackAttached = !1, t(function (t) {
            e.isDone = !0, e.result = t, e.nextCallback && // value should be defined unless T is Void, but we can't express
            // that in the type system.
            e.nextCallback(t);
          }, function (t) {
            e.isDone = !0, e.error = t, e.catchCallback && e.catchCallback(t);
          });
        }

        return t.prototype["catch"] = function (t) {
          return this.next(void 0, t);
        }, t.prototype.next = function (e, n) {
          var r = this;
          return this.callbackAttached && O(), this.callbackAttached = !0, this.isDone ? this.error ? this.wrapFailure(n, this.error) : this.wrapSuccess(e, this.result) : new t(function (t, i) {
            r.nextCallback = function (n) {
              r.wrapSuccess(e, n).next(t, i);
            }, r.catchCallback = function (e) {
              r.wrapFailure(n, e).next(t, i);
            };
          });
        }, t.prototype.toPromise = function () {
          var t = this;
          return new Promise(function (e, n) {
            t.next(e, n);
          });
        }, t.prototype.wrapUserFunction = function (e) {
          try {
            var n = e();
            return n instanceof t ? n : t.resolve(n);
          } catch (e) {
            return t.reject(e);
          }
        }, t.prototype.wrapSuccess = function (e, n) {
          return e ? this.wrapUserFunction(function () {
            return e(n);
          }) : t.resolve(n);
        }, t.prototype.wrapFailure = function (e, n) {
          return e ? this.wrapUserFunction(function () {
            return e(n);
          }) : t.reject(n);
        }, t.resolve = function (e) {
          return new t(function (t, n) {
            t(e);
          });
        }, t.reject = function (e) {
          return new t(function (t, n) {
            n(e);
          });
        }, t.waitFor = function ( // Accept all Promise types in waitFor().
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        e) {
          return new t(function (t, n) {
            var r = 0,
                i = 0,
                o = !1;
            e.forEach(function (e) {
              ++r, e.next(function () {
                ++i, o && i === r && t();
              }, function (t) {
                return n(t);
              });
            }), o = !0, i === r && t();
          });
        },
        /**
         * Given an array of predicate functions that asynchronously evaluate to a
         * boolean, implements a short-circuiting `or` between the results. Predicates
         * will be evaluated until one of them returns `true`, then stop. The final
         * result will be whether any of them returned `true`.
         */
        t.or = function (e) {
          for (var n = t.resolve(!1), r = function r(e) {
            n = n.next(function (n) {
              return n ? t.resolve(n) : e();
            });
          }, i = 0, o = e; i < o.length; i++) {
            r(o[i]);
          }

          return n;
        }, t.forEach = function (t, e) {
          var n = this,
              r = [];
          return t.forEach(function (t, i) {
            r.push(e.call(n, t, i));
          }), this.waitFor(r);
        }, t;
      }(),
          Tr =
      /** @class */
      function () {
        function t(t, e) {
          var n = this;
          this.action = t, this.transaction = e, this.aborted = !1,
          /**
               * A promise that resolves with the result of the IndexedDb transaction.
               */
          this.ft = new br(), this.transaction.oncomplete = function () {
            n.ft.resolve();
          }, this.transaction.onabort = function () {
            e.error ? n.ft.reject(new Sr(t, e.error)) : n.ft.resolve();
          }, this.transaction.onerror = function (e) {
            var r = Cr(e.target.error);
            n.ft.reject(new Sr(t, r));
          };
        }

        return t.open = function (e, n, r, i) {
          try {
            return new t(n, e.transaction(i, r));
          } catch (e) {
            throw new Sr(n, e);
          }
        }, Object.defineProperty(t.prototype, "dt", {
          get: function get() {
            return this.ft.promise;
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.abort = function (t) {
          t && this.ft.reject(t), this.aborted || (C("SimpleDb", "Aborting transaction:", t ? t.message : "Client-initiated abort"), this.aborted = !0, this.transaction.abort());
        },
        /**
         * Returns a SimpleDbStore<KeyType, ValueType> for the specified store. All
         * operations performed on the SimpleDbStore happen within the context of this
         * transaction and it cannot be used anymore once the transaction is
         * completed.
         *
         * Note that we can't actually enforce that the KeyType and ValueType are
         * correct, but they allow type safety through the rest of the consuming code.
         */
        t.prototype.store = function (t) {
          var e = this.transaction.objectStore(t);
          return new Dr(e);
        }, t;
      }(),
          Er =
      /** @class */
      function () {
        /*
         * Creates a new SimpleDb wrapper for IndexedDb database `name`.
         *
         * Note that `version` must not be a downgrade. IndexedDB does not support
         * downgrading the schema version. We currently do not support any way to do
         * versioning outside of IndexedDB's versioning mechanism, as only
         * version-upgrade transactions are allowed to do things like create
         * objectstores.
         */
        function t(e, n, r) {
          this.name = e, this.version = n, this.wt = r, // NOTE: According to https://bugs.webkit.org/show_bug.cgi?id=197050, the
          // bug we're checking for should exist in iOS >= 12.2 and < 13, but for
          // whatever reason it's much harder to hit after 12.2 so we only proactively
          // log on 12.2.
          12.2 === t._t(Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getUA"])()) && x("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.");
        }
        /** Deletes the specified database. */


        return t["delete"] = function (t) {
          return C("SimpleDb", "Removing database:", t), Ar(window.indexedDB.deleteDatabase(t)).toPromise();
        },
        /** Returns true if IndexedDB is available in the current environment. */
        t.yt = function () {
          if ("undefined" == typeof indexedDB) return !1;
          if (t.gt()) return !0; // We extensively use indexed array values and compound keys,
          // which IE and Edge do not support. However, they still have indexedDB
          // defined on the window, so we need to check for them here and make sure
          // to return that persistence is not enabled for those browsers.
          // For tracking support of this feature, see here:
          // https://developer.microsoft.com/en-us/microsoft-edge/platform/status/indexeddbarraysandmultientrysupport/
          // Check the UA string to find out the browser.

          var e = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getUA"])(),
              n = t._t(e),
              r = 0 < n && n < 10,
              o = t.Et(e),
              s = 0 < o && o < 4.5; // IE 10
          // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';
          // IE 11
          // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';
          // Edge
          // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML,
          // like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';
          // iOS Safari: Disable for users running iOS version < 10.


          return !(e.indexOf("MSIE ") > 0 || e.indexOf("Trident/") > 0 || e.indexOf("Edge/") > 0 || r || s);
        },
        /**
         * Returns true if the backing IndexedDB store is the Node IndexedDBShim
         * (see https://github.com/axemclion/IndexedDBShim).
         */
        t.gt = function () {
          var t;
          return "undefined" != typeof process && "YES" === (null === (t = process.env) || void 0 === t ? void 0 : t.Tt);
        },
        /** Helper to get a typed SimpleDbStore from a transaction. */
        t.It = function (t, e) {
          return t.store(e);
        }, // visible for testing

        /** Parse User Agent to determine iOS version. Returns -1 if not found. */
        t._t = function (t) {
          var e = t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),
              n = e ? e[1].split("_").slice(0, 2).join(".") : "-1";
          return Number(n);
        }, // visible for testing

        /** Parse User Agent to determine Android version. Returns -1 if not found. */
        t.Et = function (t) {
          var e = t.match(/Android ([\d.]+)/i),
              n = e ? e[1].split(".").slice(0, 2).join(".") : "-1";
          return Number(n);
        },
        /**
         * Opens the specified database, creating or upgrading it if necessary.
         */
        t.prototype.At = function (t) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var e,
                n = this;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
              switch (r.label) {
                case 0:
                  return this.db ? [3
                  /*break*/
                  , 2] : (C("SimpleDb", "Opening database:", this.name), e = this, [4
                  /*yield*/
                  , new Promise(function (e, r) {
                    // TODO(mikelehen): Investigate browser compatibility.
                    // https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB
                    // suggests IE9 and older WebKit browsers handle upgrade
                    // differently. They expect setVersion, as described here:
                    // https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeRequest/setVersion
                    var i = indexedDB.open(n.name, n.version);
                    i.onsuccess = function (t) {
                      var n = t.target.result;
                      e(n);
                    }, i.onblocked = function () {
                      r(new Sr(t, "Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."));
                    }, i.onerror = function (e) {
                      var n = e.target.error;
                      "VersionError" === n.name ? r(new D(N.FAILED_PRECONDITION, "A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")) : r(new Sr(t, n));
                    }, i.onupgradeneeded = function (t) {
                      C("SimpleDb", 'Database "' + n.name + '" requires upgrade from version:', t.oldVersion);
                      var e = t.target.result;
                      n.wt.Rt(e, i.transaction, t.oldVersion, n.version).next(function () {
                        C("SimpleDb", "Database upgrade to version " + n.version + " complete");
                      });
                    };
                  })]);

                case 1:
                  e.db = r.sent(), r.label = 2;

                case 2:
                  return [2
                  /*return*/
                  , (this.bt && (this.db.onversionchange = function (t) {
                    return n.bt(t);
                  }), this.db)];
              }
            });
          });
        }, t.prototype.vt = function (t) {
          this.bt = t, this.db && (this.db.onversionchange = function (e) {
            return t(e);
          });
        }, t.prototype.runTransaction = function (t, e, i, o) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var n, s, u, a, c;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (h) {
              switch (h.label) {
                case 0:
                  n = "readonly" === e, s = 0, u = function u() {
                    var e, u, c, h, f;
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                      switch (r.label) {
                        case 0:
                          ++s, r.label = 1;

                        case 1:
                          return r.trys.push([1, 4,, 5]), [4
                          /*yield*/
                          , a.At(t)];

                        case 2:
                          // Wait for the transaction to complete (i.e. IndexedDb's onsuccess event to
                          // fire), but still return the original transactionFnResult back to the
                          // caller.
                          return a.db = r.sent(), e = Tr.open(a.db, t, n ? "readonly" : "readwrite", i), u = o(e)["catch"](function (t) {
                            // Abort the transaction if there was an error.
                            return e.abort(t), Ir.reject(t);
                          }).toPromise(), c = {}, u["catch"](function () {}), [4
                          /*yield*/
                          , e.dt];

                        case 3:
                          return [2
                          /*return*/
                          , (c.value = ( // Wait for the transaction to complete (i.e. IndexedDb's onsuccess event to
                          // fire), but still return the original transactionFnResult back to the
                          // caller.
                          r.sent(), u), c)];

                        case 4:
                          return h = r.sent(), f = "FirebaseError" !== h.name && s < 3, C("SimpleDb", "Transaction failed with error:", h.message, "Retrying:", f), a.close(), f ? [3
                          /*break*/
                          , 5] : [2
                          /*return*/
                          , {
                            value: Promise.reject(h)
                          }];

                        case 5:
                          return [2
                          /*return*/
                          ];
                      }
                    });
                  }, a = this, h.label = 1;

                case 1:
                  return [5
                  /*yield**/
                  , u()];

                case 2:
                  if ("object" == typeof (c = h.sent())) return [2
                  /*return*/
                  , c.value];
                  h.label = 3;

                case 3:
                  return [3
                  /*break*/
                  , 1];

                case 4:
                  return [2
                  /*return*/
                  ];
              }
            });
          });
        }, t.prototype.close = function () {
          this.db && this.db.close(), this.db = void 0;
        }, t;
      }(),
          _r =
      /** @class */
      function () {
        function t(t) {
          this.Pt = t, this.Vt = !1, this.St = null;
        }

        return Object.defineProperty(t.prototype, "isDone", {
          get: function get() {
            return this.Vt;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "Dt", {
          get: function get() {
            return this.St;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "cursor", {
          set: function set(t) {
            this.Pt = t;
          },
          enumerable: !1,
          configurable: !0
        }),
        /**
         * This function can be called to stop iteration at any point.
         */
        t.prototype.done = function () {
          this.Vt = !0;
        },
        /**
         * This function can be called to skip to that next key, which could be
         * an index or a primary key.
         */
        t.prototype.Ct = function (t) {
          this.St = t;
        },
        /**
         * Delete the current cursor value from the object store.
         *
         * NOTE: You CANNOT do this with a keysOnly query.
         */
        t.prototype["delete"] = function () {
          return Ar(this.Pt["delete"]());
        }, t;
      }(),
          Sr =
      /** @class */
      function (e) {
        function n(t, n) {
          var r = this;
          return (r = e.call(this, N.UNAVAILABLE, "IndexedDB transaction '" + t + "' failed: " + n) || this).name = "IndexedDbTransactionError", r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n;
      }(D); // V2 is no longer usable (see comment at top of file)
      // Visible for testing

      /**
       * A base class representing a persistence transaction, encapsulating both the
       * transaction's sequence numbers as well as a list of onCommitted listeners.
       *
       * When you call Persistence.runTransaction(), it will create a transaction and
       * pass it to your callback. You then pass it to any method that operates
       * on persistence.
       */

      /** Verifies whether `e` is an IndexedDbTransactionError. */


      function Nr(t) {
        // Use name equality, as instanceof checks on errors don't work with errors
        // that wrap other errors.
        return "IndexedDbTransactionError" === t.name;
      }
      /**
       * A wrapper around an IDBObjectStore providing an API that:
       *
       * 1) Has generic KeyType / ValueType parameters to provide strongly-typed
       * methods for acting against the object store.
       * 2) Deals with IndexedDB's onsuccess / onerror event callbacks, making every
       * method return a PersistencePromise instead.
       * 3) Provides a higher-level API to avoid needing to do excessive wrapping of
       * intermediate IndexedDB types (IDBCursorWithValue, etc.)
       */


      var Dr =
      /** @class */
      function () {
        function t(t) {
          this.store = t;
        }

        return t.prototype.put = function (t, e) {
          var n;
          return void 0 !== e ? (C("SimpleDb", "PUT", this.store.name, t, e), n = this.store.put(e, t)) : (C("SimpleDb", "PUT", this.store.name, "<auto-key>", t), n = this.store.put(t)), Ar(n);
        },
        /**
         * Adds a new value into an Object Store and returns the new key. Similar to
         * IndexedDb's `add()`, this method will fail on primary key collisions.
         *
         * @param value - The object to write.
         * @returns The key of the value to add.
         */
        t.prototype.add = function (t) {
          return C("SimpleDb", "ADD", this.store.name, t, t), Ar(this.store.add(t));
        },
        /**
         * Gets the object with the specified key from the specified store, or null
         * if no object exists with the specified key.
         *
         * @key The key of the object to get.
         * @returns The object with the specified key or null if no object exists.
         */
        t.prototype.get = function (t) {
          var e = this; // We're doing an unsafe cast to ValueType.
          // eslint-disable-next-line @typescript-eslint/no-explicit-any

          return Ar(this.store.get(t)).next(function (n) {
            // Normalize nonexistence to null.
            return void 0 === n && (n = null), C("SimpleDb", "GET", e.store.name, t, n), n;
          });
        }, t.prototype["delete"] = function (t) {
          return C("SimpleDb", "DELETE", this.store.name, t), Ar(this.store["delete"](t));
        },
        /**
         * If we ever need more of the count variants, we can add overloads. For now,
         * all we need is to count everything in a store.
         *
         * Returns the number of rows in the store.
         */
        t.prototype.count = function () {
          return C("SimpleDb", "COUNT", this.store.name), Ar(this.store.count());
        }, t.prototype.Nt = function (t, e) {
          var n = this.cursor(this.options(t, e)),
              r = [];
          return this.xt(n, function (t, e) {
            r.push(e);
          }).next(function () {
            return r;
          });
        }, t.prototype.kt = function (t, e) {
          C("SimpleDb", "DELETE ALL", this.store.name);
          var n = this.options(t, e);
          n.Ft = !1;
          var r = this.cursor(n);
          return this.xt(r, function (t, e, n) {
            return n["delete"]();
          });
        }, t.prototype.$t = function (t, e) {
          var n;
          e ? n = t : (n = {}, e = t);
          var r = this.cursor(n);
          return this.xt(r, e);
        },
        /**
         * Iterates over a store, but waits for the given callback to complete for
         * each entry before iterating the next entry. This allows the callback to do
         * asynchronous work to determine if this iteration should continue.
         *
         * The provided callback should return `true` to continue iteration, and
         * `false` otherwise.
         */
        t.prototype.Ot = function (t) {
          var e = this.cursor({});
          return new Ir(function (n, r) {
            e.onerror = function (t) {
              var e = Cr(t.target.error);
              r(e);
            }, e.onsuccess = function (e) {
              var r = e.target.result;
              r ? t(r.primaryKey, r.value).next(function (t) {
                t ? r["continue"]() : n();
              }) : n();
            };
          });
        }, t.prototype.xt = function (t, e) {
          var n = [];
          return new Ir(function (r, i) {
            t.onerror = function (t) {
              i(t.target.error);
            }, t.onsuccess = function (t) {
              var i = t.target.result;

              if (i) {
                var o = new _r(i),
                    s = e(i.primaryKey, i.value, o);

                if (s instanceof Ir) {
                  var u = s["catch"](function (t) {
                    return o.done(), Ir.reject(t);
                  });
                  n.push(u);
                }

                o.isDone ? r() : null === o.Dt ? i["continue"]() : i["continue"](o.Dt);
              } else r();
            };
          }).next(function () {
            return Ir.waitFor(n);
          });
        }, t.prototype.options = function (t, e) {
          var n;
          return void 0 !== t && ("string" == typeof t ? n = t : e = t), {
            index: n,
            range: e
          };
        }, t.prototype.cursor = function (t) {
          var e = "next";

          if (t.reverse && (e = "prev"), t.index) {
            var n = this.store.index(t.index);
            return t.Ft ? n.openKeyCursor(t.range, e) : n.openCursor(t.range, e);
          }

          return this.store.openCursor(t.range, e);
        }, t;
      }();
      /**
       * Wraps an IDBRequest in a PersistencePromise, using the onsuccess / onerror
       * handlers to resolve / reject the PersistencePromise as appropriate.
       */


      function Ar(t) {
        return new Ir(function (e, n) {
          t.onsuccess = function (t) {
            var n = t.target.result;
            e(n);
          }, t.onerror = function (t) {
            var e = Cr(t.target.error);
            n(e);
          };
        });
      } // Guard so we only report the error once.


      var kr = !1;

      function Cr(t) {
        var e = Er._t(Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getUA"])());

        if (e >= 12.2 && e < 13) {
          var n = "An internal error was encountered in the Indexed Database server";

          if (t.message.indexOf(n) >= 0) {
            // Wrap error in a more descriptive one.
            var r = new D("internal", "IOS_INDEXEDDB_BUG1: IndexedDb has thrown '" + n + "'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.");
            return kr || (kr = !0, // Throw a global exception outside of this promise chain, for the user to
            // potentially catch.
            setTimeout(function () {
              throw r;
            }, 0)), r;
          }
        }

        return t;
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var xr =
      /** @class */
      function (e) {
        function n(t, n) {
          var r = this;
          return (r = e.call(this) || this).Mt = t, r.currentSequenceNumber = n, r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n;
      }(wr);

      function Rr(t, e) {
        var n = F(t);
        return Er.It(n.Mt, e);
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * A batch of mutations that will be sent as one unit to the backend.
       */


      var Lr =
      /** @class */
      function () {
        /**
         * @param batchId - The unique ID of this mutation batch.
         * @param localWriteTime - The original write time of this mutation.
         * @param baseMutations - Mutations that are used to populate the base
         * values when this mutation is applied locally. This can be used to locally
         * overwrite values that are persisted in the remote document cache. Base
         * mutations are never sent to the backend.
         * @param mutations - The user-provided mutations in this mutation batch.
         * User-provided mutations are applied both locally and remotely on the
         * backend.
         */
        function t(t, e, n, r) {
          this.batchId = t, this.localWriteTime = e, this.baseMutations = n, this.mutations = r
          /**
          * Applies all the mutations in this MutationBatch to the specified document
          * to compute the state of the remote document
          *
          * @param document - The document to apply mutations to.
          * @param batchResult - The result of applying the MutationBatch to the
          * backend.
          */
          ;
        }

        return t.prototype.applyToRemoteDocument = function (t, e) {
          for (var n = e.mutationResults, r = 0; r < this.mutations.length; r++) {
            var i = this.mutations[r];
            i.key.isEqual(t.key) && Ce(i, t, n[r]);
          }
        },
        /**
         * Computes the local view of a document given all the mutations in this
         * batch.
         *
         * @param document - The document to apply mutations to.
         */
        t.prototype.applyToLocalView = function (t) {
          // First, apply the base state. This allows us to apply non-idempotent
          // transform against a consistent set of values.
          for (var e = 0, n = this.baseMutations; e < n.length; e++) {
            (o = n[e]).key.isEqual(t.key) && xe(o, t, this.localWriteTime);
          } // Second, apply all user-provided mutations.


          for (var r = 0, i = this.mutations; r < i.length; r++) {
            var o;
            (o = i[r]).key.isEqual(t.key) && xe(o, t, this.localWriteTime);
          }
        },
        /**
         * Computes the local view for all provided documents given the mutations in
         * this batch.
         */
        t.prototype.applyToLocalDocumentSet = function (t) {
          var e = this; // TODO(mrschmidt): This implementation is O(n^2). If we apply the mutations
          // directly (as done in `applyToLocalView()`), we can reduce the complexity
          // to O(n).

          this.mutations.forEach(function (n) {
            var r = t.get(n.key),
                i = r; // TODO(mutabledocuments): This method should take a MutableDocumentMap
            // and we should remove this cast.

            e.applyToLocalView(i), r.isValidDocument() || i.convertToNoDocument(K.min());
          });
        }, t.prototype.keys = function () {
          return this.mutations.reduce(function (t, e) {
            return t.add(e.key);
          }, sn());
        }, t.prototype.isEqual = function (t) {
          return this.batchId === t.batchId && U(this.mutations, t.mutations, function (t, e) {
            return Le(t, e);
          }) && U(this.baseMutations, t.baseMutations, function (t, e) {
            return Le(t, e);
          });
        }, t;
      }(),
          Or =
      /** @class */
      function () {
        function t(t, e, n,
        /**
         * A pre-computed mapping from each mutated document to the resulting
         * version.
         */
        r) {
          this.batch = t, this.commitVersion = e, this.mutationResults = n, this.docVersions = r
          /**
          * Creates a new MutationBatchResult for the given batch and results. There
          * must be one result for each mutation in the batch. This static factory
          * caches a document=&gt;version mapping (docVersions).
          */
          ;
        }

        return t.from = function (e, n, r) {
          P(e.mutations.length === r.length);

          for (var i = rn(), o = e.mutations, s = 0; s < o.length; s++) {
            i = i.insert(o[s].key, r[s].version);
          }

          return new t(e, n, r, i);
        }, t;
      }(),
          Pr =
      /** @class */
      function () {
        function t(
        /** The target being listened to. */
        t,
        /**
         * The target ID to which the target corresponds; Assigned by the
         * LocalStore for user listens and by the SyncEngine for limbo watches.
         */
        e,
        /** The purpose of the target. */
        n,
        /**
         * The sequence number of the last transaction during which this target data
         * was modified.
         */
        r,
        /** The latest snapshot version seen for this target. */
        i
        /**
         * The maximum snapshot version at which the associated view
         * contained no limbo documents.
         */
        , o
        /**
         * An opaque, server-assigned token that allows watching a target to be
         * resumed after disconnecting without retransmitting all the data that
         * matches the target. The resume token essentially identifies a point in
         * time from which the server should resume sending results.
         */
        , s) {
          void 0 === i && (i = K.min()), void 0 === o && (o = K.min()), void 0 === s && (s = J.EMPTY_BYTE_STRING), this.target = t, this.targetId = e, this.purpose = n, this.sequenceNumber = r, this.snapshotVersion = i, this.lastLimboFreeSnapshotVersion = o, this.resumeToken = s;
        }
        /** Creates a new target data instance with an updated sequence number. */


        return t.prototype.withSequenceNumber = function (e) {
          return new t(this.target, this.targetId, this.purpose, e, this.snapshotVersion, this.lastLimboFreeSnapshotVersion, this.resumeToken);
        },
        /**
         * Creates a new target data instance with an updated resume token and
         * snapshot version.
         */
        t.prototype.withResumeToken = function (e, n) {
          return new t(this.target, this.targetId, this.purpose, this.sequenceNumber, n, this.lastLimboFreeSnapshotVersion, e);
        },
        /**
         * Creates a new target data instance with an updated last limbo free
         * snapshot version number.
         */
        t.prototype.withLastLimboFreeSnapshotVersion = function (e) {
          return new t(this.target, this.targetId, this.purpose, this.sequenceNumber, this.snapshotVersion, e, this.resumeToken);
        }, t;
      }(),
          Fr = function Fr(t) {
        this.Lt = t;
      };
      /** The result of applying a mutation batch to the backend. */

      /** Decodes a remote document from storage locally to a Document. */


      function Mr(t, e) {
        if (e.document) return On(t.Lt, e.document, !!e.hasCommittedMutations);

        if (e.noDocument) {
          var n = ct.fromSegments(e.noDocument.path),
              r = jr(e.noDocument.readTime),
              i = Nt.newNoDocument(n, r);
          return e.hasCommittedMutations ? i.setHasCommittedMutations() : i;
        }

        if (e.unknownDocument) {
          var o = ct.fromSegments(e.unknownDocument.path);
          r = jr(e.unknownDocument.version);
          return Nt.newUnknownDocument(o, r);
        }

        return O();
      }
      /** Encodes a document for storage locally. */


      function Vr(t, e, n) {
        var r = qr(n),
            i = e.key.path.popLast().toArray();

        if (e.isFoundDocument()) {
          var o = function (t, e) {
            return {
              name: Dn(t, e.key),
              fields: e.data.value.mapValue.fields,
              updateTime: In(t, e.version.toTimestamp())
            };
          }(t.Lt, e),
              s = e.hasCommittedMutations;

          return new ar(
          /* unknownDocument= */
          null,
          /* noDocument= */
          null, o, s, r, i);
        }

        if (e.isNoDocument()) {
          var u = e.key.path.toArray(),
              a = Br(e.version);
          s = e.hasCommittedMutations;
          return new ar(
          /* unknownDocument= */
          null, new sr(u, a),
          /* document= */
          null, s, r, i);
        }

        if (e.isUnknownDocument()) {
          var c = e.key.path.toArray(),
              h = Br(e.version);
          return new ar(new ur(c, h),
          /* noDocument= */
          null,
          /* document= */
          null,
          /* hasCommittedMutations= */
          !0, r, i);
        }

        return O();
      }

      function qr(t) {
        var e = t.toTimestamp();
        return [e.seconds, e.nanoseconds];
      }

      function Ur(t) {
        var e = new j(t[0], t[1]);
        return K.fromTimestamp(e);
      }

      function Br(t) {
        var e = t.toTimestamp();
        return new er(e.seconds, e.nanoseconds);
      }

      function jr(t) {
        var e = new j(t.seconds, t.nanoseconds);
        return K.fromTimestamp(e);
      }
      /** Encodes a batch of mutations into a DbMutationBatch for local storage. */

      /** Decodes a DbMutationBatch into a MutationBatch */


      function Kr(t, e) {
        // Squash old transform mutations into existing patch or set mutations.
        // The replacement of representing `transforms` with `update_transforms`
        // on the SDK means that old `transform` mutations stored in IndexedDB need
        // to be updated to `update_transforms`.
        // TODO(b/174608374): Remove this code once we perform a schema migration.
        for (var n = (e.baseMutations || []).map(function (e) {
          return Fn(t.Lt, e);
        }), r = 0; r < e.mutations.length - 1; ++r) {
          var i = e.mutations[r];

          if (r + 1 < e.mutations.length && void 0 !== e.mutations[r + 1].transform) {
            var o = e.mutations[r + 1];
            i.updateTransforms = o.transform.fieldTransforms, e.mutations.splice(r + 1, 1), ++r;
          }
        }

        var s = e.mutations.map(function (e) {
          return Fn(t.Lt, e);
        }),
            u = j.fromMillis(e.localWriteTimeMs);
        return new Lr(e.batchId, u, n, s);
      }
      /** Decodes a DbTarget into TargetData */


      function Qr(t) {
        var e,
            n,
            r = jr(t.readTime),
            i = void 0 !== t.lastLimboFreeSnapshotVersion ? jr(t.lastLimboFreeSnapshotVersion) : K.min();
        return void 0 !== t.query.documents ? (P(1 === (n = t.query).documents.length), e = ne(Yt(Cn(n.documents[0])))) : e = function (t) {
          return ne(qn(t));
        }(t.query), new Pr(e, t.targetId, 0
        /* Listen */
        , t.lastListenSequenceNumber, r, i, J.fromBase64String(t.resumeToken))
        /** Encodes TargetData into a DbTarget for storage locally. */
        ;
      }

      function Gr(t, e) {
        var n,
            r = Br(e.snapshotVersion),
            i = Br(e.lastLimboFreeSnapshotVersion);
        n = xt(e.target) ? Mn(t.Lt, e.target) : Vn(t.Lt, e.target); // We can't store the resumeToken as a ByteString in IndexedDb, so we
        // convert it to a base64 string for storage.

        var o = e.resumeToken.toBase64(); // lastListenSequenceNumber is always 0 until we do real GC.

        return new hr(e.targetId, kt(e.target), r, o, e.sequenceNumber, i, n);
      }
      /**
       * A helper function for figuring out what kind of query has been stored.
       */

      /**
       * Encodes a `BundledQuery` from bundle proto to a Query object.
       *
       * This reconstructs the original query used to build the bundle being loaded,
       * including features exists only in SDKs (for example: limit-to-last).
       */


      function zr(t) {
        var e = qn({
          parent: t.parent,
          structuredQuery: t.structuredQuery
        });
        return "LAST" === t.limitType ? re(e, e.limit, "L"
        /* Last */
        ) : e;
      }
      /** Encodes a NamedQuery proto object to a NamedQuery model object. */

      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var Wr =
      /** @class */
      function () {
        function t() {}

        return t.prototype.getBundleMetadata = function (t, e) {
          return Hr(t).get(e).next(function (t) {
            if (t) return {
              id: (e = t).bundleId,
              createTime: jr(e.createTime),
              version: e.version
            };
            /** Encodes a DbBundle to a BundleMetadata object. */

            var e;
            /** Encodes a BundleMetadata to a DbBundle. */
          });
        }, t.prototype.saveBundleMetadata = function (t, e) {
          return Hr(t).put({
            bundleId: (n = e).id,
            createTime: Br(_n(n.createTime)),
            version: n.version
          });
          var n;
          /** Encodes a DbNamedQuery to a NamedQuery. */
        }, t.prototype.getNamedQuery = function (t, e) {
          return Yr(t).get(e).next(function (t) {
            if (t) return {
              name: (e = t).name,
              query: zr(e.bundledQuery),
              readTime: jr(e.readTime)
            };
            var e;
            /** Encodes a NamedQuery from a bundle proto to a DbNamedQuery. */
          });
        }, t.prototype.saveNamedQuery = function (t, e) {
          return Yr(t).put(function (t) {
            return {
              name: t.name,
              readTime: Br(_n(t.readTime)),
              bundledQuery: t.bundledQuery
            };
          }(e));
        }, t;
      }();
      /**
       * Helper to get a typed SimpleDbStore for the bundles object store.
       */


      function Hr(t) {
        return Rr(t, yr.store);
      }
      /**
       * Helper to get a typed SimpleDbStore for the namedQueries object store.
       */


      function Yr(t) {
        return Rr(t, vr.store);
      }
      /**
       * @license
       * Copyright 2019 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * An in-memory implementation of IndexManager.
       */


      var $r =
      /** @class */
      function () {
        function t() {
          this.Bt = new Xr();
        }

        return t.prototype.addToCollectionParentIndex = function (t, e) {
          return this.Bt.add(e), Ir.resolve();
        }, t.prototype.getCollectionParents = function (t, e) {
          return Ir.resolve(this.Bt.getEntries(e));
        }, t;
      }(),
          Xr =
      /** @class */
      function () {
        function t() {
          this.index = {};
        } // Returns false if the entry already existed.


        return t.prototype.add = function (t) {
          var e = t.lastSegment(),
              n = t.popLast(),
              r = this.index[e] || new $e(H.comparator),
              i = !r.has(n);
          return this.index[e] = r.add(n), i;
        }, t.prototype.has = function (t) {
          var e = t.lastSegment(),
              n = t.popLast(),
              r = this.index[e];
          return r && r.has(n);
        }, t.prototype.getEntries = function (t) {
          return (this.index[t] || new $e(H.comparator)).toArray();
        }, t;
      }(),
          Jr =
      /** @class */
      function () {
        function t() {
          /**
           * An in-memory copy of the index entries we've already written since the SDK
           * launched. Used to avoid re-writing the same entry repeatedly.
           *
           * This is *NOT* a complete cache of what's in persistence and so can never be used to
           * satisfy reads.
           */
          this.qt = new Xr();
        }
        /**
         * Adds a new entry to the collection parent index.
         *
         * Repeated calls for the same collectionPath should be avoided within a
         * transaction as IndexedDbIndexManager only caches writes once a transaction
         * has been committed.
         */


        return t.prototype.addToCollectionParentIndex = function (t, e) {
          var n = this;

          if (!this.qt.has(e)) {
            var r = e.lastSegment(),
                i = e.popLast();
            t.addOnCommittedListener(function () {
              // Add the collection to the in memory cache only if the transaction was
              // successfully committed.
              n.qt.add(e);
            });
            var o = {
              collectionId: r,
              parent: Xn(i)
            };
            return Zr(t).put(o);
          }

          return Ir.resolve();
        }, t.prototype.getCollectionParents = function (t, e) {
          var n = [],
              r = IDBKeyRange.bound([e, ""], [B(e), ""],
          /*lowerOpen=*/
          !1,
          /*upperOpen=*/
          !0);
          return Zr(t).Nt(r).next(function (t) {
            for (var r = 0, i = t; r < i.length; r++) {
              var o = i[r]; // This collectionId guard shouldn't be necessary (and isn't as long
              // as we're running in a real browser), but there's a bug in
              // indexeddbshim that breaks our range in our tests running in node:
              // https://github.com/axemclion/IndexedDBShim/issues/334

              if (o.collectionId !== e) break;
              n.push(tr(o.parent));
            }

            return n;
          });
        }, t;
      }();
      /**
       * Internal implementation of the collection-parent index exposed by MemoryIndexManager.
       * Also used for in-memory caching by IndexedDbIndexManager and initial index population
       * in indexeddb_schema.ts
       */

      /**
       * Helper to get a typed SimpleDbStore for the collectionParents
       * document store.
       */


      function Zr(t) {
        return Rr(t, dr.store);
      }
      /**
       * @license
       * Copyright 2018 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var ti = {
        didRun: !1,
        sequenceNumbersCollected: 0,
        targetsRemoved: 0,
        documentsRemoved: 0
      },
          ei =
      /** @class */
      function () {
        function t( // When we attempt to collect, we will only do so if the cache size is greater than this
        // threshold. Passing `COLLECTION_DISABLED` here will cause collection to always be skipped.
        t, // The percentage of sequence numbers that we will attempt to collect
        e, // A cap on the total number of sequence numbers that will be collected. This prevents
        // us from collecting a huge number of sequence numbers if the cache has grown very large.
        n) {
          this.cacheSizeCollectionThreshold = t, this.percentileToCollect = e, this.maximumSequenceNumbersToCollect = n;
        }

        return t.withCacheSize = function (e) {
          return new t(e, t.DEFAULT_COLLECTION_PERCENTILE, t.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT);
        }, t;
      }();
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Delete a mutation batch and the associated document mutations.
       * @returns A PersistencePromise of the document mutations that were removed.
       */


      function ni(t, e, n) {
        var r = t.store(ir.store),
            i = t.store(or.store),
            o = [],
            s = IDBKeyRange.only(n.batchId),
            u = 0,
            a = r.$t({
          range: s
        }, function (t, e, n) {
          return u++, n["delete"]();
        });
        o.push(a.next(function () {
          P(1 === u);
        }));

        for (var c = [], h = 0, f = n.mutations; h < f.length; h++) {
          var l = f[h],
              d = or.key(e, l.key.path, n.batchId);
          o.push(i["delete"](d)), c.push(l.key);
        }

        return Ir.waitFor(o).next(function () {
          return c;
        });
      }
      /**
       * Returns an approximate size for the given document.
       */


      function ri(t) {
        if (!t) return 0;
        var e;
        if (t.document) e = t.document;else if (t.unknownDocument) e = t.unknownDocument;else {
          if (!t.noDocument) throw O();
          e = t.noDocument;
        }
        return JSON.stringify(e).length;
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /** A mutation queue for a specific user, backed by IndexedDB. */


      ei.DEFAULT_COLLECTION_PERCENTILE = 10, ei.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT = 1e3, ei.DEFAULT = new ei(41943040, ei.DEFAULT_COLLECTION_PERCENTILE, ei.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT), ei.DISABLED = new ei(-1, 0, 0);

      var ii =
      /** @class */
      function () {
        function t(
        /**
         * The normalized userId (e.g. null UID => "" userId) used to store /
         * retrieve mutations.
         */
        t, e, n, r) {
          this.userId = t, this.R = e, this.Ut = n, this.referenceDelegate = r,
          /**
               * Caches the document keys for pending mutation batches. If the mutation
               * has been removed from IndexedDb, the cached value may continue to
               * be used to retrieve the batch's document keys. To remove a cached value
               * locally, `removeCachedMutationKeys()` should be invoked either directly
               * or through `removeMutationBatches()`.
               *
               * With multi-tab, when the primary client acknowledges or rejects a mutation,
               * this cache is used by secondary clients to invalidate the local
               * view of the documents that were previously affected by the mutation.
               */
          // PORTING NOTE: Multi-tab only.
          this.Kt = {}
          /**
          * Creates a new mutation queue for the given user.
          * @param user - The user for which to create a mutation queue.
          * @param serializer - The serializer to use when persisting to IndexedDb.
          */
          ;
        }

        return t.Qt = function (e, n, r, i) {
          // TODO(mcg): Figure out what constraints there are on userIDs
          // In particular, are there any reserved characters? are empty ids allowed?
          // For the moment store these together in the same mutations table assuming
          // that empty userIDs aren't allowed.
          return P("" !== e.uid), new t(e.isAuthenticated() ? e.uid : "", n, r, i);
        }, t.prototype.checkEmpty = function (t) {
          var e = !0,
              n = IDBKeyRange.bound([this.userId, Number.NEGATIVE_INFINITY], [this.userId, Number.POSITIVE_INFINITY]);
          return si(t).$t({
            index: ir.userMutationsIndex,
            range: n
          }, function (t, n, r) {
            e = !1, r.done();
          }).next(function () {
            return e;
          });
        }, t.prototype.addMutationBatch = function (t, e, n, r) {
          var i = this,
              o = ui(t),
              s = si(t); // The IndexedDb implementation in Chrome (and Firefox) does not handle
          // compound indices that include auto-generated keys correctly. To ensure
          // that the index entry is added correctly in all browsers, we perform two
          // writes: The first write is used to retrieve the next auto-generated Batch
          // ID, and the second write populates the index and stores the actual
          // mutation batch.
          // See: https://bugs.chromium.org/p/chromium/issues/detail?id=701972
          // We write an empty object to obtain key
          // eslint-disable-next-line @typescript-eslint/no-explicit-any

          return s.add({}).next(function (u) {
            P("number" == typeof u);

            for (var a = new Lr(u, e, n, r), c = function (t, e, n) {
              var r = n.baseMutations.map(function (e) {
                return Pn(t.Lt, e);
              }),
                  i = n.mutations.map(function (e) {
                return Pn(t.Lt, e);
              });
              return new ir(e, n.batchId, n.localWriteTime.toMillis(), r, i);
            }(i.R, i.userId, a), h = [], f = new $e(function (t, e) {
              return q(t.canonicalString(), e.canonicalString());
            }), l = 0, d = r; l < d.length; l++) {
              var p = d[l],
                  y = or.key(i.userId, p.key.path, u);
              f = f.add(p.key.path.popLast()), h.push(s.put(c)), h.push(o.put(y, or.PLACEHOLDER));
            }

            return f.forEach(function (e) {
              h.push(i.Ut.addToCollectionParentIndex(t, e));
            }), t.addOnCommittedListener(function () {
              i.Kt[u] = a.keys();
            }), Ir.waitFor(h).next(function () {
              return a;
            });
          });
        }, t.prototype.lookupMutationBatch = function (t, e) {
          var n = this;
          return si(t).get(e).next(function (t) {
            return t ? (P(t.userId === n.userId), Kr(n.R, t)) : null;
          });
        },
        /**
         * Returns the document keys for the mutation batch with the given batchId.
         * For primary clients, this method returns `null` after
         * `removeMutationBatches()` has been called. Secondary clients return a
         * cached result until `removeCachedMutationKeys()` is invoked.
         */
        // PORTING NOTE: Multi-tab only.
        t.prototype.jt = function (t, e) {
          var n = this;
          return this.Kt[e] ? Ir.resolve(this.Kt[e]) : this.lookupMutationBatch(t, e).next(function (t) {
            if (t) {
              var r = t.keys();
              return n.Kt[e] = r, r;
            }

            return null;
          });
        }, t.prototype.getNextMutationBatchAfterBatchId = function (t, e) {
          var n = this,
              r = e + 1,
              i = IDBKeyRange.lowerBound([this.userId, r]),
              o = null;
          return si(t).$t({
            index: ir.userMutationsIndex,
            range: i
          }, function (t, e, i) {
            e.userId === n.userId && (P(e.batchId >= r), o = Kr(n.R, e)), i.done();
          }).next(function () {
            return o;
          });
        }, t.prototype.getHighestUnacknowledgedBatchId = function (t) {
          var e = IDBKeyRange.upperBound([this.userId, Number.POSITIVE_INFINITY]),
              n = -1;
          return si(t).$t({
            index: ir.userMutationsIndex,
            range: e,
            reverse: !0
          }, function (t, e, r) {
            n = e.batchId, r.done();
          }).next(function () {
            return n;
          });
        }, t.prototype.getAllMutationBatches = function (t) {
          var e = this,
              n = IDBKeyRange.bound([this.userId, -1], [this.userId, Number.POSITIVE_INFINITY]);
          return si(t).Nt(ir.userMutationsIndex, n).next(function (t) {
            return t.map(function (t) {
              return Kr(e.R, t);
            });
          });
        }, t.prototype.getAllMutationBatchesAffectingDocumentKey = function (t, e) {
          var n = this,
              r = or.prefixForPath(this.userId, e.path),
              i = IDBKeyRange.lowerBound(r),
              o = []; // Scan the document-mutation index starting with a prefix starting with
          // the given documentKey.

          return ui(t).$t({
            range: i
          }, function (r, i, s) {
            var u = r[0],
                a = r[1],
                c = r[2],
                h = tr(a); // Only consider rows matching exactly the specific key of
            // interest. Note that because we order by path first, and we
            // order terminators before path separators, we'll encounter all
            // the index rows for documentKey contiguously. In particular, all
            // the rows for documentKey will occur before any rows for
            // documents nested in a subcollection beneath documentKey so we
            // can stop as soon as we hit any such row.

            if (u === n.userId && e.path.isEqual(h)) // Look up the mutation batch in the store.
              return si(t).get(c).next(function (t) {
                if (!t) throw O();
                P(t.userId === n.userId), o.push(Kr(n.R, t));
              });
            s.done();
          }).next(function () {
            return o;
          });
        }, t.prototype.getAllMutationBatchesAffectingDocumentKeys = function (t, e) {
          var n = this,
              r = new $e(q),
              i = [];
          return e.forEach(function (e) {
            var o = or.prefixForPath(n.userId, e.path),
                s = IDBKeyRange.lowerBound(o),
                u = ui(t).$t({
              range: s
            }, function (t, i, o) {
              var s = t[0],
                  u = t[1],
                  a = t[2],
                  c = tr(u); // Only consider rows matching exactly the specific key of
              // interest. Note that because we order by path first, and we
              // order terminators before path separators, we'll encounter all
              // the index rows for documentKey contiguously. In particular, all
              // the rows for documentKey will occur before any rows for
              // documents nested in a subcollection beneath documentKey so we
              // can stop as soon as we hit any such row.

              s === n.userId && e.path.isEqual(c) ? r = r.add(a) : o.done();
            });
            i.push(u);
          }), Ir.waitFor(i).next(function () {
            return n.Wt(t, r);
          });
        }, t.prototype.getAllMutationBatchesAffectingQuery = function (t, e) {
          var n = this,
              r = e.path,
              i = r.length + 1,
              o = or.prefixForPath(this.userId, r),
              s = IDBKeyRange.lowerBound(o),
              u = new $e(q);
          return ui(t).$t({
            range: s
          }, function (t, e, o) {
            var s = t[0],
                a = t[1],
                c = t[2],
                h = tr(a);
            s === n.userId && r.isPrefixOf(h) ? // Rows with document keys more than one segment longer than the
            // query path can't be matches. For example, a query on 'rooms'
            // can't match the document /rooms/abc/messages/xyx.
            // TODO(mcg): we'll need a different scanner when we implement
            // ancestor queries.
            h.length === i && (u = u.add(c)) : o.done();
          }).next(function () {
            return n.Wt(t, u);
          });
        }, t.prototype.Wt = function (t, e) {
          var n = this,
              r = [],
              i = []; // TODO(rockwood): Implement this using iterate.

          return e.forEach(function (e) {
            i.push(si(t).get(e).next(function (t) {
              if (null === t) throw O();
              P(t.userId === n.userId), r.push(Kr(n.R, t));
            }));
          }), Ir.waitFor(i).next(function () {
            return r;
          });
        }, t.prototype.removeMutationBatch = function (t, e) {
          var n = this;
          return ni(t.Mt, this.userId, e).next(function (r) {
            return t.addOnCommittedListener(function () {
              n.Gt(e.batchId);
            }), Ir.forEach(r, function (e) {
              return n.referenceDelegate.markPotentiallyOrphaned(t, e);
            });
          });
        },
        /**
         * Clears the cached keys for a mutation batch. This method should be
         * called by secondary clients after they process mutation updates.
         *
         * Note that this method does not have to be called from primary clients as
         * the corresponding cache entries are cleared when an acknowledged or
         * rejected batch is removed from the mutation queue.
         */
        // PORTING NOTE: Multi-tab only
        t.prototype.Gt = function (t) {
          delete this.Kt[t];
        }, t.prototype.performConsistencyCheck = function (t) {
          var e = this;
          return this.checkEmpty(t).next(function (n) {
            if (!n) return Ir.resolve(); // Verify that there are no entries in the documentMutations index if
            // the queue is empty.

            var r = IDBKeyRange.lowerBound(or.prefixForUser(e.userId)),
                i = [];
            return ui(t).$t({
              range: r
            }, function (t, n, r) {
              if (t[0] === e.userId) {
                var o = tr(t[1]);
                i.push(o);
              } else r.done();
            }).next(function () {
              P(0 === i.length);
            });
          });
        }, t.prototype.containsKey = function (t, e) {
          return oi(t, this.userId, e);
        }, // PORTING NOTE: Multi-tab only (state is held in memory in other clients).

        /** Returns the mutation queue's metadata from IndexedDb. */
        t.prototype.zt = function (t) {
          var e = this;
          return ai(t).get(this.userId).next(function (t) {
            return t || new rr(e.userId, -1,
            /*lastStreamToken=*/
            "");
          });
        }, t;
      }();
      /**
       * @returns true if the mutation queue for the given user contains a pending
       *         mutation for the given key.
       */


      function oi(t, e, n) {
        var r = or.prefixForPath(e, n.path),
            i = r[1],
            o = IDBKeyRange.lowerBound(r),
            s = !1;
        return ui(t).$t({
          range: o,
          Ft: !0
        }, function (t, n, r) {
          var o = t[0],
              u = t[1];
          /*batchID*/

          t[2], o === e && u === i && (s = !0), r.done();
        }).next(function () {
          return s;
        });
      }
      /** Returns true if any mutation queue contains the given document. */

      /**
       * Helper to get a typed SimpleDbStore for the mutations object store.
       */


      function si(t) {
        return Rr(t, ir.store);
      }
      /**
       * Helper to get a typed SimpleDbStore for the mutationQueues object store.
       */


      function ui(t) {
        return Rr(t, or.store);
      }
      /**
       * Helper to get a typed SimpleDbStore for the mutationQueues object store.
       */


      function ai(t) {
        return Rr(t, rr.store);
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /** Offset to ensure non-overlapping target ids. */

      /**
       * Generates monotonically increasing target IDs for sending targets to the
       * watch stream.
       *
       * The client constructs two generators, one for the target cache, and one for
       * for the sync engine (to generate limbo documents targets). These
       * generators produce non-overlapping IDs (by using even and odd IDs
       * respectively).
       *
       * By separating the target ID space, the query cache can generate target IDs
       * that persist across client restarts, while sync engine can independently
       * generate in-memory target IDs that are transient and can be reused after a
       * restart.
       */


      var ci =
      /** @class */
      function () {
        function t(t) {
          this.Ht = t;
        }

        return t.prototype.next = function () {
          return this.Ht += 2, this.Ht;
        }, t.Jt = function () {
          // The target cache generator must return '2' in its first call to `next()`
          // as there is no differentiation in the protocol layer between an unset
          // number and the number '0'. If we were to sent a target with target ID
          // '0', the backend would consider it unset and replace it with its own ID.
          return new t(0);
        }, t.Yt = function () {
          // Sync engine assigns target IDs for limbo document detection.
          return new t(-1);
        }, t;
      }(),
          hi =
      /** @class */
      function () {
        function t(t, e) {
          this.referenceDelegate = t, this.R = e;
        } // PORTING NOTE: We don't cache global metadata for the target cache, since
        // some of it (in particular `highestTargetId`) can be modified by secondary
        // tabs. We could perhaps be more granular (and e.g. still cache
        // `lastRemoteSnapshotVersion` in memory) but for simplicity we currently go
        // to IndexedDb whenever we need to read metadata. We can revisit if it turns
        // out to have a meaningful performance impact.


        return t.prototype.allocateTargetId = function (t) {
          var e = this;
          return this.Xt(t).next(function (n) {
            var r = new ci(n.highestTargetId);
            return n.highestTargetId = r.next(), e.Zt(t, n).next(function () {
              return n.highestTargetId;
            });
          });
        }, t.prototype.getLastRemoteSnapshotVersion = function (t) {
          return this.Xt(t).next(function (t) {
            return K.fromTimestamp(new j(t.lastRemoteSnapshotVersion.seconds, t.lastRemoteSnapshotVersion.nanoseconds));
          });
        }, t.prototype.getHighestSequenceNumber = function (t) {
          return this.Xt(t).next(function (t) {
            return t.highestListenSequenceNumber;
          });
        }, t.prototype.setTargetsMetadata = function (t, e, n) {
          var r = this;
          return this.Xt(t).next(function (i) {
            return i.highestListenSequenceNumber = e, n && (i.lastRemoteSnapshotVersion = n.toTimestamp()), e > i.highestListenSequenceNumber && (i.highestListenSequenceNumber = e), r.Zt(t, i);
          });
        }, t.prototype.addTargetData = function (t, e) {
          var n = this;
          return this.te(t, e).next(function () {
            return n.Xt(t).next(function (r) {
              return r.targetCount += 1, n.ee(e, r), n.Zt(t, r);
            });
          });
        }, t.prototype.updateTargetData = function (t, e) {
          return this.te(t, e);
        }, t.prototype.removeTargetData = function (t, e) {
          var n = this;
          return this.removeMatchingKeysForTargetId(t, e.targetId).next(function () {
            return fi(t)["delete"](e.targetId);
          }).next(function () {
            return n.Xt(t);
          }).next(function (e) {
            return P(e.targetCount > 0), e.targetCount -= 1, n.Zt(t, e);
          });
        },
        /**
         * Drops any targets with sequence number less than or equal to the upper bound, excepting those
         * present in `activeTargetIds`. Document associations for the removed targets are also removed.
         * Returns the number of targets removed.
         */
        t.prototype.removeTargets = function (t, e, n) {
          var r = this,
              i = 0,
              o = [];
          return fi(t).$t(function (s, u) {
            var a = Qr(u);
            a.sequenceNumber <= e && null === n.get(a.targetId) && (i++, o.push(r.removeTargetData(t, a)));
          }).next(function () {
            return Ir.waitFor(o);
          }).next(function () {
            return i;
          });
        },
        /**
         * Call provided function with each `TargetData` that we have cached.
         */
        t.prototype.forEachTarget = function (t, e) {
          return fi(t).$t(function (t, n) {
            var r = Qr(n);
            e(r);
          });
        }, t.prototype.Xt = function (t) {
          return li(t).get(lr.key).next(function (t) {
            return P(null !== t), t;
          });
        }, t.prototype.Zt = function (t, e) {
          return li(t).put(lr.key, e);
        }, t.prototype.te = function (t, e) {
          return fi(t).put(Gr(this.R, e));
        },
        /**
         * In-place updates the provided metadata to account for values in the given
         * TargetData. Saving is done separately. Returns true if there were any
         * changes to the metadata.
         */
        t.prototype.ee = function (t, e) {
          var n = !1;
          return t.targetId > e.highestTargetId && (e.highestTargetId = t.targetId, n = !0), t.sequenceNumber > e.highestListenSequenceNumber && (e.highestListenSequenceNumber = t.sequenceNumber, n = !0), n;
        }, t.prototype.getTargetCount = function (t) {
          return this.Xt(t).next(function (t) {
            return t.targetCount;
          });
        }, t.prototype.getTargetData = function (t, e) {
          // Iterating by the canonicalId may yield more than one result because
          // canonicalId values are not required to be unique per target. This query
          // depends on the queryTargets index to be efficient.
          var n = kt(e),
              r = IDBKeyRange.bound([n, Number.NEGATIVE_INFINITY], [n, Number.POSITIVE_INFINITY]),
              i = null;
          return fi(t).$t({
            range: r,
            index: hr.queryTargetsIndexName
          }, function (t, n, r) {
            var o = Qr(n); // After finding a potential match, check that the target is
            // actually equal to the requested target.

            Ct(e, o.target) && (i = o, r.done());
          }).next(function () {
            return i;
          });
        }, t.prototype.addMatchingKeys = function (t, e, n) {
          var r = this,
              i = [],
              o = di(t); // PORTING NOTE: The reverse index (documentsTargets) is maintained by
          // IndexedDb.

          return e.forEach(function (e) {
            var s = Xn(e.path);
            i.push(o.put(new fr(n, s))), i.push(r.referenceDelegate.addReference(t, n, e));
          }), Ir.waitFor(i);
        }, t.prototype.removeMatchingKeys = function (t, e, n) {
          var r = this,
              i = di(t); // PORTING NOTE: The reverse index (documentsTargets) is maintained by
          // IndexedDb.

          return Ir.forEach(e, function (e) {
            var o = Xn(e.path);
            return Ir.waitFor([i["delete"]([n, o]), r.referenceDelegate.removeReference(t, n, e)]);
          });
        }, t.prototype.removeMatchingKeysForTargetId = function (t, e) {
          var n = di(t),
              r = IDBKeyRange.bound([e], [e + 1],
          /*lowerOpen=*/
          !1,
          /*upperOpen=*/
          !0);
          return n["delete"](r);
        }, t.prototype.getMatchingKeysForTargetId = function (t, e) {
          var n = IDBKeyRange.bound([e], [e + 1],
          /*lowerOpen=*/
          !1,
          /*upperOpen=*/
          !0),
              r = di(t),
              i = sn();
          return r.$t({
            range: n,
            Ft: !0
          }, function (t, e, n) {
            var r = tr(t[1]),
                o = new ct(r);
            i = i.add(o);
          }).next(function () {
            return i;
          });
        }, t.prototype.containsKey = function (t, e) {
          var n = Xn(e.path),
              r = IDBKeyRange.bound([n], [B(n)],
          /*lowerOpen=*/
          !1,
          /*upperOpen=*/
          !0),
              i = 0;
          return di(t).$t({
            index: fr.documentTargetsIndex,
            Ft: !0,
            range: r
          }, function (t, e, n) {
            var r = t[0];
            t[1], // Having a sentinel row for a document does not count as containing that document;
            // For the target cache, containing the document means the document is part of some
            // target.
            0 !== r && (i++, n.done());
          }).next(function () {
            return i > 0;
          });
        },
        /**
         * Looks up a TargetData entry by target ID.
         *
         * @param targetId - The target ID of the TargetData entry to look up.
         * @returns The cached TargetData entry, or null if the cache has no entry for
         * the target.
         */
        // PORTING NOTE: Multi-tab only.
        t.prototype.lt = function (t, e) {
          return fi(t).get(e).next(function (t) {
            return t ? Qr(t) : null;
          });
        }, t;
      }();
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Helper to get a typed SimpleDbStore for the queries object store.
       */


      function fi(t) {
        return Rr(t, hr.store);
      }
      /**
       * Helper to get a typed SimpleDbStore for the target globals object store.
       */


      function li(t) {
        return Rr(t, lr.store);
      }
      /**
       * Helper to get a typed SimpleDbStore for the document target object store.
       */


      function di(t) {
        return Rr(t, fr.store);
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Verifies the error thrown by a LocalStore operation. If a LocalStore
       * operation fails because the primary lease has been taken by another client,
       * we ignore the error (the persistence layer will immediately call
       * `applyPrimaryLease` to propagate the primary state change). All other errors
       * are re-thrown.
       *
       * @param err - An error returned by a LocalStore operation.
       * @returns A Promise that resolves after we recovered, or the original error.
       */


      function pi(t) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
            if (t.code !== N.FAILED_PRECONDITION || t.message !== gr) throw t;
            return C("LocalStore", "Unexpectedly lost primary lease"), [2
            /*return*/
            ];
          });
        });
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      function yi(t, e) {
        var n = t[0],
            r = t[1],
            i = e[0],
            o = e[1],
            s = q(n, i);
        return 0 === s ? q(r, o) : s;
      }
      /**
       * Used to calculate the nth sequence number. Keeps a rolling buffer of the
       * lowest n values passed to `addElement`, and finally reports the largest of
       * them in `maxValue`.
       */


      var vi =
      /** @class */
      function () {
        function t(t) {
          this.ne = t, this.buffer = new $e(yi), this.se = 0;
        }

        return t.prototype.ie = function () {
          return ++this.se;
        }, t.prototype.re = function (t) {
          var e = [t, this.ie()];
          if (this.buffer.size < this.ne) this.buffer = this.buffer.add(e);else {
            var n = this.buffer.last();
            yi(e, n) < 0 && (this.buffer = this.buffer["delete"](n).add(e));
          }
        }, Object.defineProperty(t.prototype, "maxValue", {
          get: function get() {
            // Guaranteed to be non-empty. If we decide we are not collecting any
            // sequence numbers, nthSequenceNumber below short-circuits. If we have
            // decided that we are collecting n sequence numbers, it's because n is some
            // percentage of the existing sequence numbers. That means we should never
            // be in a situation where we are collecting sequence numbers but don't
            // actually have any.
            return this.buffer.last()[0];
          },
          enumerable: !1,
          configurable: !0
        }), t;
      }(),
          mi =
      /** @class */
      function () {
        function t(t, e) {
          this.garbageCollector = t, this.asyncQueue = e, this.oe = !1, this.ce = null;
        }

        return t.prototype.start = function (t) {
          -1 !== this.garbageCollector.params.cacheSizeCollectionThreshold && this.ue(t);
        }, t.prototype.stop = function () {
          this.ce && (this.ce.cancel(), this.ce = null);
        }, Object.defineProperty(t.prototype, "started", {
          get: function get() {
            return null !== this.ce;
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.ue = function (t) {
          var e = this,
              i = this.oe ? 3e5 : 6e4;
          C("LruGarbageCollector", "Garbage collection scheduled in " + i + "ms"), this.ce = this.asyncQueue.enqueueAfterDelay("lru_garbage_collection"
          /* LruGarbageCollection */
          , i, function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(e, void 0, void 0, function () {
              var e;
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
                switch (n.label) {
                  case 0:
                    this.ce = null, this.oe = !0, n.label = 1;

                  case 1:
                    return n.trys.push([1, 3,, 7]), [4
                    /*yield*/
                    , t.collectGarbage(this.garbageCollector)];

                  case 2:
                    return n.sent(), [3
                    /*break*/
                    , 7];

                  case 3:
                    return Nr(e = n.sent()) ? (C("LruGarbageCollector", "Ignoring IndexedDB error during garbage collection: ", e), [3
                    /*break*/
                    , 6]) : [3
                    /*break*/
                    , 4];

                  case 4:
                    return [4
                    /*yield*/
                    , pi(e)];

                  case 5:
                    n.sent(), n.label = 6;

                  case 6:
                    return [3
                    /*break*/
                    , 7];

                  case 7:
                    return [4
                    /*yield*/
                    , this.ue(t)];

                  case 8:
                    return n.sent(), [2
                    /*return*/
                    ];
                }
              });
            });
          });
        }, t;
      }(),
          gi =
      /** @class */
      function () {
        function t(t, e) {
          this.ae = t, this.params = e;
        }

        return t.prototype.calculateTargetCount = function (t, e) {
          return this.ae.he(t).next(function (t) {
            return Math.floor(e / 100 * t);
          });
        }, t.prototype.nthSequenceNumber = function (t, e) {
          var n = this;
          if (0 === e) return Ir.resolve(S.o);
          var r = new vi(e);
          return this.ae.forEachTarget(t, function (t) {
            return r.re(t.sequenceNumber);
          }).next(function () {
            return n.ae.le(t, function (t) {
              return r.re(t);
            });
          }).next(function () {
            return r.maxValue;
          });
        }, t.prototype.removeTargets = function (t, e, n) {
          return this.ae.removeTargets(t, e, n);
        }, t.prototype.removeOrphanedDocuments = function (t, e) {
          return this.ae.removeOrphanedDocuments(t, e);
        }, t.prototype.collect = function (t, e) {
          var n = this;
          return -1 === this.params.cacheSizeCollectionThreshold ? (C("LruGarbageCollector", "Garbage collection skipped; disabled"), Ir.resolve(ti)) : this.getCacheSize(t).next(function (r) {
            return r < n.params.cacheSizeCollectionThreshold ? (C("LruGarbageCollector", "Garbage collection skipped; Cache size " + r + " is lower than threshold " + n.params.cacheSizeCollectionThreshold), ti) : n.fe(t, e);
          });
        }, t.prototype.getCacheSize = function (t) {
          return this.ae.getCacheSize(t);
        }, t.prototype.fe = function (t, e) {
          var n,
              r,
              i,
              o,
              s,
              u,
              a,
              c = this,
              h = Date.now();
          return this.calculateTargetCount(t, this.params.percentileToCollect).next(function (e) {
            // Cap at the configured max
            return e > c.params.maximumSequenceNumbersToCollect ? (C("LruGarbageCollector", "Capping sequence numbers to collect down to the maximum of " + c.params.maximumSequenceNumbersToCollect + " from " + e), r = c.params.maximumSequenceNumbersToCollect) : r = e, o = Date.now(), c.nthSequenceNumber(t, r);
          }).next(function (r) {
            return n = r, s = Date.now(), c.removeTargets(t, n, e);
          }).next(function (e) {
            return i = e, u = Date.now(), c.removeOrphanedDocuments(t, n);
          }).next(function (t) {
            return a = Date.now(), k() <= _firebase_logger__WEBPACK_IMPORTED_MODULE_2__["LogLevel"].DEBUG && C("LruGarbageCollector", "LRU Garbage Collection\n\tCounted targets in " + (o - h) + "ms\n\tDetermined least recently used " + r + " in " + (s - o) + "ms\n\tRemoved " + i + " targets in " + (u - s) + "ms\n\tRemoved " + t + " documents in " + (a - u) + "ms\nTotal Duration: " + (a - h) + "ms"), Ir.resolve({
              didRun: !0,
              sequenceNumbersCollected: r,
              targetsRemoved: i,
              documentsRemoved: t
            });
          });
        }, t;
      }(),
          wi =
      /** @class */
      function () {
        function t(t, e) {
          this.db = t, this.garbageCollector = function (t, e) {
            return new gi(t, e);
          }(this, e);
        }

        return t.prototype.he = function (t) {
          var e = this.de(t);
          return this.db.getTargetCache().getTargetCount(t).next(function (t) {
            return e.next(function (e) {
              return t + e;
            });
          });
        }, t.prototype.de = function (t) {
          var e = 0;
          return this.le(t, function (t) {
            e++;
          }).next(function () {
            return e;
          });
        }, t.prototype.forEachTarget = function (t, e) {
          return this.db.getTargetCache().forEachTarget(t, e);
        }, t.prototype.le = function (t, e) {
          return this.we(t, function (t, n) {
            return e(n);
          });
        }, t.prototype.addReference = function (t, e, n) {
          return bi(t, n);
        }, t.prototype.removeReference = function (t, e, n) {
          return bi(t, n);
        }, t.prototype.removeTargets = function (t, e, n) {
          return this.db.getTargetCache().removeTargets(t, e, n);
        }, t.prototype.markPotentiallyOrphaned = function (t, e) {
          return bi(t, e);
        },
        /**
         * Returns true if anything would prevent this document from being garbage
         * collected, given that the document in question is not present in any
         * targets and has a sequence number less than or equal to the upper bound for
         * the collection run.
         */
        t.prototype._e = function (t, e) {
          return function (t, e) {
            var n = !1;
            return ai(t).Ot(function (r) {
              return oi(t, r, e).next(function (t) {
                return t && (n = !0), Ir.resolve(!t);
              });
            }).next(function () {
              return n;
            });
          }(t, e);
        }, t.prototype.removeOrphanedDocuments = function (t, e) {
          var n = this,
              r = this.db.getRemoteDocumentCache().newChangeBuffer(),
              i = [],
              o = 0;
          return this.we(t, function (s, u) {
            if (u <= e) {
              var a = n._e(t, s).next(function (e) {
                if (!e) // Our size accounting requires us to read all documents before
                  // removing them.
                  return o++, r.getEntry(t, s).next(function () {
                    return r.removeEntry(s), di(t)["delete"]([0, Xn(s.path)]);
                  });
              });

              i.push(a);
            }
          }).next(function () {
            return Ir.waitFor(i);
          }).next(function () {
            return r.apply(t);
          }).next(function () {
            return o;
          });
        }, t.prototype.removeTarget = function (t, e) {
          var n = e.withSequenceNumber(t.currentSequenceNumber);
          return this.db.getTargetCache().updateTargetData(t, n);
        }, t.prototype.updateLimboDocument = function (t, e) {
          return bi(t, e);
        },
        /**
         * Call provided function for each document in the cache that is 'orphaned'. Orphaned
         * means not a part of any target, so the only entry in the target-document index for
         * that document will be the sentinel row (targetId 0), which will also have the sequence
         * number for the last time the document was accessed.
         */
        t.prototype.we = function (t, e) {
          var n,
              r = di(t),
              i = S.o;
          return r.$t({
            index: fr.documentTargetsIndex
          }, function (t, r) {
            var o = t[0];
            t[1];
            var s = r.path,
                u = r.sequenceNumber;
            0 === o ? ( // if nextToReport is valid, report it, this is a new key so the
            // last one must not be a member of any targets.
            i !== S.o && e(new ct(tr(n)), i), // set nextToReport to be this sequence number. It's the next one we
            // might report, if we don't find any targets for this document.
            // Note that the sequence number must be defined when the targetId
            // is 0.
            i = u, n = s) : // set nextToReport to be invalid, we know we don't need to report
            // this one since we found a target for it.
            i = S.o;
          }).next(function () {
            // Since we report sequence numbers after getting to the next key, we
            // need to check if the last key we iterated over was an orphaned
            // document and report it.
            i !== S.o && e(new ct(tr(n)), i);
          });
        }, t.prototype.getCacheSize = function (t) {
          return this.db.getRemoteDocumentCache().getSize(t);
        }, t;
      }();
      /**
       * This class is responsible for the scheduling of LRU garbage collection. It handles checking
       * whether or not GC is enabled, as well as which delay to use before the next run.
       */


      function bi(t, e) {
        return di(t).put(
        /**
        * @returns A value suitable for writing a sentinel row in the target-document
        * store.
        */
        function (t, e) {
          return new fr(0, Xn(t.path), e);
        }(e, t.currentSequenceNumber));
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * A map implementation that uses objects as keys. Objects must have an
       * associated equals function and must be immutable. Entries in the map are
       * stored together with the key being produced from the mapKeyFn. This map
       * automatically handles collisions of keys.
       */


      var Ii =
      /** @class */
      function () {
        function t(t, e) {
          this.mapKeyFn = t, this.equalsFn = e,
          /**
               * The inner map for a key/value pair. Due to the possibility of collisions we
               * keep a list of entries that we do a linear search through to find an actual
               * match. Note that collisions should be rare, so we still expect near
               * constant time lookups in practice.
               */
          this.inner = {}
          /** Get a value for this key, or undefined if it does not exist. */
          ;
        }

        return t.prototype.get = function (t) {
          var e = this.mapKeyFn(t),
              n = this.inner[e];
          if (void 0 !== n) for (var r = 0, i = n; r < i.length; r++) {
            var o = i[r],
                s = o[0],
                u = o[1];
            if (this.equalsFn(s, t)) return u;
          }
        }, t.prototype.has = function (t) {
          return void 0 !== this.get(t);
        },
        /** Put this key and value in the map. */
        t.prototype.set = function (t, e) {
          var n = this.mapKeyFn(t),
              r = this.inner[n];

          if (void 0 !== r) {
            for (var i = 0; i < r.length; i++) {
              if (this.equalsFn(r[i][0], t)) return void (r[i] = [t, e]);
            }

            r.push([t, e]);
          } else this.inner[n] = [[t, e]];
        },
        /**
         * Remove this key from the map. Returns a boolean if anything was deleted.
         */
        t.prototype["delete"] = function (t) {
          var e = this.mapKeyFn(t),
              n = this.inner[e];
          if (void 0 === n) return !1;

          for (var r = 0; r < n.length; r++) {
            if (this.equalsFn(n[r][0], t)) return 1 === n.length ? delete this.inner[e] : n.splice(r, 1), !0;
          }

          return !1;
        }, t.prototype.forEach = function (t) {
          G(this.inner, function (e, n) {
            for (var r = 0, i = n; r < i.length; r++) {
              var o = i[r],
                  s = o[0],
                  u = o[1];
              t(s, u);
            }
          });
        }, t.prototype.isEmpty = function () {
          return z(this.inner);
        }, t;
      }(),
          Ti =
      /** @class */
      function () {
        function t() {
          // A mapping of document key to the new cache entry that should be written (or null if any
          // existing cache entry should be removed).
          this.changes = new Ii(function (t) {
            return t.toString();
          }, function (t, e) {
            return t.isEqual(e);
          }), this.changesApplied = !1;
        }

        return t.prototype.getReadTime = function (t) {
          var e = this.changes.get(t);
          return e ? e.readTime : K.min();
        },
        /**
         * Buffers a `RemoteDocumentCache.addEntry()` call.
         *
         * You can only modify documents that have already been retrieved via
         * `getEntry()/getEntries()` (enforced via IndexedDbs `apply()`).
         */
        t.prototype.addEntry = function (t, e) {
          this.assertNotApplied(), this.changes.set(t.key, {
            document: t,
            readTime: e
          });
        },
        /**
         * Buffers a `RemoteDocumentCache.removeEntry()` call.
         *
         * You can only remove documents that have already been retrieved via
         * `getEntry()/getEntries()` (enforced via IndexedDbs `apply()`).
         */
        t.prototype.removeEntry = function (t, e) {
          void 0 === e && (e = null), this.assertNotApplied(), this.changes.set(t, {
            document: Nt.newInvalidDocument(t),
            readTime: e
          });
        },
        /**
         * Looks up an entry in the cache. The buffered changes will first be checked,
         * and if no buffered change applies, this will forward to
         * `RemoteDocumentCache.getEntry()`.
         *
         * @param transaction - The transaction in which to perform any persistence
         *     operations.
         * @param documentKey - The key of the entry to look up.
         * @returns The cached document or an invalid document if we have nothing
         * cached.
         */
        t.prototype.getEntry = function (t, e) {
          this.assertNotApplied();
          var n = this.changes.get(e);
          return void 0 !== n ? Ir.resolve(n.document) : this.getFromCache(t, e);
        },
        /**
         * Looks up several entries in the cache, forwarding to
         * `RemoteDocumentCache.getEntry()`.
         *
         * @param transaction - The transaction in which to perform any persistence
         *     operations.
         * @param documentKeys - The keys of the entries to look up.
         * @returns A map of cached documents, indexed by key. If an entry cannot be
         *     found, the corresponding key will be mapped to an invalid document.
         */
        t.prototype.getEntries = function (t, e) {
          return this.getAllFromCache(t, e);
        },
        /**
         * Applies buffered changes to the underlying RemoteDocumentCache, using
         * the provided transaction.
         */
        t.prototype.apply = function (t) {
          return this.assertNotApplied(), this.changesApplied = !0, this.applyChanges(t);
        },
        /** Helper to assert this.changes is not null  */
        t.prototype.assertNotApplied = function () {}, t;
      }(),
          Ei =
      /** @class */
      function () {
        /**
         * @param serializer - The document serializer.
         * @param indexManager - The query indexes that need to be maintained.
         */
        function t(t, e) {
          this.R = t, this.Ut = e
          /**
          * Adds the supplied entries to the cache.
          *
          * All calls of `addEntry` are required to go through the RemoteDocumentChangeBuffer
          * returned by `newChangeBuffer()` to ensure proper accounting of metadata.
          */
          ;
        }

        return t.prototype.addEntry = function (t, e, n) {
          return Ni(t).put(Di(e), n);
        },
        /**
         * Removes a document from the cache.
         *
         * All calls of `removeEntry`  are required to go through the RemoteDocumentChangeBuffer
         * returned by `newChangeBuffer()` to ensure proper accounting of metadata.
         */
        t.prototype.removeEntry = function (t, e) {
          var n = Ni(t),
              r = Di(e);
          return n["delete"](r);
        },
        /**
         * Updates the current cache size.
         *
         * Callers to `addEntry()` and `removeEntry()` *must* call this afterwards to update the
         * cache's metadata.
         */
        t.prototype.updateMetadata = function (t, e) {
          var n = this;
          return this.getMetadata(t).next(function (r) {
            return r.byteSize += e, n.me(t, r);
          });
        }, t.prototype.getEntry = function (t, e) {
          var n = this;
          return Ni(t).get(Di(e)).next(function (t) {
            return n.ye(e, t);
          });
        },
        /**
         * Looks up an entry in the cache.
         *
         * @param documentKey - The key of the entry to look up.
         * @returns The cached document entry and its size.
         */
        t.prototype.ge = function (t, e) {
          var n = this;
          return Ni(t).get(Di(e)).next(function (t) {
            return {
              document: n.ye(e, t),
              size: ri(t)
            };
          });
        }, t.prototype.getEntries = function (t, e) {
          var n = this,
              r = Ze();
          return this.pe(t, e, function (t, e) {
            var i = n.ye(t, e);
            r = r.insert(t, i);
          }).next(function () {
            return r;
          });
        },
        /**
         * Looks up several entries in the cache.
         *
         * @param documentKeys - The set of keys entries to look up.
         * @returns A map of documents indexed by key and a map of sizes indexed by
         *     key (zero if the document does not exist).
         */
        t.prototype.Ee = function (t, e) {
          var n = this,
              r = Ze(),
              i = new We(ct.comparator);
          return this.pe(t, e, function (t, e) {
            var o = n.ye(t, e);
            r = r.insert(t, o), i = i.insert(t, ri(e));
          }).next(function () {
            return {
              documents: r,
              Te: i
            };
          });
        }, t.prototype.pe = function (t, e, n) {
          if (e.isEmpty()) return Ir.resolve();
          var r = IDBKeyRange.bound(e.first().path.toArray(), e.last().path.toArray()),
              i = e.getIterator(),
              o = i.getNext();
          return Ni(t).$t({
            range: r
          }, function (t, e, r) {
            // Go through keys not found in cache.
            for (var s = ct.fromSegments(t); o && ct.comparator(o, s) < 0;) {
              n(o, null), o = i.getNext();
            }

            o && o.isEqual(s) && ( // Key found in cache.
            n(o, e), o = i.hasNext() ? i.getNext() : null), // Skip to the next key (if there is one).
            o ? r.Ct(o.path.toArray()) : r.done();
          }).next(function () {
            // The rest of the keys are not in the cache. One case where `iterate`
            // above won't go through them is when the cache is empty.
            for (; o;) {
              n(o, null), o = i.hasNext() ? i.getNext() : null;
            }
          });
        }, t.prototype.getDocumentsMatchingQuery = function (t, e, n) {
          var r = this,
              i = Ze(),
              o = e.path.length + 1,
              s = {};

          if (n.isEqual(K.min())) {
            // Documents are ordered by key, so we can use a prefix scan to narrow
            // down the documents we need to match the query against.
            var u = e.path.toArray();
            s.range = IDBKeyRange.lowerBound(u);
          } else {
            // Execute an index-free query and filter by read time. This is safe
            // since all document changes to queries that have a
            // lastLimboFreeSnapshotVersion (`sinceReadTime`) have a read time set.
            var a = e.path.toArray(),
                c = qr(n);
            s.range = IDBKeyRange.lowerBound([a, c],
            /* open= */
            !0), s.index = ar.collectionReadTimeIndex;
          }

          return Ni(t).$t(s, function (t, n, s) {
            // The query is actually returning any path that starts with the query
            // path prefix which may include documents in subcollections. For
            // example, a query on 'rooms' will return rooms/abc/messages/xyx but we
            // shouldn't match it. Fix this by discarding rows with document keys
            // more than one segment longer than the query path.
            if (t.length === o) {
              var u = Mr(r.R, n);
              e.path.isPrefixOf(u.key.path) ? ue(e, u) && (i = i.insert(u.key, u)) : s.done();
            }
          }).next(function () {
            return i;
          });
        }, t.prototype.newChangeBuffer = function (t) {
          return new _i(this, !!t && t.trackRemovals);
        }, t.prototype.getSize = function (t) {
          return this.getMetadata(t).next(function (t) {
            return t.byteSize;
          });
        }, t.prototype.getMetadata = function (t) {
          return Si(t).get(cr.key).next(function (t) {
            return P(!!t), t;
          });
        }, t.prototype.me = function (t, e) {
          return Si(t).put(cr.key, e);
        },
        /**
         * Decodes `remoteDoc` and returns the document (or null, if the document
         * corresponds to the format used for sentinel deletes).
         */
        t.prototype.ye = function (t, e) {
          if (e) {
            var n = Mr(this.R, e); // Whether the document is a sentinel removal and should only be used in the
            // `getNewDocumentChanges()`

            if (!n.isNoDocument() || !n.version.isEqual(K.min())) return n;
          }

          return Nt.newInvalidDocument(t);
        }, t;
      }(),
          _i =
      /** @class */
      function (e) {
        /**
         * @param documentCache - The IndexedDbRemoteDocumentCache to apply the changes to.
         * @param trackRemovals - Whether to create sentinel deletes that can be tracked by
         * `getNewDocumentChanges()`.
         */
        function n(t, n) {
          var r = this;
          return (r = e.call(this) || this).Ie = t, r.trackRemovals = n, // A map of document sizes prior to applying the changes in this buffer.
          r.Ae = new Ii(function (t) {
            return t.toString();
          }, function (t, e) {
            return t.isEqual(e);
          }), r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.applyChanges = function (t) {
          var e = this,
              n = [],
              r = 0,
              i = new $e(function (t, e) {
            return q(t.canonicalString(), e.canonicalString());
          });
          return this.changes.forEach(function (o, s) {
            var u = e.Ae.get(o);

            if (s.document.isValidDocument()) {
              var a = Vr(e.Ie.R, s.document, e.getReadTime(o));
              i = i.add(o.path.popLast());
              var c = ri(a);
              r += c - u, n.push(e.Ie.addEntry(t, o, a));
            } else if (r -= u, e.trackRemovals) {
              // In order to track removals, we store a "sentinel delete" in the
              // RemoteDocumentCache. This entry is represented by a NoDocument
              // with a version of 0 and ignored by `maybeDecodeDocument()` but
              // preserved in `getNewDocumentChanges()`.
              var h = Vr(e.Ie.R, Nt.newNoDocument(o, K.min()), e.getReadTime(o));
              n.push(e.Ie.addEntry(t, o, h));
            } else n.push(e.Ie.removeEntry(t, o));
          }), i.forEach(function (r) {
            n.push(e.Ie.Ut.addToCollectionParentIndex(t, r));
          }), n.push(this.Ie.updateMetadata(t, r)), Ir.waitFor(n);
        }, n.prototype.getFromCache = function (t, e) {
          var n = this; // Record the size of everything we load from the cache so we can compute a delta later.

          return this.Ie.ge(t, e).next(function (t) {
            return n.Ae.set(e, t.size), t.document;
          });
        }, n.prototype.getAllFromCache = function (t, e) {
          var n = this; // Record the size of everything we load from the cache so we can compute
          // a delta later.

          return this.Ie.Ee(t, e).next(function (t) {
            var e = t.documents; // Note: `getAllFromCache` returns two maps instead of a single map from
            // keys to `DocumentSizeEntry`s. This is to allow returning the
            // `MutableDocumentMap` directly, without a conversion.

            return t.Te.forEach(function (t, e) {
              n.Ae.set(t, e);
            }), e;
          });
        }, n;
      }(Ti);
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * An in-memory buffer of entries to be written to a RemoteDocumentCache.
       * It can be used to batch up a set of changes to be written to the cache, but
       * additionally supports reading entries back with the `getEntry()` method,
       * falling back to the underlying RemoteDocumentCache if no entry is
       * buffered.
       *
       * Entries added to the cache *must* be read first. This is to facilitate
       * calculating the size delta of the pending changes.
       *
       * PORTING NOTE: This class was implemented then removed from other platforms.
       * If byte-counting ends up being needed on the other platforms, consider
       * porting this class as part of that implementation work.
       */


      function Si(t) {
        return Rr(t, cr.store);
      }
      /**
       * Helper to get a typed SimpleDbStore for the remoteDocuments object store.
       */


      function Ni(t) {
        return Rr(t, ar.store);
      }

      function Di(t) {
        return t.path.toArray();
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /** Performs database creation and schema upgrades. */


      var Ai =
      /** @class */
      function () {
        function t(t) {
          this.R = t;
        }
        /**
         * Performs database creation and schema upgrades.
         *
         * Note that in production, this method is only ever used to upgrade the schema
         * to SCHEMA_VERSION. Different values of toVersion are only used for testing
         * and local feature development.
         */


        return t.prototype.Rt = function (t, e, n, r) {
          var i = this;
          P(n < r && n >= 0 && r <= 11);
          var o = new Tr("createOrUpgrade", e);
          n < 1 && r >= 1 && (function (t) {
            t.createObjectStore(nr.store);
          }(t), function (t) {
            t.createObjectStore(rr.store, {
              keyPath: rr.keyPath
            }), t.createObjectStore(ir.store, {
              keyPath: ir.keyPath,
              autoIncrement: !0
            }).createIndex(ir.userMutationsIndex, ir.userMutationsKeyPath, {
              unique: !0
            }), t.createObjectStore(or.store);
          }(t), ki(t), function (t) {
            t.createObjectStore(ar.store);
          }(t)); // Migration 2 to populate the targetGlobal object no longer needed since
          // migration 3 unconditionally clears it.

          var s = Ir.resolve();
          return n < 3 && r >= 3 && ( // Brand new clients don't need to drop and recreate--only clients that
          // potentially have corrupt data.
          0 !== n && (function (t) {
            t.deleteObjectStore(fr.store), t.deleteObjectStore(hr.store), t.deleteObjectStore(lr.store);
          }(t), ki(t)), s = s.next(function () {
            /**
            * Creates the target global singleton row.
            *
            * @param txn - The version upgrade transaction for indexeddb
            */
            return function (t) {
              var e = t.store(lr.store),
                  n = new lr(
              /*highestTargetId=*/
              0,
              /*lastListenSequenceNumber=*/
              0, K.min().toTimestamp(),
              /*targetCount=*/
              0);
              return e.put(lr.key, n);
            }(o);
          })), n < 4 && r >= 4 && (0 !== n && ( // Schema version 3 uses auto-generated keys to generate globally unique
          // mutation batch IDs (this was previously ensured internally by the
          // client). To migrate to the new schema, we have to read all mutations
          // and write them back out. We preserve the existing batch IDs to guarantee
          // consistency with other object stores. Any further mutation batch IDs will
          // be auto-generated.
          s = s.next(function () {
            return function (t, e) {
              return e.store(ir.store).Nt().next(function (n) {
                t.deleteObjectStore(ir.store), t.createObjectStore(ir.store, {
                  keyPath: ir.keyPath,
                  autoIncrement: !0
                }).createIndex(ir.userMutationsIndex, ir.userMutationsKeyPath, {
                  unique: !0
                });
                var r = e.store(ir.store),
                    i = n.map(function (t) {
                  return r.put(t);
                });
                return Ir.waitFor(i);
              });
            }(t, o);
          })), s = s.next(function () {
            !function (t) {
              t.createObjectStore(pr.store, {
                keyPath: pr.keyPath
              });
            }(t);
          })), n < 5 && r >= 5 && (s = s.next(function () {
            return i.Re(o);
          })), n < 6 && r >= 6 && (s = s.next(function () {
            return function (t) {
              t.createObjectStore(cr.store);
            }(t), i.be(o);
          })), n < 7 && r >= 7 && (s = s.next(function () {
            return i.ve(o);
          })), n < 8 && r >= 8 && (s = s.next(function () {
            return i.Pe(t, o);
          })), n < 9 && r >= 9 && (s = s.next(function () {
            // Multi-Tab used to manage its own changelog, but this has been moved
            // to the DbRemoteDocument object store itself. Since the previous change
            // log only contained transient data, we can drop its object store.
            !function (t) {
              t.objectStoreNames.contains("remoteDocumentChanges") && t.deleteObjectStore("remoteDocumentChanges");
            }(t), function (t) {
              var e = t.objectStore(ar.store);
              e.createIndex(ar.readTimeIndex, ar.readTimeIndexPath, {
                unique: !1
              }), e.createIndex(ar.collectionReadTimeIndex, ar.collectionReadTimeIndexPath, {
                unique: !1
              });
            }(e);
          })), n < 10 && r >= 10 && (s = s.next(function () {
            return i.Ve(o);
          })), n < 11 && r >= 11 && (s = s.next(function () {
            !function (t) {
              t.createObjectStore(yr.store, {
                keyPath: yr.keyPath
              });
            }(t), function (t) {
              t.createObjectStore(vr.store, {
                keyPath: vr.keyPath
              });
            }(t);
          })), s;
        }, t.prototype.be = function (t) {
          var e = 0;
          return t.store(ar.store).$t(function (t, n) {
            e += ri(n);
          }).next(function () {
            var n = new cr(e);
            return t.store(cr.store).put(cr.key, n);
          });
        }, t.prototype.Re = function (t) {
          var e = this,
              n = t.store(rr.store),
              r = t.store(ir.store);
          return n.Nt().next(function (n) {
            return Ir.forEach(n, function (n) {
              var i = IDBKeyRange.bound([n.userId, -1], [n.userId, n.lastAcknowledgedBatchId]);
              return r.Nt(ir.userMutationsIndex, i).next(function (r) {
                return Ir.forEach(r, function (r) {
                  P(r.userId === n.userId);
                  var i = Kr(e.R, r);
                  return ni(t, n.userId, i).next(function () {});
                });
              });
            });
          });
        },
        /**
         * Ensures that every document in the remote document cache has a corresponding sentinel row
         * with a sequence number. Missing rows are given the most recently used sequence number.
         */
        t.prototype.ve = function (t) {
          var e = t.store(fr.store),
              n = t.store(ar.store);
          return t.store(lr.store).get(lr.key).next(function (t) {
            var r = [];
            return n.$t(function (n, i) {
              var o = new H(n),
                  s = function (t) {
                return [0, Xn(t)];
              }(o);

              r.push(e.get(s).next(function (n) {
                return n ? Ir.resolve() : function (n) {
                  return e.put(new fr(0, Xn(n), t.highestListenSequenceNumber));
                }(o);
              }));
            }).next(function () {
              return Ir.waitFor(r);
            });
          });
        }, t.prototype.Pe = function (t, e) {
          // Create the index.
          t.createObjectStore(dr.store, {
            keyPath: dr.keyPath
          });

          var n = e.store(dr.store),
              r = new Xr(),
              i = function i(t) {
            if (r.add(t)) {
              var e = t.lastSegment(),
                  i = t.popLast();
              return n.put({
                collectionId: e,
                parent: Xn(i)
              });
            }
          }; // Helper to add an index entry iff we haven't already written it.
          // Index existing remote documents.


          return e.store(ar.store).$t({
            Ft: !0
          }, function (t, e) {
            var n = new H(t);
            return i(n.popLast());
          }).next(function () {
            return e.store(or.store).$t({
              Ft: !0
            }, function (t, e) {
              t[0];
              var n = t[1];
              t[2];
              var r = tr(n);
              return i(r.popLast());
            });
          });
        }, t.prototype.Ve = function (t) {
          var e = this,
              n = t.store(hr.store);
          return n.$t(function (t, r) {
            var i = Qr(r),
                o = Gr(e.R, i);
            return n.put(o);
          });
        }, t;
      }();

      function ki(t) {
        t.createObjectStore(fr.store, {
          keyPath: fr.keyPath
        }).createIndex(fr.documentTargetsIndex, fr.documentTargetsKeyPath, {
          unique: !0
        }), // NOTE: This is unique only because the TargetId is the suffix.
        t.createObjectStore(hr.store, {
          keyPath: hr.keyPath
        }).createIndex(hr.queryTargetsIndexName, hr.queryTargetsKeyPath, {
          unique: !0
        }), t.createObjectStore(lr.store);
      }

      var Ci = "Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",
          xi =
      /** @class */
      function () {
        function t(
        /**
         * Whether to synchronize the in-memory state of multiple tabs and share
         * access to local persistence.
         */
        e, n, r, i, o, s, u, a, c,
        /**
         * If set to true, forcefully obtains database access. Existing tabs will
         * no longer be able to access IndexedDB.
         */
        h) {
          if (this.allowTabSynchronization = e, this.persistenceKey = n, this.clientId = r, this.Se = o, this.window = s, this.document = u, this.De = c, this.Ce = h, this.Ne = null, this.xe = !1, this.isPrimary = !1, this.networkEnabled = !0,
          /** Our window.unload handler, if registered. */
          this.ke = null, this.inForeground = !1,
          /** Our 'visibilitychange' listener if registered. */
          this.Fe = null,
          /** The client metadata refresh task. */
          this.$e = null,
          /** The last time we garbage collected the client metadata object store. */
          this.Oe = Number.NEGATIVE_INFINITY,
          /** A listener to notify on primary state changes. */
          this.Me = function (t) {
            return Promise.resolve();
          }, !t.yt()) throw new D(N.UNIMPLEMENTED, "This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");
          this.referenceDelegate = new wi(this, i), this.Le = n + "main", this.R = new Fr(a), this.Be = new Er(this.Le, 11, new Ai(this.R)), this.qe = new hi(this.referenceDelegate, this.R), this.Ut = new Jr(), this.Ue = function (t, e) {
            return new Ei(t, e);
          }(this.R, this.Ut), this.Ke = new Wr(), this.window && this.window.localStorage ? this.Qe = this.window.localStorage : (this.Qe = null, !1 === h && x("IndexedDbPersistence", "LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."));
        }
        /**
         * Attempt to start IndexedDb persistence.
         *
         * @returns Whether persistence was enabled.
         */


        return t.prototype.start = function () {
          var t = this; // NOTE: This is expected to fail sometimes (in the case of another tab
          // already having the persistence lock), so it's the first thing we should
          // do.

          return this.je().then(function () {
            if (!t.isPrimary && !t.allowTabSynchronization) // Fail `start()` if `synchronizeTabs` is disabled and we cannot
              // obtain the primary lease.
              throw new D(N.FAILED_PRECONDITION, Ci);
            return t.We(), t.Ge(), t.ze(), t.runTransaction("getHighestListenSequenceNumber", "readonly", function (e) {
              return t.qe.getHighestSequenceNumber(e);
            });
          }).then(function (e) {
            t.Ne = new S(e, t.De);
          }).then(function () {
            t.xe = !0;
          })["catch"](function (e) {
            return t.Be && t.Be.close(), Promise.reject(e);
          });
        },
        /**
         * Registers a listener that gets called when the primary state of the
         * instance changes. Upon registering, this listener is invoked immediately
         * with the current primary state.
         *
         * PORTING NOTE: This is only used for Web multi-tab.
         */
        t.prototype.He = function (t) {
          var e = this;
          return this.Me = function (i) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(e, void 0, void 0, function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
                return this.started ? [2
                /*return*/
                , t(i)] : [2
                /*return*/
                ];
              });
            });
          }, t(this.isPrimary);
        },
        /**
         * Registers a listener that gets called when the database receives a
         * version change event indicating that it has deleted.
         *
         * PORTING NOTE: This is only used for Web multi-tab.
         */
        t.prototype.setDatabaseDeletedListener = function (t) {
          var e = this;
          this.Be.vt(function (i) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(e, void 0, void 0, function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
                switch (e.label) {
                  case 0:
                    return null === i.newVersion ? [4
                    /*yield*/
                    , t()] : [3
                    /*break*/
                    , 2];

                  case 1:
                    e.sent(), e.label = 2;

                  case 2:
                    return [2
                    /*return*/
                    ];
                }
              });
            });
          });
        },
        /**
         * Adjusts the current network state in the client's metadata, potentially
         * affecting the primary lease.
         *
         * PORTING NOTE: This is only used for Web multi-tab.
         */
        t.prototype.setNetworkEnabled = function (t) {
          var e = this;
          this.networkEnabled !== t && (this.networkEnabled = t, // Schedule a primary lease refresh for immediate execution. The eventual
          // lease update will be propagated via `primaryStateListener`.
          this.Se.enqueueAndForget(function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(e, void 0, void 0, function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (t) {
                switch (t.label) {
                  case 0:
                    return this.started ? [4
                    /*yield*/
                    , this.je()] : [3
                    /*break*/
                    , 2];

                  case 1:
                    t.sent(), t.label = 2;

                  case 2:
                    return [2
                    /*return*/
                    ];
                }
              });
            });
          }));
        },
        /**
         * Updates the client metadata in IndexedDb and attempts to either obtain or
         * extend the primary lease for the local client. Asynchronously notifies the
         * primary state listener if the client either newly obtained or released its
         * primary lease.
         */
        t.prototype.je = function () {
          var t = this;
          return this.runTransaction("updateClientMetadataAndTryBecomePrimary", "readwrite", function (e) {
            return Li(e).put(new pr(t.clientId, Date.now(), t.networkEnabled, t.inForeground)).next(function () {
              if (t.isPrimary) return t.Je(e).next(function (e) {
                e || (t.isPrimary = !1, t.Se.enqueueRetryable(function () {
                  return t.Me(!1);
                }));
              });
            }).next(function () {
              return t.Ye(e);
            }).next(function (n) {
              return t.isPrimary && !n ? t.Xe(e).next(function () {
                return !1;
              }) : !!n && t.Ze(e).next(function () {
                return !0;
              });
            });
          })["catch"](function (e) {
            if (Nr(e)) // Proceed with the existing state. Any subsequent access to
              // IndexedDB will verify the lease.
              return C("IndexedDbPersistence", "Failed to extend owner lease: ", e), t.isPrimary;
            if (!t.allowTabSynchronization) throw e;
            return C("IndexedDbPersistence", "Releasing owner lease after error during lease refresh", e),
            /* isPrimary= */
            !1;
          }).then(function (e) {
            t.isPrimary !== e && t.Se.enqueueRetryable(function () {
              return t.Me(e);
            }), t.isPrimary = e;
          });
        }, t.prototype.Je = function (t) {
          var e = this;
          return Ri(t).get(nr.key).next(function (t) {
            return Ir.resolve(e.tn(t));
          });
        }, t.prototype.en = function (t) {
          return Li(t)["delete"](this.clientId);
        },
        /**
         * If the garbage collection threshold has passed, prunes the
         * RemoteDocumentChanges and the ClientMetadata store based on the last update
         * time of all clients.
         */
        t.prototype.nn = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var t,
                e,
                n,
                i,
                o = this;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
              switch (r.label) {
                case 0:
                  return !this.isPrimary || this.sn(this.Oe, 18e5) ? [3
                  /*break*/
                  , 2] : (this.Oe = Date.now(), [4
                  /*yield*/
                  , this.runTransaction("maybeGarbageCollectMultiClientState", "readwrite-primary", function (t) {
                    var e = Rr(t, pr.store);
                    return e.Nt().next(function (t) {
                      var n = o.rn(t, 18e5),
                          r = t.filter(function (t) {
                        return -1 === n.indexOf(t);
                      }); // Delete metadata for clients that are no longer considered active.

                      return Ir.forEach(r, function (t) {
                        return e["delete"](t.clientId);
                      }).next(function () {
                        return r;
                      });
                    });
                  })["catch"](function () {
                    return [];
                  })]);

                case 1:
                  // Delete potential leftover entries that may continue to mark the
                  // inactive clients as zombied in LocalStorage.
                  // Ideally we'd delete the IndexedDb and LocalStorage zombie entries for
                  // the client atomically, but we can't. So we opt to delete the IndexedDb
                  // entries first to avoid potentially reviving a zombied client.
                  if (t = r.sent(), this.Qe) for (e = 0, n = t; e < n.length; e++) {
                    i = n[e], this.Qe.removeItem(this.on(i.clientId));
                  }
                  r.label = 2;

                case 2:
                  return [2
                  /*return*/
                  ];
              }
            });
          });
        },
        /**
         * Schedules a recurring timer to update the client metadata and to either
         * extend or acquire the primary lease if the client is eligible.
         */
        t.prototype.ze = function () {
          var t = this;
          this.$e = this.Se.enqueueAfterDelay("client_metadata_refresh"
          /* ClientMetadataRefresh */
          , 4e3, function () {
            return t.je().then(function () {
              return t.nn();
            }).then(function () {
              return t.ze();
            });
          });
        },
        /** Checks whether `client` is the local client. */
        t.prototype.tn = function (t) {
          return !!t && t.ownerId === this.clientId;
        },
        /**
         * Evaluate the state of all active clients and determine whether the local
         * client is or can act as the holder of the primary lease. Returns whether
         * the client is eligible for the lease, but does not actually acquire it.
         * May return 'false' even if there is no active leaseholder and another
         * (foreground) client should become leaseholder instead.
         */
        t.prototype.Ye = function (t) {
          var e = this;
          return this.Ce ? Ir.resolve(!0) : Ri(t).get(nr.key).next(function (n) {
            // A client is eligible for the primary lease if:
            // - its network is enabled and the client's tab is in the foreground.
            // - its network is enabled and no other client's tab is in the
            //   foreground.
            // - every clients network is disabled and the client's tab is in the
            //   foreground.
            // - every clients network is disabled and no other client's tab is in
            //   the foreground.
            // - the `forceOwningTab` setting was passed in.
            if (null !== n && e.sn(n.leaseTimestampMs, 5e3) && !e.cn(n.ownerId)) {
              if (e.tn(n) && e.networkEnabled) return !0;

              if (!e.tn(n)) {
                if (!n.allowTabSynchronization) // Fail the `canActAsPrimary` check if the current leaseholder has
                  // not opted into multi-tab synchronization. If this happens at
                  // client startup, we reject the Promise returned by
                  // `enablePersistence()` and the user can continue to use Firestore
                  // with in-memory persistence.
                  // If this fails during a lease refresh, we will instead block the
                  // AsyncQueue from executing further operations. Note that this is
                  // acceptable since mixing & matching different `synchronizeTabs`
                  // settings is not supported.
                  // TODO(b/114226234): Remove this check when `synchronizeTabs` can
                  // no longer be turned off.
                  throw new D(N.FAILED_PRECONDITION, Ci);
                return !1;
              }
            }

            return !(!e.networkEnabled || !e.inForeground) || Li(t).Nt().next(function (t) {
              return void 0 === e.rn(t, 5e3).find(function (t) {
                if (e.clientId !== t.clientId) {
                  var n = !e.networkEnabled && t.networkEnabled,
                      r = !e.inForeground && t.inForeground,
                      i = e.networkEnabled === t.networkEnabled;
                  if (n || r && i) return !0;
                }

                return !1;
              });
            });
          }).next(function (t) {
            return e.isPrimary !== t && C("IndexedDbPersistence", "Client " + (t ? "is" : "is not") + " eligible for a primary lease."), t;
          });
        }, t.prototype.shutdown = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var t = this;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
              switch (e.label) {
                case 0:
                  // Use `SimpleDb.runTransaction` directly to avoid failing if another tab
                  // has obtained the primary lease.
                  // The shutdown() operations are idempotent and can be called even when
                  // start() aborted (e.g. because it couldn't acquire the persistence lease).
                  return this.xe = !1, this.un(), this.$e && (this.$e.cancel(), this.$e = null), this.an(), this.hn(), [4
                  /*yield*/
                  , this.Be.runTransaction("shutdown", "readwrite", [nr.store, pr.store], function (e) {
                    var n = new xr(e, S.o);
                    return t.Xe(n).next(function () {
                      return t.en(n);
                    });
                  })];

                case 1:
                  // The shutdown() operations are idempotent and can be called even when
                  // start() aborted (e.g. because it couldn't acquire the persistence lease).
                  // Use `SimpleDb.runTransaction` directly to avoid failing if another tab
                  // has obtained the primary lease.
                  return e.sent(), this.Be.close(), // Remove the entry marking the client as zombied from LocalStorage since
                  // we successfully deleted its metadata from IndexedDb.
                  this.ln(), [2
                  /*return*/
                  ];
              }
            });
          });
        },
        /**
         * Returns clients that are not zombied and have an updateTime within the
         * provided threshold.
         */
        t.prototype.rn = function (t, e) {
          var n = this;
          return t.filter(function (t) {
            return n.sn(t.updateTimeMs, e) && !n.cn(t.clientId);
          });
        },
        /**
         * Returns the IDs of the clients that are currently active. If multi-tab
         * is not supported, returns an array that only contains the local client's
         * ID.
         *
         * PORTING NOTE: This is only used for Web multi-tab.
         */
        t.prototype.fn = function () {
          var t = this;
          return this.runTransaction("getActiveClients", "readonly", function (e) {
            return Li(e).Nt().next(function (e) {
              return t.rn(e, 18e5).map(function (t) {
                return t.clientId;
              });
            });
          });
        }, Object.defineProperty(t.prototype, "started", {
          get: function get() {
            return this.xe;
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.getMutationQueue = function (t) {
          return ii.Qt(t, this.R, this.Ut, this.referenceDelegate);
        }, t.prototype.getTargetCache = function () {
          return this.qe;
        }, t.prototype.getRemoteDocumentCache = function () {
          return this.Ue;
        }, t.prototype.getIndexManager = function () {
          return this.Ut;
        }, t.prototype.getBundleCache = function () {
          return this.Ke;
        }, t.prototype.runTransaction = function (t, e, n) {
          var r = this;
          C("IndexedDbPersistence", "Starting transaction:", t);
          var i,
              o = "readonly" === e ? "readonly" : "readwrite"; // Do all transactions as readwrite against all object stores, since we
          // are the only reader/writer.

          return this.Be.runTransaction(t, o, mr, function (o) {
            return i = new xr(o, r.Ne ? r.Ne.next() : S.o), "readwrite-primary" === e ? r.Je(i).next(function (t) {
              return !!t || r.Ye(i);
            }).next(function (e) {
              if (!e) throw x("Failed to obtain primary lease for action '" + t + "'."), r.isPrimary = !1, r.Se.enqueueRetryable(function () {
                return r.Me(!1);
              }), new D(N.FAILED_PRECONDITION, gr);
              return n(i);
            }).next(function (t) {
              return r.Ze(i).next(function () {
                return t;
              });
            }) : r.dn(i).next(function () {
              return n(i);
            });
          }).then(function (t) {
            return i.raiseOnCommittedEvent(), t;
          });
        },
        /**
         * Verifies that the current tab is the primary leaseholder or alternatively
         * that the leaseholder has opted into multi-tab synchronization.
         */
        // TODO(b/114226234): Remove this check when `synchronizeTabs` can no longer
        // be turned off.
        t.prototype.dn = function (t) {
          var e = this;
          return Ri(t).get(nr.key).next(function (t) {
            if (null !== t && e.sn(t.leaseTimestampMs, 5e3) && !e.cn(t.ownerId) && !e.tn(t) && !(e.Ce || e.allowTabSynchronization && t.allowTabSynchronization)) throw new D(N.FAILED_PRECONDITION, Ci);
          });
        },
        /**
         * Obtains or extends the new primary lease for the local client. This
         * method does not verify that the client is eligible for this lease.
         */
        t.prototype.Ze = function (t) {
          var e = new nr(this.clientId, this.allowTabSynchronization, Date.now());
          return Ri(t).put(nr.key, e);
        }, t.yt = function () {
          return Er.yt();
        },
        /** Checks the primary lease and removes it if we are the current primary. */
        t.prototype.Xe = function (t) {
          var e = this,
              n = Ri(t);
          return n.get(nr.key).next(function (t) {
            return e.tn(t) ? (C("IndexedDbPersistence", "Releasing primary lease."), n["delete"](nr.key)) : Ir.resolve();
          });
        },
        /** Verifies that `updateTimeMs` is within `maxAgeMs`. */
        t.prototype.sn = function (t, e) {
          var n = Date.now();
          return !(t < n - e || t > n && (x("Detected an update time that is in the future: " + t + " > " + n), 1));
        }, t.prototype.We = function () {
          var t = this;
          null !== this.document && "function" == typeof this.document.addEventListener && (this.Fe = function () {
            t.Se.enqueueAndForget(function () {
              return t.inForeground = "visible" === t.document.visibilityState, t.je();
            });
          }, this.document.addEventListener("visibilitychange", this.Fe), this.inForeground = "visible" === this.document.visibilityState);
        }, t.prototype.an = function () {
          this.Fe && (this.document.removeEventListener("visibilitychange", this.Fe), this.Fe = null);
        },
        /**
         * Attaches a window.unload handler that will synchronously write our
         * clientId to a "zombie client id" location in LocalStorage. This can be used
         * by tabs trying to acquire the primary lease to determine that the lease
         * is no longer valid even if the timestamp is recent. This is particularly
         * important for the refresh case (so the tab correctly re-acquires the
         * primary lease). LocalStorage is used for this rather than IndexedDb because
         * it is a synchronous API and so can be used reliably from  an unload
         * handler.
         */
        t.prototype.Ge = function () {
          var t,
              e = this;
          "function" == typeof (null === (t = this.window) || void 0 === t ? void 0 : t.addEventListener) && (this.ke = function () {
            // Note: In theory, this should be scheduled on the AsyncQueue since it
            // accesses internal state. We execute this code directly during shutdown
            // to make sure it gets a chance to run.
            e.un(), Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["isSafari"])() && navigator.appVersion.match("Version/14") && // On Safari 14, we do not run any cleanup actions as it might trigger
            // a bug that prevents Safari from re-opening IndexedDB during the
            // next page load.
            // See https://bugs.webkit.org/show_bug.cgi?id=226547
            e.Se.enterRestrictedMode(
            /* purgeExistingTasks= */
            !0), e.Se.enqueueAndForget(function () {
              return e.shutdown();
            });
          }, this.window.addEventListener("pagehide", this.ke));
        }, t.prototype.hn = function () {
          this.ke && (this.window.removeEventListener("pagehide", this.ke), this.ke = null);
        },
        /**
         * Returns whether a client is "zombied" based on its LocalStorage entry.
         * Clients become zombied when their tab closes without running all of the
         * cleanup logic in `shutdown()`.
         */
        t.prototype.cn = function (t) {
          var e;

          try {
            var n = null !== (null === (e = this.Qe) || void 0 === e ? void 0 : e.getItem(this.on(t)));
            return C("IndexedDbPersistence", "Client '" + t + "' " + (n ? "is" : "is not") + " zombied in LocalStorage"), n;
          } catch (t) {
            // Gracefully handle if LocalStorage isn't working.
            return x("IndexedDbPersistence", "Failed to get zombied client id.", t), !1;
          }
        },
        /**
         * Record client as zombied (a client that had its tab closed). Zombied
         * clients are ignored during primary tab selection.
         */
        t.prototype.un = function () {
          if (this.Qe) try {
            this.Qe.setItem(this.on(this.clientId), String(Date.now()));
          } catch (t) {
            // Gracefully handle if LocalStorage isn't available / working.
            x("Failed to set zombie client id.", t);
          }
        },
        /** Removes the zombied client entry if it exists. */
        t.prototype.ln = function () {
          if (this.Qe) try {
            this.Qe.removeItem(this.on(this.clientId));
          } catch (t) {// Ignore
          }
        }, t.prototype.on = function (t) {
          return "firestore_zombie_" + this.persistenceKey + "_" + t;
        }, t;
      }();
      /**
       * Oldest acceptable age in milliseconds for client metadata before the client
       * is considered inactive and its associated data is garbage collected.
       */

      /**
       * An IndexedDB-backed instance of Persistence. Data is stored persistently
       * across sessions.
       *
       * On Web only, the Firestore SDKs support shared access to its persistence
       * layer. This allows multiple browser tabs to read and write to IndexedDb and
       * to synchronize state even without network connectivity. Shared access is
       * currently optional and not enabled unless all clients invoke
       * `enablePersistence()` with `{synchronizeTabs:true}`.
       *
       * In multi-tab mode, if multiple clients are active at the same time, the SDK
       * will designate one client as the “primary client”. An effort is made to pick
       * a visible, network-connected and active client, and this client is
       * responsible for letting other clients know about its presence. The primary
       * client writes a unique client-generated identifier (the client ID) to
       * IndexedDb’s “owner” store every 4 seconds. If the primary client fails to
       * update this entry, another client can acquire the lease and take over as
       * primary.
       *
       * Some persistence operations in the SDK are designated as primary-client only
       * operations. This includes the acknowledgment of mutations and all updates of
       * remote documents. The effects of these operations are written to persistence
       * and then broadcast to other tabs via LocalStorage (see
       * `WebStorageSharedClientState`), which then refresh their state from
       * persistence.
       *
       * Similarly, the primary client listens to notifications sent by secondary
       * clients to discover persistence changes written by secondary clients, such as
       * the addition of new mutations and query targets.
       *
       * If multi-tab is not enabled and another tab already obtained the primary
       * lease, IndexedDbPersistence enters a failed state and all subsequent
       * operations will automatically fail.
       *
       * Additionally, there is an optimization so that when a tab is closed, the
       * primary lease is released immediately (this is especially important to make
       * sure that a refreshed tab is able to immediately re-acquire the primary
       * lease). Unfortunately, IndexedDB cannot be reliably used in window.unload
       * since it is an asynchronous API. So in addition to attempting to give up the
       * lease, the leaseholder writes its client ID to a "zombiedClient" entry in
       * LocalStorage which acts as an indicator that another tab should go ahead and
       * take the primary lease immediately regardless of the current lease timestamp.
       *
       * TODO(b/114226234): Remove `synchronizeTabs` section when multi-tab is no
       * longer optional.
       */

      /**
       * Helper to get a typed SimpleDbStore for the primary client object store.
       */


      function Ri(t) {
        return Rr(t, nr.store);
      }
      /**
       * Helper to get a typed SimpleDbStore for the client metadata object store.
       */


      function Li(t) {
        return Rr(t, pr.store);
      }
      /**
       * Generates a string used as a prefix when storing data in IndexedDB and
       * LocalStorage.
       */


      function Oi(t, e) {
        // Use two different prefix formats:
        //   * firestore / persistenceKey / projectID . databaseID / ...
        //   * firestore / persistenceKey / projectID / ...
        // projectIDs are DNS-compatible names and cannot contain dots
        // so there's no danger of collisions.
        var n = t.projectId;
        return t.isDefaultDatabase || (n += "." + t.database), "firestore/" + e + "/" + n + "/"
        /**
        * @license
        * Copyright 2020 Google LLC
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
        * you may not use this file except in compliance with the License.
        * You may obtain a copy of the License at
        *
        *   http://www.apache.org/licenses/LICENSE-2.0
        *
        * Unless required by applicable law or agreed to in writing, software
        * distributed under the License is distributed on an "AS IS" BASIS,
        * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        * See the License for the specific language governing permissions and
        * limitations under the License.
        */
        ;
      }

      var Pi = function Pi(t, e) {
        this.progress = t, this.wn = e;
      },
          Fi =
      /** @class */
      function () {
        function t(t, e, n) {
          this.Ue = t, this._n = e, this.Ut = n
          /**
          * Get the local view of the document identified by `key`.
          *
          * @returns Local view of the document or null if we don't have any cached
          * state for it.
          */
          ;
        }

        return t.prototype.mn = function (t, e) {
          var n = this;
          return this._n.getAllMutationBatchesAffectingDocumentKey(t, e).next(function (r) {
            return n.yn(t, e, r);
          });
        },
        /** Internal version of `getDocument` that allows reusing batches. */
        t.prototype.yn = function (t, e, n) {
          return this.Ue.getEntry(t, e).next(function (t) {
            for (var e = 0, r = n; e < r.length; e++) {
              r[e].applyToLocalView(t);
            }

            return t;
          });
        }, // Returns the view of the given `docs` as they would appear after applying
        // all mutations in the given `batches`.
        t.prototype.gn = function (t, e) {
          t.forEach(function (t, n) {
            for (var r = 0, i = e; r < i.length; r++) {
              i[r].applyToLocalView(n);
            }
          });
        },
        /**
         * Gets the local view of the documents identified by `keys`.
         *
         * If we don't have cached state for a document in `keys`, a NoDocument will
         * be stored for that key in the resulting set.
         */
        t.prototype.pn = function (t, e) {
          var n = this;
          return this.Ue.getEntries(t, e).next(function (e) {
            return n.En(t, e).next(function () {
              return e;
            });
          });
        },
        /**
         * Applies the local view the given `baseDocs` without retrieving documents
         * from the local store.
         */
        t.prototype.En = function (t, e) {
          var n = this;
          return this._n.getAllMutationBatchesAffectingDocumentKeys(t, e).next(function (t) {
            return n.gn(e, t);
          });
        },
        /**
         * Performs a query against the local view of all documents.
         *
         * @param transaction - The persistence transaction.
         * @param query - The query to match documents against.
         * @param sinceReadTime - If not set to SnapshotVersion.min(), return only
         *     documents that have been read since this snapshot version (exclusive).
         */
        t.prototype.getDocumentsMatchingQuery = function (t, e, n) {
          /**
          * Returns whether the query matches a single document by path (rather than a
          * collection).
          */
          return function (t) {
            return ct.isDocumentKey(t.path) && null === t.collectionGroup && 0 === t.filters.length;
          }(e) ? this.Tn(t, e.path) : te(e) ? this.In(t, e, n) : this.An(t, e, n);
        }, t.prototype.Tn = function (t, e) {
          // Just do a simple document lookup.
          return this.mn(t, new ct(e)).next(function (t) {
            var e = en();
            return t.isFoundDocument() && (e = e.insert(t.key, t)), e;
          });
        }, t.prototype.In = function (t, e, n) {
          var r = this,
              i = e.collectionGroup,
              o = en();
          return this.Ut.getCollectionParents(t, i).next(function (s) {
            return Ir.forEach(s, function (s) {
              var u = function (t, e) {
                return new Wt(e,
                /*collectionGroup=*/
                null, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);
              }(e, s.child(i));

              return r.An(t, u, n).next(function (t) {
                t.forEach(function (t, e) {
                  o = o.insert(t, e);
                });
              });
            }).next(function () {
              return o;
            });
          });
        }, t.prototype.An = function (t, e, n) {
          var r,
              i,
              o = this; // Query the remote documents and overlay mutations.

          return this.Ue.getDocumentsMatchingQuery(t, e, n).next(function (n) {
            return r = n, o._n.getAllMutationBatchesAffectingQuery(t, e);
          }).next(function (e) {
            return i = e, o.Rn(t, i, r).next(function (t) {
              r = t;

              for (var e = 0, n = i; e < n.length; e++) {
                for (var o = n[e], s = 0, u = o.mutations; s < u.length; s++) {
                  var a = u[s],
                      c = a.key,
                      h = r.get(c);
                  null == h && ( // Create invalid document to apply mutations on top of
                  h = Nt.newInvalidDocument(c), r = r.insert(c, h)), xe(a, h, o.localWriteTime), h.isFoundDocument() || (r = r.remove(c));
                }
              }
            });
          }).next(function () {
            // Finally, filter out any documents that don't actually match
            // the query.
            return r.forEach(function (t, n) {
              ue(e, n) || (r = r.remove(t));
            }), r;
          });
        }, t.prototype.Rn = function (t, e, n) {
          for (var r = sn(), i = 0, o = e; i < o.length; i++) {
            for (var s = 0, u = o[i].mutations; s < u.length; s++) {
              var a = u[s];
              a instanceof Fe && null === n.get(a.key) && (r = r.add(a.key));
            }
          }

          var c = n;
          return this.Ue.getEntries(t, r).next(function (t) {
            return t.forEach(function (t, e) {
              e.isFoundDocument() && (c = c.insert(t, e));
            }), c;
          });
        }, t;
      }(),
          Mi =
      /** @class */
      function () {
        function t(t, e, n, r) {
          this.targetId = t, this.fromCache = e, this.bn = n, this.vn = r;
        }

        return t.Pn = function (e, n) {
          for (var r = sn(), i = sn(), o = 0, s = n.docChanges; o < s.length; o++) {
            var u = s[o];

            switch (u.type) {
              case 0
              /* Added */
              :
                r = r.add(u.doc.key);
                break;

              case 1
              /* Removed */
              :
                i = i.add(u.doc.key);
              // do nothing
            }
          }

          return new t(e, n.fromCache, r, i);
        }, t;
      }(),
          Vi =
      /** @class */
      function () {
        function t() {}
        /** Sets the document view to query against. */


        return t.prototype.Vn = function (t) {
          this.Sn = t;
        },
        /** Returns all local documents matching the specified query. */
        t.prototype.getDocumentsMatchingQuery = function (t, e, n, r) {
          var i = this; // Queries that match all documents don't benefit from using
          // key-based lookups. It is more efficient to scan all documents in a
          // collection, rather than to perform individual lookups.

          return function (t) {
            return 0 === t.filters.length && null === t.limit && null == t.startAt && null == t.endAt && (0 === t.explicitOrderBy.length || 1 === t.explicitOrderBy.length && t.explicitOrderBy[0].field.isKeyField());
          }(e) || n.isEqual(K.min()) ? this.Dn(t, e) : this.Sn.pn(t, r).next(function (o) {
            var s = i.Cn(e, o);
            return ($t(e) || Xt(e)) && i.Nn(e.limitType, s, r, n) ? i.Dn(t, e) : (k() <= _firebase_logger__WEBPACK_IMPORTED_MODULE_2__["LogLevel"].DEBUG && C("QueryEngine", "Re-using previous result from %s to execute query: %s", n.toString(), se(e)), i.Sn.getDocumentsMatchingQuery(t, e, n).next(function (t) {
              // We merge `previousResults` into `updateResults`, since
              // `updateResults` is already a DocumentMap. If a document is
              // contained in both lists, then its contents are the same.
              return s.forEach(function (e) {
                t = t.insert(e.key, e);
              }), t;
            }));
          }); // Queries that have never seen a snapshot without limbo free documents
          // should also be run as a full collection scan.
        },
        /** Applies the query filter and sorting to the provided documents.  */
        t.prototype.Cn = function (t, e) {
          // Sort the documents and re-apply the query filter since previously
          // matching documents do not necessarily still match the query.
          var n = new $e(ae(t));
          return e.forEach(function (e, r) {
            ue(t, r) && (n = n.add(r));
          }), n;
        },
        /**
         * Determines if a limit query needs to be refilled from cache, making it
         * ineligible for index-free execution.
         *
         * @param sortedPreviousResults - The documents that matched the query when it
         * was last synchronized, sorted by the query's comparator.
         * @param remoteKeys - The document keys that matched the query at the last
         * snapshot.
         * @param limboFreeSnapshotVersion - The version of the snapshot when the
         * query was last synchronized.
         */
        t.prototype.Nn = function (t, e, n, r) {
          // The query needs to be refilled if a previously matching document no
          // longer matches.
          if (n.size !== e.size) return !0; // Limit queries are not eligible for index-free query execution if there is
          // a potential that an older document from cache now sorts before a document
          // that was previously part of the limit. This, however, can only happen if
          // the document at the edge of the limit goes out of limit.
          // If a document that is not the limit boundary sorts differently,
          // the boundary of the limit itself did not change and documents from cache
          // will continue to be "rejected" by this boundary. Therefore, we can ignore
          // any modifications that don't affect the last document.

          var i = "F"
          /* First */
          === t ? e.last() : e.first();
          return !!i && (i.hasPendingWrites || i.version.compareTo(r) > 0);
        }, t.prototype.Dn = function (t, e) {
          return k() <= _firebase_logger__WEBPACK_IMPORTED_MODULE_2__["LogLevel"].DEBUG && C("QueryEngine", "Using full collection scan to execute query:", se(e)), this.Sn.getDocumentsMatchingQuery(t, e, K.min());
        }, t;
      }(),
          qi =
      /** @class */
      function () {
        function t(
        /** Manages our in-memory or durable persistence. */
        t, e, n, r) {
          this.persistence = t, this.xn = e, this.R = r,
          /**
               * Maps a targetID to data about its target.
               *
               * PORTING NOTE: We are using an immutable data structure on Web to make re-runs
               * of `applyRemoteEvent()` idempotent.
               */
          this.kn = new We(q),
          /** Maps a target to its targetID. */
          // TODO(wuandy): Evaluate if TargetId can be part of Target.
          this.Fn = new Ii(function (t) {
            return kt(t);
          }, Ct),
          /**
               * The read time of the last entry processed by `getNewDocumentChanges()`.
               *
               * PORTING NOTE: This is only used for multi-tab synchronization.
               */
          this.$n = K.min(), this._n = t.getMutationQueue(n), this.On = t.getRemoteDocumentCache(), this.qe = t.getTargetCache(), this.Mn = new Fi(this.On, this._n, this.persistence.getIndexManager()), this.Ke = t.getBundleCache(), this.xn.Vn(this.Mn);
        }

        return t.prototype.collectGarbage = function (t) {
          var e = this;
          return this.persistence.runTransaction("Collect garbage", "readwrite-primary", function (n) {
            return t.collect(n, e.kn);
          });
        }, t;
      }();
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * A readonly view of the local state of all documents we're tracking (i.e. we
       * have a cached version in remoteDocumentCache or local mutations for the
       * document). The view is computed by applying the mutations in the
       * MutationQueue to the RemoteDocumentCache.
       */


      function Ui(
      /** Manages our in-memory or durable persistence. */
      t, e, n, r) {
        return new qi(t, e, n, r);
      }
      /**
       * Tells the LocalStore that the currently authenticated user has changed.
       *
       * In response the local store switches the mutation queue to the new user and
       * returns any resulting document changes.
       */
      // PORTING NOTE: Android and iOS only return the documents affected by the
      // change.


      function Bi(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, i, o, s;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                return n = F(t), i = n._n, o = n.Mn, [4
                /*yield*/
                , n.persistence.runTransaction("Handle user change", "readonly", function (t) {
                  // Swap out the mutation queue, grabbing the pending mutation batches
                  // before and after.
                  var r;
                  return n._n.getAllMutationBatches(t).next(function (s) {
                    return r = s, i = n.persistence.getMutationQueue(e), // Recreate our LocalDocumentsView using the new
                    // MutationQueue.
                    o = new Fi(n.On, i, n.persistence.getIndexManager()), i.getAllMutationBatches(t);
                  }).next(function (e) {
                    for (var n = [], i = [], s = sn(), u = 0, a = r // Union the old/new changed keys.
                    ; u < a.length; u++) {
                      var c = a[u];
                      n.push(c.batchId);

                      for (var h = 0, f = c.mutations; h < f.length; h++) {
                        var l = f[h];
                        s = s.add(l.key);
                      }
                    }

                    for (var d = 0, p = e; d < p.length; d++) {
                      var y = p[d];
                      i.push(y.batchId);

                      for (var v = 0, m = y.mutations; v < m.length; v++) {
                        var g = m[v];
                        s = s.add(g.key);
                      }
                    } // Return the set of all (potentially) changed documents and the list
                    // of mutation batch IDs that were affected by change.


                    return o.pn(t, s).next(function (t) {
                      return {
                        Ln: t,
                        removedBatchIds: n,
                        addedBatchIds: i
                      };
                    });
                  });
                })];

              case 1:
                return s = r.sent(), [2
                /*return*/
                , (n._n = i, n.Mn = o, n.xn.Vn(n.Mn), s)];
            }
          });
        });
      }
      /* Accepts locally generated Mutations and commit them to storage. */

      /**
       * Acknowledges the given batch.
       *
       * On the happy path when a batch is acknowledged, the local store will
       *
       *  + remove the batch from the mutation queue;
       *  + apply the changes to the remote document cache;
       *  + recalculate the latency compensated view implied by those changes (there
       *    may be mutations in the queue that affect the documents but haven't been
       *    acknowledged yet); and
       *  + give the changed documents back the sync engine
       *
       * @returns The resulting (modified) documents.
       */


      function ji(t, e) {
        var n = F(t);
        return n.persistence.runTransaction("Acknowledge batch", "readwrite-primary", function (t) {
          var r = e.batch.keys(),
              i = n.On.newChangeBuffer({
            trackRemovals: !0
          });
          return function (t, e, n, r) {
            var i = n.batch,
                o = i.keys(),
                s = Ir.resolve();
            return o.forEach(function (t) {
              s = s.next(function () {
                return r.getEntry(e, t);
              }).next(function (e) {
                var o = n.docVersions.get(t);
                P(null !== o), e.version.compareTo(o) < 0 && (i.applyToRemoteDocument(e, n), e.isValidDocument() && // We use the commitVersion as the readTime rather than the
                // document's updateTime since the updateTime is not advanced
                // for updates that do not modify the underlying document.
                r.addEntry(e, n.commitVersion));
              });
            }), s.next(function () {
              return t._n.removeMutationBatch(e, i);
            });
          }(n, t, e, i).next(function () {
            return i.apply(t);
          }).next(function () {
            return n._n.performConsistencyCheck(t);
          }).next(function () {
            return n.Mn.pn(t, r);
          });
        });
      }
      /**
       * Removes mutations from the MutationQueue for the specified batch;
       * LocalDocuments will be recalculated.
       *
       * @returns The resulting modified documents.
       */

      /**
       * Returns the last consistent snapshot processed (used by the RemoteStore to
       * determine whether to buffer incoming snapshots from the backend).
       */


      function Ki(t) {
        var e = F(t);
        return e.persistence.runTransaction("Get last remote snapshot version", "readonly", function (t) {
          return e.qe.getLastRemoteSnapshotVersion(t);
        });
      }
      /**
       * Updates the "ground-state" (remote) documents. We assume that the remote
       * event reflects any write batches that have been acknowledged or rejected
       * (i.e. we do not re-apply local mutations to updates from this event).
       *
       * LocalDocuments are re-calculated if there are remaining mutations in the
       * queue.
       */


      function Qi(t, e) {
        var n = F(t),
            r = e.snapshotVersion,
            i = n.kn;
        return n.persistence.runTransaction("Apply remote event", "readwrite-primary", function (t) {
          var o = n.On.newChangeBuffer({
            trackRemovals: !0
          }); // Reset newTargetDataByTargetMap in case this transaction gets re-run.

          i = n.kn;
          var s = [];
          e.targetChanges.forEach(function (e, o) {
            var u = i.get(o);

            if (u) {
              // Only update the remote keys if the target is still active. This
              // ensures that we can persist the updated target data along with
              // the updated assignment.
              s.push(n.qe.removeMatchingKeys(t, e.removedDocuments, o).next(function () {
                return n.qe.addMatchingKeys(t, e.addedDocuments, o);
              }));
              var a = e.resumeToken; // Update the resume token if the change includes one.

              if (a.approximateByteSize() > 0) {
                var c = u.withResumeToken(a, r).withSequenceNumber(t.currentSequenceNumber);
                i = i.insert(o, c), // Update the target data if there are target changes (or if
                // sufficient time has passed since the last update).

                /**
                * Returns true if the newTargetData should be persisted during an update of
                * an active target. TargetData should always be persisted when a target is
                * being released and should not call this function.
                *
                * While the target is active, TargetData updates can be omitted when nothing
                * about the target has changed except metadata like the resume token or
                * snapshot version. Occasionally it's worth the extra write to prevent these
                * values from getting too stale after a crash, but this doesn't have to be
                * too frequent.
                */
                function (t, e, n) {
                  // Always persist target data if we don't already have a resume token.
                  return P(e.resumeToken.approximateByteSize() > 0), 0 === t.resumeToken.approximateByteSize() || // Don't allow resume token changes to be buffered indefinitely. This
                  // allows us to be reasonably up-to-date after a crash and avoids needing
                  // to loop over all active queries on shutdown. Especially in the browser
                  // we may not get time to do anything interesting while the current tab is
                  // closing.
                  e.snapshotVersion.toMicroseconds() - t.snapshotVersion.toMicroseconds() >= 3e8 || n.addedDocuments.size + n.modifiedDocuments.size + n.removedDocuments.size > 0;
                }(u, c, e) && s.push(n.qe.updateTargetData(t, c));
              }
            }
          });
          var u = Ze(); // HACK: The only reason we allow a null snapshot version is so that we
          // can synthesize remote events when we get permission denied errors while
          // trying to resolve the state of a locally cached document that is in
          // limbo.

          if (e.documentUpdates.forEach(function (r, i) {
            e.resolvedLimboDocuments.has(r) && s.push(n.persistence.referenceDelegate.updateLimboDocument(t, r));
          }), // Each loop iteration only affects its "own" doc, so it's safe to get all the remote
          // documents in advance in a single call.
          s.push(Gi(t, o, e.documentUpdates, r, void 0).next(function (t) {
            u = t;
          })), !r.isEqual(K.min())) {
            var a = n.qe.getLastRemoteSnapshotVersion(t).next(function (e) {
              return n.qe.setTargetsMetadata(t, t.currentSequenceNumber, r);
            });
            s.push(a);
          }

          return Ir.waitFor(s).next(function () {
            return o.apply(t);
          }).next(function () {
            return n.Mn.En(t, u);
          }).next(function () {
            return u;
          });
        }).then(function (t) {
          return n.kn = i, t;
        });
      }
      /**
       * Populates document change buffer with documents from backend or a bundle.
       * Returns the document changes resulting from applying those documents.
       *
       * @param txn - Transaction to use to read existing documents from storage.
       * @param documentBuffer - Document buffer to collect the resulted changes to be
       *        applied to storage.
       * @param documents - Documents to be applied.
       * @param globalVersion - A `SnapshotVersion` representing the read time if all
       *        documents have the same read time.
       * @param documentVersions - A DocumentKey-to-SnapshotVersion map if documents
       *        have their own read time.
       *
       * Note: this function will use `documentVersions` if it is defined;
       * when it is not defined, resorts to `globalVersion`.
       */


      function Gi(t, e, n, r, // TODO(wuandy): We could add `readTime` to MaybeDocument instead to remove
      // this parameter.
      i) {
        var o = sn();
        return n.forEach(function (t) {
          return o = o.add(t);
        }), e.getEntries(t, o).next(function (t) {
          var o = Ze();
          return n.forEach(function (n, s) {
            var u = t.get(n),
                a = (null == i ? void 0 : i.get(n)) || r; // Note: The order of the steps below is important, since we want
            // to ensure that rejected limbo resolutions (which fabricate
            // NoDocuments with SnapshotVersion.min()) never add documents to
            // cache.

            s.isNoDocument() && s.version.isEqual(K.min()) ? ( // NoDocuments with SnapshotVersion.min() are used in manufactured
            // events. We remove these documents from cache since we lost
            // access.
            e.removeEntry(n, a), o = o.insert(n, s)) : !u.isValidDocument() || s.version.compareTo(u.version) > 0 || 0 === s.version.compareTo(u.version) && u.hasPendingWrites ? (e.addEntry(s, a), o = o.insert(n, s)) : C("LocalStore", "Ignoring outdated watch update for ", n, ". Current version:", u.version, " Watch version:", s.version);
          }), o;
        })
        /**
        * Gets the mutation batch after the passed in batchId in the mutation queue
        * or null if empty.
        * @param afterBatchId - If provided, the batch to search after.
        * @returns The next mutation or null if there wasn't one.
        */
        ;
      }

      function zi(t, e) {
        var n = F(t);
        return n.persistence.runTransaction("Get next mutation batch", "readonly", function (t) {
          return void 0 === e && (e = -1), n._n.getNextMutationBatchAfterBatchId(t, e);
        });
      }
      /**
       * Reads the current value of a Document with a given key or null if not
       * found - used for testing.
       */

      /**
       * Assigns the given target an internal ID so that its results can be pinned so
       * they don't get GC'd. A target must be allocated in the local store before
       * the store can be used to manage its view.
       *
       * Allocating an already allocated `Target` will return the existing `TargetData`
       * for that `Target`.
       */


      function Wi(t, e) {
        var n = F(t);
        return n.persistence.runTransaction("Allocate target", "readwrite", function (t) {
          var r;
          return n.qe.getTargetData(t, e).next(function (i) {
            return i ? ( // This target has been listened to previously, so reuse the
            // previous targetID.
            // TODO(mcg): freshen last accessed date?
            r = i, Ir.resolve(r)) : n.qe.allocateTargetId(t).next(function (i) {
              return r = new Pr(e, i, 0
              /* Listen */
              , t.currentSequenceNumber), n.qe.addTargetData(t, r).next(function () {
                return r;
              });
            });
          });
        }).then(function (t) {
          // If Multi-Tab is enabled, the existing target data may be newer than
          // the in-memory data
          var r = n.kn.get(t.targetId);
          return (null === r || t.snapshotVersion.compareTo(r.snapshotVersion) > 0) && (n.kn = n.kn.insert(t.targetId, t), n.Fn.set(e, t.targetId)), t;
        });
      }
      /**
       * Returns the TargetData as seen by the LocalStore, including updates that may
       * have not yet been persisted to the TargetCache.
       */
      // Visible for testing.

      /**
       * Unpins all the documents associated with the given target. If
       * `keepPersistedTargetData` is set to false and Eager GC enabled, the method
       * directly removes the associated target data from the target cache.
       *
       * Releasing a non-existing `Target` is a no-op.
       */
      // PORTING NOTE: `keepPersistedTargetData` is multi-tab only.


      function Hi(t, e, i) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, o, s, u;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                n = F(t), o = n.kn.get(e), s = i ? "readwrite" : "readwrite-primary", r.label = 1;

              case 1:
                return r.trys.push([1, 4,, 5]), i ? [3
                /*break*/
                , 3] : [4
                /*yield*/
                , n.persistence.runTransaction("Release target", s, function (t) {
                  return n.persistence.referenceDelegate.removeTarget(t, o);
                })];

              case 2:
                r.sent(), r.label = 3;

              case 3:
                return [3
                /*break*/
                , 5];

              case 4:
                if (!Nr(u = r.sent())) throw u; // All `releaseTarget` does is record the final metadata state for the
                // target, but we've been recording this periodically during target
                // activity. If we lose this write this could cause a very slight
                // difference in the order of target deletion during GC, but we
                // don't define exact LRU semantics so this is acceptable.

                return C("LocalStore", "Failed to update sequence numbers for target " + e + ": " + u), [3
                /*break*/
                , 5];

              case 5:
                return n.kn = n.kn.remove(e), n.Fn["delete"](o.target), [2
                /*return*/
                ];
            }
          });
        });
      }
      /**
       * Runs the specified query against the local store and returns the results,
       * potentially taking advantage of query data from previous executions (such
       * as the set of remote keys).
       *
       * @param usePreviousResults - Whether results from previous executions can
       * be used to optimize this query execution.
       */


      function Yi(t, e, n) {
        var r = F(t),
            i = K.min(),
            o = sn();
        return r.persistence.runTransaction("Execute query", "readonly", function (t) {
          return function (t, e, n) {
            var r = F(t),
                i = r.Fn.get(n);
            return void 0 !== i ? Ir.resolve(r.kn.get(i)) : r.qe.getTargetData(e, n);
          }(r, t, ne(e)).next(function (e) {
            if (e) return i = e.lastLimboFreeSnapshotVersion, r.qe.getMatchingKeysForTargetId(t, e.targetId).next(function (t) {
              o = t;
            });
          }).next(function () {
            return r.xn.getDocumentsMatchingQuery(t, e, n ? i : K.min(), n ? o : sn());
          }).next(function (t) {
            return {
              documents: t,
              Bn: o
            };
          });
        });
      } // PORTING NOTE: Multi-Tab only.


      function $i(t, e) {
        var n = F(t),
            r = F(n.qe),
            i = n.kn.get(e);
        return i ? Promise.resolve(i.target) : n.persistence.runTransaction("Get target data", "readonly", function (t) {
          return r.lt(t, e).next(function (t) {
            return t ? t.target : null;
          });
        });
      }
      /**
       * Returns the set of documents that have been updated since the last call.
       * If this is the first call, returns the set of changes since client
       * initialization. Further invocations will return document that have changed
       * since the prior call.
       */
      // PORTING NOTE: Multi-Tab only.


      function Xi(t) {
        var e = F(t);
        return e.persistence.runTransaction("Get new document changes", "readonly", function (t) {
          return function (t, e, n) {
            var r = F(t),
                i = Ze(),
                o = qr(n),
                s = Ni(e),
                u = IDBKeyRange.lowerBound(o, !0);
            return s.$t({
              index: ar.readTimeIndex,
              range: u
            }, function (t, e) {
              // Unlike `getEntry()` and others, `getNewDocumentChanges()` parses
              // the documents directly since we want to keep sentinel deletes.
              var n = Mr(r.R, e);
              i = i.insert(n.key, n), o = e.readTime;
            }).next(function () {
              return {
                wn: i,
                readTime: Ur(o)
              };
            });
          }(e.On, t, e.$n);
        }).then(function (t) {
          var n = t.wn,
              r = t.readTime;
          return e.$n = r, n;
        });
      }
      /**
       * Reads the newest document change from persistence and moves the internal
       * synchronization marker forward so that calls to `getNewDocumentChanges()`
       * only return changes that happened after client initialization.
       */
      // PORTING NOTE: Multi-Tab only.


      function Ji(t) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var e;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
            return [2
            /*return*/
            , (e = F(t)).persistence.runTransaction("Synchronize last document change read time", "readonly", function (t) {
              return function (t) {
                var e = Ni(t),
                    n = K.min(); // If there are no existing entries, we return SnapshotVersion.min().

                return e.$t({
                  index: ar.readTimeIndex,
                  reverse: !0
                }, function (t, e, r) {
                  e.readTime && (n = Ur(e.readTime)), r.done();
                }).next(function () {
                  return n;
                });
              }(t);
            }).then(function (t) {
              e.$n = t;
            })];
          });
        });
      }
      /**
       * Creates a new target using the given bundle name, which will be used to
       * hold the keys of all documents from the bundle in query-document mappings.
       * This ensures that the loaded documents do not get garbage collected
       * right away.
       */

      /**
       * Applies the documents from a bundle to the "ground-state" (remote)
       * documents.
       *
       * LocalDocuments are re-calculated if there are remaining mutations in the
       * queue.
       */


      function Zi(t, e, i, o) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, s, u, a, c, h, f, l, d, p;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                for (n = F(t), s = sn(), u = Ze(), a = rn(), c = 0, h = i; c < h.length; c++) {
                  f = h[c], l = e.qn(f.metadata.name), f.document && (s = s.add(l)), u = u.insert(l, e.Un(f)), a = a.insert(l, e.Kn(f.metadata.readTime));
                }

                return d = n.On.newChangeBuffer({
                  trackRemovals: !0
                }), [4
                /*yield*/
                , Wi(n, function (t) {
                  // It is OK that the path used for the query is not valid, because this will
                  // not be read and queried.
                  return ne(Yt(H.fromString("__bundle__/docs/" + t)));
                }(o))];

              case 1:
                // Allocates a target to hold all document keys from the bundle, such that
                // they will not get garbage collected right away.
                return p = r.sent(), [2
                /*return*/
                , n.persistence.runTransaction("Apply bundle documents", "readwrite", function (t) {
                  return Gi(t, d, u, K.min(), a).next(function (e) {
                    return d.apply(t), e;
                  }).next(function (e) {
                    return n.qe.removeMatchingKeysForTargetId(t, p.targetId).next(function () {
                      return n.qe.addMatchingKeys(t, s, p.targetId);
                    }).next(function () {
                      return n.Mn.En(t, e);
                    }).next(function () {
                      return e;
                    });
                  });
                })];
            }
          });
        });
      }
      /**
       * Returns a promise of a boolean to indicate if the given bundle has already
       * been loaded and the create time is newer than the current loading bundle.
       */

      /**
       * Saves the given `NamedQuery` to local persistence.
       */


      function to(t, e, i) {
        return void 0 === i && (i = sn()), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, o;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                return [4
                /*yield*/
                , Wi(t, ne(zr(e.bundledQuery)))];

              case 1:
                return n = r.sent(), [2
                /*return*/
                , (o = F(t)).persistence.runTransaction("Save named query", "readwrite", function (t) {
                  var r = _n(e.readTime); // Simply save the query itself if it is older than what the SDK already
                  // has.


                  if (n.snapshotVersion.compareTo(r) >= 0) return o.Ke.saveNamedQuery(t, e); // Update existing target data because the query from the bundle is newer.

                  var s = n.withResumeToken(J.EMPTY_BYTE_STRING, r);
                  return o.kn = o.kn.insert(s.targetId, s), o.qe.updateTargetData(t, s).next(function () {
                    return o.qe.removeMatchingKeysForTargetId(t, n.targetId);
                  }).next(function () {
                    return o.qe.addMatchingKeys(t, i, n.targetId);
                  }).next(function () {
                    return o.Ke.saveNamedQuery(t, e);
                  });
                })];
            }
          });
        });
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var eo =
      /** @class */
      function () {
        function t(t) {
          this.R = t, this.Qn = new Map(), this.jn = new Map();
        }

        return t.prototype.getBundleMetadata = function (t, e) {
          return Ir.resolve(this.Qn.get(e));
        }, t.prototype.saveBundleMetadata = function (t, e) {
          /** Decodes a BundleMetadata proto into a BundleMetadata object. */
          var n;
          return this.Qn.set(e.id, {
            id: (n = e).id,
            version: n.version,
            createTime: _n(n.createTime)
          }), Ir.resolve();
        }, t.prototype.getNamedQuery = function (t, e) {
          return Ir.resolve(this.jn.get(e));
        }, t.prototype.saveNamedQuery = function (t, e) {
          return this.jn.set(e.name, function (t) {
            return {
              name: t.name,
              query: zr(t.bundledQuery),
              readTime: _n(t.readTime)
            };
          }(e)), Ir.resolve();
        }, t;
      }(),
          no =
      /** @class */
      function () {
        function t() {
          // A set of outstanding references to a document sorted by key.
          this.Wn = new $e(ro.Gn), // A set of outstanding references to a document sorted by target id.
          this.zn = new $e(ro.Hn)
          /** Returns true if the reference set contains no references. */
          ;
        }

        return t.prototype.isEmpty = function () {
          return this.Wn.isEmpty();
        },
        /** Adds a reference to the given document key for the given ID. */
        t.prototype.addReference = function (t, e) {
          var n = new ro(t, e);
          this.Wn = this.Wn.add(n), this.zn = this.zn.add(n);
        },
        /** Add references to the given document keys for the given ID. */
        t.prototype.Jn = function (t, e) {
          var n = this;
          t.forEach(function (t) {
            return n.addReference(t, e);
          });
        },
        /**
         * Removes a reference to the given document key for the given
         * ID.
         */
        t.prototype.removeReference = function (t, e) {
          this.Yn(new ro(t, e));
        }, t.prototype.Xn = function (t, e) {
          var n = this;
          t.forEach(function (t) {
            return n.removeReference(t, e);
          });
        },
        /**
         * Clears all references with a given ID. Calls removeRef() for each key
         * removed.
         */
        t.prototype.Zn = function (t) {
          var e = this,
              n = new ct(new H([])),
              r = new ro(n, t),
              i = new ro(n, t + 1),
              o = [];
          return this.zn.forEachInRange([r, i], function (t) {
            e.Yn(t), o.push(t.key);
          }), o;
        }, t.prototype.ts = function () {
          var t = this;
          this.Wn.forEach(function (e) {
            return t.Yn(e);
          });
        }, t.prototype.Yn = function (t) {
          this.Wn = this.Wn["delete"](t), this.zn = this.zn["delete"](t);
        }, t.prototype.es = function (t) {
          var e = new ct(new H([])),
              n = new ro(e, t),
              r = new ro(e, t + 1),
              i = sn();
          return this.zn.forEachInRange([n, r], function (t) {
            i = i.add(t.key);
          }), i;
        }, t.prototype.containsKey = function (t) {
          var e = new ro(t, 0),
              n = this.Wn.firstAfterOrEqual(e);
          return null !== n && t.isEqual(n.key);
        }, t;
      }(),
          ro =
      /** @class */
      function () {
        function t(t, e) {
          this.key = t, this.ns = e
          /** Compare by key then by ID */
          ;
        }

        return t.Gn = function (t, e) {
          return ct.comparator(t.key, e.key) || q(t.ns, e.ns);
        },
        /** Compare by ID then by key */
        t.Hn = function (t, e) {
          return q(t.ns, e.ns) || ct.comparator(t.key, e.key);
        }, t;
      }(),
          io =
      /** @class */
      function () {
        function t(t, e) {
          this.Ut = t, this.referenceDelegate = e,
          /**
               * The set of all mutations that have been sent but not yet been applied to
               * the backend.
               */
          this._n = [],
          /** Next value to use when assigning sequential IDs to each mutation batch. */
          this.ss = 1,
          /** An ordered mapping between documents and the mutations batch IDs. */
          this.rs = new $e(ro.Gn);
        }

        return t.prototype.checkEmpty = function (t) {
          return Ir.resolve(0 === this._n.length);
        }, t.prototype.addMutationBatch = function (t, e, n, r) {
          var i = this.ss;
          this.ss++, this._n.length > 0 && this._n[this._n.length - 1];
          var o = new Lr(i, e, n, r);

          this._n.push(o); // Track references by document key and index collection parents.


          for (var s = 0, u = r; s < u.length; s++) {
            var a = u[s];
            this.rs = this.rs.add(new ro(a.key, i)), this.Ut.addToCollectionParentIndex(t, a.key.path.popLast());
          }

          return Ir.resolve(o);
        }, t.prototype.lookupMutationBatch = function (t, e) {
          return Ir.resolve(this.os(e));
        }, t.prototype.getNextMutationBatchAfterBatchId = function (t, e) {
          var n = e + 1,
              r = this.cs(n),
              i = r < 0 ? 0 : r; // The requested batchId may still be out of range so normalize it to the
          // start of the queue.

          return Ir.resolve(this._n.length > i ? this._n[i] : null);
        }, t.prototype.getHighestUnacknowledgedBatchId = function () {
          return Ir.resolve(0 === this._n.length ? -1 : this.ss - 1);
        }, t.prototype.getAllMutationBatches = function (t) {
          return Ir.resolve(this._n.slice());
        }, t.prototype.getAllMutationBatchesAffectingDocumentKey = function (t, e) {
          var n = this,
              r = new ro(e, 0),
              i = new ro(e, Number.POSITIVE_INFINITY),
              o = [];
          return this.rs.forEachInRange([r, i], function (t) {
            var e = n.os(t.ns);
            o.push(e);
          }), Ir.resolve(o);
        }, t.prototype.getAllMutationBatchesAffectingDocumentKeys = function (t, e) {
          var n = this,
              r = new $e(q);
          return e.forEach(function (t) {
            var e = new ro(t, 0),
                i = new ro(t, Number.POSITIVE_INFINITY);
            n.rs.forEachInRange([e, i], function (t) {
              r = r.add(t.ns);
            });
          }), Ir.resolve(this.us(r));
        }, t.prototype.getAllMutationBatchesAffectingQuery = function (t, e) {
          // Use the query path as a prefix for testing if a document matches the
          // query.
          var n = e.path,
              r = n.length + 1,
              i = n; // Construct a document reference for actually scanning the index. Unlike
          // the prefix the document key in this reference must have an even number of
          // segments. The empty segment can be used a suffix of the query path
          // because it precedes all other segments in an ordered traversal.

          ct.isDocumentKey(i) || (i = i.child(""));
          var o = new ro(new ct(i), 0),
              s = new $e(q); // Find unique batchIDs referenced by all documents potentially matching the
          // query.

          return this.rs.forEachWhile(function (t) {
            var e = t.key.path;
            return !!n.isPrefixOf(e) && ( // Rows with document keys more than one segment longer than the query
            // path can't be matches. For example, a query on 'rooms' can't match
            // the document /rooms/abc/messages/xyx.
            // TODO(mcg): we'll need a different scanner when we implement
            // ancestor queries.
            e.length === r && (s = s.add(t.ns)), !0);
          }, o), Ir.resolve(this.us(s));
        }, t.prototype.us = function (t) {
          var e = this,
              n = []; // Construct an array of matching batches, sorted by batchID to ensure that
          // multiple mutations affecting the same document key are applied in order.

          return t.forEach(function (t) {
            var r = e.os(t);
            null !== r && n.push(r);
          }), n;
        }, t.prototype.removeMutationBatch = function (t, e) {
          var n = this;
          P(0 === this.hs(e.batchId, "removed")), this._n.shift();
          var r = this.rs;
          return Ir.forEach(e.mutations, function (i) {
            var o = new ro(i.key, e.batchId);
            return r = r["delete"](o), n.referenceDelegate.markPotentiallyOrphaned(t, i.key);
          }).next(function () {
            n.rs = r;
          });
        }, t.prototype.Gt = function (t) {// No-op since the memory mutation queue does not maintain a separate cache.
        }, t.prototype.containsKey = function (t, e) {
          var n = new ro(e, 0),
              r = this.rs.firstAfterOrEqual(n);
          return Ir.resolve(e.isEqual(r && r.key));
        }, t.prototype.performConsistencyCheck = function (t) {
          return this._n.length, Ir.resolve();
        },
        /**
         * Finds the index of the given batchId in the mutation queue and asserts that
         * the resulting index is within the bounds of the queue.
         *
         * @param batchId - The batchId to search for
         * @param action - A description of what the caller is doing, phrased in passive
         * form (e.g. "acknowledged" in a routine that acknowledges batches).
         */
        t.prototype.hs = function (t, e) {
          return this.cs(t);
        },
        /**
         * Finds the index of the given batchId in the mutation queue. This operation
         * is O(1).
         *
         * @returns The computed index of the batch with the given batchId, based on
         * the state of the queue. Note this index can be negative if the requested
         * batchId has already been remvoed from the queue or past the end of the
         * queue if the batchId is larger than the last added batch.
         */
        t.prototype.cs = function (t) {
          return 0 === this._n.length ? 0 : t - this._n[0].batchId; // Examine the front of the queue to figure out the difference between the
          // batchId and indexes in the array. Note that since the queue is ordered
          // by batchId, if the first batch has a larger batchId then the requested
          // batchId doesn't exist in the queue.
        },
        /**
         * A version of lookupMutationBatch that doesn't return a promise, this makes
         * other functions that uses this code easier to read and more efficent.
         */
        t.prototype.os = function (t) {
          var e = this.cs(t);
          return e < 0 || e >= this._n.length ? null : this._n[e];
        }, t;
      }(),
          oo =
      /** @class */
      function () {
        /**
         * @param sizer - Used to assess the size of a document. For eager GC, this is
         * expected to just return 0 to avoid unnecessarily doing the work of
         * calculating the size.
         */
        function t(t, e) {
          this.Ut = t, this.ls = e,
          /** Underlying cache of documents and their read times. */
          this.docs = new We(ct.comparator),
          /** Size of all cached documents. */
          this.size = 0
          /**
          * Adds the supplied entry to the cache and updates the cache size as appropriate.
          *
          * All calls of `addEntry`  are required to go through the RemoteDocumentChangeBuffer
          * returned by `newChangeBuffer()`.
          */
          ;
        }

        return t.prototype.addEntry = function (t, e, n) {
          var r = e.key,
              i = this.docs.get(r),
              o = i ? i.size : 0,
              s = this.ls(e);
          return this.docs = this.docs.insert(r, {
            document: e.clone(),
            size: s,
            readTime: n
          }), this.size += s - o, this.Ut.addToCollectionParentIndex(t, r.path.popLast());
        },
        /**
         * Removes the specified entry from the cache and updates the cache size as appropriate.
         *
         * All calls of `removeEntry` are required to go through the RemoteDocumentChangeBuffer
         * returned by `newChangeBuffer()`.
         */
        t.prototype.removeEntry = function (t) {
          var e = this.docs.get(t);
          e && (this.docs = this.docs.remove(t), this.size -= e.size);
        }, t.prototype.getEntry = function (t, e) {
          var n = this.docs.get(e);
          return Ir.resolve(n ? n.document.clone() : Nt.newInvalidDocument(e));
        }, t.prototype.getEntries = function (t, e) {
          var n = this,
              r = Ze();
          return e.forEach(function (t) {
            var e = n.docs.get(t);
            r = r.insert(t, e ? e.document.clone() : Nt.newInvalidDocument(t));
          }), Ir.resolve(r);
        }, t.prototype.getDocumentsMatchingQuery = function (t, e, n) {
          for (var r = Ze(), i = new ct(e.path.child("")), o = this.docs.getIteratorFrom(i) // Documents are ordered by key, so we can use a prefix scan to narrow down
          // the documents we need to match the query against.
          ; o.hasNext();) {
            var s = o.getNext(),
                u = s.key,
                a = s.value,
                c = a.document,
                h = a.readTime;
            if (!e.path.isPrefixOf(u.path)) break;
            h.compareTo(n) <= 0 || ue(e, c) && (r = r.insert(c.key, c.clone()));
          }

          return Ir.resolve(r);
        }, t.prototype.fs = function (t, e) {
          return Ir.forEach(this.docs, function (t) {
            return e(t);
          });
        }, t.prototype.newChangeBuffer = function (t) {
          // `trackRemovals` is ignores since the MemoryRemoteDocumentCache keeps
          // a separate changelog and does not need special handling for removals.
          return new so(this);
        }, t.prototype.getSize = function (t) {
          return Ir.resolve(this.size);
        }, t;
      }(),
          so =
      /** @class */
      function (e) {
        function n(t) {
          var n = this;
          return (n = e.call(this) || this).Ie = t, n;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.applyChanges = function (t) {
          var e = this,
              n = [];
          return this.changes.forEach(function (r, i) {
            i.document.isValidDocument() ? n.push(e.Ie.addEntry(t, i.document, e.getReadTime(r))) : e.Ie.removeEntry(r);
          }), Ir.waitFor(n);
        }, n.prototype.getFromCache = function (t, e) {
          return this.Ie.getEntry(t, e);
        }, n.prototype.getAllFromCache = function (t, e) {
          return this.Ie.getEntries(t, e);
        }, n;
      }(Ti),
          uo =
      /** @class */
      function () {
        function t(t) {
          this.persistence = t,
          /**
               * Maps a target to the data about that target
               */
          this.ds = new Ii(function (t) {
            return kt(t);
          }, Ct),
          /** The last received snapshot version. */
          this.lastRemoteSnapshotVersion = K.min(),
          /** The highest numbered target ID encountered. */
          this.highestTargetId = 0,
          /** The highest sequence number encountered. */
          this.ws = 0,
          /**
               * A ordered bidirectional mapping between documents and the remote target
               * IDs.
               */
          this._s = new no(), this.targetCount = 0, this.ys = ci.Jt();
        }

        return t.prototype.forEachTarget = function (t, e) {
          return this.ds.forEach(function (t, n) {
            return e(n);
          }), Ir.resolve();
        }, t.prototype.getLastRemoteSnapshotVersion = function (t) {
          return Ir.resolve(this.lastRemoteSnapshotVersion);
        }, t.prototype.getHighestSequenceNumber = function (t) {
          return Ir.resolve(this.ws);
        }, t.prototype.allocateTargetId = function (t) {
          return this.highestTargetId = this.ys.next(), Ir.resolve(this.highestTargetId);
        }, t.prototype.setTargetsMetadata = function (t, e, n) {
          return n && (this.lastRemoteSnapshotVersion = n), e > this.ws && (this.ws = e), Ir.resolve();
        }, t.prototype.te = function (t) {
          this.ds.set(t.target, t);
          var e = t.targetId;
          e > this.highestTargetId && (this.ys = new ci(e), this.highestTargetId = e), t.sequenceNumber > this.ws && (this.ws = t.sequenceNumber);
        }, t.prototype.addTargetData = function (t, e) {
          return this.te(e), this.targetCount += 1, Ir.resolve();
        }, t.prototype.updateTargetData = function (t, e) {
          return this.te(e), Ir.resolve();
        }, t.prototype.removeTargetData = function (t, e) {
          return this.ds["delete"](e.target), this._s.Zn(e.targetId), this.targetCount -= 1, Ir.resolve();
        }, t.prototype.removeTargets = function (t, e, n) {
          var r = this,
              i = 0,
              o = [];
          return this.ds.forEach(function (s, u) {
            u.sequenceNumber <= e && null === n.get(u.targetId) && (r.ds["delete"](s), o.push(r.removeMatchingKeysForTargetId(t, u.targetId)), i++);
          }), Ir.waitFor(o).next(function () {
            return i;
          });
        }, t.prototype.getTargetCount = function (t) {
          return Ir.resolve(this.targetCount);
        }, t.prototype.getTargetData = function (t, e) {
          var n = this.ds.get(e) || null;
          return Ir.resolve(n);
        }, t.prototype.addMatchingKeys = function (t, e, n) {
          return this._s.Jn(e, n), Ir.resolve();
        }, t.prototype.removeMatchingKeys = function (t, e, n) {
          this._s.Xn(e, n);

          var r = this.persistence.referenceDelegate,
              i = [];
          return r && e.forEach(function (e) {
            i.push(r.markPotentiallyOrphaned(t, e));
          }), Ir.waitFor(i);
        }, t.prototype.removeMatchingKeysForTargetId = function (t, e) {
          return this._s.Zn(e), Ir.resolve();
        }, t.prototype.getMatchingKeysForTargetId = function (t, e) {
          var n = this._s.es(e);

          return Ir.resolve(n);
        }, t.prototype.containsKey = function (t, e) {
          return Ir.resolve(this._s.containsKey(e));
        }, t;
      }(),
          ao =
      /** @class */
      function () {
        /**
         * The constructor accepts a factory for creating a reference delegate. This
         * allows both the delegate and this instance to have strong references to
         * each other without having nullable fields that would then need to be
         * checked or asserted on every access.
         */
        function t(t, e) {
          var n = this;
          this.gs = {}, this.Ne = new S(0), this.xe = !1, this.xe = !0, this.referenceDelegate = t(this), this.qe = new uo(this), this.Ut = new $r(), this.Ue = function (t, e) {
            return new oo(t, function (t) {
              return n.referenceDelegate.ps(t);
            });
          }(this.Ut), this.R = new Fr(e), this.Ke = new eo(this.R);
        }

        return t.prototype.start = function () {
          return Promise.resolve();
        }, t.prototype.shutdown = function () {
          // No durable state to ensure is closed on shutdown.
          return this.xe = !1, Promise.resolve();
        }, Object.defineProperty(t.prototype, "started", {
          get: function get() {
            return this.xe;
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.setDatabaseDeletedListener = function () {// No op.
        }, t.prototype.setNetworkEnabled = function () {// No op.
        }, t.prototype.getIndexManager = function () {
          return this.Ut;
        }, t.prototype.getMutationQueue = function (t) {
          var e = this.gs[t.toKey()];
          return e || (e = new io(this.Ut, this.referenceDelegate), this.gs[t.toKey()] = e), e;
        }, t.prototype.getTargetCache = function () {
          return this.qe;
        }, t.prototype.getRemoteDocumentCache = function () {
          return this.Ue;
        }, t.prototype.getBundleCache = function () {
          return this.Ke;
        }, t.prototype.runTransaction = function (t, e, n) {
          var r = this;
          C("MemoryPersistence", "Starting transaction:", t);
          var i = new co(this.Ne.next());
          return this.referenceDelegate.Es(), n(i).next(function (t) {
            return r.referenceDelegate.Ts(i).next(function () {
              return t;
            });
          }).toPromise().then(function (t) {
            return i.raiseOnCommittedEvent(), t;
          });
        }, t.prototype.Is = function (t, e) {
          return Ir.or(Object.values(this.gs).map(function (n) {
            return function () {
              return n.containsKey(t, e);
            };
          }));
        }, t;
      }(),
          co =
      /** @class */
      function (e) {
        function n(t) {
          var n = this;
          return (n = e.call(this) || this).currentSequenceNumber = t, n;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n;
      }(wr),
          ho =
      /** @class */
      function () {
        function t(t) {
          this.persistence = t,
          /** Tracks all documents that are active in Query views. */
          this.As = new no(),
          /** The list of documents that are potentially GCed after each transaction. */
          this.Rs = null;
        }

        return t.bs = function (e) {
          return new t(e);
        }, Object.defineProperty(t.prototype, "vs", {
          get: function get() {
            if (this.Rs) return this.Rs;
            throw O();
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.addReference = function (t, e, n) {
          return this.As.addReference(n, e), this.vs["delete"](n.toString()), Ir.resolve();
        }, t.prototype.removeReference = function (t, e, n) {
          return this.As.removeReference(n, e), this.vs.add(n.toString()), Ir.resolve();
        }, t.prototype.markPotentiallyOrphaned = function (t, e) {
          return this.vs.add(e.toString()), Ir.resolve();
        }, t.prototype.removeTarget = function (t, e) {
          var n = this;
          this.As.Zn(e.targetId).forEach(function (t) {
            return n.vs.add(t.toString());
          });
          var r = this.persistence.getTargetCache();
          return r.getMatchingKeysForTargetId(t, e.targetId).next(function (t) {
            t.forEach(function (t) {
              return n.vs.add(t.toString());
            });
          }).next(function () {
            return r.removeTargetData(t, e);
          });
        }, t.prototype.Es = function () {
          this.Rs = new Set();
        }, t.prototype.Ts = function (t) {
          var e = this,
              n = this.persistence.getRemoteDocumentCache().newChangeBuffer(); // Remove newly orphaned documents.

          return Ir.forEach(this.vs, function (r) {
            var i = ct.fromPath(r);
            return e.Ps(t, i).next(function (t) {
              t || n.removeEntry(i);
            });
          }).next(function () {
            return e.Rs = null, n.apply(t);
          });
        }, t.prototype.updateLimboDocument = function (t, e) {
          var n = this;
          return this.Ps(t, e).next(function (t) {
            t ? n.vs["delete"](e.toString()) : n.vs.add(e.toString());
          });
        }, t.prototype.ps = function (t) {
          // For eager GC, we don't care about the document size, there are no size thresholds.
          return 0;
        }, t.prototype.Ps = function (t, e) {
          var n = this;
          return Ir.or([function () {
            return Ir.resolve(n.As.containsKey(e));
          }, function () {
            return n.persistence.getTargetCache().containsKey(t, e);
          }, function () {
            return n.persistence.Is(t, e);
          }]);
        }, t;
      }(),
          fo =
      /** @class */
      function () {
        function t(t) {
          this.uid = t;
        }

        return t.prototype.isAuthenticated = function () {
          return null != this.uid;
        },
        /**
         * Returns a key representing this user, suitable for inclusion in a
         * dictionary.
         */
        t.prototype.toKey = function () {
          return this.isAuthenticated() ? "uid:" + this.uid : "anonymous-user";
        }, t.prototype.isEqual = function (t) {
          return t.uid === this.uid;
        }, t;
      }();
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * A collection of references to a document from some kind of numbered entity
       * (either a target ID or batch ID). As references are added to or removed from
       * the set corresponding events are emitted to a registered garbage collector.
       *
       * Each reference is represented by a DocumentReference object. Each of them
       * contains enough information to uniquely identify the reference. They are all
       * stored primarily in a set sorted by key. A document is considered garbage if
       * there's no references in that set (this can be efficiently checked thanks to
       * sorting by key).
       *
       * ReferenceSet also keeps a secondary set that contains references sorted by
       * IDs. This one is used to efficiently implement removal of all references by
       * some target ID.
       */

      /** Assembles the key for a client state in WebStorage */


      function lo(t, e) {
        return "firestore_clients_" + t + "_" + e;
      } // The format of the WebStorage key that stores the mutation state is:
      //     firestore_mutations_<persistence_prefix>_<batch_id>
      //     (for unauthenticated users)
      // or: firestore_mutations_<persistence_prefix>_<batch_id>_<user_uid>
      // 'user_uid' is last to avoid needing to escape '_' characters that it might
      // contain.

      /** Assembles the key for a mutation batch in WebStorage */


      function po(t, e, n) {
        var r = "firestore_mutations_" + t + "_" + n;
        return e.isAuthenticated() && (r += "_" + e.uid), r;
      } // The format of the WebStorage key that stores a query target's metadata is:
      //     firestore_targets_<persistence_prefix>_<target_id>

      /** Assembles the key for a query state in WebStorage */


      function yo(t, e) {
        return "firestore_targets_" + t + "_" + e;
      } // The WebStorage prefix that stores the primary tab's online state. The
      // format of the key is:
      //     firestore_online_state_<persistence_prefix>

      /**
       * Holds the state of a mutation batch, including its user ID, batch ID and
       * whether the batch is 'pending', 'acknowledged' or 'rejected'.
       */
      // Visible for testing

      /** A user with a null UID. */


      fo.UNAUTHENTICATED = new fo(null), // TODO(mikelehen): Look into getting a proper uid-equivalent for
      // non-FirebaseAuth providers.
      fo.GOOGLE_CREDENTIALS = new fo("google-credentials-uid"), fo.FIRST_PARTY = new fo("first-party-uid"), fo.MOCK_USER = new fo("mock-user");

      var vo =
      /** @class */
      function () {
        function t(t, e, n, r) {
          this.user = t, this.batchId = e, this.state = n, this.error = r
          /**
          * Parses a MutationMetadata from its JSON representation in WebStorage.
          * Logs a warning and returns null if the format of the data is not valid.
          */
          ;
        }

        return t.Vs = function (e, n, r) {
          var i,
              o = JSON.parse(r),
              s = "object" == typeof o && -1 !== ["pending", "acknowledged", "rejected"].indexOf(o.state) && (void 0 === o.error || "object" == typeof o.error);
          return s && o.error && (s = "string" == typeof o.error.message && "string" == typeof o.error.code) && (i = new D(o.error.code, o.error.message)), s ? new t(e, n, o.state, i) : (x("SharedClientState", "Failed to parse mutation state for ID '" + n + "': " + r), null);
        }, t.prototype.Ss = function () {
          var t = {
            state: this.state,
            updateTimeMs: Date.now()
          };
          return this.error && (t.error = {
            code: this.error.code,
            message: this.error.message
          }), JSON.stringify(t);
        }, t;
      }(),
          mo =
      /** @class */
      function () {
        function t(t, e, n) {
          this.targetId = t, this.state = e, this.error = n
          /**
          * Parses a QueryTargetMetadata from its JSON representation in WebStorage.
          * Logs a warning and returns null if the format of the data is not valid.
          */
          ;
        }

        return t.Vs = function (e, n) {
          var r,
              i = JSON.parse(n),
              o = "object" == typeof i && -1 !== ["not-current", "current", "rejected"].indexOf(i.state) && (void 0 === i.error || "object" == typeof i.error);
          return o && i.error && (o = "string" == typeof i.error.message && "string" == typeof i.error.code) && (r = new D(i.error.code, i.error.message)), o ? new t(e, i.state, r) : (x("SharedClientState", "Failed to parse target state for ID '" + e + "': " + n), null);
        }, t.prototype.Ss = function () {
          var t = {
            state: this.state,
            updateTimeMs: Date.now()
          };
          return this.error && (t.error = {
            code: this.error.code,
            message: this.error.message
          }), JSON.stringify(t);
        }, t;
      }(),
          go =
      /** @class */
      function () {
        function t(t, e) {
          this.clientId = t, this.activeTargetIds = e
          /**
          * Parses a RemoteClientState from the JSON representation in WebStorage.
          * Logs a warning and returns null if the format of the data is not valid.
          */
          ;
        }

        return t.Vs = function (e, n) {
          for (var r = JSON.parse(n), i = "object" == typeof r && r.activeTargetIds instanceof Array, o = an(), s = 0; i && s < r.activeTargetIds.length; ++s) {
            i = at(r.activeTargetIds[s]), o = o.add(r.activeTargetIds[s]);
          }

          return i ? new t(e, o) : (x("SharedClientState", "Failed to parse client data for instance '" + e + "': " + n), null);
        }, t;
      }(),
          wo =
      /** @class */
      function () {
        function t(t, e) {
          this.clientId = t, this.onlineState = e
          /**
          * Parses a SharedOnlineState from its JSON representation in WebStorage.
          * Logs a warning and returns null if the format of the data is not valid.
          */
          ;
        }

        return t.Vs = function (e) {
          var n = JSON.parse(e);
          return "object" == typeof n && -1 !== ["Unknown", "Online", "Offline"].indexOf(n.onlineState) && "string" == typeof n.clientId ? new t(n.clientId, n.onlineState) : (x("SharedClientState", "Failed to parse online state: " + e), null);
        }, t;
      }(),
          bo =
      /** @class */
      function () {
        function t() {
          this.activeTargetIds = an();
        }

        return t.prototype.Ds = function (t) {
          this.activeTargetIds = this.activeTargetIds.add(t);
        }, t.prototype.Cs = function (t) {
          this.activeTargetIds = this.activeTargetIds["delete"](t);
        },
        /**
         * Converts this entry into a JSON-encoded format we can use for WebStorage.
         * Does not encode `clientId` as it is part of the key in WebStorage.
         */
        t.prototype.Ss = function () {
          var t = {
            activeTargetIds: this.activeTargetIds.toArray(),
            updateTimeMs: Date.now()
          };
          return JSON.stringify(t);
        }, t;
      }(),
          Io =
      /** @class */
      function () {
        function t(t, e, n, r, i) {
          this.window = t, this.Se = e, this.persistenceKey = n, this.Ns = r, this.syncEngine = null, this.onlineStateHandler = null, this.sequenceNumberHandler = null, this.xs = this.ks.bind(this), this.Fs = new We(q), this.started = !1,
          /**
               * Captures WebStorage events that occur before `start()` is called. These
               * events are replayed once `WebStorageSharedClientState` is started.
               */
          this.$s = []; // Escape the special characters mentioned here:
          // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions

          var o = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
          this.storage = this.window.localStorage, this.currentUser = i, this.Os = lo(this.persistenceKey, this.Ns), this.Ms =
          /** Assembles the key for the current sequence number. */
          function (t) {
            return "firestore_sequence_number_" + t;
          }(this.persistenceKey), this.Fs = this.Fs.insert(this.Ns, new bo()), this.Ls = new RegExp("^firestore_clients_" + o + "_([^_]*)$"), this.Bs = new RegExp("^firestore_mutations_" + o + "_(\\d+)(?:_(.*))?$"), this.qs = new RegExp("^firestore_targets_" + o + "_(\\d+)$"), this.Us =
          /** Assembles the key for the online state of the primary tab. */
          function (t) {
            return "firestore_online_state_" + t;
          }(this.persistenceKey), this.Ks = function (t) {
            return "firestore_bundle_loaded_" + t;
          }(this.persistenceKey), // Rather than adding the storage observer during start(), we add the
          // storage observer during initialization. This ensures that we collect
          // events before other components populate their initial state (during their
          // respective start() calls). Otherwise, we might for example miss a
          // mutation that is added after LocalStore's start() processed the existing
          // mutations but before we observe WebStorage events.
          this.window.addEventListener("storage", this.xs);
        }
        /** Returns 'true' if WebStorage is available in the current environment. */


        return t.yt = function (t) {
          return !(!t || !t.localStorage);
        }, t.prototype.start = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var t,
                e,
                n,
                i,
                o,
                s,
                u,
                a,
                c,
                h,
                f,
                l = this;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
              switch (r.label) {
                case 0:
                  return [4
                  /*yield*/
                  , this.syncEngine.fn()];

                case 1:
                  for (t = r.sent(), e = 0, n = t; e < n.length; e++) {
                    (i = n[e]) !== this.Ns && (o = this.getItem(lo(this.persistenceKey, i))) && (s = go.Vs(i, o)) && (this.Fs = this.Fs.insert(s.clientId, s));
                  }

                  for (this.Qs(), (u = this.storage.getItem(this.Us)) && (a = this.js(u)) && this.Ws(a), c = 0, h = this.$s; c < h.length; c++) {
                    f = h[c], this.ks(f);
                  }

                  return this.$s = [], // Register a window unload hook to remove the client metadata entry from
                  // WebStorage even if `shutdown()` was not called.
                  this.window.addEventListener("pagehide", function () {
                    return l.shutdown();
                  }), this.started = !0, [2
                  /*return*/
                  ];
              }
            });
          });
        }, t.prototype.writeSequenceNumber = function (t) {
          this.setItem(this.Ms, JSON.stringify(t));
        }, t.prototype.getAllActiveQueryTargets = function () {
          return this.Gs(this.Fs);
        }, t.prototype.isActiveQueryTarget = function (t) {
          var e = !1;
          return this.Fs.forEach(function (n, r) {
            r.activeTargetIds.has(t) && (e = !0);
          }), e;
        }, t.prototype.addPendingMutation = function (t) {
          this.zs(t, "pending");
        }, t.prototype.updateMutationState = function (t, e, n) {
          this.zs(t, e, n), // Once a final mutation result is observed by other clients, they no longer
          // access the mutation's metadata entry. Since WebStorage replays events
          // in order, it is safe to delete the entry right after updating it.
          this.Hs(t);
        }, t.prototype.addLocalQueryTarget = function (t) {
          var e = "not-current"; // Lookup an existing query state if the target ID was already registered
          // by another tab

          if (this.isActiveQueryTarget(t)) {
            var n = this.storage.getItem(yo(this.persistenceKey, t));

            if (n) {
              var r = mo.Vs(t, n);
              r && (e = r.state);
            }
          }

          return this.Js.Ds(t), this.Qs(), e;
        }, t.prototype.removeLocalQueryTarget = function (t) {
          this.Js.Cs(t), this.Qs();
        }, t.prototype.isLocalQueryTarget = function (t) {
          return this.Js.activeTargetIds.has(t);
        }, t.prototype.clearQueryState = function (t) {
          this.removeItem(yo(this.persistenceKey, t));
        }, t.prototype.updateQueryState = function (t, e, n) {
          this.Ys(t, e, n);
        }, t.prototype.handleUserChange = function (t, e, n) {
          var r = this;
          e.forEach(function (t) {
            r.Hs(t);
          }), this.currentUser = t, n.forEach(function (t) {
            r.addPendingMutation(t);
          });
        }, t.prototype.setOnlineState = function (t) {
          this.Xs(t);
        }, t.prototype.notifyBundleLoaded = function () {
          this.Zs();
        }, t.prototype.shutdown = function () {
          this.started && (this.window.removeEventListener("storage", this.xs), this.removeItem(this.Os), this.started = !1);
        }, t.prototype.getItem = function (t) {
          var e = this.storage.getItem(t);
          return C("SharedClientState", "READ", t, e), e;
        }, t.prototype.setItem = function (t, e) {
          C("SharedClientState", "SET", t, e), this.storage.setItem(t, e);
        }, t.prototype.removeItem = function (t) {
          C("SharedClientState", "REMOVE", t), this.storage.removeItem(t);
        }, t.prototype.ks = function (t) {
          var e = this,
              i = t; // Note: The function is typed to take Event to be interface-compatible with
          // `Window.addEventListener`.

          if (i.storageArea === this.storage) {
            if (C("SharedClientState", "EVENT", i.key, i.newValue), i.key === this.Os) return void x("Received WebStorage notification for local change. Another client might have garbage-collected our state");
            this.Se.enqueueRetryable(function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(e, void 0, void 0, function () {
                var t, e, n, o, s, u;
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                  if (this.started) {
                    if (null !== i.key) if (this.Ls.test(i.key)) {
                      if (null == i.newValue) return t = this.ti(i.key), [2
                      /*return*/
                      , this.ei(t, null)];
                      if (e = this.ni(i.key, i.newValue)) return [2
                      /*return*/
                      , this.ei(e.clientId, e)];
                    } else if (this.Bs.test(i.key)) {
                      if (null !== i.newValue && (n = this.si(i.key, i.newValue))) return [2
                      /*return*/
                      , this.ii(n)];
                    } else if (this.qs.test(i.key)) {
                      if (null !== i.newValue && (o = this.ri(i.key, i.newValue))) return [2
                      /*return*/
                      , this.oi(o)];
                    } else if (i.key === this.Us) {
                      if (null !== i.newValue && (s = this.js(i.newValue))) return [2
                      /*return*/
                      , this.Ws(s)];
                    } else if (i.key === this.Ms) (u = function (t) {
                      var e = S.o;
                      if (null != t) try {
                        var n = JSON.parse(t);
                        P("number" == typeof n), e = n;
                      } catch (t) {
                        x("SharedClientState", "Failed to read sequence number from WebStorage", t);
                      }
                      return e;
                    }(i.newValue)) !== S.o && this.sequenceNumberHandler(u);else if (i.key === this.Ks) return [2
                    /*return*/
                    , this.syncEngine.ci()];
                  } else this.$s.push(i);

                  return [2
                  /*return*/
                  ];
                });
              });
            });
          }
        }, Object.defineProperty(t.prototype, "Js", {
          get: function get() {
            return this.Fs.get(this.Ns);
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.Qs = function () {
          this.setItem(this.Os, this.Js.Ss());
        }, t.prototype.zs = function (t, e, n) {
          var r = new vo(this.currentUser, t, e, n),
              i = po(this.persistenceKey, this.currentUser, t);
          this.setItem(i, r.Ss());
        }, t.prototype.Hs = function (t) {
          var e = po(this.persistenceKey, this.currentUser, t);
          this.removeItem(e);
        }, t.prototype.Xs = function (t) {
          var e = {
            clientId: this.Ns,
            onlineState: t
          };
          this.storage.setItem(this.Us, JSON.stringify(e));
        }, t.prototype.Ys = function (t, e, n) {
          var r = yo(this.persistenceKey, t),
              i = new mo(t, e, n);
          this.setItem(r, i.Ss());
        }, t.prototype.Zs = function () {
          this.setItem(this.Ks, "value-not-used");
        },
        /**
         * Parses a client state key in WebStorage. Returns null if the key does not
         * match the expected key format.
         */
        t.prototype.ti = function (t) {
          var e = this.Ls.exec(t);
          return e ? e[1] : null;
        },
        /**
         * Parses a client state in WebStorage. Returns 'null' if the value could not
         * be parsed.
         */
        t.prototype.ni = function (t, e) {
          var n = this.ti(t);
          return go.Vs(n, e);
        },
        /**
         * Parses a mutation batch state in WebStorage. Returns 'null' if the value
         * could not be parsed.
         */
        t.prototype.si = function (t, e) {
          var n = this.Bs.exec(t),
              r = Number(n[1]),
              i = void 0 !== n[2] ? n[2] : null;
          return vo.Vs(new fo(i), r, e);
        },
        /**
         * Parses a query target state from WebStorage. Returns 'null' if the value
         * could not be parsed.
         */
        t.prototype.ri = function (t, e) {
          var n = this.qs.exec(t),
              r = Number(n[1]);
          return mo.Vs(r, e);
        },
        /**
         * Parses an online state from WebStorage. Returns 'null' if the value
         * could not be parsed.
         */
        t.prototype.js = function (t) {
          return wo.Vs(t);
        }, t.prototype.ii = function (t) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
              return t.user.uid === this.currentUser.uid ? [2
              /*return*/
              , this.syncEngine.ui(t.batchId, t.state, t.error)] : (C("SharedClientState", "Ignoring mutation for non-active user " + t.user.uid), [2
              /*return*/
              ]);
            });
          });
        }, t.prototype.oi = function (t) {
          return this.syncEngine.ai(t.targetId, t.state, t.error);
        }, t.prototype.ei = function (t, e) {
          var n = this,
              r = e ? this.Fs.insert(t, e) : this.Fs.remove(t),
              i = this.Gs(this.Fs),
              o = this.Gs(r),
              s = [],
              u = [];
          return o.forEach(function (t) {
            i.has(t) || s.push(t);
          }), i.forEach(function (t) {
            o.has(t) || u.push(t);
          }), this.syncEngine.hi(s, u).then(function () {
            n.Fs = r;
          });
        }, t.prototype.Ws = function (t) {
          // We check whether the client that wrote this online state is still active
          // by comparing its client ID to the list of clients kept active in
          // IndexedDb. If a client does not update their IndexedDb client state
          // within 5 seconds, it is considered inactive and we don't emit an online
          // state event.
          this.Fs.get(t.clientId) && this.onlineStateHandler(t.onlineState);
        }, t.prototype.Gs = function (t) {
          var e = an();
          return t.forEach(function (t, n) {
            e = e.unionWith(n.activeTargetIds);
          }), e;
        }, t;
      }(),
          To =
      /** @class */
      function () {
        function t() {
          this.li = new bo(), this.fi = {}, this.onlineStateHandler = null, this.sequenceNumberHandler = null;
        }

        return t.prototype.addPendingMutation = function (t) {// No op.
        }, t.prototype.updateMutationState = function (t, e, n) {// No op.
        }, t.prototype.addLocalQueryTarget = function (t) {
          return this.li.Ds(t), this.fi[t] || "not-current";
        }, t.prototype.updateQueryState = function (t, e, n) {
          this.fi[t] = e;
        }, t.prototype.removeLocalQueryTarget = function (t) {
          this.li.Cs(t);
        }, t.prototype.isLocalQueryTarget = function (t) {
          return this.li.activeTargetIds.has(t);
        }, t.prototype.clearQueryState = function (t) {
          delete this.fi[t];
        }, t.prototype.getAllActiveQueryTargets = function () {
          return this.li.activeTargetIds;
        }, t.prototype.isActiveQueryTarget = function (t) {
          return this.li.activeTargetIds.has(t);
        }, t.prototype.start = function () {
          return this.li = new bo(), Promise.resolve();
        }, t.prototype.handleUserChange = function (t, e, n) {// No op.
        }, t.prototype.setOnlineState = function (t) {// No op.
        }, t.prototype.shutdown = function () {}, t.prototype.writeSequenceNumber = function (t) {}, t.prototype.notifyBundleLoaded = function () {// No op.
        }, t;
      }(),
          Eo =
      /** @class */
      function () {
        function t() {}

        return t.prototype.di = function (t) {// No-op.
        }, t.prototype.shutdown = function () {// No-op.
        }, t;
      }(),
          _o =
      /** @class */
      function () {
        function t() {
          var t = this;
          this.wi = function () {
            return t._i();
          }, this.mi = function () {
            return t.yi();
          }, this.gi = [], this.pi();
        }

        return t.prototype.di = function (t) {
          this.gi.push(t);
        }, t.prototype.shutdown = function () {
          window.removeEventListener("online", this.wi), window.removeEventListener("offline", this.mi);
        }, t.prototype.pi = function () {
          window.addEventListener("online", this.wi), window.addEventListener("offline", this.mi);
        }, t.prototype._i = function () {
          C("ConnectivityMonitor", "Network connectivity changed: AVAILABLE");

          for (var t = 0, e = this.gi; t < e.length; t++) {
            (0, e[t])(0
            /* AVAILABLE */
            );
          }
        }, t.prototype.yi = function () {
          C("ConnectivityMonitor", "Network connectivity changed: UNAVAILABLE");

          for (var t = 0, e = this.gi; t < e.length; t++) {
            (0, e[t])(1
            /* UNAVAILABLE */
            );
          }
        }, // TODO(chenbrian): Consider passing in window either into this component or
        // here for testing via FakeWindow.

        /** Checks that all used attributes of window are available. */
        t.yt = function () {
          return "undefined" != typeof window && void 0 !== window.addEventListener && void 0 !== window.removeEventListener;
        }, t;
      }(),
          So = {
        BatchGetDocuments: "batchGet",
        Commit: "commit",
        RunQuery: "runQuery"
      },
          No =
      /** @class */
      function () {
        function t(t) {
          this.Ei = t.Ei, this.Ti = t.Ti;
        }

        return t.prototype.Ii = function (t) {
          this.Ai = t;
        }, t.prototype.Ri = function (t) {
          this.bi = t;
        }, t.prototype.onMessage = function (t) {
          this.vi = t;
        }, t.prototype.close = function () {
          this.Ti();
        }, t.prototype.send = function (t) {
          this.Ei(t);
        }, t.prototype.Pi = function () {
          this.Ai();
        }, t.prototype.Vi = function (t) {
          this.bi(t);
        }, t.prototype.Si = function (t) {
          this.vi(t);
        }, t;
      }(),
          Do =
      /** @class */
      function (e) {
        function n(t) {
          var n = this;
          return (n = e.call(this, t) || this).forceLongPolling = t.forceLongPolling, n.autoDetectLongPolling = t.autoDetectLongPolling, n.useFetchStreams = t.useFetchStreams, n;
        }
        /**
         * Base class for all Rest-based connections to the backend (WebChannel and
         * HTTP).
         */


        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.Fi = function (t, e, n, r) {
          return new Promise(function (i, o) {
            var s = new _firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["XhrIo"]();
            s.listenOnce(_firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["EventType"].COMPLETE, function () {
              try {
                switch (s.getLastErrorCode()) {
                  case _firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["ErrorCode"].NO_ERROR:
                    var e = s.getResponseJson();
                    C("Connection", "XHR received:", JSON.stringify(e)), i(e);
                    break;

                  case _firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["ErrorCode"].TIMEOUT:
                    C("Connection", 'RPC "' + t + '" timed out'), o(new D(N.DEADLINE_EXCEEDED, "Request time out"));
                    break;

                  case _firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["ErrorCode"].HTTP_ERROR:
                    var n = s.getStatus();

                    if (C("Connection", 'RPC "' + t + '" failed with status:', n, "response text:", s.getResponseText()), n > 0) {
                      var r = s.getResponseJson().error;

                      if (r && r.status && r.message) {
                        var u = function (t) {
                          var e = t.toLowerCase().replace(/_/g, "-");
                          return Object.values(N).indexOf(e) >= 0 ? e : N.UNKNOWN;
                        }(r.status);

                        o(new D(u, r.message));
                      } else o(new D(N.UNKNOWN, "Server responded with status " + s.getStatus()));
                    } else // If we received an HTTP_ERROR but there's no status code,
                      // it's most probably a connection issue
                      o(new D(N.UNAVAILABLE, "Connection failed."));

                    break;

                  default:
                    O();
                }
              } finally {
                C("Connection", 'RPC "' + t + '" completed.');
              }
            });
            var u = JSON.stringify(r);
            s.send(e, "POST", u, n, 15);
          });
        }, n.prototype.Oi = function (t, e) {
          var n = [this.Di, "/", "google.firestore.v1.Firestore", "/", t, "/channel"],
              r = Object(_firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["createWebChannelTransport"])(),
              i = Object(_firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["getStatEventTarget"])(),
              o = {
            // Required for backend stickiness, routing behavior is based on this
            // parameter.
            httpSessionIdParam: "gsessionid",
            initMessageHeaders: {},
            messageUrlParams: {
              // This param is used to improve routing and project isolation by the
              // backend and must be included in every request.
              database: "projects/" + this.databaseId.projectId + "/databases/" + this.databaseId.database
            },
            sendRawJson: !0,
            supportsCrossDomainXhr: !0,
            internalChannelParams: {
              // Override the default timeout (randomized between 10-20 seconds) since
              // a large write batch on a slow internet connection may take a long
              // time to send to the backend. Rather than have WebChannel impose a
              // tight timeout which could lead to infinite timeouts and retries, we
              // set it very large (5-10 minutes) and rely on the browser's builtin
              // timeouts to kick in if the request isn't working.
              forwardChannelRequestTimeoutMs: 6e5
            },
            forceLongPolling: this.forceLongPolling,
            detectBufferingProxy: this.autoDetectLongPolling
          };
          this.useFetchStreams && (o.xmlHttpFactory = new _firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["FetchXmlHttpFactory"]({})), this.ki(o.initMessageHeaders, e), // Sending the custom headers we just added to request.initMessageHeaders
          // (Authorization, etc.) will trigger the browser to make a CORS preflight
          // request because the XHR will no longer meet the criteria for a "simple"
          // CORS request:
          // https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Simple_requests
          // Therefore to avoid the CORS preflight request (an extra network
          // roundtrip), we use the httpHeadersOverwriteParam option to specify that
          // the headers should instead be encoded into a special "$httpHeaders" query
          // parameter, which is recognized by the webchannel backend. This is
          // formally defined here:
          // https://github.com/google/closure-library/blob/b0e1815b13fb92a46d7c9b3c30de5d6a396a3245/closure/goog/net/rpc/httpcors.js#L32
          // TODO(b/145624756): There is a backend bug where $httpHeaders isn't respected if the request
          // doesn't have an Origin header. So we have to exclude a few browser environments that are
          // known to (sometimes) not include an Origin. See
          // https://github.com/firebase/firebase-js-sdk/issues/1491.
          Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["isMobileCordova"])() || Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["isReactNative"])() || Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["isElectron"])() || Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["isIE"])() || Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["isUWP"])() || Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["isBrowserExtension"])() || (o.httpHeadersOverwriteParam = "$httpHeaders");
          var l = n.join("");
          C("Connection", "Creating WebChannel: " + l, o);

          var d = r.createWebChannel(l, o),
              p = !1,
              y = !1,
              v = new No({
            Ei: function Ei(t) {
              y ? C("Connection", "Not sending because WebChannel is closed:", t) : (p || (C("Connection", "Opening WebChannel transport."), d.open(), p = !0), C("Connection", "WebChannel sending:", t), d.send(t));
            },
            Ti: function Ti() {
              return d.close();
            }
          }),
              m = function m(t, e, n) {
            // TODO(dimond): closure typing seems broken because WebChannel does
            // not implement goog.events.Listenable
            t.listen(e, function (t) {
              try {
                n(t);
              } catch (t) {
                setTimeout(function () {
                  throw t;
                }, 0);
              }
            });
          }; // WebChannel supports sending the first message with the handshake - saving
          // a network round trip. However, it will have to call send in the same
          // JS event loop as open. In order to enforce this, we delay actually
          // opening the WebChannel until send is called. Whether we have called
          // open is tracked with this variable.
          // Closure events are guarded and exceptions are swallowed, so catch any
          // exception and rethrow using a setTimeout so they become visible again.
          // Note that eventually this function could go away if we are confident
          // enough the code is exception free.


          return m(d, _firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["WebChannel"].EventType.OPEN, function () {
            y || C("Connection", "WebChannel transport opened.");
          }), m(d, _firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["WebChannel"].EventType.CLOSE, function () {
            y || (y = !0, C("Connection", "WebChannel transport closed"), v.Vi());
          }), m(d, _firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["WebChannel"].EventType.ERROR, function (t) {
            y || (y = !0, R("Connection", "WebChannel transport errored:", t), v.Vi(new D(N.UNAVAILABLE, "The operation could not be completed")));
          }), m(d, _firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["WebChannel"].EventType.MESSAGE, function (t) {
            var e;

            if (!y) {
              var n = t.data[0];
              P(!!n); // TODO(b/35143891): There is a bug in One Platform that caused errors
              // (and only errors) to be wrapped in an extra array. To be forward
              // compatible with the bug we need to check either condition. The latter
              // can be removed once the fix has been rolled out.
              // Use any because msgData.error is not typed.

              var r = n,
                  i = r.error || (null === (e = r[0]) || void 0 === e ? void 0 : e.error);

              if (i) {
                C("Connection", "WebChannel received error:", i); // error.status will be a string like 'OK' or 'NOT_FOUND'.

                var o = i.status,
                    s =
                /**
                * Maps an error Code from a GRPC status identifier like 'NOT_FOUND'.
                *
                * @returns The Code equivalent to the given status string or undefined if
                *     there is no match.
                */
                function (t) {
                  // lookup by string
                  // eslint-disable-next-line @typescript-eslint/no-explicit-any
                  var e = Ue[t];
                  if (void 0 !== e) return ze(e);
                }(o),
                    u = i.message;

                void 0 === s && (s = N.INTERNAL, u = "Unknown error status: " + o + " with message " + i.message), // Mark closed so no further events are propagated
                y = !0, v.Vi(new D(s, u)), d.close();
              } else C("Connection", "WebChannel received:", n), v.Si(n);
            }
          }), m(i, _firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["Event"].STAT_EVENT, function (t) {
            t.stat === _firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["Stat"].PROXY ? C("Connection", "Detected buffering proxy") : t.stat === _firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_3__["Stat"].NOPROXY && C("Connection", "Detected no buffering proxy");
          }), setTimeout(function () {
            // Technically we could/should wait for the WebChannel opened event,
            // but because we want to send the first message with the WebChannel
            // handshake we pretend the channel opened here (asynchronously), and
            // then delay the actual open until the first message is sent.
            v.Pi();
          }, 0), v;
        }, n;
      }(
      /** @class */
      function () {
        function t(t) {
          this.databaseInfo = t, this.databaseId = t.databaseId;
          var e = t.ssl ? "https" : "http";
          this.Di = e + "://" + t.host, this.Ci = "projects/" + this.databaseId.projectId + "/databases/" + this.databaseId.database + "/documents";
        }

        return t.prototype.Ni = function (t, e, n, r) {
          var i = this.xi(t, e);
          C("RestConnection", "Sending: ", i, n);
          var o = {};
          return this.ki(o, r), this.Fi(t, i, o, n).then(function (t) {
            return C("RestConnection", "Received: ", t), t;
          }, function (e) {
            throw R("RestConnection", t + " failed with error: ", e, "url: ", i, "request:", n), e;
          });
        }, t.prototype.$i = function (t, e, n, r) {
          // The REST API automatically aggregates all of the streamed results, so we
          // can just use the normal invoke() method.
          return this.Ni(t, e, n, r);
        },
        /**
         * Modifies the headers for a request, adding any authorization token if
         * present and any additional headers for the request.
         */
        t.prototype.ki = function (t, e) {
          if (t["X-Goog-Api-Client"] = "gl-js/ fire/8.10.0", // Content-Type: text/plain will avoid preflight requests which might
          // mess with CORS and redirects by proxies. If we add custom headers
          // we will need to change this code to potentially use the $httpOverwrite
          // parameter supported by ESF to avoid triggering preflight requests.
          t["Content-Type"] = "text/plain", this.databaseInfo.appId && (t["X-Firebase-GMPID"] = this.databaseInfo.appId), e) for (var n in e.authHeaders) {
            e.authHeaders.hasOwnProperty(n) && (t[n] = e.authHeaders[n]);
          }
        }, t.prototype.xi = function (t, e) {
          var n = So[t];
          return this.Di + "/v1/" + e + ":" + n;
        }, t;
      }());
      /**
       * Holds the state of a query target, including its target ID and whether the
       * target is 'not-current', 'current' or 'rejected'.
       */
      // Visible for testing

      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /** Initializes the WebChannelConnection for the browser. */

      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /** The Platform's 'window' implementation or null if not available. */


      function Ao() {
        // `window` is not always available, e.g. in ReactNative and WebWorkers.
        // eslint-disable-next-line no-restricted-globals
        return "undefined" != typeof window ? window : null;
      }
      /** The Platform's 'document' implementation or null if not available. */


      function ko() {
        // `document` is not always available, e.g. in ReactNative and WebWorkers.
        // eslint-disable-next-line no-restricted-globals
        return "undefined" != typeof document ? document : null;
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      function Co(t) {
        return new bn(t,
        /* useProto3Json= */
        !0);
      }
      /**
       * An instance of the Platform's 'TextEncoder' implementation.
       */

      /**
       * A helper for running delayed tasks following an exponential backoff curve
       * between attempts.
       *
       * Each delay is made up of a "base" delay which follows the exponential
       * backoff curve, and a +/- 50% "jitter" that is calculated and added to the
       * base delay. This prevents clients from accidentally synchronizing their
       * delays causing spikes of load to the backend.
       */


      var xo =
      /** @class */
      function () {
        function t(
        /**
         * The AsyncQueue to run backoff operations on.
         */
        t,
        /**
         * The ID to use when scheduling backoff operations on the AsyncQueue.
         */
        e,
        /**
         * The initial delay (used as the base delay on the first retry attempt).
         * Note that jitter will still be applied, so the actual delay could be as
         * little as 0.5*initialDelayMs.
         */
        n
        /**
         * The multiplier to use to determine the extended base delay after each
         * attempt.
         */
        , r
        /**
         * The maximum base delay after which no further backoff is performed.
         * Note that jitter will still be applied, so the actual delay could be as
         * much as 1.5*maxDelayMs.
         */
        , i) {
          void 0 === n && (n = 1e3), void 0 === r && (r = 1.5), void 0 === i && (i = 6e4), this.Se = t, this.timerId = e, this.Mi = n, this.Li = r, this.Bi = i, this.qi = 0, this.Ui = null,
          /** The last backoff attempt, as epoch milliseconds. */
          this.Ki = Date.now(), this.reset();
        }
        /**
         * Resets the backoff delay.
         *
         * The very next backoffAndWait() will have no delay. If it is called again
         * (i.e. due to an error), initialDelayMs (plus jitter) will be used, and
         * subsequent ones will increase according to the backoffFactor.
         */


        return t.prototype.reset = function () {
          this.qi = 0;
        },
        /**
         * Resets the backoff delay to the maximum delay (e.g. for use after a
         * RESOURCE_EXHAUSTED error).
         */
        t.prototype.Qi = function () {
          this.qi = this.Bi;
        },
        /**
         * Returns a promise that resolves after currentDelayMs, and increases the
         * delay for any subsequent attempts. If there was a pending backoff operation
         * already, it will be canceled.
         */
        t.prototype.ji = function (t) {
          var e = this; // Cancel any pending backoff operation.

          this.cancel(); // First schedule using the current base (which may be 0 and should be
          // honored as such).

          var n = Math.floor(this.qi + this.Wi()),
              r = Math.max(0, Date.now() - this.Ki),
              i = Math.max(0, n - r); // Guard against lastAttemptTime being in the future due to a clock change.

          i > 0 && C("ExponentialBackoff", "Backing off for " + i + " ms (base delay: " + this.qi + " ms, delay with jitter: " + n + " ms, last attempt: " + r + " ms ago)"), this.Ui = this.Se.enqueueAfterDelay(this.timerId, i, function () {
            return e.Ki = Date.now(), t();
          }), // Apply backoff factor to determine next delay and ensure it is within
          // bounds.
          this.qi *= this.Li, this.qi < this.Mi && (this.qi = this.Mi), this.qi > this.Bi && (this.qi = this.Bi);
        }, t.prototype.Gi = function () {
          null !== this.Ui && (this.Ui.skipDelay(), this.Ui = null);
        }, t.prototype.cancel = function () {
          null !== this.Ui && (this.Ui.cancel(), this.Ui = null);
        },
        /** Returns a random value in the range [-currentBaseMs/2, currentBaseMs/2] */
        t.prototype.Wi = function () {
          return (Math.random() - .5) * this.qi;
        }, t;
      }(),
          Ro =
      /** @class */
      function () {
        function t(t, e, n, r, i, o) {
          this.Se = t, this.zi = n, this.Hi = r, this.Ji = i, this.listener = o, this.state = 0
          /* Initial */
          ,
          /**
               * A close count that's incremented every time the stream is closed; used by
               * getCloseGuardedDispatcher() to invalidate callbacks that happen after
               * close.
               */
          this.Yi = 0, this.Xi = null, this.stream = null, this.Zi = new xo(t, e)
          /**
          * Returns true if start() has been called and no error has occurred. True
          * indicates the stream is open or in the process of opening (which
          * encompasses respecting backoff, getting auth tokens, and starting the
          * actual RPC). Use isOpen() to determine if the stream is open and ready for
          * outbound requests.
          */
          ;
        }

        return t.prototype.tr = function () {
          return 1
          /* Starting */
          === this.state || 2
          /* Open */
          === this.state || 4
          /* Backoff */
          === this.state;
        },
        /**
         * Returns true if the underlying RPC is open (the onOpen() listener has been
         * called) and the stream is ready for outbound requests.
         */
        t.prototype.er = function () {
          return 2
          /* Open */
          === this.state;
        },
        /**
         * Starts the RPC. Only allowed if isStarted() returns false. The stream is
         * not immediately ready for use: onOpen() will be invoked when the RPC is
         * ready for outbound requests, at which point isOpen() will return true.
         *
         * When start returns, isStarted() will return true.
         */
        t.prototype.start = function () {
          3
          /* Error */
          !== this.state ? this.auth() : this.nr();
        },
        /**
         * Stops the RPC. This call is idempotent and allowed regardless of the
         * current isStarted() state.
         *
         * When stop returns, isStarted() and isOpen() will both return false.
         */
        t.prototype.stop = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (t) {
              switch (t.label) {
                case 0:
                  return this.tr() ? [4
                  /*yield*/
                  , this.close(0
                  /* Initial */
                  )] : [3
                  /*break*/
                  , 2];

                case 1:
                  t.sent(), t.label = 2;

                case 2:
                  return [2
                  /*return*/
                  ];
              }
            });
          });
        },
        /**
         * After an error the stream will usually back off on the next attempt to
         * start it. If the error warrants an immediate restart of the stream, the
         * sender can use this to indicate that the receiver should not back off.
         *
         * Each error will call the onClose() listener. That function can decide to
         * inhibit backoff if required.
         */
        t.prototype.sr = function () {
          this.state = 0
          /* Initial */
          , this.Zi.reset();
        },
        /**
         * Marks this stream as idle. If no further actions are performed on the
         * stream for one minute, the stream will automatically close itself and
         * notify the stream's onClose() handler with Status.OK. The stream will then
         * be in a !isStarted() state, requiring the caller to start the stream again
         * before further use.
         *
         * Only streams that are in state 'Open' can be marked idle, as all other
         * states imply pending network operations.
         */
        t.prototype.ir = function () {
          var t = this; // Starts the idle time if we are in state 'Open' and are not yet already
          // running a timer (in which case the previous idle timeout still applies).

          this.er() && null === this.Xi && (this.Xi = this.Se.enqueueAfterDelay(this.zi, 6e4, function () {
            return t.rr();
          }));
        },
        /** Sends a message to the underlying stream. */
        t.prototype.cr = function (t) {
          this.ur(), this.stream.send(t);
        },
        /** Called by the idle timer when the stream should close due to inactivity. */
        t.prototype.rr = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (t) {
              return this.er() ? [2
              /*return*/
              , this.close(0
              /* Initial */
              )] : [2
              /*return*/
              ];
            });
          });
        },
        /** Marks the stream as active again. */
        t.prototype.ur = function () {
          this.Xi && (this.Xi.cancel(), this.Xi = null);
        },
        /**
         * Closes the stream and cleans up as necessary:
         *
         * * closes the underlying GRPC stream;
         * * calls the onClose handler with the given 'error';
         * * sets internal stream state to 'finalState';
         * * adjusts the backoff timer based on the error
         *
         * A new stream can be opened by calling start().
         *
         * @param finalState - the intended state of the stream after closing.
         * @param error - the error the connection was closed with.
         */
        t.prototype.close = function (t, e) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
              switch (n.label) {
                case 0:
                  // Notify the listener that the stream closed.
                  // Cancel any outstanding timers (they're guaranteed not to execute).
                  return this.ur(), this.Zi.cancel(), // Invalidates any stream-related callbacks (e.g. from auth or the
                  // underlying stream), guaranteeing they won't execute.
                  this.Yi++, 3
                  /* Error */
                  !== t ? // If this is an intentional close ensure we don't delay our next connection attempt.
                  this.Zi.reset() : e && e.code === N.RESOURCE_EXHAUSTED ? ( // Log the error. (Probably either 'quota exceeded' or 'max queue length reached'.)
                  x(e.toString()), x("Using maximum backoff delay to prevent overloading the backend."), this.Zi.Qi()) : e && e.code === N.UNAUTHENTICATED && // "unauthenticated" error means the token was rejected. Try force refreshing it in case it
                  // just expired.
                  this.Ji.invalidateToken(), // Clean up the underlying stream because we are no longer interested in events.
                  null !== this.stream && (this.ar(), this.stream.close(), this.stream = null), // This state must be assigned before calling onClose() to allow the callback to
                  // inhibit backoff or otherwise manipulate the state in its non-started state.
                  this.state = t, [4
                  /*yield*/
                  , this.listener.Ri(e)];

                case 1:
                  // Cancel any outstanding timers (they're guaranteed not to execute).
                  // Notify the listener that the stream closed.
                  return n.sent(), [2
                  /*return*/
                  ];
              }
            });
          });
        },
        /**
         * Can be overridden to perform additional cleanup before the stream is closed.
         * Calling super.tearDown() is not required.
         */
        t.prototype.ar = function () {}, t.prototype.auth = function () {
          var t = this;
          this.state = 1
          /* Starting */
          ;
          var e = this.hr(this.Yi),
              n = this.Yi; // TODO(mikelehen): Just use dispatchIfNotClosed, but see TODO below.

          this.Ji.getToken().then(function (e) {
            // Stream can be stopped while waiting for authentication.
            // TODO(mikelehen): We really should just use dispatchIfNotClosed
            // and let this dispatch onto the queue, but that opened a spec test can
            // of worms that I don't want to deal with in this PR.
            t.Yi === n && // Normally we'd have to schedule the callback on the AsyncQueue.
            // However, the following calls are safe to be called outside the
            // AsyncQueue since they don't chain asynchronous calls
            t.lr(e);
          }, function (n) {
            e(function () {
              var e = new D(N.UNKNOWN, "Fetching auth token failed: " + n.message);
              return t.dr(e);
            });
          });
        }, t.prototype.lr = function (t) {
          var e = this,
              n = this.hr(this.Yi);
          this.stream = this.wr(t), this.stream.Ii(function () {
            n(function () {
              return e.state = 2
              /* Open */
              , e.listener.Ii();
            });
          }), this.stream.Ri(function (t) {
            n(function () {
              return e.dr(t);
            });
          }), this.stream.onMessage(function (t) {
            n(function () {
              return e.onMessage(t);
            });
          });
        }, t.prototype.nr = function () {
          var t = this;
          this.state = 4
          /* Backoff */
          , this.Zi.ji(function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(t, void 0, void 0, function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (t) {
                return this.state = 0
                /* Initial */
                , this.start(), [2
                /*return*/
                ];
              });
            });
          });
        }, // Visible for tests
        t.prototype.dr = function (t) {
          // In theory the stream could close cleanly, however, in our current model
          // we never expect this to happen because if we stop a stream ourselves,
          // this callback will never be called. To prevent cases where we retry
          // without a backoff accidentally, we set the stream to error in all cases.
          return C("PersistentStream", "close with error: " + t), this.stream = null, this.close(3
          /* Error */
          , t);
        },
        /**
         * Returns a "dispatcher" function that dispatches operations onto the
         * AsyncQueue but only runs them if closeCount remains unchanged. This allows
         * us to turn auth / stream callbacks into no-ops if the stream is closed /
         * re-opened, etc.
         */
        t.prototype.hr = function (t) {
          var e = this;
          return function (n) {
            e.Se.enqueueAndForget(function () {
              return e.Yi === t ? n() : (C("PersistentStream", "stream callback skipped by getCloseGuardedDispatcher."), Promise.resolve());
            });
          };
        }, t;
      }(),
          Lo =
      /** @class */
      function (e) {
        function n(t, n, r, i, o) {
          var s = this;
          return (s = e.call(this, t, "listen_stream_connection_backoff"
          /* ListenStreamConnectionBackoff */
          , "listen_stream_idle"
          /* ListenStreamIdle */
          , n, r, o) || this).R = i, s;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.wr = function (t) {
          return this.Hi.Oi("Listen", t);
        }, n.prototype.onMessage = function (t) {
          // A successful response means the stream is healthy
          this.Zi.reset();

          var e = function (t, e) {
            var n;

            if ("targetChange" in e) {
              e.targetChange; // proto3 default value is unset in JSON (undefined), so use 'NO_CHANGE'
              // if unset

              var r = function (t) {
                return "NO_CHANGE" === t ? 0
                /* NoChange */
                : "ADD" === t ? 1
                /* Added */
                : "REMOVE" === t ? 2
                /* Removed */
                : "CURRENT" === t ? 3
                /* Current */
                : "RESET" === t ? 4
                /* Reset */
                : O();
              }(e.targetChange.targetChangeType || "NO_CHANGE"),
                  i = e.targetChange.targetIds || [],
                  o = function (t, e) {
                return t.I ? (P(void 0 === e || "string" == typeof e), J.fromBase64String(e || "")) : (P(void 0 === e || e instanceof Uint8Array), J.fromUint8Array(e || new Uint8Array()));
              }(t, e.targetChange.resumeToken),
                  s = (u = e.targetChange.cause) && function (t) {
                var e = void 0 === t.code ? N.UNKNOWN : ze(t.code);
                return new D(e, t.message || "");
              }(u);

              n = new dn(r, i, o, s || null);
            } else if ("documentChange" in e) {
              e.documentChange, (r = e.documentChange).document, r.document.name, r.document.updateTime, i = An(t, r.document.name), o = _n(r.document.updateTime);
              var u = new _t({
                mapValue: {
                  fields: r.document.fields
                }
              }),
                  a = (s = Nt.newFoundDocument(i, o, u), r.targetIds || []),
                  c = r.removedTargetIds || [];
              n = new fn(a, c, s.key, s);
            } else if ("documentDelete" in e) e.documentDelete, (r = e.documentDelete).document, i = An(t, r.document), o = r.readTime ? _n(r.readTime) : K.min(), u = Nt.newNoDocument(i, o), s = r.removedTargetIds || [], n = new fn([], s, u.key, u);else if ("documentRemove" in e) e.documentRemove, (r = e.documentRemove).document, i = An(t, r.document), o = r.removedTargetIds || [], n = new fn([], o, i, null);else {
              if (!("filter" in e)) return O();
              e.filter;
              var h = e.filter;
              h.targetId, r = h.count || 0, i = new Qe(r), o = h.targetId, n = new ln(o, i);
            }

            return n;
          }(this.R, t),
              n = function (t) {
            // We have only reached a consistent snapshot for the entire stream if there
            // is a read_time set and it applies to all targets (i.e. the list of
            // targets is empty). The backend is guaranteed to send such responses.
            if (!("targetChange" in t)) return K.min();
            var e = t.targetChange;
            return e.targetIds && e.targetIds.length ? K.min() : e.readTime ? _n(e.readTime) : K.min();
          }(t);

          return this.listener._r(e, n);
        },
        /**
         * Registers interest in the results of the given target. If the target
         * includes a resumeToken it will be included in the request. Results that
         * affect the target will be streamed back as WatchChange messages that
         * reference the targetId.
         */
        n.prototype.mr = function (t) {
          var e = {};
          e.database = xn(this.R), e.addTarget = function (t, e) {
            var n,
                r = e.target;
            return (n = xt(r) ? {
              documents: Mn(t, r)
            } : {
              query: Vn(t, r)
            }).targetId = e.targetId, e.resumeToken.approximateByteSize() > 0 ? n.resumeToken = Tn(t, e.resumeToken) : e.snapshotVersion.compareTo(K.min()) > 0 && ( // TODO(wuandy): Consider removing above check because it is most likely true.
            // Right now, many tests depend on this behaviour though (leaving min() out
            // of serialization).
            n.readTime = In(t, e.snapshotVersion.toTimestamp())), n;
          }(this.R, t);

          var n = function (t, e) {
            var n = function (t, e) {
              switch (e) {
                case 0
                /* Listen */
                :
                  return null;

                case 1
                /* ExistenceFilterMismatch */
                :
                  return "existence-filter-mismatch";

                case 2
                /* LimboResolution */
                :
                  return "limbo-document";

                default:
                  return O();
              }
            }(0, e.purpose);

            return null == n ? null : {
              "goog-listen-tags": n
            };
          }(this.R, t);

          n && (e.labels = n), this.cr(e);
        },
        /**
         * Unregisters interest in the results of the target associated with the
         * given targetId.
         */
        n.prototype.yr = function (t) {
          var e = {};
          e.database = xn(this.R), e.removeTarget = t, this.cr(e);
        }, n;
      }(Ro),
          Oo =
      /** @class */
      function (e) {
        function n(t, n, r, i, o) {
          var s = this;
          return (s = e.call(this, t, "write_stream_connection_backoff"
          /* WriteStreamConnectionBackoff */
          , "write_stream_idle"
          /* WriteStreamIdle */
          , n, r, o) || this).R = i, s.gr = !1, s;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), Object.defineProperty(n.prototype, "pr", {
          /**
           * Tracks whether or not a handshake has been successfully exchanged and
           * the stream is ready to accept mutations.
           */
          get: function get() {
            return this.gr;
          },
          enumerable: !1,
          configurable: !0
        }), // Override of PersistentStream.start
        n.prototype.start = function () {
          this.gr = !1, this.lastStreamToken = void 0, e.prototype.start.call(this);
        }, n.prototype.ar = function () {
          this.gr && this.Er([]);
        }, n.prototype.wr = function (t) {
          return this.Hi.Oi("Write", t);
        }, n.prototype.onMessage = function (t) {
          if ( // Always capture the last stream token.
          P(!!t.streamToken), this.lastStreamToken = t.streamToken, this.gr) {
            // A successful first write response means the stream is healthy,
            // Note, that we could consider a successful handshake healthy, however,
            // the write itself might be causing an error we want to back off from.
            this.Zi.reset();

            var e = function (t, e) {
              return t && t.length > 0 ? (P(void 0 !== e), t.map(function (t) {
                return function (t, e) {
                  // NOTE: Deletes don't have an updateTime.
                  var n = t.updateTime ? _n(t.updateTime) : _n(e);
                  return n.isEqual(K.min()) && ( // The Firestore Emulator currently returns an update time of 0 for
                  // deletes of non-existing documents (rather than null). This breaks the
                  // test "get deleted doc while offline with source=cache" as NoDocuments
                  // with version 0 are filtered by IndexedDb's RemoteDocumentCache.
                  // TODO(#2149): Remove this when Emulator is fixed
                  n = _n(e)), new Ne(n, t.transformResults || []);
                }(t, e);
              })) : [];
            }(t.writeResults, t.commitTime),
                n = _n(t.commitTime);

            return this.listener.Tr(n, e);
          } // The first response is always the handshake response


          return P(!t.writeResults || 0 === t.writeResults.length), this.gr = !0, this.listener.Ir();
        },
        /**
         * Sends an initial streamToken to the server, performing the handshake
         * required to make the StreamingWrite RPC work. Subsequent
         * calls should wait until onHandshakeComplete was called.
         */
        n.prototype.Ar = function () {
          // TODO(dimond): Support stream resumption. We intentionally do not set the
          // stream token on the handshake, ignoring any stream token we might have.
          var t = {};
          t.database = xn(this.R), this.cr(t);
        },
        /** Sends a group of mutations to the Firestore backend to apply. */
        n.prototype.Er = function (t) {
          var e = this,
              n = {
            streamToken: this.lastStreamToken,
            writes: t.map(function (t) {
              return Pn(e.R, t);
            })
          };
          this.cr(n);
        }, n;
      }(Ro),
          Po =
      /** @class */
      function (e) {
        function n(t, n, r) {
          var i = this;
          return (i = e.call(this) || this).credentials = t, i.Hi = n, i.R = r, i.Rr = !1, i;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.br = function () {
          if (this.Rr) throw new D(N.FAILED_PRECONDITION, "The client has already been terminated.");
        },
        /** Gets an auth token and invokes the provided RPC. */
        n.prototype.Ni = function (t, e, n) {
          var r = this;
          return this.br(), this.credentials.getToken().then(function (i) {
            return r.Hi.Ni(t, e, n, i);
          })["catch"](function (t) {
            throw "FirebaseError" === t.name ? (t.code === N.UNAUTHENTICATED && r.credentials.invalidateToken(), t) : new D(N.UNKNOWN, t.toString());
          });
        },
        /** Gets an auth token and invokes the provided RPC with streamed results. */
        n.prototype.$i = function (t, e, n) {
          var r = this;
          return this.br(), this.credentials.getToken().then(function (i) {
            return r.Hi.$i(t, e, n, i);
          })["catch"](function (t) {
            throw "FirebaseError" === t.name ? (t.code === N.UNAUTHENTICATED && r.credentials.invalidateToken(), t) : new D(N.UNKNOWN, t.toString());
          });
        }, n.prototype.terminate = function () {
          this.Rr = !0;
        }, n;
      }(function () {}),
          Fo =
      /** @class */
      function () {
        function t(t, e) {
          this.asyncQueue = t, this.onlineStateHandler = e,
          /** The current OnlineState. */
          this.state = "Unknown"
          /* Unknown */
          ,
          /**
               * A count of consecutive failures to open the stream. If it reaches the
               * maximum defined by MAX_WATCH_STREAM_FAILURES, we'll set the OnlineState to
               * Offline.
               */
          this.vr = 0,
          /**
               * A timer that elapses after ONLINE_STATE_TIMEOUT_MS, at which point we
               * transition from OnlineState.Unknown to OnlineState.Offline without waiting
               * for the stream to actually fail (MAX_WATCH_STREAM_FAILURES times).
               */
          this.Pr = null,
          /**
               * Whether the client should log a warning message if it fails to connect to
               * the backend (initially true, cleared after a successful stream, or if we've
               * logged the message already).
               */
          this.Vr = !0
          /**
          * Called by RemoteStore when a watch stream is started (including on each
          * backoff attempt).
          *
          * If this is the first attempt, it sets the OnlineState to Unknown and starts
          * the onlineStateTimer.
          */
          ;
        }

        return t.prototype.Sr = function () {
          var t = this;
          0 === this.vr && (this.Dr("Unknown"
          /* Unknown */
          ), this.Pr = this.asyncQueue.enqueueAfterDelay("online_state_timeout"
          /* OnlineStateTimeout */
          , 1e4, function () {
            return t.Pr = null, t.Cr("Backend didn't respond within 10 seconds."), t.Dr("Offline"
            /* Offline */
            ), Promise.resolve();
          }));
        },
        /**
         * Updates our OnlineState as appropriate after the watch stream reports a
         * failure. The first failure moves us to the 'Unknown' state. We then may
         * allow multiple failures (based on MAX_WATCH_STREAM_FAILURES) before we
         * actually transition to the 'Offline' state.
         */
        t.prototype.Nr = function (t) {
          "Online"
          /* Online */
          === this.state ? this.Dr("Unknown"
          /* Unknown */
          ) : (this.vr++, this.vr >= 1 && (this.kr(), this.Cr("Connection failed 1 times. Most recent error: " + t.toString()), this.Dr("Offline"
          /* Offline */
          )));
        },
        /**
         * Explicitly sets the OnlineState to the specified state.
         *
         * Note that this resets our timers / failure counters, etc. used by our
         * Offline heuristics, so must not be used in place of
         * handleWatchStreamStart() and handleWatchStreamFailure().
         */
        t.prototype.set = function (t) {
          this.kr(), this.vr = 0, "Online"
          /* Online */
          === t && ( // We've connected to watch at least once. Don't warn the developer
          // about being offline going forward.
          this.Vr = !1), this.Dr(t);
        }, t.prototype.Dr = function (t) {
          t !== this.state && (this.state = t, this.onlineStateHandler(t));
        }, t.prototype.Cr = function (t) {
          var e = "Could not reach Cloud Firestore backend. " + t + "\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";
          this.Vr ? (x(e), this.Vr = !1) : C("OnlineStateTracker", e);
        }, t.prototype.kr = function () {
          null !== this.Pr && (this.Pr.cancel(), this.Pr = null);
        }, t;
      }(),
          Mo = function Mo(
      /**
           * The local store, used to fill the write pipeline with outbound mutations.
           */
      t,
      /** The client-side proxy for interacting with the backend. */
      e, i, o, s) {
        var u = this;
        this.localStore = t, this.datastore = e, this.asyncQueue = i, this.remoteSyncer = {},
        /**
                 * A list of up to MAX_PENDING_WRITES writes that we have fetched from the
                 * LocalStore via fillWritePipeline() and have or will send to the write
                 * stream.
                 *
                 * Whenever writePipeline.length > 0 the RemoteStore will attempt to start or
                 * restart the write stream. When the stream is established the writes in the
                 * pipeline will be sent in order.
                 *
                 * Writes remain in writePipeline until they are acknowledged by the backend
                 * and thus will automatically be re-sent if the stream is interrupted /
                 * restarted before they're acknowledged.
                 *
                 * Write responses from the backend are linked to their originating request
                 * purely based on order, and so we can just shift() writes from the front of
                 * the writePipeline as we receive responses.
                 */
        this.Fr = [],
        /**
                 * A mapping of watched targets that the client cares about tracking and the
                 * user has explicitly called a 'listen' for this target.
                 *
                 * These targets may or may not have been sent to or acknowledged by the
                 * server. On re-establishing the listen stream, these targets should be sent
                 * to the server. The targets removed with unlistens are removed eagerly
                 * without waiting for confirmation from the listen stream.
                 */
        this.$r = new Map(),
        /**
                 * A set of reasons for why the RemoteStore may be offline. If empty, the
                 * RemoteStore may start its network connections.
                 */
        this.Or = new Set(),
        /**
                 * Event handlers that get called when the network is disabled or enabled.
                 *
                 * PORTING NOTE: These functions are used on the Web client to create the
                 * underlying streams (to support tree-shakeable streams). On Android and iOS,
                 * the streams are created during construction of RemoteStore.
                 */
        this.Mr = [], this.Lr = s, this.Lr.di(function (t) {
          i.enqueueAndForget(function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(u, void 0, void 0, function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (t) {
                switch (t.label) {
                  case 0:
                    return zo(this) ? (C("RemoteStore", "Restarting streams for network reachability change."), [4
                    /*yield*/
                    , function (t) {
                      return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
                        var e;
                        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
                          switch (n.label) {
                            case 0:
                              return (e = F(t)).Or.add(4
                              /* ConnectivityChange */
                              ), [4
                              /*yield*/
                              , qo(e)];

                            case 1:
                              return n.sent(), e.Br.set("Unknown"
                              /* Unknown */
                              ), e.Or["delete"](4
                              /* ConnectivityChange */
                              ), [4
                              /*yield*/
                              , Vo(e)];

                            case 2:
                              return n.sent(), [2
                              /*return*/
                              ];
                          }
                        });
                      });
                    }(this)]) : [3
                    /*break*/
                    , 2];

                  case 1:
                    t.sent(), t.label = 2;

                  case 2:
                    return [2
                    /*return*/
                    ];
                }
              });
            });
          });
        }), this.Br = new Fo(i, o);
      };
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * A PersistentStream is an abstract base class that represents a streaming RPC
       * to the Firestore backend. It's built on top of the connections own support
       * for streaming RPCs, and adds several critical features for our clients:
       *
       *   - Exponential backoff on failure
       *   - Authentication via CredentialsProvider
       *   - Dispatching all callbacks into the shared worker queue
       *   - Closing idle streams after 60 seconds of inactivity
       *
       * Subclasses of PersistentStream implement serialization of models to and
       * from the JSON representation of the protocol buffers for a specific
       * streaming RPC.
       *
       * ## Starting and Stopping
       *
       * Streaming RPCs are stateful and need to be start()ed before messages can
       * be sent and received. The PersistentStream will call the onOpen() function
       * of the listener once the stream is ready to accept requests.
       *
       * Should a start() fail, PersistentStream will call the registered onClose()
       * listener with a FirestoreError indicating what went wrong.
       *
       * A PersistentStream can be started and stopped repeatedly.
       *
       * Generic types:
       *  SendType: The type of the outgoing message of the underlying
       *    connection stream
       *  ReceiveType: The type of the incoming message of the underlying
       *    connection stream
       *  ListenerType: The type of the listener that will be used for callbacks
       */


      function Vo(t) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var e, n;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                if (!zo(t)) return [3
                /*break*/
                , 4];
                e = 0, n = t.Mr, r.label = 1;

              case 1:
                return e < n.length ? [4
                /*yield*/
                , (0, n[e])(
                /* enabled= */
                !0)] : [3
                /*break*/
                , 4];

              case 2:
                r.sent(), r.label = 3;

              case 3:
                return e++, [3
                /*break*/
                , 1];

              case 4:
                return [2
                /*return*/
                ];
            }
          });
        });
      }
      /**
       * Temporarily disables the network. The network can be re-enabled using
       * enableNetwork().
       */


      function qo(t) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var e, n;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                e = 0, n = t.Mr, r.label = 1;

              case 1:
                return e < n.length ? [4
                /*yield*/
                , (0, n[e])(
                /* enabled= */
                !1)] : [3
                /*break*/
                , 4];

              case 2:
                r.sent(), r.label = 3;

              case 3:
                return e++, [3
                /*break*/
                , 1];

              case 4:
                return [2
                /*return*/
                ];
            }
          });
        });
      }
      /**
       * Starts new listen for the given target. Uses resume token if provided. It
       * is a no-op if the target of given `TargetData` is already being listened to.
       */


      function Uo(t, e) {
        var n = F(t);
        n.$r.has(e.targetId) || ( // Mark this as something the client is currently listening for.
        n.$r.set(e.targetId, e), Go(n) ? // The listen will be sent in onWatchStreamOpen
        Qo(n) : us(n).er() && jo(n, e));
      }
      /**
       * Removes the listen from server. It is a no-op if the given target id is
       * not being listened to.
       */


      function Bo(t, e) {
        var n = F(t),
            r = us(n);
        n.$r["delete"](e), r.er() && Ko(n, e), 0 === n.$r.size && (r.er() ? r.ir() : zo(n) && // Revert to OnlineState.Unknown if the watch stream is not open and we
        // have no listeners, since without any listens to send we cannot
        // confirm if the stream is healthy and upgrade to OnlineState.Online.
        n.Br.set("Unknown"
        /* Unknown */
        ));
      }
      /**
       * We need to increment the the expected number of pending responses we're due
       * from watch so we wait for the ack to process any messages from this target.
       */


      function jo(t, e) {
        t.qr.U(e.targetId), us(t).mr(e)
        /**
        * We need to increment the expected number of pending responses we're due
        * from watch so we wait for the removal on the server before we process any
        * messages from this target.
        */
        ;
      }

      function Ko(t, e) {
        t.qr.U(e), us(t).yr(e);
      }

      function Qo(t) {
        t.qr = new yn({
          getRemoteKeysForTarget: function getRemoteKeysForTarget(e) {
            return t.remoteSyncer.getRemoteKeysForTarget(e);
          },
          lt: function lt(e) {
            return t.$r.get(e) || null;
          }
        }), us(t).start(), t.Br.Sr()
        /**
        * Returns whether the watch stream should be started because it's necessary
        * and has not yet been started.
        */
        ;
      }

      function Go(t) {
        return zo(t) && !us(t).tr() && t.$r.size > 0;
      }

      function zo(t) {
        return 0 === F(t).Or.size;
      }

      function Wo(t) {
        t.qr = void 0;
      }

      function Ho(t) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
            return t.$r.forEach(function (e, n) {
              jo(t, e);
            }), [2
            /*return*/
            ];
          });
        });
      }

      function Yo(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
            return Wo(t), // If we still need the watch stream, retry the connection.
            Go(t) ? (t.Br.Nr(e), Qo(t)) : // No need to restart watch stream because there are no active targets.
            // The online state is set to unknown because there is no active attempt
            // at establishing a connection
            t.Br.set("Unknown"
            /* Unknown */
            ), [2
            /*return*/
            ];
          });
        });
      }

      function $o(t, e, i) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var o, s, u;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (a) {
            switch (a.label) {
              case 0:
                if (t.Br.set("Online"
                /* Online */
                ), !(e instanceof dn && 2
                /* Removed */
                === e.state && e.cause)) // Mark the client as online since we got a message from the server
                  return [3
                  /*break*/
                  , 6];
                a.label = 1;

              case 1:
                return a.trys.push([1, 3,, 5]), [4
                /*yield*/
                ,
                /** Handles an error on a target */
                function (t, e) {
                  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
                    var n, i, o, s;
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                      switch (r.label) {
                        case 0:
                          n = e.cause, i = 0, o = e.targetIds, r.label = 1;

                        case 1:
                          return i < o.length ? (s = o[i], t.$r.has(s) ? [4
                          /*yield*/
                          , t.remoteSyncer.rejectListen(s, n)] : [3
                          /*break*/
                          , 3]) : [3
                          /*break*/
                          , 5];

                        case 2:
                          r.sent(), t.$r["delete"](s), t.qr.removeTarget(s), r.label = 3;

                        case 3:
                          r.label = 4;

                        case 4:
                          return i++, [3
                          /*break*/
                          , 1];

                        case 5:
                          return [2
                          /*return*/
                          ];
                      }
                    });
                  });
                }(t, e)];

              case 2:
                return a.sent(), [3
                /*break*/
                , 5];

              case 3:
                return o = a.sent(), C("RemoteStore", "Failed to remove targets %s: %s ", e.targetIds.join(","), o), [4
                /*yield*/
                , Xo(t, o)];

              case 4:
                return a.sent(), [3
                /*break*/
                , 5];

              case 5:
                return [3
                /*break*/
                , 13];

              case 6:
                if (e instanceof fn ? t.qr.X(e) : e instanceof ln ? t.qr.rt(e) : t.qr.et(e), i.isEqual(K.min())) return [3
                /*break*/
                , 13];
                a.label = 7;

              case 7:
                return a.trys.push([7, 11,, 13]), [4
                /*yield*/
                , Ki(t.localStore)];

              case 8:
                return s = a.sent(), i.compareTo(s) >= 0 ? [4
                /*yield*/
                ,
                /**
                 * Takes a batch of changes from the Datastore, repackages them as a
                 * RemoteEvent, and passes that on to the listener, which is typically the
                 * SyncEngine.
                 */
                function (t, e) {
                  var n = t.qr.ut(e); // Update in-memory resume tokens. LocalStore will update the
                  // persistent view of these when applying the completed RemoteEvent.

                  return n.targetChanges.forEach(function (n, r) {
                    if (n.resumeToken.approximateByteSize() > 0) {
                      var i = t.$r.get(r); // A watched target might have been removed already.

                      i && t.$r.set(r, i.withResumeToken(n.resumeToken, e));
                    }
                  }), // Re-establish listens for the targets that have been invalidated by
                  // existence filter mismatches.
                  n.targetMismatches.forEach(function (e) {
                    var n = t.$r.get(e);

                    if (n) {
                      // Clear the resume token for the target, since we're in a known mismatch
                      // state.
                      t.$r.set(e, n.withResumeToken(J.EMPTY_BYTE_STRING, n.snapshotVersion)), // Cause a hard reset by unwatching and rewatching immediately, but
                      // deliberately don't send a resume token so that we get a full update.
                      Ko(t, e); // Mark the target we send as being on behalf of an existence filter
                      // mismatch, but don't actually retain that in listenTargets. This ensures
                      // that we flag the first re-listen this way without impacting future
                      // listens of this target (that might happen e.g. on reconnect).

                      var r = new Pr(n.target, e, 1
                      /* ExistenceFilterMismatch */
                      , n.sequenceNumber);
                      jo(t, r);
                    }
                  }), t.remoteSyncer.applyRemoteEvent(n);
                }(t, i)] : [3
                /*break*/
                , 10];
              // We have received a target change with a global snapshot if the snapshot
              // version is not equal to SnapshotVersion.min().

              case 9:
                // We have received a target change with a global snapshot if the snapshot
                // version is not equal to SnapshotVersion.min().
                a.sent(), a.label = 10;

              case 10:
                return [3
                /*break*/
                , 13];

              case 11:
                return C("RemoteStore", "Failed to raise snapshot:", u = a.sent()), [4
                /*yield*/
                , Xo(t, u)];

              case 12:
                return a.sent(), [3
                /*break*/
                , 13];

              case 13:
                return [2
                /*return*/
                ];
            }
          });
        });
      }
      /**
       * Recovery logic for IndexedDB errors that takes the network offline until
       * `op` succeeds. Retries are scheduled with backoff using
       * `enqueueRetryable()`. If `op()` is not provided, IndexedDB access is
       * validated via a generic operation.
       *
       * The returned Promise is resolved once the network is disabled and before
       * any retry attempt.
       */


      function Xo(t, e, i) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var o = this;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (s) {
            switch (s.label) {
              case 0:
                if (!Nr(e)) throw e; // Disable network and raise offline snapshots

                return t.Or.add(1
                /* IndexedDbFailed */
                ), [4
                /*yield*/
                , qo(t)];

              case 1:
                // Disable network and raise offline snapshots
                return s.sent(), t.Br.set("Offline"
                /* Offline */
                ), i || ( // Use a simple read operation to determine if IndexedDB recovered.
                // Ideally, we would expose a health check directly on SimpleDb, but
                // RemoteStore only has access to persistence through LocalStore.
                i = function i() {
                  return Ki(t.localStore);
                }), // Probe IndexedDB periodically and re-enable network
                t.asyncQueue.enqueueRetryable(function () {
                  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(o, void 0, void 0, function () {
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
                      switch (e.label) {
                        case 0:
                          return C("RemoteStore", "Retrying IndexedDB access"), [4
                          /*yield*/
                          , i()];

                        case 1:
                          return e.sent(), t.Or["delete"](1
                          /* IndexedDbFailed */
                          ), [4
                          /*yield*/
                          , Vo(t)];

                        case 2:
                          return e.sent(), [2
                          /*return*/
                          ];
                      }
                    });
                  });
                }), [2
                /*return*/
                ];
            }
          });
        });
      }
      /**
       * Executes `op`. If `op` fails, takes the network offline until `op`
       * succeeds. Returns after the first attempt.
       */


      function Jo(t, e) {
        return e()["catch"](function (n) {
          return Xo(t, n, e);
        });
      }

      function Zo(t) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var e, n, i, o, s;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                e = F(t), n = as(e), i = e.Fr.length > 0 ? e.Fr[e.Fr.length - 1].batchId : -1, r.label = 1;

              case 1:
                if (!
                /**
                * Returns true if we can add to the write pipeline (i.e. the network is
                * enabled and the write pipeline is not full).
                */
                function (t) {
                  return zo(t) && t.Fr.length < 10;
                }
                /**
                * Queues additional writes to be sent to the write stream, sending them
                * immediately if the write stream is established.
                */
                (e)) return [3
                /*break*/
                , 7];
                r.label = 2;

              case 2:
                return r.trys.push([2, 4,, 6]), [4
                /*yield*/
                , zi(e.localStore, i)];

              case 3:
                return null === (o = r.sent()) ? (0 === e.Fr.length && n.ir(), [3
                /*break*/
                , 7]) : (i = o.batchId, function (t, e) {
                  t.Fr.push(e);
                  var n = as(t);
                  n.er() && n.pr && n.Er(e.mutations);
                }(e, o), [3
                /*break*/
                , 6]);

              case 4:
                return s = r.sent(), [4
                /*yield*/
                , Xo(e, s)];

              case 5:
                return r.sent(), [3
                /*break*/
                , 6];

              case 6:
                return [3
                /*break*/
                , 1];

              case 7:
                return ts(e) && es(e), [2
                /*return*/
                ];
            }
          });
        });
      }

      function ts(t) {
        return zo(t) && !as(t).tr() && t.Fr.length > 0;
      }

      function es(t) {
        as(t).start();
      }

      function ns(t) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
            return as(t).Ar(), [2
            /*return*/
            ];
          });
        });
      }

      function rs(t) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var e, n, i, o;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            // Send the write pipeline now that the stream is established.
            for (e = as(t), n = 0, i = t.Fr; n < i.length; n++) {
              o = i[n], e.Er(o.mutations);
            }

            return [2
            /*return*/
            ];
          });
        });
      }

      function is(t, e, i) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, o;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                return n = t.Fr.shift(), o = Or.from(n, e, i), [4
                /*yield*/
                , Jo(t, function () {
                  return t.remoteSyncer.applySuccessfulWrite(o);
                })];

              case 1:
                // It's possible that with the completion of this mutation another
                // slot has freed up.
                return r.sent(), [4
                /*yield*/
                , Zo(t)];

              case 2:
                // It's possible that with the completion of this mutation another
                // slot has freed up.
                return r.sent(), [2
                /*return*/
                ];
            }
          });
        });
      }

      function os(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (i) {
            switch (i.label) {
              case 0:
                return e && as(t).pr ? [4
                /*yield*/
                , function (t, e) {
                  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
                    var n, i;
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                      switch (r.label) {
                        case 0:
                          return Ge(i = e.code) && i !== N.ABORTED ? (n = t.Fr.shift(), // In this case it's also unlikely that the server itself is melting
                          // down -- this was just a bad request so inhibit backoff on the next
                          // restart.
                          as(t).sr(), [4
                          /*yield*/
                          , Jo(t, function () {
                            return t.remoteSyncer.rejectFailedWrite(n.batchId, e);
                          })]) : [3
                          /*break*/
                          , 3];

                        case 1:
                          // It's possible that with the completion of this mutation
                          // another slot has freed up.
                          return r.sent(), [4
                          /*yield*/
                          , Zo(t)];

                        case 2:
                          // In this case it's also unlikely that the server itself is melting
                          // down -- this was just a bad request so inhibit backoff on the next
                          // restart.
                          // It's possible that with the completion of this mutation
                          // another slot has freed up.
                          r.sent(), r.label = 3;

                        case 3:
                          return [2
                          /*return*/
                          ];
                      }
                    });
                  });
                }(t, e)] : [3
                /*break*/
                , 2];
              // This error affects the actual write.

              case 1:
                // This error affects the actual write.
                i.sent(), i.label = 2;

              case 2:
                // If the write stream closed after the write handshake completes, a write
                // operation failed and we fail the pending operation.
                // The write stream might have been started by refilling the write
                // pipeline for failed writes
                return ts(t) && es(t), [2
                /*return*/
                ];
            }
          });
        });
      }
      /**
       * Toggles the network state when the client gains or loses its primary lease.
       */


      function ss(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                return n = F(t), e ? (n.Or["delete"](2
                /* IsSecondary */
                ), [4
                /*yield*/
                , Vo(n)]) : [3
                /*break*/
                , 2];

              case 1:
                return r.sent(), [3
                /*break*/
                , 5];

              case 2:
                return e ? [3
                /*break*/
                , 4] : (n.Or.add(2
                /* IsSecondary */
                ), [4
                /*yield*/
                , qo(n)]);

              case 3:
                r.sent(), n.Br.set("Unknown"
                /* Unknown */
                ), r.label = 4;

              case 4:
                r.label = 5;

              case 5:
                return [2
                /*return*/
                ];
            }
          });
        });
      }
      /**
       * If not yet initialized, registers the WatchStream and its network state
       * callback with `remoteStoreImpl`. Returns the existing stream if one is
       * already available.
       *
       * PORTING NOTE: On iOS and Android, the WatchStream gets registered on startup.
       * This is not done on Web to allow it to be tree-shaken.
       */


      function us(t) {
        var e = this;
        return t.Ur || ( // Create stream (but note that it is not started yet).
        t.Ur = function (t, e, n) {
          var r = F(t);
          return r.br(), new Lo(e, r.Hi, r.credentials, r.R, n);
        }(t.datastore, t.asyncQueue, {
          Ii: Ho.bind(null, t),
          Ri: Yo.bind(null, t),
          _r: $o.bind(null, t)
        }), t.Mr.push(function (i) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(e, void 0, void 0, function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
              switch (e.label) {
                case 0:
                  return i ? (t.Ur.sr(), Go(t) ? Qo(t) : t.Br.set("Unknown"
                  /* Unknown */
                  ), [3
                  /*break*/
                  , 3]) : [3
                  /*break*/
                  , 1];

                case 1:
                  return [4
                  /*yield*/
                  , t.Ur.stop()];

                case 2:
                  e.sent(), Wo(t), e.label = 3;

                case 3:
                  return [2
                  /*return*/
                  ];
              }
            });
          });
        })), t.Ur
        /**
        * If not yet initialized, registers the WriteStream and its network state
        * callback with `remoteStoreImpl`. Returns the existing stream if one is
        * already available.
        *
        * PORTING NOTE: On iOS and Android, the WriteStream gets registered on startup.
        * This is not done on Web to allow it to be tree-shaken.
        */
        ;
      }

      function as(t) {
        var e = this;
        return t.Kr || ( // Create stream (but note that it is not started yet).
        t.Kr = function (t, e, n) {
          var r = F(t);
          return r.br(), new Oo(e, r.Hi, r.credentials, r.R, n);
        }(t.datastore, t.asyncQueue, {
          Ii: ns.bind(null, t),
          Ri: os.bind(null, t),
          Ir: rs.bind(null, t),
          Tr: is.bind(null, t)
        }), t.Mr.push(function (i) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(e, void 0, void 0, function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
              switch (e.label) {
                case 0:
                  return i ? (t.Kr.sr(), [4
                  /*yield*/
                  , Zo(t)]) : [3
                  /*break*/
                  , 2];

                case 1:
                  // This will start the write stream if necessary.
                  return e.sent(), [3
                  /*break*/
                  , 4];

                case 2:
                  return [4
                  /*yield*/
                  , t.Kr.stop()];

                case 3:
                  e.sent(), t.Fr.length > 0 && (C("RemoteStore", "Stopping write stream with " + t.Fr.length + " pending writes"), t.Fr = []), e.label = 4;

                case 4:
                  return [2
                  /*return*/
                  ];
              }
            });
          });
        })), t.Kr
        /**
        * @license
        * Copyright 2017 Google LLC
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
        * you may not use this file except in compliance with the License.
        * You may obtain a copy of the License at
        *
        *   http://www.apache.org/licenses/LICENSE-2.0
        *
        * Unless required by applicable law or agreed to in writing, software
        * distributed under the License is distributed on an "AS IS" BASIS,
        * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        * See the License for the specific language governing permissions and
        * limitations under the License.
        */

        /**
        * Represents an operation scheduled to be run in the future on an AsyncQueue.
        *
        * It is created via DelayedOperation.createAndSchedule().
        *
        * Supports cancellation (via cancel()) and early execution (via skipDelay()).
        *
        * Note: We implement `PromiseLike` instead of `Promise`, as the `Promise` type
        * in newer versions of TypeScript defines `finally`, which is not available in
        * IE.
        */
        ;
      }

      var cs =
      /** @class */
      function () {
        function t(t, e, n, r, i) {
          this.asyncQueue = t, this.timerId = e, this.targetTimeMs = n, this.op = r, this.removalCallback = i, this.deferred = new br(), this.then = this.deferred.promise.then.bind(this.deferred.promise), // It's normal for the deferred promise to be canceled (due to cancellation)
          // and so we attach a dummy catch callback to avoid
          // 'UnhandledPromiseRejectionWarning' log spam.
          this.deferred.promise["catch"](function (t) {})
          /**
          * Creates and returns a DelayedOperation that has been scheduled to be
          * executed on the provided asyncQueue after the provided delayMs.
          *
          * @param asyncQueue - The queue to schedule the operation on.
          * @param id - A Timer ID identifying the type of operation this is.
          * @param delayMs - The delay (ms) before the operation should be scheduled.
          * @param op - The operation to run.
          * @param removalCallback - A callback to be called synchronously once the
          *   operation is executed or canceled, notifying the AsyncQueue to remove it
          *   from its delayedOperations list.
          *   PORTING NOTE: This exists to prevent making removeDelayedOperation() and
          *   the DelayedOperation class public.
          */
          ;
        }

        return t.createAndSchedule = function (e, n, r, i, o) {
          var s = new t(e, n, Date.now() + r, i, o);
          return s.start(r), s;
        },
        /**
         * Starts the timer. This is called immediately after construction by
         * createAndSchedule().
         */
        t.prototype.start = function (t) {
          var e = this;
          this.timerHandle = setTimeout(function () {
            return e.handleDelayElapsed();
          }, t);
        },
        /**
         * Queues the operation to run immediately (if it hasn't already been run or
         * canceled).
         */
        t.prototype.skipDelay = function () {
          return this.handleDelayElapsed();
        },
        /**
         * Cancels the operation if it hasn't already been executed or canceled. The
         * promise will be rejected.
         *
         * As long as the operation has not yet been run, calling cancel() provides a
         * guarantee that the operation will not be run.
         */
        t.prototype.cancel = function (t) {
          null !== this.timerHandle && (this.clearTimeout(), this.deferred.reject(new D(N.CANCELLED, "Operation cancelled" + (t ? ": " + t : ""))));
        }, t.prototype.handleDelayElapsed = function () {
          var t = this;
          this.asyncQueue.enqueueAndForget(function () {
            return null !== t.timerHandle ? (t.clearTimeout(), t.op().then(function (e) {
              return t.deferred.resolve(e);
            })) : Promise.resolve();
          });
        }, t.prototype.clearTimeout = function () {
          null !== this.timerHandle && (this.removalCallback(this), clearTimeout(this.timerHandle), this.timerHandle = null);
        }, t;
      }();
      /**
       * Returns a FirestoreError that can be surfaced to the user if the provided
       * error is an IndexedDbTransactionError. Re-throws the error otherwise.
       */


      function hs(t, e) {
        if (x("AsyncQueue", e + ": " + t), Nr(t)) return new D(N.UNAVAILABLE, e + ": " + t);
        throw t;
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * DocumentSet is an immutable (copy-on-write) collection that holds documents
       * in order specified by the provided comparator. We always add a document key
       * comparator on top of what is provided to guarantee document equality based on
       * the key.
       */


      var fs =
      /** @class */
      function () {
        /** The default ordering is by key if the comparator is omitted */
        function t(t) {
          // We are adding document key comparator to the end as it's the only
          // guaranteed unique property of a document.
          this.comparator = t ? function (e, n) {
            return t(e, n) || ct.comparator(e.key, n.key);
          } : function (t, e) {
            return ct.comparator(t.key, e.key);
          }, this.keyedMap = en(), this.sortedSet = new We(this.comparator)
          /**
          * Returns an empty copy of the existing DocumentSet, using the same
          * comparator.
          */
          ;
        }

        return t.emptySet = function (e) {
          return new t(e.comparator);
        }, t.prototype.has = function (t) {
          return null != this.keyedMap.get(t);
        }, t.prototype.get = function (t) {
          return this.keyedMap.get(t);
        }, t.prototype.first = function () {
          return this.sortedSet.minKey();
        }, t.prototype.last = function () {
          return this.sortedSet.maxKey();
        }, t.prototype.isEmpty = function () {
          return this.sortedSet.isEmpty();
        },
        /**
         * Returns the index of the provided key in the document set, or -1 if the
         * document key is not present in the set;
         */
        t.prototype.indexOf = function (t) {
          var e = this.keyedMap.get(t);
          return e ? this.sortedSet.indexOf(e) : -1;
        }, Object.defineProperty(t.prototype, "size", {
          get: function get() {
            return this.sortedSet.size;
          },
          enumerable: !1,
          configurable: !0
        }),
        /** Iterates documents in order defined by "comparator" */
        t.prototype.forEach = function (t) {
          this.sortedSet.inorderTraversal(function (e, n) {
            return t(e), !1;
          });
        },
        /** Inserts or updates a document with the same key */
        t.prototype.add = function (t) {
          // First remove the element if we have it.
          var e = this["delete"](t.key);
          return e.copy(e.keyedMap.insert(t.key, t), e.sortedSet.insert(t, null));
        },
        /** Deletes a document with a given key */
        t.prototype["delete"] = function (t) {
          var e = this.get(t);
          return e ? this.copy(this.keyedMap.remove(t), this.sortedSet.remove(e)) : this;
        }, t.prototype.isEqual = function (e) {
          if (!(e instanceof t)) return !1;
          if (this.size !== e.size) return !1;

          for (var n = this.sortedSet.getIterator(), r = e.sortedSet.getIterator(); n.hasNext();) {
            var i = n.getNext().key,
                o = r.getNext().key;
            if (!i.isEqual(o)) return !1;
          }

          return !0;
        }, t.prototype.toString = function () {
          var t = [];
          return this.forEach(function (e) {
            t.push(e.toString());
          }), 0 === t.length ? "DocumentSet ()" : "DocumentSet (\n  " + t.join("  \n") + "\n)";
        }, t.prototype.copy = function (e, n) {
          var r = new t();
          return r.comparator = this.comparator, r.keyedMap = e, r.sortedSet = n, r;
        }, t;
      }(),
          ls =
      /** @class */
      function () {
        function t() {
          this.Qr = new We(ct.comparator);
        }

        return t.prototype.track = function (t) {
          var e = t.doc.key,
              n = this.Qr.get(e);
          n ? // Merge the new change with the existing change.
          0
          /* Added */
          !== t.type && 3
          /* Metadata */
          === n.type ? this.Qr = this.Qr.insert(e, t) : 3
          /* Metadata */
          === t.type && 1
          /* Removed */
          !== n.type ? this.Qr = this.Qr.insert(e, {
            type: n.type,
            doc: t.doc
          }) : 2
          /* Modified */
          === t.type && 2
          /* Modified */
          === n.type ? this.Qr = this.Qr.insert(e, {
            type: 2
            /* Modified */
            ,
            doc: t.doc
          }) : 2
          /* Modified */
          === t.type && 0
          /* Added */
          === n.type ? this.Qr = this.Qr.insert(e, {
            type: 0
            /* Added */
            ,
            doc: t.doc
          }) : 1
          /* Removed */
          === t.type && 0
          /* Added */
          === n.type ? this.Qr = this.Qr.remove(e) : 1
          /* Removed */
          === t.type && 2
          /* Modified */
          === n.type ? this.Qr = this.Qr.insert(e, {
            type: 1
            /* Removed */
            ,
            doc: n.doc
          }) : 0
          /* Added */
          === t.type && 1
          /* Removed */
          === n.type ? this.Qr = this.Qr.insert(e, {
            type: 2
            /* Modified */
            ,
            doc: t.doc
          }) : // This includes these cases, which don't make sense:
          // Added->Added
          // Removed->Removed
          // Modified->Added
          // Removed->Modified
          // Metadata->Added
          // Removed->Metadata
          O() : this.Qr = this.Qr.insert(e, t);
        }, t.prototype.jr = function () {
          var t = [];
          return this.Qr.inorderTraversal(function (e, n) {
            t.push(n);
          }), t;
        }, t;
      }(),
          ds =
      /** @class */
      function () {
        function t(t, e, n, r, i, o, s, u) {
          this.query = t, this.docs = e, this.oldDocs = n, this.docChanges = r, this.mutatedKeys = i, this.fromCache = o, this.syncStateChanged = s, this.excludesMetadataChanges = u
          /** Returns a view snapshot as if all documents in the snapshot were added. */
          ;
        }

        return t.fromInitialDocuments = function (e, n, r, i) {
          var o = [];
          return n.forEach(function (t) {
            o.push({
              type: 0
              /* Added */
              ,
              doc: t
            });
          }), new t(e, n, fs.emptySet(n), o, r, i,
          /* syncStateChanged= */
          !0,
          /* excludesMetadataChanges= */
          !1);
        }, Object.defineProperty(t.prototype, "hasPendingWrites", {
          get: function get() {
            return !this.mutatedKeys.isEmpty();
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.isEqual = function (t) {
          if (!(this.fromCache === t.fromCache && this.syncStateChanged === t.syncStateChanged && this.mutatedKeys.isEqual(t.mutatedKeys) && ie(this.query, t.query) && this.docs.isEqual(t.docs) && this.oldDocs.isEqual(t.oldDocs))) return !1;
          var e = this.docChanges,
              n = t.docChanges;
          if (e.length !== n.length) return !1;

          for (var r = 0; r < e.length; r++) {
            if (e[r].type !== n[r].type || !e[r].doc.isEqual(n[r].doc)) return !1;
          }

          return !0;
        }, t;
      }(),
          ps = function ps() {
        this.Wr = void 0, this.listeners = [];
      },
          ys = function ys() {
        this.queries = new Ii(function (t) {
          return oe(t);
        }, ie), this.onlineState = "Unknown"
        /* Unknown */
        , this.Gr = new Set();
      };
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * DocumentChangeSet keeps track of a set of changes to docs in a query, merging
       * duplicate events for the same doc.
       */


      function vs(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, i, o, s, u, a, c;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                if (n = F(t), i = e.query, o = !1, (s = n.queries.get(i)) || (o = !0, s = new ps()), !o) return [3
                /*break*/
                , 4];
                r.label = 1;

              case 1:
                return r.trys.push([1, 3,, 4]), u = s, [4
                /*yield*/
                , n.onListen(i)];

              case 2:
                return u.Wr = r.sent(), [3
                /*break*/
                , 4];

              case 3:
                return a = r.sent(), c = hs(a, "Initialization of query '" + se(e.query) + "' failed"), [2
                /*return*/
                , void e.onError(c)];

              case 4:
                return n.queries.set(i, s), s.listeners.push(e), // Run global snapshot listeners if a consistent snapshot has been emitted.
                e.zr(n.onlineState), s.Wr && e.Hr(s.Wr) && bs(n), [2
                /*return*/
                ];
            }
          });
        });
      }

      function ms(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, i, o, s, u;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            return n = F(t), i = e.query, o = !1, (s = n.queries.get(i)) && (u = s.listeners.indexOf(e)) >= 0 && (s.listeners.splice(u, 1), o = 0 === s.listeners.length), o ? [2
            /*return*/
            , (n.queries["delete"](i), n.onUnlisten(i))] : [2
            /*return*/
            ];
          });
        });
      }

      function gs(t, e) {
        for (var n = F(t), r = !1, i = 0, o = e; i < o.length; i++) {
          var s = o[i],
              u = s.query,
              a = n.queries.get(u);

          if (a) {
            for (var c = 0, h = a.listeners; c < h.length; c++) {
              h[c].Hr(s) && (r = !0);
            }

            a.Wr = s;
          }
        }

        r && bs(n);
      }

      function ws(t, e, n) {
        var r = F(t),
            i = r.queries.get(e);
        if (i) for (var o = 0, s = i.listeners; o < s.length; o++) {
          s[o].onError(n);
        } // Remove all listeners. NOTE: We don't need to call syncEngine.unlisten()
        // after an error.

        r.queries["delete"](e);
      } // Call all global snapshot listeners that have been set.


      function bs(t) {
        t.Gr.forEach(function (t) {
          t.next();
        });
      }
      /**
       * QueryListener takes a series of internal view snapshots and determines
       * when to raise the event.
       *
       * It uses an Observer to dispatch events.
       */


      var Is =
      /** @class */
      function () {
        function t(t, e, n) {
          this.query = t, this.Jr = e,
          /**
               * Initial snapshots (e.g. from cache) may not be propagated to the wrapped
               * observer. This flag is set to true once we've actually raised an event.
               */
          this.Yr = !1, this.Xr = null, this.onlineState = "Unknown"
          /* Unknown */
          , this.options = n || {}
          /**
          * Applies the new ViewSnapshot to this listener, raising a user-facing event
          * if applicable (depending on what changed, whether the user has opted into
          * metadata-only changes, etc.). Returns true if a user-facing event was
          * indeed raised.
          */
          ;
        }

        return t.prototype.Hr = function (t) {
          if (!this.options.includeMetadataChanges) {
            for ( // Remove the metadata only changes.
            var e = [], n = 0, r = t.docChanges; n < r.length; n++) {
              var i = r[n];
              3
              /* Metadata */
              !== i.type && e.push(i);
            }

            t = new ds(t.query, t.docs, t.oldDocs, e, t.mutatedKeys, t.fromCache, t.syncStateChanged,
            /* excludesMetadataChanges= */
            !0);
          }

          var o = !1;
          return this.Yr ? this.Zr(t) && (this.Jr.next(t), o = !0) : this.eo(t, this.onlineState) && (this.no(t), o = !0), this.Xr = t, o;
        }, t.prototype.onError = function (t) {
          this.Jr.error(t);
        },
        /** Returns whether a snapshot was raised. */
        t.prototype.zr = function (t) {
          this.onlineState = t;
          var e = !1;
          return this.Xr && !this.Yr && this.eo(this.Xr, t) && (this.no(this.Xr), e = !0), e;
        }, t.prototype.eo = function (t, e) {
          // Always raise the first event when we're synced
          if (!t.fromCache) return !0; // NOTE: We consider OnlineState.Unknown as online (it should become Offline
          // or Online if we wait long enough).

          var n = "Offline"
          /* Offline */
          !== e; // Don't raise the event if we're online, aren't synced yet (checked
          // above) and are waiting for a sync.

          return !(this.options.so && n || t.docs.isEmpty() && "Offline"
          /* Offline */
          !== e); // Raise data from cache if we have any documents or we are offline
        }, t.prototype.Zr = function (t) {
          // We don't need to handle includeDocumentMetadataChanges here because
          // the Metadata only changes have already been stripped out if needed.
          // At this point the only changes we will see are the ones we should
          // propagate.
          if (t.docChanges.length > 0) return !0;
          var e = this.Xr && this.Xr.hasPendingWrites !== t.hasPendingWrites;
          return !(!t.syncStateChanged && !e) && !0 === this.options.includeMetadataChanges; // Generally we should have hit one of the cases above, but it's possible
          // to get here if there were only metadata docChanges and they got
          // stripped out.
        }, t.prototype.no = function (t) {
          t = ds.fromInitialDocuments(t.query, t.docs, t.mutatedKeys, t.fromCache), this.Yr = !0, this.Jr.next(t);
        }, t;
      }(),
          Ts =
      /** @class */
      function () {
        function t(t, // How many bytes this element takes to store in the bundle.
        e) {
          this.payload = t, this.byteLength = e;
        }

        return t.prototype.io = function () {
          return "metadata" in this.payload;
        }, t;
      }(),
          Es =
      /** @class */
      function () {
        function t(t) {
          this.R = t;
        }

        return t.prototype.qn = function (t) {
          return An(this.R, t);
        },
        /**
         * Converts a BundleDocument to a MutableDocument.
         */
        t.prototype.Un = function (t) {
          return t.metadata.exists ? On(this.R, t.document, !1) : Nt.newNoDocument(this.qn(t.metadata.name), this.Kn(t.metadata.readTime));
        }, t.prototype.Kn = function (t) {
          return _n(t);
        }, t;
      }(),
          _s =
      /** @class */
      function () {
        function t(t, e, n) {
          this.ro = t, this.localStore = e, this.R = n,
          /** Batched queries to be saved into storage */
          this.queries = [],
          /** Batched documents to be saved into storage */
          this.documents = [], this.progress = Ss(t)
          /**
          * Adds an element from the bundle to the loader.
          *
          * Returns a new progress if adding the element leads to a new progress,
          * otherwise returns null.
          */
          ;
        }

        return t.prototype.oo = function (t) {
          this.progress.bytesLoaded += t.byteLength;
          var e = this.progress.documentsLoaded;
          return t.payload.namedQuery ? this.queries.push(t.payload.namedQuery) : t.payload.documentMetadata ? (this.documents.push({
            metadata: t.payload.documentMetadata
          }), t.payload.documentMetadata.exists || ++e) : t.payload.document && (this.documents[this.documents.length - 1].document = t.payload.document, ++e), e !== this.progress.documentsLoaded ? (this.progress.documentsLoaded = e, Object.assign({}, this.progress)) : null;
        }, t.prototype.co = function (t) {
          for (var e = new Map(), n = new Es(this.R), r = 0, i = t; r < i.length; r++) {
            var o = i[r];
            if (o.metadata.queries) for (var s = n.qn(o.metadata.name), u = 0, a = o.metadata.queries; u < a.length; u++) {
              var c = a[u],
                  h = (e.get(c) || sn()).add(s);
              e.set(c, h);
            }
          }

          return e;
        },
        /**
         * Update the progress to 'Success' and return the updated progress.
         */
        t.prototype.complete = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var t, e, n, i, o;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
              switch (r.label) {
                case 0:
                  return [4
                  /*yield*/
                  , Zi(this.localStore, new Es(this.R), this.documents, this.ro.id)];

                case 1:
                  t = r.sent(), e = this.co(this.documents), n = 0, i = this.queries, r.label = 2;

                case 2:
                  return n < i.length ? (o = i[n], [4
                  /*yield*/
                  , to(this.localStore, o, e.get(o.name))]) : [3
                  /*break*/
                  , 5];

                case 3:
                  r.sent(), r.label = 4;

                case 4:
                  return n++, [3
                  /*break*/
                  , 2];

                case 5:
                  return [2
                  /*return*/
                  , (this.progress.taskState = "Success", new Pi(Object.assign({}, this.progress), t))];
              }
            });
          });
        }, t;
      }();
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * A complete element in the bundle stream, together with the byte length it
       * occupies in the stream.
       */

      /**
       * Returns a `LoadBundleTaskProgress` representing the initial progress of
       * loading a bundle.
       */


      function Ss(t) {
        return {
          taskState: "Running",
          documentsLoaded: 0,
          bytesLoaded: 0,
          totalDocuments: t.totalDocuments,
          totalBytes: t.totalBytes
        };
      }
      /**
       * Returns a `LoadBundleTaskProgress` representing the progress that the loading
       * has succeeded.
       */

      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var Ns = function Ns(t) {
        this.key = t;
      },
          Ds = function Ds(t) {
        this.key = t;
      },
          As =
      /** @class */
      function () {
        function t(t,
        /** Documents included in the remote target */
        e) {
          this.query = t, this.uo = e, this.ao = null,
          /**
               * A flag whether the view is current with the backend. A view is considered
               * current after it has seen the current flag from the backend and did not
               * lose consistency within the watch stream (e.g. because of an existence
               * filter mismatch).
               */
          this.current = !1,
          /** Documents in the view but not in the remote target */
          this.ho = sn(),
          /** Document Keys that have local changes */
          this.mutatedKeys = sn(), this.lo = ae(t), this.fo = new fs(this.lo);
        }

        return Object.defineProperty(t.prototype, "wo", {
          /**
           * The set of remote documents that the server has told us belongs to the target associated with
           * this view.
           */
          get: function get() {
            return this.uo;
          },
          enumerable: !1,
          configurable: !0
        }),
        /**
         * Iterates over a set of doc changes, applies the query limit, and computes
         * what the new results should be, what the changes were, and whether we may
         * need to go back to the local cache for more results. Does not make any
         * changes to the view.
         * @param docChanges - The doc changes to apply to this view.
         * @param previousChanges - If this is being called with a refill, then start
         *        with this set of docs and changes instead of the current view.
         * @returns a new set of docs, changes, and refill flag.
         */
        t.prototype._o = function (t, e) {
          var n = this,
              r = e ? e.mo : new ls(),
              i = e ? e.fo : this.fo,
              o = e ? e.mutatedKeys : this.mutatedKeys,
              s = i,
              u = !1,
              a = $t(this.query) && i.size === this.query.limit ? i.last() : null,
              c = Xt(this.query) && i.size === this.query.limit ? i.first() : null; // Drop documents out to meet limit/limitToLast requirement.

          if (t.inorderTraversal(function (t, e) {
            var h = i.get(t),
                f = ue(n.query, e) ? e : null,
                l = !!h && n.mutatedKeys.has(h.key),
                d = !!f && (f.hasLocalMutations || // We only consider committed mutations for documents that were
            // mutated during the lifetime of the view.
            n.mutatedKeys.has(f.key) && f.hasCommittedMutations),
                p = !1; // Calculate change

            h && f ? h.data.isEqual(f.data) ? l !== d && (r.track({
              type: 3
              /* Metadata */
              ,
              doc: f
            }), p = !0) : n.yo(h, f) || (r.track({
              type: 2
              /* Modified */
              ,
              doc: f
            }), p = !0, (a && n.lo(f, a) > 0 || c && n.lo(f, c) < 0) && ( // This doc moved from inside the limit to outside the limit.
            // That means there may be some other doc in the local cache
            // that should be included instead.
            u = !0)) : !h && f ? (r.track({
              type: 0
              /* Added */
              ,
              doc: f
            }), p = !0) : h && !f && (r.track({
              type: 1
              /* Removed */
              ,
              doc: h
            }), p = !0, (a || c) && ( // A doc was removed from a full limit query. We'll need to
            // requery from the local cache to see if we know about some other
            // doc that should be in the results.
            u = !0)), p && (f ? (s = s.add(f), o = d ? o.add(t) : o["delete"](t)) : (s = s["delete"](t), o = o["delete"](t)));
          }), $t(this.query) || Xt(this.query)) for (; s.size > this.query.limit;) {
            var h = $t(this.query) ? s.last() : s.first();
            s = s["delete"](h.key), o = o["delete"](h.key), r.track({
              type: 1
              /* Removed */
              ,
              doc: h
            });
          }
          return {
            fo: s,
            mo: r,
            Nn: u,
            mutatedKeys: o
          };
        }, t.prototype.yo = function (t, e) {
          // We suppress the initial change event for documents that were modified as
          // part of a write acknowledgment (e.g. when the value of a server transform
          // is applied) as Watch will send us the same document again.
          // By suppressing the event, we only raise two user visible events (one with
          // `hasPendingWrites` and the final state of the document) instead of three
          // (one with `hasPendingWrites`, the modified document with
          // `hasPendingWrites` and the final state of the document).
          return t.hasLocalMutations && e.hasCommittedMutations && !e.hasLocalMutations;
        },
        /**
         * Updates the view with the given ViewDocumentChanges and optionally updates
         * limbo docs and sync state from the provided target change.
         * @param docChanges - The set of changes to make to the view's docs.
         * @param updateLimboDocuments - Whether to update limbo documents based on
         *        this change.
         * @param targetChange - A target change to apply for computing limbo docs and
         *        sync state.
         * @returns A new ViewChange with the given docs, changes, and sync state.
         */
        // PORTING NOTE: The iOS/Android clients always compute limbo document changes.
        t.prototype.applyChanges = function (t, e, n) {
          var r = this,
              i = this.fo;
          this.fo = t.fo, this.mutatedKeys = t.mutatedKeys; // Sort changes based on type and query comparator

          var o = t.mo.jr();
          o.sort(function (t, e) {
            return function (t, e) {
              var n = function n(t) {
                switch (t) {
                  case 0
                  /* Added */
                  :
                    return 1;

                  case 2
                  /* Modified */
                  :
                  case 3
                  /* Metadata */
                  :
                    // A metadata change is converted to a modified change at the public
                    // api layer.  Since we sort by document key and then change type,
                    // metadata and modified changes must be sorted equivalently.
                    return 2;

                  case 1
                  /* Removed */
                  :
                    return 0;

                  default:
                    return O();
                }
              };

              return n(t) - n(e);
            }(t.type, e.type) || r.lo(t.doc, e.doc);
          }), this.po(n);
          var s = e ? this.Eo() : [],
              u = 0 === this.ho.size && this.current ? 1
          /* Synced */
          : 0
          /* Local */
          ,
              a = u !== this.ao;
          return this.ao = u, 0 !== o.length || a ? {
            snapshot: new ds(this.query, t.fo, i, o, t.mutatedKeys, 0
            /* Local */
            === u, a,
            /* excludesMetadataChanges= */
            !1),
            To: s
          } : {
            To: s
          }; // no changes
        },
        /**
         * Applies an OnlineState change to the view, potentially generating a
         * ViewChange if the view's syncState changes as a result.
         */
        t.prototype.zr = function (t) {
          return this.current && "Offline"
          /* Offline */
          === t ? ( // If we're offline, set `current` to false and then call applyChanges()
          // to refresh our syncState and generate a ViewChange as appropriate. We
          // are guaranteed to get a new TargetChange that sets `current` back to
          // true once the client is back online.
          this.current = !1, this.applyChanges({
            fo: this.fo,
            mo: new ls(),
            mutatedKeys: this.mutatedKeys,
            Nn: !1
          },
          /* updateLimboDocuments= */
          !1)) : {
            To: []
          };
        },
        /**
         * Returns whether the doc for the given key should be in limbo.
         */
        t.prototype.Io = function (t) {
          // If the remote end says it's part of this query, it's not in limbo.
          return !this.uo.has(t) && // The local store doesn't think it's a result, so it shouldn't be in limbo.
          !!this.fo.has(t) && !this.fo.get(t).hasLocalMutations;
        },
        /**
         * Updates syncedDocuments, current, and limbo docs based on the given change.
         * Returns the list of changes to which docs are in limbo.
         */
        t.prototype.po = function (t) {
          var e = this;
          t && (t.addedDocuments.forEach(function (t) {
            return e.uo = e.uo.add(t);
          }), t.modifiedDocuments.forEach(function (t) {}), t.removedDocuments.forEach(function (t) {
            return e.uo = e.uo["delete"](t);
          }), this.current = t.current);
        }, t.prototype.Eo = function () {
          var t = this; // We can only determine limbo documents when we're in-sync with the server.

          if (!this.current) return []; // TODO(klimt): Do this incrementally so that it's not quadratic when
          // updating many documents.

          var e = this.ho;
          this.ho = sn(), this.fo.forEach(function (e) {
            t.Io(e.key) && (t.ho = t.ho.add(e.key));
          }); // Diff the new limbo docs with the old limbo docs.

          var n = [];
          return e.forEach(function (e) {
            t.ho.has(e) || n.push(new Ds(e));
          }), this.ho.forEach(function (t) {
            e.has(t) || n.push(new Ns(t));
          }), n;
        },
        /**
         * Update the in-memory state of the current view with the state read from
         * persistence.
         *
         * We update the query view whenever a client's primary status changes:
         * - When a client transitions from primary to secondary, it can miss
         *   LocalStorage updates and its query views may temporarily not be
         *   synchronized with the state on disk.
         * - For secondary to primary transitions, the client needs to update the list
         *   of `syncedDocuments` since secondary clients update their query views
         *   based purely on synthesized RemoteEvents.
         *
         * @param queryResult.documents - The documents that match the query according
         * to the LocalStore.
         * @param queryResult.remoteKeys - The keys of the documents that match the
         * query according to the backend.
         *
         * @returns The ViewChange that resulted from this synchronization.
         */
        // PORTING NOTE: Multi-tab only.
        t.prototype.Ao = function (t) {
          this.uo = t.Bn, this.ho = sn();

          var e = this._o(t.documents);

          return this.applyChanges(e,
          /*updateLimboDocuments=*/
          !0);
        },
        /**
         * Returns a view snapshot as if this query was just listened to. Contains
         * a document add for every existing document and the `fromCache` and
         * `hasPendingWrites` status of the already established view.
         */
        // PORTING NOTE: Multi-tab only.
        t.prototype.Ro = function () {
          return ds.fromInitialDocuments(this.query, this.fo, this.mutatedKeys, 0
          /* Local */
          === this.ao);
        }, t;
      }(),
          ks = function ks(
      /**
           * The query itself.
           */
      t,
      /**
           * The target number created by the client that is used in the watch
           * stream to identify this query.
           */
      e,
      /**
           * The view is responsible for computing the final merged truth of what
           * docs are in the query. It gets notified of local and remote changes,
           * and applies the query filters and limits to determine the most correct
           * possible results.
           */
      n) {
        this.query = t, this.targetId = e, this.view = n;
      },
          Cs = function Cs(t) {
        this.key = t,
        /**
                 * Set to true once we've received a document. This is used in
                 * getRemoteKeysForTarget() and ultimately used by WatchChangeAggregator to
                 * decide whether it needs to manufacture a delete event for the target once
                 * the target is CURRENT.
                 */
        this.bo = !1;
      },
          xs =
      /** @class */
      function () {
        function t(t, e, n, // PORTING NOTE: Manages state synchronization in multi-tab environments.
        r, i, o) {
          this.localStore = t, this.remoteStore = e, this.eventManager = n, this.sharedClientState = r, this.currentUser = i, this.maxConcurrentLimboResolutions = o, this.vo = {}, this.Po = new Ii(function (t) {
            return oe(t);
          }, ie), this.Vo = new Map(),
          /**
               * The keys of documents that are in limbo for which we haven't yet started a
               * limbo resolution query. The strings in this set are the result of calling
               * `key.path.canonicalString()` where `key` is a `DocumentKey` object.
               *
               * The `Set` type was chosen because it provides efficient lookup and removal
               * of arbitrary elements and it also maintains insertion order, providing the
               * desired queue-like FIFO semantics.
               */
          this.So = new Set(),
          /**
               * Keeps track of the target ID for each document that is in limbo with an
               * active target.
               */
          this.Do = new We(ct.comparator),
          /**
               * Keeps track of the information about an active limbo resolution for each
               * active target ID that was started for the purpose of limbo resolution.
               */
          this.Co = new Map(), this.No = new no(),
          /** Stores user completion handlers, indexed by User and BatchId. */
          this.xo = {},
          /** Stores user callbacks waiting for all pending writes to be acknowledged. */
          this.ko = new Map(), this.Fo = ci.Yt(), this.onlineState = "Unknown"
          /* Unknown */
          , // The primary state is set to `true` or `false` immediately after Firestore
          // startup. In the interim, a client should only be considered primary if
          // `isPrimary` is true.
          this.$o = void 0;
        }

        return Object.defineProperty(t.prototype, "isPrimaryClient", {
          get: function get() {
            return !0 === this.$o;
          },
          enumerable: !1,
          configurable: !0
        }), t;
      }();
      /**
       * Initiates the new listen, resolves promise when listen enqueued to the
       * server. All the subsequent view snapshots or errors are sent to the
       * subscribed handlers. Returns the initial snapshot.
       */


      function Rs(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, i, o, s, u, a;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                return n = uu(t), (s = n.Po.get(e)) ? ( // PORTING NOTE: With Multi-Tab Web, it is possible that a query view
                // already exists when EventManager calls us for the first time. This
                // happens when the primary tab is already listening to this query on
                // behalf of another tab and the user of the primary also starts listening
                // to the query. EventManager will not have an assigned target ID in this
                // case and calls `listen` to obtain this ID.
                i = s.targetId, n.sharedClientState.addLocalQueryTarget(i), o = s.view.Ro(), [3
                /*break*/
                , 4]) : [3
                /*break*/
                , 1];

              case 1:
                return [4
                /*yield*/
                , Wi(n.localStore, ne(e))];

              case 2:
                return u = r.sent(), a = n.sharedClientState.addLocalQueryTarget(u.targetId), i = u.targetId, [4
                /*yield*/
                , Ls(n, e, i, "current" === a)];

              case 3:
                o = r.sent(), n.isPrimaryClient && Uo(n.remoteStore, u), r.label = 4;

              case 4:
                return [2
                /*return*/
                , o];
            }
          });
        });
      }
      /**
       * Registers a view for a previously unknown query and computes its initial
       * snapshot.
       */


      function Ls(t, e, i, o) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var s, u, a, c, h, f;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (l) {
            switch (l.label) {
              case 0:
                // PORTING NOTE: On Web only, we inject the code that registers new Limbo
                // targets based on view changes. This allows us to only depend on Limbo
                // changes when user code includes queries.
                return t.Oo = function (e, i, o) {
                  return function (t, e, i, o) {
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
                      var n, s, u;
                      return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                        switch (r.label) {
                          case 0:
                            return n = e.view._o(i), n.Nn ? [4
                            /*yield*/
                            , Yi(t.localStore, e.query,
                            /* usePreviousResults= */
                            !1).then(function (t) {
                              var r = t.documents;
                              return e.view._o(r, n);
                            })] : [3
                            /*break*/
                            , 2];

                          case 1:
                            // The query has a limit and some docs were removed, so we need
                            // to re-run the query against the local store to make sure we
                            // didn't lose any good docs that had been past the limit.
                            n = r.sent(), r.label = 2;

                          case 2:
                            return s = o && o.targetChanges.get(e.targetId), u = e.view.applyChanges(n,
                            /* updateLimboDocuments= */
                            t.isPrimaryClient, s), [2
                            /*return*/
                            , (zs(t, e.targetId, u.To), u.snapshot)];
                        }
                      });
                    });
                  }(t, e, i, o);
                }, [4
                /*yield*/
                , Yi(t.localStore, e,
                /* usePreviousResults= */
                !0)];

              case 1:
                return s = l.sent(), u = new As(e, s.Bn), a = u._o(s.documents), c = hn.createSynthesizedTargetChangeForCurrentChange(i, o && "Offline"
                /* Offline */
                !== t.onlineState), h = u.applyChanges(a,
                /* updateLimboDocuments= */
                t.isPrimaryClient, c), zs(t, i, h.To), f = new ks(e, i, u), [2
                /*return*/
                , (t.Po.set(e, f), t.Vo.has(i) ? t.Vo.get(i).push(e) : t.Vo.set(i, [e]), h.snapshot)];
            }
          });
        });
      }
      /** Stops listening to the query. */


      function Os(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, i, o;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                return n = F(t), i = n.Po.get(e), (o = n.Vo.get(i.targetId)).length > 1 ? [2
                /*return*/
                , (n.Vo.set(i.targetId, o.filter(function (t) {
                  return !ie(t, e);
                })), void n.Po["delete"](e))] : n.isPrimaryClient ? ( // We need to remove the local query target first to allow us to verify
                // whether any other client is still interested in this target.
                n.sharedClientState.removeLocalQueryTarget(i.targetId), n.sharedClientState.isActiveQueryTarget(i.targetId) ? [3
                /*break*/
                , 2] : [4
                /*yield*/
                , Hi(n.localStore, i.targetId,
                /*keepPersistedTargetData=*/
                !1).then(function () {
                  n.sharedClientState.clearQueryState(i.targetId), Bo(n.remoteStore, i.targetId), Qs(n, i.targetId);
                })["catch"](pi)]) : [3
                /*break*/
                , 3];

              case 1:
                r.sent(), r.label = 2;

              case 2:
                return [3
                /*break*/
                , 5];

              case 3:
                return Qs(n, i.targetId), [4
                /*yield*/
                , Hi(n.localStore, i.targetId,
                /*keepPersistedTargetData=*/
                !0)];

              case 4:
                r.sent(), r.label = 5;

              case 5:
                return [2
                /*return*/
                ];
            }
          });
        });
      }
      /**
       * Initiates the write of local mutation batch which involves adding the
       * writes to the mutation queue, notifying the remote store about new
       * mutations and raising events for any changes this write caused.
       *
       * The promise returned by this call is resolved when the above steps
       * have completed, *not* when the write was acked by the backend. The
       * userCallback is resolved once the write was acked/rejected by the
       * backend (or failed locally for any other reason).
       */


      function Ps(t, e, i) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, o, s, u;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                n = au(t), r.label = 1;

              case 1:
                return r.trys.push([1, 5,, 6]), [4
                /*yield*/
                , function (t, e) {
                  var n,
                      r = F(t),
                      i = j.now(),
                      o = e.reduce(function (t, e) {
                    return t.add(e.key);
                  }, sn());
                  return r.persistence.runTransaction("Locally write mutations", "readwrite", function (t) {
                    return r.Mn.pn(t, o).next(function (o) {
                      n = o;

                      for ( // For non-idempotent mutations (such as `FieldValue.increment()`),
                      // we record the base state in a separate patch mutation. This is
                      // later used to guarantee consistent values and prevents flicker
                      // even if the backend sends us an update that already includes our
                      // transform.
                      var s = [], u = 0, a = e; u < a.length; u++) {
                        var c = a[u],
                            h = Re(c, n.get(c.key));
                        null != h && // NOTE: The base state should only be applied if there's some
                        // existing document to override, so use a Precondition of
                        // exists=true
                        s.push(new Fe(c.key, h, St(h.value.mapValue), De.exists(!0)));
                      }

                      return r._n.addMutationBatch(t, i, s, e);
                    });
                  }).then(function (t) {
                    return t.applyToLocalDocumentSet(n), {
                      batchId: t.batchId,
                      changes: n
                    };
                  });
                }(n.localStore, e)];

              case 2:
                return o = r.sent(), n.sharedClientState.addPendingMutation(o.batchId), function (t, e, n) {
                  var r = t.xo[t.currentUser.toKey()];
                  r || (r = new We(q)), r = r.insert(e, n), t.xo[t.currentUser.toKey()] = r;
                }(n, o.batchId, i), [4
                /*yield*/
                , Ys(n, o.changes)];

              case 3:
                return r.sent(), [4
                /*yield*/
                , Zo(n.remoteStore)];

              case 4:
                return r.sent(), [3
                /*break*/
                , 6];

              case 5:
                return s = r.sent(), u = hs(s, "Failed to persist write"), i.reject(u), [3
                /*break*/
                , 6];

              case 6:
                return [2
                /*return*/
                ];
            }
          });
        });
      }
      /**
       * Applies one remote event to the sync engine, notifying any views of the
       * changes, and releasing any pending mutation batches that would become
       * visible because of the snapshot version the remote event contains.
       */


      function Fs(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, i;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                n = F(t), r.label = 1;

              case 1:
                return r.trys.push([1, 4,, 6]), [4
                /*yield*/
                , Qi(n.localStore, e)];

              case 2:
                return i = r.sent(), // Update `receivedDocument` as appropriate for any limbo targets.
                e.targetChanges.forEach(function (t, e) {
                  var r = n.Co.get(e);
                  r && ( // Since this is a limbo resolution lookup, it's for a single document
                  // and it could be added, modified, or removed, but not a combination.
                  P(t.addedDocuments.size + t.modifiedDocuments.size + t.removedDocuments.size <= 1), t.addedDocuments.size > 0 ? r.bo = !0 : t.modifiedDocuments.size > 0 ? P(r.bo) : t.removedDocuments.size > 0 && (P(r.bo), r.bo = !1));
                }), [4
                /*yield*/
                , Ys(n, i, e)];

              case 3:
                // Update `receivedDocument` as appropriate for any limbo targets.
                return r.sent(), [3
                /*break*/
                , 6];

              case 4:
                return [4
                /*yield*/
                , pi(r.sent())];

              case 5:
                return r.sent(), [3
                /*break*/
                , 6];

              case 6:
                return [2
                /*return*/
                ];
            }
          });
        });
      }
      /**
       * Applies an OnlineState change to the sync engine and notifies any views of
       * the change.
       */


      function Ms(t, e, n) {
        var r = F(t); // If we are the secondary client, we explicitly ignore the remote store's
        // online state (the local client may go offline, even though the primary
        // tab remains online) and only apply the primary tab's online state from
        // SharedClientState.

        if (r.isPrimaryClient && 0
        /* RemoteStore */
        === n || !r.isPrimaryClient && 1
        /* SharedClientState */
        === n) {
          var i = [];
          r.Po.forEach(function (t, n) {
            var r = n.view.zr(e);
            r.snapshot && i.push(r.snapshot);
          }), function (t, e) {
            var n = F(t);
            n.onlineState = e;
            var r = !1;
            n.queries.forEach(function (t, n) {
              for (var i = 0, o = n.listeners; i < o.length; i++) {
                // Run global snapshot listeners if a consistent snapshot has been emitted.
                o[i].zr(e) && (r = !0);
              }
            }), r && bs(n);
          }(r.eventManager, e), i.length && r.vo._r(i), r.onlineState = e, r.isPrimaryClient && r.sharedClientState.setOnlineState(e);
        }
      }
      /**
       * Rejects the listen for the given targetID. This can be triggered by the
       * backend for any active target.
       *
       * @param syncEngine - The sync engine implementation.
       * @param targetId - The targetID corresponds to one previously initiated by the
       * user as part of TargetData passed to listen() on RemoteStore.
       * @param err - A description of the condition that has forced the rejection.
       * Nearly always this will be an indication that the user is no longer
       * authorized to see the data matching the target.
       */


      function Vs(t, e, i) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, o, s, u, a, c;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                // PORTING NOTE: Multi-tab only.
                return (n = F(t)).sharedClientState.updateQueryState(e, "rejected", i), o = n.Co.get(e), (s = o && o.key) ? (u = (u = new We(ct.comparator)).insert(s, Nt.newNoDocument(s, K.min())), a = sn().add(s), c = new cn(K.min(),
                /* targetChanges= */
                new Map(),
                /* targetMismatches= */
                new $e(q), u, a), [4
                /*yield*/
                , Fs(n, c)]) : [3
                /*break*/
                , 2];

              case 1:
                return r.sent(), // Since this query failed, we won't want to manually unlisten to it.
                // We only remove it from bookkeeping after we successfully applied the
                // RemoteEvent. If `applyRemoteEvent()` throws, we want to re-listen to
                // this query when the RemoteStore restarts the Watch stream, which should
                // re-trigger the target failure.
                n.Do = n.Do.remove(s), n.Co["delete"](e), Hs(n), [3
                /*break*/
                , 4];

              case 2:
                return [4
                /*yield*/
                , Hi(n.localStore, e,
                /* keepPersistedTargetData */
                !1).then(function () {
                  return Qs(n, e, i);
                })["catch"](pi)];

              case 3:
                r.sent(), r.label = 4;

              case 4:
                return [2
                /*return*/
                ];
            }
          });
        });
      }

      function qs(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, i, o;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                n = F(t), i = e.batch.batchId, r.label = 1;

              case 1:
                return r.trys.push([1, 4,, 6]), [4
                /*yield*/
                , ji(n.localStore, e)];

              case 2:
                return o = r.sent(), // The local store may or may not be able to apply the write result and
                // raise events immediately (depending on whether the watcher is caught
                // up), so we raise user callbacks first so that they consistently happen
                // before listen events.
                Ks(n, i,
                /*error=*/
                null), js(n, i), n.sharedClientState.updateMutationState(i, "acknowledged"), [4
                /*yield*/
                , Ys(n, o)];

              case 3:
                // The local store may or may not be able to apply the write result and
                // raise events immediately (depending on whether the watcher is caught
                // up), so we raise user callbacks first so that they consistently happen
                // before listen events.
                return r.sent(), [3
                /*break*/
                , 6];

              case 4:
                return [4
                /*yield*/
                , pi(r.sent())];

              case 5:
                return r.sent(), [3
                /*break*/
                , 6];

              case 6:
                return [2
                /*return*/
                ];
            }
          });
        });
      }

      function Us(t, e, i) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, o;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                n = F(t), r.label = 1;

              case 1:
                return r.trys.push([1, 4,, 6]), [4
                /*yield*/
                , function (t, e) {
                  var n = F(t);
                  return n.persistence.runTransaction("Reject batch", "readwrite-primary", function (t) {
                    var r;
                    return n._n.lookupMutationBatch(t, e).next(function (e) {
                      return P(null !== e), r = e.keys(), n._n.removeMutationBatch(t, e);
                    }).next(function () {
                      return n._n.performConsistencyCheck(t);
                    }).next(function () {
                      return n.Mn.pn(t, r);
                    });
                  });
                }(n.localStore, e)];

              case 2:
                return o = r.sent(), // The local store may or may not be able to apply the write result and
                // raise events immediately (depending on whether the watcher is caught up),
                // so we raise user callbacks first so that they consistently happen before
                // listen events.
                Ks(n, e, i), js(n, e), n.sharedClientState.updateMutationState(e, "rejected", i), [4
                /*yield*/
                , Ys(n, o)];

              case 3:
                // The local store may or may not be able to apply the write result and
                // raise events immediately (depending on whether the watcher is caught up),
                // so we raise user callbacks first so that they consistently happen before
                // listen events.
                return r.sent(), [3
                /*break*/
                , 6];

              case 4:
                return [4
                /*yield*/
                , pi(r.sent())];

              case 5:
                return r.sent(), [3
                /*break*/
                , 6];

              case 6:
                return [2
                /*return*/
                ];
            }
          });
        });
      }
      /**
       * Registers a user callback that resolves when all pending mutations at the moment of calling
       * are acknowledged .
       */


      function Bs(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, i, o, s, u;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                zo((n = F(t)).remoteStore) || C("SyncEngine", "The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled."), r.label = 1;

              case 1:
                return r.trys.push([1, 3,, 4]), [4
                /*yield*/
                , function (t) {
                  var e = F(t);
                  return e.persistence.runTransaction("Get highest unacknowledged batch id", "readonly", function (t) {
                    return e._n.getHighestUnacknowledgedBatchId(t);
                  });
                }(n.localStore)];

              case 2:
                return -1 === (i = r.sent()) ? [2
                /*return*/
                , void e.resolve()] : ((o = n.ko.get(i) || []).push(e), n.ko.set(i, o), [3
                /*break*/
                , 4]);

              case 3:
                return s = r.sent(), u = hs(s, "Initialization of waitForPendingWrites() operation failed"), e.reject(u), [3
                /*break*/
                , 4];

              case 4:
                return [2
                /*return*/
                ];
            }
          });
        });
      }
      /**
       * Triggers the callbacks that are waiting for this batch id to get acknowledged by server,
       * if there are any.
       */


      function js(t, e) {
        (t.ko.get(e) || []).forEach(function (t) {
          t.resolve();
        }), t.ko["delete"](e)
        /** Reject all outstanding callbacks waiting for pending writes to complete. */
        ;
      }

      function Ks(t, e, n) {
        var r = F(t),
            i = r.xo[r.currentUser.toKey()]; // NOTE: Mutations restored from persistence won't have callbacks, so it's
        // okay for there to be no callback for this ID.

        if (i) {
          var o = i.get(e);
          o && (n ? o.reject(n) : o.resolve(), i = i.remove(e)), r.xo[r.currentUser.toKey()] = i;
        }
      }

      function Qs(t, e, n) {
        void 0 === n && (n = null), t.sharedClientState.removeLocalQueryTarget(e);

        for (var r = 0, i = t.Vo.get(e); r < i.length; r++) {
          var o = i[r];
          t.Po["delete"](o), n && t.vo.Mo(o, n);
        }

        t.Vo["delete"](e), t.isPrimaryClient && t.No.Zn(e).forEach(function (e) {
          t.No.containsKey(e) || // We removed the last reference for this key
          Gs(t, e);
        });
      }

      function Gs(t, e) {
        t.So["delete"](e.path.canonicalString()); // It's possible that the target already got removed because the query failed. In that case,
        // the key won't exist in `limboTargetsByKey`. Only do the cleanup if we still have the target.

        var n = t.Do.get(e);
        null !== n && (Bo(t.remoteStore, n), t.Do = t.Do.remove(e), t.Co["delete"](n), Hs(t));
      }

      function zs(t, e, n) {
        for (var r = 0, i = n; r < i.length; r++) {
          var o = i[r];
          o instanceof Ns ? (t.No.addReference(o.key, e), Ws(t, o)) : o instanceof Ds ? (C("SyncEngine", "Document no longer in limbo: " + o.key), t.No.removeReference(o.key, e), t.No.containsKey(o.key) || // We removed the last reference for this key
          Gs(t, o.key)) : O();
        }
      }

      function Ws(t, e) {
        var n = e.key,
            r = n.path.canonicalString();
        t.Do.get(n) || t.So.has(r) || (C("SyncEngine", "New document in limbo: " + n), t.So.add(r), Hs(t));
      }
      /**
       * Starts listens for documents in limbo that are enqueued for resolution,
       * subject to a maximum number of concurrent resolutions.
       *
       * Without bounding the number of concurrent resolutions, the server can fail
       * with "resource exhausted" errors which can lead to pathological client
       * behavior as seen in https://github.com/firebase/firebase-js-sdk/issues/2683.
       */


      function Hs(t) {
        for (; t.So.size > 0 && t.Do.size < t.maxConcurrentLimboResolutions;) {
          var e = t.So.values().next().value;
          t.So["delete"](e);
          var n = new ct(H.fromString(e)),
              r = t.Fo.next();
          t.Co.set(r, new Cs(n)), t.Do = t.Do.insert(n, r), Uo(t.remoteStore, new Pr(ne(Yt(n.path)), r, 2
          /* LimboResolution */
          , S.o));
        }
      }

      function Ys(t, e, i) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var o, s, u, a;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (c) {
            switch (c.label) {
              case 0:
                return o = F(t), s = [], u = [], a = [], o.Po.isEmpty() ? [3
                /*break*/
                , 3] : (o.Po.forEach(function (t, n) {
                  a.push(o.Oo(n, e, i).then(function (t) {
                    if (t) {
                      o.isPrimaryClient && o.sharedClientState.updateQueryState(n.targetId, t.fromCache ? "not-current" : "current"), s.push(t);
                      var e = Mi.Pn(n.targetId, t);
                      u.push(e);
                    }
                  }));
                }), [4
                /*yield*/
                , Promise.all(a)]);

              case 1:
                return c.sent(), o.vo._r(s), [4
                /*yield*/
                , function (t, e) {
                  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
                    var n, i, o, s, u, a, c, h, f;
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                      switch (r.label) {
                        case 0:
                          n = F(t), r.label = 1;

                        case 1:
                          return r.trys.push([1, 3,, 4]), [4
                          /*yield*/
                          , n.persistence.runTransaction("notifyLocalViewChanges", "readwrite", function (t) {
                            return Ir.forEach(e, function (e) {
                              return Ir.forEach(e.bn, function (r) {
                                return n.persistence.referenceDelegate.addReference(t, e.targetId, r);
                              }).next(function () {
                                return Ir.forEach(e.vn, function (r) {
                                  return n.persistence.referenceDelegate.removeReference(t, e.targetId, r);
                                });
                              });
                            });
                          })];

                        case 2:
                          return r.sent(), [3
                          /*break*/
                          , 4];

                        case 3:
                          if (!Nr(i = r.sent())) throw i; // If `notifyLocalViewChanges` fails, we did not advance the sequence
                          // number for the documents that were included in this transaction.
                          // This might trigger them to be deleted earlier than they otherwise
                          // would have, but it should not invalidate the integrity of the data.

                          return C("LocalStore", "Failed to update sequence numbers: " + i), [3
                          /*break*/
                          , 4];

                        case 4:
                          for (o = 0, s = e; o < s.length; o++) {
                            u = s[o], a = u.targetId, u.fromCache || (c = n.kn.get(a), h = c.snapshotVersion, f = c.withLastLimboFreeSnapshotVersion(h), // Advance the last limbo free snapshot version
                            n.kn = n.kn.insert(a, f));
                          }

                          return [2
                          /*return*/
                          ];
                      }
                    });
                  });
                }(o.localStore, u)];

              case 2:
                c.sent(), c.label = 3;

              case 3:
                return [2
                /*return*/
                ];
            }
          });
        });
      }

      function $s(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, i;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                return (n = F(t)).currentUser.isEqual(e) ? [3
                /*break*/
                , 3] : (C("SyncEngine", "User change. New user:", e.toKey()), [4
                /*yield*/
                , Bi(n.localStore, e)]);

              case 1:
                return i = r.sent(), n.currentUser = e, // Fails tasks waiting for pending writes requested by previous user.
                function (t, e) {
                  t.ko.forEach(function (t) {
                    t.forEach(function (t) {
                      t.reject(new D(N.CANCELLED, "'waitForPendingWrites' promise is rejected due to a user change."));
                    });
                  }), t.ko.clear();
                }(n), // TODO(b/114226417): Consider calling this only in the primary tab.
                n.sharedClientState.handleUserChange(e, i.removedBatchIds, i.addedBatchIds), [4
                /*yield*/
                , Ys(n, i.Ln)];

              case 2:
                r.sent(), r.label = 3;

              case 3:
                return [2
                /*return*/
                ];
            }
          });
        });
      }

      function Xs(t, e) {
        var n = F(t),
            r = n.Co.get(e);
        if (r && r.bo) return sn().add(r.key);
        var i = sn(),
            o = n.Vo.get(e);
        if (!o) return i;

        for (var s = 0, u = o; s < u.length; s++) {
          var a = u[s],
              c = n.Po.get(a);
          i = i.unionWith(c.view.wo);
        }

        return i;
      }
      /**
       * Reconcile the list of synced documents in an existing view with those
       * from persistence.
       */


      function Js(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, i, o;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                return [4
                /*yield*/
                , Yi((n = F(t)).localStore, e.query,
                /* usePreviousResults= */
                !0)];

              case 1:
                return i = r.sent(), o = e.view.Ao(i), [2
                /*return*/
                , (n.isPrimaryClient && zs(n, e.targetId, o.To), o)];
            }
          });
        });
      }
      /**
       * Retrieves newly changed documents from remote document cache and raises
       * snapshots if needed.
       */
      // PORTING NOTE: Multi-Tab only.


      function Zs(t) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var e;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
            return [2
            /*return*/
            , Xi((e = F(t)).localStore).then(function (t) {
              return Ys(e, t);
            })];
          });
        });
      }
      /** Applies a mutation state to an existing batch.  */
      // PORTING NOTE: Multi-Tab only.


      function tu(t, e, i, o) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, s;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                return [4
                /*yield*/
                , function (t, e) {
                  var n = F(t),
                      r = F(n._n);
                  return n.persistence.runTransaction("Lookup mutation documents", "readonly", function (t) {
                    return r.jt(t, e).next(function (e) {
                      return e ? n.Mn.pn(t, e) : Ir.resolve(null);
                    });
                  });
                }((n = F(t)).localStore, e)];

              case 1:
                return null === (s = r.sent()) ? [3
                /*break*/
                , 6] : "pending" !== i ? [3
                /*break*/
                , 3] : [4
                /*yield*/
                , Zo(n.remoteStore)];

              case 2:
                // If we are the primary client, we need to send this write to the
                // backend. Secondary clients will ignore these writes since their remote
                // connection is disabled.
                return r.sent(), [3
                /*break*/
                , 4];

              case 3:
                "acknowledged" === i || "rejected" === i ? ( // NOTE: Both these methods are no-ops for batches that originated from
                // other clients.
                Ks(n, e, o || null), js(n, e), function (t, e) {
                  F(F(t)._n).Gt(e);
                }(n.localStore, e)) : O(), r.label = 4;

              case 4:
                return [4
                /*yield*/
                , Ys(n, s)];

              case 5:
                return r.sent(), [3
                /*break*/
                , 7];

              case 6:
                // A throttled tab may not have seen the mutation before it was completed
                // and removed from the mutation queue, in which case we won't have cached
                // the affected documents. In this case we can safely ignore the update
                // since that means we didn't apply the mutation locally at all (if we
                // had, we would have cached the affected documents), and so we will just
                // see any resulting document changes via normal remote document updates
                // as applicable.
                C("SyncEngine", "Cannot apply mutation batch with id: " + e), r.label = 7;

              case 7:
                return [2
                /*return*/
                ];
            }
          });
        });
      }
      /** Applies a query target change from a different tab. */
      // PORTING NOTE: Multi-Tab only.


      function eu(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, i, o, s, u, a, c, h;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                return uu(n = F(t)), au(n), !0 !== e || !0 === n.$o ? [3
                /*break*/
                , 3] : (i = n.sharedClientState.getAllActiveQueryTargets(), [4
                /*yield*/
                , nu(n, i.toArray())]);

              case 1:
                return o = r.sent(), n.$o = !0, [4
                /*yield*/
                , ss(n.remoteStore, !0)];

              case 2:
                for (r.sent(), s = 0, u = o; s < u.length; s++) {
                  a = u[s], Uo(n.remoteStore, a);
                }

                return [3
                /*break*/
                , 7];

              case 3:
                return !1 !== e || !1 === n.$o ? [3
                /*break*/
                , 7] : (c = [], h = Promise.resolve(), n.Vo.forEach(function (t, e) {
                  n.sharedClientState.isLocalQueryTarget(e) ? c.push(e) : h = h.then(function () {
                    return Qs(n, e), Hi(n.localStore, e,
                    /*keepPersistedTargetData=*/
                    !0);
                  }), Bo(n.remoteStore, e);
                }), [4
                /*yield*/
                , h]);

              case 4:
                return r.sent(), [4
                /*yield*/
                , nu(n, c)];

              case 5:
                return r.sent(), // PORTING NOTE: Multi-Tab only.
                function (t) {
                  var e = F(t);
                  e.Co.forEach(function (t, n) {
                    Bo(e.remoteStore, n);
                  }), e.No.ts(), e.Co = new Map(), e.Do = new We(ct.comparator);
                }(n), n.$o = !1, [4
                /*yield*/
                , ss(n.remoteStore, !1)];

              case 6:
                r.sent(), r.label = 7;

              case 7:
                return [2
                /*return*/
                ];
            }
          });
        });
      }

      function nu(t, e, i) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, i, o, s, u, a, c, h, f, l, d, p, y, v;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                n = F(t), i = [], o = [], s = 0, u = e, r.label = 1;

              case 1:
                return s < u.length ? (a = u[s], c = void 0, (h = n.Vo.get(a)) && 0 !== h.length ? [4
                /*yield*/
                , Wi(n.localStore, ne(h[0]))] : [3
                /*break*/
                , 7]) : [3
                /*break*/
                , 13];

              case 2:
                // For queries that have a local View, we fetch their current state
                // from LocalStore (as the resume token and the snapshot version
                // might have changed) and reconcile their views with the persisted
                // state (the list of syncedDocuments may have gotten out of sync).
                c = r.sent(), f = 0, l = h, r.label = 3;

              case 3:
                return f < l.length ? (d = l[f], p = n.Po.get(d), [4
                /*yield*/
                , Js(n, p)]) : [3
                /*break*/
                , 6];

              case 4:
                (y = r.sent()).snapshot && o.push(y.snapshot), r.label = 5;

              case 5:
                return f++, [3
                /*break*/
                , 3];

              case 6:
                return [3
                /*break*/
                , 11];

              case 7:
                return [4
                /*yield*/
                , $i(n.localStore, a)];

              case 8:
                return v = r.sent(), [4
                /*yield*/
                , Wi(n.localStore, v)];

              case 9:
                return c = r.sent(), [4
                /*yield*/
                , Ls(n, ru(v), a,
                /*current=*/
                !1)];

              case 10:
                r.sent(), r.label = 11;

              case 11:
                i.push(c), r.label = 12;

              case 12:
                return s++, [3
                /*break*/
                , 1];

              case 13:
                return [2
                /*return*/
                , (n.vo._r(o), i)];
            }
          });
        });
      }
      /**
       * Creates a `Query` object from the specified `Target`. There is no way to
       * obtain the original `Query`, so we synthesize a `Query` from the `Target`
       * object.
       *
       * The synthesized result might be different from the original `Query`, but
       * since the synthesized `Query` should return the same results as the
       * original one (only the presentation of results might differ), the potential
       * difference will not cause issues.
       */
      // PORTING NOTE: Multi-Tab only.


      function ru(t) {
        return Ht(t.path, t.collectionGroup, t.orderBy, t.filters, t.limit, "F"
        /* First */
        , t.startAt, t.endAt);
      }
      /** Returns the IDs of the clients that are currently active. */
      // PORTING NOTE: Multi-Tab only.


      function iu(t) {
        var e = F(t);
        return F(F(e.localStore).persistence).fn();
      }
      /** Applies a query target change from a different tab. */
      // PORTING NOTE: Multi-Tab only.


      function ou(t, e, i, o) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, s, u;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                return (n = F(t)).$o ? ( // If we receive a target state notification via WebStorage, we are
                // either already secondary or another tab has taken the primary lease.
                C("SyncEngine", "Ignoring unexpected query state notification."), [3
                /*break*/
                , 8]) : [3
                /*break*/
                , 1];

              case 1:
                if (!n.Vo.has(e)) return [3
                /*break*/
                , 8];

                switch (i) {
                  case "current":
                  case "not-current":
                    return [3
                    /*break*/
                    , 2];

                  case "rejected":
                    return [3
                    /*break*/
                    , 5];
                }

                return [3
                /*break*/
                , 7];

              case 2:
                return [4
                /*yield*/
                , Xi(n.localStore)];

              case 3:
                return s = r.sent(), u = cn.createSynthesizedRemoteEventForCurrentChange(e, "current" === i), [4
                /*yield*/
                , Ys(n, s, u)];

              case 4:
                return r.sent(), [3
                /*break*/
                , 8];

              case 5:
                return [4
                /*yield*/
                , Hi(n.localStore, e,
                /* keepPersistedTargetData */
                !0)];

              case 6:
                return r.sent(), Qs(n, e, o), [3
                /*break*/
                , 8];

              case 7:
                O(), r.label = 8;

              case 8:
                return [2
                /*return*/
                ];
            }
          });
        });
      }
      /** Adds or removes Watch targets for queries from different tabs. */


      function su(t, e, i) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var n, o, s, u, a, c, h, f, l, d;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (p) {
            switch (p.label) {
              case 0:
                if (!(n = uu(t)).$o) return [3
                /*break*/
                , 10];
                o = 0, s = e, p.label = 1;

              case 1:
                return o < s.length ? (u = s[o], n.Vo.has(u) ? ( // A target might have been added in a previous attempt
                C("SyncEngine", "Adding an already active target " + u), [3
                /*break*/
                , 5]) : [4
                /*yield*/
                , $i(n.localStore, u)]) : [3
                /*break*/
                , 6];

              case 2:
                return a = p.sent(), [4
                /*yield*/
                , Wi(n.localStore, a)];

              case 3:
                return c = p.sent(), [4
                /*yield*/
                , Ls(n, ru(a), c.targetId,
                /*current=*/
                !1)];

              case 4:
                p.sent(), Uo(n.remoteStore, c), p.label = 5;

              case 5:
                return o++, [3
                /*break*/
                , 1];

              case 6:
                h = function h(t) {
                  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
                    switch (e.label) {
                      case 0:
                        return n.Vo.has(t) ? [4
                        /*yield*/
                        , Hi(n.localStore, t,
                        /* keepPersistedTargetData */
                        !1).then(function () {
                          Bo(n.remoteStore, t), Qs(n, t);
                        })["catch"](pi)] : [3
                        /*break*/
                        , 2];
                      // Release queries that are still active.

                      case 1:
                        // Release queries that are still active.
                        e.sent(), e.label = 2;

                      case 2:
                        return [2
                        /*return*/
                        ];
                    }
                  });
                }, f = 0, l = i, p.label = 7;

              case 7:
                return f < l.length ? (d = l[f], [5
                /*yield**/
                , h(d)]) : [3
                /*break*/
                , 10];

              case 8:
                p.sent(), p.label = 9;

              case 9:
                return f++, [3
                /*break*/
                , 7];

              case 10:
                return [2
                /*return*/
                ];
            }
          });
        });
      }

      function uu(t) {
        var e = F(t);
        return e.remoteStore.remoteSyncer.applyRemoteEvent = Fs.bind(null, e), e.remoteStore.remoteSyncer.getRemoteKeysForTarget = Xs.bind(null, e), e.remoteStore.remoteSyncer.rejectListen = Vs.bind(null, e), e.vo._r = gs.bind(null, e.eventManager), e.vo.Mo = ws.bind(null, e.eventManager), e;
      }

      function au(t) {
        var e = F(t);
        return e.remoteStore.remoteSyncer.applySuccessfulWrite = qs.bind(null, e), e.remoteStore.remoteSyncer.rejectFailedWrite = Us.bind(null, e), e
        /**
        * Loads a Firestore bundle into the SDK. The returned promise resolves when
        * the bundle finished loading.
        *
        * @param syncEngine - SyncEngine to use.
        * @param bundleReader - Bundle to load into the SDK.
        * @param task - LoadBundleTask used to update the loading progress to public API.
        */
        ;
      }

      function cu(t, e, i) {
        var o = F(t); // eslint-disable-next-line @typescript-eslint/no-floating-promises

        (function (t, e, i) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var n, o, s, u, a, c;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
              switch (r.label) {
                case 0:
                  return r.trys.push([0, 14,, 15]), [4
                  /*yield*/
                  , e.getMetadata()];

                case 1:
                  return n = r.sent(), [4
                  /*yield*/
                  , function (t, e) {
                    var n = F(t),
                        r = _n(e.createTime);

                    return n.persistence.runTransaction("hasNewerBundle", "readonly", function (t) {
                      return n.Ke.getBundleMetadata(t, e.id);
                    }).then(function (t) {
                      return !!t && t.createTime.compareTo(r) >= 0;
                    });
                  }(t.localStore, n)];

                case 2:
                  return r.sent() ? [4
                  /*yield*/
                  , e.close()] : [3
                  /*break*/
                  , 4];

                case 3:
                  return [2
                  /*return*/
                  , (r.sent(), void i._completeWith(function (t) {
                    return {
                      taskState: "Success",
                      documentsLoaded: t.totalDocuments,
                      bytesLoaded: t.totalBytes,
                      totalDocuments: t.totalDocuments,
                      totalBytes: t.totalBytes
                    };
                  }(n)))];

                case 4:
                  return i._updateProgress(Ss(n)), o = new _s(n, t.localStore, e.R), [4
                  /*yield*/
                  , e.Lo()];

                case 5:
                  s = r.sent(), r.label = 6;

                case 6:
                  return s ? [4
                  /*yield*/
                  , o.oo(s)] : [3
                  /*break*/
                  , 10];

                case 7:
                  return (u = r.sent()) && i._updateProgress(u), [4
                  /*yield*/
                  , e.Lo()];

                case 8:
                  s = r.sent(), r.label = 9;

                case 9:
                  return [3
                  /*break*/
                  , 6];

                case 10:
                  return [4
                  /*yield*/
                  , o.complete()];

                case 11:
                  // TODO(b/160876443): This currently raises snapshots with
                  // `fromCache=false` if users already listen to some queries and bundles
                  // has newer version.
                  return a = r.sent(), [4
                  /*yield*/
                  , Ys(t, a.wn,
                  /* remoteEvent */
                  void 0)];

                case 12:
                  // Save metadata, so loading the same bundle will skip.
                  // TODO(b/160876443): This currently raises snapshots with
                  // `fromCache=false` if users already listen to some queries and bundles
                  // has newer version.
                  return r.sent(), [4
                  /*yield*/
                  , function (t, e) {
                    var n = F(t);
                    return n.persistence.runTransaction("Save bundle", "readwrite", function (t) {
                      return n.Ke.saveBundleMetadata(t, e);
                    });
                  }(t.localStore, n)];

                case 13:
                  // TODO(b/160876443): This currently raises snapshots with
                  // `fromCache=false` if users already listen to some queries and bundles
                  // has newer version.
                  // Save metadata, so loading the same bundle will skip.
                  return r.sent(), i._completeWith(a.progress), [3
                  /*break*/
                  , 15];

                case 14:
                  return R("SyncEngine", "Loading bundle failed with " + (c = r.sent())), i._failWith(c), [3
                  /*break*/
                  , 15];

                case 15:
                  return [2
                  /*return*/
                  ];
              }
            });
          });
        }
        /**
        * @license
        * Copyright 2020 Google LLC
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
        * you may not use this file except in compliance with the License.
        * You may obtain a copy of the License at
        *
        *   http://www.apache.org/licenses/LICENSE-2.0
        *
        * Unless required by applicable law or agreed to in writing, software
        * distributed under the License is distributed on an "AS IS" BASIS,
        * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        * See the License for the specific language governing permissions and
        * limitations under the License.
        */

        /**
        * Provides all components needed for Firestore with in-memory persistence.
        * Uses EagerGC garbage collection.
        */
        )(o, e, i).then(function () {
          o.sharedClientState.notifyBundleLoaded();
        });
      }

      var hu =
      /** @class */
      function () {
        function t() {
          this.synchronizeTabs = !1;
        }

        return t.prototype.initialize = function (t) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
              switch (e.label) {
                case 0:
                  return this.R = Co(t.databaseInfo.databaseId), this.sharedClientState = this.Bo(t), this.persistence = this.qo(t), [4
                  /*yield*/
                  , this.persistence.start()];

                case 1:
                  return e.sent(), this.gcScheduler = this.Uo(t), this.localStore = this.Ko(t), [2
                  /*return*/
                  ];
              }
            });
          });
        }, t.prototype.Uo = function (t) {
          return null;
        }, t.prototype.Ko = function (t) {
          return Ui(this.persistence, new Vi(), t.initialUser, this.R);
        }, t.prototype.qo = function (t) {
          return new ao(ho.bs, this.R);
        }, t.prototype.Bo = function (t) {
          return new To();
        }, t.prototype.terminate = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (t) {
              switch (t.label) {
                case 0:
                  return this.gcScheduler && this.gcScheduler.stop(), [4
                  /*yield*/
                  , this.sharedClientState.shutdown()];

                case 1:
                  return t.sent(), [4
                  /*yield*/
                  , this.persistence.shutdown()];

                case 2:
                  return t.sent(), [2
                  /*return*/
                  ];
              }
            });
          });
        }, t;
      }(),
          fu =
      /** @class */
      function (e) {
        function i(t, n, r) {
          var i = this;
          return (i = e.call(this) || this).Qo = t, i.cacheSizeBytes = n, i.forceOwnership = r, i.synchronizeTabs = !1, i;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(i, e), i.prototype.initialize = function (t) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var n = this;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
              switch (r.label) {
                case 0:
                  return [4
                  /*yield*/
                  , e.prototype.initialize.call(this, t)];

                case 1:
                  return r.sent(), [4
                  /*yield*/
                  , Ji(this.localStore)];

                case 2:
                  return r.sent(), [4
                  /*yield*/
                  , this.Qo.initialize(this, t)];

                case 3:
                  // Enqueue writes from a previous session
                  return r.sent(), [4
                  /*yield*/
                  , au(this.Qo.syncEngine)];

                case 4:
                  // Enqueue writes from a previous session
                  return r.sent(), [4
                  /*yield*/
                  , Zo(this.Qo.remoteStore)];

                case 5:
                  // NOTE: This will immediately call the listener, so we make sure to
                  // set it after localStore / remoteStore are started.
                  return r.sent(), [4
                  /*yield*/
                  , this.persistence.He(function () {
                    return n.gcScheduler && !n.gcScheduler.started && n.gcScheduler.start(n.localStore), Promise.resolve();
                  })];

                case 6:
                  // NOTE: This will immediately call the listener, so we make sure to
                  // set it after localStore / remoteStore are started.
                  return r.sent(), [2
                  /*return*/
                  ];
              }
            });
          });
        }, i.prototype.Ko = function (t) {
          return Ui(this.persistence, new Vi(), t.initialUser, this.R);
        }, i.prototype.Uo = function (t) {
          var e = this.persistence.referenceDelegate.garbageCollector;
          return new mi(e, t.asyncQueue);
        }, i.prototype.qo = function (t) {
          var e = Oi(t.databaseInfo.databaseId, t.databaseInfo.persistenceKey),
              n = void 0 !== this.cacheSizeBytes ? ei.withCacheSize(this.cacheSizeBytes) : ei.DEFAULT;
          return new xi(this.synchronizeTabs, e, t.clientId, n, t.asyncQueue, Ao(), ko(), this.R, this.sharedClientState, !!this.forceOwnership);
        }, i.prototype.Bo = function (t) {
          return new To();
        }, i;
      }(hu),
          lu =
      /** @class */
      function (e) {
        function i(t, n) {
          var r = this;
          return (r = e.call(this, t, n,
          /* forceOwnership= */
          !1) || this).Qo = t, r.cacheSizeBytes = n, r.synchronizeTabs = !0, r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(i, e), i.prototype.initialize = function (t) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var i,
                o = this;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (s) {
              switch (s.label) {
                case 0:
                  return [4
                  /*yield*/
                  , e.prototype.initialize.call(this, t)];

                case 1:
                  return s.sent(), i = this.Qo.syncEngine, this.sharedClientState instanceof Io ? (this.sharedClientState.syncEngine = {
                    ui: tu.bind(null, i),
                    ai: ou.bind(null, i),
                    hi: su.bind(null, i),
                    fn: iu.bind(null, i),
                    ci: Zs.bind(null, i)
                  }, [4
                  /*yield*/
                  , this.sharedClientState.start()]) : [3
                  /*break*/
                  , 3];

                case 2:
                  s.sent(), s.label = 3;

                case 3:
                  // NOTE: This will immediately call the listener, so we make sure to
                  // set it after localStore / remoteStore are started.
                  return [4
                  /*yield*/
                  , this.persistence.He(function (t) {
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(o, void 0, void 0, function () {
                      return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
                        switch (e.label) {
                          case 0:
                            return [4
                            /*yield*/
                            , eu(this.Qo.syncEngine, t)];

                          case 1:
                            return e.sent(), this.gcScheduler && (t && !this.gcScheduler.started ? this.gcScheduler.start(this.localStore) : t || this.gcScheduler.stop()), [2
                            /*return*/
                            ];
                        }
                      });
                    });
                  })];

                case 4:
                  // NOTE: This will immediately call the listener, so we make sure to
                  // set it after localStore / remoteStore are started.
                  return s.sent(), [2
                  /*return*/
                  ];
              }
            });
          });
        }, i.prototype.Bo = function (t) {
          var e = Ao();
          if (!Io.yt(e)) throw new D(N.UNIMPLEMENTED, "IndexedDB persistence is only available on platforms that support LocalStorage.");
          var n = Oi(t.databaseInfo.databaseId, t.databaseInfo.persistenceKey);
          return new Io(e, t.asyncQueue, n, t.clientId, t.initialUser);
        }, i;
      }(fu),
          du =
      /** @class */
      function () {
        function t() {}

        return t.prototype.initialize = function (t, e) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var n = this;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
              switch (r.label) {
                case 0:
                  return this.localStore ? [3
                  /*break*/
                  , 2] : (this.localStore = t.localStore, this.sharedClientState = t.sharedClientState, this.datastore = this.createDatastore(e), this.remoteStore = this.createRemoteStore(e), this.eventManager = this.createEventManager(e), this.syncEngine = this.createSyncEngine(e,
                  /* startAsPrimary=*/
                  !t.synchronizeTabs), this.sharedClientState.onlineStateHandler = function (t) {
                    return Ms(n.syncEngine, t, 1
                    /* SharedClientState */
                    );
                  }, this.remoteStore.remoteSyncer.handleCredentialChange = $s.bind(null, this.syncEngine), [4
                  /*yield*/
                  , ss(this.remoteStore, this.syncEngine.isPrimaryClient)]);

                case 1:
                  r.sent(), r.label = 2;

                case 2:
                  return [2
                  /*return*/
                  ];
              }
            });
          });
        }, t.prototype.createEventManager = function (t) {
          return new ys();
        }, t.prototype.createDatastore = function (t) {
          var e,
              n = Co(t.databaseInfo.databaseId),
              r = (e = t.databaseInfo, new Do(e));
          /** Return the Platform-specific connectivity monitor. */

          return function (t, e, n) {
            return new Po(t, e, n);
          }(t.credentials, r, n);
        }, t.prototype.createRemoteStore = function (t) {
          var e,
              n,
              r,
              i,
              o,
              s = this;
          return e = this.localStore, n = this.datastore, r = t.asyncQueue, i = function i(t) {
            return Ms(s.syncEngine, t, 0
            /* RemoteStore */
            );
          }, o = _o.yt() ? new _o() : new Eo(), new Mo(e, n, r, i, o);
        }, t.prototype.createSyncEngine = function (t, e) {
          return function (t, e, n, // PORTING NOTE: Manages state synchronization in multi-tab environments.
          r, i, o, s) {
            var u = new xs(t, e, n, r, i, o);
            return s && (u.$o = !0), u;
          }(this.localStore, this.remoteStore, this.eventManager, this.sharedClientState, t.initialUser, t.maxConcurrentLimboResolutions, e);
        }, t.prototype.terminate = function () {
          return function (t) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
              var e;
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
                switch (n.label) {
                  case 0:
                    return e = F(t), C("RemoteStore", "RemoteStore shutting down."), e.Or.add(5
                    /* Shutdown */
                    ), [4
                    /*yield*/
                    , qo(e)];

                  case 1:
                    return n.sent(), e.Lr.shutdown(), // Set the OnlineState to Unknown (rather than Offline) to avoid potentially
                    // triggering spurious listener events with cached data, etc.
                    e.Br.set("Unknown"
                    /* Unknown */
                    ), [2
                    /*return*/
                    ];
                }
              });
            });
          }(this.remoteStore);
        }, t;
      }();
      /**
       * Provides all components needed for Firestore with IndexedDB persistence.
       */

      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * How many bytes to read each time when `ReadableStreamReader.read()` is
       * called. Only applicable for byte streams that we control (e.g. those backed
       * by an UInt8Array).
       */

      /**
       * Builds a `ByteStreamReader` from a UInt8Array.
       * @param source - The data source to use.
       * @param bytesPerRead - How many bytes each `read()` from the returned reader
       *        will read.
       */


      function pu(t, e) {
        void 0 === e && (e = 10240);
        var i = 0;
        return {
          read: function read() {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
              var n;
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                return i < t.byteLength ? (n = {
                  value: t.slice(i, i + e),
                  done: !1
                }, [2
                /*return*/
                , (i += e, n)]) : [2
                /*return*/
                , {
                  done: !0
                }];
              });
            });
          },
          cancel: function cancel() {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (t) {
                return [2
                /*return*/
                ];
              });
            });
          },
          releaseLock: function releaseLock() {},
          closed: Promise.reject("unimplemented")
        };
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * On web, a `ReadableStream` is wrapped around by a `ByteStreamReader`.
       */

      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /*
       * A wrapper implementation of Observer<T> that will dispatch events
       * asynchronously. To allow immediate silencing, a mute call is added which
       * causes events scheduled to no longer be raised.
       */


      var yu =
      /** @class */
      function () {
        function t(t) {
          this.observer = t,
          /**
               * When set to true, will not raise future events. Necessary to deal with
               * async detachment of listener.
               */
          this.muted = !1;
        }

        return t.prototype.next = function (t) {
          this.observer.next && this.jo(this.observer.next, t);
        }, t.prototype.error = function (t) {
          this.observer.error ? this.jo(this.observer.error, t) : console.error("Uncaught Error in snapshot listener:", t);
        }, t.prototype.Wo = function () {
          this.muted = !0;
        }, t.prototype.jo = function (t, e) {
          var n = this;
          this.muted || setTimeout(function () {
            n.muted || t(e);
          }, 0);
        }, t;
      }(),
          vu =
      /** @class */
      function () {
        function t(
        /** The reader to read from underlying binary bundle data source. */
        t, e) {
          var n = this;
          this.Go = t, this.R = e,
          /** Cached bundle metadata. */
          this.metadata = new br(),
          /**
               * Internal buffer to hold bundle content, accumulating incomplete element
               * content.
               */
          this.buffer = new Uint8Array(), this.zo = new TextDecoder("utf-8"), // Read the metadata (which is the first element).
          this.Ho().then(function (t) {
            t && t.io() ? n.metadata.resolve(t.payload.metadata) : n.metadata.reject(new Error("The first element of the bundle is not a metadata, it is\n             " + JSON.stringify(null == t ? void 0 : t.payload)));
          }, function (t) {
            return n.metadata.reject(t);
          });
        }

        return t.prototype.close = function () {
          return this.Go.cancel();
        }, t.prototype.getMetadata = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (t) {
              return [2
              /*return*/
              , this.metadata.promise];
            });
          });
        }, t.prototype.Lo = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (t) {
              switch (t.label) {
                case 0:
                  return [4
                  /*yield*/
                  , this.getMetadata()];

                case 1:
                  // Makes sure metadata is read before proceeding.
                  return [2
                  /*return*/
                  , (t.sent(), this.Ho())];
              }
            });
          });
        },
        /**
         * Reads from the head of internal buffer, and pulling more data from
         * underlying stream if a complete element cannot be found, until an
         * element(including the prefixed length and the JSON string) is found.
         *
         * Once a complete element is read, it is dropped from internal buffer.
         *
         * Returns either the bundled element, or null if we have reached the end of
         * the stream.
         */
        t.prototype.Ho = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var t, e, n, i;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
              switch (r.label) {
                case 0:
                  return [4
                  /*yield*/
                  , this.Jo()];

                case 1:
                  return null === (t = r.sent()) ? [2
                  /*return*/
                  , null] : (e = this.zo.decode(t), n = Number(e), isNaN(n) && this.Yo("length string (" + e + ") is not valid number"), [4
                  /*yield*/
                  , this.Xo(n)]);

                case 2:
                  return i = r.sent(), [2
                  /*return*/
                  , new Ts(JSON.parse(i), t.length + n)];
              }
            });
          });
        },
        /** First index of '{' from the underlying buffer. */
        t.prototype.Zo = function () {
          return this.buffer.findIndex(function (t) {
            return t === "{".charCodeAt(0);
          });
        },
        /**
         * Reads from the beginning of the internal buffer, until the first '{', and
         * return the content.
         *
         * If reached end of the stream, returns a null.
         */
        t.prototype.Jo = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var t, e;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
              switch (n.label) {
                case 0:
                  return this.Zo() < 0 ? [4
                  /*yield*/
                  , this.tc()] : [3
                  /*break*/
                  , 3];

                case 1:
                  if (n.sent()) return [3
                  /*break*/
                  , 3];
                  n.label = 2;

                case 2:
                  return [3
                  /*break*/
                  , 0];

                case 3:
                  // Broke out of the loop because underlying stream is closed, and there
                  // happens to be no more data to process.
                  return 0 === this.buffer.length ? [2
                  /*return*/
                  , null] : ( // Broke out of the loop because underlying stream is closed, but still
                  // cannot find an open bracket.
                  (t = this.Zo()) < 0 && this.Yo("Reached the end of bundle when a length string is expected."), e = this.buffer.slice(0, t), [2
                  /*return*/
                  , (this.buffer = this.buffer.slice(t), e)]);
              }
            });
          });
        },
        /**
         * Reads from a specified position from the internal buffer, for a specified
         * number of bytes, pulling more data from the underlying stream if needed.
         *
         * Returns a string decoded from the read bytes.
         */
        t.prototype.Xo = function (t) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var e;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
              switch (n.label) {
                case 0:
                  return this.buffer.length < t ? [4
                  /*yield*/
                  , this.tc()] : [3
                  /*break*/
                  , 3];

                case 1:
                  n.sent() && this.Yo("Reached the end of bundle when more is expected."), n.label = 2;

                case 2:
                  return [3
                  /*break*/
                  , 0];

                case 3:
                  // Update the internal buffer to drop the read json string.
                  return e = this.zo.decode(this.buffer.slice(0, t)), [2
                  /*return*/
                  , (this.buffer = this.buffer.slice(t), e)];
              }
            });
          });
        }, t.prototype.Yo = function (t) {
          // eslint-disable-next-line @typescript-eslint/no-floating-promises
          throw this.Go.cancel(), new Error("Invalid bundle format: " + t);
        },
        /**
         * Pulls more data from underlying stream to internal buffer.
         * Returns a boolean indicating whether the stream is finished.
         */
        t.prototype.tc = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var t, e;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
              switch (n.label) {
                case 0:
                  return [4
                  /*yield*/
                  , this.Go.read()];

                case 1:
                  return (t = n.sent()).done || ((e = new Uint8Array(this.buffer.length + t.value.length)).set(this.buffer), e.set(t.value, this.buffer.length), this.buffer = e), [2
                  /*return*/
                  , t.done];
              }
            });
          });
        }, t;
      }(),
          mu =
      /** @class */
      function () {
        function t(t) {
          this.datastore = t, // The version of each document that was read during this transaction.
          this.readVersions = new Map(), this.mutations = [], this.committed = !1,
          /**
               * A deferred usage error that occurred previously in this transaction that
               * will cause the transaction to fail once it actually commits.
               */
          this.lastWriteError = null,
          /**
               * Set of documents that have been written in the transaction.
               *
               * When there's more than one write to the same key in a transaction, any
               * writes after the first are handled differently.
               */
          this.writtenDocs = new Set();
        }

        return t.prototype.lookup = function (t) {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var e,
                i = this;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (o) {
              switch (o.label) {
                case 0:
                  if (this.ensureCommitNotCalled(), this.mutations.length > 0) throw new D(N.INVALID_ARGUMENT, "Firestore transactions require all reads to be executed before all writes.");
                  return [4
                  /*yield*/
                  , function (t, e) {
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
                      var n, i, o, s, u, a;
                      return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                        switch (r.label) {
                          case 0:
                            return n = F(t), i = xn(n.R) + "/documents", o = {
                              documents: e.map(function (t) {
                                return Dn(n.R, t);
                              })
                            }, [4
                            /*yield*/
                            , n.$i("BatchGetDocuments", i, o)];

                          case 1:
                            return s = r.sent(), u = new Map(), s.forEach(function (t) {
                              var e = function (t, e) {
                                return "found" in e ? function (t, e) {
                                  P(!!e.found), e.found.name, e.found.updateTime;

                                  var n = An(t, e.found.name),
                                      r = _n(e.found.updateTime),
                                      i = new _t({
                                    mapValue: {
                                      fields: e.found.fields
                                    }
                                  });

                                  return Nt.newFoundDocument(n, r, i);
                                }(t, e) : "missing" in e ? function (t, e) {
                                  P(!!e.missing), P(!!e.readTime);

                                  var n = An(t, e.missing),
                                      r = _n(e.readTime);

                                  return Nt.newNoDocument(n, r);
                                }(t, e) : O();
                              }(n.R, t);

                              u.set(e.key.toString(), e);
                            }), a = [], [2
                            /*return*/
                            , (e.forEach(function (t) {
                              var e = u.get(t.toString());
                              P(!!e), a.push(e);
                            }), a)];
                        }
                      });
                    });
                  }(this.datastore, t)];

                case 1:
                  return [2
                  /*return*/
                  , ((e = o.sent()).forEach(function (t) {
                    return i.recordVersion(t);
                  }), e)];
              }
            });
          });
        }, t.prototype.set = function (t, e) {
          this.write(e.toMutation(t, this.precondition(t))), this.writtenDocs.add(t.toString());
        }, t.prototype.update = function (t, e) {
          try {
            this.write(e.toMutation(t, this.preconditionForUpdate(t)));
          } catch (t) {
            this.lastWriteError = t;
          }

          this.writtenDocs.add(t.toString());
        }, t.prototype["delete"] = function (t) {
          this.write(new je(t, this.precondition(t))), this.writtenDocs.add(t.toString());
        }, t.prototype.commit = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var t,
                e = this;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (i) {
              switch (i.label) {
                case 0:
                  if (this.ensureCommitNotCalled(), this.lastWriteError) throw this.lastWriteError;
                  return t = this.readVersions, // For each mutation, note that the doc was written.
                  this.mutations.forEach(function (e) {
                    t["delete"](e.key.toString());
                  }), // For each document that was read but not written to, we want to perform
                  // a `verify` operation.
                  t.forEach(function (t, n) {
                    var r = ct.fromPath(n);
                    e.mutations.push(new Ke(r, e.precondition(r)));
                  }), [4
                  /*yield*/
                  , function (t, e) {
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
                      var n, i, o;
                      return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                        switch (r.label) {
                          case 0:
                            return n = F(t), i = xn(n.R) + "/documents", o = {
                              writes: e.map(function (t) {
                                return Pn(n.R, t);
                              })
                            }, [4
                            /*yield*/
                            , n.Ni("Commit", i, o)];

                          case 1:
                            return r.sent(), [2
                            /*return*/
                            ];
                        }
                      });
                    });
                  }(this.datastore, this.mutations)];

                case 1:
                  // For each mutation, note that the doc was written.
                  return i.sent(), this.committed = !0, [2
                  /*return*/
                  ];
              }
            });
          });
        }, t.prototype.recordVersion = function (t) {
          var e;
          if (t.isFoundDocument()) e = t.version;else {
            if (!t.isNoDocument()) throw O(); // For deleted docs, we must use baseVersion 0 when we overwrite them.

            e = K.min();
          }
          var n = this.readVersions.get(t.key.toString());

          if (n) {
            if (!e.isEqual(n)) // This transaction will fail no matter what.
              throw new D(N.ABORTED, "Document version changed between two reads.");
          } else this.readVersions.set(t.key.toString(), e);
        },
        /**
         * Returns the version of this document when it was read in this transaction,
         * as a precondition, or no precondition if it was not read.
         */
        t.prototype.precondition = function (t) {
          var e = this.readVersions.get(t.toString());
          return !this.writtenDocs.has(t.toString()) && e ? De.updateTime(e) : De.none();
        },
        /**
         * Returns the precondition for a document if the operation is an update.
         */
        t.prototype.preconditionForUpdate = function (t) {
          var e = this.readVersions.get(t.toString()); // The first time a document is written, we want to take into account the
          // read time and existence

          if (!this.writtenDocs.has(t.toString()) && e) {
            if (e.isEqual(K.min())) // The document doesn't exist, so fail the transaction.
              // This has to be validated locally because you can't send a
              // precondition that a document does not exist without changing the
              // semantics of the backend write to be an insert. This is the reverse
              // of what we want, since we want to assert that the document doesn't
              // exist but then send the update and have it fail. Since we can't
              // express that to the backend, we have to validate locally.
              // Note: this can change once we can send separate verify writes in the
              // transaction.
              throw new D(N.INVALID_ARGUMENT, "Can't update a document that doesn't exist."); // Document exists, base precondition on document update time.

            return De.updateTime(e);
          } // Document was not read, so we just use the preconditions for a blind
          // update.


          return De.exists(!0);
        }, t.prototype.write = function (t) {
          this.ensureCommitNotCalled(), this.mutations.push(t);
        }, t.prototype.ensureCommitNotCalled = function () {}, t;
      }(),
          gu =
      /** @class */
      function () {
        function t(t, e, n, r) {
          this.asyncQueue = t, this.datastore = e, this.updateFunction = n, this.deferred = r, this.ec = 5, this.Zi = new xo(this.asyncQueue, "transaction_retry"
          /* TransactionRetry */
          )
          /** Runs the transaction and sets the result on deferred. */
          ;
        }

        return t.prototype.run = function () {
          this.ec -= 1, this.nc();
        }, t.prototype.nc = function () {
          var t = this;
          this.Zi.ji(function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(t, void 0, void 0, function () {
              var t,
                  e,
                  n = this;
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                return t = new mu(this.datastore), (e = this.sc(t)) && e.then(function (e) {
                  n.asyncQueue.enqueueAndForget(function () {
                    return t.commit().then(function () {
                      n.deferred.resolve(e);
                    })["catch"](function (t) {
                      n.ic(t);
                    });
                  });
                })["catch"](function (t) {
                  n.ic(t);
                }), [2
                /*return*/
                ];
              });
            });
          });
        }, t.prototype.sc = function (t) {
          try {
            var e = this.updateFunction(t);
            return !st(e) && e["catch"] && e.then ? e : (this.deferred.reject(Error("Transaction callback must return a Promise")), null);
          } catch (t) {
            // Do not retry errors thrown by user provided updateFunction.
            return this.deferred.reject(t), null;
          }
        }, t.prototype.ic = function (t) {
          var e = this;
          this.ec > 0 && this.rc(t) ? (this.ec -= 1, this.asyncQueue.enqueueAndForget(function () {
            return e.nc(), Promise.resolve();
          })) : this.deferred.reject(t);
        }, t.prototype.rc = function (t) {
          if ("FirebaseError" === t.name) {
            // In transactions, the backend will fail outdated reads with FAILED_PRECONDITION and
            // non-matching document versions with ABORTED. These errors should be retried.
            var e = t.code;
            return "aborted" === e || "failed-precondition" === e || !Ge(e);
          }

          return !1;
        }, t;
      }(),
          wu =
      /** @class */
      function () {
        function t(t,
        /**
         * Asynchronous queue responsible for all of our internal processing. When
         * we get incoming work from the user (via public API) or the network
         * (incoming GRPC messages), we should always schedule onto this queue.
         * This ensures all of our work is properly serialized (e.g. we don't
         * start processing a new operation while the previous one is waiting for
         * an async I/O to complete).
         */
        e, i) {
          var o = this;
          this.credentials = t, this.asyncQueue = e, this.databaseInfo = i, this.user = fo.UNAUTHENTICATED, this.clientId = V.u(), this.credentialListener = function () {
            return Promise.resolve();
          }, this.credentials.setChangeListener(e, function (t) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(o, void 0, void 0, function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
                switch (e.label) {
                  case 0:
                    return C("FirestoreClient", "Received user=", t.uid), [4
                    /*yield*/
                    , this.credentialListener(t)];

                  case 1:
                    return e.sent(), this.user = t, [2
                    /*return*/
                    ];
                }
              });
            });
          });
        }

        return t.prototype.getConfiguration = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (t) {
              return [2
              /*return*/
              , {
                asyncQueue: this.asyncQueue,
                databaseInfo: this.databaseInfo,
                clientId: this.clientId,
                credentials: this.credentials,
                initialUser: this.user,
                maxConcurrentLimboResolutions: 100
              }];
            });
          });
        }, t.prototype.setCredentialChangeListener = function (t) {
          this.credentialListener = t;
        },
        /**
         * Checks that the client has not been terminated. Ensures that other methods on
         * this class cannot be called after the client is terminated.
         */
        t.prototype.verifyNotTerminated = function () {
          if (this.asyncQueue.isShuttingDown) throw new D(N.FAILED_PRECONDITION, "The client has already been terminated.");
        }, t.prototype.terminate = function () {
          var t = this;
          this.asyncQueue.enterRestrictedMode();
          var e = new br();
          return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(t, void 0, void 0, function () {
              var t, n;
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                switch (r.label) {
                  case 0:
                    return r.trys.push([0, 5,, 6]), this.onlineComponents ? [4
                    /*yield*/
                    , this.onlineComponents.terminate()] : [3
                    /*break*/
                    , 2];

                  case 1:
                    r.sent(), r.label = 2;

                  case 2:
                    return this.offlineComponents ? [4
                    /*yield*/
                    , this.offlineComponents.terminate()] : [3
                    /*break*/
                    , 4];

                  case 3:
                    r.sent(), r.label = 4;

                  case 4:
                    // `removeChangeListener` must be called after shutting down the
                    // RemoteStore as it will prevent the RemoteStore from retrieving
                    // auth tokens.
                    return this.credentials.removeChangeListener(), e.resolve(), [3
                    /*break*/
                    , 6];

                  case 5:
                    return t = r.sent(), n = hs(t, "Failed to shutdown persistence"), e.reject(n), [3
                    /*break*/
                    , 6];

                  case 6:
                    return [2
                    /*return*/
                    ];
                }
              });
            });
          }), e.promise;
        }, t;
      }();
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * A class representing a bundle.
       *
       * Takes a bundle stream or buffer, and presents abstractions to read bundled
       * elements out of the underlying content.
       */


      function bu(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var i,
              o,
              s = this;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (u) {
            switch (u.label) {
              case 0:
                return t.asyncQueue.verifyOperationInProgress(), C("FirestoreClient", "Initializing OfflineComponentProvider"), [4
                /*yield*/
                , t.getConfiguration()];

              case 1:
                return i = u.sent(), [4
                /*yield*/
                , e.initialize(i)];

              case 2:
                return u.sent(), o = i.initialUser, t.setCredentialChangeListener(function (t) {
                  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(s, void 0, void 0, function () {
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
                      switch (n.label) {
                        case 0:
                          return o.isEqual(t) ? [3
                          /*break*/
                          , 2] : [4
                          /*yield*/
                          , Bi(e.localStore, t)];

                        case 1:
                          n.sent(), o = t, n.label = 2;

                        case 2:
                          return [2
                          /*return*/
                          ];
                      }
                    });
                  });
                }), // When a user calls clearPersistence() in one client, all other clients
                // need to be terminated to allow the delete to succeed.
                e.persistence.setDatabaseDeletedListener(function () {
                  return t.terminate();
                }), t.offlineComponents = e, [2
                /*return*/
                ];
            }
          });
        });
      }

      function Iu(t, e) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var i, o;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (s) {
            switch (s.label) {
              case 0:
                return t.asyncQueue.verifyOperationInProgress(), [4
                /*yield*/
                , Tu(t)];

              case 1:
                return i = s.sent(), C("FirestoreClient", "Initializing OnlineComponentProvider"), [4
                /*yield*/
                , t.getConfiguration()];

              case 2:
                return o = s.sent(), [4
                /*yield*/
                , e.initialize(i, o)];

              case 3:
                return s.sent(), // The CredentialChangeListener of the online component provider takes
                // precedence over the offline component provider.
                t.setCredentialChangeListener(function (t) {
                  return function (t, e) {
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
                      var n, i;
                      return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                        switch (r.label) {
                          case 0:
                            return (n = F(t)).asyncQueue.verifyOperationInProgress(), C("RemoteStore", "RemoteStore received new credentials"), i = zo(n), // Tear down and re-create our network streams. This will ensure we get a
                            // fresh auth token for the new user and re-fill the write pipeline with
                            // new mutations from the LocalStore (since mutations are per-user).
                            n.Or.add(3
                            /* CredentialChange */
                            ), [4
                            /*yield*/
                            , qo(n)];

                          case 1:
                            return r.sent(), i && // Don't set the network status to Unknown if we are offline.
                            n.Br.set("Unknown"
                            /* Unknown */
                            ), [4
                            /*yield*/
                            , n.remoteSyncer.handleCredentialChange(e)];

                          case 2:
                            return r.sent(), n.Or["delete"](3
                            /* CredentialChange */
                            ), [4
                            /*yield*/
                            , Vo(n)];

                          case 3:
                            // Tear down and re-create our network streams. This will ensure we get a
                            // fresh auth token for the new user and re-fill the write pipeline with
                            // new mutations from the LocalStore (since mutations are per-user).
                            return r.sent(), [2
                            /*return*/
                            ];
                        }
                      });
                    });
                  }(e.remoteStore, t);
                }), t.onlineComponents = e, [2
                /*return*/
                ];
            }
          });
        });
      }

      function Tu(t) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
            switch (e.label) {
              case 0:
                return t.offlineComponents ? [3
                /*break*/
                , 2] : (C("FirestoreClient", "Using default OfflineComponentProvider"), [4
                /*yield*/
                , bu(t, new hu())]);

              case 1:
                e.sent(), e.label = 2;

              case 2:
                return [2
                /*return*/
                , t.offlineComponents];
            }
          });
        });
      }

      function Eu(t) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
            switch (e.label) {
              case 0:
                return t.onlineComponents ? [3
                /*break*/
                , 2] : (C("FirestoreClient", "Using default OnlineComponentProvider"), [4
                /*yield*/
                , Iu(t, new du())]);

              case 1:
                e.sent(), e.label = 2;

              case 2:
                return [2
                /*return*/
                , t.onlineComponents];
            }
          });
        });
      }

      function _u(t) {
        return Tu(t).then(function (t) {
          return t.persistence;
        });
      }

      function Su(t) {
        return Tu(t).then(function (t) {
          return t.localStore;
        });
      }

      function Nu(t) {
        return Eu(t).then(function (t) {
          return t.remoteStore;
        });
      }

      function Du(t) {
        return Eu(t).then(function (t) {
          return t.syncEngine;
        });
      }

      function Au(t) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
          var e, n;
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
            switch (r.label) {
              case 0:
                return [4
                /*yield*/
                , Eu(t)];

              case 1:
                return e = r.sent(), [2
                /*return*/
                , ((n = e.eventManager).onListen = Rs.bind(null, e.syncEngine), n.onUnlisten = Os.bind(null, e.syncEngine), n)];
            }
          });
        });
      }
      /** Enables the network connection and re-enqueues all pending operations. */


      function ku(t, e, i) {
        var o = this;
        void 0 === i && (i = {});
        var s = new br();
        return t.asyncQueue.enqueueAndForget(function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(o, void 0, void 0, function () {
            var n;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
              switch (r.label) {
                case 0:
                  return n = function n(t, e, _n2, r, i) {
                    var o = new yu({
                      next: function next(o) {
                        // Remove query first before passing event to user to avoid
                        // user actions affecting the now stale query.
                        e.enqueueAndForget(function () {
                          return ms(t, s);
                        });
                        var u = o.docs.has(_n2);
                        !u && o.fromCache ? // TODO(dimond): If we're online and the document doesn't
                        // exist then we resolve with a doc.exists set to false. If
                        // we're offline however, we reject the Promise in this
                        // case. Two options: 1) Cache the negative response from
                        // the server so we can deliver that even when you're
                        // offline 2) Actually reject the Promise in the online case
                        // if the document doesn't exist.
                        i.reject(new D(N.UNAVAILABLE, "Failed to get document because the client is offline.")) : u && o.fromCache && r && "server" === r.source ? i.reject(new D(N.UNAVAILABLE, 'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')) : i.resolve(o);
                      },
                      error: function error(t) {
                        return i.reject(t);
                      }
                    }),
                        s = new Is(Yt(_n2.path), o, {
                      includeMetadataChanges: !0,
                      so: !0
                    });
                    return vs(t, s);
                  }, [4
                  /*yield*/
                  , Au(t)];

                case 1:
                  return [2
                  /*return*/
                  , n.apply(void 0, [r.sent(), t.asyncQueue, e, i, s])];
              }
            });
          });
        }), s.promise;
      }

      function Cu(t, e, i) {
        var o = this;
        void 0 === i && (i = {});
        var s = new br();
        return t.asyncQueue.enqueueAndForget(function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(o, void 0, void 0, function () {
            var n;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
              switch (r.label) {
                case 0:
                  return n = function n(t, e, _n3, r, i) {
                    var o = new yu({
                      next: function next(n) {
                        // Remove query first before passing event to user to avoid
                        // user actions affecting the now stale query.
                        e.enqueueAndForget(function () {
                          return ms(t, s);
                        }), n.fromCache && "server" === r.source ? i.reject(new D(N.UNAVAILABLE, 'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')) : i.resolve(n);
                      },
                      error: function error(t) {
                        return i.reject(t);
                      }
                    }),
                        s = new Is(_n3, o, {
                      includeMetadataChanges: !0,
                      so: !0
                    });
                    return vs(t, s);
                  }, [4
                  /*yield*/
                  , Au(t)];

                case 1:
                  return [2
                  /*return*/
                  , n.apply(void 0, [r.sent(), t.asyncQueue, e, i, s])];
              }
            });
          });
        }), s.promise;
      }

      var xu =
      /**
           * Constructs a DatabaseInfo using the provided host, databaseId and
           * persistenceKey.
           *
           * @param databaseId - The database to use.
           * @param appId - The Firebase App Id.
           * @param persistenceKey - A unique identifier for this Firestore's local
           * storage (used in conjunction with the databaseId).
           * @param host - The Firestore backend host to connect to.
           * @param ssl - Whether to use SSL when connecting.
           * @param forceLongPolling - Whether to use the forceLongPolling option
           * when using WebChannel as the network transport.
           * @param autoDetectLongPolling - Whether to use the detectBufferingProxy
           * option when using WebChannel as the network transport.
           * @param useFetchStreams Whether to use the Fetch API instead of
           * XMLHTTPRequest
           */
      function xu(t, e, n, r, i, o, s, u) {
        this.databaseId = t, this.appId = e, this.persistenceKey = n, this.host = r, this.ssl = i, this.forceLongPolling = o, this.autoDetectLongPolling = s, this.useFetchStreams = u;
      },
          Ru =
      /** @class */
      function () {
        function t(t, e) {
          this.projectId = t, this.database = e || "(default)";
        }

        return Object.defineProperty(t.prototype, "isDefaultDatabase", {
          get: function get() {
            return "(default)" === this.database;
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.isEqual = function (e) {
          return e instanceof t && e.projectId === this.projectId && e.database === this.database;
        }, t;
      }(),
          Lu = new Map(),
          Ou = function Ou(t, e) {
        this.user = e, this.type = "OAuth", this.authHeaders = {}, // Set the headers using Object Literal notation to avoid minification
        this.authHeaders.Authorization = "Bearer " + t;
      },
          Pu =
      /** @class */
      function () {
        function t() {
          /**
           * Stores the listener registered with setChangeListener()
           * This isn't actually necessary since the UID never changes, but we use this
           * to verify the listen contract is adhered to in tests.
           */
          this.changeListener = null;
        }

        return t.prototype.getToken = function () {
          return Promise.resolve(null);
        }, t.prototype.invalidateToken = function () {}, t.prototype.setChangeListener = function (t, e) {
          this.changeListener = e, // Fire with initial user.
          t.enqueueRetryable(function () {
            return e(fo.UNAUTHENTICATED);
          });
        }, t.prototype.removeChangeListener = function () {
          this.changeListener = null;
        }, t;
      }(),
          Fu =
      /** @class */
      function () {
        function t(t) {
          this.token = t,
          /**
               * Stores the listener registered with setChangeListener()
               * This isn't actually necessary since the UID never changes, but we use this
               * to verify the listen contract is adhered to in tests.
               */
          this.changeListener = null;
        }

        return t.prototype.getToken = function () {
          return Promise.resolve(this.token);
        }, t.prototype.invalidateToken = function () {}, t.prototype.setChangeListener = function (t, e) {
          var n = this;
          this.changeListener = e, // Fire with initial user.
          t.enqueueRetryable(function () {
            return e(n.token.user);
          });
        }, t.prototype.removeChangeListener = function () {
          this.changeListener = null;
        }, t;
      }(),
          Mu =
      /** @class */
      function () {
        function t(t) {
          var e = this;
          /** Tracks the current User. */

          this.currentUser = fo.UNAUTHENTICATED,
          /** Promise that allows blocking on the initialization of Firebase Auth. */
          this.oc = new br(),
          /**
               * Counter used to detect if the token changed while a getToken request was
               * outstanding.
               */
          this.cc = 0, this.forceRefresh = !1, this.auth = null, this.asyncQueue = null, this.uc = function () {
            e.cc++, e.currentUser = e.ac(), e.oc.resolve(), e.changeListener && e.asyncQueue.enqueueRetryable(function () {
              return e.changeListener(e.currentUser);
            });
          };

          var n = function n(t) {
            C("FirebaseCredentialsProvider", "Auth detected"), e.auth = t, e.auth.addAuthTokenListener(e.uc);
          };

          t.onInit(function (t) {
            return n(t);
          }), // Our users can initialize Auth right after Firestore, so we give it
          // a chance to register itself with the component framework before we
          // determine whether to start up in unauthenticated mode.
          setTimeout(function () {
            if (!e.auth) {
              var r = t.getImmediate({
                optional: !0
              });
              r ? n(r) : ( // If auth is still not available, proceed with `null` user
              C("FirebaseCredentialsProvider", "Auth not yet detected"), e.oc.resolve());
            }
          }, 0);
        }

        return t.prototype.getToken = function () {
          var t = this,
              e = this.cc,
              n = this.forceRefresh; // Take note of the current value of the tokenCounter so that this method
          // can fail (with an ABORTED error) if there is a token change while the
          // request is outstanding.

          return this.forceRefresh = !1, this.auth ? this.auth.getToken(n).then(function (n) {
            // Cancel the request since the token changed while the request was
            // outstanding so the response is potentially for a previous user (which
            // user, we can't be sure).
            return t.cc !== e ? (C("FirebaseCredentialsProvider", "getToken aborted due to token change."), t.getToken()) : n ? (P("string" == typeof n.accessToken), new Ou(n.accessToken, t.currentUser)) : null;
          }) : Promise.resolve(null);
        }, t.prototype.invalidateToken = function () {
          this.forceRefresh = !0;
        }, t.prototype.setChangeListener = function (t, e) {
          var i = this;
          this.asyncQueue = t, // Blocks the AsyncQueue until the next user is available.
          this.asyncQueue.enqueueRetryable(function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(i, void 0, void 0, function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (t) {
                switch (t.label) {
                  case 0:
                    return [4
                    /*yield*/
                    , this.oc.promise];

                  case 1:
                    return t.sent(), [4
                    /*yield*/
                    , e(this.currentUser)];

                  case 2:
                    return t.sent(), this.changeListener = e, [2
                    /*return*/
                    ];
                }
              });
            });
          });
        }, t.prototype.removeChangeListener = function () {
          this.auth && this.auth.removeAuthTokenListener(this.uc), this.changeListener = function () {
            return Promise.resolve();
          };
        }, // Auth.getUid() can return null even with a user logged in. It is because
        // getUid() is synchronous, but the auth code populating Uid is asynchronous.
        // This method should only be called in the AuthTokenListener callback
        // to guarantee to get the actual user.
        t.prototype.ac = function () {
          var t = this.auth && this.auth.getUid();
          return P(null === t || "string" == typeof t), new fo(t);
        }, t;
      }(),
          Vu =
      /** @class */
      function () {
        function t(t, e, n) {
          this.hc = t, this.lc = e, this.fc = n, this.type = "FirstParty", this.user = fo.FIRST_PARTY;
        }

        return Object.defineProperty(t.prototype, "authHeaders", {
          get: function get() {
            var t = {
              "X-Goog-AuthUser": this.lc
            },
                e = this.hc.auth.getAuthHeaderValueForFirstParty([]); // Use array notation to prevent minification

            return e && (t.Authorization = e), this.fc && (t["X-Goog-Iam-Authorization-Token"] = this.fc), t;
          },
          enumerable: !1,
          configurable: !0
        }), t;
      }(),
          qu =
      /** @class */
      function () {
        function t(t, e, n) {
          this.hc = t, this.lc = e, this.fc = n;
        }

        return t.prototype.getToken = function () {
          return Promise.resolve(new Vu(this.hc, this.lc, this.fc));
        }, t.prototype.setChangeListener = function (t, e) {
          // Fire with initial uid.
          t.enqueueRetryable(function () {
            return e(fo.FIRST_PARTY);
          });
        }, t.prototype.removeChangeListener = function () {}, t.prototype.invalidateToken = function () {}, t;
      }();
      /** The default database name for a project. */

      /** Represents the database ID a Firestore client is associated with. */

      /**
       * Builds a CredentialsProvider depending on the type of
       * the credentials passed in.
       */

      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      function Uu(t, e, n) {
        if (!n) throw new D(N.INVALID_ARGUMENT, "Function " + t + "() cannot be called with an empty " + e + ".");
      }

      function Bu(t, e) {
        if (void 0 === e) return {
          merge: !1
        };
        if (void 0 !== e.mergeFields && void 0 !== e.merge) throw new D(N.INVALID_ARGUMENT, "Invalid options passed to function " + t + '(): You cannot specify both "merge" and "mergeFields".');
        return e;
      }
      /**
       * Validates that two boolean options are not set at the same time.
       */


      function ju(t, e, n, r) {
        if (!0 === e && !0 === r) throw new D(N.INVALID_ARGUMENT, t + " and " + n + " cannot be used together.");
      }
      /**
       * Validates that `path` refers to a document (indicated by the fact it contains
       * an even numbers of segments).
       */


      function Ku(t) {
        if (!ct.isDocumentKey(t)) throw new D(N.INVALID_ARGUMENT, "Invalid document reference. Document references must have an even number of segments, but " + t + " has " + t.length + ".");
      }
      /**
       * Validates that `path` refers to a collection (indicated by the fact it
       * contains an odd numbers of segments).
       */


      function Qu(t) {
        if (ct.isDocumentKey(t)) throw new D(N.INVALID_ARGUMENT, "Invalid collection reference. Collection references must have an odd number of segments, but " + t + " has " + t.length + ".");
      }
      /**
       * Returns true if it's a non-null object without a custom prototype
       * (i.e. excludes Array, Date, etc.).
       */

      /** Returns a string describing the type / value of the provided input. */


      function Gu(t) {
        if (void 0 === t) return "undefined";
        if (null === t) return "null";
        if ("string" == typeof t) return t.length > 20 && (t = t.substring(0, 20) + "..."), JSON.stringify(t);
        if ("number" == typeof t || "boolean" == typeof t) return "" + t;

        if ("object" == typeof t) {
          if (t instanceof Array) return "an array";

          var e =
          /** Hacky method to try to get the constructor name for an object. */
          function (t) {
            if (t.constructor) {
              var e = /function\s+([^\s(]+)\s*\(/.exec(t.constructor.toString());
              if (e && e.length > 1) return e[1];
            }

            return null;
          }(t);

          return e ? "a custom " + e + " object" : "an object";
        }

        return "function" == typeof t ? "a function" : O();
      }

      function zu(t, // eslint-disable-next-line @typescript-eslint/no-explicit-any
      e) {
        if ("_delegate" in t && ( // Unwrap Compat types
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        t = t._delegate), !(t instanceof e)) {
          if (e.name === t.constructor.name) throw new D(N.INVALID_ARGUMENT, "Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");
          var n = Gu(t);
          throw new D(N.INVALID_ARGUMENT, "Expected type '" + e.name + "', but it was: " + n);
        }

        return t;
      }

      function Wu(t, e) {
        if (e <= 0) throw new D(N.INVALID_ARGUMENT, "Function " + t + "() requires a positive number, but it was: " + e + ".");
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */
      // settings() defaults:

      /**
       * A concrete type describing all the values that can be applied via a
       * user-supplied firestore.Settings object. This is a separate type so that
       * defaults can be supplied and the value can be checked for equality.
       */


      var Hu =
      /** @class */
      function () {
        function t(t) {
          var e;

          if (void 0 === t.host) {
            if (void 0 !== t.ssl) throw new D(N.INVALID_ARGUMENT, "Can't provide ssl option if host option is not set");
            this.host = "firestore.googleapis.com", this.ssl = !0;
          } else this.host = t.host, this.ssl = null === (e = t.ssl) || void 0 === e || e;

          if (this.credentials = t.credentials, this.ignoreUndefinedProperties = !!t.ignoreUndefinedProperties, void 0 === t.cacheSizeBytes) this.cacheSizeBytes = 41943040;else {
            if (-1 !== t.cacheSizeBytes && t.cacheSizeBytes < 1048576) throw new D(N.INVALID_ARGUMENT, "cacheSizeBytes must be at least 1048576");
            this.cacheSizeBytes = t.cacheSizeBytes;
          }
          this.experimentalForceLongPolling = !!t.experimentalForceLongPolling, this.experimentalAutoDetectLongPolling = !!t.experimentalAutoDetectLongPolling, this.useFetchStreams = !!t.useFetchStreams, ju("experimentalForceLongPolling", t.experimentalForceLongPolling, "experimentalAutoDetectLongPolling", t.experimentalAutoDetectLongPolling);
        }

        return t.prototype.isEqual = function (t) {
          return this.host === t.host && this.ssl === t.ssl && this.credentials === t.credentials && this.cacheSizeBytes === t.cacheSizeBytes && this.experimentalForceLongPolling === t.experimentalForceLongPolling && this.experimentalAutoDetectLongPolling === t.experimentalAutoDetectLongPolling && this.ignoreUndefinedProperties === t.ignoreUndefinedProperties && this.useFetchStreams === t.useFetchStreams;
        }, t;
      }(),
          Yu =
      /** @class */
      function () {
        /** @hideconstructor */
        function t(t, e) {
          /**
           * Whether it's a Firestore or Firestore Lite instance.
           */
          this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new Hu({}), this._settingsFrozen = !1, t instanceof Ru ? (this._databaseId = t, this._credentials = new Pu()) : (this._app = t, this._databaseId = function (t) {
            if (!Object.prototype.hasOwnProperty.apply(t.options, ["projectId"])) throw new D(N.INVALID_ARGUMENT, '"projectId" not provided in firebase.initializeApp.');
            return new Ru(t.options.projectId);
          }(t), this._credentials = new Mu(e));
        }

        return Object.defineProperty(t.prototype, "app", {
          /**
           * The {@link @firebase/app#FirebaseApp} associated with this `Firestore` service
           * instance.
           */
          get: function get() {
            if (!this._app) throw new D(N.FAILED_PRECONDITION, "Firestore was not initialized using the Firebase SDK. 'app' is not available");
            return this._app;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "_initialized", {
          get: function get() {
            return this._settingsFrozen;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "_terminated", {
          get: function get() {
            return void 0 !== this._terminateTask;
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype._setSettings = function (t) {
          if (this._settingsFrozen) throw new D(N.FAILED_PRECONDITION, "Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");
          this._settings = new Hu(t), void 0 !== t.credentials && (this._credentials = function (t) {
            if (!t) return new Pu();

            switch (t.type) {
              case "gapi":
                var e = t.client; // Make sure this really is a Gapi client.

                return P(!("object" != typeof e || null === e || !e.auth || !e.auth.getAuthHeaderValueForFirstParty)), new qu(e, t.sessionIndex || "0", t.iamToken || null);

              case "provider":
                return t.client;

              default:
                throw new D(N.INVALID_ARGUMENT, "makeCredentialsProvider failed due to invalid credential type");
            }
          }(t.credentials));
        }, t.prototype._getSettings = function () {
          return this._settings;
        }, t.prototype._freezeSettings = function () {
          return this._settingsFrozen = !0, this._settings;
        }, t.prototype._delete = function () {
          return this._terminateTask || (this._terminateTask = this._terminate()), this._terminateTask;
        },
        /** Returns a JSON-serializable representation of this Firestore instance. */
        t.prototype.toJSON = function () {
          return {
            app: this._app,
            databaseId: this._databaseId,
            settings: this._settings
          };
        },
        /**
         * Terminates all components used by this client. Subclasses can override
         * this method to clean up their own dependencies, but must also call this
         * method.
         *
         * Only ever called once.
         */
        t.prototype._terminate = function () {
          /**
          * Removes all components associated with the provided instance. Must be called
          * when the `Firestore` instance is terminated.
          */
          return t = this, (e = Lu.get(t)) && (C("ComponentProvider", "Removing Datastore"), Lu["delete"](t), e.terminate()), Promise.resolve();
          var t, e;
        }, t;
      }(),
          $u =
      /** @class */
      function () {
        /** @hideconstructor */
        function t(t,
        /**
         * If provided, the `FirestoreDataConverter` associated with this instance.
         */
        e, n) {
          this.converter = e, this._key = n,
          /** The type of this Firestore reference. */
          this.type = "document", this.firestore = t;
        }

        return Object.defineProperty(t.prototype, "_path", {
          get: function get() {
            return this._key.path;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "id", {
          /**
           * The document's identifier within its collection.
           */
          get: function get() {
            return this._key.path.lastSegment();
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "path", {
          /**
           * A string representing the path of the referenced document (relative
           * to the root of the database).
           */
          get: function get() {
            return this._key.path.canonicalString();
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "parent", {
          /**
           * The collection this `DocumentReference` belongs to.
           */
          get: function get() {
            return new Ju(this.firestore, this.converter, this._key.path.popLast());
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.withConverter = function (e) {
          return new t(this.firestore, e, this._key);
        }, t;
      }(),
          Xu =
      /** @class */
      function () {
        // This is the lite version of the Query class in the main SDK.

        /** @hideconstructor protected */
        function t(t,
        /**
         * If provided, the `FirestoreDataConverter` associated with this instance.
         */
        e, n) {
          this.converter = e, this._query = n,
          /** The type of this Firestore reference. */
          this.type = "query", this.firestore = t;
        }

        return t.prototype.withConverter = function (e) {
          return new t(this.firestore, e, this._query);
        }, t;
      }(),
          Ju =
      /** @class */
      function (e) {
        /** @hideconstructor */
        function n(t, n, r) {
          var i = this;
          return (i = e.call(this, t, n, Yt(r)) || this)._path = r,
          /** The type of this Firestore reference. */
          i.type = "collection", i;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), Object.defineProperty(n.prototype, "id", {
          /** The collection's identifier. */
          get: function get() {
            return this._query.path.lastSegment();
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(n.prototype, "path", {
          /**
           * A string representing the path of the referenced collection (relative
           * to the root of the database).
           */
          get: function get() {
            return this._query.path.canonicalString();
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(n.prototype, "parent", {
          /**
           * A reference to the containing `DocumentReference` if this is a
           * subcollection. If this isn't a subcollection, the reference is null.
           */
          get: function get() {
            var t = this._path.popLast();

            return t.isEmpty() ? null : new $u(this.firestore,
            /* converter= */
            null, new ct(t));
          },
          enumerable: !1,
          configurable: !0
        }), n.prototype.withConverter = function (t) {
          return new n(this.firestore, t, this._path);
        }, n;
      }(Xu);
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * The Cloud Firestore service interface.
       *
       * Do not call this constructor directly. Instead, use {@link getFirestore}.
       */


      function Zu(t, n) {
        for (var r, i = [], o = 2; o < arguments.length; o++) {
          i[o - 2] = arguments[o];
        }

        if (t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(t), Uu("collection", "path", n), t instanceof Yu) return Qu(r = H.fromString.apply(H, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])([n], i))), new Ju(t,
        /* converter= */
        null, r);
        if (!(t instanceof $u || t instanceof Ju)) throw new D(N.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
        return Qu(r = H.fromString.apply(H, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])([t.path], i)).child(H.fromString(n))), new Ju(t.firestore,
        /* converter= */
        null, r);
      } // TODO(firestorelite): Consider using ErrorFactory -
      // https://github.com/firebase/firebase-js-sdk/blob/0131e1f/packages/util/src/errors.ts#L106

      /**
       * Creates and returns a new `Query` instance that includes all documents in the
       * database that are contained in a collection or subcollection with the
       * given `collectionId`.
       *
       * @param firestore - A reference to the root Firestore instance.
       * @param collectionId - Identifies the collections to query over. Every
       * collection or subcollection with this ID as the last segment of its path
       * will be included. Cannot contain a slash.
       * @returns The created `Query`.
       */


      function ta(t, n) {
        for (var r, i = [], o = 2; o < arguments.length; o++) {
          i[o - 2] = arguments[o];
        }

        if (t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(t), // We allow omission of 'pathString' but explicitly prohibit passing in both
        // 'undefined' and 'null'.
        1 === arguments.length && (n = V.u()), Uu("doc", "path", n), t instanceof Yu) return Ku(r = H.fromString.apply(H, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])([n], i))), new $u(t,
        /* converter= */
        null, new ct(r));
        if (!(t instanceof $u || t instanceof Ju)) throw new D(N.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
        return Ku(r = t._path.child(H.fromString.apply(H, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])([n], i)))), new $u(t.firestore, t instanceof Ju ? t.converter : null, new ct(r));
      }
      /**
       * Returns true if the provided references are equal.
       *
       * @param left - A reference to compare.
       * @param right - A reference to compare.
       * @returns true if the references point to the same location in the same
       * Firestore database.
       */


      function ea(t, e) {
        return t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(t), e = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(e), (t instanceof $u || t instanceof Ju) && (e instanceof $u || e instanceof Ju) && t.firestore === e.firestore && t.path === e.path && t.converter === e.converter
        /**
        * Returns true if the provided queries point to the same collection and apply
        * the same constraints.
        *
        * @param left - A `Query` to compare.
        * @param right - A `Query` to compare.
        * @returns true if the references point to the same location in the same
        * Firestore database.
        */
        ;
      }

      function na(t, e) {
        return t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(t), e = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(e), t instanceof Xu && e instanceof Xu && t.firestore === e.firestore && ie(t._query, e._query) && t.converter === e.converter
        /**
        * @license
        * Copyright 2020 Google LLC
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
        * you may not use this file except in compliance with the License.
        * You may obtain a copy of the License at
        *
        *   http://www.apache.org/licenses/LICENSE-2.0
        *
        * Unless required by applicable law or agreed to in writing, software
        * distributed under the License is distributed on an "AS IS" BASIS,
        * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        * See the License for the specific language governing permissions and
        * limitations under the License.
        */
        ;
      }

      var ra =
      /** @class */
      function () {
        function t() {
          var t = this; // The last promise in the queue.

          this.dc = Promise.resolve(), // A list of retryable operations. Retryable operations are run in order and
          // retried with backoff.
          this.wc = [], // Is this AsyncQueue being shut down? Once it is set to true, it will not
          // be changed again.
          this._c = !1, // Operations scheduled to be queued in the future. Operations are
          // automatically removed after they are run or canceled.
          this.mc = [], // visible for testing
          this.yc = null, // Flag set while there's an outstanding AsyncQueue operation, used for
          // assertion sanity-checks.
          this.gc = !1, // Enabled during shutdown on Safari to prevent future access to IndexedDB.
          this.Ec = !1, // List of TimerIds to fast-forward delays for.
          this.Tc = [], // Backoff timer used to schedule retries for retryable operations
          this.Zi = new xo(this, "async_queue_retry"
          /* AsyncQueueRetry */
          ), // Visibility handler that triggers an immediate retry of all retryable
          // operations. Meant to speed up recovery when we regain file system access
          // after page comes into foreground.
          this.Ic = function () {
            var e = ko();
            e && C("AsyncQueue", "Visibility state changed to " + e.visibilityState), t.Zi.Gi();
          };
          var e = ko();
          e && "function" == typeof e.addEventListener && e.addEventListener("visibilitychange", this.Ic);
        }

        return Object.defineProperty(t.prototype, "isShuttingDown", {
          get: function get() {
            return this._c;
          },
          enumerable: !1,
          configurable: !0
        }),
        /**
         * Adds a new operation to the queue without waiting for it to complete (i.e.
         * we ignore the Promise result).
         */
        t.prototype.enqueueAndForget = function (t) {
          // eslint-disable-next-line @typescript-eslint/no-floating-promises
          this.enqueue(t);
        }, t.prototype.enqueueAndForgetEvenWhileRestricted = function (t) {
          this.Ac(), // eslint-disable-next-line @typescript-eslint/no-floating-promises
          this.Rc(t);
        }, t.prototype.enterRestrictedMode = function (t) {
          if (!this._c) {
            this._c = !0, this.Ec = t || !1;
            var e = ko();
            e && "function" == typeof e.removeEventListener && e.removeEventListener("visibilitychange", this.Ic);
          }
        }, t.prototype.enqueue = function (t) {
          var e = this;
          if (this.Ac(), this._c) // Return a Promise which never resolves.
            return new Promise(function () {}); // Create a deferred Promise that we can return to the callee. This
          // allows us to return a "hanging Promise" only to the callee and still
          // advance the queue even when the operation is not run.

          var n = new br();
          return this.Rc(function () {
            return e._c && e.Ec ? Promise.resolve() : (t().then(n.resolve, n.reject), n.promise);
          }).then(function () {
            return n.promise;
          });
        }, t.prototype.enqueueRetryable = function (t) {
          var e = this;
          this.enqueueAndForget(function () {
            return e.wc.push(t), e.bc();
          });
        },
        /**
         * Runs the next operation from the retryable queue. If the operation fails,
         * reschedules with backoff.
         */
        t.prototype.bc = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var t,
                e = this;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
              switch (n.label) {
                case 0:
                  if (0 === this.wc.length) return [3
                  /*break*/
                  , 5];
                  n.label = 1;

                case 1:
                  return n.trys.push([1, 3,, 4]), [4
                  /*yield*/
                  , this.wc[0]()];

                case 2:
                  return n.sent(), this.wc.shift(), this.Zi.reset(), [3
                  /*break*/
                  , 4];

                case 3:
                  if (!Nr(t = n.sent())) throw t; // Failure will be handled by AsyncQueue

                  return C("AsyncQueue", "Operation failed with retryable error: " + t), [3
                  /*break*/
                  , 4];

                case 4:
                  this.wc.length > 0 && // If there are additional operations, we re-schedule `retryNextOp()`.
                  // This is necessary to run retryable operations that failed during
                  // their initial attempt since we don't know whether they are already
                  // enqueued. If, for example, `op1`, `op2`, `op3` are enqueued and `op1`
                  // needs to  be re-run, we will run `op1`, `op1`, `op2` using the
                  // already enqueued calls to `retryNextOp()`. `op3()` will then run in the
                  // call scheduled here.
                  // Since `backoffAndRun()` cancels an existing backoff and schedules a
                  // new backoff on every call, there is only ever a single additional
                  // operation in the queue.
                  this.Zi.ji(function () {
                    return e.bc();
                  }), n.label = 5;

                case 5:
                  return [2
                  /*return*/
                  ];
              }
            });
          });
        }, t.prototype.Rc = function (t) {
          var e = this,
              n = this.dc.then(function () {
            return e.gc = !0, t()["catch"](function (t) {
              // Re-throw the error so that this.tail becomes a rejected Promise and
              // all further attempts to chain (via .then) will just short-circuit
              // and return the rejected Promise.
              throw e.yc = t, e.gc = !1, x("INTERNAL UNHANDLED ERROR: ",
              /**
              * Chrome includes Error.message in Error.stack. Other browsers do not.
              * This returns expected output of message + stack when available.
              * @param error - Error or FirestoreError
              */
              function (t) {
                var e = t.message || "";
                return t.stack && (e = t.stack.includes(t.message) ? t.stack : t.message + "\n" + t.stack), e;
              }(t)), t;
            }).then(function (t) {
              return e.gc = !1, t;
            });
          });
          return this.dc = n, n;
        }, t.prototype.enqueueAfterDelay = function (t, e, n) {
          var r = this;
          this.Ac(), // Fast-forward delays for timerIds that have been overriden.
          this.Tc.indexOf(t) > -1 && (e = 0);
          var i = cs.createAndSchedule(this, t, e, n, function (t) {
            return r.vc(t);
          });
          return this.mc.push(i), i;
        }, t.prototype.Ac = function () {
          this.yc && O();
        }, t.prototype.verifyOperationInProgress = function () {},
        /**
         * Waits until all currently queued tasks are finished executing. Delayed
         * operations are not run.
         */
        t.prototype.Pc = function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
            var t;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (e) {
              switch (e.label) {
                case 0:
                  return [4
                  /*yield*/
                  , t = this.dc];

                case 1:
                  e.sent(), e.label = 2;

                case 2:
                  if (t !== this.dc) return [3
                  /*break*/
                  , 0];
                  e.label = 3;

                case 3:
                  return [2
                  /*return*/
                  ];
              }
            });
          });
        },
        /**
         * For Tests: Determine if a delayed operation with a particular TimerId
         * exists.
         */
        t.prototype.Vc = function (t) {
          for (var e = 0, n = this.mc; e < n.length; e++) {
            if (n[e].timerId === t) return !0;
          }

          return !1;
        },
        /**
         * For Tests: Runs some or all delayed operations early.
         *
         * @param lastTimerId - Delayed operations up to and including this TimerId
         * will be drained. Pass TimerId.All to run all delayed operations.
         * @returns a Promise that resolves once all operations have been run.
         */
        t.prototype.Sc = function (t) {
          var e = this; // Note that draining may generate more delayed ops, so we do that first.

          return this.Pc().then(function () {
            // Run ops in the same order they'd run if they ran naturally.
            e.mc.sort(function (t, e) {
              return t.targetTimeMs - e.targetTimeMs;
            });

            for (var n = 0, r = e.mc; n < r.length; n++) {
              var i = r[n];
              if (i.skipDelay(), "all"
              /* All */
              !== t && i.timerId === t) break;
            }

            return e.Pc();
          });
        },
        /**
         * For Tests: Skip all subsequent delays for a timer id.
         */
        t.prototype.Dc = function (t) {
          this.Tc.push(t);
        },
        /** Called once a DelayedOperation is run or canceled. */
        t.prototype.vc = function (t) {
          // NOTE: indexOf / slice are O(n), but delayedOperations is expected to be small.
          var e = this.mc.indexOf(t);
          this.mc.splice(e, 1);
        }, t;
      }();

      function ia(t) {
        /**
        * Returns true if obj is an object and contains at least one of the specified
        * methods.
        */
        return function (t, e) {
          if ("object" != typeof t || null === t) return !1;

          for (var n = t, r = 0, i = ["next", "error", "complete"]; r < i.length; r++) {
            var o = i[r];
            if (o in n && "function" == typeof n[o]) return !0;
          }

          return !1;
        }(t);
      }

      var oa =
      /** @class */
      function () {
        function t() {
          this._progressObserver = {}, this._taskCompletionResolver = new br(), this._lastProgress = {
            taskState: "Running",
            totalBytes: 0,
            totalDocuments: 0,
            bytesLoaded: 0,
            documentsLoaded: 0
          }
          /**
          * Registers functions to listen to bundle loading progress events.
          * @param next - Called when there is a progress update from bundle loading. Typically `next` calls occur
          *   each time a Firestore document is loaded from the bundle.
          * @param error - Called when an error occurs during bundle loading. The task aborts after reporting the
          *   error, and there should be no more updates after this.
          * @param complete - Called when the loading task is complete.
          */
          ;
        }

        return t.prototype.onProgress = function (t, e, n) {
          this._progressObserver = {
            next: t,
            error: e,
            complete: n
          };
        },
        /**
         * Implements the `Promise<LoadBundleTaskProgress>.catch` interface.
         *
         * @param onRejected - Called when an error occurs during bundle loading.
         */
        t.prototype["catch"] = function (t) {
          return this._taskCompletionResolver.promise["catch"](t);
        },
        /**
         * Implements the `Promise<LoadBundleTaskProgress>.then` interface.
         *
         * @param onFulfilled - Called on the completion of the loading task with a final `LoadBundleTaskProgress` update.
         *   The update will always have its `taskState` set to `"Success"`.
         * @param onRejected - Called when an error occurs during bundle loading.
         */
        t.prototype.then = function (t, e) {
          return this._taskCompletionResolver.promise.then(t, e);
        },
        /**
         * Notifies all observers that bundle loading has completed, with a provided
         * `LoadBundleTaskProgress` object.
         *
         * @private
         */
        t.prototype._completeWith = function (t) {
          this._updateProgress(t), this._progressObserver.complete && this._progressObserver.complete(), this._taskCompletionResolver.resolve(t);
        },
        /**
         * Notifies all observers that bundle loading has failed, with a provided
         * `Error` as the reason.
         *
         * @private
         */
        t.prototype._failWith = function (t) {
          this._lastProgress.taskState = "Error", this._progressObserver.next && this._progressObserver.next(this._lastProgress), this._progressObserver.error && this._progressObserver.error(t), this._taskCompletionResolver.reject(t);
        },
        /**
         * Notifies a progress update of loading a bundle.
         * @param progress - The new progress.
         *
         * @private
         */
        t.prototype._updateProgress = function (t) {
          this._lastProgress = t, this._progressObserver.next && this._progressObserver.next(t);
        }, t;
      }(),
          sa = -1,
          ua =
      /** @class */
      function (e) {
        /** @hideconstructor */
        function n(t, n) {
          var r = this;
          /**
               * Whether it's a Firestore or Firestore Lite instance.
               */

          return (r = e.call(this, t, n) || this).type = "firestore", r._queue = new ra(), r._persistenceKey = "name" in t ? t.name : "[DEFAULT]", r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype._terminate = function () {
          return this._firestoreClient || // The client must be initialized to ensure that all subsequent API
          // usage throws an exception.
          ca(this), this._firestoreClient.terminate();
        }, n;
      }(Yu);
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /** DOMException error code constants. */

      /**
       * @internal
       */


      function aa(t) {
        return t._firestoreClient || ca(t), t._firestoreClient.verifyNotTerminated(), t._firestoreClient;
      }

      function ca(t) {
        var e,
            n = t._freezeSettings(),
            r = function (t, e, n, r) {
          return new xu(t, e, n, r.host, r.ssl, r.experimentalForceLongPolling, r.experimentalAutoDetectLongPolling, r.useFetchStreams);
        }(t._databaseId, (null === (e = t._app) || void 0 === e ? void 0 : e.options.appId) || "", t._persistenceKey, n);

        t._firestoreClient = new wu(t._credentials, t._queue, r);
      }
      /**
       * Attempts to enable persistent storage, if possible.
       *
       * Must be called before any other functions (other than
       * {@link initializeFirestore}, {@link getFirestore} or
       * {@link clearIndexedDbPersistence}.
       *
       * If this fails, `enableIndexedDbPersistence()` will reject the promise it
       * returns. Note that even after this failure, the `Firestore` instance will
       * remain usable, however offline persistence will be disabled.
       *
       * There are several reasons why this can fail, which can be identified by
       * the `code` on the error.
       *
       *   * failed-precondition: The app is already open in another browser tab.
       *   * unimplemented: The browser is incompatible with the offline
       *     persistence implementation.
       *
       * @param firestore - The `Firestore` instance to enable persistence for.
       * @param persistenceSettings - Optional settings object to configure
       * persistence.
       * @returns A promise that represents successfully enabling persistent storage.
       */

      /**
       * Registers both the `OfflineComponentProvider` and `OnlineComponentProvider`.
       * If the operation fails with a recoverable error (see
       * `canRecoverFromIndexedDbError()` below), the returned Promise is rejected
       * but the client remains usable.
       */


      function ha(t, e, i) {
        var o = this,
            s = new br();
        return t.asyncQueue.enqueue(function () {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(o, void 0, void 0, function () {
            var n;
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
              switch (r.label) {
                case 0:
                  return r.trys.push([0, 3,, 4]), [4
                  /*yield*/
                  , bu(t, i)];

                case 1:
                  return r.sent(), [4
                  /*yield*/
                  , Iu(t, e)];

                case 2:
                  return r.sent(), s.resolve(), [3
                  /*break*/
                  , 4];

                case 3:
                  if (!
                  /**
                  * Decides whether the provided error allows us to gracefully disable
                  * persistence (as opposed to crashing the client).
                  */
                  function (t) {
                    return "FirebaseError" === t.name ? t.code === N.FAILED_PRECONDITION || t.code === N.UNIMPLEMENTED : !("undefined" != typeof DOMException && t instanceof DOMException) || 22 === t.code || 20 === t.code || // Firefox Private Browsing mode disables IndexedDb and returns
                    // INVALID_STATE for any usage.
                    11 === t.code;
                  }(n = r.sent())) throw n;
                  return console.warn("Error enabling offline persistence. Falling back to persistence disabled: " + n), s.reject(n), [3
                  /*break*/
                  , 4];

                case 4:
                  return [2
                  /*return*/
                  ];
              }
            });
          });
        }).then(function () {
          return s.promise;
        });
      }
      /**
       * Re-enables use of the network for this Firestore instance after a prior
       * call to {@link disableNetwork}.
       *
       * @returns A promise that is resolved once the network has been enabled.
       */


      function fa(t) {
        if (t._initialized || t._terminated) throw new D(N.FAILED_PRECONDITION, "Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.");
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * A `FieldPath` refers to a field in a document. The path may consist of a
       * single field name (referring to a top-level field in the document), or a
       * list of field names (referring to a nested field in the document).
       *
       * Create a `FieldPath` by providing field names. If more than one field
       * name is provided, the path will point to a nested field in a document.
       */


      var la =
      /** @class */
      function () {
        /**
         * Creates a FieldPath from the provided field names. If more than one field
         * name is provided, the path will point to a nested field in a document.
         *
         * @param fieldNames - A list of field names.
         */
        function t() {
          for (var t = [], e = 0; e < arguments.length; e++) {
            t[e] = arguments[e];
          }

          for (var n = 0; n < t.length; ++n) {
            if (0 === t[n].length) throw new D(N.INVALID_ARGUMENT, "Invalid field name at argument $(i + 1). Field names must not be empty.");
          }

          this._internalPath = new $(t);
        }
        /**
         * Returns true if this `FieldPath` is equal to the provided one.
         *
         * @param other - The `FieldPath` to compare against.
         * @returns true if this `FieldPath` is equal to the provided one.
         */


        return t.prototype.isEqual = function (t) {
          return this._internalPath.isEqual(t._internalPath);
        }, t;
      }(),
          da =
      /** @class */
      function () {
        /** @hideconstructor */
        function t(t) {
          this._byteString = t;
        }
        /**
         * Creates a new `Bytes` object from the given Base64 string, converting it to
         * bytes.
         *
         * @param base64 - The Base64 string used to create the `Bytes` object.
         */


        return t.fromBase64String = function (e) {
          try {
            return new t(J.fromBase64String(e));
          } catch (e) {
            throw new D(N.INVALID_ARGUMENT, "Failed to construct data from Base64 string: " + e);
          }
        },
        /**
         * Creates a new `Bytes` object from the given Uint8Array.
         *
         * @param array - The Uint8Array used to create the `Bytes` object.
         */
        t.fromUint8Array = function (e) {
          return new t(J.fromUint8Array(e));
        },
        /**
         * Returns the underlying bytes as a Base64-encoded string.
         *
         * @returns The Base64-encoded string created from the `Bytes` object.
         */
        t.prototype.toBase64 = function () {
          return this._byteString.toBase64();
        },
        /**
         * Returns the underlying bytes in a new `Uint8Array`.
         *
         * @returns The Uint8Array created from the `Bytes` object.
         */
        t.prototype.toUint8Array = function () {
          return this._byteString.toUint8Array();
        },
        /**
         * Returns a string representation of the `Bytes` object.
         *
         * @returns A string representation of the `Bytes` object.
         */
        t.prototype.toString = function () {
          return "Bytes(base64: " + this.toBase64() + ")";
        },
        /**
         * Returns true if this `Bytes` object is equal to the provided one.
         *
         * @param other - The `Bytes` object to compare against.
         * @returns true if this `Bytes` object is equal to the provided one.
         */
        t.prototype.isEqual = function (t) {
          return this._byteString.isEqual(t._byteString);
        }, t;
      }(),
          pa =
      /**
           * @param _methodName - The public API endpoint that returns this class.
           * @hideconstructor
           */
      function pa(t) {
        this._methodName = t;
      },
          ya =
      /** @class */
      function () {
        /**
         * Creates a new immutable `GeoPoint` object with the provided latitude and
         * longitude values.
         * @param latitude - The latitude as number between -90 and 90.
         * @param longitude - The longitude as number between -180 and 180.
         */
        function t(t, e) {
          if (!isFinite(t) || t < -90 || t > 90) throw new D(N.INVALID_ARGUMENT, "Latitude must be a number between -90 and 90, but was: " + t);
          if (!isFinite(e) || e < -180 || e > 180) throw new D(N.INVALID_ARGUMENT, "Longitude must be a number between -180 and 180, but was: " + e);
          this._lat = t, this._long = e;
        }

        return Object.defineProperty(t.prototype, "latitude", {
          /**
           * The latitude of this `GeoPoint` instance.
           */
          get: function get() {
            return this._lat;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "longitude", {
          /**
           * The longitude of this `GeoPoint` instance.
           */
          get: function get() {
            return this._long;
          },
          enumerable: !1,
          configurable: !0
        }),
        /**
         * Returns true if this `GeoPoint` is equal to the provided one.
         *
         * @param other - The `GeoPoint` to compare against.
         * @returns true if this `GeoPoint` is equal to the provided one.
         */
        t.prototype.isEqual = function (t) {
          return this._lat === t._lat && this._long === t._long;
        },
        /** Returns a JSON-serializable representation of this GeoPoint. */
        t.prototype.toJSON = function () {
          return {
            latitude: this._lat,
            longitude: this._long
          };
        },
        /**
         * Actually private to JS consumers of our API, so this function is prefixed
         * with an underscore.
         */
        t.prototype._compareTo = function (t) {
          return q(this._lat, t._lat) || q(this._long, t._long);
        }, t;
      }(),
          va = /^__.*__$/,
          ma =
      /** @class */
      function () {
        function t(t, e, n) {
          this.data = t, this.fieldMask = e, this.fieldTransforms = n;
        }

        return t.prototype.toMutation = function (t, e) {
          return null !== this.fieldMask ? new Fe(t, this.data, this.fieldMask, e, this.fieldTransforms) : new Pe(t, this.data, e, this.fieldTransforms);
        }, t;
      }(),
          ga =
      /** @class */
      function () {
        function t(t, // The fieldMask does not include document transforms.
        e, n) {
          this.data = t, this.fieldMask = e, this.fieldTransforms = n;
        }

        return t.prototype.toMutation = function (t, e) {
          return new Fe(t, this.data, this.fieldMask, e, this.fieldTransforms);
        }, t;
      }();
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * An immutable object representing an array of bytes.
       */


      function wa(t) {
        switch (t) {
          case 0
          /* Set */
          : // fall through

          case 2
          /* MergeSet */
          : // fall through

          case 1
          /* Update */
          :
            return !0;

          case 3
          /* Argument */
          :
          case 4
          /* ArrayArgument */
          :
            return !1;

          default:
            throw O();
        }
      }
      /** A "context" object passed around while parsing user data. */


      var ba =
      /** @class */
      function () {
        /**
         * Initializes a ParseContext with the given source and path.
         *
         * @param settings - The settings for the parser.
         * @param databaseId - The database ID of the Firestore instance.
         * @param serializer - The serializer to use to generate the Value proto.
         * @param ignoreUndefinedProperties - Whether to ignore undefined properties
         * rather than throw.
         * @param fieldTransforms - A mutable list of field transforms encountered
         * while parsing the data.
         * @param fieldMask - A mutable list of field paths encountered while parsing
         * the data.
         *
         * TODO(b/34871131): We don't support array paths right now, so path can be
         * null to indicate the context represents any location within an array (in
         * which case certain features will not work and errors will be somewhat
         * compromised).
         */
        function t(t, e, n, r, i, o) {
          this.settings = t, this.databaseId = e, this.R = n, this.ignoreUndefinedProperties = r, // Minor hack: If fieldTransforms is undefined, we assume this is an
          // external call and we need to validate the entire path.
          void 0 === i && this.Cc(), this.fieldTransforms = i || [], this.fieldMask = o || [];
        }

        return Object.defineProperty(t.prototype, "path", {
          get: function get() {
            return this.settings.path;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "Nc", {
          get: function get() {
            return this.settings.Nc;
          },
          enumerable: !1,
          configurable: !0
        }),
        /** Returns a new context with the specified settings overwritten. */
        t.prototype.xc = function (e) {
          return new t(Object.assign(Object.assign({}, this.settings), e), this.databaseId, this.R, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);
        }, t.prototype.kc = function (t) {
          var e,
              n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t),
              r = this.xc({
            path: n,
            Fc: !1
          });
          return r.$c(t), r;
        }, t.prototype.Oc = function (t) {
          var e,
              n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t),
              r = this.xc({
            path: n,
            Fc: !1
          });
          return r.Cc(), r;
        }, t.prototype.Mc = function (t) {
          // TODO(b/34871131): We don't support array paths right now; so make path
          // undefined.
          return this.xc({
            path: void 0,
            Fc: !0
          });
        }, t.prototype.Lc = function (t) {
          return Ua(t, this.settings.methodName, this.settings.Bc || !1, this.path, this.settings.qc);
        },
        /** Returns 'true' if 'fieldPath' was traversed when creating this context. */
        t.prototype.contains = function (t) {
          return void 0 !== this.fieldMask.find(function (e) {
            return t.isPrefixOf(e);
          }) || void 0 !== this.fieldTransforms.find(function (e) {
            return t.isPrefixOf(e.field);
          });
        }, t.prototype.Cc = function () {
          // TODO(b/34871131): Remove null check once we have proper paths for fields
          // within arrays.
          if (this.path) for (var t = 0; t < this.path.length; t++) {
            this.$c(this.path.get(t));
          }
        }, t.prototype.$c = function (t) {
          if (0 === t.length) throw this.Lc("Document fields must not be empty");
          if (wa(this.Nc) && va.test(t)) throw this.Lc('Document fields cannot begin and end with "__"');
        }, t;
      }(),
          Ia =
      /** @class */
      function () {
        function t(t, e, n) {
          this.databaseId = t, this.ignoreUndefinedProperties = e, this.R = n || Co(t)
          /** Creates a new top-level parse context. */
          ;
        }

        return t.prototype.Uc = function (t, e, n, r) {
          return void 0 === r && (r = !1), new ba({
            Nc: t,
            methodName: e,
            qc: n,
            path: $.emptyPath(),
            Fc: !1,
            Bc: r
          }, this.databaseId, this.R, this.ignoreUndefinedProperties);
        }, t;
      }();
      /**
       * Helper for parsing raw user input (provided via the API) into internal model
       * classes.
       */


      function Ta(t) {
        var e = t._freezeSettings(),
            n = Co(t._databaseId);

        return new Ia(t._databaseId, !!e.ignoreUndefinedProperties, n);
      }
      /** Parse document data from a set() call. */


      function Ea(t, e, n, r, i, o) {
        void 0 === o && (o = {});
        var s = t.Uc(o.merge || o.mergeFields ? 2
        /* MergeSet */
        : 0
        /* Set */
        , e, n, i);
        Fa("Data must be an object, but it was:", s, r);
        var u,
            a,
            c = Oa(r, s);
        if (o.merge) u = new X(s.fieldMask), a = s.fieldTransforms;else if (o.mergeFields) {
          for (var h = [], f = 0, l = o.mergeFields; f < l.length; f++) {
            var d = Ma(e, l[f], n);
            if (!s.contains(d)) throw new D(N.INVALID_ARGUMENT, "Field '" + d + "' is specified in your field mask but missing from your input data.");
            Ba(h, d) || h.push(d);
          }

          u = new X(h), a = s.fieldTransforms.filter(function (t) {
            return u.covers(t.field);
          });
        } else u = null, a = s.fieldTransforms;
        return new ma(new _t(c), u, a);
      }

      var _a =
      /** @class */
      function (e) {
        function n() {
          return null !== e && e.apply(this, arguments) || this;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype._toFieldTransform = function (t) {
          if (2
          /* MergeSet */
          !== t.Nc) throw 1
          /* Update */
          === t.Nc ? t.Lc(this._methodName + "() can only appear at the top level of your update data") : t.Lc(this._methodName + "() cannot be used with set() unless you pass {merge:true}"); // No transform to add for a delete, but we need to add it to our
          // fieldMask so it gets deleted.

          return t.fieldMask.push(t.path), null;
        }, n.prototype.isEqual = function (t) {
          return t instanceof n;
        }, n;
      }(pa);
      /**
       * Creates a child context for parsing SerializableFieldValues.
       *
       * This is different than calling `ParseContext.contextWith` because it keeps
       * the fieldTransforms and fieldMask separate.
       *
       * The created context has its `dataSource` set to `UserDataSource.Argument`.
       * Although these values are used with writes, any elements in these FieldValues
       * are not considered writes since they cannot contain any FieldValue sentinels,
       * etc.
       *
       * @param fieldValue - The sentinel FieldValue for which to create a child
       *     context.
       * @param context - The parent context.
       * @param arrayElement - Whether or not the FieldValue has an array.
       */


      function Sa(t, e, n) {
        return new ba({
          Nc: 3
          /* Argument */
          ,
          qc: e.settings.qc,
          methodName: t._methodName,
          Fc: n
        }, e.databaseId, e.R, e.ignoreUndefinedProperties);
      }

      var Na =
      /** @class */
      function (e) {
        function n() {
          return null !== e && e.apply(this, arguments) || this;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype._toFieldTransform = function (t) {
          return new Se(t.path, new me());
        }, n.prototype.isEqual = function (t) {
          return t instanceof n;
        }, n;
      }(pa),
          Da =
      /** @class */
      function (e) {
        function n(t, n) {
          var r = this;
          return (r = e.call(this, t) || this).Kc = n, r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype._toFieldTransform = function (t) {
          var e = Sa(this, t,
          /*array=*/
          !0),
              n = this.Kc.map(function (t) {
            return La(t, e);
          }),
              r = new ge(n);
          return new Se(t.path, r);
        }, n.prototype.isEqual = function (t) {
          // TODO(mrschmidt): Implement isEquals
          return this === t;
        }, n;
      }(pa),
          Aa =
      /** @class */
      function (e) {
        function n(t, n) {
          var r = this;
          return (r = e.call(this, t) || this).Kc = n, r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype._toFieldTransform = function (t) {
          var e = Sa(this, t,
          /*array=*/
          !0),
              n = this.Kc.map(function (t) {
            return La(t, e);
          }),
              r = new be(n);
          return new Se(t.path, r);
        }, n.prototype.isEqual = function (t) {
          // TODO(mrschmidt): Implement isEquals
          return this === t;
        }, n;
      }(pa),
          ka =
      /** @class */
      function (e) {
        function n(t, n) {
          var r = this;
          return (r = e.call(this, t) || this).Qc = n, r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype._toFieldTransform = function (t) {
          var e = new Te(t.R, le(t.R, this.Qc));
          return new Se(t.path, e);
        }, n.prototype.isEqual = function (t) {
          // TODO(mrschmidt): Implement isEquals
          return this === t;
        }, n;
      }(pa);
      /** Parse update data from an update() call. */


      function Ca(t, e, n, r) {
        var i = t.Uc(1
        /* Update */
        , e, n);
        Fa("Data must be an object, but it was:", i, r);

        var o = [],
            s = _t.empty();

        G(r, function (t, r) {
          var u = qa(e, t, n); // For Compat types, we have to "extract" the underlying types before
          // performing validation.

          r = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(r);
          var a = i.Oc(u);
          if (r instanceof _a) // Add it to the field mask, but don't add anything to updateData.
            o.push(u);else {
            var c = La(r, a);
            null != c && (o.push(u), s.set(u, c));
          }
        });
        var u = new X(o);
        return new ga(s, u, i.fieldTransforms);
      }
      /** Parse update data from a list of field/value arguments. */


      function xa(t, e, n, r, i, o) {
        var s = t.Uc(1
        /* Update */
        , e, n),
            u = [Ma(e, r, n)],
            a = [i];
        if (o.length % 2 != 0) throw new D(N.INVALID_ARGUMENT, "Function " + e + "() needs to be called with an even number of arguments that alternate between field names and values.");

        for (var c = 0; c < o.length; c += 2) {
          u.push(Ma(e, o[c])), a.push(o[c + 1]);
        } // We iterate in reverse order to pick the last value for a field if the
        // user specified the field multiple times.


        for (var h = [], f = _t.empty(), d = u.length - 1; d >= 0; --d) {
          if (!Ba(h, u[d])) {
            var p = u[d],
                y = a[d]; // For Compat types, we have to "extract" the underlying types before
            // performing validation.

            y = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(y);
            var v = s.Oc(p);
            if (y instanceof _a) // Add it to the field mask, but don't add anything to updateData.
              h.push(p);else {
              var m = La(y, v);
              null != m && (h.push(p), f.set(p, m));
            }
          }
        }

        var g = new X(h);
        return new ga(f, g, s.fieldTransforms);
      }
      /**
       * Parse a "query value" (e.g. value in a where filter or a value in a cursor
       * bound).
       *
       * @param allowArrays - Whether the query value is an array that may directly
       * contain additional arrays (e.g. the operand of an `in` query).
       */


      function Ra(t, e, n, r) {
        return void 0 === r && (r = !1), La(n, t.Uc(r ? 4
        /* ArrayArgument */
        : 3
        /* Argument */
        , e));
      }
      /**
       * Parses user data to Protobuf Values.
       *
       * @param input - Data to be parsed.
       * @param context - A context object representing the current path being parsed,
       * the source of the data being parsed, etc.
       * @returns The parsed value, or null if the value was a FieldValue sentinel
       * that should not be included in the resulting parsed data.
       */


      function La(t, e) {
        if (Pa( // Unwrap the API type from the Compat SDK. This will return the API type
        // from firestore-exp.
        t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(t))) return Fa("Unsupported field value:", e, t), Oa(t, e);
        if (t instanceof pa) // FieldValues usually parse into transforms (except FieldValue.delete())
          // in which case we do not want to include this field in our parsed data
          // (as doing so will overwrite the field directly prior to the transform
          // trying to transform it). So we don't add this location to
          // context.fieldMask and we return null as our parsing result.

          /**
           * "Parses" the provided FieldValueImpl, adding any necessary transforms to
           * context.fieldTransforms.
           */
          return function (t, e) {
            // Sentinels are only supported with writes, and not within arrays.
            if (!wa(e.Nc)) throw e.Lc(t._methodName + "() can only be used with update() and set()");
            if (!e.path) throw e.Lc(t._methodName + "() is not currently supported inside arrays");

            var n = t._toFieldTransform(e);

            n && e.fieldTransforms.push(n);
          }(t, e), null;
        if (void 0 === t && e.ignoreUndefinedProperties) // If the input is undefined it can never participate in the fieldMask, so
          // don't handle this below. If `ignoreUndefinedProperties` is false,
          // `parseScalarValue` will reject an undefined value.
          return null;

        if ( // If context.path is null we are inside an array and we don't support
        // field mask paths more granular than the top-level array.
        e.path && e.fieldMask.push(e.path), t instanceof Array) {
          // TODO(b/34871131): Include the path containing the array in the error
          // message.
          // In the case of IN queries, the parsed data is an array (representing
          // the set of values to be included for the IN query) that may directly
          // contain additional arrays (each representing an individual field
          // value), so we disable this validation.
          if (e.settings.Fc && 4
          /* ArrayArgument */
          !== e.Nc) throw e.Lc("Nested arrays are not supported");
          return function (t, e) {
            for (var n = [], r = 0, i = 0, o = t; i < o.length; i++) {
              var s = La(o[i], e.Mc(r));
              null == s && ( // Just include nulls in the array for fields being replaced with a
              // sentinel.
              s = {
                nullValue: "NULL_VALUE"
              }), n.push(s), r++;
            }

            return {
              arrayValue: {
                values: n
              }
            };
          }(t, e);
        }

        return function (t, e) {
          if (null === (t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(t))) return {
            nullValue: "NULL_VALUE"
          };
          if ("number" == typeof t) return le(e.R, t);
          if ("boolean" == typeof t) return {
            booleanValue: t
          };
          if ("string" == typeof t) return {
            stringValue: t
          };

          if (t instanceof Date) {
            var n = j.fromDate(t);
            return {
              timestampValue: In(e.R, n)
            };
          }

          if (t instanceof j) {
            // Firestore backend truncates precision down to microseconds. To ensure
            // offline mode works the same with regards to truncation, perform the
            // truncation immediately without waiting for the backend to do that.
            n = new j(t.seconds, 1e3 * Math.floor(t.nanoseconds / 1e3));
            return {
              timestampValue: In(e.R, n)
            };
          }

          if (t instanceof ya) return {
            geoPointValue: {
              latitude: t.latitude,
              longitude: t.longitude
            }
          };
          if (t instanceof da) return {
            bytesValue: Tn(e.R, t._byteString)
          };

          if (t instanceof $u) {
            n = e.databaseId;
            var r = t.firestore._databaseId;
            if (!r.isEqual(n)) throw e.Lc("Document reference is for database " + r.projectId + "/" + r.database + " but should be for database " + n.projectId + "/" + n.database);
            return {
              referenceValue: Sn(t.firestore._databaseId || e.databaseId, t._key.path)
            };
          }

          throw e.Lc("Unsupported field value: " + Gu(t));
        }(t, e);
      }

      function Oa(t, e) {
        var n = {};
        return z(t) ? // If we encounter an empty object, we explicitly add it to the update
        // mask to ensure that the server creates a map entry.
        e.path && e.path.length > 0 && e.fieldMask.push(e.path) : G(t, function (t, r) {
          var i = La(r, e.kc(t));
          null != i && (n[t] = i);
        }), {
          mapValue: {
            fields: n
          }
        };
      }

      function Pa(t) {
        return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof j || t instanceof ya || t instanceof da || t instanceof $u || t instanceof pa);
      }

      function Fa(t, e, n) {
        if (!Pa(n) || !function (t) {
          return "object" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));
        }(n)) {
          var r = Gu(n);
          throw "an object" === r ? e.Lc(t + " a custom object") : e.Lc(t + " " + r);
        }
      }
      /**
       * Helper that calls fromDotSeparatedString() but wraps any error thrown.
       */


      function Ma(t, e, n) {
        if ( // If required, replace the FieldPath Compat class with with the firestore-exp
        // FieldPath.
        (e = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(e)) instanceof la) return e._internalPath;
        if ("string" == typeof e) return qa(t, e);
        throw Ua("Field path arguments must be of type string or FieldPath.", t,
        /* hasConverter= */
        !1,
        /* path= */
        void 0, n);
      }
      /**
       * Matches any characters in a field path string that are reserved.
       */


      var Va = new RegExp("[~\\*/\\[\\]]");
      /**
       * Wraps fromDotSeparatedString with an error message about the method that
       * was thrown.
       * @param methodName - The publicly visible method name
       * @param path - The dot-separated string form of a field path which will be
       * split on dots.
       * @param targetDoc - The document against which the field path will be
       * evaluated.
       */

      function qa(t, n, r) {
        if (n.search(Va) >= 0) throw Ua("Invalid field path (" + n + "). Paths must not contain '~', '*', '/', '[', or ']'", t,
        /* hasConverter= */
        !1,
        /* path= */
        void 0, r);

        try {
          return new (la.bind.apply(la, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])([void 0], n.split("."))))()._internalPath;
        } catch (e) {
          throw Ua("Invalid field path (" + n + "). Paths must not be empty, begin with '.', end with '.', or contain '..'", t,
          /* hasConverter= */
          !1,
          /* path= */
          void 0, r);
        }
      }

      function Ua(t, e, n, r, i) {
        var o = r && !r.isEmpty(),
            s = void 0 !== i,
            u = "Function " + e + "() called with invalid data";
        n && (u += " (via `toFirestore()`)");
        var a = "";
        return (o || s) && (a += " (found", o && (a += " in field " + r), s && (a += " in document " + i), a += ")"), new D(N.INVALID_ARGUMENT, (u += ". ") + t + a)
        /** Checks `haystack` if FieldPath `needle` is present. Runs in O(n). */
        ;
      }

      function Ba(t, e) {
        return t.some(function (t) {
          return t.isEqual(e);
        });
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * A `DocumentSnapshot` contains data read from a document in your Firestore
       * database. The data can be extracted with `.data()` or `.get(<field>)` to
       * get a specific field.
       *
       * For a `DocumentSnapshot` that points to a non-existing document, any data
       * access will return 'undefined'. You can use the `exists()` method to
       * explicitly verify a document's existence.
       */


      var ja =
      /** @class */
      function () {
        // Note: This class is stripped down version of the DocumentSnapshot in
        // the legacy SDK. The changes are:
        // - No support for SnapshotMetadata.
        // - No support for SnapshotOptions.

        /** @hideconstructor protected */
        function t(t, e, n, r, i) {
          this._firestore = t, this._userDataWriter = e, this._key = n, this._document = r, this._converter = i;
        }

        return Object.defineProperty(t.prototype, "id", {
          /** Property of the `DocumentSnapshot` that provides the document's ID. */
          get: function get() {
            return this._key.path.lastSegment();
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "ref", {
          /**
           * The `DocumentReference` for the document included in the `DocumentSnapshot`.
           */
          get: function get() {
            return new $u(this._firestore, this._converter, this._key);
          },
          enumerable: !1,
          configurable: !0
        }),
        /**
         * Signals whether or not the document at the snapshot's location exists.
         *
         * @returns true if the document exists.
         */
        t.prototype.exists = function () {
          return null !== this._document;
        },
        /**
         * Retrieves all fields in the document as an `Object`. Returns `undefined` if
         * the document doesn't exist.
         *
         * @returns An `Object` containing all fields in the document or `undefined`
         * if the document doesn't exist.
         */
        t.prototype.data = function () {
          if (this._document) {
            if (this._converter) {
              // We only want to use the converter and create a new DocumentSnapshot
              // if a converter has been provided.
              var t = new Ka(this._firestore, this._userDataWriter, this._key, this._document,
              /* converter= */
              null);
              return this._converter.fromFirestore(t);
            }

            return this._userDataWriter.convertValue(this._document.data.value);
          }
        },
        /**
         * Retrieves the field specified by `fieldPath`. Returns `undefined` if the
         * document or field doesn't exist.
         *
         * @param fieldPath - The path (for example 'foo' or 'foo.bar') to a specific
         * field.
         * @returns The data at the specified field location or undefined if no such
         * field exists in the document.
         */
        // We are using `any` here to avoid an explicit cast by our users.
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        t.prototype.get = function (t) {
          if (this._document) {
            var e = this._document.data.field(Qa("DocumentSnapshot.get", t));

            if (null !== e) return this._userDataWriter.convertValue(e);
          }
        }, t;
      }(),
          Ka =
      /** @class */
      function (e) {
        function n() {
          return null !== e && e.apply(this, arguments) || this;
        }
        /**
         * Retrieves all fields in the document as an `Object`.
         *
         * @override
         * @returns An `Object` containing all fields in the document.
         */


        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.data = function () {
          return e.prototype.data.call(this);
        }, n;
      }(ja);
      /**
       * A `QueryDocumentSnapshot` contains data read from a document in your
       * Firestore database as part of a query. The document is guaranteed to exist
       * and its data can be extracted with `.data()` or `.get(<field>)` to get a
       * specific field.
       *
       * A `QueryDocumentSnapshot` offers the same API surface as a
       * `DocumentSnapshot`. Since query results contain only existing documents, the
       * `exists` property will always be true and `data()` will never return
       * 'undefined'.
       */

      /**
       * Helper that calls fromDotSeparatedString() but wraps any error thrown.
       */


      function Qa(t, e) {
        return "string" == typeof e ? qa(t, e) : e instanceof la ? e._internalPath : e._delegate._internalPath;
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Metadata about a snapshot, describing the state of the snapshot.
       */


      var Ga =
      /** @class */
      function () {
        /** @hideconstructor */
        function t(t, e) {
          this.hasPendingWrites = t, this.fromCache = e
          /**
          * Returns true if this `SnapshotMetadata` is equal to the provided one.
          *
          * @param other - The `SnapshotMetadata` to compare against.
          * @returns true if this `SnapshotMetadata` is equal to the provided one.
          */
          ;
        }

        return t.prototype.isEqual = function (t) {
          return this.hasPendingWrites === t.hasPendingWrites && this.fromCache === t.fromCache;
        }, t;
      }(),
          za =
      /** @class */
      function (e) {
        /** @hideconstructor protected */
        function n(t, n, r, i, o, s) {
          var u = this;
          return (u = e.call(this, t, n, r, i, s) || this)._firestore = t, u._firestoreImpl = t, u.metadata = o, u;
        }
        /**
         * Property of the `DocumentSnapshot` that signals whether or not the data
         * exists. True if the document exists.
         */


        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.exists = function () {
          return e.prototype.exists.call(this);
        },
        /**
         * Retrieves all fields in the document as an `Object`. Returns `undefined` if
         * the document doesn't exist.
         *
         * By default, `FieldValue.serverTimestamp()` values that have not yet been
         * set to their final value will be returned as `null`. You can override
         * this by passing an options object.
         *
         * @param options - An options object to configure how data is retrieved from
         * the snapshot (for example the desired behavior for server timestamps that
         * have not yet been set to their final value).
         * @returns An `Object` containing all fields in the document or `undefined` if
         * the document doesn't exist.
         */
        n.prototype.data = function (t) {
          if (void 0 === t && (t = {}), this._document) {
            if (this._converter) {
              // We only want to use the converter and create a new DocumentSnapshot
              // if a converter has been provided.
              var e = new Wa(this._firestore, this._userDataWriter, this._key, this._document, this.metadata,
              /* converter= */
              null);
              return this._converter.fromFirestore(e, t);
            }

            return this._userDataWriter.convertValue(this._document.data.value, t.serverTimestamps);
          }
        },
        /**
         * Retrieves the field specified by `fieldPath`. Returns `undefined` if the
         * document or field doesn't exist.
         *
         * By default, a `FieldValue.serverTimestamp()` that has not yet been set to
         * its final value will be returned as `null`. You can override this by
         * passing an options object.
         *
         * @param fieldPath - The path (for example 'foo' or 'foo.bar') to a specific
         * field.
         * @param options - An options object to configure how the field is retrieved
         * from the snapshot (for example the desired behavior for server timestamps
         * that have not yet been set to their final value).
         * @returns The data at the specified field location or undefined if no such
         * field exists in the document.
         */
        // We are using `any` here to avoid an explicit cast by our users.
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        n.prototype.get = function (t, e) {
          if (void 0 === e && (e = {}), this._document) {
            var n = this._document.data.field(Qa("DocumentSnapshot.get", t));

            if (null !== n) return this._userDataWriter.convertValue(n, e.serverTimestamps);
          }
        }, n;
      }(ja),
          Wa =
      /** @class */
      function (e) {
        function n() {
          return null !== e && e.apply(this, arguments) || this;
        }
        /**
         * Retrieves all fields in the document as an `Object`.
         *
         * By default, `FieldValue.serverTimestamp()` values that have not yet been
         * set to their final value will be returned as `null`. You can override
         * this by passing an options object.
         *
         * @override
         * @param options - An options object to configure how data is retrieved from
         * the snapshot (for example the desired behavior for server timestamps that
         * have not yet been set to their final value).
         * @returns An `Object` containing all fields in the document.
         */


        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.data = function (t) {
          return void 0 === t && (t = {}), e.prototype.data.call(this, t);
        }, n;
      }(za),
          Ha =
      /** @class */
      function () {
        /** @hideconstructor */
        function t(t, e, n, r) {
          this._firestore = t, this._userDataWriter = e, this._snapshot = r, this.metadata = new Ga(r.hasPendingWrites, r.fromCache), this.query = n;
        }

        return Object.defineProperty(t.prototype, "docs", {
          /** An array of all the documents in the `QuerySnapshot`. */
          get: function get() {
            var t = [];
            return this.forEach(function (e) {
              return t.push(e);
            }), t;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "size", {
          /** The number of documents in the `QuerySnapshot`. */
          get: function get() {
            return this._snapshot.docs.size;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "empty", {
          /** True if there are no documents in the `QuerySnapshot`. */
          get: function get() {
            return 0 === this.size;
          },
          enumerable: !1,
          configurable: !0
        }),
        /**
         * Enumerates all of the documents in the `QuerySnapshot`.
         *
         * @param callback - A callback to be called with a `QueryDocumentSnapshot` for
         * each document in the snapshot.
         * @param thisArg - The `this` binding for the callback.
         */
        t.prototype.forEach = function (t, e) {
          var n = this;

          this._snapshot.docs.forEach(function (r) {
            t.call(e, new Wa(n._firestore, n._userDataWriter, r.key, r, new Ga(n._snapshot.mutatedKeys.has(r.key), n._snapshot.fromCache), n.query.converter));
          });
        },
        /**
         * Returns an array of the documents changes since the last snapshot. If this
         * is the first snapshot, all documents will be in the list as 'added'
         * changes.
         *
         * @param options - `SnapshotListenOptions` that control whether metadata-only
         * changes (i.e. only `DocumentSnapshot.metadata` changed) should trigger
         * snapshot events.
         */
        t.prototype.docChanges = function (t) {
          void 0 === t && (t = {});
          var e = !!t.includeMetadataChanges;
          if (e && this._snapshot.excludesMetadataChanges) throw new D(N.INVALID_ARGUMENT, "To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");
          return this._cachedChanges && this._cachedChangesIncludeMetadataChanges === e || (this._cachedChanges =
          /** Calculates the array of DocumentChanges for a given ViewSnapshot. */
          function (t, e) {
            if (t._snapshot.oldDocs.isEmpty()) {
              var n = 0;
              return t._snapshot.docChanges.map(function (e) {
                return {
                  type: "added",
                  doc: new Wa(t._firestore, t._userDataWriter, e.doc.key, e.doc, new Ga(t._snapshot.mutatedKeys.has(e.doc.key), t._snapshot.fromCache), t.query.converter),
                  oldIndex: -1,
                  newIndex: n++
                };
              });
            } // A DocumentSet that is updated incrementally as changes are applied to use
            // to lookup the index of a document.


            var r = t._snapshot.oldDocs;
            return t._snapshot.docChanges.filter(function (t) {
              return e || 3
              /* Metadata */
              !== t.type;
            }).map(function (e) {
              var n = new Wa(t._firestore, t._userDataWriter, e.doc.key, e.doc, new Ga(t._snapshot.mutatedKeys.has(e.doc.key), t._snapshot.fromCache), t.query.converter),
                  i = -1,
                  o = -1;
              return 0
              /* Added */
              !== e.type && (i = r.indexOf(e.doc.key), r = r["delete"](e.doc.key)), 1
              /* Removed */
              !== e.type && (o = (r = r.add(e.doc)).indexOf(e.doc.key)), {
                type: Ya(e.type),
                doc: n,
                oldIndex: i,
                newIndex: o
              };
            });
          }(this, e), this._cachedChangesIncludeMetadataChanges = e), this._cachedChanges;
        }, t;
      }();
      /**
       * A `DocumentSnapshot` contains data read from a document in your Firestore
       * database. The data can be extracted with `.data()` or `.get(<field>)` to
       * get a specific field.
       *
       * For a `DocumentSnapshot` that points to a non-existing document, any data
       * access will return 'undefined'. You can use the `exists()` method to
       * explicitly verify a document's existence.
       */


      function Ya(t) {
        switch (t) {
          case 0
          /* Added */
          :
            return "added";

          case 2
          /* Modified */
          :
          case 3
          /* Metadata */
          :
            return "modified";

          case 1
          /* Removed */
          :
            return "removed";

          default:
            return O();
        }
      } // TODO(firestoreexp): Add tests for snapshotEqual with different snapshot
      // metadata

      /**
       * Returns true if the provided snapshots are equal.
       *
       * @param left - A snapshot to compare.
       * @param right - A snapshot to compare.
       * @returns true if the snapshots are equal.
       */


      function $a(t, e) {
        return t instanceof za && e instanceof za ? t._firestore === e._firestore && t._key.isEqual(e._key) && (null === t._document ? null === e._document : t._document.isEqual(e._document)) && t._converter === e._converter : t instanceof Ha && e instanceof Ha && t._firestore === e._firestore && na(t.query, e.query) && t.metadata.isEqual(e.metadata) && t._snapshot.isEqual(e._snapshot);
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      function Xa(t) {
        if (Xt(t) && 0 === t.explicitOrderBy.length) throw new D(N.UNIMPLEMENTED, "limitToLast() queries require specifying at least one orderBy() clause");
      }
      /**
       * A `QueryConstraint` is used to narrow the set of documents returned by a
       * Firestore query. `QueryConstraint`s are created by invoking {@link where},
       * {@link orderBy}, {@link (startAt:1)}, {@link (startAfter:1)}, {@link
       * endBefore:1}, {@link (endAt:1)}, {@link limit} or {@link limitToLast} and
       * can then be passed to {@link query} to create a new query instance that
       * also contains this `QueryConstraint`.
       */


      var Ja = function Ja() {};
      /**
       * Creates a new immutable instance of `Query` that is extended to also include
       * additional query constraints.
       *
       * @param query - The Query instance to use as a base for the new constraints.
       * @param queryConstraints - The list of `QueryConstraint`s to apply.
       * @throws if any of the provided query constraints cannot be combined with the
       * existing or new constraints.
       */


      function Za(t) {
        for (var e = [], n = 1; n < arguments.length; n++) {
          e[n - 1] = arguments[n];
        }

        for (var r = 0, i = e; r < i.length; r++) {
          var o = i[r];
          t = o._apply(t);
        }

        return t;
      }

      var tc =
      /** @class */
      function (e) {
        function n(t, n, r) {
          var i = this;
          return (i = e.call(this) || this).jc = t, i.Wc = n, i.Gc = r, i.type = "where", i;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype._apply = function (t) {
          var e = Ta(t.firestore),
              n = function (t, e, n, r, i, o, s) {
            var u;

            if (i.isKeyField()) {
              if ("array-contains"
              /* ARRAY_CONTAINS */
              === o || "array-contains-any"
              /* ARRAY_CONTAINS_ANY */
              === o) throw new D(N.INVALID_ARGUMENT, "Invalid Query. You can't perform '" + o + "' queries on FieldPath.documentId().");

              if ("in"
              /* IN */
              === o || "not-in"
              /* NOT_IN */
              === o) {
                uc(s, o);

                for (var a = [], c = 0, h = s; c < h.length; c++) {
                  var f = h[c];
                  a.push(sc(r, t, f));
                }

                u = {
                  arrayValue: {
                    values: a
                  }
                };
              } else u = sc(r, t, s);
            } else "in"
            /* IN */
            !== o && "not-in"
            /* NOT_IN */
            !== o && "array-contains-any"
            /* ARRAY_CONTAINS_ANY */
            !== o || uc(s, o), u = Ra(n, "where", s,
            /* allowArrays= */
            "in"
            /* IN */
            === o || "not-in"
            /* NOT_IN */
            === o);

            var l = Rt.create(i, o, u);
            return function (t, e) {
              if (e.g()) {
                var n = Zt(t);
                if (null !== n && !n.isEqual(e.field)) throw new D(N.INVALID_ARGUMENT, "Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '" + n.toString() + "' and '" + e.field.toString() + "'");
                var r = Jt(t);
                null !== r && ac(t, e.field, r);
              }

              var i = function (t, e) {
                for (var n = 0, r = t.filters; n < r.length; n++) {
                  var i = r[n];
                  if (e.indexOf(i.op) >= 0) return i.op;
                }

                return null;
              }(t,
              /**
              * Given an operator, returns the set of operators that cannot be used with it.
              *
              * Operators in a query must adhere to the following set of rules:
              * 1. Only one array operator is allowed.
              * 2. Only one disjunctive operator is allowed.
              * 3. NOT_EQUAL cannot be used with another NOT_EQUAL operator.
              * 4. NOT_IN cannot be used with array, disjunctive, or NOT_EQUAL operators.
              *
              * Array operators: ARRAY_CONTAINS, ARRAY_CONTAINS_ANY
              * Disjunctive operators: IN, ARRAY_CONTAINS_ANY, NOT_IN
              */
              function (t) {
                switch (t) {
                  case "!="
                  /* NOT_EQUAL */
                  :
                    return ["!="
                    /* NOT_EQUAL */
                    , "not-in"
                    /* NOT_IN */
                    ];

                  case "array-contains"
                  /* ARRAY_CONTAINS */
                  :
                    return ["array-contains"
                    /* ARRAY_CONTAINS */
                    , "array-contains-any"
                    /* ARRAY_CONTAINS_ANY */
                    , "not-in"
                    /* NOT_IN */
                    ];

                  case "in"
                  /* IN */
                  :
                    return ["array-contains-any"
                    /* ARRAY_CONTAINS_ANY */
                    , "in"
                    /* IN */
                    , "not-in"
                    /* NOT_IN */
                    ];

                  case "array-contains-any"
                  /* ARRAY_CONTAINS_ANY */
                  :
                    return ["array-contains"
                    /* ARRAY_CONTAINS */
                    , "array-contains-any"
                    /* ARRAY_CONTAINS_ANY */
                    , "in"
                    /* IN */
                    , "not-in"
                    /* NOT_IN */
                    ];

                  case "not-in"
                  /* NOT_IN */
                  :
                    return ["array-contains"
                    /* ARRAY_CONTAINS */
                    , "array-contains-any"
                    /* ARRAY_CONTAINS_ANY */
                    , "in"
                    /* IN */
                    , "not-in"
                    /* NOT_IN */
                    , "!="
                    /* NOT_EQUAL */
                    ];

                  default:
                    return [];
                }
              }(e.op));

              if (null !== i) // Special case when it's a duplicate op to give a slightly clearer error message.
                throw i === e.op ? new D(N.INVALID_ARGUMENT, "Invalid query. You cannot use more than one '" + e.op.toString() + "' filter.") : new D(N.INVALID_ARGUMENT, "Invalid query. You cannot use '" + e.op.toString() + "' filters with '" + i.toString() + "' filters.");
            }(t, l), l;
          }(t._query, 0, e, t.firestore._databaseId, this.jc, this.Wc, this.Gc);

          return new Xu(t.firestore, t.converter, function (t, e) {
            var n = t.filters.concat([e]);
            return new Wt(t.path, t.collectionGroup, t.explicitOrderBy.slice(), n, t.limit, t.limitType, t.startAt, t.endAt);
          }(t._query, n));
        }, n;
      }(Ja),
          ec =
      /** @class */
      function (e) {
        function n(t, n) {
          var r = this;
          return (r = e.call(this) || this).jc = t, r.zc = n, r.type = "orderBy", r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype._apply = function (t) {
          var e = function (t, e, n) {
            if (null !== t.startAt) throw new D(N.INVALID_ARGUMENT, "Invalid query. You must not call startAt() or startAfter() before calling orderBy().");
            if (null !== t.endAt) throw new D(N.INVALID_ARGUMENT, "Invalid query. You must not call endAt() or endBefore() before calling orderBy().");
            var r = new Kt(e, n);
            return function (t, e) {
              if (null === Jt(t)) {
                // This is the first order by. It must match any inequality.
                var n = Zt(t);
                null !== n && ac(t, n, e.field);
              }
            }(t, r), r;
          }(t._query, this.jc, this.zc);

          return new Xu(t.firestore, t.converter, function (t, e) {
            // TODO(dimond): validate that orderBy does not list the same key twice.
            var n = t.explicitOrderBy.concat([e]);
            return new Wt(t.path, t.collectionGroup, n, t.filters.slice(), t.limit, t.limitType, t.startAt, t.endAt);
          }(t._query, e));
        }, n;
      }(Ja),
          nc =
      /** @class */
      function (e) {
        function n(t, n, r) {
          var i = this;
          return (i = e.call(this) || this).type = t, i.Hc = n, i.Jc = r, i;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype._apply = function (t) {
          return new Xu(t.firestore, t.converter, re(t._query, this.Hc, this.Jc));
        }, n;
      }(Ja),
          rc =
      /** @class */
      function (e) {
        function n(t, n, r) {
          var i = this;
          return (i = e.call(this) || this).type = t, i.Yc = n, i.Xc = r, i;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype._apply = function (t) {
          var e = oc(t, this.type, this.Yc, this.Xc);
          return new Xu(t.firestore, t.converter, function (t, e) {
            return new Wt(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
          }(t._query, e));
        }, n;
      }(Ja),
          ic =
      /** @class */
      function (e) {
        function n(t, n, r) {
          var i = this;
          return (i = e.call(this) || this).type = t, i.Yc = n, i.Xc = r, i;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype._apply = function (t) {
          var e = oc(t, this.type, this.Yc, this.Xc);
          return new Xu(t.firestore, t.converter, function (t, e) {
            return new Wt(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
          }(t._query, e));
        }, n;
      }(Ja);
      /**
       * Creates a `QueryConstraint` that enforces that documents must contain the
       * specified field and that the value should satisfy the relation constraint
       * provided.
       *
       * @param fieldPath - The path to compare
       * @param opStr - The operation string (e.g "&lt;", "&lt;=", "==", "&lt;",
       *   "&lt;=", "!=").
       * @param value - The value for comparison
       * @returns The created `Query`.
       */

      /** Helper function to create a bound from a document or fields */


      function oc(t, e, n, r) {
        if (n[0] = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(n[0]), n[0] instanceof ja) return function (t, e, n, r, i) {
          if (!r) throw new D(N.NOT_FOUND, "Can't use a DocumentSnapshot that doesn't exist for " + n + "()."); // Because people expect to continue/end a query at the exact document
          // provided, we need to use the implicit sort order rather than the explicit
          // sort order, because it's guaranteed to contain the document key. That way
          // the position becomes unambiguous and the query continues/ends exactly at
          // the provided document. Without the key (by using the explicit sort
          // orders), multiple documents could match the position, yielding duplicate
          // results.

          for (var o = [], s = 0, u = ee(t); s < u.length; s++) {
            var a = u[s];
            if (a.field.isKeyField()) o.push(mt(e, r.key));else {
              var c = r.data.field(a.field);
              if (rt(c)) throw new D(N.INVALID_ARGUMENT, 'Invalid query. You are trying to start or end a query using a document for which the field "' + a.field + '" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');

              if (null === c) {
                var h = a.field.canonicalString();
                throw new D(N.INVALID_ARGUMENT, "Invalid query. You are trying to start or end a query using a document for which the field '" + h + "' (used as the orderBy) does not exist.");
              }

              o.push(c);
            }
          }

          return new Bt(o, i);
        }(t._query, t.firestore._databaseId, e, n[0]._document, r);
        var i = Ta(t.firestore);
        return function (t, e, n, r, i, o) {
          // Use explicit order by's because it has to match the query the user made
          var s = t.explicitOrderBy;
          if (i.length > s.length) throw new D(N.INVALID_ARGUMENT, "Too many arguments provided to " + r + "(). The number of arguments must be less than or equal to the number of orderBy() clauses");

          for (var u = [], a = 0; a < i.length; a++) {
            var c = i[a];

            if (s[a].field.isKeyField()) {
              if ("string" != typeof c) throw new D(N.INVALID_ARGUMENT, "Invalid query. Expected a string for document ID in " + r + "(), but got a " + typeof c);
              if (!te(t) && -1 !== c.indexOf("/")) throw new D(N.INVALID_ARGUMENT, "Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to " + r + "() must be a plain document ID, but '" + c + "' contains a slash.");
              var h = t.path.child(H.fromString(c));
              if (!ct.isDocumentKey(h)) throw new D(N.INVALID_ARGUMENT, "Invalid query. When querying a collection group and ordering by FieldPath.documentId(), the value passed to " + r + "() must result in a valid document path, but '" + h + "' is not because it contains an odd number of segments.");
              var f = new ct(h);
              u.push(mt(e, f));
            } else {
              var l = Ra(n, r, c);
              u.push(l);
            }
          }

          return new Bt(u, o);
        }(t._query, t.firestore._databaseId, i, e, n, r);
      }

      function sc(t, e, n) {
        if ("string" == typeof (n = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(n))) {
          if ("" === n) throw new D(N.INVALID_ARGUMENT, "Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");
          if (!te(e) && -1 !== n.indexOf("/")) throw new D(N.INVALID_ARGUMENT, "Invalid query. When querying a collection by FieldPath.documentId(), you must provide a plain document ID, but '" + n + "' contains a '/' character.");
          var r = e.path.child(H.fromString(n));
          if (!ct.isDocumentKey(r)) throw new D(N.INVALID_ARGUMENT, "Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but '" + r + "' is not because it has an odd number of segments (" + r.length + ").");
          return mt(t, new ct(r));
        }

        if (n instanceof $u) return mt(t, n._key);
        throw new D(N.INVALID_ARGUMENT, "Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: " + Gu(n) + ".");
      }
      /**
       * Validates that the value passed into a disjunctive filter satisfies all
       * array requirements.
       */


      function uc(t, e) {
        if (!Array.isArray(t) || 0 === t.length) throw new D(N.INVALID_ARGUMENT, "Invalid Query. A non-empty array is required for '" + e.toString() + "' filters.");
        if (t.length > 10) throw new D(N.INVALID_ARGUMENT, "Invalid Query. '" + e.toString() + "' filters support a maximum of 10 elements in the value array.");
      }

      function ac(t, e, n) {
        if (!n.isEqual(e)) throw new D(N.INVALID_ARGUMENT, "Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '" + e.toString() + "' and so you must also use '" + e.toString() + "' as your first argument to orderBy(), but your first orderBy() is on field '" + n.toString() + "' instead.");
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Converts Firestore's internal types to the JavaScript types that we expose
       * to the user.
       *
       * @internal
       */


      var cc =
      /** @class */
      function () {
        function t() {}

        return t.prototype.convertValue = function (t, e) {
          switch (void 0 === e && (e = "none"), ht(t)) {
            case 0
            /* NullValue */
            :
              return null;

            case 1
            /* BooleanValue */
            :
              return t.booleanValue;

            case 2
            /* NumberValue */
            :
              return et(t.integerValue || t.doubleValue);

            case 3
            /* TimestampValue */
            :
              return this.convertTimestamp(t.timestampValue);

            case 4
            /* ServerTimestampValue */
            :
              return this.convertServerTimestamp(t, e);

            case 5
            /* StringValue */
            :
              return t.stringValue;

            case 6
            /* BlobValue */
            :
              return this.convertBytes(nt(t.bytesValue));

            case 7
            /* RefValue */
            :
              return this.convertReference(t.referenceValue);

            case 8
            /* GeoPointValue */
            :
              return this.convertGeoPoint(t.geoPointValue);

            case 9
            /* ArrayValue */
            :
              return this.convertArray(t.arrayValue, e);

            case 10
            /* ObjectValue */
            :
              return this.convertObject(t.mapValue, e);

            default:
              throw O();
          }
        }, t.prototype.convertObject = function (t, e) {
          var n = this,
              r = {};
          return G(t.fields, function (t, i) {
            r[t] = n.convertValue(i, e);
          }), r;
        }, t.prototype.convertGeoPoint = function (t) {
          return new ya(et(t.latitude), et(t.longitude));
        }, t.prototype.convertArray = function (t, e) {
          var n = this;
          return (t.values || []).map(function (t) {
            return n.convertValue(t, e);
          });
        }, t.prototype.convertServerTimestamp = function (t, e) {
          switch (e) {
            case "previous":
              var n = it(t);
              return null == n ? null : this.convertValue(n, e);

            case "estimate":
              return this.convertTimestamp(ot(t));

            default:
              return null;
          }
        }, t.prototype.convertTimestamp = function (t) {
          var e = tt(t);
          return new j(e.seconds, e.nanos);
        }, t.prototype.convertDocumentKey = function (t, e) {
          var n = H.fromString(t);
          P($n(n));
          var r = new Ru(n.get(1), n.get(3)),
              i = new ct(n.popFirst(5));
          return r.isEqual(e) || // TODO(b/64130202): Somehow support foreign references.
          x("Document " + i + " contains a document reference within a different database (" + r.projectId + "/" + r.database + ") which is not supported. It will be treated as a reference in the current database (" + e.projectId + "/" + e.database + ") instead."), i;
        }, t;
      }();
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Converts custom model object of type T into DocumentData by applying the
       * converter if it exists.
       *
       * This function is used when converting user objects to DocumentData
       * because we want to provide the user with a more specific error message if
       * their set() or fails due to invalid data originating from a toFirestore()
       * call.
       */


      function hc(t, e, n) {
        // Cast to `any` in order to satisfy the union type constraint on
        // toFirestore().
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        return t ? n && (n.merge || n.mergeFields) ? t.toFirestore(e, n) : t.toFirestore(e) : e;
      }

      var fc =
      /** @class */
      function (e) {
        function n(t) {
          var n = this;
          return (n = e.call(this) || this).firestore = t, n;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.convertBytes = function (t) {
          return new da(t);
        }, n.prototype.convertReference = function (t) {
          var e = this.convertDocumentKey(t, this.firestore._databaseId);
          return new $u(this.firestore,
          /* converter= */
          null, e);
        }, n;
      }(cc),
          lc =
      /** @class */
      function () {
        /** @hideconstructor */
        function t(t, e) {
          this._firestore = t, this._commitHandler = e, this._mutations = [], this._committed = !1, this._dataReader = Ta(t);
        }

        return t.prototype.set = function (t, e, n) {
          this._verifyNotCommitted();

          var r = dc(t, this._firestore),
              i = hc(r.converter, e, n),
              o = Ea(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
          return this._mutations.push(o.toMutation(r._key, De.none())), this;
        }, t.prototype.update = function (t, e, n) {
          for (var r = [], i = 3; i < arguments.length; i++) {
            r[i - 3] = arguments[i];
          }

          this._verifyNotCommitted();

          var o,
              s = dc(t, this._firestore); // For Compat types, we have to "extract" the underlying types before
          // performing validation.

          return o = "string" == typeof (e = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(e)) || e instanceof la ? xa(this._dataReader, "WriteBatch.update", s._key, e, n, r) : Ca(this._dataReader, "WriteBatch.update", s._key, e), this._mutations.push(o.toMutation(s._key, De.exists(!0))), this;
        },
        /**
         * Deletes the document referred to by the provided {@link DocumentReference}.
         *
         * @param documentRef - A reference to the document to be deleted.
         * @returns This `WriteBatch` instance. Used for chaining method calls.
         */
        t.prototype["delete"] = function (t) {
          this._verifyNotCommitted();

          var e = dc(t, this._firestore);
          return this._mutations = this._mutations.concat(new je(e._key, De.none())), this;
        },
        /**
         * Commits all of the writes in this write batch as a single atomic unit.
         *
         * The result of these writes will only be reflected in document reads that
         * occur after the returned Promise resolves. If the client is offline, the
         * write fails. If you would like to see local modifications or buffer writes
         * until the client is online, use the full Firestore SDK.
         *
         * @returns A Promise resolved once all of the writes in the batch have been
         * successfully written to the backend as an atomic unit (note that it won't
         * resolve while you're offline).
         */
        t.prototype.commit = function () {
          return this._verifyNotCommitted(), this._committed = !0, this._mutations.length > 0 ? this._commitHandler(this._mutations) : Promise.resolve();
        }, t.prototype._verifyNotCommitted = function () {
          if (this._committed) throw new D(N.FAILED_PRECONDITION, "A write batch can no longer be used after commit() has been called.");
        }, t;
      }();
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * A write batch, used to perform multiple writes as a single atomic unit.
       *
       * A `WriteBatch` object can be acquired by calling {@link writeBatch}. It
       * provides methods for adding writes to the write batch. None of the writes
       * will be committed (or visible locally) until {@link WriteBatch.commit} is
       * called.
       */


      function dc(t, e) {
        if ((t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(t)).firestore !== e) throw new D(N.INVALID_ARGUMENT, "Provided document reference is from a different Firestore instance.");
        return t;
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */
      // TODO(mrschmidt) Consider using `BaseTransaction` as the base class in the
      // legacy SDK.

      /**
       * A reference to a transaction.
       *
       * The `Transaction` object passed to a transaction's `updateFunction` provides
       * the methods to read and write data within the transaction context. See
       * {@link runTransaction}.
       */


      var pc =
      /** @class */
      function (e) {
        function n(t) {
          var n = this;
          return (n = e.call(this) || this).firestore = t, n;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.convertBytes = function (t) {
          return new da(t);
        }, n.prototype.convertReference = function (t) {
          var e = this.convertDocumentKey(t, this.firestore._databaseId);
          return new $u(this.firestore,
          /* converter= */
          null, e);
        }, n;
      }(cc);
      /**
       * Reads the document referred to by this `DocumentReference` from cache.
       * Returns an error if the document is not currently cached.
       *
       * @returns A Promise resolved with a `DocumentSnapshot` containing the
       * current document contents.
       */


      function yc(t, e, n) {
        for (var r = [], i = 3; i < arguments.length; i++) {
          r[i - 3] = arguments[i];
        }

        t = zu(t, $u);
        var o = zu(t.firestore, ua),
            s = Ta(o);
        return mc(o, [("string" == typeof ( // For Compat types, we have to "extract" the underlying types before
        // performing validation.
        e = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(e)) || e instanceof la ? xa(s, "updateDoc", t._key, e, n, r) : Ca(s, "updateDoc", t._key, e)).toMutation(t._key, De.exists(!0))]);
      }
      /**
       * Deletes the document referred to by the specified `DocumentReference`.
       *
       * @param reference - A reference to the document to delete.
       * @returns A Promise resolved once the document has been successfully
       * deleted from the backend (note that it won't resolve while you're offline).
       */


      function vc(t) {
        for (var e, i, o, s = [], u = 1; u < arguments.length; u++) {
          s[u - 1] = arguments[u];
        }

        t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(t);
        var a = {
          includeMetadataChanges: !1
        },
            c = 0;
        "object" != typeof s[c] || ia(s[c]) || (a = s[c], c++);
        var h,
            f,
            d,
            p = {
          includeMetadataChanges: a.includeMetadataChanges
        };

        if (ia(s[c])) {
          var y = s[c];
          s[c] = null === (e = y.next) || void 0 === e ? void 0 : e.bind(y), s[c + 1] = null === (i = y.error) || void 0 === i ? void 0 : i.bind(y), s[c + 2] = null === (o = y.complete) || void 0 === o ? void 0 : o.bind(y);
        }

        if (t instanceof $u) f = zu(t.firestore, ua), d = Yt(t._key.path), h = {
          next: function next(e) {
            s[c] && s[c](gc(f, t, e));
          },
          error: s[c + 1],
          complete: s[c + 2]
        };else {
          var v = zu(t, Xu);
          f = zu(v.firestore, ua), d = v._query;
          var m = new pc(f);
          h = {
            next: function next(t) {
              s[c] && s[c](new Ha(f, m, v, t));
            },
            error: s[c + 1],
            complete: s[c + 2]
          }, Xa(t._query);
        }
        return function (t, e, i, o) {
          var s = this,
              u = new yu(o),
              a = new Is(e, u, i);
          return t.asyncQueue.enqueueAndForget(function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(s, void 0, void 0, function () {
              var e;
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
                switch (n.label) {
                  case 0:
                    return e = vs, [4
                    /*yield*/
                    , Au(t)];

                  case 1:
                    return [2
                    /*return*/
                    , e.apply(void 0, [n.sent(), a])];
                }
              });
            });
          }), function () {
            u.Wo(), t.asyncQueue.enqueueAndForget(function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(s, void 0, void 0, function () {
                var e;
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
                  switch (n.label) {
                    case 0:
                      return e = ms, [4
                      /*yield*/
                      , Au(t)];

                    case 1:
                      return [2
                      /*return*/
                      , e.apply(void 0, [n.sent(), a])];
                  }
                });
              });
            });
          };
        }(aa(f), d, p, h);
      }
      /**
       * Locally writes `mutations` on the async queue.
       * @internal
       */


      function mc(t, e) {
        return function (t, e) {
          var i = this,
              o = new br();
          return t.asyncQueue.enqueueAndForget(function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(i, void 0, void 0, function () {
              var n;
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                switch (r.label) {
                  case 0:
                    return n = Ps, [4
                    /*yield*/
                    , Du(t)];

                  case 1:
                    return [2
                    /*return*/
                    , n.apply(void 0, [r.sent(), e, o])];
                }
              });
            });
          }), o.promise;
        }(aa(t), e);
      }
      /**
       * Converts a ViewSnapshot that contains the single document specified by `ref`
       * to a DocumentSnapshot.
       */


      function gc(t, e, n) {
        var r = n.docs.get(e._key),
            i = new pc(t);
        return new za(t, i, e._key, r, new Ga(n.hasPendingWrites, n.fromCache), e.converter);
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * A reference to a transaction.
       *
       * The `Transaction` object passed to a transaction's `updateFunction` provides
       * the methods to read and write data within the transaction context. See
       * {@link runTransaction}.
       */


      var wc =
      /** @class */
      function (e) {
        // This class implements the same logic as the Transaction API in the Lite SDK
        // but is subclassed in order to return its own DocumentSnapshot types.

        /** @hideconstructor */
        function n(t, n) {
          var r = this;
          return (r = e.call(this, t, n) || this)._firestore = t, r;
        }
        /**
         * Reads the document referenced by the provided {@link DocumentReference}.
         *
         * @param documentRef - A reference to the document to be read.
         * @returns A `DocumentSnapshot` with the read data.
         */


        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.get = function (t) {
          var n = this,
              r = dc(t, this._firestore),
              i = new pc(this._firestore);
          return e.prototype.get.call(this, t).then(function (t) {
            return new za(n._firestore, i, r._key, t._document, new Ga(
            /* hasPendingWrites= */
            !1,
            /* fromCache= */
            !1), r.converter);
          });
        }, n;
      }(
      /** @class */
      function () {
        /** @hideconstructor */
        function t(t, e) {
          this._firestore = t, this._transaction = e, this._dataReader = Ta(t)
          /**
          * Reads the document referenced by the provided {@link DocumentReference}.
          *
          * @param documentRef - A reference to the document to be read.
          * @returns A `DocumentSnapshot` with the read data.
          */
          ;
        }

        return t.prototype.get = function (t) {
          var e = this,
              n = dc(t, this._firestore),
              r = new fc(this._firestore);
          return this._transaction.lookup([n._key]).then(function (t) {
            if (!t || 1 !== t.length) return O();
            var i = t[0];
            if (i.isFoundDocument()) return new ja(e._firestore, r, i.key, i, n.converter);
            if (i.isNoDocument()) return new ja(e._firestore, r, n._key, null, n.converter);
            throw O();
          });
        }, t.prototype.set = function (t, e, n) {
          var r = dc(t, this._firestore),
              i = hc(r.converter, e, n),
              o = Ea(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
          return this._transaction.set(r._key, o), this;
        }, t.prototype.update = function (t, e, n) {
          for (var r = [], i = 3; i < arguments.length; i++) {
            r[i - 3] = arguments[i];
          }

          var o,
              s = dc(t, this._firestore); // For Compat types, we have to "extract" the underlying types before
          // performing validation.

          return o = "string" == typeof (e = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(e)) || e instanceof la ? xa(this._dataReader, "Transaction.update", s._key, e, n, r) : Ca(this._dataReader, "Transaction.update", s._key, e), this._transaction.update(s._key, o), this;
        },
        /**
         * Deletes the document referred to by the provided {@link DocumentReference}.
         *
         * @param documentRef - A reference to the document to be deleted.
         * @returns This `Transaction` instance. Used for chaining method calls.
         */
        t.prototype["delete"] = function (t) {
          var e = dc(t, this._firestore);
          return this._transaction["delete"](e._key), this;
        }, t;
      }());
      /**
       * Executes the given `updateFunction` and then attempts to commit the changes
       * applied within the transaction. If any document read within the transaction
       * has changed, Cloud Firestore retries the `updateFunction`. If it fails to
       * commit after 5 attempts, the transaction fails.
       *
       * The maximum number of writes allowed in a single transaction is 500.
       *
       * @param firestore - A reference to the Firestore database to run this
       * transaction against.
       * @param updateFunction - The function to execute within the transaction
       * context.
       * @returns If the transaction completed successfully or was explicitly aborted
       * (the `updateFunction` returned a failed promise), the promise returned by the
       * `updateFunction `is returned here. Otherwise, if the transaction failed, a
       * rejected promise with the corresponding failure error is returned.
       */

      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /** Helper function to assert Uint8Array is available at runtime. */


      function bc() {
        if ("undefined" == typeof Uint8Array) throw new D(N.UNIMPLEMENTED, "Uint8Arrays are not available in this environment.");
      }
      /** Helper function to assert Base64 functions are available at runtime. */


      function Ic() {
        if ("undefined" == typeof atob) throw new D(N.UNIMPLEMENTED, "Blobs are unavailable in Firestore in this environment.");
      }
      /** Immutable class holding a blob (binary data) */


      var Tc =
      /** @class */
      function () {
        function t(t) {
          this._delegate = t;
        }

        return t.fromBase64String = function (e) {
          return Ic(), new t(da.fromBase64String(e));
        }, t.fromUint8Array = function (e) {
          return bc(), new t(da.fromUint8Array(e));
        }, t.prototype.toBase64 = function () {
          return Ic(), this._delegate.toBase64();
        }, t.prototype.toUint8Array = function () {
          return bc(), this._delegate.toUint8Array();
        }, t.prototype.isEqual = function (t) {
          return this._delegate.isEqual(t._delegate);
        }, t.prototype.toString = function () {
          return "Blob(base64: " + this.toBase64() + ")";
        }, t;
      }(),
          Ec =
      /** @class */
      function () {
        function t() {}

        return t.prototype.enableIndexedDbPersistence = function (t, e) {
          return function (t, e) {
            fa(t = zu(t, ua));

            var n = aa(t),
                r = t._freezeSettings(),
                i = new du();

            return ha(n, i, new fu(i, r.cacheSizeBytes, null == e ? void 0 : e.forceOwnership));
          }(t._delegate, {
            forceOwnership: e
          });
        }, t.prototype.enableMultiTabIndexedDbPersistence = function (t) {
          return function (t) {
            fa(t = zu(t, ua));

            var e = aa(t),
                n = t._freezeSettings(),
                r = new du();

            return ha(e, r, new lu(r, n.cacheSizeBytes));
          }(t._delegate);
        }, t.prototype.clearIndexedDbPersistence = function (t) {
          return function (t) {
            var e = this;
            if (t._initialized && !t._terminated) throw new D(N.FAILED_PRECONDITION, "Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");
            var i = new br();
            return t._queue.enqueueAndForgetEvenWhileRestricted(function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(e, void 0, void 0, function () {
                var e;
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (o) {
                  switch (o.label) {
                    case 0:
                      return o.trys.push([0, 2,, 3]), [4
                      /*yield*/
                      , function (t) {
                        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
                          var e;
                          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
                            switch (n.label) {
                              case 0:
                                return Er.yt() ? (e = t + "main", [4
                                /*yield*/
                                , Er["delete"](e)]) : [2
                                /*return*/
                                , Promise.resolve()];

                              case 1:
                                return n.sent(), [2
                                /*return*/
                                ];
                            }
                          });
                        });
                      }(Oi(t._databaseId, t._persistenceKey))];

                    case 1:
                      return o.sent(), i.resolve(), [3
                      /*break*/
                      , 3];

                    case 2:
                      return e = o.sent(), i.reject(e), [3
                      /*break*/
                      , 3];

                    case 3:
                      return [2
                      /*return*/
                      ];
                  }
                });
              });
            }), i.promise
            /**
            * Waits until all currently pending writes for the active user have been
            * acknowledged by the backend.
            *
            * The returned Promise resolves immediately if there are no outstanding writes.
            * Otherwise, the Promise waits for all previously issued writes (including
            * those written in a previous app session), but it does not wait for writes
            * that were added after the function is called. If you want to wait for
            * additional writes, call `waitForPendingWrites()` again.
            *
            * Any outstanding `waitForPendingWrites()` Promises are rejected during user
            * changes.
            *
            * @returns A Promise which resolves when all currently pending writes have been
            * acknowledged by the backend.
            */
            ;
          }(t._delegate);
        }, t;
      }(),
          _c =
      /** @class */
      function () {
        function t(t, e, n) {
          var r = this;
          this._delegate = e, this.Zc = n, this.INTERNAL = {
            "delete": function _delete() {
              return r.terminate();
            }
          }, t instanceof Ru || (this.tu = t);
        }

        return Object.defineProperty(t.prototype, "_databaseId", {
          get: function get() {
            return this._delegate._databaseId;
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.settings = function (t) {
          var e = this._delegate._getSettings();

          t.merge || e.host === t.host || R("You are overriding the original host. If you did not intend to override your settings, use {merge: true}."), t.merge && // Remove the property from the settings once the merge is completed
          delete (t = Object.assign(Object.assign({}, e), t)).merge, this._delegate._setSettings(t);
        }, t.prototype.useEmulator = function (t, e, n) {
          void 0 === n && (n = {}), function (t, e, n, r) {
            var i;
            void 0 === r && (r = {});

            var o = (t = zu(t, Yu))._getSettings();

            if ("firestore.googleapis.com" !== o.host && o.host !== e && R("Host has been set in both settings() and useEmulator(), emulator host will be used"), t._setSettings(Object.assign(Object.assign({}, o), {
              host: e + ":" + n,
              ssl: !1
            })), r.mockUserToken) {
              var s, u;
              if ("string" == typeof r.mockUserToken) s = r.mockUserToken, u = fo.MOCK_USER;else {
                // Let createMockUserToken validate first (catches common mistakes like
                // invalid field "uid" and missing field "sub" / "user_id".)
                s = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["createMockUserToken"])(r.mockUserToken, null === (i = t._app) || void 0 === i ? void 0 : i.options.projectId);
                var a = r.mockUserToken.sub || r.mockUserToken.user_id;
                if (!a) throw new D(N.INVALID_ARGUMENT, "mockUserToken must contain 'sub' or 'user_id' field!");
                u = new fo(a);
              }
              t._credentials = new Fu(new Ou(s, u));
            }
          }(this._delegate, t, e, n);
        }, t.prototype.enableNetwork = function () {
          return function (t) {
            var e = this;
            return t.asyncQueue.enqueue(function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(e, void 0, void 0, function () {
                var e, n;
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                  switch (r.label) {
                    case 0:
                      return [4
                      /*yield*/
                      , _u(t)];

                    case 1:
                      return e = r.sent(), [4
                      /*yield*/
                      , Nu(t)];

                    case 2:
                      return n = r.sent(), [2
                      /*return*/
                      , (e.setNetworkEnabled(!0), function (t) {
                        var e = F(t);
                        return e.Or["delete"](0
                        /* UserDisabled */
                        ), Vo(e);
                      }(n))];
                  }
                });
              });
            });
          }
          /** Disables the network connection. Pending operations will not complete. */
          (aa(zu(this._delegate, ua)));
        }, t.prototype.disableNetwork = function () {
          return function (t) {
            var e = this;
            return t.asyncQueue.enqueue(function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(e, void 0, void 0, function () {
                var e, i;
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (o) {
                  switch (o.label) {
                    case 0:
                      return [4
                      /*yield*/
                      , _u(t)];

                    case 1:
                      return e = o.sent(), [4
                      /*yield*/
                      , Nu(t)];

                    case 2:
                      return i = o.sent(), [2
                      /*return*/
                      , (e.setNetworkEnabled(!1), function (t) {
                        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
                          var e;
                          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
                            switch (n.label) {
                              case 0:
                                return (e = F(t)).Or.add(0
                                /* UserDisabled */
                                ), [4
                                /*yield*/
                                , qo(e)];

                              case 1:
                                return n.sent(), // Set the OnlineState to Offline so get()s return from cache, etc.
                                e.Br.set("Offline"
                                /* Offline */
                                ), [2
                                /*return*/
                                ];
                            }
                          });
                        });
                      }(i))];
                  }
                });
              });
            });
          }
          /**
          * Returns a Promise that resolves when all writes that were pending at the time
          * this method was called received server acknowledgement. An acknowledgement
          * can be either acceptance or rejection.
          */
          (aa(zu(this._delegate, ua)));
        }, t.prototype.enablePersistence = function (t) {
          var e = !1,
              n = !1;
          return t && ju("synchronizeTabs", e = !!t.synchronizeTabs, "experimentalForceOwningTab", n = !!t.experimentalForceOwningTab), e ? this.Zc.enableMultiTabIndexedDbPersistence(this) : this.Zc.enableIndexedDbPersistence(this, n);
        }, t.prototype.clearPersistence = function () {
          return this.Zc.clearIndexedDbPersistence(this);
        }, t.prototype.terminate = function () {
          return this.tu && (this.tu._removeServiceInstance("firestore"), this.tu._removeServiceInstance("firestore-exp")), this._delegate._delete();
        }, t.prototype.waitForPendingWrites = function () {
          return function (t) {
            var e = this,
                i = new br();
            return t.asyncQueue.enqueueAndForget(function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(e, void 0, void 0, function () {
                var e;
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
                  switch (n.label) {
                    case 0:
                      return e = Bs, [4
                      /*yield*/
                      , Du(t)];

                    case 1:
                      return [2
                      /*return*/
                      , e.apply(void 0, [n.sent(), i])];
                  }
                });
              });
            }), i.promise;
          }(aa(zu(this._delegate, ua)));
        }, t.prototype.onSnapshotsInSync = function (t) {
          return function (t, e) {
            return function (t, e) {
              var i = this,
                  o = new yu(e);
              return t.asyncQueue.enqueueAndForget(function () {
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(i, void 0, void 0, function () {
                  var e;
                  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
                    switch (n.label) {
                      case 0:
                        return e = function e(t, _e2) {
                          F(t).Gr.add(_e2), // Immediately fire an initial event, indicating all existing listeners
                          // are in-sync.
                          _e2.next();
                        }, [4
                        /*yield*/
                        , Au(t)];

                      case 1:
                        return [2
                        /*return*/
                        , e.apply(void 0, [n.sent(), o])];
                    }
                  });
                });
              }), function () {
                o.Wo(), t.asyncQueue.enqueueAndForget(function () {
                  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(i, void 0, void 0, function () {
                    var e;
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
                      switch (n.label) {
                        case 0:
                          return e = function e(t, _e3) {
                            F(t).Gr["delete"](_e3);
                          }, [4
                          /*yield*/
                          , Au(t)];

                        case 1:
                          return [2
                          /*return*/
                          , e.apply(void 0, [n.sent(), o])];
                      }
                    });
                  });
                });
              }
              /**
              * Takes an updateFunction in which a set of reads and writes can be performed
              * atomically. In the updateFunction, the client can read and write values
              * using the supplied transaction object. After the updateFunction, all
              * changes will be committed. If a retryable error occurs (ex: some other
              * client has changed any of the data referenced), then the updateFunction
              * will be called again after a backoff. If the updateFunction still fails
              * after all retries, then the transaction will be rejected.
              *
              * The transaction object passed to the updateFunction contains methods for
              * accessing documents and collections. Unlike other datastore access, data
              * accessed with the transaction will not reflect local changes that have not
              * been committed. For this reason, it is required that all reads are
              * performed before any writes. Transactions must be performed while online.
              */
              ;
            }(aa(t = zu(t, ua)), ia(e) ? e : {
              next: e
            });
          }(this._delegate, t);
        }, Object.defineProperty(t.prototype, "app", {
          get: function get() {
            if (!this.tu) throw new D(N.FAILED_PRECONDITION, "Firestore was not initialized using the Firebase SDK. 'app' is not available");
            return this.tu;
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.collection = function (t) {
          try {
            return new qc(this, Zu(this._delegate, t));
          } catch (t) {
            throw xc(t, "collection()", "Firestore.collection()");
          }
        }, t.prototype.doc = function (t) {
          try {
            return new Cc(this, ta(this._delegate, t));
          } catch (t) {
            throw xc(t, "doc()", "Firestore.doc()");
          }
        }, t.prototype.collectionGroup = function (t) {
          try {
            return new Fc(this, function (t, e) {
              if (t = zu(t, Yu), Uu("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new D(N.INVALID_ARGUMENT, "Invalid collection ID '" + e + "' passed to function collectionGroup(). Collection IDs must not contain '/'.");
              return new Xu(t,
              /* converter= */
              null,
              /**
              * Creates a new Query for a collection group query that matches all documents
              * within the provided collection group.
              */
              function (t) {
                return new Wt(H.emptyPath(), t);
              }(e));
            }(this._delegate, t));
          } catch (t) {
            throw xc(t, "collectionGroup()", "Firestore.collectionGroup()");
          }
        }, t.prototype.runTransaction = function (t) {
          var e = this;
          return function (t, e) {
            return function (t, e) {
              var i = this,
                  o = new br();
              return t.asyncQueue.enqueueAndForget(function () {
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(i, void 0, void 0, function () {
                  var n;
                  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                    switch (r.label) {
                      case 0:
                        return [4
                        /*yield*/
                        , function (t) {
                          return Eu(t).then(function (t) {
                            return t.datastore;
                          });
                        }(t)];

                      case 1:
                        return n = r.sent(), new gu(t.asyncQueue, n, e, o).run(), [2
                        /*return*/
                        ];
                    }
                  });
                });
              }), o.promise;
            }(aa(t), function (n) {
              return e(new wc(t, n));
            });
          }(this._delegate, function (n) {
            return t(new Dc(e, n));
          });
        }, t.prototype.batch = function () {
          var t = this;
          return aa(this._delegate), new Ac(new lc(this._delegate, function (e) {
            return mc(t._delegate, e);
          }));
        }, t.prototype.loadBundle = function (t) {
          throw new D(N.FAILED_PRECONDITION, '"loadBundle()" does not exist, have you imported "firebase/firestore/bundle"?');
        }, t.prototype.namedQuery = function (t) {
          throw new D(N.FAILED_PRECONDITION, '"namedQuery()" does not exist, have you imported "firebase/firestore/bundle"?');
        }, t;
      }(),
          Sc =
      /** @class */
      function (e) {
        function n(t) {
          var n = this;
          return (n = e.call(this) || this).firestore = t, n;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.convertBytes = function (t) {
          return new Tc(new da(t));
        }, n.prototype.convertReference = function (t) {
          var e = this.convertDocumentKey(t, this.firestore._databaseId);
          return Cc.eu(e, this.firestore,
          /* converter= */
          null);
        }, n;
      }(cc);
      /**
       * The persistence provider included with the full Firestore SDK.
       */


      function Nc(t) {
        var e;
        e = t, A.setLogLevel(e);
      }
      /**
       * A reference to a transaction.
       */


      var Dc =
      /** @class */
      function () {
        function t(t, e) {
          this._firestore = t, this._delegate = e, this._userDataWriter = new Sc(t);
        }

        return t.prototype.get = function (t) {
          var e = this,
              n = Uc(t);
          return this._delegate.get(n).then(function (t) {
            return new Oc(e._firestore, new za(e._firestore._delegate, e._userDataWriter, t._key, t._document, t.metadata, n.converter));
          });
        }, t.prototype.set = function (t, e, n) {
          var r = Uc(t);
          return n ? (Bu("Transaction.set", n), this._delegate.set(r, e, n)) : this._delegate.set(r, e), this;
        }, t.prototype.update = function (t, n, r) {
          for (var i, o = [], s = 3; s < arguments.length; s++) {
            o[s - 3] = arguments[s];
          }

          var u = Uc(t);
          return 2 === arguments.length ? this._delegate.update(u, n) : (i = this._delegate).update.apply(i, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])([u, n, r], o)), this;
        }, t.prototype["delete"] = function (t) {
          var e = Uc(t);
          return this._delegate["delete"](e), this;
        }, t;
      }(),
          Ac =
      /** @class */
      function () {
        function t(t) {
          this._delegate = t;
        }

        return t.prototype.set = function (t, e, n) {
          var r = Uc(t);
          return n ? (Bu("WriteBatch.set", n), this._delegate.set(r, e, n)) : this._delegate.set(r, e), this;
        }, t.prototype.update = function (t, n, r) {
          for (var i, o = [], s = 3; s < arguments.length; s++) {
            o[s - 3] = arguments[s];
          }

          var u = Uc(t);
          return 2 === arguments.length ? this._delegate.update(u, n) : (i = this._delegate).update.apply(i, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])([u, n, r], o)), this;
        }, t.prototype["delete"] = function (t) {
          var e = Uc(t);
          return this._delegate["delete"](e), this;
        }, t.prototype.commit = function () {
          return this._delegate.commit();
        }, t;
      }(),
          kc =
      /** @class */
      function () {
        function t(t, e, n) {
          this._firestore = t, this._userDataWriter = e, this._delegate = n;
        }

        return t.prototype.fromFirestore = function (t, e) {
          var n = new Wa(this._firestore._delegate, this._userDataWriter, t._key, t._document, t.metadata,
          /* converter= */
          null);
          return this._delegate.fromFirestore(new Pc(this._firestore, n), null != e ? e : {});
        }, t.prototype.toFirestore = function (t, e) {
          return e ? this._delegate.toFirestore(t, e) : this._delegate.toFirestore(t);
        }, // Use the same instance of `FirestoreDataConverter` for the given instances
        // of `Firestore` and `PublicFirestoreDataConverter` so that isEqual() will
        // compare equal for two objects created with the same converter instance.
        t.nu = function (e, n) {
          var r = t.su,
              i = r.get(e);
          i || (i = new WeakMap(), r.set(e, i));
          var o = i.get(n);
          return o || (o = new t(e, new Sc(e), n), i.set(n, o)), o;
        }, t;
      }();

      kc.su = new WeakMap();
      /**
       * A reference to a particular document in a collection in the database.
       */

      var Cc =
      /** @class */
      function () {
        function t(t, e) {
          this.firestore = t, this._delegate = e, this._userDataWriter = new Sc(t);
        }

        return t.iu = function (e, n, r) {
          if (e.length % 2 != 0) throw new D(N.INVALID_ARGUMENT, "Invalid document reference. Document references must have an even number of segments, but " + e.canonicalString() + " has " + e.length);
          return new t(n, new $u(n._delegate, r, new ct(e)));
        }, t.eu = function (e, n, r) {
          return new t(n, new $u(n._delegate, r, e));
        }, Object.defineProperty(t.prototype, "id", {
          get: function get() {
            return this._delegate.id;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "parent", {
          get: function get() {
            return new qc(this.firestore, this._delegate.parent);
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "path", {
          get: function get() {
            return this._delegate.path;
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.collection = function (t) {
          try {
            return new qc(this.firestore, Zu(this._delegate, t));
          } catch (t) {
            throw xc(t, "collection()", "DocumentReference.collection()");
          }
        }, t.prototype.isEqual = function (t) {
          return (t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(t)) instanceof $u && ea(this._delegate, t);
        }, t.prototype.set = function (t, e) {
          e = Bu("DocumentReference.set", e);

          try {
            return function (t, e, n) {
              t = zu(t, $u);
              var r = zu(t.firestore, ua),
                  i = hc(t.converter, e, n);
              return mc(r, [Ea(Ta(r), "setDoc", t._key, i, null !== t.converter, n).toMutation(t._key, De.none())]);
            }(this._delegate, t, e);
          } catch (t) {
            throw xc(t, "setDoc()", "DocumentReference.set()");
          }
        }, t.prototype.update = function (t, n) {
          for (var r = [], i = 2; i < arguments.length; i++) {
            r[i - 2] = arguments[i];
          }

          try {
            return 1 === arguments.length ? yc(this._delegate, t) : yc.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])([this._delegate, t, n], r));
          } catch (t) {
            throw xc(t, "updateDoc()", "DocumentReference.update()");
          }
        }, t.prototype["delete"] = function () {
          return mc(zu((t = this._delegate).firestore, ua), [new je(t._key, De.none())]);
          var t;
          /**
          * Add a new document to specified `CollectionReference` with the given data,
          * assigning it a document ID automatically.
          *
          * @param reference - A reference to the collection to add this document to.
          * @param data - An Object containing the data for the new document.
          * @returns A Promise resolved with a `DocumentReference` pointing to the
          * newly created document after it has been written to the backend (Note that it
          * won't resolve while you're offline).
          */
        }, t.prototype.onSnapshot = function () {
          for (var t = this, e = [], n = 0; n < arguments.length; n++) {
            e[n] = arguments[n];
          }

          var r = Rc(e),
              i = Lc(e, function (e) {
            return new Oc(t.firestore, new za(t.firestore._delegate, t._userDataWriter, e._key, e._document, e.metadata, t._delegate.converter));
          });
          return vc(this._delegate, r, i);
        }, t.prototype.get = function (t) {
          var e = this;
          return ("cache" === (null == t ? void 0 : t.source) ? function (t) {
            t = zu(t, $u);
            var e = zu(t.firestore, ua),
                i = aa(e),
                o = new pc(e);
            return function (t, e) {
              var i = this,
                  o = new br();
              return t.asyncQueue.enqueueAndForget(function () {
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(i, void 0, void 0, function () {
                  var i;
                  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (s) {
                    switch (s.label) {
                      case 0:
                        return i = function i(t, e, _i43) {
                          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
                            var n, o;
                            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                              switch (r.label) {
                                case 0:
                                  return r.trys.push([0, 2,, 3]), [4
                                  /*yield*/
                                  , function (t, e) {
                                    var n = F(t);
                                    return n.persistence.runTransaction("read document", "readonly", function (t) {
                                      return n.Mn.mn(t, e);
                                    });
                                  }(t, e)];

                                case 1:
                                  return (o = r.sent()).isFoundDocument() ? _i43.resolve(o) : o.isNoDocument() ? _i43.resolve(null) : _i43.reject(new D(N.UNAVAILABLE, "Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)")), [3
                                  /*break*/
                                  , 3];

                                case 2:
                                  return n = r.sent(), o = hs(n, "Failed to get document '" + e + " from cache"), _i43.reject(o), [3
                                  /*break*/
                                  , 3];

                                case 3:
                                  return [2
                                  /*return*/
                                  ];
                              }
                            });
                          });
                        }, [4
                        /*yield*/
                        , Su(t)];

                      case 1:
                        return [2
                        /*return*/
                        , i.apply(void 0, [s.sent(), e, o])];
                    }
                  });
                });
              }), o.promise;
            }(i, t._key).then(function (n) {
              return new za(e, o, t._key, n, new Ga(null !== n && n.hasLocalMutations,
              /* fromCache= */
              !0), t.converter);
            });
          }(this._delegate) : "server" === (null == t ? void 0 : t.source) ? function (t) {
            t = zu(t, $u);
            var e = zu(t.firestore, ua);
            return ku(aa(e), t._key, {
              source: "server"
            }).then(function (n) {
              return gc(e, t, n);
            });
          }(this._delegate) : function (t) {
            t = zu(t, $u);
            var e = zu(t.firestore, ua);
            return ku(aa(e), t._key).then(function (n) {
              return gc(e, t, n);
            });
          }(this._delegate)).then(function (t) {
            return new Oc(e.firestore, new za(e.firestore._delegate, e._userDataWriter, t._key, t._document, t.metadata, e._delegate.converter));
          });
        }, t.prototype.withConverter = function (e) {
          return new t(this.firestore, e ? this._delegate.withConverter(kc.nu(this.firestore, e)) : this._delegate.withConverter(null));
        }, t;
      }();
      /**
       * Replaces the function name in an error thrown by the firestore-exp API
       * with the function names used in the classic API.
       */


      function xc(t, e, n) {
        return t.message = t.message.replace(e, n), t
        /**
        * Iterates the list of arguments from an `onSnapshot` call and returns the
        * first argument that may be an `SnapshotListenOptions` object. Returns an
        * empty object if none is found.
        */
        ;
      }

      function Rc(t) {
        for (var e = 0, n = t; e < n.length; e++) {
          var r = n[e];
          if ("object" == typeof r && !ia(r)) return r;
        }

        return {};
      }
      /**
       * Creates an observer that can be passed to the firestore-exp SDK. The
       * observer converts all observed values into the format expected by the classic
       * SDK.
       *
       * @param args - The list of arguments from an `onSnapshot` call.
       * @param wrapper - The function that converts the firestore-exp type into the
       * type used by this shim.
       */


      function Lc(t, e) {
        var n, r, i;
        return {
          next: function next(t) {
            i.next && i.next(e(t));
          },
          error: null === (n = (i = ia(t[0]) ? t[0] : ia(t[1]) ? t[1] : "function" == typeof t[0] ? {
            next: t[0],
            error: t[1],
            complete: t[2]
          } : {
            next: t[1],
            error: t[2],
            complete: t[3]
          }).error) || void 0 === n ? void 0 : n.bind(i),
          complete: null === (r = i.complete) || void 0 === r ? void 0 : r.bind(i)
        };
      }

      var Oc =
      /** @class */
      function () {
        function t(t, e) {
          this._firestore = t, this._delegate = e;
        }

        return Object.defineProperty(t.prototype, "ref", {
          get: function get() {
            return new Cc(this._firestore, this._delegate.ref);
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "id", {
          get: function get() {
            return this._delegate.id;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "metadata", {
          get: function get() {
            return this._delegate.metadata;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "exists", {
          get: function get() {
            return this._delegate.exists();
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.data = function (t) {
          return this._delegate.data(t);
        }, t.prototype.get = function (t, e) {
          return this._delegate.get(t, e);
        }, t.prototype.isEqual = function (t) {
          return $a(this._delegate, t._delegate);
        }, t;
      }(),
          Pc =
      /** @class */
      function (e) {
        function n() {
          return null !== e && e.apply(this, arguments) || this;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), n.prototype.data = function (t) {
          return this._delegate.data(t);
        }, n;
      }(Oc),
          Fc =
      /** @class */
      function () {
        function t(t, e) {
          this.firestore = t, this._delegate = e, this._userDataWriter = new Sc(t);
        }

        return t.prototype.where = function (e, n, r) {
          try {
            // The "as string" cast is a little bit of a hack. `where` accepts the
            // FieldPath Compat type as input, but is not typed as such in order to
            // not expose this via our public typings file.
            return new t(this.firestore, Za(this._delegate, function (t, e, n) {
              var r = e,
                  i = Qa("where", t);
              return new tc(i, r, n);
            }(e, n, r)));
          } catch (e) {
            throw xc(e, /(orderBy|where)\(\)/, "Query.$1()");
          }
        }, t.prototype.orderBy = function (e, n) {
          try {
            // The "as string" cast is a little bit of a hack. `orderBy` accepts the
            // FieldPath Compat type as input, but is not typed as such in order to
            // not expose this via our public typings file.
            return new t(this.firestore, Za(this._delegate, function (t, e) {
              void 0 === e && (e = "asc");
              var n = e,
                  r = Qa("orderBy", t);
              return new ec(r, n);
            }(e, n)));
          } catch (e) {
            throw xc(e, /(orderBy|where)\(\)/, "Query.$1()");
          }
        }, t.prototype.limit = function (e) {
          try {
            return new t(this.firestore, Za(this._delegate, function (t) {
              return Wu("limit", t), new nc("limit", t, "F"
              /* First */
              );
            }(e)));
          } catch (e) {
            throw xc(e, "limit()", "Query.limit()");
          }
        }, t.prototype.limitToLast = function (e) {
          try {
            return new t(this.firestore, Za(this._delegate, function (t) {
              return Wu("limitToLast", t), new nc("limitToLast", t, "L"
              /* Last */
              );
            }(e)));
          } catch (e) {
            throw xc(e, "limitToLast()", "Query.limitToLast()");
          }
        }, t.prototype.startAt = function () {
          for (var e = [], n = 0; n < arguments.length; n++) {
            e[n] = arguments[n];
          }

          try {
            return new t(this.firestore, Za(this._delegate, function () {
              for (var t = [], e = 0; e < arguments.length; e++) {
                t[e] = arguments[e];
              }

              return new rc("startAt", t,
              /*before=*/
              !0);
            }.apply(void 0, e)));
          } catch (e) {
            throw xc(e, "startAt()", "Query.startAt()");
          }
        }, t.prototype.startAfter = function () {
          for (var e = [], n = 0; n < arguments.length; n++) {
            e[n] = arguments[n];
          }

          try {
            return new t(this.firestore, Za(this._delegate, function () {
              for (var t = [], e = 0; e < arguments.length; e++) {
                t[e] = arguments[e];
              }

              return new rc("startAfter", t,
              /*before=*/
              !1);
            }.apply(void 0, e)));
          } catch (e) {
            throw xc(e, "startAfter()", "Query.startAfter()");
          }
        }, t.prototype.endBefore = function () {
          for (var e = [], n = 0; n < arguments.length; n++) {
            e[n] = arguments[n];
          }

          try {
            return new t(this.firestore, Za(this._delegate, function () {
              for (var t = [], e = 0; e < arguments.length; e++) {
                t[e] = arguments[e];
              }

              return new ic("endBefore", t,
              /*before=*/
              !0);
            }.apply(void 0, e)));
          } catch (e) {
            throw xc(e, "endBefore()", "Query.endBefore()");
          }
        }, t.prototype.endAt = function () {
          for (var e = [], n = 0; n < arguments.length; n++) {
            e[n] = arguments[n];
          }

          try {
            return new t(this.firestore, Za(this._delegate, function () {
              for (var t = [], e = 0; e < arguments.length; e++) {
                t[e] = arguments[e];
              }

              return new ic("endAt", t,
              /*before=*/
              !1);
            }.apply(void 0, e)));
          } catch (e) {
            throw xc(e, "endAt()", "Query.endAt()");
          }
        }, t.prototype.isEqual = function (t) {
          return na(this._delegate, t._delegate);
        }, t.prototype.get = function (t) {
          var e = this;
          return ("cache" === (null == t ? void 0 : t.source) ?
          /**
          * Executes the query and returns the results as a `QuerySnapshot` from cache.
          * Returns an error if the document is not currently cached.
          *
          * @returns A Promise that will be resolved with the results of the query.
          */
          function (t) {
            t = zu(t, Xu);
            var e = zu(t.firestore, ua),
                i = aa(e),
                o = new pc(e);
            return function (t, e) {
              var i = this,
                  o = new br();
              return t.asyncQueue.enqueueAndForget(function () {
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(i, void 0, void 0, function () {
                  var i;
                  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (s) {
                    switch (s.label) {
                      case 0:
                        return i = function i(t, e, _i44) {
                          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () {
                            var n, o, s, u, a;
                            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                              switch (r.label) {
                                case 0:
                                  return r.trys.push([0, 2,, 3]), [4
                                  /*yield*/
                                  , Yi(t, e,
                                  /* usePreviousResults= */
                                  !0)];

                                case 1:
                                  return a = r.sent(), n = new As(e, a.Bn), o = n._o(a.documents), s = n.applyChanges(o,
                                  /* updateLimboDocuments= */
                                  !1), _i44.resolve(s.snapshot), [3
                                  /*break*/
                                  , 3];

                                case 2:
                                  return u = r.sent(), a = hs(u, "Failed to execute query '" + e + " against cache"), _i44.reject(a), [3
                                  /*break*/
                                  , 3];

                                case 3:
                                  return [2
                                  /*return*/
                                  ];
                              }
                            });
                          });
                        }, [4
                        /*yield*/
                        , Su(t)];

                      case 1:
                        return [2
                        /*return*/
                        , i.apply(void 0, [s.sent(), e, o])];
                    }
                  });
                });
              }), o.promise;
            }(i, t._query).then(function (n) {
              return new Ha(e, o, t, n);
            });
          }(this._delegate) : "server" === (null == t ? void 0 : t.source) ? function (t) {
            t = zu(t, Xu);
            var e = zu(t.firestore, ua),
                n = aa(e),
                r = new pc(e);
            return Cu(n, t._query, {
              source: "server"
            }).then(function (n) {
              return new Ha(e, r, t, n);
            });
          }(this._delegate) : function (t) {
            t = zu(t, Xu);
            var e = zu(t.firestore, ua),
                n = aa(e),
                r = new pc(e);
            return Xa(t._query), Cu(n, t._query).then(function (n) {
              return new Ha(e, r, t, n);
            });
          }(this._delegate)).then(function (t) {
            return new Vc(e.firestore, new Ha(e.firestore._delegate, e._userDataWriter, e._delegate, t._snapshot));
          });
        }, t.prototype.onSnapshot = function () {
          for (var t = this, e = [], n = 0; n < arguments.length; n++) {
            e[n] = arguments[n];
          }

          var r = Rc(e),
              i = Lc(e, function (e) {
            return new Vc(t.firestore, new Ha(t.firestore._delegate, t._userDataWriter, t._delegate, e._snapshot));
          });
          return vc(this._delegate, r, i);
        }, t.prototype.withConverter = function (e) {
          return new t(this.firestore, e ? this._delegate.withConverter(kc.nu(this.firestore, e)) : this._delegate.withConverter(null));
        }, t;
      }(),
          Mc =
      /** @class */
      function () {
        function t(t, e) {
          this._firestore = t, this._delegate = e;
        }

        return Object.defineProperty(t.prototype, "type", {
          get: function get() {
            return this._delegate.type;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "doc", {
          get: function get() {
            return new Pc(this._firestore, this._delegate.doc);
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "oldIndex", {
          get: function get() {
            return this._delegate.oldIndex;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "newIndex", {
          get: function get() {
            return this._delegate.newIndex;
          },
          enumerable: !1,
          configurable: !0
        }), t;
      }(),
          Vc =
      /** @class */
      function () {
        function t(t, e) {
          this._firestore = t, this._delegate = e;
        }

        return Object.defineProperty(t.prototype, "query", {
          get: function get() {
            return new Fc(this._firestore, this._delegate.query);
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "metadata", {
          get: function get() {
            return this._delegate.metadata;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "size", {
          get: function get() {
            return this._delegate.size;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "empty", {
          get: function get() {
            return this._delegate.empty;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(t.prototype, "docs", {
          get: function get() {
            var t = this;
            return this._delegate.docs.map(function (e) {
              return new Pc(t._firestore, e);
            });
          },
          enumerable: !1,
          configurable: !0
        }), t.prototype.docChanges = function (t) {
          var e = this;
          return this._delegate.docChanges(t).map(function (t) {
            return new Mc(e._firestore, t);
          });
        }, t.prototype.forEach = function (t, e) {
          var n = this;

          this._delegate.forEach(function (r) {
            t.call(e, new Pc(n._firestore, r));
          });
        }, t.prototype.isEqual = function (t) {
          return $a(this._delegate, t._delegate);
        }, t;
      }(),
          qc =
      /** @class */
      function (e) {
        function n(t, n) {
          var r = this;
          return (r = e.call(this, t, n) || this).firestore = t, r._delegate = n, r;
        }

        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(n, e), Object.defineProperty(n.prototype, "id", {
          get: function get() {
            return this._delegate.id;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(n.prototype, "path", {
          get: function get() {
            return this._delegate.path;
          },
          enumerable: !1,
          configurable: !0
        }), Object.defineProperty(n.prototype, "parent", {
          get: function get() {
            var t = this._delegate.parent;
            return t ? new Cc(this.firestore, t) : null;
          },
          enumerable: !1,
          configurable: !0
        }), n.prototype.doc = function (t) {
          try {
            return new Cc(this.firestore, void 0 === t ? ta(this._delegate) : ta(this._delegate, t));
          } catch (t) {
            throw xc(t, "doc()", "CollectionReference.doc()");
          }
        }, n.prototype.add = function (t) {
          var e = this;
          return function (t, e) {
            var n = zu(t.firestore, ua),
                r = ta(t),
                i = hc(t.converter, e);
            return mc(n, [Ea(Ta(t.firestore), "addDoc", r._key, i, null !== t.converter, {}).toMutation(r._key, De.exists(!1))]).then(function () {
              return r;
            });
          }(this._delegate, t).then(function (t) {
            return new Cc(e.firestore, t);
          });
        }, n.prototype.isEqual = function (t) {
          return ea(this._delegate, t._delegate);
        }, n.prototype.withConverter = function (t) {
          return new n(this.firestore, t ? this._delegate.withConverter(kc.nu(this.firestore, t)) : this._delegate.withConverter(null));
        }, n;
      }(Fc);

      function Uc(t) {
        return zu(t, $u);
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */
      // The objects that are a part of this API are exposed to third-parties as
      // compiled javascript so we want to flag our private members with a leading
      // underscore to discourage their use.

      /**
       * A `FieldPath` refers to a field in a document. The path may consist of a
       * single field name (referring to a top-level field in the document), or a list
       * of field names (referring to a nested field in the document).
       */


      var Bc =
      /** @class */
      function () {
        /**
         * Creates a FieldPath from the provided field names. If more than one field
         * name is provided, the path will point to a nested field in a document.
         *
         * @param fieldNames - A list of field names.
         */
        function t() {
          for (var t = [], n = 0; n < arguments.length; n++) {
            t[n] = arguments[n];
          }

          this._delegate = new (la.bind.apply(la, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArray"])([void 0], t)))();
        }

        return t.documentId = function () {
          /**
           * Internal Note: The backend doesn't technically support querying by
           * document ID. Instead it queries by the entire document name (full path
           * included), but in the cases we currently support documentId(), the net
           * effect is the same.
           */
          return new t($.keyField().canonicalString());
        }, t.prototype.isEqual = function (t) {
          return (t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["getModularInstance"])(t)) instanceof la && this._delegate._internalPath.isEqual(t._internalPath);
        }, t;
      }(),
          jc =
      /** @class */
      function () {
        function t(t) {
          this._delegate = t;
        }

        return t.serverTimestamp = function () {
          var e = new Na("serverTimestamp");
          return e._methodName = "FieldValue.serverTimestamp", new t(e);
        }, t["delete"] = function () {
          var e = new _a("deleteField");
          return e._methodName = "FieldValue.delete", new t(e);
        }, t.arrayUnion = function () {
          for (var e = [], n = 0; n < arguments.length; n++) {
            e[n] = arguments[n];
          }

          var r =
          /**
          * Returns a special value that can be used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link
          * @firebase/firestore/lite#(updateDoc:1)} that tells the server to union the given elements with any array
          * value that already exists on the server. Each specified element that doesn't
          * already exist in the array will be added to the end. If the field being
          * modified is not already an array it will be overwritten with an array
          * containing exactly the specified elements.
          *
          * @param elements - The elements to union into the array.
          * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
          * `updateDoc()`.
          */
          function () {
            for (var t = [], e = 0; e < arguments.length; e++) {
              t[e] = arguments[e];
            } // NOTE: We don't actually parse the data until it's used in set() or
            // update() since we'd need the Firestore instance to do this.


            return new Da("arrayUnion", t);
          }.apply(void 0, e);

          return r._methodName = "FieldValue.arrayUnion", new t(r);
        }, t.arrayRemove = function () {
          for (var e = [], n = 0; n < arguments.length; n++) {
            e[n] = arguments[n];
          }

          var r = function () {
            for (var t = [], e = 0; e < arguments.length; e++) {
              t[e] = arguments[e];
            } // NOTE: We don't actually parse the data until it's used in set() or
            // update() since we'd need the Firestore instance to do this.


            return new Aa("arrayRemove", t);
          }.apply(void 0, e);

          return r._methodName = "FieldValue.arrayRemove", new t(r);
        }, t.increment = function (e) {
          var n = function (t) {
            return new ka("increment", t);
          }(e);

          return n._methodName = "FieldValue.increment", new t(n);
        }, t.prototype.isEqual = function (t) {
          return this._delegate.isEqual(t._delegate);
        }, t;
      }();
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      function Kc(t) {
        /**
        * Loads a Firestore bundle into the local cache.
        *
        * @param firestore - The `Firestore` instance to load bundles for for.
        * @param bundleData - An object representing the bundle to be loaded. Valid objects are
        *   `ArrayBuffer`, `ReadableStream<Uint8Array>` or `string`.
        *
        * @returns
        *   A `LoadBundleTask` object, which notifies callers with progress updates, and completion
        *   or error events. It can be used as a `Promise<LoadBundleTaskProgress>`.
        */
        return function (t, e) {
          var i = aa(t = zu(t, ua)),
              o = new oa();
          return function (t, e, i, o) {
            var s = this,
                u = function (t, e) {
              return function (t, e) {
                return new vu(t, e);
              }(function (t, e) {
                if (t instanceof Uint8Array) return pu(t, e);
                if (t instanceof ArrayBuffer) return pu(new Uint8Array(t), e);
                if (t instanceof ReadableStream) return t.getReader();
                throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream");
              }("string" == typeof t ? new TextEncoder().encode(t) : t), e);
            }(i, Co(e));

            t.asyncQueue.enqueueAndForget(function () {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(s, void 0, void 0, function () {
                var e;
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (n) {
                  switch (n.label) {
                    case 0:
                      return e = cu, [4
                      /*yield*/
                      , Du(t)];

                    case 1:
                      return e.apply(void 0, [n.sent(), u, o]), [2
                      /*return*/
                      ];
                  }
                });
              });
            });
          }(i, t._databaseId, e, o), o;
        }(this._delegate, t);
      }

      function Qc(t) {
        var e,
            i,
            o = this;
        return (e = this._delegate, i = t, function (t, e) {
          var i = this;
          return t.asyncQueue.enqueue(function () {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(i, void 0, void 0, function () {
              var n;
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (r) {
                switch (r.label) {
                  case 0:
                    return n = function n(t, e) {
                      var n = F(t);
                      return n.persistence.runTransaction("Get named query", "readonly", function (t) {
                        return n.Ke.getNamedQuery(t, e);
                      });
                    }, [4
                    /*yield*/
                    , Su(t)];

                  case 1:
                    return [2
                    /*return*/
                    , n.apply(void 0, [r.sent(), e])];
                }
              });
            });
          });
        }(aa(e = zu(e, ua)), i).then(function (t) {
          return t ? new Xu(e, null, t.query) : null;
        })).then(function (t) {
          return t ? new Fc(o, t) : null;
        });
      } //# sourceMappingURL=prebuilt-306f43d8-45d6f0b9.js.map

      /***/

    },

    /***/
    "pxpQ":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/observeOn.js ***!
      \********************************************************************/

    /*! exports provided: observeOn, ObserveOnOperator, ObserveOnSubscriber, ObserveOnMessage */

    /***/
    function pxpQ(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "observeOn", function () {
        return observeOn;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ObserveOnOperator", function () {
        return ObserveOnOperator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ObserveOnSubscriber", function () {
        return ObserveOnSubscriber;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ObserveOnMessage", function () {
        return ObserveOnMessage;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _Notification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Notification */
      "WMd4");

      function observeOn(scheduler) {
        var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
        return function observeOnOperatorFunction(source) {
          return source.lift(new ObserveOnOperator(scheduler, delay));
        };
      }

      var ObserveOnOperator = /*#__PURE__*/function () {
        function ObserveOnOperator(scheduler) {
          var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;

          _classCallCheck(this, ObserveOnOperator);

          this.scheduler = scheduler;
          this.delay = delay;
        }

        _createClass2(ObserveOnOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
          }
        }]);

        return ObserveOnOperator;
      }();

      var ObserveOnSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_42) {
        _inherits(ObserveOnSubscriber, _Subscriber__WEBPACK_42);

        var _super269 = _createSuper(ObserveOnSubscriber);

        function ObserveOnSubscriber(destination, scheduler) {
          var _this543;

          var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;

          _classCallCheck(this, ObserveOnSubscriber);

          _this543 = _super269.call(this, destination);
          _this543.scheduler = scheduler;
          _this543.delay = delay;
          return _this543;
        }

        _createClass2(ObserveOnSubscriber, [{
          key: "scheduleMessage",
          value: function scheduleMessage(notification) {
            var destination = this.destination;
            destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
          }
        }, {
          key: "_next",
          value: function _next(value) {
            this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createNext(value));
          }
        }, {
          key: "_error",
          value: function _error(err) {
            this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createError(err));
            this.unsubscribe();
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createComplete());
            this.unsubscribe();
          }
        }], [{
          key: "dispatch",
          value: function dispatch(arg) {
            var notification = arg.notification,
                destination = arg.destination;
            notification.observe(destination);
            this.unsubscribe();
          }
        }]);

        return ObserveOnSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]);

      var ObserveOnMessage = function ObserveOnMessage(notification, destination) {
        _classCallCheck(this, ObserveOnMessage);

        this.notification = notification;
        this.destination = destination;
      }; //# sourceMappingURL=observeOn.js.map

      /***/

    },

    /***/
    "q/0M":
    /*!*********************************************************!*\
      !*** ./node_modules/@firebase/logger/dist/index.esm.js ***!
      \*********************************************************/

    /*! exports provided: LogLevel, Logger, setLogLevel, setUserLogHandler */

    /***/
    function q0M(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "LogLevel", function () {
        return LogLevel;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Logger", function () {
        return Logger;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setLogLevel", function () {
        return setLogLevel;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setUserLogHandler", function () {
        return setUserLogHandler;
      });
      /*! *****************************************************************************
      Copyright (c) Microsoft Corporation. All rights reserved.
      Licensed under the Apache License, Version 2.0 (the "License"); you may not use
      this file except in compliance with the License. You may obtain a copy of the
      License at http://www.apache.org/licenses/LICENSE-2.0
      
      THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
      KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
      WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
      MERCHANTABLITY OR NON-INFRINGEMENT.
      
      See the Apache Version 2.0 License for specific language governing permissions
      and limitations under the License.
      ***************************************************************************** */


      function __spreadArrays() {
        for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
          s += arguments[i].length;
        }

        for (var r = Array(s), k = 0, i = 0; i < il; i++) {
          for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
            r[k] = a[j];
          }
        }

        return r;
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var _a;
      /**
       * A container for all of the Logger instances
       */


      var instances = [];
      /**
       * The JS SDK supports 5 log levels and also allows a user the ability to
       * silence the logs altogether.
       *
       * The order is a follows:
       * DEBUG < VERBOSE < INFO < WARN < ERROR
       *
       * All of the log types above the current log level will be captured (i.e. if
       * you set the log level to `INFO`, errors will still be logged, but `DEBUG` and
       * `VERBOSE` logs will not)
       */

      var LogLevel;

      (function (LogLevel) {
        LogLevel[LogLevel["DEBUG"] = 0] = "DEBUG";
        LogLevel[LogLevel["VERBOSE"] = 1] = "VERBOSE";
        LogLevel[LogLevel["INFO"] = 2] = "INFO";
        LogLevel[LogLevel["WARN"] = 3] = "WARN";
        LogLevel[LogLevel["ERROR"] = 4] = "ERROR";
        LogLevel[LogLevel["SILENT"] = 5] = "SILENT";
      })(LogLevel || (LogLevel = {}));

      var levelStringToEnum = {
        'debug': LogLevel.DEBUG,
        'verbose': LogLevel.VERBOSE,
        'info': LogLevel.INFO,
        'warn': LogLevel.WARN,
        'error': LogLevel.ERROR,
        'silent': LogLevel.SILENT
      };
      /**
       * The default log level
       */

      var defaultLogLevel = LogLevel.INFO;
      /**
       * By default, `console.debug` is not displayed in the developer console (in
       * chrome). To avoid forcing users to have to opt-in to these logs twice
       * (i.e. once for firebase, and once in the console), we are sending `DEBUG`
       * logs to the `console.log` function.
       */

      var ConsoleMethod = (_a = {}, _a[LogLevel.DEBUG] = 'log', _a[LogLevel.VERBOSE] = 'log', _a[LogLevel.INFO] = 'info', _a[LogLevel.WARN] = 'warn', _a[LogLevel.ERROR] = 'error', _a);
      /**
       * The default log handler will forward DEBUG, VERBOSE, INFO, WARN, and ERROR
       * messages on to their corresponding console counterparts (if the log method
       * is supported by the current log level)
       */

      var defaultLogHandler = function defaultLogHandler(instance, logType) {
        var args = [];

        for (var _i = 2; _i < arguments.length; _i++) {
          args[_i - 2] = arguments[_i];
        }

        if (logType < instance.logLevel) {
          return;
        }

        var now = new Date().toISOString();
        var method = ConsoleMethod[logType];

        if (method) {
          console[method].apply(console, __spreadArrays(["[" + now + "]  " + instance.name + ":"], args));
        } else {
          throw new Error("Attempted to log a message with an invalid logType (value: " + logType + ")");
        }
      };

      var Logger =
      /** @class */
      function () {
        /**
         * Gives you an instance of a Logger to capture messages according to
         * Firebase's logging scheme.
         *
         * @param name The name that the logs will be associated with
         */
        function Logger(name) {
          this.name = name;
          /**
           * The log level of the given Logger instance.
           */

          this._logLevel = defaultLogLevel;
          /**
           * The main (internal) log handler for the Logger instance.
           * Can be set to a new function in internal package code but not by user.
           */

          this._logHandler = defaultLogHandler;
          /**
           * The optional, additional, user-defined log handler for the Logger instance.
           */

          this._userLogHandler = null;
          /**
           * Capture the current instance for later use
           */

          instances.push(this);
        }

        Object.defineProperty(Logger.prototype, "logLevel", {
          get: function get() {
            return this._logLevel;
          },
          set: function set(val) {
            if (!(val in LogLevel)) {
              throw new TypeError("Invalid value \"" + val + "\" assigned to `logLevel`");
            }

            this._logLevel = val;
          },
          enumerable: false,
          configurable: true
        }); // Workaround for setter/getter having to be the same type.

        Logger.prototype.setLogLevel = function (val) {
          this._logLevel = typeof val === 'string' ? levelStringToEnum[val] : val;
        };

        Object.defineProperty(Logger.prototype, "logHandler", {
          get: function get() {
            return this._logHandler;
          },
          set: function set(val) {
            if (typeof val !== 'function') {
              throw new TypeError('Value assigned to `logHandler` must be a function');
            }

            this._logHandler = val;
          },
          enumerable: false,
          configurable: true
        });
        Object.defineProperty(Logger.prototype, "userLogHandler", {
          get: function get() {
            return this._userLogHandler;
          },
          set: function set(val) {
            this._userLogHandler = val;
          },
          enumerable: false,
          configurable: true
        });
        /**
         * The functions below are all based on the `console` interface
         */

        Logger.prototype.debug = function () {
          var args = [];

          for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
          }

          this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.DEBUG], args));

          this._logHandler.apply(this, __spreadArrays([this, LogLevel.DEBUG], args));
        };

        Logger.prototype.log = function () {
          var args = [];

          for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
          }

          this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.VERBOSE], args));

          this._logHandler.apply(this, __spreadArrays([this, LogLevel.VERBOSE], args));
        };

        Logger.prototype.info = function () {
          var args = [];

          for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
          }

          this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.INFO], args));

          this._logHandler.apply(this, __spreadArrays([this, LogLevel.INFO], args));
        };

        Logger.prototype.warn = function () {
          var args = [];

          for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
          }

          this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.WARN], args));

          this._logHandler.apply(this, __spreadArrays([this, LogLevel.WARN], args));
        };

        Logger.prototype.error = function () {
          var args = [];

          for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
          }

          this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.ERROR], args));

          this._logHandler.apply(this, __spreadArrays([this, LogLevel.ERROR], args));
        };

        return Logger;
      }();

      function setLogLevel(level) {
        instances.forEach(function (inst) {
          inst.setLogLevel(level);
        });
      }

      function setUserLogHandler(logCallback, options) {
        var _loop_1 = function _loop_1(instance) {
          var customLogLevel = null;

          if (options && options.level) {
            customLogLevel = levelStringToEnum[options.level];
          }

          if (logCallback === null) {
            instance.userLogHandler = null;
          } else {
            instance.userLogHandler = function (instance, level) {
              var args = [];

              for (var _i = 2; _i < arguments.length; _i++) {
                args[_i - 2] = arguments[_i];
              }

              var message = args.map(function (arg) {
                if (arg == null) {
                  return null;
                } else if (typeof arg === 'string') {
                  return arg;
                } else if (typeof arg === 'number' || typeof arg === 'boolean') {
                  return arg.toString();
                } else if (arg instanceof Error) {
                  return arg.message;
                } else {
                  try {
                    return JSON.stringify(arg);
                  } catch (ignored) {
                    return null;
                  }
                }
              }).filter(function (arg) {
                return arg;
              }).join(' ');

              if (level >= (customLogLevel !== null && customLogLevel !== void 0 ? customLogLevel : instance.logLevel)) {
                logCallback({
                  level: LogLevel[level].toLowerCase(),
                  message: message,
                  args: args,
                  type: instance.name
                });
              }
            };
          }
        };

        for (var _i = 0, instances_1 = instances; _i < instances_1.length; _i++) {
          var instance = instances_1[_i];

          _loop_1(instance);
        }
      } //# sourceMappingURL=index.esm.js.map

      /***/

    },

    /***/
    "q7zd":
    /*!**********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/concatMapTo.js ***!
      \**********************************************************************/

    /*! exports provided: concatMapTo */

    /***/
    function q7zd(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "concatMapTo", function () {
        return concatMapTo;
      });
      /* harmony import */


      var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./concatMap */
      "bOdf");

      function concatMapTo(innerObservable, resultSelector) {
        return Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__["concatMap"])(function () {
          return innerObservable;
        }, resultSelector);
      } //# sourceMappingURL=concatMapTo.js.map

      /***/

    },

    /***/
    "q92s":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/merge.js ***!
      \****************************************************************/

    /*! exports provided: merge */

    /***/
    function q92s(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "merge", function () {
        return merge;
      });
      /* harmony import */


      var _observable_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../observable/merge */
      "VRyK");

      function merge() {
        for (var _len49 = arguments.length, observables = new Array(_len49), _key50 = 0; _key50 < _len49; _key50++) {
          observables[_key50] = arguments[_key50];
        }

        return function (source) {
          return source.lift.call(Object(_observable_merge__WEBPACK_IMPORTED_MODULE_0__["merge"]).apply(void 0, [source].concat(observables)));
        };
      } //# sourceMappingURL=merge.js.map

      /***/

    },

    /***/
    "qCKp":
    /*!*********************************************!*\
      !*** ./node_modules/rxjs/_esm2015/index.js ***!
      \*********************************************/

    /*! exports provided: Observable, ConnectableObservable, GroupedObservable, observable, Subject, BehaviorSubject, ReplaySubject, AsyncSubject, asap, asapScheduler, async, asyncScheduler, queue, queueScheduler, animationFrame, animationFrameScheduler, VirtualTimeScheduler, VirtualAction, Scheduler, Subscription, Subscriber, Notification, NotificationKind, pipe, noop, identity, isObservable, ArgumentOutOfRangeError, EmptyError, ObjectUnsubscribedError, UnsubscriptionError, TimeoutError, bindCallback, bindNodeCallback, combineLatest, concat, defer, empty, forkJoin, from, fromEvent, fromEventPattern, generate, iif, interval, merge, never, of, onErrorResumeNext, pairs, partition, race, range, throwError, timer, using, zip, scheduled, EMPTY, NEVER, config */

    /***/
    function qCKp(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./internal/Observable */
      "HDdC");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Observable", function () {
        return _internal_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"];
      });
      /* harmony import */


      var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./internal/observable/ConnectableObservable */
      "EQ5u");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function () {
        return _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__["ConnectableObservable"];
      });
      /* harmony import */


      var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./internal/operators/groupBy */
      "OQgR");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "GroupedObservable", function () {
        return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__["GroupedObservable"];
      });
      /* harmony import */


      var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./internal/symbol/observable */
      "kJWO");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "observable", function () {
        return _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__["observable"];
      });
      /* harmony import */


      var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./internal/Subject */
      "XNiG");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Subject", function () {
        return _internal_Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"];
      });
      /* harmony import */


      var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./internal/BehaviorSubject */
      "2Vo4");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function () {
        return _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__["BehaviorSubject"];
      });
      /* harmony import */


      var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ./internal/ReplaySubject */
      "jtHE");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "ReplaySubject", function () {
        return _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__["ReplaySubject"];
      });
      /* harmony import */


      var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! ./internal/AsyncSubject */
      "NHP+");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "AsyncSubject", function () {
        return _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__["AsyncSubject"];
      });
      /* harmony import */


      var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
      /*! ./internal/scheduler/asap */
      "7Hc7");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "asap", function () {
        return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asap"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "asapScheduler", function () {
        return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asapScheduler"];
      });
      /* harmony import */


      var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
      /*! ./internal/scheduler/async */
      "D0XW");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "async", function () {
        return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["async"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "asyncScheduler", function () {
        return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["asyncScheduler"];
      });
      /* harmony import */


      var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
      /*! ./internal/scheduler/queue */
      "qgXg");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "queue", function () {
        return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queue"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "queueScheduler", function () {
        return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queueScheduler"];
      });
      /* harmony import */


      var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
      /*! ./internal/scheduler/animationFrame */
      "eNwd");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "animationFrame", function () {
        return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrame"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function () {
        return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrameScheduler"];
      });
      /* harmony import */


      var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
      /*! ./internal/scheduler/VirtualTimeScheduler */
      "iKkX");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function () {
        return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualTimeScheduler"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "VirtualAction", function () {
        return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualAction"];
      });
      /* harmony import */


      var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(
      /*! ./internal/Scheduler */
      "Y/cZ");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Scheduler", function () {
        return _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__["Scheduler"];
      });
      /* harmony import */


      var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(
      /*! ./internal/Subscription */
      "quSY");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Subscription", function () {
        return _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__["Subscription"];
      });
      /* harmony import */


      var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(
      /*! ./internal/Subscriber */
      "7o/Q");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Subscriber", function () {
        return _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__["Subscriber"];
      });
      /* harmony import */


      var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(
      /*! ./internal/Notification */
      "WMd4");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Notification", function () {
        return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["Notification"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "NotificationKind", function () {
        return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["NotificationKind"];
      });
      /* harmony import */


      var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(
      /*! ./internal/util/pipe */
      "mCNh");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "pipe", function () {
        return _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__["pipe"];
      });
      /* harmony import */


      var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(
      /*! ./internal/util/noop */
      "KqfI");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "noop", function () {
        return _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__["noop"];
      });
      /* harmony import */


      var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(
      /*! ./internal/util/identity */
      "SpAZ");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "identity", function () {
        return _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__["identity"];
      });
      /* harmony import */


      var _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(
      /*! ./internal/util/isObservable */
      "7+OI");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "isObservable", function () {
        return _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__["isObservable"];
      });
      /* harmony import */


      var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(
      /*! ./internal/util/ArgumentOutOfRangeError */
      "4I5i");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function () {
        return _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__["ArgumentOutOfRangeError"];
      });
      /* harmony import */


      var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(
      /*! ./internal/util/EmptyError */
      "sVev");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "EmptyError", function () {
        return _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__["EmptyError"];
      });
      /* harmony import */


      var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(
      /*! ./internal/util/ObjectUnsubscribedError */
      "9ppp");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function () {
        return _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__["ObjectUnsubscribedError"];
      });
      /* harmony import */


      var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(
      /*! ./internal/util/UnsubscriptionError */
      "pjAE");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function () {
        return _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__["UnsubscriptionError"];
      });
      /* harmony import */


      var _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(
      /*! ./internal/util/TimeoutError */
      "Y6u4");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "TimeoutError", function () {
        return _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__["TimeoutError"];
      });
      /* harmony import */


      var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(
      /*! ./internal/observable/bindCallback */
      "QqCr");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "bindCallback", function () {
        return _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__["bindCallback"];
      });
      /* harmony import */


      var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(
      /*! ./internal/observable/bindNodeCallback */
      "4O5X");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function () {
        return _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__["bindNodeCallback"];
      });
      /* harmony import */


      var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(
      /*! ./internal/observable/combineLatest */
      "itXk");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "combineLatest", function () {
        return _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__["combineLatest"];
      });
      /* harmony import */


      var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(
      /*! ./internal/observable/concat */
      "GyhO");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "concat", function () {
        return _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__["concat"];
      });
      /* harmony import */


      var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(
      /*! ./internal/observable/defer */
      "NXyV");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "defer", function () {
        return _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__["defer"];
      });
      /* harmony import */


      var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(
      /*! ./internal/observable/empty */
      "EY2u");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "empty", function () {
        return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["empty"];
      });
      /* harmony import */


      var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(
      /*! ./internal/observable/forkJoin */
      "cp0P");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "forkJoin", function () {
        return _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__["forkJoin"];
      });
      /* harmony import */


      var _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(
      /*! ./internal/observable/from */
      "Cfvw");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "from", function () {
        return _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__["from"];
      });
      /* harmony import */


      var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(
      /*! ./internal/observable/fromEvent */
      "xgIS");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "fromEvent", function () {
        return _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__["fromEvent"];
      });
      /* harmony import */


      var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(
      /*! ./internal/observable/fromEventPattern */
      "04ZW");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "fromEventPattern", function () {
        return _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__["fromEventPattern"];
      });
      /* harmony import */


      var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(
      /*! ./internal/observable/generate */
      "WPMC");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "generate", function () {
        return _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__["generate"];
      });
      /* harmony import */


      var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(
      /*! ./internal/observable/iif */
      "r0o6");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "iif", function () {
        return _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__["iif"];
      });
      /* harmony import */


      var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(
      /*! ./internal/observable/interval */
      "l5mm");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "interval", function () {
        return _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__["interval"];
      });
      /* harmony import */


      var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(
      /*! ./internal/observable/merge */
      "VRyK");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "merge", function () {
        return _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__["merge"];
      });
      /* harmony import */


      var _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(
      /*! ./internal/observable/never */
      "5yfJ");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "never", function () {
        return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["never"];
      });
      /* harmony import */


      var _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(
      /*! ./internal/observable/of */
      "LRne");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "of", function () {
        return _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__["of"];
      });
      /* harmony import */


      var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(
      /*! ./internal/observable/onErrorResumeNext */
      "Hkhx");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function () {
        return _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__["onErrorResumeNext"];
      });
      /* harmony import */


      var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(
      /*! ./internal/observable/pairs */
      "hKy8");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "pairs", function () {
        return _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__["pairs"];
      });
      /* harmony import */


      var _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(
      /*! ./internal/observable/partition */
      "2QGa");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "partition", function () {
        return _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__["partition"];
      });
      /* harmony import */


      var _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(
      /*! ./internal/observable/race */
      "Nv8m");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "race", function () {
        return _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__["race"];
      });
      /* harmony import */


      var _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(
      /*! ./internal/observable/range */
      "NNCq");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "range", function () {
        return _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__["range"];
      });
      /* harmony import */


      var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(
      /*! ./internal/observable/throwError */
      "z6cu");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "throwError", function () {
        return _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__["throwError"];
      });
      /* harmony import */


      var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(
      /*! ./internal/observable/timer */
      "PqYM");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "timer", function () {
        return _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__["timer"];
      });
      /* harmony import */


      var _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(
      /*! ./internal/observable/using */
      "Qn8I");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "using", function () {
        return _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__["using"];
      });
      /* harmony import */


      var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(
      /*! ./internal/observable/zip */
      "1uah");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "zip", function () {
        return _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__["zip"];
      });
      /* harmony import */


      var _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(
      /*! ./internal/scheduled/scheduled */
      "7HRe");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "scheduled", function () {
        return _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__["scheduled"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "EMPTY", function () {
        return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["EMPTY"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "NEVER", function () {
        return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["NEVER"];
      });
      /* harmony import */


      var _internal_config__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(
      /*! ./internal/config */
      "2fFW");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "config", function () {
        return _internal_config__WEBPACK_IMPORTED_MODULE_52__["config"];
      }); //# sourceMappingURL=index.js.map

      /***/

    },

    /***/
    "qOnz":
    /*!*******************************************************!*\
      !*** ./node_modules/@firebase/util/dist/index.esm.js ***!
      \*******************************************************/

    /*! exports provided: CONSTANTS, Deferred, ErrorFactory, FirebaseError, MAX_VALUE_MILLIS, RANDOM_FACTOR, Sha1, areCookiesEnabled, assert, assertionError, async, base64, base64Decode, base64Encode, base64urlEncodeWithoutPadding, calculateBackoffMillis, contains, createMockUserToken, createSubscribe, decode, deepCopy, deepEqual, deepExtend, errorPrefix, extractQuerystring, getGlobal, getModularInstance, getUA, isAdmin, isBrowser, isBrowserExtension, isElectron, isEmpty, isIE, isIndexedDBAvailable, isMobileCordova, isNode, isNodeSdk, isReactNative, isSafari, isUWP, isValidFormat, isValidTimestamp, issuedAtTime, jsonEval, map, ordinal, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace */

    /***/
    function qOnz(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "CONSTANTS", function () {
        return CONSTANTS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Deferred", function () {
        return Deferred;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ErrorFactory", function () {
        return ErrorFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FirebaseError", function () {
        return FirebaseError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MAX_VALUE_MILLIS", function () {
        return MAX_VALUE_MILLIS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RANDOM_FACTOR", function () {
        return RANDOM_FACTOR;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Sha1", function () {
        return Sha1;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "areCookiesEnabled", function () {
        return areCookiesEnabled;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "assert", function () {
        return assert;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "assertionError", function () {
        return assertionError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "async", function () {
        return async;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "base64", function () {
        return base64;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "base64Decode", function () {
        return base64Decode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "base64Encode", function () {
        return base64Encode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "base64urlEncodeWithoutPadding", function () {
        return base64urlEncodeWithoutPadding;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "calculateBackoffMillis", function () {
        return calculateBackoffMillis;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "contains", function () {
        return contains;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "createMockUserToken", function () {
        return createMockUserToken;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "createSubscribe", function () {
        return createSubscribe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "decode", function () {
        return decode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "deepCopy", function () {
        return deepCopy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "deepEqual", function () {
        return deepEqual;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "deepExtend", function () {
        return deepExtend;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "errorPrefix", function () {
        return errorPrefix;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "extractQuerystring", function () {
        return extractQuerystring;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getGlobal", function () {
        return getGlobal;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getModularInstance", function () {
        return getModularInstance;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getUA", function () {
        return getUA;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isAdmin", function () {
        return isAdmin;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isBrowser", function () {
        return isBrowser;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isBrowserExtension", function () {
        return isBrowserExtension;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isElectron", function () {
        return isElectron;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isEmpty", function () {
        return isEmpty;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isIE", function () {
        return isIE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isIndexedDBAvailable", function () {
        return isIndexedDBAvailable;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isMobileCordova", function () {
        return isMobileCordova;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isNode", function () {
        return isNode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isNodeSdk", function () {
        return isNodeSdk;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isReactNative", function () {
        return isReactNative;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isSafari", function () {
        return isSafari;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isUWP", function () {
        return isUWP;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isValidFormat", function () {
        return isValidFormat;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isValidTimestamp", function () {
        return isValidTimestamp;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "issuedAtTime", function () {
        return issuedAtTime;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "jsonEval", function () {
        return jsonEval;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "map", function () {
        return map;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ordinal", function () {
        return ordinal;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "querystring", function () {
        return querystring;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "querystringDecode", function () {
        return querystringDecode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "safeGet", function () {
        return safeGet;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "stringLength", function () {
        return stringLength;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "stringToByteArray", function () {
        return stringToByteArray;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "stringify", function () {
        return stringify;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "validateArgCount", function () {
        return validateArgCount;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "validateCallback", function () {
        return validateCallback;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "validateContextObject", function () {
        return validateContextObject;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "validateIndexedDBOpenable", function () {
        return validateIndexedDBOpenable;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "validateNamespace", function () {
        return validateNamespace;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * @fileoverview Firebase constants.  Some of these (@defines) can be overridden at compile-time.
       */


      var CONSTANTS = {
        /**
         * @define {boolean} Whether this is the client Node.js SDK.
         */
        NODE_CLIENT: false,

        /**
         * @define {boolean} Whether this is the Admin Node.js SDK.
         */
        NODE_ADMIN: false,

        /**
         * Firebase SDK Version
         */
        SDK_VERSION: '${JSCORE_VERSION}'
      };
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Throws an error if the provided assertion is falsy
       */

      var assert = function assert(assertion, message) {
        if (!assertion) {
          throw assertionError(message);
        }
      };
      /**
       * Returns an Error object suitable for throwing.
       */


      var assertionError = function assertionError(message) {
        return new Error('Firebase Database (' + CONSTANTS.SDK_VERSION + ') INTERNAL ASSERT FAILED: ' + message);
      };
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var stringToByteArray$1 = function stringToByteArray$1(str) {
        // TODO(user): Use native implementations if/when available
        var out = [];
        var p = 0;

        for (var i = 0; i < str.length; i++) {
          var c = str.charCodeAt(i);

          if (c < 128) {
            out[p++] = c;
          } else if (c < 2048) {
            out[p++] = c >> 6 | 192;
            out[p++] = c & 63 | 128;
          } else if ((c & 0xfc00) === 0xd800 && i + 1 < str.length && (str.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {
            // Surrogate Pair
            c = 0x10000 + ((c & 0x03ff) << 10) + (str.charCodeAt(++i) & 0x03ff);
            out[p++] = c >> 18 | 240;
            out[p++] = c >> 12 & 63 | 128;
            out[p++] = c >> 6 & 63 | 128;
            out[p++] = c & 63 | 128;
          } else {
            out[p++] = c >> 12 | 224;
            out[p++] = c >> 6 & 63 | 128;
            out[p++] = c & 63 | 128;
          }
        }

        return out;
      };
      /**
       * Turns an array of numbers into the string given by the concatenation of the
       * characters to which the numbers correspond.
       * @param bytes Array of numbers representing characters.
       * @return Stringification of the array.
       */


      var byteArrayToString = function byteArrayToString(bytes) {
        // TODO(user): Use native implementations if/when available
        var out = [];
        var pos = 0,
            c = 0;

        while (pos < bytes.length) {
          var c1 = bytes[pos++];

          if (c1 < 128) {
            out[c++] = String.fromCharCode(c1);
          } else if (c1 > 191 && c1 < 224) {
            var c2 = bytes[pos++];
            out[c++] = String.fromCharCode((c1 & 31) << 6 | c2 & 63);
          } else if (c1 > 239 && c1 < 365) {
            // Surrogate Pair
            var c2 = bytes[pos++];
            var c3 = bytes[pos++];
            var c4 = bytes[pos++];
            var u = ((c1 & 7) << 18 | (c2 & 63) << 12 | (c3 & 63) << 6 | c4 & 63) - 0x10000;
            out[c++] = String.fromCharCode(0xd800 + (u >> 10));
            out[c++] = String.fromCharCode(0xdc00 + (u & 1023));
          } else {
            var c2 = bytes[pos++];
            var c3 = bytes[pos++];
            out[c++] = String.fromCharCode((c1 & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
          }
        }

        return out.join('');
      }; // We define it as an object literal instead of a class because a class compiled down to es5 can't
      // be treeshaked. https://github.com/rollup/rollup/issues/1691
      // Static lookup maps, lazily populated by init_()


      var base64 = {
        /**
         * Maps bytes to characters.
         */
        byteToCharMap_: null,

        /**
         * Maps characters to bytes.
         */
        charToByteMap_: null,

        /**
         * Maps bytes to websafe characters.
         * @private
         */
        byteToCharMapWebSafe_: null,

        /**
         * Maps websafe characters to bytes.
         * @private
         */
        charToByteMapWebSafe_: null,

        /**
         * Our default alphabet, shared between
         * ENCODED_VALS and ENCODED_VALS_WEBSAFE
         */
        ENCODED_VALS_BASE: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz' + '0123456789',

        /**
         * Our default alphabet. Value 64 (=) is special; it means "nothing."
         */
        get ENCODED_VALS() {
          return this.ENCODED_VALS_BASE + '+/=';
        },

        /**
         * Our websafe alphabet.
         */
        get ENCODED_VALS_WEBSAFE() {
          return this.ENCODED_VALS_BASE + '-_.';
        },

        /**
         * Whether this browser supports the atob and btoa functions. This extension
         * started at Mozilla but is now implemented by many browsers. We use the
         * ASSUME_* variables to avoid pulling in the full useragent detection library
         * but still allowing the standard per-browser compilations.
         *
         */
        HAS_NATIVE_SUPPORT: typeof atob === 'function',

        /**
         * Base64-encode an array of bytes.
         *
         * @param input An array of bytes (numbers with
         *     value in [0, 255]) to encode.
         * @param webSafe Boolean indicating we should use the
         *     alternative alphabet.
         * @return The base64 encoded string.
         */
        encodeByteArray: function encodeByteArray(input, webSafe) {
          if (!Array.isArray(input)) {
            throw Error('encodeByteArray takes an array as a parameter');
          }

          this.init_();
          var byteToCharMap = webSafe ? this.byteToCharMapWebSafe_ : this.byteToCharMap_;
          var output = [];

          for (var i = 0; i < input.length; i += 3) {
            var byte1 = input[i];
            var haveByte2 = i + 1 < input.length;
            var byte2 = haveByte2 ? input[i + 1] : 0;
            var haveByte3 = i + 2 < input.length;
            var byte3 = haveByte3 ? input[i + 2] : 0;
            var outByte1 = byte1 >> 2;
            var outByte2 = (byte1 & 0x03) << 4 | byte2 >> 4;
            var outByte3 = (byte2 & 0x0f) << 2 | byte3 >> 6;
            var outByte4 = byte3 & 0x3f;

            if (!haveByte3) {
              outByte4 = 64;

              if (!haveByte2) {
                outByte3 = 64;
              }
            }

            output.push(byteToCharMap[outByte1], byteToCharMap[outByte2], byteToCharMap[outByte3], byteToCharMap[outByte4]);
          }

          return output.join('');
        },

        /**
         * Base64-encode a string.
         *
         * @param input A string to encode.
         * @param webSafe If true, we should use the
         *     alternative alphabet.
         * @return The base64 encoded string.
         */
        encodeString: function encodeString(input, webSafe) {
          // Shortcut for Mozilla browsers that implement
          // a native base64 encoder in the form of "btoa/atob"
          if (this.HAS_NATIVE_SUPPORT && !webSafe) {
            return btoa(input);
          }

          return this.encodeByteArray(stringToByteArray$1(input), webSafe);
        },

        /**
         * Base64-decode a string.
         *
         * @param input to decode.
         * @param webSafe True if we should use the
         *     alternative alphabet.
         * @return string representing the decoded value.
         */
        decodeString: function decodeString(input, webSafe) {
          // Shortcut for Mozilla browsers that implement
          // a native base64 encoder in the form of "btoa/atob"
          if (this.HAS_NATIVE_SUPPORT && !webSafe) {
            return atob(input);
          }

          return byteArrayToString(this.decodeStringToByteArray(input, webSafe));
        },

        /**
         * Base64-decode a string.
         *
         * In base-64 decoding, groups of four characters are converted into three
         * bytes.  If the encoder did not apply padding, the input length may not
         * be a multiple of 4.
         *
         * In this case, the last group will have fewer than 4 characters, and
         * padding will be inferred.  If the group has one or two characters, it decodes
         * to one byte.  If the group has three characters, it decodes to two bytes.
         *
         * @param input Input to decode.
         * @param webSafe True if we should use the web-safe alphabet.
         * @return bytes representing the decoded value.
         */
        decodeStringToByteArray: function decodeStringToByteArray(input, webSafe) {
          this.init_();
          var charToByteMap = webSafe ? this.charToByteMapWebSafe_ : this.charToByteMap_;
          var output = [];

          for (var i = 0; i < input.length;) {
            var byte1 = charToByteMap[input.charAt(i++)];
            var haveByte2 = i < input.length;
            var byte2 = haveByte2 ? charToByteMap[input.charAt(i)] : 0;
            ++i;
            var haveByte3 = i < input.length;
            var byte3 = haveByte3 ? charToByteMap[input.charAt(i)] : 64;
            ++i;
            var haveByte4 = i < input.length;
            var byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;
            ++i;

            if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {
              throw Error();
            }

            var outByte1 = byte1 << 2 | byte2 >> 4;
            output.push(outByte1);

            if (byte3 !== 64) {
              var outByte2 = byte2 << 4 & 0xf0 | byte3 >> 2;
              output.push(outByte2);

              if (byte4 !== 64) {
                var outByte3 = byte3 << 6 & 0xc0 | byte4;
                output.push(outByte3);
              }
            }
          }

          return output;
        },

        /**
         * Lazy static initialization function. Called before
         * accessing any of the static map variables.
         * @private
         */
        init_: function init_() {
          if (!this.byteToCharMap_) {
            this.byteToCharMap_ = {};
            this.charToByteMap_ = {};
            this.byteToCharMapWebSafe_ = {};
            this.charToByteMapWebSafe_ = {}; // We want quick mappings back and forth, so we precompute two maps.

            for (var i = 0; i < this.ENCODED_VALS.length; i++) {
              this.byteToCharMap_[i] = this.ENCODED_VALS.charAt(i);
              this.charToByteMap_[this.byteToCharMap_[i]] = i;
              this.byteToCharMapWebSafe_[i] = this.ENCODED_VALS_WEBSAFE.charAt(i);
              this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[i]] = i; // Be forgiving when decoding and correctly decode both encodings.

              if (i >= this.ENCODED_VALS_BASE.length) {
                this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)] = i;
                this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)] = i;
              }
            }
          }
        }
      };
      /**
       * URL-safe base64 encoding
       */

      var base64Encode = function base64Encode(str) {
        var utf8Bytes = stringToByteArray$1(str);
        return base64.encodeByteArray(utf8Bytes, true);
      };
      /**
       * URL-safe base64 encoding (without "." padding in the end).
       * e.g. Used in JSON Web Token (JWT) parts.
       */


      var base64urlEncodeWithoutPadding = function base64urlEncodeWithoutPadding(str) {
        // Use base64url encoding and remove padding in the end (dot characters).
        return base64Encode(str).replace(/\./g, '');
      };
      /**
       * URL-safe base64 decoding
       *
       * NOTE: DO NOT use the global atob() function - it does NOT support the
       * base64Url variant encoding.
       *
       * @param str To be decoded
       * @return Decoded result, if possible
       */


      var base64Decode = function base64Decode(str) {
        try {
          return base64.decodeString(str, true);
        } catch (e) {
          console.error('base64Decode failed: ', e);
        }

        return null;
      };
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Do a deep-copy of basic JavaScript Objects or Arrays.
       */


      function deepCopy(value) {
        return deepExtend(undefined, value);
      }
      /**
       * Copy properties from source to target (recursively allows extension
       * of Objects and Arrays).  Scalar values in the target are over-written.
       * If target is undefined, an object of the appropriate type will be created
       * (and returned).
       *
       * We recursively copy all child properties of plain Objects in the source- so
       * that namespace- like dictionaries are merged.
       *
       * Note that the target can be a function, in which case the properties in
       * the source Object are copied onto it as static properties of the Function.
       *
       * Note: we don't merge __proto__ to prevent prototype pollution
       */


      function deepExtend(target, source) {
        if (!(source instanceof Object)) {
          return source;
        }

        switch (source.constructor) {
          case Date:
            // Treat Dates like scalars; if the target date object had any child
            // properties - they will be lost!
            var dateValue = source;
            return new Date(dateValue.getTime());

          case Object:
            if (target === undefined) {
              target = {};
            }

            break;

          case Array:
            // Always copy the array source and overwrite the target.
            target = [];
            break;

          default:
            // Not a plain Object - treat it as a scalar.
            return source;
        }

        for (var prop in source) {
          // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202
          if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {
            continue;
          }

          target[prop] = deepExtend(target[prop], source[prop]);
        }

        return target;
      }

      function isValidKey(key) {
        return key !== '__proto__';
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var Deferred =
      /** @class */
      function () {
        function Deferred() {
          var _this = this;

          this.reject = function () {};

          this.resolve = function () {};

          this.promise = new Promise(function (resolve, reject) {
            _this.resolve = resolve;
            _this.reject = reject;
          });
        }
        /**
         * Our API internals are not promiseified and cannot because our callback APIs have subtle expectations around
         * invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback
         * and returns a node-style callback which will resolve or reject the Deferred's promise.
         */


        Deferred.prototype.wrapCallback = function (callback) {
          var _this = this;

          return function (error, value) {
            if (error) {
              _this.reject(error);
            } else {
              _this.resolve(value);
            }

            if (typeof callback === 'function') {
              // Attaching noop handler just in case developer wasn't expecting
              // promises
              _this.promise["catch"](function () {}); // Some of our callbacks don't expect a value and our own tests
              // assert that the parameter length is 1


              if (callback.length === 1) {
                callback(error);
              } else {
                callback(error, value);
              }
            }
          };
        };

        return Deferred;
      }();
      /**
       * @license
       * Copyright 2021 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      function createMockUserToken(token, projectId) {
        if (token.uid) {
          throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');
        } // Unsecured JWTs use "none" as the algorithm.


        var header = {
          alg: 'none',
          type: 'JWT'
        };
        var project = projectId || 'demo-project';
        var iat = token.iat || 0;
        var sub = token.sub || token.user_id;

        if (!sub) {
          throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");
        }

        var payload = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
          // Set all required fields to decent defaults
          iss: "https://securetoken.google.com/" + project,
          aud: project,
          iat: iat,
          exp: iat + 3600,
          auth_time: iat,
          sub: sub,
          user_id: sub,
          firebase: {
            sign_in_provider: 'custom',
            identities: {}
          }
        }, token); // Unsecured JWTs use the empty string as a signature.

        var signature = '';
        return [base64urlEncodeWithoutPadding(JSON.stringify(header)), base64urlEncodeWithoutPadding(JSON.stringify(payload)), signature].join('.');
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Returns navigator.userAgent string or '' if it's not defined.
       * @return user agent string
       */


      function getUA() {
        if (typeof navigator !== 'undefined' && typeof navigator['userAgent'] === 'string') {
          return navigator['userAgent'];
        } else {
          return '';
        }
      }
      /**
       * Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.
       *
       * Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap
       * in the Ripple emulator) nor Cordova `onDeviceReady`, which would normally
       * wait for a callback.
       */


      function isMobileCordova() {
        return typeof window !== 'undefined' && // @ts-ignore Setting up an broadly applicable index signature for Window
        // just to deal with this case would probably be a bad idea.
        !!(window['cordova'] || window['phonegap'] || window['PhoneGap']) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA());
      }
      /**
       * Detect Node.js.
       *
       * @return true if Node.js environment is detected.
       */
      // Node detection logic from: https://github.com/iliakan/detect-node/


      function isNode() {
        try {
          return Object.prototype.toString.call(global.process) === '[object process]';
        } catch (e) {
          return false;
        }
      }
      /**
       * Detect Browser Environment
       */


      function isBrowser() {
        return typeof self === 'object' && self.self === self;
      }

      function isBrowserExtension() {
        var runtime = typeof chrome === 'object' ? chrome.runtime : typeof browser === 'object' ? browser.runtime : undefined;
        return typeof runtime === 'object' && runtime.id !== undefined;
      }
      /**
       * Detect React Native.
       *
       * @return true if ReactNative environment is detected.
       */


      function isReactNative() {
        return typeof navigator === 'object' && navigator['product'] === 'ReactNative';
      }
      /** Detects Electron apps. */


      function isElectron() {
        return getUA().indexOf('Electron/') >= 0;
      }
      /** Detects Internet Explorer. */


      function isIE() {
        var ua = getUA();
        return ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;
      }
      /** Detects Universal Windows Platform apps. */


      function isUWP() {
        return getUA().indexOf('MSAppHost/') >= 0;
      }
      /**
       * Detect whether the current SDK build is the Node version.
       *
       * @return true if it's the Node SDK build.
       */


      function isNodeSdk() {
        return CONSTANTS.NODE_CLIENT === true || CONSTANTS.NODE_ADMIN === true;
      }
      /** Returns true if we are running in Safari. */


      function isSafari() {
        return !isNode() && navigator.userAgent.includes('Safari') && !navigator.userAgent.includes('Chrome');
      }
      /**
       * This method checks if indexedDB is supported by current browser/service worker context
       * @return true if indexedDB is supported by current browser/service worker context
       */


      function isIndexedDBAvailable() {
        return 'indexedDB' in self && indexedDB != null;
      }
      /**
       * This method validates browser/sw context for indexedDB by opening a dummy indexedDB database and reject
       * if errors occur during the database open operation.
       *
       * @throws exception if current browser/sw context can't run idb.open (ex: Safari iframe, Firefox
       * private browsing)
       */


      function validateIndexedDBOpenable() {
        return new Promise(function (resolve, reject) {
          try {
            var preExist_1 = true;
            var DB_CHECK_NAME_1 = 'validate-browser-context-for-indexeddb-analytics-module';
            var request_1 = self.indexedDB.open(DB_CHECK_NAME_1);

            request_1.onsuccess = function () {
              request_1.result.close(); // delete database only when it doesn't pre-exist

              if (!preExist_1) {
                self.indexedDB.deleteDatabase(DB_CHECK_NAME_1);
              }

              resolve(true);
            };

            request_1.onupgradeneeded = function () {
              preExist_1 = false;
            };

            request_1.onerror = function () {
              var _a;

              reject(((_a = request_1.error) === null || _a === void 0 ? void 0 : _a.message) || '');
            };
          } catch (error) {
            reject(error);
          }
        });
      }
      /**
       *
       * This method checks whether cookie is enabled within current browser
       * @return true if cookie is enabled within current browser
       */


      function areCookiesEnabled() {
        if (!navigator || !navigator.cookieEnabled) {
          return false;
        }

        return true;
      }
      /**
       * Polyfill for `globalThis` object.
       * @returns the `globalThis` object for the given environment.
       */


      function getGlobal() {
        if (typeof self !== 'undefined') {
          return self;
        }

        if (typeof window !== 'undefined') {
          return window;
        }

        if (typeof global !== 'undefined') {
          return global;
        }

        throw new Error('Unable to locate global object.');
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var ERROR_NAME = 'FirebaseError'; // Based on code from:
      // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types

      var FirebaseError =
      /** @class */
      function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FirebaseError, _super);

        function FirebaseError(code, message, customData) {
          var _this = _super.call(this, message) || this;

          _this.code = code;
          _this.customData = customData;
          _this.name = ERROR_NAME; // Fix For ES5
          // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work

          Object.setPrototypeOf(_this, FirebaseError.prototype); // Maintains proper stack trace for where our error was thrown.
          // Only available on V8.

          if (Error.captureStackTrace) {
            Error.captureStackTrace(_this, ErrorFactory.prototype.create);
          }

          return _this;
        }

        return FirebaseError;
      }(Error);

      var ErrorFactory =
      /** @class */
      function () {
        function ErrorFactory(service, serviceName, errors) {
          this.service = service;
          this.serviceName = serviceName;
          this.errors = errors;
        }

        ErrorFactory.prototype.create = function (code) {
          var data = [];

          for (var _i = 1; _i < arguments.length; _i++) {
            data[_i - 1] = arguments[_i];
          }

          var customData = data[0] || {};
          var fullCode = this.service + "/" + code;
          var template = this.errors[code];
          var message = template ? replaceTemplate(template, customData) : 'Error'; // Service Name: Error message (service/code).

          var fullMessage = this.serviceName + ": " + message + " (" + fullCode + ").";
          var error = new FirebaseError(fullCode, fullMessage, customData);
          return error;
        };

        return ErrorFactory;
      }();

      function replaceTemplate(template, data) {
        return template.replace(PATTERN, function (_, key) {
          var value = data[key];
          return value != null ? String(value) : "<" + key + "?>";
        });
      }

      var PATTERN = /\{\$([^}]+)}/g;
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Evaluates a JSON string into a javascript object.
       *
       * @param {string} str A string containing JSON.
       * @return {*} The javascript object representing the specified JSON.
       */

      function jsonEval(str) {
        return JSON.parse(str);
      }
      /**
       * Returns JSON representing a javascript object.
       * @param {*} data Javascript object to be stringified.
       * @return {string} The JSON contents of the object.
       */


      function stringify(data) {
        return JSON.stringify(data);
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Decodes a Firebase auth. token into constituent parts.
       *
       * Notes:
       * - May return with invalid / incomplete claims if there's no native base64 decoding support.
       * - Doesn't check if the token is actually valid.
       */


      var decode = function decode(token) {
        var header = {},
            claims = {},
            data = {},
            signature = '';

        try {
          var parts = token.split('.');
          header = jsonEval(base64Decode(parts[0]) || '');
          claims = jsonEval(base64Decode(parts[1]) || '');
          signature = parts[2];
          data = claims['d'] || {};
          delete claims['d'];
        } catch (e) {}

        return {
          header: header,
          claims: claims,
          data: data,
          signature: signature
        };
      };
      /**
       * Decodes a Firebase auth. token and checks the validity of its time-based claims. Will return true if the
       * token is within the time window authorized by the 'nbf' (not-before) and 'iat' (issued-at) claims.
       *
       * Notes:
       * - May return a false negative if there's no native base64 decoding support.
       * - Doesn't check if the token is actually valid.
       */


      var isValidTimestamp = function isValidTimestamp(token) {
        var claims = decode(token).claims;
        var now = Math.floor(new Date().getTime() / 1000);
        var validSince = 0,
            validUntil = 0;

        if (typeof claims === 'object') {
          if (claims.hasOwnProperty('nbf')) {
            validSince = claims['nbf'];
          } else if (claims.hasOwnProperty('iat')) {
            validSince = claims['iat'];
          }

          if (claims.hasOwnProperty('exp')) {
            validUntil = claims['exp'];
          } else {
            // token will expire after 24h by default
            validUntil = validSince + 86400;
          }
        }

        return !!now && !!validSince && !!validUntil && now >= validSince && now <= validUntil;
      };
      /**
       * Decodes a Firebase auth. token and returns its issued at time if valid, null otherwise.
       *
       * Notes:
       * - May return null if there's no native base64 decoding support.
       * - Doesn't check if the token is actually valid.
       */


      var issuedAtTime = function issuedAtTime(token) {
        var claims = decode(token).claims;

        if (typeof claims === 'object' && claims.hasOwnProperty('iat')) {
          return claims['iat'];
        }

        return null;
      };
      /**
       * Decodes a Firebase auth. token and checks the validity of its format. Expects a valid issued-at time.
       *
       * Notes:
       * - May return a false negative if there's no native base64 decoding support.
       * - Doesn't check if the token is actually valid.
       */


      var isValidFormat = function isValidFormat(token) {
        var decoded = decode(token),
            claims = decoded.claims;
        return !!claims && typeof claims === 'object' && claims.hasOwnProperty('iat');
      };
      /**
       * Attempts to peer into an auth token and determine if it's an admin auth token by looking at the claims portion.
       *
       * Notes:
       * - May return a false negative if there's no native base64 decoding support.
       * - Doesn't check if the token is actually valid.
       */


      var isAdmin = function isAdmin(token) {
        var claims = decode(token).claims;
        return typeof claims === 'object' && claims['admin'] === true;
      };
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      function contains(obj, key) {
        return Object.prototype.hasOwnProperty.call(obj, key);
      }

      function safeGet(obj, key) {
        if (Object.prototype.hasOwnProperty.call(obj, key)) {
          return obj[key];
        } else {
          return undefined;
        }
      }

      function isEmpty(obj) {
        for (var key in obj) {
          if (Object.prototype.hasOwnProperty.call(obj, key)) {
            return false;
          }
        }

        return true;
      }

      function map(obj, fn, contextObj) {
        var res = {};

        for (var key in obj) {
          if (Object.prototype.hasOwnProperty.call(obj, key)) {
            res[key] = fn.call(contextObj, obj[key], key, obj);
          }
        }

        return res;
      }
      /**
       * Deep equal two objects. Support Arrays and Objects.
       */


      function deepEqual(a, b) {
        if (a === b) {
          return true;
        }

        var aKeys = Object.keys(a);
        var bKeys = Object.keys(b);

        for (var _i = 0, aKeys_1 = aKeys; _i < aKeys_1.length; _i++) {
          var k = aKeys_1[_i];

          if (!bKeys.includes(k)) {
            return false;
          }

          var aProp = a[k];
          var bProp = b[k];

          if (isObject(aProp) && isObject(bProp)) {
            if (!deepEqual(aProp, bProp)) {
              return false;
            }
          } else if (aProp !== bProp) {
            return false;
          }
        }

        for (var _a = 0, bKeys_1 = bKeys; _a < bKeys_1.length; _a++) {
          var k = bKeys_1[_a];

          if (!aKeys.includes(k)) {
            return false;
          }
        }

        return true;
      }

      function isObject(thing) {
        return thing !== null && typeof thing === 'object';
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Returns a querystring-formatted string (e.g. &arg=val&arg2=val2) from a
       * params object (e.g. {arg: 'val', arg2: 'val2'})
       * Note: You must prepend it with ? when adding it to a URL.
       */


      function querystring(querystringParams) {
        var params = [];

        var _loop_1 = function _loop_1(key, value) {
          if (Array.isArray(value)) {
            value.forEach(function (arrayVal) {
              params.push(encodeURIComponent(key) + '=' + encodeURIComponent(arrayVal));
            });
          } else {
            params.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
          }
        };

        for (var _i = 0, _a = Object.entries(querystringParams); _i < _a.length; _i++) {
          var _b = _a[_i],
              key = _b[0],
              value = _b[1];

          _loop_1(key, value);
        }

        return params.length ? '&' + params.join('&') : '';
      }
      /**
       * Decodes a querystring (e.g. ?arg=val&arg2=val2) into a params object
       * (e.g. {arg: 'val', arg2: 'val2'})
       */


      function querystringDecode(querystring) {
        var obj = {};
        var tokens = querystring.replace(/^\?/, '').split('&');
        tokens.forEach(function (token) {
          if (token) {
            var _a = token.split('='),
                key = _a[0],
                value = _a[1];

            obj[decodeURIComponent(key)] = decodeURIComponent(value);
          }
        });
        return obj;
      }
      /**
       * Extract the query string part of a URL, including the leading question mark (if present).
       */


      function extractQuerystring(url) {
        var queryStart = url.indexOf('?');

        if (!queryStart) {
          return '';
        }

        var fragmentStart = url.indexOf('#', queryStart);
        return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * @fileoverview SHA-1 cryptographic hash.
       * Variable names follow the notation in FIPS PUB 180-3:
       * http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf.
       *
       * Usage:
       *   var sha1 = new sha1();
       *   sha1.update(bytes);
       *   var hash = sha1.digest();
       *
       * Performance:
       *   Chrome 23:   ~400 Mbit/s
       *   Firefox 16:  ~250 Mbit/s
       *
       */

      /**
       * SHA-1 cryptographic hash constructor.
       *
       * The properties declared here are discussed in the above algorithm document.
       * @constructor
       * @final
       * @struct
       */


      var Sha1 =
      /** @class */
      function () {
        function Sha1() {
          /**
           * Holds the previous values of accumulated variables a-e in the compress_
           * function.
           * @private
           */
          this.chain_ = [];
          /**
           * A buffer holding the partially computed hash result.
           * @private
           */

          this.buf_ = [];
          /**
           * An array of 80 bytes, each a part of the message to be hashed.  Referred to
           * as the message schedule in the docs.
           * @private
           */

          this.W_ = [];
          /**
           * Contains data needed to pad messages less than 64 bytes.
           * @private
           */

          this.pad_ = [];
          /**
           * @private {number}
           */

          this.inbuf_ = 0;
          /**
           * @private {number}
           */

          this.total_ = 0;
          this.blockSize = 512 / 8;
          this.pad_[0] = 128;

          for (var i = 1; i < this.blockSize; ++i) {
            this.pad_[i] = 0;
          }

          this.reset();
        }

        Sha1.prototype.reset = function () {
          this.chain_[0] = 0x67452301;
          this.chain_[1] = 0xefcdab89;
          this.chain_[2] = 0x98badcfe;
          this.chain_[3] = 0x10325476;
          this.chain_[4] = 0xc3d2e1f0;
          this.inbuf_ = 0;
          this.total_ = 0;
        };
        /**
         * Internal compress helper function.
         * @param buf Block to compress.
         * @param offset Offset of the block in the buffer.
         * @private
         */


        Sha1.prototype.compress_ = function (buf, offset) {
          if (!offset) {
            offset = 0;
          }

          var W = this.W_; // get 16 big endian words

          if (typeof buf === 'string') {
            for (var i = 0; i < 16; i++) {
              // TODO(user): [bug 8140122] Recent versions of Safari for Mac OS and iOS
              // have a bug that turns the post-increment ++ operator into pre-increment
              // during JIT compilation.  We have code that depends heavily on SHA-1 for
              // correctness and which is affected by this bug, so I've removed all uses
              // of post-increment ++ in which the result value is used.  We can revert
              // this change once the Safari bug
              // (https://bugs.webkit.org/show_bug.cgi?id=109036) has been fixed and
              // most clients have been updated.
              W[i] = buf.charCodeAt(offset) << 24 | buf.charCodeAt(offset + 1) << 16 | buf.charCodeAt(offset + 2) << 8 | buf.charCodeAt(offset + 3);
              offset += 4;
            }
          } else {
            for (var i = 0; i < 16; i++) {
              W[i] = buf[offset] << 24 | buf[offset + 1] << 16 | buf[offset + 2] << 8 | buf[offset + 3];
              offset += 4;
            }
          } // expand to 80 words


          for (var i = 16; i < 80; i++) {
            var t = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
            W[i] = (t << 1 | t >>> 31) & 0xffffffff;
          }

          var a = this.chain_[0];
          var b = this.chain_[1];
          var c = this.chain_[2];
          var d = this.chain_[3];
          var e = this.chain_[4];
          var f, k; // TODO(user): Try to unroll this loop to speed up the computation.

          for (var i = 0; i < 80; i++) {
            if (i < 40) {
              if (i < 20) {
                f = d ^ b & (c ^ d);
                k = 0x5a827999;
              } else {
                f = b ^ c ^ d;
                k = 0x6ed9eba1;
              }
            } else {
              if (i < 60) {
                f = b & c | d & (b | c);
                k = 0x8f1bbcdc;
              } else {
                f = b ^ c ^ d;
                k = 0xca62c1d6;
              }
            }

            var t = (a << 5 | a >>> 27) + f + e + k + W[i] & 0xffffffff;
            e = d;
            d = c;
            c = (b << 30 | b >>> 2) & 0xffffffff;
            b = a;
            a = t;
          }

          this.chain_[0] = this.chain_[0] + a & 0xffffffff;
          this.chain_[1] = this.chain_[1] + b & 0xffffffff;
          this.chain_[2] = this.chain_[2] + c & 0xffffffff;
          this.chain_[3] = this.chain_[3] + d & 0xffffffff;
          this.chain_[4] = this.chain_[4] + e & 0xffffffff;
        };

        Sha1.prototype.update = function (bytes, length) {
          // TODO(johnlenz): tighten the function signature and remove this check
          if (bytes == null) {
            return;
          }

          if (length === undefined) {
            length = bytes.length;
          }

          var lengthMinusBlock = length - this.blockSize;
          var n = 0; // Using local instead of member variables gives ~5% speedup on Firefox 16.

          var buf = this.buf_;
          var inbuf = this.inbuf_; // The outer while loop should execute at most twice.

          while (n < length) {
            // When we have no data in the block to top up, we can directly process the
            // input buffer (assuming it contains sufficient data). This gives ~25%
            // speedup on Chrome 23 and ~15% speedup on Firefox 16, but requires that
            // the data is provided in large chunks (or in multiples of 64 bytes).
            if (inbuf === 0) {
              while (n <= lengthMinusBlock) {
                this.compress_(bytes, n);
                n += this.blockSize;
              }
            }

            if (typeof bytes === 'string') {
              while (n < length) {
                buf[inbuf] = bytes.charCodeAt(n);
                ++inbuf;
                ++n;

                if (inbuf === this.blockSize) {
                  this.compress_(buf);
                  inbuf = 0; // Jump to the outer loop so we use the full-block optimization.

                  break;
                }
              }
            } else {
              while (n < length) {
                buf[inbuf] = bytes[n];
                ++inbuf;
                ++n;

                if (inbuf === this.blockSize) {
                  this.compress_(buf);
                  inbuf = 0; // Jump to the outer loop so we use the full-block optimization.

                  break;
                }
              }
            }
          }

          this.inbuf_ = inbuf;
          this.total_ += length;
        };
        /** @override */


        Sha1.prototype.digest = function () {
          var digest = [];
          var totalBits = this.total_ * 8; // Add pad 0x80 0x00*.

          if (this.inbuf_ < 56) {
            this.update(this.pad_, 56 - this.inbuf_);
          } else {
            this.update(this.pad_, this.blockSize - (this.inbuf_ - 56));
          } // Add # bits.


          for (var i = this.blockSize - 1; i >= 56; i--) {
            this.buf_[i] = totalBits & 255;
            totalBits /= 256; // Don't use bit-shifting here!
          }

          this.compress_(this.buf_);
          var n = 0;

          for (var i = 0; i < 5; i++) {
            for (var j = 24; j >= 0; j -= 8) {
              digest[n] = this.chain_[i] >> j & 255;
              ++n;
            }
          }

          return digest;
        };

        return Sha1;
      }();
      /**
       * Helper to make a Subscribe function (just like Promise helps make a
       * Thenable).
       *
       * @param executor Function which can make calls to a single Observer
       *     as a proxy.
       * @param onNoObservers Callback when count of Observers goes to zero.
       */


      function createSubscribe(executor, onNoObservers) {
        var proxy = new ObserverProxy(executor, onNoObservers);
        return proxy.subscribe.bind(proxy);
      }
      /**
       * Implement fan-out for any number of Observers attached via a subscribe
       * function.
       */


      var ObserverProxy =
      /** @class */
      function () {
        /**
         * @param executor Function which can make calls to a single Observer
         *     as a proxy.
         * @param onNoObservers Callback when count of Observers goes to zero.
         */
        function ObserverProxy(executor, onNoObservers) {
          var _this = this;

          this.observers = [];
          this.unsubscribes = [];
          this.observerCount = 0; // Micro-task scheduling by calling task.then().

          this.task = Promise.resolve();
          this.finalized = false;
          this.onNoObservers = onNoObservers; // Call the executor asynchronously so subscribers that are called
          // synchronously after the creation of the subscribe function
          // can still receive the very first value generated in the executor.

          this.task.then(function () {
            executor(_this);
          })["catch"](function (e) {
            _this.error(e);
          });
        }

        ObserverProxy.prototype.next = function (value) {
          this.forEachObserver(function (observer) {
            observer.next(value);
          });
        };

        ObserverProxy.prototype.error = function (error) {
          this.forEachObserver(function (observer) {
            observer.error(error);
          });
          this.close(error);
        };

        ObserverProxy.prototype.complete = function () {
          this.forEachObserver(function (observer) {
            observer.complete();
          });
          this.close();
        };
        /**
         * Subscribe function that can be used to add an Observer to the fan-out list.
         *
         * - We require that no event is sent to a subscriber sychronously to their
         *   call to subscribe().
         */


        ObserverProxy.prototype.subscribe = function (nextOrObserver, error, complete) {
          var _this = this;

          var observer;

          if (nextOrObserver === undefined && error === undefined && complete === undefined) {
            throw new Error('Missing Observer.');
          } // Assemble an Observer object when passed as callback functions.


          if (implementsAnyMethods(nextOrObserver, ['next', 'error', 'complete'])) {
            observer = nextOrObserver;
          } else {
            observer = {
              next: nextOrObserver,
              error: error,
              complete: complete
            };
          }

          if (observer.next === undefined) {
            observer.next = noop;
          }

          if (observer.error === undefined) {
            observer.error = noop;
          }

          if (observer.complete === undefined) {
            observer.complete = noop;
          }

          var unsub = this.unsubscribeOne.bind(this, this.observers.length); // Attempt to subscribe to a terminated Observable - we
          // just respond to the Observer with the final error or complete
          // event.

          if (this.finalized) {
            // eslint-disable-next-line @typescript-eslint/no-floating-promises
            this.task.then(function () {
              try {
                if (_this.finalError) {
                  observer.error(_this.finalError);
                } else {
                  observer.complete();
                }
              } catch (e) {// nothing
              }

              return;
            });
          }

          this.observers.push(observer);
          return unsub;
        }; // Unsubscribe is synchronous - we guarantee that no events are sent to
        // any unsubscribed Observer.


        ObserverProxy.prototype.unsubscribeOne = function (i) {
          if (this.observers === undefined || this.observers[i] === undefined) {
            return;
          }

          delete this.observers[i];
          this.observerCount -= 1;

          if (this.observerCount === 0 && this.onNoObservers !== undefined) {
            this.onNoObservers(this);
          }
        };

        ObserverProxy.prototype.forEachObserver = function (fn) {
          if (this.finalized) {
            // Already closed by previous event....just eat the additional values.
            return;
          } // Since sendOne calls asynchronously - there is no chance that
          // this.observers will become undefined.


          for (var i = 0; i < this.observers.length; i++) {
            this.sendOne(i, fn);
          }
        }; // Call the Observer via one of it's callback function. We are careful to
        // confirm that the observe has not been unsubscribed since this asynchronous
        // function had been queued.


        ObserverProxy.prototype.sendOne = function (i, fn) {
          var _this = this; // Execute the callback asynchronously
          // eslint-disable-next-line @typescript-eslint/no-floating-promises


          this.task.then(function () {
            if (_this.observers !== undefined && _this.observers[i] !== undefined) {
              try {
                fn(_this.observers[i]);
              } catch (e) {
                // Ignore exceptions raised in Observers or missing methods of an
                // Observer.
                // Log error to console. b/31404806
                if (typeof console !== 'undefined' && console.error) {
                  console.error(e);
                }
              }
            }
          });
        };

        ObserverProxy.prototype.close = function (err) {
          var _this = this;

          if (this.finalized) {
            return;
          }

          this.finalized = true;

          if (err !== undefined) {
            this.finalError = err;
          } // Proxy is no longer needed - garbage collect references
          // eslint-disable-next-line @typescript-eslint/no-floating-promises


          this.task.then(function () {
            _this.observers = undefined;
            _this.onNoObservers = undefined;
          });
        };

        return ObserverProxy;
      }();
      /** Turn synchronous function into one called asynchronously. */
      // eslint-disable-next-line @typescript-eslint/ban-types


      function async(fn, onError) {
        return function () {
          var args = [];

          for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
          }

          Promise.resolve(true).then(function () {
            fn.apply(void 0, args);
          })["catch"](function (error) {
            if (onError) {
              onError(error);
            }
          });
        };
      }
      /**
       * Return true if the object passed in implements any of the named methods.
       */


      function implementsAnyMethods(obj, methods) {
        if (typeof obj !== 'object' || obj === null) {
          return false;
        }

        for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {
          var method = methods_1[_i];

          if (method in obj && typeof obj[method] === 'function') {
            return true;
          }
        }

        return false;
      }

      function noop() {// do nothing
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Check to make sure the appropriate number of arguments are provided for a public function.
       * Throws an error if it fails.
       *
       * @param fnName The function name
       * @param minCount The minimum number of arguments to allow for the function call
       * @param maxCount The maximum number of argument to allow for the function call
       * @param argCount The actual number of arguments provided.
       */


      var validateArgCount = function validateArgCount(fnName, minCount, maxCount, argCount) {
        var argError;

        if (argCount < minCount) {
          argError = 'at least ' + minCount;
        } else if (argCount > maxCount) {
          argError = maxCount === 0 ? 'none' : 'no more than ' + maxCount;
        }

        if (argError) {
          var error = fnName + ' failed: Was called with ' + argCount + (argCount === 1 ? ' argument.' : ' arguments.') + ' Expects ' + argError + '.';
          throw new Error(error);
        }
      };
      /**
       * Generates a string to prefix an error message about failed argument validation
       *
       * @param fnName The function name
       * @param argName The name of the argument
       * @return The prefix to add to the error thrown for validation.
       */


      function errorPrefix(fnName, argName) {
        return fnName + " failed: " + argName + " argument ";
      }
      /**
       * @param fnName
       * @param argumentNumber
       * @param namespace
       * @param optional
       */


      function validateNamespace(fnName, namespace, optional) {
        if (optional && !namespace) {
          return;
        }

        if (typeof namespace !== 'string') {
          //TODO: I should do more validation here. We only allow certain chars in namespaces.
          throw new Error(errorPrefix(fnName, 'namespace') + 'must be a valid firebase namespace.');
        }
      }

      function validateCallback(fnName, argumentName, // eslint-disable-next-line @typescript-eslint/ban-types
      callback, optional) {
        if (optional && !callback) {
          return;
        }

        if (typeof callback !== 'function') {
          throw new Error(errorPrefix(fnName, argumentName) + 'must be a valid function.');
        }
      }

      function validateContextObject(fnName, argumentName, context, optional) {
        if (optional && !context) {
          return;
        }

        if (typeof context !== 'object' || context === null) {
          throw new Error(errorPrefix(fnName, argumentName) + 'must be a valid context object.');
        }
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */
      // Code originally came from goog.crypt.stringToUtf8ByteArray, but for some reason they
      // automatically replaced '\r\n' with '\n', and they didn't handle surrogate pairs,
      // so it's been modified.
      // Note that not all Unicode characters appear as single characters in JavaScript strings.
      // fromCharCode returns the UTF-16 encoding of a character - so some Unicode characters
      // use 2 characters in Javascript.  All 4-byte UTF-8 characters begin with a first
      // character in the range 0xD800 - 0xDBFF (the first character of a so-called surrogate
      // pair).
      // See http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3

      /**
       * @param {string} str
       * @return {Array}
       */


      var stringToByteArray = function stringToByteArray(str) {
        var out = [];
        var p = 0;

        for (var i = 0; i < str.length; i++) {
          var c = str.charCodeAt(i); // Is this the lead surrogate in a surrogate pair?

          if (c >= 0xd800 && c <= 0xdbff) {
            var high = c - 0xd800; // the high 10 bits.

            i++;
            assert(i < str.length, 'Surrogate pair missing trail surrogate.');
            var low = str.charCodeAt(i) - 0xdc00; // the low 10 bits.

            c = 0x10000 + (high << 10) + low;
          }

          if (c < 128) {
            out[p++] = c;
          } else if (c < 2048) {
            out[p++] = c >> 6 | 192;
            out[p++] = c & 63 | 128;
          } else if (c < 65536) {
            out[p++] = c >> 12 | 224;
            out[p++] = c >> 6 & 63 | 128;
            out[p++] = c & 63 | 128;
          } else {
            out[p++] = c >> 18 | 240;
            out[p++] = c >> 12 & 63 | 128;
            out[p++] = c >> 6 & 63 | 128;
            out[p++] = c & 63 | 128;
          }
        }

        return out;
      };
      /**
       * Calculate length without actually converting; useful for doing cheaper validation.
       * @param {string} str
       * @return {number}
       */


      var stringLength = function stringLength(str) {
        var p = 0;

        for (var i = 0; i < str.length; i++) {
          var c = str.charCodeAt(i);

          if (c < 128) {
            p++;
          } else if (c < 2048) {
            p += 2;
          } else if (c >= 0xd800 && c <= 0xdbff) {
            // Lead surrogate of a surrogate pair.  The pair together will take 4 bytes to represent.
            p += 4;
            i++; // skip trail surrogate.
          } else {
            p += 3;
          }
        }

        return p;
      };
      /**
       * @license
       * Copyright 2019 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * The amount of milliseconds to exponentially increase.
       */


      var DEFAULT_INTERVAL_MILLIS = 1000;
      /**
       * The factor to backoff by.
       * Should be a number greater than 1.
       */

      var DEFAULT_BACKOFF_FACTOR = 2;
      /**
       * The maximum milliseconds to increase to.
       *
       * <p>Visible for testing
       */

      var MAX_VALUE_MILLIS = 4 * 60 * 60 * 1000; // Four hours, like iOS and Android.

      /**
       * The percentage of backoff time to randomize by.
       * See
       * http://go/safe-client-behavior#step-1-determine-the-appropriate-retry-interval-to-handle-spike-traffic
       * for context.
       *
       * <p>Visible for testing
       */

      var RANDOM_FACTOR = 0.5;
      /**
       * Based on the backoff method from
       * https://github.com/google/closure-library/blob/master/closure/goog/math/exponentialbackoff.js.
       * Extracted here so we don't need to pass metadata and a stateful ExponentialBackoff object around.
       */

      function calculateBackoffMillis(backoffCount, intervalMillis, backoffFactor) {
        if (intervalMillis === void 0) {
          intervalMillis = DEFAULT_INTERVAL_MILLIS;
        }

        if (backoffFactor === void 0) {
          backoffFactor = DEFAULT_BACKOFF_FACTOR;
        } // Calculates an exponentially increasing value.
        // Deviation: calculates value from count and a constant interval, so we only need to save value
        // and count to restore state.


        var currBaseValue = intervalMillis * Math.pow(backoffFactor, backoffCount); // A random "fuzz" to avoid waves of retries.
        // Deviation: randomFactor is required.

        var randomWait = Math.round( // A fraction of the backoff value to add/subtract.
        // Deviation: changes multiplication order to improve readability.
        RANDOM_FACTOR * currBaseValue * ( // A random float (rounded to int by Math.round above) in the range [-1, 1]. Determines
        // if we add or subtract.
        Math.random() - 0.5) * 2); // Limits backoff to max to avoid effectively permanent backoff.

        return Math.min(MAX_VALUE_MILLIS, currBaseValue + randomWait);
      }
      /**
       * @license
       * Copyright 2020 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Provide English ordinal letters after a number
       */


      function ordinal(i) {
        if (!Number.isFinite(i)) {
          return "" + i;
        }

        return i + indicator(i);
      }

      function indicator(i) {
        i = Math.abs(i);
        var cent = i % 100;

        if (cent >= 10 && cent <= 20) {
          return 'th';
        }

        var dec = i % 10;

        if (dec === 1) {
          return 'st';
        }

        if (dec === 2) {
          return 'nd';
        }

        if (dec === 3) {
          return 'rd';
        }

        return 'th';
      }
      /**
       * @license
       * Copyright 2021 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      function getModularInstance(service) {
        if (service && service._delegate) {
          return service._delegate;
        } else {
          return service;
        }
      } //# sourceMappingURL=index.esm.js.map

      /***/

    },

    /***/
    "qZ0a":
    /*!**********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/publishLast.js ***!
      \**********************************************************************/

    /*! exports provided: publishLast */

    /***/
    function qZ0a(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "publishLast", function () {
        return publishLast;
      });
      /* harmony import */


      var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../AsyncSubject */
      "NHP+");
      /* harmony import */


      var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./multicast */
      "oB13");

      function publishLast() {
        return function (source) {
          return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__["AsyncSubject"]())(source);
        };
      } //# sourceMappingURL=publishLast.js.map

      /***/

    },

    /***/
    "qgXg":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduler/queue.js ***!
      \****************************************************************/

    /*! exports provided: queueScheduler, queue */

    /***/
    function qgXg(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "queueScheduler", function () {
        return queueScheduler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "queue", function () {
        return queue;
      });
      /* harmony import */


      var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./QueueAction */
      "YuR2");
      /* harmony import */


      var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./QueueScheduler */
      "Hh5Z");

      var queueScheduler = new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__["QueueScheduler"](_QueueAction__WEBPACK_IMPORTED_MODULE_0__["QueueAction"]);
      var queue = queueScheduler; //# sourceMappingURL=queue.js.map

      /***/
    },

    /***/
    "quSY":
    /*!*************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/Subscription.js ***!
      \*************************************************************/

    /*! exports provided: Subscription */

    /***/
    function quSY(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Subscription", function () {
        return Subscription;
      });
      /* harmony import */


      var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./util/isArray */
      "DH7j");
      /* harmony import */


      var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./util/isObject */
      "XoHu");
      /* harmony import */


      var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./util/isFunction */
      "n6bG");
      /* harmony import */


      var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./util/UnsubscriptionError */
      "pjAE");

      var Subscription = /*#__PURE__*/function () {
        function Subscription(unsubscribe) {
          _classCallCheck(this, Subscription);

          this.closed = false;
          this._parentOrParents = null;
          this._subscriptions = null;

          if (unsubscribe) {
            this._ctorUnsubscribe = true;
            this._unsubscribe = unsubscribe;
          }
        }

        _createClass2(Subscription, [{
          key: "unsubscribe",
          value: function unsubscribe() {
            var errors;

            if (this.closed) {
              return;
            }

            var _parentOrParents = this._parentOrParents,
                _ctorUnsubscribe = this._ctorUnsubscribe,
                _unsubscribe = this._unsubscribe,
                _subscriptions = this._subscriptions;
            this.closed = true;
            this._parentOrParents = null;
            this._subscriptions = null;

            if (_parentOrParents instanceof Subscription) {
              _parentOrParents.remove(this);
            } else if (_parentOrParents !== null) {
              for (var index = 0; index < _parentOrParents.length; ++index) {
                var parent = _parentOrParents[index];
                parent.remove(this);
              }
            }

            if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(_unsubscribe)) {
              if (_ctorUnsubscribe) {
                this._unsubscribe = undefined;
              }

              try {
                _unsubscribe.call(this);
              } catch (e) {
                errors = e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"] ? flattenUnsubscriptionErrors(e.errors) : [e];
              }
            }

            if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(_subscriptions)) {
              var _index4 = -1;

              var len = _subscriptions.length;

              while (++_index4 < len) {
                var sub = _subscriptions[_index4];

                if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_1__["isObject"])(sub)) {
                  try {
                    sub.unsubscribe();
                  } catch (e) {
                    errors = errors || [];

                    if (e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) {
                      errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
                    } else {
                      errors.push(e);
                    }
                  }
                }
              }
            }

            if (errors) {
              throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"](errors);
            }
          }
        }, {
          key: "add",
          value: function add(teardown) {
            var subscription = teardown;

            if (!teardown) {
              return Subscription.EMPTY;
            }

            switch (typeof teardown) {
              case 'function':
                subscription = new Subscription(teardown);

              case 'object':
                if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
                  return subscription;
                } else if (this.closed) {
                  subscription.unsubscribe();
                  return subscription;
                } else if (!(subscription instanceof Subscription)) {
                  var tmp = subscription;
                  subscription = new Subscription();
                  subscription._subscriptions = [tmp];
                }

                break;

              default:
                {
                  throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
                }
            }

            var _subscription = subscription,
                _parentOrParents = _subscription._parentOrParents;

            if (_parentOrParents === null) {
              subscription._parentOrParents = this;
            } else if (_parentOrParents instanceof Subscription) {
              if (_parentOrParents === this) {
                return subscription;
              }

              subscription._parentOrParents = [_parentOrParents, this];
            } else if (_parentOrParents.indexOf(this) === -1) {
              _parentOrParents.push(this);
            } else {
              return subscription;
            }

            var subscriptions = this._subscriptions;

            if (subscriptions === null) {
              this._subscriptions = [subscription];
            } else {
              subscriptions.push(subscription);
            }

            return subscription;
          }
        }, {
          key: "remove",
          value: function remove(subscription) {
            var subscriptions = this._subscriptions;

            if (subscriptions) {
              var subscriptionIndex = subscriptions.indexOf(subscription);

              if (subscriptionIndex !== -1) {
                subscriptions.splice(subscriptionIndex, 1);
              }
            }
          }
        }]);

        return Subscription;
      }();

      Subscription.EMPTY = function (empty) {
        empty.closed = true;
        return empty;
      }(new Subscription());

      function flattenUnsubscriptionErrors(errors) {
        return errors.reduce(function (errs, err) {
          return errs.concat(err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"] ? err.errors : err);
        }, []);
      } //# sourceMappingURL=Subscription.js.map

      /***/

    },

    /***/
    "r0WS":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/timestamp.js ***!
      \********************************************************************/

    /*! exports provided: timestamp, Timestamp */

    /***/
    function r0WS(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "timestamp", function () {
        return timestamp;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Timestamp", function () {
        return Timestamp;
      });
      /* harmony import */


      var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../scheduler/async */
      "D0XW");
      /* harmony import */


      var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./map */
      "lJxs");

      function timestamp() {
        var scheduler = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
        return Object(_map__WEBPACK_IMPORTED_MODULE_1__["map"])(function (value) {
          return new Timestamp(value, scheduler.now());
        });
      }

      var Timestamp = function Timestamp(value, timestamp) {
        _classCallCheck(this, Timestamp);

        this.value = value;
        this.timestamp = timestamp;
      }; //# sourceMappingURL=timestamp.js.map

      /***/

    },

    /***/
    "r0o6":
    /*!***************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/iif.js ***!
      \***************************************************************/

    /*! exports provided: iif */

    /***/
    function r0o6(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "iif", function () {
        return iif;
      });
      /* harmony import */


      var _defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./defer */
      "NXyV");
      /* harmony import */


      var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./empty */
      "EY2u");

      function iif(condition) {
        var trueResult = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
        var falseResult = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
        return Object(_defer__WEBPACK_IMPORTED_MODULE_0__["defer"])(function () {
          return condition() ? trueResult : falseResult;
        });
      } //# sourceMappingURL=iif.js.map

      /***/

    },

    /***/
    "r7QR":
    /*!*************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/index-0d58a5bf.js ***!
      \*************************************************************/

    /*! exports provided: m */

    /***/
    function r7QR(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "m", function () {
        return menuController;
      });
      /* harmony import */


      var _hardware_back_button_4a6b37fb_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./hardware-back-button-4a6b37fb.js */
      "B4Jq");
      /* harmony import */


      var _helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./helpers-dd7e4b7b.js */
      "1vRN");
      /* harmony import */


      var _ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./ionic-global-63a97a32.js */
      "E/Mt");
      /* harmony import */


      var _animation_096c6391_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./animation-096c6391.js */
      "meiF");
      /**
       * baseAnimation
       * Base class which is extended by the various types. Each
       * type will provide their own animations for open and close
       * and registers itself with Menu.
       */


      var baseAnimation = function baseAnimation(isIos) {
        // https://material.io/guidelines/motion/movement.html#movement-movement-in-out-of-screen-bounds
        // https://material.io/guidelines/motion/duration-easing.html#duration-easing-natural-easing-curves

        /**
         * "Apply the sharp curve to items temporarily leaving the screen that may return
         * from the same exit point. When they return, use the deceleration curve. On mobile,
         * this transition typically occurs over 300ms" -- MD Motion Guide
         */
        return Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_3__["c"])().duration(isIos ? 400 : 300);
      };
      /**
       * Menu Overlay Type
       * The menu slides over the content. The content
       * itself, which is under the menu, does not move.
       */


      var menuOverlayAnimation = function menuOverlayAnimation(menu) {
        var closedX;
        var openedX;
        var width = menu.width + 8;
        var menuAnimation = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
        var backdropAnimation = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_3__["c"])();

        if (menu.isEndSide) {
          // right side
          closedX = width + 'px';
          openedX = '0px';
        } else {
          // left side
          closedX = -width + 'px';
          openedX = '0px';
        }

        menuAnimation.addElement(menu.menuInnerEl).fromTo('transform', "translateX(".concat(closedX, ")"), "translateX(".concat(openedX, ")"));
        var mode = Object(_ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_2__["b"])(menu);
        var isIos = mode === 'ios';
        var opacity = isIos ? 0.2 : 0.25;
        backdropAnimation.addElement(menu.backdropEl).fromTo('opacity', 0.01, opacity);
        return baseAnimation(isIos).addAnimation([menuAnimation, backdropAnimation]);
      };
      /**
       * Menu Push Type
       * The content slides over to reveal the menu underneath.
       * The menu itself also slides over to reveal its bad self.
       */


      var menuPushAnimation = function menuPushAnimation(menu) {
        var contentOpenedX;
        var menuClosedX;
        var mode = Object(_ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_2__["b"])(menu);
        var width = menu.width;

        if (menu.isEndSide) {
          contentOpenedX = -width + 'px';
          menuClosedX = width + 'px';
        } else {
          contentOpenedX = width + 'px';
          menuClosedX = -width + 'px';
        }

        var menuAnimation = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(menu.menuInnerEl).fromTo('transform', "translateX(".concat(menuClosedX, ")"), 'translateX(0px)');
        var contentAnimation = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(menu.contentEl).fromTo('transform', 'translateX(0px)', "translateX(".concat(contentOpenedX, ")"));
        var backdropAnimation = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(menu.backdropEl).fromTo('opacity', 0.01, 0.32);
        return baseAnimation(mode === 'ios').addAnimation([menuAnimation, contentAnimation, backdropAnimation]);
      };
      /**
       * Menu Reveal Type
       * The content slides over to reveal the menu underneath.
       * The menu itself, which is under the content, does not move.
       */


      var menuRevealAnimation = function menuRevealAnimation(menu) {
        var mode = Object(_ionic_global_63a97a32_js__WEBPACK_IMPORTED_MODULE_2__["b"])(menu);
        var openedX = menu.width * (menu.isEndSide ? -1 : 1) + 'px';
        var contentOpen = Object(_animation_096c6391_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(menu.contentEl) // REVIEW
        .fromTo('transform', 'translateX(0px)', "translateX(".concat(openedX, ")"));
        return baseAnimation(mode === 'ios').addAnimation(contentOpen);
      };

      var createMenuController = function createMenuController() {
        var menuAnimations = new Map();
        var menus = [];

        var open = /*#__PURE__*/function () {
          var _ref95 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee28(menu) {
            var menuEl;
            return regeneratorRuntime.wrap(function _callee28$(_context32) {
              while (1) {
                switch (_context32.prev = _context32.next) {
                  case 0:
                    _context32.next = 2;
                    return get(menu);

                  case 2:
                    menuEl = _context32.sent;

                    if (!menuEl) {
                      _context32.next = 5;
                      break;
                    }

                    return _context32.abrupt("return", menuEl.open());

                  case 5:
                    return _context32.abrupt("return", false);

                  case 6:
                  case "end":
                    return _context32.stop();
                }
              }
            }, _callee28);
          }));

          return function open(_x33) {
            return _ref95.apply(this, arguments);
          };
        }();

        var close = /*#__PURE__*/function () {
          var _ref96 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee29(menu) {
            var menuEl;
            return regeneratorRuntime.wrap(function _callee29$(_context33) {
              while (1) {
                switch (_context33.prev = _context33.next) {
                  case 0:
                    _context33.next = 2;
                    return menu !== undefined ? get(menu) : getOpen();

                  case 2:
                    menuEl = _context33.sent;

                    if (!(menuEl !== undefined)) {
                      _context33.next = 5;
                      break;
                    }

                    return _context33.abrupt("return", menuEl.close());

                  case 5:
                    return _context33.abrupt("return", false);

                  case 6:
                  case "end":
                    return _context33.stop();
                }
              }
            }, _callee29);
          }));

          return function close(_x34) {
            return _ref96.apply(this, arguments);
          };
        }();

        var toggle = /*#__PURE__*/function () {
          var _ref97 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee30(menu) {
            var menuEl;
            return regeneratorRuntime.wrap(function _callee30$(_context34) {
              while (1) {
                switch (_context34.prev = _context34.next) {
                  case 0:
                    _context34.next = 2;
                    return get(menu);

                  case 2:
                    menuEl = _context34.sent;

                    if (!menuEl) {
                      _context34.next = 5;
                      break;
                    }

                    return _context34.abrupt("return", menuEl.toggle());

                  case 5:
                    return _context34.abrupt("return", false);

                  case 6:
                  case "end":
                    return _context34.stop();
                }
              }
            }, _callee30);
          }));

          return function toggle(_x35) {
            return _ref97.apply(this, arguments);
          };
        }();

        var enable = /*#__PURE__*/function () {
          var _ref98 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee31(shouldEnable, menu) {
            var menuEl;
            return regeneratorRuntime.wrap(function _callee31$(_context35) {
              while (1) {
                switch (_context35.prev = _context35.next) {
                  case 0:
                    _context35.next = 2;
                    return get(menu);

                  case 2:
                    menuEl = _context35.sent;

                    if (menuEl) {
                      menuEl.disabled = !shouldEnable;
                    }

                    return _context35.abrupt("return", menuEl);

                  case 5:
                  case "end":
                    return _context35.stop();
                }
              }
            }, _callee31);
          }));

          return function enable(_x36, _x37) {
            return _ref98.apply(this, arguments);
          };
        }();

        var swipeGesture = /*#__PURE__*/function () {
          var _ref99 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee32(shouldEnable, menu) {
            var menuEl;
            return regeneratorRuntime.wrap(function _callee32$(_context36) {
              while (1) {
                switch (_context36.prev = _context36.next) {
                  case 0:
                    _context36.next = 2;
                    return get(menu);

                  case 2:
                    menuEl = _context36.sent;

                    if (menuEl) {
                      menuEl.swipeGesture = shouldEnable;
                    }

                    return _context36.abrupt("return", menuEl);

                  case 5:
                  case "end":
                    return _context36.stop();
                }
              }
            }, _callee32);
          }));

          return function swipeGesture(_x38, _x39) {
            return _ref99.apply(this, arguments);
          };
        }();

        var isOpen = /*#__PURE__*/function () {
          var _ref100 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee33(menu) {
            var menuEl, _menuEl;

            return regeneratorRuntime.wrap(function _callee33$(_context37) {
              while (1) {
                switch (_context37.prev = _context37.next) {
                  case 0:
                    if (!(menu != null)) {
                      _context37.next = 7;
                      break;
                    }

                    _context37.next = 3;
                    return get(menu);

                  case 3:
                    menuEl = _context37.sent;
                    return _context37.abrupt("return", menuEl !== undefined && menuEl.isOpen());

                  case 7:
                    _context37.next = 9;
                    return getOpen();

                  case 9:
                    _menuEl = _context37.sent;
                    return _context37.abrupt("return", _menuEl !== undefined);

                  case 11:
                  case "end":
                    return _context37.stop();
                }
              }
            }, _callee33);
          }));

          return function isOpen(_x40) {
            return _ref100.apply(this, arguments);
          };
        }();

        var isEnabled = /*#__PURE__*/function () {
          var _ref101 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee34(menu) {
            var menuEl;
            return regeneratorRuntime.wrap(function _callee34$(_context38) {
              while (1) {
                switch (_context38.prev = _context38.next) {
                  case 0:
                    _context38.next = 2;
                    return get(menu);

                  case 2:
                    menuEl = _context38.sent;

                    if (!menuEl) {
                      _context38.next = 5;
                      break;
                    }

                    return _context38.abrupt("return", !menuEl.disabled);

                  case 5:
                    return _context38.abrupt("return", false);

                  case 6:
                  case "end":
                    return _context38.stop();
                }
              }
            }, _callee34);
          }));

          return function isEnabled(_x41) {
            return _ref101.apply(this, arguments);
          };
        }();

        var get = /*#__PURE__*/function () {
          var _ref102 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee35(menu) {
            var menuRef, menuEl;
            return regeneratorRuntime.wrap(function _callee35$(_context39) {
              while (1) {
                switch (_context39.prev = _context39.next) {
                  case 0:
                    _context39.next = 2;
                    return waitUntilReady();

                  case 2:
                    if (!(menu === 'start' || menu === 'end')) {
                      _context39.next = 9;
                      break;
                    }

                    // there could be more than one menu on the same side
                    // so first try to get the enabled one
                    menuRef = find(function (m) {
                      return m.side === menu && !m.disabled;
                    });

                    if (!menuRef) {
                      _context39.next = 6;
                      break;
                    }

                    return _context39.abrupt("return", menuRef);

                  case 6:
                    return _context39.abrupt("return", find(function (m) {
                      return m.side === menu;
                    }));

                  case 9:
                    if (!(menu != null)) {
                      _context39.next = 11;
                      break;
                    }

                    return _context39.abrupt("return", find(function (m) {
                      return m.menuId === menu;
                    }));

                  case 11:
                    // return the first enabled menu
                    menuEl = find(function (m) {
                      return !m.disabled;
                    });

                    if (!menuEl) {
                      _context39.next = 14;
                      break;
                    }

                    return _context39.abrupt("return", menuEl);

                  case 14:
                    return _context39.abrupt("return", menus.length > 0 ? menus[0].el : undefined);

                  case 15:
                  case "end":
                    return _context39.stop();
                }
              }
            }, _callee35);
          }));

          return function get(_x42) {
            return _ref102.apply(this, arguments);
          };
        }();
        /**
         * Get the instance of the opened menu. Returns `null` if a menu is not found.
         */


        var getOpen = /*#__PURE__*/function () {
          var _ref103 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee36() {
            return regeneratorRuntime.wrap(function _callee36$(_context40) {
              while (1) {
                switch (_context40.prev = _context40.next) {
                  case 0:
                    _context40.next = 2;
                    return waitUntilReady();

                  case 2:
                    return _context40.abrupt("return", _getOpenSync());

                  case 3:
                  case "end":
                    return _context40.stop();
                }
              }
            }, _callee36);
          }));

          return function getOpen() {
            return _ref103.apply(this, arguments);
          };
        }();
        /**
         * Get all menu instances.
         */


        var getMenus = /*#__PURE__*/function () {
          var _ref104 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee37() {
            return regeneratorRuntime.wrap(function _callee37$(_context41) {
              while (1) {
                switch (_context41.prev = _context41.next) {
                  case 0:
                    _context41.next = 2;
                    return waitUntilReady();

                  case 2:
                    return _context41.abrupt("return", getMenusSync());

                  case 3:
                  case "end":
                    return _context41.stop();
                }
              }
            }, _callee37);
          }));

          return function getMenus() {
            return _ref104.apply(this, arguments);
          };
        }();
        /**
         * Get whether or not a menu is animating. Returns `true` if any
         * menu is currently animating.
         */


        var isAnimating = /*#__PURE__*/function () {
          var _ref105 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee38() {
            return regeneratorRuntime.wrap(function _callee38$(_context42) {
              while (1) {
                switch (_context42.prev = _context42.next) {
                  case 0:
                    _context42.next = 2;
                    return waitUntilReady();

                  case 2:
                    return _context42.abrupt("return", isAnimatingSync());

                  case 3:
                  case "end":
                    return _context42.stop();
                }
              }
            }, _callee38);
          }));

          return function isAnimating() {
            return _ref105.apply(this, arguments);
          };
        }();

        var registerAnimation = function registerAnimation(name, animation) {
          menuAnimations.set(name, animation);
        };

        var _register = function _register(menu) {
          if (menus.indexOf(menu) < 0) {
            if (!menu.disabled) {
              _setActiveMenu(menu);
            }

            menus.push(menu);
          }
        };

        var _unregister = function _unregister(menu) {
          var index = menus.indexOf(menu);

          if (index > -1) {
            menus.splice(index, 1);
          }
        };

        var _setActiveMenu = function _setActiveMenu(menu) {
          // if this menu should be enabled
          // then find all the other menus on this same side
          // and automatically disable other same side menus
          var side = menu.side;
          menus.filter(function (m) {
            return m.side === side && m !== menu;
          }).forEach(function (m) {
            return m.disabled = true;
          });
        };

        var _setOpen = /*#__PURE__*/function () {
          var _ref106 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee39(menu, shouldOpen, animated) {
            var openedMenu;
            return regeneratorRuntime.wrap(function _callee39$(_context43) {
              while (1) {
                switch (_context43.prev = _context43.next) {
                  case 0:
                    if (!isAnimatingSync()) {
                      _context43.next = 2;
                      break;
                    }

                    return _context43.abrupt("return", false);

                  case 2:
                    if (!shouldOpen) {
                      _context43.next = 9;
                      break;
                    }

                    _context43.next = 5;
                    return getOpen();

                  case 5:
                    openedMenu = _context43.sent;

                    if (!(openedMenu && menu.el !== openedMenu)) {
                      _context43.next = 9;
                      break;
                    }

                    _context43.next = 9;
                    return openedMenu.setOpen(false, false);

                  case 9:
                    return _context43.abrupt("return", menu._setOpen(shouldOpen, animated));

                  case 10:
                  case "end":
                    return _context43.stop();
                }
              }
            }, _callee39);
          }));

          return function _setOpen(_x43, _x44, _x45) {
            return _ref106.apply(this, arguments);
          };
        }();

        var _createAnimation = function _createAnimation(type, menuCmp) {
          var animationBuilder = menuAnimations.get(type);

          if (!animationBuilder) {
            throw new Error('animation not registered');
          }

          var animation = animationBuilder(menuCmp);
          return animation;
        };

        var _getOpenSync = function _getOpenSync() {
          return find(function (m) {
            return m._isOpen;
          });
        };

        var getMenusSync = function getMenusSync() {
          return menus.map(function (menu) {
            return menu.el;
          });
        };

        var isAnimatingSync = function isAnimatingSync() {
          return menus.some(function (menu) {
            return menu.isAnimating;
          });
        };

        var find = function find(predicate) {
          var instance = menus.find(predicate);

          if (instance !== undefined) {
            return instance.el;
          }

          return undefined;
        };

        var waitUntilReady = function waitUntilReady() {
          return Promise.all(Array.from(document.querySelectorAll('ion-menu')).map(function (menu) {
            return new Promise(function (resolve) {
              return Object(_helpers_dd7e4b7b_js__WEBPACK_IMPORTED_MODULE_1__["c"])(menu, resolve);
            });
          }));
        };

        registerAnimation('reveal', menuRevealAnimation);
        registerAnimation('push', menuPushAnimation);
        registerAnimation('overlay', menuOverlayAnimation);
        /* tslint:disable-next-line */

        if (typeof document !== 'undefined') {
          document.addEventListener('ionBackButton', function (ev) {
            var openMenu = _getOpenSync();

            if (openMenu) {
              ev.detail.register(_hardware_back_button_4a6b37fb_js__WEBPACK_IMPORTED_MODULE_0__["MENU_BACK_BUTTON_PRIORITY"], function () {
                return openMenu.close();
              });
            }
          });
        }

        return {
          registerAnimation: registerAnimation,
          get: get,
          getMenus: getMenus,
          getOpen: getOpen,
          isEnabled: isEnabled,
          swipeGesture: swipeGesture,
          isAnimating: isAnimating,
          isOpen: isOpen,
          enable: enable,
          toggle: toggle,
          close: close,
          open: open,
          _getOpenSync: _getOpenSync,
          _createAnimation: _createAnimation,
          _register: _register,
          _unregister: _unregister,
          _setOpen: _setOpen,
          _setActiveMenu: _setActiveMenu
        };
      };

      var menuController = /*@__PURE__*/createMenuController();
      /***/
    },

    /***/
    "rgd1":
    /*!*****************************************************!*\
      !*** ./node_modules/@sentry/angular/esm/tracing.js ***!
      \*****************************************************/

    /*! exports provided: routingInstrumentation, instrumentAngularRouting, getActiveTransaction, TraceService, TraceDirective, TraceModule, TraceClassDecorator, TraceMethodDecorator */

    /***/
    function rgd1(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "routingInstrumentation", function () {
        return routingInstrumentation;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "instrumentAngularRouting", function () {
        return instrumentAngularRouting;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getActiveTransaction", function () {
        return getActiveTransaction;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TraceService", function () {
        return TraceService;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TraceDirective", function () {
        return TraceDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TraceModule", function () {
        return TraceModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TraceClassDecorator", function () {
        return TraceClassDecorator;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TraceMethodDecorator", function () {
        return TraceMethodDecorator;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @angular/router */
      "tyNb");
      /* harmony import */


      var _sentry_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @sentry/browser */
      "WSEr");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! rxjs */
      "qCKp");
      /* harmony import */


      var rxjs_operators__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! rxjs/operators */
      "kU1M");
      /* harmony import */


      var _zone__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! ./zone */
      "M62x");

      var instrumentationInitialized;
      var stashedStartTransaction;
      var stashedStartTransactionOnLocationChange;
      var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_4__["getGlobalObject"])();
      /**
       * Creates routing instrumentation for Angular Router.
       */

      function routingInstrumentation(customStartTransaction, startTransactionOnPageLoad, startTransactionOnLocationChange) {
        if (startTransactionOnPageLoad === void 0) {
          startTransactionOnPageLoad = true;
        }

        if (startTransactionOnLocationChange === void 0) {
          startTransactionOnLocationChange = true;
        }

        instrumentationInitialized = true;
        stashedStartTransaction = customStartTransaction;
        stashedStartTransactionOnLocationChange = startTransactionOnLocationChange;

        if (startTransactionOnPageLoad) {
          customStartTransaction({
            name: global.location.pathname,
            op: 'pageload'
          });
        }
      }

      var instrumentAngularRouting = routingInstrumentation;
      /**
       * Grabs active transaction off scope
       */

      function getActiveTransaction() {
        var currentHub = Object(_sentry_browser__WEBPACK_IMPORTED_MODULE_3__["getCurrentHub"])();

        if (currentHub) {
          var scope = currentHub.getScope();

          if (scope) {
            return scope.getTransaction();
          }
        }

        return undefined;
      }
      /**
       * Angular's Service responsible for hooking into Angular Router and tracking current navigation process.
       * Creates a new transaction for every route change and measures a duration of routing process.
       */


      var TraceService =
      /** @class */
      function () {
        function TraceService(_router) {
          var _this = this;

          this._router = _router;
          this.navStart$ = this._router.events.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["filter"])(function (event) {
            return event instanceof _angular_router__WEBPACK_IMPORTED_MODULE_2__["NavigationStart"];
          }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["tap"])(function (event) {
            if (!instrumentationInitialized) {
              _sentry_utils__WEBPACK_IMPORTED_MODULE_4__["logger"].error('Angular integration has tracing enabled, but Tracing integration is not configured');

              return;
            }

            var navigationEvent = event;
            var strippedUrl = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_4__["stripUrlQueryAndFragment"])(navigationEvent.url);
            var activeTransaction = getActiveTransaction();

            if (!activeTransaction && stashedStartTransactionOnLocationChange) {
              activeTransaction = stashedStartTransaction({
                name: strippedUrl,
                op: 'navigation'
              });
            }

            if (activeTransaction) {
              _this._routingSpan = activeTransaction.startChild({
                description: "" + navigationEvent.url,
                op: "angular.routing",
                tags: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
                  'routing.instrumentation': '@sentry/angular',
                  url: strippedUrl
                }, navigationEvent.navigationTrigger && {
                  navigationTrigger: navigationEvent.navigationTrigger
                })
              });
            }
          }));
          this.navEnd$ = this._router.events.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["filter"])(function (event) {
            return event instanceof _angular_router__WEBPACK_IMPORTED_MODULE_2__["NavigationEnd"];
          }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["tap"])(function () {
            if (_this._routingSpan) {
              Object(_zone__WEBPACK_IMPORTED_MODULE_7__["runOutsideAngular"])(function () {
                // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
                _this._routingSpan.finish();
              });
              _this._routingSpan = null;
            }
          }));
          this._routingSpan = null;
          this._subscription = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subscription"]();

          this._subscription.add(this.navStart$.subscribe());

          this._subscription.add(this.navEnd$.subscribe());
        }
        /**
         * This is used to prevent memory leaks when the root view is created and destroyed multiple times,
         * since `subscribe` callbacks capture `this` and prevent many resources from being GC'd.
         */


        TraceService.prototype.ngOnDestroy = function () {
          this._subscription.unsubscribe();
        };

        TraceService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
          providedIn: 'root'
        })], TraceService);
        return TraceService;
      }();

      var UNKNOWN_COMPONENT = 'unknown';
      /**
       * A directive that can be used to capture initialization lifecycle of the whole component.
       */

      var TraceDirective =
      /** @class */
      function () {
        function TraceDirective() {
          this.componentName = UNKNOWN_COMPONENT;
        }
        /**
         * Implementation of OnInit lifecycle method
         * @inheritdoc
         */


        TraceDirective.prototype.ngOnInit = function () {
          var activeTransaction = getActiveTransaction();

          if (activeTransaction) {
            this._tracingSpan = activeTransaction.startChild({
              description: "<" + this.componentName + ">",
              op: "angular.initialize"
            });
          }
        };
        /**
         * Implementation of AfterViewInit lifecycle method
         * @inheritdoc
         */


        TraceDirective.prototype.ngAfterViewInit = function () {
          if (this._tracingSpan) {
            this._tracingSpan.finish();
          }
        };

        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])('trace')], TraceDirective.prototype, "componentName", void 0);
        TraceDirective = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"])({
          selector: '[trace]'
        })], TraceDirective);
        return TraceDirective;
      }();
      /**
       * A module serves as a single compilation unit for the `TraceDirective` and can be re-used by any other module.
       */


      var TraceModule =
      /** @class */
      function () {
        function TraceModule() {}

        TraceModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
          declarations: [TraceDirective],
          exports: [TraceDirective]
        })], TraceModule);
        return TraceModule;
      }();
      /**
       * Decorator function that can be used to capture initialization lifecycle of the whole component.
       */


      function TraceClassDecorator() {
        var tracingSpan;
        /* eslint-disable @typescript-eslint/no-unsafe-member-access */
        // eslint-disable-next-line @typescript-eslint/explicit-function-return-type

        return function (target) {
          var originalOnInit = target.prototype.ngOnInit; // eslint-disable-next-line @typescript-eslint/no-explicit-any

          target.prototype.ngOnInit = function () {
            var args = [];

            for (var _i = 0; _i < arguments.length; _i++) {
              args[_i] = arguments[_i];
            }

            var activeTransaction = getActiveTransaction();

            if (activeTransaction) {
              tracingSpan = activeTransaction.startChild({
                description: "<" + target.name + ">",
                op: "angular.initialize"
              });
            }

            if (originalOnInit) {
              return originalOnInit.apply(this, args);
            }
          };

          var originalAfterViewInit = target.prototype.ngAfterViewInit; // eslint-disable-next-line @typescript-eslint/no-explicit-any

          target.prototype.ngAfterViewInit = function () {
            var args = [];

            for (var _i = 0; _i < arguments.length; _i++) {
              args[_i] = arguments[_i];
            }

            if (tracingSpan) {
              tracingSpan.finish();
            }

            if (originalAfterViewInit) {
              return originalAfterViewInit.apply(this, args);
            }
          };
        };
        /* eslint-enable @typescript-eslint/no-unsafe-member-access */
      }
      /**
       * Decorator function that can be used to capture a single lifecycle methods of the component.
       */


      function TraceMethodDecorator() {
        // eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/ban-types
        return function (target, propertyKey, descriptor) {
          var originalMethod = descriptor.value; // eslint-disable-next-line @typescript-eslint/no-explicit-any

          descriptor.value = function () {
            var args = [];

            for (var _i = 0; _i < arguments.length; _i++) {
              args[_i] = arguments[_i];
            }

            var now = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_4__["timestampWithMs"])();
            var activeTransaction = getActiveTransaction();

            if (activeTransaction) {
              activeTransaction.startChild({
                description: "<" + target.constructor.name + ">",
                endTimestamp: now,
                op: "angular." + String(propertyKey),
                startTimestamp: now
              });
            }

            if (originalMethod) {
              // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
              return originalMethod.apply(this, args);
            }
          };

          return descriptor;
        };
      } //# sourceMappingURL=tracing.js.map

      /***/

    },

    /***/
    "rvvs":
    /*!**********************************************************!*\
      !*** ./node_modules/@capacitor/device/dist/esm/index.js ***!
      \**********************************************************/

    /*! exports provided: Device */

    /***/
    function rvvs(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Device", function () {
        return Device;
      });
      /* harmony import */


      var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @capacitor/core */
      "FUe0");
      /* harmony import */


      var _definitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./definitions */
      "Y47q");
      /* empty/unused harmony star reexport */


      var Device = Object(_capacitor_core__WEBPACK_IMPORTED_MODULE_0__["registerPlugin"])('Device', {
        web: function web() {
          return __webpack_require__.e(
          /*! import() | web */
          "web").then(__webpack_require__.bind(null,
          /*! ./web */
          "U6Qn")).then(function (m) {
            return new m.DeviceWeb();
          });
        }
      }); //# sourceMappingURL=index.js.map

      /***/
    },

    /***/
    "sTY7":
    /*!***********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/windowToggle.js ***!
      \***********************************************************************/

    /*! exports provided: windowToggle */

    /***/
    function sTY7(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "windowToggle", function () {
        return windowToggle;
      });
      /* harmony import */


      var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subject */
      "XNiG");
      /* harmony import */


      var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../Subscription */
      "quSY");
      /* harmony import */


      var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../OuterSubscriber */
      "l7GE");
      /* harmony import */


      var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../util/subscribeToResult */
      "ZUHj");

      function windowToggle(openings, closingSelector) {
        return function (source) {
          return source.lift(new WindowToggleOperator(openings, closingSelector));
        };
      }

      var WindowToggleOperator = /*#__PURE__*/function () {
        function WindowToggleOperator(openings, closingSelector) {
          _classCallCheck(this, WindowToggleOperator);

          this.openings = openings;
          this.closingSelector = closingSelector;
        }

        _createClass2(WindowToggleOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));
          }
        }]);

        return WindowToggleOperator;
      }();

      var WindowToggleSubscriber = /*#__PURE__*/function (_OuterSubscriber__WEB6) {
        _inherits(WindowToggleSubscriber, _OuterSubscriber__WEB6);

        var _super270 = _createSuper(WindowToggleSubscriber);

        function WindowToggleSubscriber(destination, openings, closingSelector) {
          var _this544;

          _classCallCheck(this, WindowToggleSubscriber);

          _this544 = _super270.call(this, destination);
          _this544.openings = openings;
          _this544.closingSelector = closingSelector;
          _this544.contexts = [];

          _this544.add(_this544.openSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(_assertThisInitialized(_this544), openings, openings));

          return _this544;
        }

        _createClass2(WindowToggleSubscriber, [{
          key: "_next",
          value: function _next(value) {
            var contexts = this.contexts;

            if (contexts) {
              var len = contexts.length;

              for (var i = 0; i < len; i++) {
                contexts[i].window.next(value);
              }
            }
          }
        }, {
          key: "_error",
          value: function _error(err) {
            var contexts = this.contexts;
            this.contexts = null;

            if (contexts) {
              var len = contexts.length;
              var index = -1;

              while (++index < len) {
                var context = contexts[index];
                context.window.error(err);
                context.subscription.unsubscribe();
              }
            }

            _get(_getPrototypeOf(WindowToggleSubscriber.prototype), "_error", this).call(this, err);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            var contexts = this.contexts;
            this.contexts = null;

            if (contexts) {
              var len = contexts.length;
              var index = -1;

              while (++index < len) {
                var context = contexts[index];
                context.window.complete();
                context.subscription.unsubscribe();
              }
            }

            _get(_getPrototypeOf(WindowToggleSubscriber.prototype), "_complete", this).call(this);
          }
        }, {
          key: "_unsubscribe",
          value: function _unsubscribe() {
            var contexts = this.contexts;
            this.contexts = null;

            if (contexts) {
              var len = contexts.length;
              var index = -1;

              while (++index < len) {
                var context = contexts[index];
                context.window.unsubscribe();
                context.subscription.unsubscribe();
              }
            }
          }
        }, {
          key: "notifyNext",
          value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
            if (outerValue === this.openings) {
              var closingNotifier;

              try {
                var closingSelector = this.closingSelector;
                closingNotifier = closingSelector(innerValue);
              } catch (e) {
                return this.error(e);
              }

              var _window5 = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]();

              var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
              var context = {
                window: _window5,
                subscription: subscription
              };
              this.contexts.push(context);
              var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier, context);

              if (innerSubscription.closed) {
                this.closeWindow(this.contexts.length - 1);
              } else {
                innerSubscription.context = context;
                subscription.add(innerSubscription);
              }

              this.destination.next(_window5);
            } else {
              this.closeWindow(this.contexts.indexOf(outerValue));
            }
          }
        }, {
          key: "notifyError",
          value: function notifyError(err) {
            this.error(err);
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete(inner) {
            if (inner !== this.openSubscription) {
              this.closeWindow(this.contexts.indexOf(inner.context));
            }
          }
        }, {
          key: "closeWindow",
          value: function closeWindow(index) {
            if (index === -1) {
              return;
            }

            var contexts = this.contexts;
            var context = contexts[index];
            var window = context.window,
                subscription = context.subscription;
            contexts.splice(index, 1);
            window.complete();
            subscription.unsubscribe();
          }
        }]);

        return WindowToggleSubscriber;
      }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]); //# sourceMappingURL=windowToggle.js.map

      /***/

    },

    /***/
    "sVev":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/EmptyError.js ***!
      \****************************************************************/

    /*! exports provided: EmptyError */

    /***/
    function sVev(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "EmptyError", function () {
        return EmptyError;
      });

      var EmptyErrorImpl = function () {
        function EmptyErrorImpl() {
          Error.call(this);
          this.message = 'no elements in sequence';
          this.name = 'EmptyError';
          return this;
        }

        EmptyErrorImpl.prototype = Object.create(Error.prototype);
        return EmptyErrorImpl;
      }();

      var EmptyError = EmptyErrorImpl; //# sourceMappingURL=EmptyError.js.map

      /***/
    },

    /***/
    "sYmb":
    /*!**************************************************************************************!*\
      !*** ./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js ***!
      \**************************************************************************************/

    /*! exports provided: DEFAULT_LANGUAGE, FakeMissingTranslationHandler, MissingTranslationHandler, TranslateCompiler, TranslateDefaultParser, TranslateDirective, TranslateFakeCompiler, TranslateFakeLoader, TranslateLoader, TranslateModule, TranslateParser, TranslatePipe, TranslateService, TranslateStore, USE_DEFAULT_LANG, USE_EXTEND, USE_STORE */

    /***/
    function sYmb(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DEFAULT_LANGUAGE", function () {
        return DEFAULT_LANGUAGE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FakeMissingTranslationHandler", function () {
        return FakeMissingTranslationHandler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MissingTranslationHandler", function () {
        return MissingTranslationHandler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TranslateCompiler", function () {
        return TranslateCompiler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TranslateDefaultParser", function () {
        return TranslateDefaultParser;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TranslateDirective", function () {
        return TranslateDirective;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TranslateFakeCompiler", function () {
        return TranslateFakeCompiler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TranslateFakeLoader", function () {
        return TranslateFakeLoader;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TranslateLoader", function () {
        return TranslateLoader;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TranslateModule", function () {
        return TranslateModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TranslateParser", function () {
        return TranslateParser;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TranslatePipe", function () {
        return TranslatePipe;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TranslateService", function () {
        return TranslateService;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TranslateStore", function () {
        return TranslateStore;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "USE_DEFAULT_LANG", function () {
        return USE_DEFAULT_LANG;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "USE_EXTEND", function () {
        return USE_EXTEND;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "USE_STORE", function () {
        return USE_STORE;
      });
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! rxjs */
      "qCKp");
      /* harmony import */


      var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! rxjs/operators */
      "kU1M");
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @abstract
       */


      var TranslateLoader = function TranslateLoader() {
        _classCallCheck(this, TranslateLoader);
      };

      if (false) {}
      /**
       * This loader is just a placeholder that does nothing, in case you don't need a loader at all
       */


      var TranslateFakeLoader = /*#__PURE__*/function (_TranslateLoader) {
        _inherits(TranslateFakeLoader, _TranslateLoader);

        var _super271 = _createSuper(TranslateFakeLoader);

        function TranslateFakeLoader() {
          _classCallCheck(this, TranslateFakeLoader);

          return _super271.apply(this, arguments);
        }

        _createClass2(TranslateFakeLoader, [{
          key: "getTranslation",
          value:
          /**
           * @param {?} lang
           * @return {?}
           */
          function getTranslation(lang) {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])({});
          }
        }]);

        return TranslateFakeLoader;
      }(TranslateLoader);

      TranslateFakeLoader.ɵfac = function TranslateFakeLoader_Factory(t) {
        return ɵTranslateFakeLoader_BaseFactory(t || TranslateFakeLoader);
      };

      TranslateFakeLoader.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: TranslateFakeLoader,
        factory: TranslateFakeLoader.ɵfac
      });

      var ɵTranslateFakeLoader_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetInheritedFactory"](TranslateFakeLoader);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TranslateFakeLoader, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @record
       */


      function MissingTranslationHandlerParams() {}

      if (false) {}
      /**
       * @abstract
       */


      var MissingTranslationHandler = function MissingTranslationHandler() {
        _classCallCheck(this, MissingTranslationHandler);
      };

      if (false) {}
      /**
       * This handler is just a placeholder that does nothing, in case you don't need a missing translation handler at all
       */


      var FakeMissingTranslationHandler = /*#__PURE__*/function () {
        function FakeMissingTranslationHandler() {
          _classCallCheck(this, FakeMissingTranslationHandler);
        }

        _createClass2(FakeMissingTranslationHandler, [{
          key: "handle",
          value:
          /**
           * @param {?} params
           * @return {?}
           */
          function handle(params) {
            return params.key;
          }
        }]);

        return FakeMissingTranslationHandler;
      }();

      FakeMissingTranslationHandler.ɵfac = function FakeMissingTranslationHandler_Factory(t) {
        return new (t || FakeMissingTranslationHandler)();
      };

      FakeMissingTranslationHandler.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: FakeMissingTranslationHandler,
        factory: FakeMissingTranslationHandler.ɵfac
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FakeMissingTranslationHandler, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /* tslint:disable */

      /**
       * Determines if two objects or two values are equivalent.
       *
       * Two objects or values are considered equivalent if at least one of the following is true:
       *
       * * Both objects or values pass `===` comparison.
       * * Both objects or values are of the same type and all of their properties are equal by
       *   comparing them with `equals`.
       *
       * @param {?} o1 Object or value to compare.
       * @param {?} o2 Object or value to compare.
       * @return {?} true if arguments are equal.
       */


      function equals(o1, o2) {
        if (o1 === o2) return true;
        if (o1 === null || o2 === null) return false;
        if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
        // NaN === NaN

        /** @type {?} */

        var t1 = typeof o1;
        /** @type {?} */

        var t2 = typeof o2;
        /** @type {?} */

        var length;
        /** @type {?} */

        var key;
        /** @type {?} */

        var keySet;

        if (t1 == t2 && t1 == 'object') {
          if (Array.isArray(o1)) {
            if (!Array.isArray(o2)) return false;

            if ((length = o1.length) == o2.length) {
              for (key = 0; key < length; key++) {
                if (!equals(o1[key], o2[key])) return false;
              }

              return true;
            }
          } else {
            if (Array.isArray(o2)) {
              return false;
            }

            keySet = Object.create(null);

            for (key in o1) {
              if (!equals(o1[key], o2[key])) {
                return false;
              }

              keySet[key] = true;
            }

            for (key in o2) {
              if (!(key in keySet) && typeof o2[key] !== 'undefined') {
                return false;
              }
            }

            return true;
          }
        }

        return false;
      }
      /* tslint:enable */

      /**
       * @param {?} value
       * @return {?}
       */


      function isDefined(value) {
        return typeof value !== 'undefined' && value !== null;
      }
      /**
       * @param {?} item
       * @return {?}
       */


      function isObject(item) {
        return item && typeof item === 'object' && !Array.isArray(item);
      }
      /**
       * @param {?} target
       * @param {?} source
       * @return {?}
       */


      function mergeDeep(target, source) {
        /** @type {?} */
        var output = Object.assign({}, target);

        if (isObject(target) && isObject(source)) {
          Object.keys(source).forEach(
          /**
          * @param {?} key
          * @return {?}
          */
          function (key) {
            if (isObject(source[key])) {
              if (!(key in target)) {
                Object.assign(output, _defineProperty({}, key, source[key]));
              } else {
                output[key] = mergeDeep(target[key], source[key]);
              }
            } else {
              Object.assign(output, _defineProperty({}, key, source[key]));
            }
          });
        }

        return output;
      }
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @abstract
       */


      var TranslateParser = function TranslateParser() {
        _classCallCheck(this, TranslateParser);
      };

      if (false) {}

      var TranslateDefaultParser = /*#__PURE__*/function (_TranslateParser) {
        _inherits(TranslateDefaultParser, _TranslateParser);

        var _super272 = _createSuper(TranslateDefaultParser);

        function TranslateDefaultParser() {
          var _this545;

          _classCallCheck(this, TranslateDefaultParser);

          _this545 = _super272.apply(this, arguments);
          _this545.templateMatcher = /{{\s?([^{}\s]*)\s?}}/g;
          return _this545;
        }
        /**
         * @param {?} expr
         * @param {?=} params
         * @return {?}
         */


        _createClass2(TranslateDefaultParser, [{
          key: "interpolate",
          value: function interpolate(expr, params) {
            /** @type {?} */
            var result;

            if (typeof expr === 'string') {
              result = this.interpolateString(expr, params);
            } else if (typeof expr === 'function') {
              result = this.interpolateFunction(expr, params);
            } else {
              // this should not happen, but an unrelated TranslateService test depends on it
              result =
              /** @type {?} */
              expr;
            }

            return result;
          }
          /**
           * @param {?} target
           * @param {?} key
           * @return {?}
           */

        }, {
          key: "getValue",
          value: function getValue(target, key) {
            /** @type {?} */
            var keys = typeof key === 'string' ? key.split('.') : [key];
            key = '';

            do {
              key += keys.shift();

              if (isDefined(target) && isDefined(target[key]) && (typeof target[key] === 'object' || !keys.length)) {
                target = target[key];
                key = '';
              } else if (!keys.length) {
                target = undefined;
              } else {
                key += '.';
              }
            } while (keys.length);

            return target;
          }
          /**
           * @private
           * @param {?} fn
           * @param {?=} params
           * @return {?}
           */

        }, {
          key: "interpolateFunction",
          value: function interpolateFunction(fn, params) {
            return fn(params);
          }
          /**
           * @private
           * @param {?} expr
           * @param {?=} params
           * @return {?}
           */

        }, {
          key: "interpolateString",
          value: function interpolateString(expr, params) {
            var _this546 = this;

            if (!params) {
              return expr;
            }

            return expr.replace(this.templateMatcher,
            /**
            * @param {?} substring
            * @param {?} b
            * @return {?}
            */
            function (substring, b) {
              /** @type {?} */
              var r = _this546.getValue(params, b);

              return isDefined(r) ? r : substring;
            });
          }
        }]);

        return TranslateDefaultParser;
      }(TranslateParser);

      TranslateDefaultParser.ɵfac = function TranslateDefaultParser_Factory(t) {
        return ɵTranslateDefaultParser_BaseFactory(t || TranslateDefaultParser);
      };

      TranslateDefaultParser.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: TranslateDefaultParser,
        factory: TranslateDefaultParser.ɵfac
      });

      var ɵTranslateDefaultParser_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetInheritedFactory"](TranslateDefaultParser);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TranslateDefaultParser, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], null, null);
      })();

      if (false) {}
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @abstract
       */


      var TranslateCompiler = function TranslateCompiler() {
        _classCallCheck(this, TranslateCompiler);
      };

      if (false) {}
      /**
       * This compiler is just a placeholder that does nothing, in case you don't need a compiler at all
       */


      var TranslateFakeCompiler = /*#__PURE__*/function (_TranslateCompiler) {
        _inherits(TranslateFakeCompiler, _TranslateCompiler);

        var _super273 = _createSuper(TranslateFakeCompiler);

        function TranslateFakeCompiler() {
          _classCallCheck(this, TranslateFakeCompiler);

          return _super273.apply(this, arguments);
        }

        _createClass2(TranslateFakeCompiler, [{
          key: "compile",
          value:
          /**
           * @param {?} value
           * @param {?} lang
           * @return {?}
           */
          function compile(value, lang) {
            return value;
          }
          /**
           * @param {?} translations
           * @param {?} lang
           * @return {?}
           */

        }, {
          key: "compileTranslations",
          value: function compileTranslations(translations, lang) {
            return translations;
          }
        }]);

        return TranslateFakeCompiler;
      }(TranslateCompiler);

      TranslateFakeCompiler.ɵfac = function TranslateFakeCompiler_Factory(t) {
        return ɵTranslateFakeCompiler_BaseFactory(t || TranslateFakeCompiler);
      };

      TranslateFakeCompiler.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: TranslateFakeCompiler,
        factory: TranslateFakeCompiler.ɵfac
      });

      var ɵTranslateFakeCompiler_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetInheritedFactory"](TranslateFakeCompiler);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TranslateFakeCompiler, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var TranslateStore = function TranslateStore() {
        _classCallCheck(this, TranslateStore);

        /**
         * The lang currently used
         */
        this.currentLang = this.defaultLang;
        /**
         * a list of translations per lang
         */

        this.translations = {};
        /**
         * an array of langs
         */

        this.langs = [];
        /**
         * An EventEmitter to listen to translation change events
         * onTranslationChange.subscribe((params: TranslationChangeEvent) => {
         *     // do something
         * });
         */

        this.onTranslationChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        /**
         * An EventEmitter to listen to lang change events
         * onLangChange.subscribe((params: LangChangeEvent) => {
         *     // do something
         * });
         */

        this.onLangChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        /**
         * An EventEmitter to listen to default lang change events
         * onDefaultLangChange.subscribe((params: DefaultLangChangeEvent) => {
         *     // do something
         * });
         */

        this.onDefaultLangChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
      };

      if (false) {}
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /** @type {?} */


      var USE_STORE = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('USE_STORE');
      /** @type {?} */

      var USE_DEFAULT_LANG = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('USE_DEFAULT_LANG');
      /** @type {?} */

      var DEFAULT_LANGUAGE = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('DEFAULT_LANGUAGE');
      /** @type {?} */

      var USE_EXTEND = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('USE_EXTEND');
      /**
       * @record
       */

      function TranslationChangeEvent() {}

      if (false) {}
      /**
       * @record
       */


      function LangChangeEvent() {}

      if (false) {}
      /**
       * @record
       */


      function DefaultLangChangeEvent() {}

      if (false) {}

      var TranslateService = /*#__PURE__*/function () {
        /**
         *
         * @param {?} store an instance of the store (that is supposed to be unique)
         * @param {?} currentLoader An instance of the loader currently used
         * @param {?} compiler An instance of the compiler currently used
         * @param {?} parser An instance of the parser currently used
         * @param {?} missingTranslationHandler A handler for missing translations.
         * @param {?=} useDefaultLang whether we should use default language translation when current language translation is missing.
         * @param {?=} isolate whether this service should use the store or not
         * @param {?=} extend To make a child module extend (and use) translations from parent modules.
         * @param {?=} defaultLanguage Set the default language using configuration
         */
        function TranslateService(store, currentLoader, compiler, parser, missingTranslationHandler) {
          var useDefaultLang = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
          var isolate = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
          var extend = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;
          var defaultLanguage = arguments.length > 8 ? arguments[8] : undefined;

          _classCallCheck(this, TranslateService);

          this.store = store;
          this.currentLoader = currentLoader;
          this.compiler = compiler;
          this.parser = parser;
          this.missingTranslationHandler = missingTranslationHandler;
          this.useDefaultLang = useDefaultLang;
          this.isolate = isolate;
          this.extend = extend;
          this.pending = false;
          this._onTranslationChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this._onLangChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this._onDefaultLangChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
          this._langs = [];
          this._translations = {};
          this._translationRequests = {};
          /** set the default language from configuration */

          if (defaultLanguage) {
            this.setDefaultLang(defaultLanguage);
          }
        }
        /**
         * An EventEmitter to listen to translation change events
         * onTranslationChange.subscribe((params: TranslationChangeEvent) => {
         *     // do something
         * });
         * @return {?}
         */


        _createClass2(TranslateService, [{
          key: "onTranslationChange",
          get: function get() {
            return this.isolate ? this._onTranslationChange : this.store.onTranslationChange;
          }
          /**
           * An EventEmitter to listen to lang change events
           * onLangChange.subscribe((params: LangChangeEvent) => {
           *     // do something
           * });
           * @return {?}
           */

        }, {
          key: "onLangChange",
          get: function get() {
            return this.isolate ? this._onLangChange : this.store.onLangChange;
          }
          /**
           * An EventEmitter to listen to default lang change events
           * onDefaultLangChange.subscribe((params: DefaultLangChangeEvent) => {
           *     // do something
           * });
           * @return {?}
           */

        }, {
          key: "onDefaultLangChange",
          get: function get() {
            return this.isolate ? this._onDefaultLangChange : this.store.onDefaultLangChange;
          }
          /**
           * The default lang to fallback when translations are missing on the current lang
           * @return {?}
           */

        }, {
          key: "defaultLang",
          get: function get() {
            return this.isolate ? this._defaultLang : this.store.defaultLang;
          }
          /**
           * @param {?} defaultLang
           * @return {?}
           */
          ,
          set: function set(defaultLang) {
            if (this.isolate) {
              this._defaultLang = defaultLang;
            } else {
              this.store.defaultLang = defaultLang;
            }
          }
          /**
           * The lang currently used
           * @return {?}
           */

        }, {
          key: "currentLang",
          get: function get() {
            return this.isolate ? this._currentLang : this.store.currentLang;
          }
          /**
           * @param {?} currentLang
           * @return {?}
           */
          ,
          set: function set(currentLang) {
            if (this.isolate) {
              this._currentLang = currentLang;
            } else {
              this.store.currentLang = currentLang;
            }
          }
          /**
           * an array of langs
           * @return {?}
           */

        }, {
          key: "langs",
          get: function get() {
            return this.isolate ? this._langs : this.store.langs;
          }
          /**
           * @param {?} langs
           * @return {?}
           */
          ,
          set: function set(langs) {
            if (this.isolate) {
              this._langs = langs;
            } else {
              this.store.langs = langs;
            }
          }
          /**
           * a list of translations per lang
           * @return {?}
           */

        }, {
          key: "translations",
          get: function get() {
            return this.isolate ? this._translations : this.store.translations;
          }
          /**
           * @param {?} translations
           * @return {?}
           */
          ,
          set: function set(translations) {
            if (this.isolate) {
              this._translations = translations;
            } else {
              this.store.translations = translations;
            }
          }
          /**
           * Sets the default language to use as a fallback
           * @param {?} lang
           * @return {?}
           */

        }, {
          key: "setDefaultLang",
          value: function setDefaultLang(lang) {
            var _this547 = this;

            if (lang === this.defaultLang) {
              return;
            }
            /** @type {?} */


            var pending = this.retrieveTranslations(lang);

            if (typeof pending !== "undefined") {
              // on init set the defaultLang immediately
              if (this.defaultLang == null) {
                this.defaultLang = lang;
              }

              pending.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["take"])(1)).subscribe(
              /**
              * @param {?} res
              * @return {?}
              */
              function (res) {
                _this547.changeDefaultLang(lang);
              });
            } else {
              // we already have this language
              this.changeDefaultLang(lang);
            }
          }
          /**
           * Gets the default language used
           * @return {?}
           */

        }, {
          key: "getDefaultLang",
          value: function getDefaultLang() {
            return this.defaultLang;
          }
          /**
           * Changes the lang currently used
           * @param {?} lang
           * @return {?}
           */

        }, {
          key: "use",
          value: function use(lang) {
            var _this548 = this;

            // don't change the language if the language given is already selected
            if (lang === this.currentLang) {
              return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(this.translations[lang]);
            }
            /** @type {?} */


            var pending = this.retrieveTranslations(lang);

            if (typeof pending !== "undefined") {
              // on init set the currentLang immediately
              if (!this.currentLang) {
                this.currentLang = lang;
              }

              pending.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["take"])(1)).subscribe(
              /**
              * @param {?} res
              * @return {?}
              */
              function (res) {
                _this548.changeLang(lang);
              });
              return pending;
            } else {
              // we have this language, return an Observable
              this.changeLang(lang);
              return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(this.translations[lang]);
            }
          }
          /**
           * Retrieves the given translations
           * @private
           * @param {?} lang
           * @return {?}
           */

        }, {
          key: "retrieveTranslations",
          value: function retrieveTranslations(lang) {
            /** @type {?} */
            var pending; // if this language is unavailable or extend is true, ask for it

            if (typeof this.translations[lang] === "undefined" || this.extend) {
              this._translationRequests[lang] = this._translationRequests[lang] || this.getTranslation(lang);
              pending = this._translationRequests[lang];
            }

            return pending;
          }
          /**
           * Gets an object of translations for a given language with the current loader
           * and passes it through the compiler
           * @param {?} lang
           * @return {?}
           */

        }, {
          key: "getTranslation",
          value: function getTranslation(lang) {
            var _this549 = this;

            this.pending = true;
            /** @type {?} */

            var loadingTranslations = this.currentLoader.getTranslation(lang).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["shareReplay"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["take"])(1));
            this.loadingTranslations = loadingTranslations.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(
            /**
            * @param {?} res
            * @return {?}
            */
            function (res) {
              return _this549.compiler.compileTranslations(res, lang);
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["shareReplay"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["take"])(1));
            this.loadingTranslations.subscribe({
              next:
              /**
              * @param {?} res
              * @return {?}
              */
              function next(res) {
                _this549.translations[lang] = _this549.extend && _this549.translations[lang] ? Object.assign(Object.assign({}, res), _this549.translations[lang]) : res;

                _this549.updateLangs();

                _this549.pending = false;
              },
              error:
              /**
              * @param {?} err
              * @return {?}
              */
              function error(err) {
                _this549.pending = false;
              }
            });
            return loadingTranslations;
          }
          /**
           * Manually sets an object of translations for a given language
           * after passing it through the compiler
           * @param {?} lang
           * @param {?} translations
           * @param {?=} shouldMerge
           * @return {?}
           */

        }, {
          key: "setTranslation",
          value: function setTranslation(lang, translations) {
            var shouldMerge = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
            translations = this.compiler.compileTranslations(translations, lang);

            if ((shouldMerge || this.extend) && this.translations[lang]) {
              this.translations[lang] = mergeDeep(this.translations[lang], translations);
            } else {
              this.translations[lang] = translations;
            }

            this.updateLangs();
            this.onTranslationChange.emit({
              lang: lang,
              translations: this.translations[lang]
            });
          }
          /**
           * Returns an array of currently available langs
           * @return {?}
           */

        }, {
          key: "getLangs",
          value: function getLangs() {
            return this.langs;
          }
          /**
           * Add available langs
           * @param {?} langs
           * @return {?}
           */

        }, {
          key: "addLangs",
          value: function addLangs(langs) {
            var _this550 = this;

            langs.forEach(
            /**
            * @param {?} lang
            * @return {?}
            */
            function (lang) {
              if (_this550.langs.indexOf(lang) === -1) {
                _this550.langs.push(lang);
              }
            });
          }
          /**
           * Update the list of available langs
           * @private
           * @return {?}
           */

        }, {
          key: "updateLangs",
          value: function updateLangs() {
            this.addLangs(Object.keys(this.translations));
          }
          /**
           * Returns the parsed result of the translations
           * @param {?} translations
           * @param {?} key
           * @param {?=} interpolateParams
           * @return {?}
           */

        }, {
          key: "getParsedResult",
          value: function getParsedResult(translations, key, interpolateParams) {
            /** @type {?} */
            var res;

            if (key instanceof Array) {
              /** @type {?} */
              var result = {};
              /** @type {?} */

              var observables = false;

              var _iterator68 = _createForOfIteratorHelper(key),
                  _step67;

              try {
                for (_iterator68.s(); !(_step67 = _iterator68.n()).done;) {
                  var k = _step67.value;
                  result[k] = this.getParsedResult(translations, k, interpolateParams);

                  if (Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["isObservable"])(result[k])) {
                    observables = true;
                  }
                }
              } catch (err) {
                _iterator68.e(err);
              } finally {
                _iterator68.f();
              }

              if (observables) {
                /** @type {?} */
                var sources = key.map(
                /**
                * @param {?} k
                * @return {?}
                */
                function (k) {
                  return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["isObservable"])(result[k]) ? result[k] : Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(
                  /** @type {?} */
                  result[k]);
                });
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["forkJoin"])(sources).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(
                /**
                * @param {?} arr
                * @return {?}
                */
                function (arr) {
                  /** @type {?} */
                  var obj = {};
                  arr.forEach(
                  /**
                  * @param {?} value
                  * @param {?} index
                  * @return {?}
                  */
                  function (value, index) {
                    obj[key[index]] = value;
                  });
                  return obj;
                }));
              }

              return result;
            }

            if (translations) {
              res = this.parser.interpolate(this.parser.getValue(translations, key), interpolateParams);
            }

            if (typeof res === "undefined" && this.defaultLang != null && this.defaultLang !== this.currentLang && this.useDefaultLang) {
              res = this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang], key), interpolateParams);
            }

            if (typeof res === "undefined") {
              /** @type {?} */
              var params = {
                key: key,
                translateService: this
              };

              if (typeof interpolateParams !== 'undefined') {
                params.interpolateParams = interpolateParams;
              }

              res = this.missingTranslationHandler.handle(params);
            }

            return typeof res !== "undefined" ? res : key;
          }
          /**
           * Gets the translated value of a key (or an array of keys)
           * @param {?} key
           * @param {?=} interpolateParams
           * @return {?} the translated key, or an object of translated keys
           */

        }, {
          key: "get",
          value: function get(key, interpolateParams) {
            var _this551 = this;

            if (!isDefined(key) || !key.length) {
              throw new Error("Parameter \"key\" required");
            } // check if we are loading a new translation to use


            if (this.pending) {
              return this.loadingTranslations.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["concatMap"])(
              /**
              * @param {?} res
              * @return {?}
              */
              function (res) {
                res = _this551.getParsedResult(res, key, interpolateParams);
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["isObservable"])(res) ? res : Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(res);
              }));
            } else {
              /** @type {?} */
              var res = this.getParsedResult(this.translations[this.currentLang], key, interpolateParams);
              return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["isObservable"])(res) ? res : Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(res);
            }
          }
          /**
           * Returns a stream of translated values of a key (or an array of keys) which updates
           * whenever the translation changes.
           * @param {?} key
           * @param {?=} interpolateParams
           * @return {?} A stream of the translated key, or an object of translated keys
           */

        }, {
          key: "getStreamOnTranslationChange",
          value: function getStreamOnTranslationChange(key, interpolateParams) {
            var _this552 = this;

            if (!isDefined(key) || !key.length) {
              throw new Error("Parameter \"key\" required");
            }

            return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["concat"])(Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["defer"])(
            /**
            * @return {?}
            */
            function () {
              return _this552.get(key, interpolateParams);
            }), this.onTranslationChange.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["switchMap"])(
            /**
            * @param {?} event
            * @return {?}
            */
            function (event) {
              /** @type {?} */
              var res = _this552.getParsedResult(event.translations, key, interpolateParams);

              if (typeof res.subscribe === 'function') {
                return res;
              } else {
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(res);
              }
            })));
          }
          /**
           * Returns a stream of translated values of a key (or an array of keys) which updates
           * whenever the language changes.
           * @param {?} key
           * @param {?=} interpolateParams
           * @return {?} A stream of the translated key, or an object of translated keys
           */

        }, {
          key: "stream",
          value: function stream(key, interpolateParams) {
            var _this553 = this;

            if (!isDefined(key) || !key.length) {
              throw new Error("Parameter \"key\" required");
            }

            return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["concat"])(Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["defer"])(
            /**
            * @return {?}
            */
            function () {
              return _this553.get(key, interpolateParams);
            }), this.onLangChange.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["switchMap"])(
            /**
            * @param {?} event
            * @return {?}
            */
            function (event) {
              /** @type {?} */
              var res = _this553.getParsedResult(event.translations, key, interpolateParams);

              return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["isObservable"])(res) ? res : Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(res);
            })));
          }
          /**
           * Returns a translation instantly from the internal state of loaded translation.
           * All rules regarding the current language, the preferred language of even fallback languages will be used except any promise handling.
           * @param {?} key
           * @param {?=} interpolateParams
           * @return {?}
           */

        }, {
          key: "instant",
          value: function instant(key, interpolateParams) {
            if (!isDefined(key) || !key.length) {
              throw new Error("Parameter \"key\" required");
            }
            /** @type {?} */


            var res = this.getParsedResult(this.translations[this.currentLang], key, interpolateParams);

            if (Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["isObservable"])(res)) {
              if (key instanceof Array) {
                /** @type {?} */
                var obj = {};
                key.forEach(
                /**
                * @param {?} value
                * @param {?} index
                * @return {?}
                */
                function (value, index) {
                  obj[key[index]] = key[index];
                });
                return obj;
              }

              return key;
            } else {
              return res;
            }
          }
          /**
           * Sets the translated value of a key, after compiling it
           * @param {?} key
           * @param {?} value
           * @param {?=} lang
           * @return {?}
           */

        }, {
          key: "set",
          value: function set(key, value) {
            var lang = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.currentLang;
            this.translations[lang][key] = this.compiler.compile(value, lang);
            this.updateLangs();
            this.onTranslationChange.emit({
              lang: lang,
              translations: this.translations[lang]
            });
          }
          /**
           * Changes the current lang
           * @private
           * @param {?} lang
           * @return {?}
           */

        }, {
          key: "changeLang",
          value: function changeLang(lang) {
            this.currentLang = lang;
            this.onLangChange.emit({
              lang: lang,
              translations: this.translations[lang]
            }); // if there is no default lang, use the one that we just set

            if (this.defaultLang == null) {
              this.changeDefaultLang(lang);
            }
          }
          /**
           * Changes the default lang
           * @private
           * @param {?} lang
           * @return {?}
           */

        }, {
          key: "changeDefaultLang",
          value: function changeDefaultLang(lang) {
            this.defaultLang = lang;
            this.onDefaultLangChange.emit({
              lang: lang,
              translations: this.translations[lang]
            });
          }
          /**
           * Allows to reload the lang file from the file
           * @param {?} lang
           * @return {?}
           */

        }, {
          key: "reloadLang",
          value: function reloadLang(lang) {
            this.resetLang(lang);
            return this.getTranslation(lang);
          }
          /**
           * Deletes inner translation
           * @param {?} lang
           * @return {?}
           */

        }, {
          key: "resetLang",
          value: function resetLang(lang) {
            this._translationRequests[lang] = undefined;
            this.translations[lang] = undefined;
          }
          /**
           * Returns the language code name from the browser, e.g. "de"
           * @return {?}
           */

        }, {
          key: "getBrowserLang",
          value: function getBrowserLang() {
            if (typeof window === 'undefined' || typeof window.navigator === 'undefined') {
              return undefined;
            }
            /** @type {?} */


            var browserLang = window.navigator.languages ? window.navigator.languages[0] : null;
            browserLang = browserLang || window.navigator.language || window.navigator.browserLanguage || window.navigator.userLanguage;

            if (typeof browserLang === 'undefined') {
              return undefined;
            }

            if (browserLang.indexOf('-') !== -1) {
              browserLang = browserLang.split('-')[0];
            }

            if (browserLang.indexOf('_') !== -1) {
              browserLang = browserLang.split('_')[0];
            }

            return browserLang;
          }
          /**
           * Returns the culture language code name from the browser, e.g. "de-DE"
           * @return {?}
           */

        }, {
          key: "getBrowserCultureLang",
          value: function getBrowserCultureLang() {
            if (typeof window === 'undefined' || typeof window.navigator === 'undefined') {
              return undefined;
            }
            /** @type {?} */


            var browserCultureLang = window.navigator.languages ? window.navigator.languages[0] : null;
            browserCultureLang = browserCultureLang || window.navigator.language || window.navigator.browserLanguage || window.navigator.userLanguage;
            return browserCultureLang;
          }
        }]);

        return TranslateService;
      }();

      TranslateService.ɵfac = function TranslateService_Factory(t) {
        return new (t || TranslateService)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](TranslateStore), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](TranslateLoader), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](TranslateCompiler), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](TranslateParser), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](MissingTranslationHandler), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](USE_DEFAULT_LANG), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](USE_STORE), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](USE_EXTEND), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](DEFAULT_LANGUAGE));
      };

      TranslateService.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: TranslateService,
        factory: TranslateService.ɵfac
      });
      /** @nocollapse */

      TranslateService.ctorParameters = function () {
        return [{
          type: TranslateStore
        }, {
          type: TranslateLoader
        }, {
          type: TranslateCompiler
        }, {
          type: TranslateParser
        }, {
          type: MissingTranslationHandler
        }, {
          type: Boolean,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [USE_DEFAULT_LANG]
          }]
        }, {
          type: Boolean,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [USE_STORE]
          }]
        }, {
          type: Boolean,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [USE_EXTEND]
          }]
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [DEFAULT_LANGUAGE]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TranslateService, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], function () {
          return [{
            type: TranslateStore
          }, {
            type: TranslateLoader
          }, {
            type: TranslateCompiler
          }, {
            type: TranslateParser
          }, {
            type: MissingTranslationHandler
          }, {
            type: Boolean,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [USE_DEFAULT_LANG]
            }]
          }, {
            type: Boolean,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [USE_STORE]
            }]
          }, {
            type: Boolean,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [USE_EXTEND]
            }]
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [DEFAULT_LANGUAGE]
            }]
          }];
        }, null);
      })();

      if (false) {}
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var TranslateDirective = /*#__PURE__*/function () {
        /**
         * @param {?} translateService
         * @param {?} element
         * @param {?} _ref
         */
        function TranslateDirective(translateService, element, _ref) {
          var _this554 = this;

          _classCallCheck(this, TranslateDirective);

          this.translateService = translateService;
          this.element = element;
          this._ref = _ref; // subscribe to onTranslationChange event, in case the translations of the current lang change

          if (!this.onTranslationChangeSub) {
            this.onTranslationChangeSub = this.translateService.onTranslationChange.subscribe(
            /**
            * @param {?} event
            * @return {?}
            */
            function (event) {
              if (event.lang === _this554.translateService.currentLang) {
                _this554.checkNodes(true, event.translations);
              }
            });
          } // subscribe to onLangChange event, in case the language changes


          if (!this.onLangChangeSub) {
            this.onLangChangeSub = this.translateService.onLangChange.subscribe(
            /**
            * @param {?} event
            * @return {?}
            */
            function (event) {
              _this554.checkNodes(true, event.translations);
            });
          } // subscribe to onDefaultLangChange event, in case the default language changes


          if (!this.onDefaultLangChangeSub) {
            this.onDefaultLangChangeSub = this.translateService.onDefaultLangChange.subscribe(
            /**
            * @param {?} event
            * @return {?}
            */
            function (event) {
              _this554.checkNodes(true);
            });
          }
        }
        /**
         * @param {?} key
         * @return {?}
         */


        _createClass2(TranslateDirective, [{
          key: "translate",
          set: function set(key) {
            if (key) {
              this.key = key;
              this.checkNodes();
            }
          }
          /**
           * @param {?} params
           * @return {?}
           */

        }, {
          key: "translateParams",
          set: function set(params) {
            if (!equals(this.currentParams, params)) {
              this.currentParams = params;
              this.checkNodes(true);
            }
          }
          /**
           * @return {?}
           */

        }, {
          key: "ngAfterViewChecked",
          value: function ngAfterViewChecked() {
            this.checkNodes();
          }
          /**
           * @param {?=} forceUpdate
           * @param {?=} translations
           * @return {?}
           */

        }, {
          key: "checkNodes",
          value: function checkNodes() {
            var forceUpdate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
            var translations = arguments.length > 1 ? arguments[1] : undefined;

            /** @type {?} */
            var nodes = this.element.nativeElement.childNodes; // if the element is empty

            if (!nodes.length) {
              // we add the key as content
              this.setContent(this.element.nativeElement, this.key);
              nodes = this.element.nativeElement.childNodes;
            }

            for (var i = 0; i < nodes.length; ++i) {
              /** @type {?} */
              var node = nodes[i];

              if (node.nodeType === 3) {
                // node type 3 is a text node
                // node type 3 is a text node

                /** @type {?} */
                var key = void 0;

                if (forceUpdate) {
                  node.lastKey = null;
                }

                if (isDefined(node.lookupKey)) {
                  key = node.lookupKey;
                } else if (this.key) {
                  key = this.key;
                } else {
                  /** @type {?} */
                  var content = this.getContent(node);
                  /** @type {?} */

                  var trimmedContent = content.trim();

                  if (trimmedContent.length) {
                    node.lookupKey = trimmedContent; // we want to use the content as a key, not the translation value

                    if (content !== node.currentValue) {
                      key = trimmedContent; // the content was changed from the user, we'll use it as a reference if needed

                      node.originalContent = content || node.originalContent;
                    } else if (node.originalContent) {
                      // the content seems ok, but the lang has changed
                      // the current content is the translation, not the key, use the last real content as key
                      key = node.originalContent.trim();
                    } else if (content !== node.currentValue) {
                      // we want to use the content as a key, not the translation value
                      key = trimmedContent; // the content was changed from the user, we'll use it as a reference if needed

                      node.originalContent = content || node.originalContent;
                    }
                  }
                }

                this.updateValue(key, node, translations);
              }
            }
          }
          /**
           * @param {?} key
           * @param {?} node
           * @param {?} translations
           * @return {?}
           */

        }, {
          key: "updateValue",
          value: function updateValue(key, node, translations) {
            var _this555 = this;

            if (key) {
              if (node.lastKey === key && this.lastParams === this.currentParams) {
                return;
              }

              this.lastParams = this.currentParams;
              /** @type {?} */

              var onTranslation =
              /**
              * @param {?} res
              * @return {?}
              */
              function onTranslation(res) {
                if (res !== key) {
                  node.lastKey = key;
                }

                if (!node.originalContent) {
                  node.originalContent = _this555.getContent(node);
                }

                node.currentValue = isDefined(res) ? res : node.originalContent || key; // we replace in the original content to preserve spaces that we might have trimmed

                _this555.setContent(node, _this555.key ? node.currentValue : node.originalContent.replace(key, node.currentValue));

                _this555._ref.markForCheck();
              };

              if (isDefined(translations)) {
                /** @type {?} */
                var res = this.translateService.getParsedResult(translations, key, this.currentParams);

                if (Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["isObservable"])(res)) {
                  res.subscribe(onTranslation);
                } else {
                  onTranslation(res);
                }
              } else {
                this.translateService.get(key, this.currentParams).subscribe(onTranslation);
              }
            }
          }
          /**
           * @param {?} node
           * @return {?}
           */

        }, {
          key: "getContent",
          value: function getContent(node) {
            return isDefined(node.textContent) ? node.textContent : node.data;
          }
          /**
           * @param {?} node
           * @param {?} content
           * @return {?}
           */

        }, {
          key: "setContent",
          value: function setContent(node, content) {
            if (isDefined(node.textContent)) {
              node.textContent = content;
            } else {
              node.data = content;
            }
          }
          /**
           * @return {?}
           */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            if (this.onLangChangeSub) {
              this.onLangChangeSub.unsubscribe();
            }

            if (this.onDefaultLangChangeSub) {
              this.onDefaultLangChangeSub.unsubscribe();
            }

            if (this.onTranslationChangeSub) {
              this.onTranslationChangeSub.unsubscribe();
            }
          }
        }]);

        return TranslateDirective;
      }();

      TranslateDirective.ɵfac = function TranslateDirective_Factory(t) {
        return new (t || TranslateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](TranslateService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]));
      };

      TranslateDirective.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
        type: TranslateDirective,
        selectors: [["", "translate", ""], ["", "ngx-translate", ""]],
        inputs: {
          translate: "translate",
          translateParams: "translateParams"
        }
      });
      /** @nocollapse */

      TranslateDirective.ctorParameters = function () {
        return [{
          type: TranslateService
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]
        }];
      };

      TranslateDirective.propDecorators = {
        translate: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }],
        translateParams: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TranslateDirective, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
          args: [{
            selector: '[translate],[ngx-translate]'
          }]
        }], function () {
          return [{
            type: TranslateService
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]
          }];
        }, {
          translate: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }],
          translateParams: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
          }]
        });
      })();

      if (false) {}
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var TranslatePipe = /*#__PURE__*/function () {
        /**
         * @param {?} translate
         * @param {?} _ref
         */
        function TranslatePipe(translate, _ref) {
          _classCallCheck(this, TranslatePipe);

          this.translate = translate;
          this._ref = _ref;
          this.value = '';
        }
        /**
         * @param {?} key
         * @param {?=} interpolateParams
         * @param {?=} translations
         * @return {?}
         */


        _createClass2(TranslatePipe, [{
          key: "updateValue",
          value: function updateValue(key, interpolateParams, translations) {
            var _this556 = this;

            /** @type {?} */
            var onTranslation =
            /**
            * @param {?} res
            * @return {?}
            */
            function onTranslation(res) {
              _this556.value = res !== undefined ? res : key;
              _this556.lastKey = key;

              _this556._ref.markForCheck();
            };

            if (translations) {
              /** @type {?} */
              var res = this.translate.getParsedResult(translations, key, interpolateParams);

              if (Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["isObservable"])(res.subscribe)) {
                res.subscribe(onTranslation);
              } else {
                onTranslation(res);
              }
            }

            this.translate.get(key, interpolateParams).subscribe(onTranslation);
          }
          /**
           * @param {?} query
           * @param {...?} args
           * @return {?}
           */

        }, {
          key: "transform",
          value: function transform(query) {
            var _this557 = this;

            if (!query || !query.length) {
              return query;
            } // if we ask another time for the same key, return the last value


            for (var _len50 = arguments.length, args = new Array(_len50 > 1 ? _len50 - 1 : 0), _key51 = 1; _key51 < _len50; _key51++) {
              args[_key51 - 1] = arguments[_key51];
            }

            if (equals(query, this.lastKey) && equals(args, this.lastParams)) {
              return this.value;
            }
            /** @type {?} */


            var interpolateParams;

            if (isDefined(args[0]) && args.length) {
              if (typeof args[0] === 'string' && args[0].length) {
                // we accept objects written in the template such as {n:1}, {'n':1}, {n:'v'}
                // which is why we might need to change it to real JSON objects such as {"n":1} or {"n":"v"}

                /** @type {?} */
                var validArgs = args[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g, '"$2":').replace(/:(\s)?(\')(.*?)(\')/g, ':"$3"');

                try {
                  interpolateParams = JSON.parse(validArgs);
                } catch (e) {
                  throw new SyntaxError("Wrong parameter in TranslatePipe. Expected a valid Object, received: ".concat(args[0]));
                }
              } else if (typeof args[0] === 'object' && !Array.isArray(args[0])) {
                interpolateParams = args[0];
              }
            } // store the query, in case it changes


            this.lastKey = query; // store the params, in case they change

            this.lastParams = args; // set the value

            this.updateValue(query, interpolateParams); // if there is a subscription to onLangChange, clean it

            this._dispose(); // subscribe to onTranslationChange event, in case the translations change


            if (!this.onTranslationChange) {
              this.onTranslationChange = this.translate.onTranslationChange.subscribe(
              /**
              * @param {?} event
              * @return {?}
              */
              function (event) {
                if (_this557.lastKey && event.lang === _this557.translate.currentLang) {
                  _this557.lastKey = null;

                  _this557.updateValue(query, interpolateParams, event.translations);
                }
              });
            } // subscribe to onLangChange event, in case the language changes


            if (!this.onLangChange) {
              this.onLangChange = this.translate.onLangChange.subscribe(
              /**
              * @param {?} event
              * @return {?}
              */
              function (event) {
                if (_this557.lastKey) {
                  _this557.lastKey = null; // we want to make sure it doesn't return the same value until it's been updated

                  _this557.updateValue(query, interpolateParams, event.translations);
                }
              });
            } // subscribe to onDefaultLangChange event, in case the default language changes


            if (!this.onDefaultLangChange) {
              this.onDefaultLangChange = this.translate.onDefaultLangChange.subscribe(
              /**
              * @return {?}
              */
              function () {
                if (_this557.lastKey) {
                  _this557.lastKey = null; // we want to make sure it doesn't return the same value until it's been updated

                  _this557.updateValue(query, interpolateParams);
                }
              });
            }

            return this.value;
          }
          /**
           * Clean any existing subscription to change events
           * @private
           * @return {?}
           */

        }, {
          key: "_dispose",
          value: function _dispose() {
            if (typeof this.onTranslationChange !== 'undefined') {
              this.onTranslationChange.unsubscribe();
              this.onTranslationChange = undefined;
            }

            if (typeof this.onLangChange !== 'undefined') {
              this.onLangChange.unsubscribe();
              this.onLangChange = undefined;
            }

            if (typeof this.onDefaultLangChange !== 'undefined') {
              this.onDefaultLangChange.unsubscribe();
              this.onDefaultLangChange = undefined;
            }
          }
          /**
           * @return {?}
           */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this._dispose();
          }
        }]);

        return TranslatePipe;
      }();

      TranslatePipe.ɵfac = function TranslatePipe_Factory(t) {
        return new (t || TranslatePipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](TranslateService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinjectPipeChangeDetectorRef"]());
      };

      TranslatePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "translate",
        type: TranslatePipe,
        pure: false
      });
      TranslatePipe.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: TranslatePipe,
        factory: TranslatePipe.ɵfac
      });
      /** @nocollapse */

      TranslatePipe.ctorParameters = function () {
        return [{
          type: TranslateService
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TranslatePipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'translate',
            pure: false // required to update the value when the promise is resolved

          }]
        }], function () {
          return [{
            type: TranslateService
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]
          }];
        }, null);
      })();

      if (false) {}
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @record
       */


      function TranslateModuleConfig() {}

      if (false) {}

      var TranslateModule = /*#__PURE__*/function () {
        function TranslateModule() {
          _classCallCheck(this, TranslateModule);
        }

        _createClass2(TranslateModule, null, [{
          key: "forRoot",
          value:
          /**
           * Use this method in your root module to provide the TranslateService
           * @param {?=} config
           * @return {?}
           */
          function forRoot() {
            var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            return {
              ngModule: TranslateModule,
              providers: [config.loader || {
                provide: TranslateLoader,
                useClass: TranslateFakeLoader
              }, config.compiler || {
                provide: TranslateCompiler,
                useClass: TranslateFakeCompiler
              }, config.parser || {
                provide: TranslateParser,
                useClass: TranslateDefaultParser
              }, config.missingTranslationHandler || {
                provide: MissingTranslationHandler,
                useClass: FakeMissingTranslationHandler
              }, TranslateStore, {
                provide: USE_STORE,
                useValue: config.isolate
              }, {
                provide: USE_DEFAULT_LANG,
                useValue: config.useDefaultLang
              }, {
                provide: USE_EXTEND,
                useValue: config.extend
              }, {
                provide: DEFAULT_LANGUAGE,
                useValue: config.defaultLanguage
              }, TranslateService]
            };
          }
          /**
           * Use this method in your other (non root) modules to import the directive/pipe
           * @param {?=} config
           * @return {?}
           */

        }, {
          key: "forChild",
          value: function forChild() {
            var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            return {
              ngModule: TranslateModule,
              providers: [config.loader || {
                provide: TranslateLoader,
                useClass: TranslateFakeLoader
              }, config.compiler || {
                provide: TranslateCompiler,
                useClass: TranslateFakeCompiler
              }, config.parser || {
                provide: TranslateParser,
                useClass: TranslateDefaultParser
              }, config.missingTranslationHandler || {
                provide: MissingTranslationHandler,
                useClass: FakeMissingTranslationHandler
              }, {
                provide: USE_STORE,
                useValue: config.isolate
              }, {
                provide: USE_DEFAULT_LANG,
                useValue: config.useDefaultLang
              }, {
                provide: USE_EXTEND,
                useValue: config.extend
              }, {
                provide: DEFAULT_LANGUAGE,
                useValue: config.defaultLanguage
              }, TranslateService]
            };
          }
        }]);

        return TranslateModule;
      }();

      TranslateModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
        type: TranslateModule
      });
      TranslateModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({
        factory: function TranslateModule_Factory(t) {
          return new (t || TranslateModule)();
        }
      });

      (function () {
        (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](TranslateModule, {
          declarations: [TranslatePipe, TranslateDirective],
          exports: [TranslatePipe, TranslateDirective]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TranslateModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
          args: [{
            declarations: [TranslatePipe, TranslateDirective],
            exports: [TranslatePipe, TranslateDirective]
          }]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */
      //# sourceMappingURL=ngx-translate-core.js.map

      /***/

    },

    /***/
    "spgP":
    /*!**************************************************************************!*\
      !*** ./node_modules/@angular/fire/__ivy_ngcc__/fesm2015/angular-fire.js ***!
      \**************************************************************************/

    /*! exports provided: AngularFireModule, FIREBASE_APP_NAME, FIREBASE_OPTIONS, FirebaseApp, VERSION, ɵ0, ɵAngularFireSchedulers, ɵBlockUntilFirstOperator, ɵZoneScheduler, ɵapplyMixins, ɵfetchInstance, ɵfirebaseAppFactory, ɵkeepUnstableUntilFirstFactory, ɵlazySDKProxy, ɵlogAuthEmulatorError */

    /***/
    function spgP(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* WEBPACK VAR INJECTION */


      (function (module) {
        /* harmony export (binding) */
        __webpack_require__.d(__webpack_exports__, "AngularFireModule", function () {
          return AngularFireModule;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "FIREBASE_APP_NAME", function () {
          return FIREBASE_APP_NAME;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "FIREBASE_OPTIONS", function () {
          return FIREBASE_OPTIONS;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "FirebaseApp", function () {
          return FirebaseApp;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "VERSION", function () {
          return VERSION;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "ɵ0", function () {
          return ɵ0;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "ɵAngularFireSchedulers", function () {
          return ɵAngularFireSchedulers;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "ɵBlockUntilFirstOperator", function () {
          return ɵBlockUntilFirstOperator;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "ɵZoneScheduler", function () {
          return ɵZoneScheduler;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "ɵapplyMixins", function () {
          return ɵapplyMixins;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "ɵfetchInstance", function () {
          return ɵfetchInstance;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "ɵfirebaseAppFactory", function () {
          return ɵfirebaseAppFactory;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "ɵkeepUnstableUntilFirstFactory", function () {
          return ɵkeepUnstableUntilFirstFactory;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "ɵlazySDKProxy", function () {
          return ɵlazySDKProxy;
        });
        /* harmony export (binding) */


        __webpack_require__.d(__webpack_exports__, "ɵlogAuthEmulatorError", function () {
          return ɵlogAuthEmulatorError;
        });
        /* harmony import */


        var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
        /*! rxjs */
        "qCKp");
        /* harmony import */


        var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
        /*! rxjs/operators */
        "kU1M");
        /* harmony import */


        var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
        /*! @angular/core */
        "fXoL");
        /* harmony import */


        var firebase_app__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
        /*! firebase/app */
        "Jgta");

        function noop() {}
        /**
         * Schedules tasks so that they are invoked inside the Zone that is passed in the constructor.
         */
        // tslint:disable-next-line:class-name


        var ɵZoneScheduler = /*#__PURE__*/function () {
          function ɵZoneScheduler(zone) {
            var delegate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : rxjs__WEBPACK_IMPORTED_MODULE_0__["queueScheduler"];

            _classCallCheck(this, ɵZoneScheduler);

            this.zone = zone;
            this.delegate = delegate;
          }

          _createClass2(ɵZoneScheduler, [{
            key: "now",
            value: function now() {
              return this.delegate.now();
            }
          }, {
            key: "schedule",
            value: function schedule(work, delay, state) {
              var targetZone = this.zone; // Wrap the specified work function to make sure that if nested scheduling takes place the
              // work is executed in the correct zone

              var workInZone = function workInZone(state) {
                var _this558 = this;

                targetZone.runGuarded(function () {
                  work.apply(_this558, [state]);
                });
              }; // Scheduling itself needs to be run in zone to ensure setInterval calls for async scheduling are done
              // inside the correct zone. This scheduler needs to schedule asynchronously always to ensure that
              // firebase emissions are never synchronous. Specifying a delay causes issues with the queueScheduler delegate.


              return this.delegate.schedule(workInZone, delay, state);
            }
          }]);

          return ɵZoneScheduler;
        }(); // tslint:disable-next-line:class-name


        var ɵBlockUntilFirstOperator = /*#__PURE__*/function () {
          function ɵBlockUntilFirstOperator(zone) {
            _classCallCheck(this, ɵBlockUntilFirstOperator);

            this.zone = zone;
            this.task = null;
          }

          _createClass2(ɵBlockUntilFirstOperator, [{
            key: "call",
            value: function call(subscriber, source) {
              var unscheduleTask = this.unscheduleTask.bind(this);
              this.task = this.zone.run(function () {
                return Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop);
              });
              return source.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["tap"])({
                next: unscheduleTask,
                complete: unscheduleTask,
                error: unscheduleTask
              })).subscribe(subscriber).add(unscheduleTask);
            }
          }, {
            key: "unscheduleTask",
            value: function unscheduleTask() {
              var _this559 = this;

              // maybe this is a race condition, invoke in a timeout
              // hold for 10ms while I try to figure out what is going on
              setTimeout(function () {
                if (_this559.task != null && _this559.task.state === 'scheduled') {
                  _this559.task.invoke();

                  _this559.task = null;
                }
              }, 10);
            }
          }]);

          return ɵBlockUntilFirstOperator;
        }(); // tslint:disable-next-line:class-name


        var ɵAngularFireSchedulers = function ɵAngularFireSchedulers(ngZone) {
          _classCallCheck(this, ɵAngularFireSchedulers);

          this.ngZone = ngZone;
          this.outsideAngular = ngZone.runOutsideAngular(function () {
            return new ɵZoneScheduler(Zone.current);
          });
          this.insideAngular = ngZone.run(function () {
            return new ɵZoneScheduler(Zone.current, rxjs__WEBPACK_IMPORTED_MODULE_0__["asyncScheduler"]);
          });
        };
        /**
         * Operator to block the zone until the first value has been emitted or the observable
         * has completed/errored. This is used to make sure that universal waits until the first
         * value from firebase but doesn't block the zone forever since the firebase subscription
         * is still alive.
         */


        function ɵkeepUnstableUntilFirstFactory(schedulers) {
          return function keepUnstableUntilFirst(obs$) {
            obs$ = obs$.lift(new ɵBlockUntilFirstOperator(schedulers.ngZone));
            return obs$.pipe( // Run the subscribe body outside of Angular (e.g. calling Firebase SDK to add a listener to a change event)
            Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["subscribeOn"])(schedulers.outsideAngular), // Run operators inside the angular zone (e.g. side effects via tap())
            Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["observeOn"])(schedulers.insideAngular) // INVESTIGATE https://github.com/angular/angularfire/pull/2315
            // share()
            );
          };
        } // DEBUG quick debugger function for inline logging that typescript doesn't complain about
        //       wrote it for debugging the ɵlazySDKProxy, commenting out for now; should consider exposing a
        //       verbose mode for AngularFire in a future release that uses something like this in multiple places
        //       usage: () => log('something') || returnValue
        // const log = (...args: any[]): false => { console.log(...args); return false }
        // The problem here are things like ngOnDestroy are missing, then triggering the service
        // rather than dig too far; I'm capturing these as I go.


        var noopFunctions = ['ngOnDestroy']; // INVESTIGATE should we make the Proxy revokable and do some cleanup?
        //             right now it's fairly simple but I'm sure this will grow in complexity

        var ɵlazySDKProxy = function ɵlazySDKProxy(klass, observable, zone) {
          var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
          return new Proxy(klass, {
            get: function get(_, name) {
              return zone.runOutsideAngular(function () {
                var _a;

                if (klass[name]) {
                  if ((_a = options === null || options === void 0 ? void 0 : options.spy) === null || _a === void 0 ? void 0 : _a.get) {
                    options.spy.get(name, klass[name]);
                  }

                  return klass[name];
                }

                if (noopFunctions.indexOf(name) > -1) {
                  return function () {};
                }

                var promise = observable.toPromise().then(function (mod) {
                  var ret = mod && mod[name]; // TODO move to proper type guards

                  if (typeof ret === 'function') {
                    return ret.bind(mod);
                  } else if (ret && ret.then) {
                    return ret.then(function (res) {
                      return zone.run(function () {
                        return res;
                      });
                    });
                  } else {
                    return zone.run(function () {
                      return ret;
                    });
                  }
                }); // recurse the proxy

                return new Proxy(function () {}, {
                  get: function get(_, name) {
                    return promise[name];
                  },
                  // TODO handle callbacks as transparently as I can
                  apply: function apply(self, _, args) {
                    return promise.then(function (it) {
                      var _a;

                      var res = it && it.apply(void 0, _toConsumableArray(args));

                      if ((_a = options === null || options === void 0 ? void 0 : options.spy) === null || _a === void 0 ? void 0 : _a.apply) {
                        options.spy.apply(name, args, res);
                      }

                      return res;
                    });
                  }
                });
              });
            }
          });
        };

        var ɵapplyMixins = function ɵapplyMixins(derivedCtor, constructors) {
          constructors.forEach(function (baseCtor) {
            Object.getOwnPropertyNames(baseCtor.prototype || baseCtor).forEach(function (name) {
              Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype || baseCtor, name));
            });
          });
        };

        var FIREBASE_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["InjectionToken"]('angularfire2.app.options');
        var FIREBASE_APP_NAME = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["InjectionToken"]('angularfire2.app.nameOrConfig'); // Have to implement as we need to return a class from the provider, we should consider exporting
        // this in the firebase/app types as this is our highest risk of breaks

        var FirebaseApp = function FirebaseApp() {
          _classCallCheck(this, FirebaseApp);
        };

        var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["Version"]('6.1.5');

        function ɵfirebaseAppFactory(options, zone, nameOrConfig) {
          var name = typeof nameOrConfig === 'string' && nameOrConfig || '[DEFAULT]';
          var config = typeof nameOrConfig === 'object' && nameOrConfig || {};
          config.name = config.name || name; // Added any due to some inconsistency between @firebase/app and firebase types

          var existingApp = firebase_app__WEBPACK_IMPORTED_MODULE_3__["default"].apps.filter(function (app) {
            return app && app.name === config.name;
          })[0]; // We support FirebaseConfig, initializeApp's public type only accepts string; need to cast as any
          // Could be solved with https://github.com/firebase/firebase-js-sdk/pull/1206

          var app = existingApp || zone.runOutsideAngular(function () {
            return firebase_app__WEBPACK_IMPORTED_MODULE_3__["default"].initializeApp(options, config);
          });

          try {
            if (JSON.stringify(options) !== JSON.stringify(app.options)) {
              var hmr = !!module.hot;
              log('error', "".concat(app.name, " Firebase App already initialized with different options").concat(hmr ? ', you may need to reload as Firebase is not HMR aware.' : '.'));
            }
          } catch (e) {}

          return app;
        }

        var ɵlogAuthEmulatorError = function ɵlogAuthEmulatorError() {
          // TODO sort this out, https://github.com/angular/angularfire/issues/2656
          log('warn', 'You may need to import \'firebase/auth\' manually in your component rather than rely on AngularFireAuth\'s dynamic import, when using the emulator suite https://github.com/angular/angularfire/issues/2656');
        };

        var log = function log(level) {
          if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["isDevMode"])() && typeof console !== 'undefined') {
            var _console2;

            for (var _len51 = arguments.length, args = new Array(_len51 > 1 ? _len51 - 1 : 0), _key52 = 1; _key52 < _len51; _key52++) {
              args[_key52 - 1] = arguments[_key52];
            }

            (_console2 = console)[level].apply(_console2, args);
          }
        };

        var ɵ0 = log;
        globalThis.ɵAngularfireInstanceCache || (globalThis.ɵAngularfireInstanceCache = new Map());

        function ɵfetchInstance(cacheKey, moduleName, app, fn, args) {
          var _ref107 = globalThis.ɵAngularfireInstanceCache.get(cacheKey) || [],
              _ref108 = _toArray(_ref107),
              instance = _ref108[0],
              cachedArgs = _ref108.slice(1);

          if (instance) {
            try {
              if (args.some(function (arg, i) {
                var cachedArg = cachedArgs[i];

                if (arg && typeof arg === 'object') {
                  return JSON.stringify(arg) !== JSON.stringify(cachedArg);
                } else {
                  return arg !== cachedArg;
                }
              })) {
                var hmr = !!module.hot;
                log('error', "".concat(moduleName, " was already initialized on the ").concat(app.name, " Firebase App instance with different settings.").concat(hmr ? ' You may need to reload as Firebase is not HMR aware.' : ''));
              }
            } catch (e) {}

            return instance;
          } else {
            var newInstance = fn();
            globalThis.ɵAngularfireInstanceCache.set(cacheKey, [newInstance].concat(_toConsumableArray(args)));
            return newInstance;
          }
        }

        var FIREBASE_APP_PROVIDER = {
          provide: FirebaseApp,
          useFactory: ɵfirebaseAppFactory,
          deps: [FIREBASE_OPTIONS, _angular_core__WEBPACK_IMPORTED_MODULE_2__["NgZone"], [new _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"](), FIREBASE_APP_NAME]]
        };

        var AngularFireModule = /*#__PURE__*/function () {
          // tslint:disable-next-line:ban-types
          function AngularFireModule(platformId) {
            _classCallCheck(this, AngularFireModule);

            firebase_app__WEBPACK_IMPORTED_MODULE_3__["default"].registerVersion('angularfire', VERSION.full, platformId.toString());
            firebase_app__WEBPACK_IMPORTED_MODULE_3__["default"].registerVersion('angular', _angular_core__WEBPACK_IMPORTED_MODULE_2__["VERSION"].full);
          }

          _createClass2(AngularFireModule, null, [{
            key: "initializeApp",
            value: function initializeApp(options, nameOrConfig) {
              return {
                ngModule: AngularFireModule,
                providers: [{
                  provide: FIREBASE_OPTIONS,
                  useValue: options
                }, {
                  provide: FIREBASE_APP_NAME,
                  useValue: nameOrConfig
                }]
              };
            }
          }]);

          return AngularFireModule;
        }();

        AngularFireModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineNgModule"]({
          type: AngularFireModule
        });
        AngularFireModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineInjector"]({
          factory: function AngularFireModule_Factory(t) {
            return new (t || AngularFireModule)(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_2__["PLATFORM_ID"]));
          },
          providers: [FIREBASE_APP_PROVIDER]
        });
        /** @nocollapse */

        AngularFireModule.ctorParameters = function () {
          return [{
            type: Object,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"],
              args: [_angular_core__WEBPACK_IMPORTED_MODULE_2__["PLATFORM_ID"]]
            }]
          }];
        };
        /*@__PURE__*/


        (function () {
          _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵsetClassMetadata"](AngularFireModule, [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["NgModule"],
            args: [{
              providers: [FIREBASE_APP_PROVIDER]
            }]
          }], function () {
            return [{
              type: Object,
              decorators: [{
                type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"],
                args: [_angular_core__WEBPACK_IMPORTED_MODULE_2__["PLATFORM_ID"]]
              }]
            }];
          }, null);
        })();
        /**
         * Generated bundle index. Do not edit.
         */
        //# sourceMappingURL=angular-fire.js.map

        /* WEBPACK VAR INJECTION */

      }).call(this, __webpack_require__(
      /*! ./../../../../webpack/buildin/harmony-module.js */
      "3UD+")(module));
      /***/
    },

    /***/
    "syX2":
    /*!**********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/timeoutWith.js ***!
      \**********************************************************************/

    /*! exports provided: timeoutWith */

    /***/
    function syX2(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "timeoutWith", function () {
        return timeoutWith;
      });
      /* harmony import */


      var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../scheduler/async */
      "D0XW");
      /* harmony import */


      var _util_isDate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/isDate */
      "mlxB");
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function timeoutWith(due, withObservable) {
        var scheduler = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
        return function (source) {
          var absoluteTimeout = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_1__["isDate"])(due);
          var waitFor = absoluteTimeout ? +due - scheduler.now() : Math.abs(due);
          return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));
        };
      }

      var TimeoutWithOperator = /*#__PURE__*/function () {
        function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {
          _classCallCheck(this, TimeoutWithOperator);

          this.waitFor = waitFor;
          this.absoluteTimeout = absoluteTimeout;
          this.withObservable = withObservable;
          this.scheduler = scheduler;
        }

        _createClass2(TimeoutWithOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));
          }
        }]);

        return TimeoutWithOperator;
      }();

      var TimeoutWithSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP17) {
        _inherits(TimeoutWithSubscriber, _innerSubscribe__WEBP17);

        var _super274 = _createSuper(TimeoutWithSubscriber);

        function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {
          var _this560;

          _classCallCheck(this, TimeoutWithSubscriber);

          _this560 = _super274.call(this, destination);
          _this560.absoluteTimeout = absoluteTimeout;
          _this560.waitFor = waitFor;
          _this560.withObservable = withObservable;
          _this560.scheduler = scheduler;

          _this560.scheduleTimeout();

          return _this560;
        }

        _createClass2(TimeoutWithSubscriber, [{
          key: "scheduleTimeout",
          value: function scheduleTimeout() {
            var action = this.action;

            if (action) {
              this.action = action.schedule(this, this.waitFor);
            } else {
              this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));
            }
          }
        }, {
          key: "_next",
          value: function _next(value) {
            if (!this.absoluteTimeout) {
              this.scheduleTimeout();
            }

            _get(_getPrototypeOf(TimeoutWithSubscriber.prototype), "_next", this).call(this, value);
          }
        }, {
          key: "_unsubscribe",
          value: function _unsubscribe() {
            this.action = undefined;
            this.scheduler = null;
            this.withObservable = null;
          }
        }], [{
          key: "dispatchTimeout",
          value: function dispatchTimeout(subscriber) {
            var withObservable = subscriber.withObservable;

            subscriber._unsubscribeAndRecycle();

            subscriber.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(withObservable, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](subscriber)));
          }
        }]);

        return TimeoutWithSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"]); //# sourceMappingURL=timeoutWith.js.map

      /***/

    },

    /***/
    "tS1D":
    /*!******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/timeout.js ***!
      \******************************************************************/

    /*! exports provided: timeout */

    /***/
    function tS1D(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "timeout", function () {
        return timeout;
      });
      /* harmony import */


      var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../scheduler/async */
      "D0XW");
      /* harmony import */


      var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/TimeoutError */
      "Y6u4");
      /* harmony import */


      var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./timeoutWith */
      "syX2");
      /* harmony import */


      var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../observable/throwError */
      "z6cu");

      function timeout(due) {
        var scheduler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
        return Object(_timeoutWith__WEBPACK_IMPORTED_MODULE_2__["timeoutWith"])(due, Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_3__["throwError"])(new _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__["TimeoutError"]()), scheduler);
      } //# sourceMappingURL=timeout.js.map

      /***/

    },

    /***/
    "te5A":
    /*!**************************************************************************!*\
      !*** ./node_modules/@ionic-native/file-opener/__ivy_ngcc__/ngx/index.js ***!
      \**************************************************************************/

    /*! exports provided: FileOpener */

    /***/
    function te5A(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FileOpener", function () {
        return FileOpener;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _ionic_native_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @ionic-native/core */
      "C6fG");

      var FileOpener =
      /** @class */
      function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FileOpener, _super);

        function FileOpener() {
          return _super !== null && _super.apply(this, arguments) || this;
        }

        FileOpener.prototype.open = function (filePath, fileMIMEType) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "open", {
            "callbackStyle": "object",
            "successName": "success",
            "errorName": "error"
          }, arguments);
        };

        FileOpener.prototype.uninstall = function (packageId) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "uninstall", {
            "callbackStyle": "object",
            "successName": "success",
            "errorName": "error"
          }, arguments);
        };

        FileOpener.prototype.appIsInstalled = function (packageId) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "appIsInstalled", {
            "callbackStyle": "object",
            "successName": "success",
            "errorName": "error"
          }, arguments);
        };

        FileOpener.prototype.showOpenWithDialog = function (filePath, fileMIMEType) {
          return Object(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["cordova"])(this, "showOpenWithDialog", {
            "callbackStyle": "object",
            "successName": "success",
            "errorName": "error"
          }, arguments);
        };

        FileOpener.pluginName = "FileOpener";
        FileOpener.plugin = "cordova-plugin-file-opener2";
        FileOpener.pluginRef = "cordova.plugins.fileOpener2";
        FileOpener.repo = "https://github.com/pwlin/cordova-plugin-file-opener2";
        FileOpener.platforms = ["Android", "iOS", "Windows", "Windows Phone 8"];

        FileOpener.ɵfac = function FileOpener_Factory(t) {
          return ɵFileOpener_BaseFactory(t || FileOpener);
        };

        FileOpener.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
          token: FileOpener,
          factory: function factory(t) {
            return FileOpener.ɵfac(t);
          }
        });

        var ɵFileOpener_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetInheritedFactory"](FileOpener);
        /*@__PURE__*/


        (function () {
          _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](FileOpener, [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
          }], null, null);
        })();

        return FileOpener;
      }(_ionic_native_core__WEBPACK_IMPORTED_MODULE_2__["IonicNativePlugin"]); //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9AaW9uaWMtbmF0aXZlL3BsdWdpbnMvZmlsZS1vcGVuZXIvbmd4L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sOEJBQXNDLE1BQU0sb0JBQW9CLENBQUM7O0FBQ3hFO0FBSVUsSUE0QnNCLDhCQUFpQjtBQUFDO0FBR2hEO0FBQ2lDO0FBQU0sSUFRdkMseUJBQUksYUFBQyxRQUFnQixFQUFFLFlBQW9CO0FBTzNCLElBT2hCLDhCQUFTLGFBQUMsU0FBaUI7QUFPdEIsSUFPTCxtQ0FBYyxhQUFDLFNBQWlCO0FBTVgsSUFTckIsdUNBQWtCLGFBQUMsUUFBZ0IsRUFBRSxZQUFvQjtBQUk4QztBQUEwQztBQUF1RDtBQUEwRDtBQUE4RTs4Q0E1RGpWLFVBQVU7Ozs7OzBCQUNMO0FBQUMscUJBbENQO0FBQUUsRUFrQzhCLGlCQUFpQjtBQUNoRCxTQURZLFVBQVU7QUFBSSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IENvcmRvdmEsIElvbmljTmF0aXZlUGx1Z2luLCBQbHVnaW4gfSBmcm9tICdAaW9uaWMtbmF0aXZlL2NvcmUnO1xuXG4vKipcbiAqIEBuYW1lIEZpbGUgT3BlbmVyXG4gKiBAZGVzY3JpcHRpb25cbiAqIFRoaXMgcGx1Z2luIHdpbGwgb3BlbiBhIGZpbGUgb24geW91ciBkZXZpY2UgZmlsZSBzeXN0ZW0gd2l0aCBpdHMgZGVmYXVsdCBhcHBsaWNhdGlvbi5cbiAqXG4gKiBAdXNhZ2VcbiAqIGBgYHR5cGVzY3JpcHRcbiAqIGltcG9ydCB7IEZpbGVPcGVuZXIgfSBmcm9tICdAaW9uaWMtbmF0aXZlL2ZpbGUtb3BlbmVyL25neCc7XG4gKlxuICogY29uc3RydWN0b3IocHJpdmF0ZSBmaWxlT3BlbmVyOiBGaWxlT3BlbmVyKSB7IH1cbiAqXG4gKiAuLi5cbiAqXG4gKiB0aGlzLmZpbGVPcGVuZXIub3BlbigncGF0aC90by9maWxlLnBkZicsICdhcHBsaWNhdGlvbi9wZGYnKVxuICogICAudGhlbigoKSA9PiBjb25zb2xlLmxvZygnRmlsZSBpcyBvcGVuZWQnKSlcbiAqICAgLmNhdGNoKGUgPT4gY29uc29sZS5sb2coJ0Vycm9yIG9wZW5pbmcgZmlsZScsIGUpKTtcbiAqXG4gKiB0aGlzLmZpbGVPcGVuZXIuc2hvd09wZW5XaXRoRGlhbG9nKCdwYXRoL3RvL2ZpbGUucGRmJywgJ2FwcGxpY2F0aW9uL3BkZicpXG4gKiAgIC50aGVuKCgpID0+IGNvbnNvbGUubG9nKCdGaWxlIGlzIG9wZW5lZCcpKVxuICogICAuY2F0Y2goZSA9PiBjb25zb2xlLmxvZygnRXJyb3Igb3BlbmluZyBmaWxlJywgZSkpO1xuICpcbiAqIGBgYFxuICovXG5AUGx1Z2luKHtcbiAgcGx1Z2luTmFtZTogJ0ZpbGVPcGVuZXInLFxuICBwbHVnaW46ICdjb3Jkb3ZhLXBsdWdpbi1maWxlLW9wZW5lcjInLFxuICBwbHVnaW5SZWY6ICdjb3Jkb3ZhLnBsdWdpbnMuZmlsZU9wZW5lcjInLFxuICByZXBvOiAnaHR0cHM6Ly9naXRodWIuY29tL3B3bGluL2NvcmRvdmEtcGx1Z2luLWZpbGUtb3BlbmVyMicsXG4gIHBsYXRmb3JtczogWydBbmRyb2lkJywgJ2lPUycsICdXaW5kb3dzJywgJ1dpbmRvd3MgUGhvbmUgOCddLFxufSlcbkBJbmplY3RhYmxlKClcbmV4cG9ydCBjbGFzcyBGaWxlT3BlbmVyIGV4dGVuZHMgSW9uaWNOYXRpdmVQbHVnaW4ge1xuICAvKipcbiAgICogT3BlbiBhbiBmaWxlXG4gICAqIEBwYXJhbSB7c3RyaW5nfSBmaWxlUGF0aCBGaWxlIFBhdGhcbiAgICogQHBhcmFtIHtzdHJpbmd9IGZpbGVNSU1FVHlwZSBGaWxlIE1JTUUgVHlwZVxuICAgKiBAcmV0dXJucyB7UHJvbWlzZTxhbnk+fVxuICAgKi9cbiAgQENvcmRvdmEoe1xuICAgIGNhbGxiYWNrU3R5bGU6ICdvYmplY3QnLFxuICAgIHN1Y2Nlc3NOYW1lOiAnc3VjY2VzcycsXG4gICAgZXJyb3JOYW1lOiAnZXJyb3InLFxuICB9KVxuICBvcGVuKGZpbGVQYXRoOiBzdHJpbmcsIGZpbGVNSU1FVHlwZTogc3RyaW5nKTogUHJvbWlzZTxhbnk+IHtcbiAgICByZXR1cm47XG4gIH1cblxuICAvKipcbiAgICogVW5pbnN0YWxscyBhIHBhY2thZ2VcbiAgICogQHBhcmFtIHtzdHJpbmd9IHBhY2thZ2VJZCBQYWNrYWdlIElEXG4gICAqIEByZXR1cm5zIHtQcm9taXNlPGFueT59XG4gICAqL1xuICBAQ29yZG92YSh7XG4gICAgY2FsbGJhY2tTdHlsZTogJ29iamVjdCcsXG4gICAgc3VjY2Vzc05hbWU6ICdzdWNjZXNzJyxcbiAgICBlcnJvck5hbWU6ICdlcnJvcicsXG4gIH0pXG4gIHVuaW5zdGFsbChwYWNrYWdlSWQ6IHN0cmluZyk6IFByb21pc2U8YW55PiB7XG4gICAgcmV0dXJuO1xuICB9XG5cbiAgLyoqXG4gICAqIENoZWNrIGlmIGFuIGFwcCBpcyBhbHJlYWR5IGluc3RhbGxlZFxuICAgKiBAcGFyYW0ge3N0cmluZ30gcGFja2FnZUlkIFBhY2thZ2UgSURcbiAgICogQHJldHVybnMge1Byb21pc2U8YW55Pn1cbiAgICovXG4gIEBDb3Jkb3ZhKHtcbiAgICBjYWxsYmFja1N0eWxlOiAnb2JqZWN0JyxcbiAgICBzdWNjZXNzTmFtZTogJ3N1Y2Nlc3MnLFxuICAgIGVycm9yTmFtZTogJ2Vycm9yJyxcbiAgfSlcbiAgYXBwSXNJbnN0YWxsZWQocGFja2FnZUlkOiBzdHJpbmcpOiBQcm9taXNlPGFueT4ge1xuICAgIHJldHVybjtcbiAgfVxuXG4gIC8qKlxuICAgKiBPcGVucyB3aXRoIHN5c3RlbSBtb2RhbCB0byBvcGVuIGZpbGUgd2l0aCBhbiBhbHJlYWR5IGluc3RhbGxlZCBhcHAuXG4gICAqIEBwYXJhbSB7c3RyaW5nfSBmaWxlUGF0aCBGaWxlIFBhdGhcbiAgICogQHBhcmFtIHtzdHJpbmd9IGZpbGVNSU1FVHlwZSBGaWxlIE1JTUUgVHlwZVxuICAgKiBAcmV0dXJucyB7UHJvbWlzZTxhbnk+fVxuICAgKi9cbiAgQENvcmRvdmEoe1xuICAgIGNhbGxiYWNrU3R5bGU6ICdvYmplY3QnLFxuICAgIHN1Y2Nlc3NOYW1lOiAnc3VjY2VzcycsXG4gICAgZXJyb3JOYW1lOiAnZXJyb3InLFxuICB9KVxuICBzaG93T3BlbldpdGhEaWFsb2coZmlsZVBhdGg6IHN0cmluZywgZmlsZU1JTUVUeXBlOiBzdHJpbmcpOiBQcm9taXNlPGFueT4ge1xuICAgIHJldHVybjtcbiAgfVxufVxuIl19

      /***/

    },

    /***/
    "tf+s":
    /*!**********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/subscribeOn.js ***!
      \**********************************************************************/

    /*! exports provided: subscribeOn */

    /***/
    function tfS(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "subscribeOn", function () {
        return subscribeOn;
      });
      /* harmony import */


      var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../observable/SubscribeOnObservable */
      "O4y0");

      function subscribeOn(scheduler) {
        var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
        return function subscribeOnOperatorFunction(source) {
          return source.lift(new SubscribeOnOperator(scheduler, delay));
        };
      }

      var SubscribeOnOperator = /*#__PURE__*/function () {
        function SubscribeOnOperator(scheduler, delay) {
          _classCallCheck(this, SubscribeOnOperator);

          this.scheduler = scheduler;
          this.delay = delay;
        }

        _createClass2(SubscribeOnOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return new _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__["SubscribeOnObservable"](source, this.delay, this.scheduler).subscribe(subscriber);
          }
        }]);

        return SubscribeOnOperator;
      }(); //# sourceMappingURL=subscribeOn.js.map

      /***/

    },

    /***/
    "tk/3":
    /*!********************************************************************!*\
      !*** ./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js ***!
      \********************************************************************/

    /*! exports provided: HTTP_INTERCEPTORS, HttpBackend, HttpClient, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpErrorResponse, HttpEventType, HttpHandler, HttpHeaderResponse, HttpHeaders, HttpParams, HttpRequest, HttpResponse, HttpResponseBase, HttpUrlEncodingCodec, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, XhrFactory, ɵHttpInterceptingHandler, ɵangular_packages_common_http_http_a, ɵangular_packages_common_http_http_b, ɵangular_packages_common_http_http_c, ɵangular_packages_common_http_http_d, ɵangular_packages_common_http_http_e, ɵangular_packages_common_http_http_f, ɵangular_packages_common_http_http_g, ɵangular_packages_common_http_http_h */

    /***/
    function tk3(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HTTP_INTERCEPTORS", function () {
        return HTTP_INTERCEPTORS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpBackend", function () {
        return HttpBackend;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpClient", function () {
        return HttpClient;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpClientJsonpModule", function () {
        return HttpClientJsonpModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpClientModule", function () {
        return HttpClientModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpClientXsrfModule", function () {
        return HttpClientXsrfModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpErrorResponse", function () {
        return HttpErrorResponse;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpEventType", function () {
        return HttpEventType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpHandler", function () {
        return HttpHandler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpHeaderResponse", function () {
        return HttpHeaderResponse;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpHeaders", function () {
        return HttpHeaders;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpParams", function () {
        return HttpParams;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpRequest", function () {
        return HttpRequest;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpResponse", function () {
        return HttpResponse;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpResponseBase", function () {
        return HttpResponseBase;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpUrlEncodingCodec", function () {
        return HttpUrlEncodingCodec;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpXhrBackend", function () {
        return HttpXhrBackend;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "HttpXsrfTokenExtractor", function () {
        return HttpXsrfTokenExtractor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "JsonpClientBackend", function () {
        return JsonpClientBackend;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "JsonpInterceptor", function () {
        return JsonpInterceptor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "XhrFactory", function () {
        return XhrFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵHttpInterceptingHandler", function () {
        return HttpInterceptingHandler;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_a", function () {
        return NoopInterceptor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_b", function () {
        return JsonpCallbackContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_c", function () {
        return jsonpCallbackContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_d", function () {
        return BrowserXhr;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_e", function () {
        return XSRF_COOKIE_NAME;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_f", function () {
        return XSRF_HEADER_NAME;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_g", function () {
        return HttpXsrfCookieExtractor;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_h", function () {
        return HttpXsrfInterceptor;
      });
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! rxjs */
      "qCKp");
      /* harmony import */


      var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! rxjs/operators */
      "kU1M");
      /* harmony import */


      var _angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @angular/common */
      "ofXK");
      /**
       * @license Angular v11.0.9
       * (c) 2010-2020 Google LLC. https://angular.io/
       * License: MIT
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a
       * `HttpResponse`.
       *
       * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the
       * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the
       * `HttpBackend`.
       *
       * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.
       *
       * @publicApi
       */


      var HttpHandler = function HttpHandler() {
        _classCallCheck(this, HttpHandler);
      };
      /**
       * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.
       *
       * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.
       *
       * When injected, `HttpBackend` dispatches requests directly to the backend, without going
       * through the interceptor chain.
       *
       * @publicApi
       */


      var HttpBackend = function HttpBackend() {
        _classCallCheck(this, HttpBackend);
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Represents the header configuration options for an HTTP request.
       * Instances are immutable. Modifying methods return a cloned
       * instance with the change. The original object is never changed.
       *
       * @publicApi
       */


      var HttpHeaders = /*#__PURE__*/function () {
        /**  Constructs a new HTTP header object with the given values.*/
        function HttpHeaders(headers) {
          var _this561 = this;

          _classCallCheck(this, HttpHeaders);

          /**
           * Internal map of lowercased header names to the normalized
           * form of the name (the form seen first).
           */
          this.normalizedNames = new Map();
          /**
           * Queued updates to be materialized the next initialization.
           */

          this.lazyUpdate = null;

          if (!headers) {
            this.headers = new Map();
          } else if (typeof headers === 'string') {
            this.lazyInit = function () {
              _this561.headers = new Map();
              headers.split('\n').forEach(function (line) {
                var index = line.indexOf(':');

                if (index > 0) {
                  var name = line.slice(0, index);
                  var key = name.toLowerCase();
                  var value = line.slice(index + 1).trim();

                  _this561.maybeSetNormalizedName(name, key);

                  if (_this561.headers.has(key)) {
                    _this561.headers.get(key).push(value);
                  } else {
                    _this561.headers.set(key, [value]);
                  }
                }
              });
            };
          } else {
            this.lazyInit = function () {
              _this561.headers = new Map();
              Object.keys(headers).forEach(function (name) {
                var values = headers[name];
                var key = name.toLowerCase();

                if (typeof values === 'string') {
                  values = [values];
                }

                if (values.length > 0) {
                  _this561.headers.set(key, values);

                  _this561.maybeSetNormalizedName(name, key);
                }
              });
            };
          }
        }
        /**
         * Checks for existence of a given header.
         *
         * @param name The header name to check for existence.
         *
         * @returns True if the header exists, false otherwise.
         */


        _createClass2(HttpHeaders, [{
          key: "has",
          value: function has(name) {
            this.init();
            return this.headers.has(name.toLowerCase());
          }
          /**
           * Retrieves the first value of a given header.
           *
           * @param name The header name.
           *
           * @returns The value string if the header exists, null otherwise
           */

        }, {
          key: "get",
          value: function get(name) {
            this.init();
            var values = this.headers.get(name.toLowerCase());
            return values && values.length > 0 ? values[0] : null;
          }
          /**
           * Retrieves the names of the headers.
           *
           * @returns A list of header names.
           */

        }, {
          key: "keys",
          value: function keys() {
            this.init();
            return Array.from(this.normalizedNames.values());
          }
          /**
           * Retrieves a list of values for a given header.
           *
           * @param name The header name from which to retrieve values.
           *
           * @returns A string of values if the header exists, null otherwise.
           */

        }, {
          key: "getAll",
          value: function getAll(name) {
            this.init();
            return this.headers.get(name.toLowerCase()) || null;
          }
          /**
           * Appends a new value to the existing set of values for a header
           * and returns them in a clone of the original instance.
           *
           * @param name The header name for which to append the values.
           * @param value The value to append.
           *
           * @returns A clone of the HTTP headers object with the value appended to the given header.
           */

        }, {
          key: "append",
          value: function append(name, value) {
            return this.clone({
              name: name,
              value: value,
              op: 'a'
            });
          }
          /**
           * Sets or modifies a value for a given header in a clone of the original instance.
           * If the header already exists, its value is replaced with the given value
           * in the returned object.
           *
           * @param name The header name.
           * @param value The value or values to set or overide for the given header.
           *
           * @returns A clone of the HTTP headers object with the newly set header value.
           */

        }, {
          key: "set",
          value: function set(name, value) {
            return this.clone({
              name: name,
              value: value,
              op: 's'
            });
          }
          /**
           * Deletes values for a given header in a clone of the original instance.
           *
           * @param name The header name.
           * @param value The value or values to delete for the given header.
           *
           * @returns A clone of the HTTP headers object with the given value deleted.
           */

        }, {
          key: "delete",
          value: function _delete(name, value) {
            return this.clone({
              name: name,
              value: value,
              op: 'd'
            });
          }
        }, {
          key: "maybeSetNormalizedName",
          value: function maybeSetNormalizedName(name, lcName) {
            if (!this.normalizedNames.has(lcName)) {
              this.normalizedNames.set(lcName, name);
            }
          }
        }, {
          key: "init",
          value: function init() {
            var _this562 = this;

            if (!!this.lazyInit) {
              if (this.lazyInit instanceof HttpHeaders) {
                this.copyFrom(this.lazyInit);
              } else {
                this.lazyInit();
              }

              this.lazyInit = null;

              if (!!this.lazyUpdate) {
                this.lazyUpdate.forEach(function (update) {
                  return _this562.applyUpdate(update);
                });
                this.lazyUpdate = null;
              }
            }
          }
        }, {
          key: "copyFrom",
          value: function copyFrom(other) {
            var _this563 = this;

            other.init();
            Array.from(other.headers.keys()).forEach(function (key) {
              _this563.headers.set(key, other.headers.get(key));

              _this563.normalizedNames.set(key, other.normalizedNames.get(key));
            });
          }
        }, {
          key: "clone",
          value: function clone(update) {
            var clone = new HttpHeaders();
            clone.lazyInit = !!this.lazyInit && this.lazyInit instanceof HttpHeaders ? this.lazyInit : this;
            clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);
            return clone;
          }
        }, {
          key: "applyUpdate",
          value: function applyUpdate(update) {
            var key = update.name.toLowerCase();

            switch (update.op) {
              case 'a':
              case 's':
                var value = update.value;

                if (typeof value === 'string') {
                  value = [value];
                }

                if (value.length === 0) {
                  return;
                }

                this.maybeSetNormalizedName(update.name, key);
                var base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];
                base.push.apply(base, _toConsumableArray(value));
                this.headers.set(key, base);
                break;

              case 'd':
                var toDelete = update.value;

                if (!toDelete) {
                  this.headers["delete"](key);
                  this.normalizedNames["delete"](key);
                } else {
                  var existing = this.headers.get(key);

                  if (!existing) {
                    return;
                  }

                  existing = existing.filter(function (value) {
                    return toDelete.indexOf(value) === -1;
                  });

                  if (existing.length === 0) {
                    this.headers["delete"](key);
                    this.normalizedNames["delete"](key);
                  } else {
                    this.headers.set(key, existing);
                  }
                }

                break;
            }
          }
          /**
           * @internal
           */

        }, {
          key: "forEach",
          value: function forEach(fn) {
            var _this564 = this;

            this.init();
            Array.from(this.normalizedNames.keys()).forEach(function (key) {
              return fn(_this564.normalizedNames.get(key), _this564.headers.get(key));
            });
          }
        }]);

        return HttpHeaders;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Provides encoding and decoding of URL parameter and query-string values.
       *
       * Serializes and parses URL parameter keys and values to encode and decode them.
       * If you pass URL query parameters without encoding,
       * the query parameters can be misinterpreted at the receiving end.
       *
       *
       * @publicApi
       */


      var HttpUrlEncodingCodec = /*#__PURE__*/function () {
        function HttpUrlEncodingCodec() {
          _classCallCheck(this, HttpUrlEncodingCodec);
        }

        _createClass2(HttpUrlEncodingCodec, [{
          key: "encodeKey",
          value:
          /**
           * Encodes a key name for a URL parameter or query-string.
           * @param key The key name.
           * @returns The encoded key name.
           */
          function encodeKey(key) {
            return standardEncoding(key);
          }
          /**
           * Encodes the value of a URL parameter or query-string.
           * @param value The value.
           * @returns The encoded value.
           */

        }, {
          key: "encodeValue",
          value: function encodeValue(value) {
            return standardEncoding(value);
          }
          /**
           * Decodes an encoded URL parameter or query-string key.
           * @param key The encoded key name.
           * @returns The decoded key name.
           */

        }, {
          key: "decodeKey",
          value: function decodeKey(key) {
            return decodeURIComponent(key);
          }
          /**
           * Decodes an encoded URL parameter or query-string value.
           * @param value The encoded value.
           * @returns The decoded value.
           */

        }, {
          key: "decodeValue",
          value: function decodeValue(value) {
            return decodeURIComponent(value);
          }
        }]);

        return HttpUrlEncodingCodec;
      }();

      function paramParser(rawParams, codec) {
        var map = new Map();

        if (rawParams.length > 0) {
          var params = rawParams.split('&');
          params.forEach(function (param) {
            var eqIdx = param.indexOf('=');

            var _ref109 = eqIdx == -1 ? [codec.decodeKey(param), ''] : [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))],
                _ref110 = _slicedToArray(_ref109, 2),
                key = _ref110[0],
                val = _ref110[1];

            var list = map.get(key) || [];
            list.push(val);
            map.set(key, list);
          });
        }

        return map;
      }

      function standardEncoding(v) {
        return encodeURIComponent(v).replace(/%40/gi, '@').replace(/%3A/gi, ':').replace(/%24/gi, '$').replace(/%2C/gi, ',').replace(/%3B/gi, ';').replace(/%2B/gi, '+').replace(/%3D/gi, '=').replace(/%3F/gi, '?').replace(/%2F/gi, '/');
      }
      /**
       * An HTTP request/response body that represents serialized parameters,
       * per the MIME type `application/x-www-form-urlencoded`.
       *
       * This class is immutable; all mutation operations return a new instance.
       *
       * @publicApi
       */


      var HttpParams = /*#__PURE__*/function () {
        function HttpParams() {
          var _this565 = this;

          var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

          _classCallCheck(this, HttpParams);

          this.updates = null;
          this.cloneFrom = null;
          this.encoder = options.encoder || new HttpUrlEncodingCodec();

          if (!!options.fromString) {
            if (!!options.fromObject) {
              throw new Error("Cannot specify both fromString and fromObject.");
            }

            this.map = paramParser(options.fromString, this.encoder);
          } else if (!!options.fromObject) {
            this.map = new Map();
            Object.keys(options.fromObject).forEach(function (key) {
              var value = options.fromObject[key];

              _this565.map.set(key, Array.isArray(value) ? value : [value]);
            });
          } else {
            this.map = null;
          }
        }
        /**
         * Reports whether the body includes one or more values for a given parameter.
         * @param param The parameter name.
         * @returns True if the parameter has one or more values,
         * false if it has no value or is not present.
         */


        _createClass2(HttpParams, [{
          key: "has",
          value: function has(param) {
            this.init();
            return this.map.has(param);
          }
          /**
           * Retrieves the first value for a parameter.
           * @param param The parameter name.
           * @returns The first value of the given parameter,
           * or `null` if the parameter is not present.
           */

        }, {
          key: "get",
          value: function get(param) {
            this.init();
            var res = this.map.get(param);
            return !!res ? res[0] : null;
          }
          /**
           * Retrieves all values for a  parameter.
           * @param param The parameter name.
           * @returns All values in a string array,
           * or `null` if the parameter not present.
           */

        }, {
          key: "getAll",
          value: function getAll(param) {
            this.init();
            return this.map.get(param) || null;
          }
          /**
           * Retrieves all the parameters for this body.
           * @returns The parameter names in a string array.
           */

        }, {
          key: "keys",
          value: function keys() {
            this.init();
            return Array.from(this.map.keys());
          }
          /**
           * Appends a new value to existing values for a parameter.
           * @param param The parameter name.
           * @param value The new value to add.
           * @return A new body with the appended value.
           */

        }, {
          key: "append",
          value: function append(param, value) {
            return this.clone({
              param: param,
              value: value,
              op: 'a'
            });
          }
          /**
           * Replaces the value for a parameter.
           * @param param The parameter name.
           * @param value The new value.
           * @return A new body with the new value.
           */

        }, {
          key: "set",
          value: function set(param, value) {
            return this.clone({
              param: param,
              value: value,
              op: 's'
            });
          }
          /**
           * Removes a given value or all values from a parameter.
           * @param param The parameter name.
           * @param value The value to remove, if provided.
           * @return A new body with the given value removed, or with all values
           * removed if no value is specified.
           */

        }, {
          key: "delete",
          value: function _delete(param, value) {
            return this.clone({
              param: param,
              value: value,
              op: 'd'
            });
          }
          /**
           * Serializes the body to an encoded string, where key-value pairs (separated by `=`) are
           * separated by `&`s.
           */

        }, {
          key: "toString",
          value: function toString() {
            var _this566 = this;

            this.init();
            return this.keys().map(function (key) {
              var eKey = _this566.encoder.encodeKey(key); // `a: ['1']` produces `'a=1'`
              // `b: []` produces `''`
              // `c: ['1', '2']` produces `'c=1&c=2'`


              return _this566.map.get(key).map(function (value) {
                return eKey + '=' + _this566.encoder.encodeValue(value);
              }).join('&');
            }) // filter out empty values because `b: []` produces `''`
            // which results in `a=1&&c=1&c=2` instead of `a=1&c=1&c=2` if we don't
            .filter(function (param) {
              return param !== '';
            }).join('&');
          }
        }, {
          key: "clone",
          value: function clone(update) {
            var clone = new HttpParams({
              encoder: this.encoder
            });
            clone.cloneFrom = this.cloneFrom || this;
            clone.updates = (this.updates || []).concat([update]);
            return clone;
          }
        }, {
          key: "init",
          value: function init() {
            var _this567 = this;

            if (this.map === null) {
              this.map = new Map();
            }

            if (this.cloneFrom !== null) {
              this.cloneFrom.init();
              this.cloneFrom.keys().forEach(function (key) {
                return _this567.map.set(key, _this567.cloneFrom.map.get(key));
              });
              this.updates.forEach(function (update) {
                switch (update.op) {
                  case 'a':
                  case 's':
                    var base = (update.op === 'a' ? _this567.map.get(update.param) : undefined) || [];
                    base.push(update.value);

                    _this567.map.set(update.param, base);

                    break;

                  case 'd':
                    if (update.value !== undefined) {
                      var _base = _this567.map.get(update.param) || [];

                      var idx = _base.indexOf(update.value);

                      if (idx !== -1) {
                        _base.splice(idx, 1);
                      }

                      if (_base.length > 0) {
                        _this567.map.set(update.param, _base);
                      } else {
                        _this567.map["delete"](update.param);
                      }
                    } else {
                      _this567.map["delete"](update.param);

                      break;
                    }

                }
              });
              this.cloneFrom = this.updates = null;
            }
          }
        }]);

        return HttpParams;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Determine whether the given HTTP method may include a body.
       */


      function mightHaveBody(method) {
        switch (method) {
          case 'DELETE':
          case 'GET':
          case 'HEAD':
          case 'OPTIONS':
          case 'JSONP':
            return false;

          default:
            return true;
        }
      }
      /**
       * Safely assert whether the given value is an ArrayBuffer.
       *
       * In some execution environments ArrayBuffer is not defined.
       */


      function isArrayBuffer(value) {
        return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;
      }
      /**
       * Safely assert whether the given value is a Blob.
       *
       * In some execution environments Blob is not defined.
       */


      function isBlob(value) {
        return typeof Blob !== 'undefined' && value instanceof Blob;
      }
      /**
       * Safely assert whether the given value is a FormData instance.
       *
       * In some execution environments FormData is not defined.
       */


      function isFormData(value) {
        return typeof FormData !== 'undefined' && value instanceof FormData;
      }
      /**
       * An outgoing HTTP request with an optional typed body.
       *
       * `HttpRequest` represents an outgoing request, including URL, method,
       * headers, body, and other request configuration options. Instances should be
       * assumed to be immutable. To modify a `HttpRequest`, the `clone`
       * method should be used.
       *
       * @publicApi
       */


      var HttpRequest = /*#__PURE__*/function () {
        function HttpRequest(method, url, third, fourth) {
          _classCallCheck(this, HttpRequest);

          this.url = url;
          /**
           * The request body, or `null` if one isn't set.
           *
           * Bodies are not enforced to be immutable, as they can include a reference to any
           * user-defined data type. However, interceptors should take care to preserve
           * idempotence by treating them as such.
           */

          this.body = null;
          /**
           * Whether this request should be made in a way that exposes progress events.
           *
           * Progress events are expensive (change detection runs on each event) and so
           * they should only be requested if the consumer intends to monitor them.
           */

          this.reportProgress = false;
          /**
           * Whether this request should be sent with outgoing credentials (cookies).
           */

          this.withCredentials = false;
          /**
           * The expected response type of the server.
           *
           * This is used to parse the response appropriately before returning it to
           * the requestee.
           */

          this.responseType = 'json';
          this.method = method.toUpperCase(); // Next, need to figure out which argument holds the HttpRequestInit
          // options, if any.

          var options; // Check whether a body argument is expected. The only valid way to omit
          // the body argument is to use a known no-body method like GET.

          if (mightHaveBody(this.method) || !!fourth) {
            // Body is the third argument, options are the fourth.
            this.body = third !== undefined ? third : null;
            options = fourth;
          } else {
            // No body required, options are the third argument. The body stays null.
            options = third;
          } // If options have been passed, interpret them.


          if (options) {
            // Normalize reportProgress and withCredentials.
            this.reportProgress = !!options.reportProgress;
            this.withCredentials = !!options.withCredentials; // Override default response type of 'json' if one is provided.

            if (!!options.responseType) {
              this.responseType = options.responseType;
            } // Override headers if they're provided.


            if (!!options.headers) {
              this.headers = options.headers;
            }

            if (!!options.params) {
              this.params = options.params;
            }
          } // If no headers have been passed in, construct a new HttpHeaders instance.


          if (!this.headers) {
            this.headers = new HttpHeaders();
          } // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance.


          if (!this.params) {
            this.params = new HttpParams();
            this.urlWithParams = url;
          } else {
            // Encode the parameters to a string in preparation for inclusion in the URL.
            var params = this.params.toString();

            if (params.length === 0) {
              // No parameters, the visible URL is just the URL given at creation time.
              this.urlWithParams = url;
            } else {
              // Does the URL already have query parameters? Look for '?'.
              var qIdx = url.indexOf('?'); // There are 3 cases to handle:
              // 1) No existing parameters -> append '?' followed by params.
              // 2) '?' exists and is followed by existing query string ->
              //    append '&' followed by params.
              // 3) '?' exists at the end of the url -> append params directly.
              // This basically amounts to determining the character, if any, with
              // which to join the URL and parameters.

              var sep = qIdx === -1 ? '?' : qIdx < url.length - 1 ? '&' : '';
              this.urlWithParams = url + sep + params;
            }
          }
        }
        /**
         * Transform the free-form body into a serialized format suitable for
         * transmission to the server.
         */


        _createClass2(HttpRequest, [{
          key: "serializeBody",
          value: function serializeBody() {
            // If no body is present, no need to serialize it.
            if (this.body === null) {
              return null;
            } // Check whether the body is already in a serialized form. If so,
            // it can just be returned directly.


            if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) || typeof this.body === 'string') {
              return this.body;
            } // Check whether the body is an instance of HttpUrlEncodedParams.


            if (this.body instanceof HttpParams) {
              return this.body.toString();
            } // Check whether the body is an object or array, and serialize with JSON if so.


            if (typeof this.body === 'object' || typeof this.body === 'boolean' || Array.isArray(this.body)) {
              return JSON.stringify(this.body);
            } // Fall back on toString() for everything else.


            return this.body.toString();
          }
          /**
           * Examine the body and attempt to infer an appropriate MIME type
           * for it.
           *
           * If no such type can be inferred, this method will return `null`.
           */

        }, {
          key: "detectContentTypeHeader",
          value: function detectContentTypeHeader() {
            // An empty body has no content type.
            if (this.body === null) {
              return null;
            } // FormData bodies rely on the browser's content type assignment.


            if (isFormData(this.body)) {
              return null;
            } // Blobs usually have their own content type. If it doesn't, then
            // no type can be inferred.


            if (isBlob(this.body)) {
              return this.body.type || null;
            } // Array buffers have unknown contents and thus no type can be inferred.


            if (isArrayBuffer(this.body)) {
              return null;
            } // Technically, strings could be a form of JSON data, but it's safe enough
            // to assume they're plain strings.


            if (typeof this.body === 'string') {
              return 'text/plain';
            } // `HttpUrlEncodedParams` has its own content-type.


            if (this.body instanceof HttpParams) {
              return 'application/x-www-form-urlencoded;charset=UTF-8';
            } // Arrays, objects, and numbers will be encoded as JSON.


            if (typeof this.body === 'object' || typeof this.body === 'number' || Array.isArray(this.body)) {
              return 'application/json';
            } // No type could be inferred.


            return null;
          }
        }, {
          key: "clone",
          value: function clone() {
            var update = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            // For method, url, and responseType, take the current value unless
            // it is overridden in the update hash.
            var method = update.method || this.method;
            var url = update.url || this.url;
            var responseType = update.responseType || this.responseType; // The body is somewhat special - a `null` value in update.body means
            // whatever current body is present is being overridden with an empty
            // body, whereas an `undefined` value in update.body implies no
            // override.

            var body = update.body !== undefined ? update.body : this.body; // Carefully handle the boolean options to differentiate between
            // `false` and `undefined` in the update args.

            var withCredentials = update.withCredentials !== undefined ? update.withCredentials : this.withCredentials;
            var reportProgress = update.reportProgress !== undefined ? update.reportProgress : this.reportProgress; // Headers and params may be appended to if `setHeaders` or
            // `setParams` are used.

            var headers = update.headers || this.headers;
            var params = update.params || this.params; // Check whether the caller has asked to add headers.

            if (update.setHeaders !== undefined) {
              // Set every requested header.
              headers = Object.keys(update.setHeaders).reduce(function (headers, name) {
                return headers.set(name, update.setHeaders[name]);
              }, headers);
            } // Check whether the caller has asked to set params.


            if (update.setParams) {
              // Set every requested param.
              params = Object.keys(update.setParams).reduce(function (params, param) {
                return params.set(param, update.setParams[param]);
              }, params);
            } // Finally, construct the new HttpRequest using the pieces from above.


            return new HttpRequest(method, url, body, {
              params: params,
              headers: headers,
              reportProgress: reportProgress,
              responseType: responseType,
              withCredentials: withCredentials
            });
          }
        }]);

        return HttpRequest;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Type enumeration for the different kinds of `HttpEvent`.
       *
       * @publicApi
       */


      var HttpEventType;

      (function (HttpEventType) {
        /**
         * The request was sent out over the wire.
         */
        HttpEventType[HttpEventType["Sent"] = 0] = "Sent";
        /**
         * An upload progress event was received.
         */

        HttpEventType[HttpEventType["UploadProgress"] = 1] = "UploadProgress";
        /**
         * The response status code and headers were received.
         */

        HttpEventType[HttpEventType["ResponseHeader"] = 2] = "ResponseHeader";
        /**
         * A download progress event was received.
         */

        HttpEventType[HttpEventType["DownloadProgress"] = 3] = "DownloadProgress";
        /**
         * The full response including the body was received.
         */

        HttpEventType[HttpEventType["Response"] = 4] = "Response";
        /**
         * A custom event from an interceptor or a backend.
         */

        HttpEventType[HttpEventType["User"] = 5] = "User";
      })(HttpEventType || (HttpEventType = {}));
      /**
       * Base class for both `HttpResponse` and `HttpHeaderResponse`.
       *
       * @publicApi
       */


      var HttpResponseBase =
      /**
       * Super-constructor for all responses.
       *
       * The single parameter accepted is an initialization hash. Any properties
       * of the response passed there will override the default values.
       */
      function HttpResponseBase(init) {
        var defaultStatus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
        var defaultStatusText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'OK';

        _classCallCheck(this, HttpResponseBase);

        // If the hash has values passed, use them to initialize the response.
        // Otherwise use the default values.
        this.headers = init.headers || new HttpHeaders();
        this.status = init.status !== undefined ? init.status : defaultStatus;
        this.statusText = init.statusText || defaultStatusText;
        this.url = init.url || null; // Cache the ok value to avoid defining a getter.

        this.ok = this.status >= 200 && this.status < 300;
      };
      /**
       * A partial HTTP response which only includes the status and header data,
       * but no response body.
       *
       * `HttpHeaderResponse` is a `HttpEvent` available on the response
       * event stream, only when progress events are requested.
       *
       * @publicApi
       */


      var HttpHeaderResponse = /*#__PURE__*/function (_HttpResponseBase) {
        _inherits(HttpHeaderResponse, _HttpResponseBase);

        var _super275 = _createSuper(HttpHeaderResponse);

        /**
         * Create a new `HttpHeaderResponse` with the given parameters.
         */
        function HttpHeaderResponse() {
          var _this568;

          var init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

          _classCallCheck(this, HttpHeaderResponse);

          _this568 = _super275.call(this, init);
          _this568.type = HttpEventType.ResponseHeader;
          return _this568;
        }
        /**
         * Copy this `HttpHeaderResponse`, overriding its contents with the
         * given parameter hash.
         */


        _createClass2(HttpHeaderResponse, [{
          key: "clone",
          value: function clone() {
            var update = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            // Perform a straightforward initialization of the new HttpHeaderResponse,
            // overriding the current parameters with new ones if given.
            return new HttpHeaderResponse({
              headers: update.headers || this.headers,
              status: update.status !== undefined ? update.status : this.status,
              statusText: update.statusText || this.statusText,
              url: update.url || this.url || undefined
            });
          }
        }]);

        return HttpHeaderResponse;
      }(HttpResponseBase);
      /**
       * A full HTTP response, including a typed response body (which may be `null`
       * if one was not returned).
       *
       * `HttpResponse` is a `HttpEvent` available on the response event
       * stream.
       *
       * @publicApi
       */


      var HttpResponse = /*#__PURE__*/function (_HttpResponseBase2) {
        _inherits(HttpResponse, _HttpResponseBase2);

        var _super276 = _createSuper(HttpResponse);

        /**
         * Construct a new `HttpResponse`.
         */
        function HttpResponse() {
          var _this569;

          var init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

          _classCallCheck(this, HttpResponse);

          _this569 = _super276.call(this, init);
          _this569.type = HttpEventType.Response;
          _this569.body = init.body !== undefined ? init.body : null;
          return _this569;
        }

        _createClass2(HttpResponse, [{
          key: "clone",
          value: function clone() {
            var update = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            return new HttpResponse({
              body: update.body !== undefined ? update.body : this.body,
              headers: update.headers || this.headers,
              status: update.status !== undefined ? update.status : this.status,
              statusText: update.statusText || this.statusText,
              url: update.url || this.url || undefined
            });
          }
        }]);

        return HttpResponse;
      }(HttpResponseBase);
      /**
       * A response that represents an error or failure, either from a
       * non-successful HTTP status, an error while executing the request,
       * or some other failure which occurred during the parsing of the response.
       *
       * Any error returned on the `Observable` response stream will be
       * wrapped in an `HttpErrorResponse` to provide additional context about
       * the state of the HTTP layer when the error occurred. The error property
       * will contain either a wrapped Error object or the error response returned
       * from the server.
       *
       * @publicApi
       */


      var HttpErrorResponse = /*#__PURE__*/function (_HttpResponseBase3) {
        _inherits(HttpErrorResponse, _HttpResponseBase3);

        var _super277 = _createSuper(HttpErrorResponse);

        function HttpErrorResponse(init) {
          var _this570;

          _classCallCheck(this, HttpErrorResponse);

          // Initialize with a default status of 0 / Unknown Error.
          _this570 = _super277.call(this, init, 0, 'Unknown Error');
          _this570.name = 'HttpErrorResponse';
          /**
           * Errors are never okay, even when the status code is in the 2xx success range.
           */

          _this570.ok = false; // If the response was successful, then this was a parse error. Otherwise, it was
          // a protocol-level failure of some sort. Either the request failed in transit
          // or the server returned an unsuccessful status code.

          if (_this570.status >= 200 && _this570.status < 300) {
            _this570.message = "Http failure during parsing for ".concat(init.url || '(unknown url)');
          } else {
            _this570.message = "Http failure response for ".concat(init.url || '(unknown url)', ": ").concat(init.status, " ").concat(init.statusText);
          }

          _this570.error = init.error || null;
          return _this570;
        }

        return HttpErrorResponse;
      }(HttpResponseBase);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Constructs an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and
       * the given `body`. This function clones the object and adds the body.
       *
       * Note that the `responseType` *options* value is a String that identifies the
       * single data type of the response.
       * A single overload version of the method handles each response type.
       * The value of `responseType` cannot be a union, as the combined signature could imply.
       *
       */


      function addBody(options, body) {
        return {
          body: body,
          headers: options.headers,
          observe: options.observe,
          params: options.params,
          reportProgress: options.reportProgress,
          responseType: options.responseType,
          withCredentials: options.withCredentials
        };
      }
      /**
       * Performs HTTP requests.
       * This service is available as an injectable class, with methods to perform HTTP requests.
       * Each request method has multiple signatures, and the return type varies based on
       * the signature that is called (mainly the values of `observe` and `responseType`).
       *
       * Note that the `responseType` *options* value is a String that identifies the
       * single data type of the response.
       * A single overload version of the method handles each response type.
       * The value of `responseType` cannot be a union, as the combined signature could imply.
      
       *
       * @usageNotes
       * Sample HTTP requests for the [Tour of Heroes](/tutorial/toh-pt0) application.
       *
       * ### HTTP Request Example
       *
       * ```
       *  // GET heroes whose name contains search term
       * searchHeroes(term: string): observable<Hero[]>{
       *
       *  const params = new HttpParams({fromString: 'name=term'});
       *    return this.httpClient.request('GET', this.heroesUrl, {responseType:'json', params});
       * }
       * ```
       * ### JSONP Example
       * ```
       * requestJsonp(url, callback = 'callback') {
       *  return this.httpClient.jsonp(this.heroesURL, callback);
       * }
       * ```
       *
       * ### PATCH Example
       * ```
       * // PATCH one of the heroes' name
       * patchHero (id: number, heroName: string): Observable<{}> {
       * const url = `${this.heroesUrl}/${id}`;   // PATCH api/heroes/42
       *  return this.httpClient.patch(url, {name: heroName}, httpOptions)
       *    .pipe(catchError(this.handleError('patchHero')));
       * }
       * ```
       *
       * @see [HTTP Guide](guide/http)
       *
       * @publicApi
       */


      var HttpClient = /*#__PURE__*/function () {
        function HttpClient(handler) {
          _classCallCheck(this, HttpClient);

          this.handler = handler;
        }
        /**
         * Constructs an observable for a generic HTTP request that, when subscribed,
         * fires the request through the chain of registered interceptors and on to the
         * server.
         *
         * You can pass an `HttpRequest` directly as the only parameter. In this case,
         * the call returns an observable of the raw `HttpEvent` stream.
         *
         * Alternatively you can pass an HTTP method as the first parameter,
         * a URL string as the second, and an options hash containing the request body as the third.
         * See `addBody()`. In this case, the specified `responseType` and `observe` options determine the
         * type of returned observable.
         *   * The `responseType` value determines how a successful response body is parsed.
         *   * If `responseType` is the default `json`, you can pass a type interface for the resulting
         * object as a type parameter to the call.
         *
         * The `observe` value determines the return type, according to what you are interested in
         * observing.
         *   * An `observe` value of events returns an observable of the raw `HttpEvent` stream, including
         * progress events by default.
         *   * An `observe` value of response returns an observable of `HttpResponse<T>`,
         * where the `T` parameter depends on the `responseType` and any optionally provided type
         * parameter.
         *   * An `observe` value of body returns an observable of `<T>` with the same `T` body type.
         *
         */


        _createClass2(HttpClient, [{
          key: "request",
          value: function request(first, url) {
            var _this571 = this;

            var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
            var req; // First, check whether the primary argument is an instance of `HttpRequest`.

            if (first instanceof HttpRequest) {
              // It is. The other arguments must be undefined (per the signatures) and can be
              // ignored.
              req = first;
            } else {
              // It's a string, so it represents a URL. Construct a request based on it,
              // and incorporate the remaining arguments (assuming `GET` unless a method is
              // provided.
              // Figure out the headers.
              var headers = undefined;

              if (options.headers instanceof HttpHeaders) {
                headers = options.headers;
              } else {
                headers = new HttpHeaders(options.headers);
              } // Sort out parameters.


              var params = undefined;

              if (!!options.params) {
                if (options.params instanceof HttpParams) {
                  params = options.params;
                } else {
                  params = new HttpParams({
                    fromObject: options.params
                  });
                }
              } // Construct the request.


              req = new HttpRequest(first, url, options.body !== undefined ? options.body : null, {
                headers: headers,
                params: params,
                reportProgress: options.reportProgress,
                // By default, JSON is assumed to be returned for all calls.
                responseType: options.responseType || 'json',
                withCredentials: options.withCredentials
              });
            } // Start with an Observable.of() the initial request, and run the handler (which
            // includes all interceptors) inside a concatMap(). This way, the handler runs
            // inside an Observable chain, which causes interceptors to be re-run on every
            // subscription (this also makes retries re-run the handler, including interceptors).


            var events$ = Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(req).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["concatMap"])(function (req) {
              return _this571.handler.handle(req);
            })); // If coming via the API signature which accepts a previously constructed HttpRequest,
            // the only option is to get the event stream. Otherwise, return the event stream if
            // that is what was requested.

            if (first instanceof HttpRequest || options.observe === 'events') {
              return events$;
            } // The requested stream contains either the full response or the body. In either
            // case, the first step is to filter the event stream to extract a stream of
            // responses(s).


            var res$ = events$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["filter"])(function (event) {
              return event instanceof HttpResponse;
            })); // Decide which stream to return.

            switch (options.observe || 'body') {
              case 'body':
                // The requested stream is the body. Map the response stream to the response
                // body. This could be done more simply, but a misbehaving interceptor might
                // transform the response body into a different format and ignore the requested
                // responseType. Guard against this by validating that the response is of the
                // requested type.
                switch (req.responseType) {
                  case 'arraybuffer':
                    return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (res) {
                      // Validate that the body is an ArrayBuffer.
                      if (res.body !== null && !(res.body instanceof ArrayBuffer)) {
                        throw new Error('Response is not an ArrayBuffer.');
                      }

                      return res.body;
                    }));

                  case 'blob':
                    return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (res) {
                      // Validate that the body is a Blob.
                      if (res.body !== null && !(res.body instanceof Blob)) {
                        throw new Error('Response is not a Blob.');
                      }

                      return res.body;
                    }));

                  case 'text':
                    return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (res) {
                      // Validate that the body is a string.
                      if (res.body !== null && typeof res.body !== 'string') {
                        throw new Error('Response is not a string.');
                      }

                      return res.body;
                    }));

                  case 'json':
                  default:
                    // No validation needed for JSON responses, as they can be of any type.
                    return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (res) {
                      return res.body;
                    }));
                }

              case 'response':
                // The response stream was requested directly, so return it.
                return res$;

              default:
                // Guard against new future observe types being added.
                throw new Error("Unreachable: unhandled observe type ".concat(options.observe, "}"));
            }
          }
          /**
           * Constructs an observable that, when subscribed, causes the configured
           * `DELETE` request to execute on the server. See the individual overloads for
           * details on the return type.
           *
           * @param url     The endpoint URL.
           * @param options The HTTP options to send with the request.
           *
           */

        }, {
          key: "delete",
          value: function _delete(url) {
            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
            return this.request('DELETE', url, options);
          }
          /**
           * Constructs an observable that, when subscribed, causes the configured
           * `GET` request to execute on the server. See the individual overloads for
           * details on the return type.
           */

        }, {
          key: "get",
          value: function get(url) {
            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
            return this.request('GET', url, options);
          }
          /**
           * Constructs an observable that, when subscribed, causes the configured
           * `HEAD` request to execute on the server. The `HEAD` method returns
           * meta information about the resource without transferring the
           * resource itself. See the individual overloads for
           * details on the return type.
           */

        }, {
          key: "head",
          value: function head(url) {
            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
            return this.request('HEAD', url, options);
          }
          /**
           * Constructs an `Observable` that, when subscribed, causes a request with the special method
           * `JSONP` to be dispatched via the interceptor pipeline.
           * The [JSONP pattern](https://en.wikipedia.org/wiki/JSONP) works around limitations of certain
           * API endpoints that don't support newer,
           * and preferable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) protocol.
           * JSONP treats the endpoint API as a JavaScript file and tricks the browser to process the
           * requests even if the API endpoint is not located on the same domain (origin) as the client-side
           * application making the request.
           * The endpoint API must support JSONP callback for JSONP requests to work.
           * The resource API returns the JSON response wrapped in a callback function.
           * You can pass the callback function name as one of the query parameters.
           * Note that JSONP requests can only be used with `GET` requests.
           *
           * @param url The resource URL.
           * @param callbackParam The callback function name.
           *
           */

        }, {
          key: "jsonp",
          value: function jsonp(url, callbackParam) {
            return this.request('JSONP', url, {
              params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'),
              observe: 'body',
              responseType: 'json'
            });
          }
          /**
           * Constructs an `Observable` that, when subscribed, causes the configured
           * `OPTIONS` request to execute on the server. This method allows the client
           * to determine the supported HTTP methods and other capabilites of an endpoint,
           * without implying a resource action. See the individual overloads for
           * details on the return type.
           */

        }, {
          key: "options",
          value: function options(url) {
            var _options3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

            return this.request('OPTIONS', url, _options3);
          }
          /**
           * Constructs an observable that, when subscribed, causes the configured
           * `PATCH` request to execute on the server. See the individual overloads for
           * details on the return type.
           */

        }, {
          key: "patch",
          value: function patch(url, body) {
            var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
            return this.request('PATCH', url, addBody(options, body));
          }
          /**
           * Constructs an observable that, when subscribed, causes the configured
           * `POST` request to execute on the server. The server responds with the location of
           * the replaced resource. See the individual overloads for
           * details on the return type.
           */

        }, {
          key: "post",
          value: function post(url, body) {
            var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
            return this.request('POST', url, addBody(options, body));
          }
          /**
           * Constructs an observable that, when subscribed, causes the configured
           * `PUT` request to execute on the server. The `PUT` method replaces an existing resource
           * with a new set of values.
           * See the individual overloads for details on the return type.
           */

        }, {
          key: "put",
          value: function put(url, body) {
            var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
            return this.request('PUT', url, addBody(options, body));
          }
        }]);

        return HttpClient;
      }();

      HttpClient.ɵfac = function HttpClient_Factory(t) {
        return new (t || HttpClient)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](HttpHandler));
      };

      HttpClient.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: HttpClient,
        factory: HttpClient.ɵfac
      });

      HttpClient.ctorParameters = function () {
        return [{
          type: HttpHandler
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpClient, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], function () {
          return [{
            type: HttpHandler
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.
       *
       *
       */


      var HttpInterceptorHandler = /*#__PURE__*/function () {
        function HttpInterceptorHandler(next, interceptor) {
          _classCallCheck(this, HttpInterceptorHandler);

          this.next = next;
          this.interceptor = interceptor;
        }

        _createClass2(HttpInterceptorHandler, [{
          key: "handle",
          value: function handle(req) {
            return this.interceptor.intercept(req, this.next);
          }
        }]);

        return HttpInterceptorHandler;
      }();
      /**
       * A multi-provider token that represents the array of registered
       * `HttpInterceptor` objects.
       *
       * @publicApi
       */


      var HTTP_INTERCEPTORS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('HTTP_INTERCEPTORS');

      var NoopInterceptor = /*#__PURE__*/function () {
        function NoopInterceptor() {
          _classCallCheck(this, NoopInterceptor);
        }

        _createClass2(NoopInterceptor, [{
          key: "intercept",
          value: function intercept(req, next) {
            return next.handle(req);
          }
        }]);

        return NoopInterceptor;
      }();

      NoopInterceptor.ɵfac = function NoopInterceptor_Factory(t) {
        return new (t || NoopInterceptor)();
      };

      NoopInterceptor.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: NoopInterceptor,
        factory: NoopInterceptor.ɵfac
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NoopInterceptor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // Every request made through JSONP needs a callback name that's unique across the
      // whole page. Each request is assigned an id and the callback name is constructed
      // from that. The next id to be assigned is tracked in a global variable here that
      // is shared among all applications on the page.


      var nextRequestId = 0; // Error text given when a JSONP script is injected, but doesn't invoke the callback
      // passed in its URL.

      var JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.'; // Error text given when a request is passed to the JsonpClientBackend that doesn't
      // have a request method JSONP.

      var JSONP_ERR_WRONG_METHOD = 'JSONP requests must use JSONP request method.';
      var JSONP_ERR_WRONG_RESPONSE_TYPE = 'JSONP requests must use Json response type.';
      /**
       * DI token/abstract type representing a map of JSONP callbacks.
       *
       * In the browser, this should always be the `window` object.
       *
       *
       */

      var JsonpCallbackContext = function JsonpCallbackContext() {
        _classCallCheck(this, JsonpCallbackContext);
      };
      /**
       * Processes an `HttpRequest` with the JSONP method,
       * by performing JSONP style requests.
       * @see `HttpHandler`
       * @see `HttpXhrBackend`
       *
       * @publicApi
       */


      var JsonpClientBackend = /*#__PURE__*/function () {
        function JsonpClientBackend(callbackMap, document) {
          _classCallCheck(this, JsonpClientBackend);

          this.callbackMap = callbackMap;
          this.document = document;
          /**
           * A resolved promise that can be used to schedule microtasks in the event handlers.
           */

          this.resolvedPromise = Promise.resolve();
        }
        /**
         * Get the name of the next callback method, by incrementing the global `nextRequestId`.
         */


        _createClass2(JsonpClientBackend, [{
          key: "nextCallback",
          value: function nextCallback() {
            return "ng_jsonp_callback_".concat(nextRequestId++);
          }
          /**
           * Processes a JSONP request and returns an event stream of the results.
           * @param req The request object.
           * @returns An observable of the response events.
           *
           */

        }, {
          key: "handle",
          value: function handle(req) {
            var _this572 = this;

            // Firstly, check both the method and response type. If either doesn't match
            // then the request was improperly routed here and cannot be handled.
            if (req.method !== 'JSONP') {
              throw new Error(JSONP_ERR_WRONG_METHOD);
            } else if (req.responseType !== 'json') {
              throw new Error(JSONP_ERR_WRONG_RESPONSE_TYPE);
            } // Everything else happens inside the Observable boundary.


            return new rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"](function (observer) {
              // The first step to make a request is to generate the callback name, and replace the
              // callback placeholder in the URL with the name. Care has to be taken here to ensure
              // a trailing &, if matched, gets inserted back into the URL in the correct place.
              var callback = _this572.nextCallback();

              var url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, "=".concat(callback, "$1")); // Construct the <script> tag and point it at the URL.

              var node = _this572.document.createElement('script');

              node.src = url; // A JSONP request requires waiting for multiple callbacks. These variables
              // are closed over and track state across those callbacks.
              // The response object, if one has been received, or null otherwise.

              var body = null; // Whether the response callback has been called.

              var finished = false; // Whether the request has been cancelled (and thus any other callbacks)
              // should be ignored.

              var cancelled = false; // Set the response callback in this.callbackMap (which will be the window
              // object in the browser. The script being loaded via the <script> tag will
              // eventually call this callback.

              _this572.callbackMap[callback] = function (data) {
                // Data has been received from the JSONP script. Firstly, delete this callback.
                delete _this572.callbackMap[callback]; // Next, make sure the request wasn't cancelled in the meantime.

                if (cancelled) {
                  return;
                } // Set state to indicate data was received.


                body = data;
                finished = true;
              }; // cleanup() is a utility closure that removes the <script> from the page and
              // the response callback from the window. This logic is used in both the
              // success, error, and cancellation paths, so it's extracted out for convenience.


              var cleanup = function cleanup() {
                // Remove the <script> tag if it's still on the page.
                if (node.parentNode) {
                  node.parentNode.removeChild(node);
                } // Remove the response callback from the callbackMap (window object in the
                // browser).


                delete _this572.callbackMap[callback];
              }; // onLoad() is the success callback which runs after the response callback
              // if the JSONP script loads successfully. The event itself is unimportant.
              // If something went wrong, onLoad() may run without the response callback
              // having been invoked.


              var onLoad = function onLoad(event) {
                // Do nothing if the request has been cancelled.
                if (cancelled) {
                  return;
                } // We wrap it in an extra Promise, to ensure the microtask
                // is scheduled after the loaded endpoint has executed any potential microtask itself,
                // which is not guaranteed in Internet Explorer and EdgeHTML. See issue #39496


                _this572.resolvedPromise.then(function () {
                  // Cleanup the page.
                  cleanup(); // Check whether the response callback has run.

                  if (!finished) {
                    // It hasn't, something went wrong with the request. Return an error via
                    // the Observable error path. All JSONP errors have status 0.
                    observer.error(new HttpErrorResponse({
                      url: url,
                      status: 0,
                      statusText: 'JSONP Error',
                      error: new Error(JSONP_ERR_NO_CALLBACK)
                    }));
                    return;
                  } // Success. body either contains the response body or null if none was
                  // returned.


                  observer.next(new HttpResponse({
                    body: body,
                    status: 200,
                    statusText: 'OK',
                    url: url
                  })); // Complete the stream, the response is over.

                  observer.complete();
                });
              }; // onError() is the error callback, which runs if the script returned generates
              // a Javascript error. It emits the error via the Observable error channel as
              // a HttpErrorResponse.


              var onError = function onError(error) {
                // If the request was already cancelled, no need to emit anything.
                if (cancelled) {
                  return;
                }

                cleanup(); // Wrap the error in a HttpErrorResponse.

                observer.error(new HttpErrorResponse({
                  error: error,
                  status: 0,
                  statusText: 'JSONP Error',
                  url: url
                }));
              }; // Subscribe to both the success (load) and error events on the <script> tag,
              // and add it to the page.


              node.addEventListener('load', onLoad);
              node.addEventListener('error', onError);

              _this572.document.body.appendChild(node); // The request has now been successfully sent.


              observer.next({
                type: HttpEventType.Sent
              }); // Cancellation handler.

              return function () {
                // Track the cancellation so event listeners won't do anything even if already scheduled.
                cancelled = true; // Remove the event listeners so they won't run if the events later fire.

                node.removeEventListener('load', onLoad);
                node.removeEventListener('error', onError); // And finally, clean up the page.

                cleanup();
              };
            });
          }
        }]);

        return JsonpClientBackend;
      }();

      JsonpClientBackend.ɵfac = function JsonpClientBackend_Factory(t) {
        return new (t || JsonpClientBackend)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](JsonpCallbackContext), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]));
      };

      JsonpClientBackend.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: JsonpClientBackend,
        factory: JsonpClientBackend.ɵfac
      });

      JsonpClientBackend.ctorParameters = function () {
        return [{
          type: JsonpCallbackContext
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](JsonpClientBackend, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], function () {
          return [{
            type: JsonpCallbackContext
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]]
            }]
          }];
        }, null);
      })();
      /**
       * Identifies requests with the method JSONP and
       * shifts them to the `JsonpClientBackend`.
       *
       * @see `HttpInterceptor`
       *
       * @publicApi
       */


      var JsonpInterceptor = /*#__PURE__*/function () {
        function JsonpInterceptor(jsonp) {
          _classCallCheck(this, JsonpInterceptor);

          this.jsonp = jsonp;
        }
        /**
         * Identifies and handles a given JSONP request.
         * @param req The outgoing request object to handle.
         * @param next The next interceptor in the chain, or the backend
         * if no interceptors remain in the chain.
         * @returns An observable of the event stream.
         */


        _createClass2(JsonpInterceptor, [{
          key: "intercept",
          value: function intercept(req, next) {
            if (req.method === 'JSONP') {
              return this.jsonp.handle(req);
            } // Fall through for normal HTTP requests.


            return next.handle(req);
          }
        }]);

        return JsonpInterceptor;
      }();

      JsonpInterceptor.ɵfac = function JsonpInterceptor_Factory(t) {
        return new (t || JsonpInterceptor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](JsonpClientBackend));
      };

      JsonpInterceptor.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: JsonpInterceptor,
        factory: JsonpInterceptor.ɵfac
      });

      JsonpInterceptor.ctorParameters = function () {
        return [{
          type: JsonpClientBackend
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](JsonpInterceptor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], function () {
          return [{
            type: JsonpClientBackend
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var XSSI_PREFIX = /^\)\]\}',?\n/;
      /**
       * Determine an appropriate URL for the response, by checking either
       * XMLHttpRequest.responseURL or the X-Request-URL header.
       */

      function getResponseUrl(xhr) {
        if ('responseURL' in xhr && xhr.responseURL) {
          return xhr.responseURL;
        }

        if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
          return xhr.getResponseHeader('X-Request-URL');
        }

        return null;
      }
      /**
       * A wrapper around the `XMLHttpRequest` constructor.
       *
       * @publicApi
       */


      var XhrFactory = function XhrFactory() {
        _classCallCheck(this, XhrFactory);
      };
      /**
       * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API.
       *
       */


      var BrowserXhr = /*#__PURE__*/function () {
        function BrowserXhr() {
          _classCallCheck(this, BrowserXhr);
        }

        _createClass2(BrowserXhr, [{
          key: "build",
          value: function build() {
            return new XMLHttpRequest();
          }
        }]);

        return BrowserXhr;
      }();

      BrowserXhr.ɵfac = function BrowserXhr_Factory(t) {
        return new (t || BrowserXhr)();
      };

      BrowserXhr.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: BrowserXhr,
        factory: BrowserXhr.ɵfac
      });

      BrowserXhr.ctorParameters = function () {
        return [];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](BrowserXhr, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], function () {
          return [];
        }, null);
      })();
      /**
       * Uses `XMLHttpRequest` to send requests to a backend server.
       * @see `HttpHandler`
       * @see `JsonpClientBackend`
       *
       * @publicApi
       */


      var HttpXhrBackend = /*#__PURE__*/function () {
        function HttpXhrBackend(xhrFactory) {
          _classCallCheck(this, HttpXhrBackend);

          this.xhrFactory = xhrFactory;
        }
        /**
         * Processes a request and returns a stream of response events.
         * @param req The request object.
         * @returns An observable of the response events.
         */


        _createClass2(HttpXhrBackend, [{
          key: "handle",
          value: function handle(req) {
            var _this573 = this;

            // Quick check to give a better error message when a user attempts to use
            // HttpClient.jsonp() without installing the HttpClientJsonpModule
            if (req.method === 'JSONP') {
              throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");
            } // Everything happens on Observable subscription.


            return new rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"](function (observer) {
              // Start by setting up the XHR object with request method, URL, and withCredentials flag.
              var xhr = _this573.xhrFactory.build();

              xhr.open(req.method, req.urlWithParams);

              if (!!req.withCredentials) {
                xhr.withCredentials = true;
              } // Add all the requested headers.


              req.headers.forEach(function (name, values) {
                return xhr.setRequestHeader(name, values.join(','));
              }); // Add an Accept header if one isn't present already.

              if (!req.headers.has('Accept')) {
                xhr.setRequestHeader('Accept', 'application/json, text/plain, */*');
              } // Auto-detect the Content-Type header if one isn't present already.


              if (!req.headers.has('Content-Type')) {
                var detectedType = req.detectContentTypeHeader(); // Sometimes Content-Type detection fails.

                if (detectedType !== null) {
                  xhr.setRequestHeader('Content-Type', detectedType);
                }
              } // Set the responseType if one was requested.


              if (req.responseType) {
                var responseType = req.responseType.toLowerCase(); // JSON responses need to be processed as text. This is because if the server
                // returns an XSSI-prefixed JSON response, the browser will fail to parse it,
                // xhr.response will be null, and xhr.responseText cannot be accessed to
                // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON
                // is parsed by first requesting text and then applying JSON.parse.

                xhr.responseType = responseType !== 'json' ? responseType : 'text';
              } // Serialize the request body if one is present. If not, this will be set to null.


              var reqBody = req.serializeBody(); // If progress events are enabled, response headers will be delivered
              // in two events - the HttpHeaderResponse event and the full HttpResponse
              // event. However, since response headers don't change in between these
              // two events, it doesn't make sense to parse them twice. So headerResponse
              // caches the data extracted from the response whenever it's first parsed,
              // to ensure parsing isn't duplicated.

              var headerResponse = null; // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest
              // state, and memoizes it into headerResponse.

              var partialFromXhr = function partialFromXhr() {
                if (headerResponse !== null) {
                  return headerResponse;
                } // Read status and normalize an IE9 bug (https://bugs.jquery.com/ticket/1450).


                var status = xhr.status === 1223 ? 204 : xhr.status;
                var statusText = xhr.statusText || 'OK'; // Parse headers from XMLHttpRequest - this step is lazy.

                var headers = new HttpHeaders(xhr.getAllResponseHeaders()); // Read the response URL from the XMLHttpResponse instance and fall back on the
                // request URL.

                var url = getResponseUrl(xhr) || req.url; // Construct the HttpHeaderResponse and memoize it.

                headerResponse = new HttpHeaderResponse({
                  headers: headers,
                  status: status,
                  statusText: statusText,
                  url: url
                });
                return headerResponse;
              }; // Next, a few closures are defined for the various events which XMLHttpRequest can
              // emit. This allows them to be unregistered as event listeners later.
              // First up is the load event, which represents a response being fully available.


              var onLoad = function onLoad() {
                // Read response state from the memoized partial data.
                var _partialFromXhr = partialFromXhr(),
                    headers = _partialFromXhr.headers,
                    status = _partialFromXhr.status,
                    statusText = _partialFromXhr.statusText,
                    url = _partialFromXhr.url; // The body will be read out if present.


                var body = null;

                if (status !== 204) {
                  // Use XMLHttpRequest.response if set, responseText otherwise.
                  body = typeof xhr.response === 'undefined' ? xhr.responseText : xhr.response;
                } // Normalize another potential bug (this one comes from CORS).


                if (status === 0) {
                  status = !!body ? 200 : 0;
                } // ok determines whether the response will be transmitted on the event or
                // error channel. Unsuccessful status codes (not 2xx) will always be errors,
                // but a successful status code can still result in an error if the user
                // asked for JSON data and the body cannot be parsed as such.


                var ok = status >= 200 && status < 300; // Check whether the body needs to be parsed as JSON (in many cases the browser
                // will have done that already).

                if (req.responseType === 'json' && typeof body === 'string') {
                  // Save the original body, before attempting XSSI prefix stripping.
                  var originalBody = body;
                  body = body.replace(XSSI_PREFIX, '');

                  try {
                    // Attempt the parse. If it fails, a parse error should be delivered to the user.
                    body = body !== '' ? JSON.parse(body) : null;
                  } catch (error) {
                    // Since the JSON.parse failed, it's reasonable to assume this might not have been a
                    // JSON response. Restore the original body (including any XSSI prefix) to deliver
                    // a better error response.
                    body = originalBody; // If this was an error request to begin with, leave it as a string, it probably
                    // just isn't JSON. Otherwise, deliver the parsing error to the user.

                    if (ok) {
                      // Even though the response status was 2xx, this is still an error.
                      ok = false; // The parse error contains the text of the body that failed to parse.

                      body = {
                        error: error,
                        text: body
                      };
                    }
                  }
                }

                if (ok) {
                  // A successful response is delivered on the event stream.
                  observer.next(new HttpResponse({
                    body: body,
                    headers: headers,
                    status: status,
                    statusText: statusText,
                    url: url || undefined
                  })); // The full body has been received and delivered, no further events
                  // are possible. This request is complete.

                  observer.complete();
                } else {
                  // An unsuccessful request is delivered on the error channel.
                  observer.error(new HttpErrorResponse({
                    // The error in this case is the response body (error from the server).
                    error: body,
                    headers: headers,
                    status: status,
                    statusText: statusText,
                    url: url || undefined
                  }));
                }
              }; // The onError callback is called when something goes wrong at the network level.
              // Connection timeout, DNS error, offline, etc. These are actual errors, and are
              // transmitted on the error channel.


              var onError = function onError(error) {
                var _partialFromXhr2 = partialFromXhr(),
                    url = _partialFromXhr2.url;

                var res = new HttpErrorResponse({
                  error: error,
                  status: xhr.status || 0,
                  statusText: xhr.statusText || 'Unknown Error',
                  url: url || undefined
                });
                observer.error(res);
              }; // The sentHeaders flag tracks whether the HttpResponseHeaders event
              // has been sent on the stream. This is necessary to track if progress
              // is enabled since the event will be sent on only the first download
              // progerss event.


              var sentHeaders = false; // The download progress event handler, which is only registered if
              // progress events are enabled.

              var onDownProgress = function onDownProgress(event) {
                // Send the HttpResponseHeaders event if it hasn't been sent already.
                if (!sentHeaders) {
                  observer.next(partialFromXhr());
                  sentHeaders = true;
                } // Start building the download progress event to deliver on the response
                // event stream.


                var progressEvent = {
                  type: HttpEventType.DownloadProgress,
                  loaded: event.loaded
                }; // Set the total number of bytes in the event if it's available.

                if (event.lengthComputable) {
                  progressEvent.total = event.total;
                } // If the request was for text content and a partial response is
                // available on XMLHttpRequest, include it in the progress event
                // to allow for streaming reads.


                if (req.responseType === 'text' && !!xhr.responseText) {
                  progressEvent.partialText = xhr.responseText;
                } // Finally, fire the event.


                observer.next(progressEvent);
              }; // The upload progress event handler, which is only registered if
              // progress events are enabled.


              var onUpProgress = function onUpProgress(event) {
                // Upload progress events are simpler. Begin building the progress
                // event.
                var progress = {
                  type: HttpEventType.UploadProgress,
                  loaded: event.loaded
                }; // If the total number of bytes being uploaded is available, include
                // it.

                if (event.lengthComputable) {
                  progress.total = event.total;
                } // Send the event.


                observer.next(progress);
              }; // By default, register for load and error events.


              xhr.addEventListener('load', onLoad);
              xhr.addEventListener('error', onError); // Progress events are only enabled if requested.

              if (req.reportProgress) {
                // Download progress is always enabled if requested.
                xhr.addEventListener('progress', onDownProgress); // Upload progress depends on whether there is a body to upload.

                if (reqBody !== null && xhr.upload) {
                  xhr.upload.addEventListener('progress', onUpProgress);
                }
              } // Fire the request, and notify the event stream that it was fired.


              xhr.send(reqBody);
              observer.next({
                type: HttpEventType.Sent
              }); // This is the return from the Observable function, which is the
              // request cancellation handler.

              return function () {
                // On a cancellation, remove all registered event listeners.
                xhr.removeEventListener('error', onError);
                xhr.removeEventListener('load', onLoad);

                if (req.reportProgress) {
                  xhr.removeEventListener('progress', onDownProgress);

                  if (reqBody !== null && xhr.upload) {
                    xhr.upload.removeEventListener('progress', onUpProgress);
                  }
                } // Finally, abort the in-flight request.


                if (xhr.readyState !== xhr.DONE) {
                  xhr.abort();
                }
              };
            });
          }
        }]);

        return HttpXhrBackend;
      }();

      HttpXhrBackend.ɵfac = function HttpXhrBackend_Factory(t) {
        return new (t || HttpXhrBackend)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](XhrFactory));
      };

      HttpXhrBackend.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: HttpXhrBackend,
        factory: HttpXhrBackend.ɵfac
      });

      HttpXhrBackend.ctorParameters = function () {
        return [{
          type: XhrFactory
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpXhrBackend, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], function () {
          return [{
            type: XhrFactory
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var XSRF_COOKIE_NAME = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('XSRF_COOKIE_NAME');
      var XSRF_HEADER_NAME = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('XSRF_HEADER_NAME');
      /**
       * Retrieves the current XSRF token to use with the next outgoing request.
       *
       * @publicApi
       */

      var HttpXsrfTokenExtractor = function HttpXsrfTokenExtractor() {
        _classCallCheck(this, HttpXsrfTokenExtractor);
      };
      /**
       * `HttpXsrfTokenExtractor` which retrieves the token from a cookie.
       */


      var HttpXsrfCookieExtractor = /*#__PURE__*/function () {
        function HttpXsrfCookieExtractor(doc, platform, cookieName) {
          _classCallCheck(this, HttpXsrfCookieExtractor);

          this.doc = doc;
          this.platform = platform;
          this.cookieName = cookieName;
          this.lastCookieString = '';
          this.lastToken = null;
          /**
           * @internal for testing
           */

          this.parseCount = 0;
        }

        _createClass2(HttpXsrfCookieExtractor, [{
          key: "getToken",
          value: function getToken() {
            if (this.platform === 'server') {
              return null;
            }

            var cookieString = this.doc.cookie || '';

            if (cookieString !== this.lastCookieString) {
              this.parseCount++;
              this.lastToken = Object(_angular_common__WEBPACK_IMPORTED_MODULE_3__["ɵparseCookieValue"])(cookieString, this.cookieName);
              this.lastCookieString = cookieString;
            }

            return this.lastToken;
          }
        }]);

        return HttpXsrfCookieExtractor;
      }();

      HttpXsrfCookieExtractor.ɵfac = function HttpXsrfCookieExtractor_Factory(t) {
        return new (t || HttpXsrfCookieExtractor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](XSRF_COOKIE_NAME));
      };

      HttpXsrfCookieExtractor.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: HttpXsrfCookieExtractor,
        factory: HttpXsrfCookieExtractor.ɵfac
      });

      HttpXsrfCookieExtractor.ctorParameters = function () {
        return [{
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]]
          }]
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]]
          }]
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [XSRF_COOKIE_NAME]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpXsrfCookieExtractor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], function () {
          return [{
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]]
            }]
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]]
            }]
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [XSRF_COOKIE_NAME]
            }]
          }];
        }, null);
      })();
      /**
       * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.
       */


      var HttpXsrfInterceptor = /*#__PURE__*/function () {
        function HttpXsrfInterceptor(tokenService, headerName) {
          _classCallCheck(this, HttpXsrfInterceptor);

          this.tokenService = tokenService;
          this.headerName = headerName;
        }

        _createClass2(HttpXsrfInterceptor, [{
          key: "intercept",
          value: function intercept(req, next) {
            var lcUrl = req.url.toLowerCase(); // Skip both non-mutating requests and absolute URLs.
            // Non-mutating requests don't require a token, and absolute URLs require special handling
            // anyway as the cookie set
            // on our origin is not the same as the token expected by another origin.

            if (req.method === 'GET' || req.method === 'HEAD' || lcUrl.startsWith('http://') || lcUrl.startsWith('https://')) {
              return next.handle(req);
            }

            var token = this.tokenService.getToken(); // Be careful not to overwrite an existing header of the same name.

            if (token !== null && !req.headers.has(this.headerName)) {
              req = req.clone({
                headers: req.headers.set(this.headerName, token)
              });
            }

            return next.handle(req);
          }
        }]);

        return HttpXsrfInterceptor;
      }();

      HttpXsrfInterceptor.ɵfac = function HttpXsrfInterceptor_Factory(t) {
        return new (t || HttpXsrfInterceptor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](HttpXsrfTokenExtractor), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](XSRF_HEADER_NAME));
      };

      HttpXsrfInterceptor.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: HttpXsrfInterceptor,
        factory: HttpXsrfInterceptor.ɵfac
      });

      HttpXsrfInterceptor.ctorParameters = function () {
        return [{
          type: HttpXsrfTokenExtractor
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
            args: [XSRF_HEADER_NAME]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpXsrfInterceptor, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], function () {
          return [{
            type: HttpXsrfTokenExtractor
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
              args: [XSRF_HEADER_NAME]
            }]
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * An injectable `HttpHandler` that applies multiple interceptors
       * to a request before passing it to the given `HttpBackend`.
       *
       * The interceptors are loaded lazily from the injector, to allow
       * interceptors to themselves inject classes depending indirectly
       * on `HttpInterceptingHandler` itself.
       * @see `HttpInterceptor`
       */


      var HttpInterceptingHandler = /*#__PURE__*/function () {
        function HttpInterceptingHandler(backend, injector) {
          _classCallCheck(this, HttpInterceptingHandler);

          this.backend = backend;
          this.injector = injector;
          this.chain = null;
        }

        _createClass2(HttpInterceptingHandler, [{
          key: "handle",
          value: function handle(req) {
            if (this.chain === null) {
              var interceptors = this.injector.get(HTTP_INTERCEPTORS, []);
              this.chain = interceptors.reduceRight(function (next, interceptor) {
                return new HttpInterceptorHandler(next, interceptor);
              }, this.backend);
            }

            return this.chain.handle(req);
          }
        }]);

        return HttpInterceptingHandler;
      }();

      HttpInterceptingHandler.ɵfac = function HttpInterceptingHandler_Factory(t) {
        return new (t || HttpInterceptingHandler)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](HttpBackend), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]));
      };

      HttpInterceptingHandler.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
        token: HttpInterceptingHandler,
        factory: HttpInterceptingHandler.ɵfac
      });

      HttpInterceptingHandler.ctorParameters = function () {
        return [{
          type: HttpBackend
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpInterceptingHandler, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
        }], function () {
          return [{
            type: HttpBackend
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]
          }];
        }, null);
      })();
      /**
       * Constructs an `HttpHandler` that applies interceptors
       * to a request before passing it to the given `HttpBackend`.
       *
       * Use as a factory function within `HttpClientModule`.
       *
       *
       */


      function interceptingHandler(backend) {
        var interceptors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];

        if (!interceptors) {
          return backend;
        }

        return interceptors.reduceRight(function (next, interceptor) {
          return new HttpInterceptorHandler(next, interceptor);
        }, backend);
      }
      /**
       * Factory function that determines where to store JSONP callbacks.
       *
       * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist
       * in test environments. In that case, callbacks are stored on an anonymous object instead.
       *
       *
       */


      function jsonpCallbackContext() {
        if (typeof window === 'object') {
          return window;
        }

        return {};
      }
      /**
       * Configures XSRF protection support for outgoing requests.
       *
       * For a server that supports a cookie-based XSRF protection system,
       * use directly to configure XSRF protection with the correct
       * cookie and header names.
       *
       * If no names are supplied, the default cookie name is `XSRF-TOKEN`
       * and the default header name is `X-XSRF-TOKEN`.
       *
       * @publicApi
       */


      var HttpClientXsrfModule = /*#__PURE__*/function () {
        function HttpClientXsrfModule() {
          _classCallCheck(this, HttpClientXsrfModule);
        }

        _createClass2(HttpClientXsrfModule, null, [{
          key: "disable",
          value:
          /**
           * Disable the default XSRF protection.
           */
          function disable() {
            return {
              ngModule: HttpClientXsrfModule,
              providers: [{
                provide: HttpXsrfInterceptor,
                useClass: NoopInterceptor
              }]
            };
          }
          /**
           * Configure XSRF protection.
           * @param options An object that can specify either or both
           * cookie name or header name.
           * - Cookie name default is `XSRF-TOKEN`.
           * - Header name default is `X-XSRF-TOKEN`.
           *
           */

        }, {
          key: "withOptions",
          value: function withOptions() {
            var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            return {
              ngModule: HttpClientXsrfModule,
              providers: [options.cookieName ? {
                provide: XSRF_COOKIE_NAME,
                useValue: options.cookieName
              } : [], options.headerName ? {
                provide: XSRF_HEADER_NAME,
                useValue: options.headerName
              } : []]
            };
          }
        }]);

        return HttpClientXsrfModule;
      }();

      HttpClientXsrfModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
        type: HttpClientXsrfModule
      });
      HttpClientXsrfModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({
        factory: function HttpClientXsrfModule_Factory(t) {
          return new (t || HttpClientXsrfModule)();
        },
        providers: [HttpXsrfInterceptor, {
          provide: HTTP_INTERCEPTORS,
          useExisting: HttpXsrfInterceptor,
          multi: true
        }, {
          provide: HttpXsrfTokenExtractor,
          useClass: HttpXsrfCookieExtractor
        }, {
          provide: XSRF_COOKIE_NAME,
          useValue: 'XSRF-TOKEN'
        }, {
          provide: XSRF_HEADER_NAME,
          useValue: 'X-XSRF-TOKEN'
        }]
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpClientXsrfModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
          args: [{
            providers: [HttpXsrfInterceptor, {
              provide: HTTP_INTERCEPTORS,
              useExisting: HttpXsrfInterceptor,
              multi: true
            }, {
              provide: HttpXsrfTokenExtractor,
              useClass: HttpXsrfCookieExtractor
            }, {
              provide: XSRF_COOKIE_NAME,
              useValue: 'XSRF-TOKEN'
            }, {
              provide: XSRF_HEADER_NAME,
              useValue: 'X-XSRF-TOKEN'
            }]
          }]
        }], null, null);
      })();
      /**
       * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`
       * with supporting services for XSRF. Automatically imported by `HttpClientModule`.
       *
       * You can add interceptors to the chain behind `HttpClient` by binding them to the
       * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.
       *
       * @publicApi
       */


      var HttpClientModule = function HttpClientModule() {
        _classCallCheck(this, HttpClientModule);
      };

      HttpClientModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
        type: HttpClientModule
      });
      HttpClientModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({
        factory: function HttpClientModule_Factory(t) {
          return new (t || HttpClientModule)();
        },
        providers: [HttpClient, {
          provide: HttpHandler,
          useClass: HttpInterceptingHandler
        }, HttpXhrBackend, {
          provide: HttpBackend,
          useExisting: HttpXhrBackend
        }, BrowserXhr, {
          provide: XhrFactory,
          useExisting: BrowserXhr
        }],
        imports: [[HttpClientXsrfModule.withOptions({
          cookieName: 'XSRF-TOKEN',
          headerName: 'X-XSRF-TOKEN'
        })]]
      });

      (function () {
        (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](HttpClientModule, {
          imports: [HttpClientXsrfModule]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpClientModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
          args: [{
            /**
             * Optional configuration for XSRF protection.
             */
            imports: [HttpClientXsrfModule.withOptions({
              cookieName: 'XSRF-TOKEN',
              headerName: 'X-XSRF-TOKEN'
            })],

            /**
             * Configures the [dependency injector](guide/glossary#injector) where it is imported
             * with supporting services for HTTP communications.
             */
            providers: [HttpClient, {
              provide: HttpHandler,
              useClass: HttpInterceptingHandler
            }, HttpXhrBackend, {
              provide: HttpBackend,
              useExisting: HttpXhrBackend
            }, BrowserXhr, {
              provide: XhrFactory,
              useExisting: BrowserXhr
            }]
          }]
        }], null, null);
      })();
      /**
       * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`
       * with supporting services for JSONP.
       * Without this module, Jsonp requests reach the backend
       * with method JSONP, where they are rejected.
       *
       * You can add interceptors to the chain behind `HttpClient` by binding them to the
       * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.
       *
       * @publicApi
       */


      var HttpClientJsonpModule = function HttpClientJsonpModule() {
        _classCallCheck(this, HttpClientJsonpModule);
      };

      HttpClientJsonpModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
        type: HttpClientJsonpModule
      });
      HttpClientJsonpModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({
        factory: function HttpClientJsonpModule_Factory(t) {
          return new (t || HttpClientJsonpModule)();
        },
        providers: [JsonpClientBackend, {
          provide: JsonpCallbackContext,
          useFactory: jsonpCallbackContext
        }, {
          provide: HTTP_INTERCEPTORS,
          useClass: JsonpInterceptor,
          multi: true
        }]
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpClientJsonpModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
          args: [{
            providers: [JsonpClientBackend, {
              provide: JsonpCallbackContext,
              useFactory: jsonpCallbackContext
            }, {
              provide: HTTP_INTERCEPTORS,
              useClass: JsonpInterceptor,
              multi: true
            }]
          }]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Generated bundle index. Do not edit.
       */
      //# sourceMappingURL=http.js.map

      /***/

    },

    /***/
    "tn5i":
    /*!*************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/metrics.js ***!
      \*************************************************************/

    /*! exports provided: DEFAULT_METRICS_INSTR_OPTIONS, MetricsInstrumentation, addResourceSpans, _startChild */

    /***/
    function tn5i(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DEFAULT_METRICS_INSTR_OPTIONS", function () {
        return DEFAULT_METRICS_INSTR_OPTIONS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "MetricsInstrumentation", function () {
        return MetricsInstrumentation;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "addResourceSpans", function () {
        return addResourceSpans;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "_startChild", function () {
        return _startChild;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../utils */
      "FGHR");
      /* harmony import */


      var _web_vitals_getCLS__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./web-vitals/getCLS */
      "SWsU");
      /* harmony import */


      var _web_vitals_getFID__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./web-vitals/getFID */
      "kerP");
      /* harmony import */


      var _web_vitals_getLCP__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./web-vitals/getLCP */
      "AKTn");
      /* harmony import */


      var _web_vitals_lib_getVisibilityWatcher__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ./web-vitals/lib/getVisibilityWatcher */
      "hNpR");

      var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getGlobalObject"])();
      var DEFAULT_METRICS_INSTR_OPTIONS = {
        _reportAllChanges: false
      };
      /** Class tracking metrics  */

      var MetricsInstrumentation =
      /** @class */
      function () {
        function MetricsInstrumentation(_options) {
          var _a, _b;

          this._measurements = {};
          this._performanceCursor = 0;

          if (!Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isNodeEnv"])() && ((_a = global) === null || _a === void 0 ? void 0 : _a.performance) && ((_b = global) === null || _b === void 0 ? void 0 : _b.document)) {
            if (global.performance.mark) {
              global.performance.mark('sentry-tracing-init');
            }

            this._trackCLS();

            this._trackLCP(_options._reportAllChanges);

            this._trackFID();
          }
        }
        /** Add performance related spans to a transaction */


        MetricsInstrumentation.prototype.addPerformanceEntries = function (transaction) {
          var _this = this;

          if (!global || !global.performance || !global.performance.getEntries || !_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["browserPerformanceTimeOrigin"]) {
            // Gatekeeper if performance API not available
            return;
          }

          _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Tracing] Adding & adjusting spans using Performance API');

          var timeOrigin = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["browserPerformanceTimeOrigin"]);
          var entryScriptSrc;

          if (global.document && global.document.scripts) {
            // eslint-disable-next-line @typescript-eslint/prefer-for-of
            for (var i = 0; i < global.document.scripts.length; i++) {
              // We go through all scripts on the page and look for 'data-entry'
              // We remember the name and measure the time between this script finished loading and
              // our mark 'sentry-tracing-init'
              if (global.document.scripts[i].dataset.entry === 'true') {
                entryScriptSrc = global.document.scripts[i].src;
                break;
              }
            }
          }

          var entryScriptStartTimestamp;
          var tracingInitMarkStartTime;
          var responseStartTimestamp;
          var requestStartTimestamp;
          global.performance.getEntries().slice(this._performanceCursor).forEach(function (entry) {
            var startTime = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.startTime);
            var duration = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.duration);

            if (transaction.op === 'navigation' && timeOrigin + startTime < transaction.startTimestamp) {
              return;
            }

            switch (entry.entryType) {
              case 'navigation':
                {
                  addNavigationSpans(transaction, entry, timeOrigin);
                  responseStartTimestamp = timeOrigin + Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.responseStart);
                  requestStartTimestamp = timeOrigin + Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.requestStart);
                  break;
                }

              case 'mark':
              case 'paint':
              case 'measure':
                {
                  var startTimestamp = addMeasureSpans(transaction, entry, startTime, duration, timeOrigin);

                  if (tracingInitMarkStartTime === undefined && entry.name === 'sentry-tracing-init') {
                    tracingInitMarkStartTime = startTimestamp;
                  } // capture web vitals


                  var firstHidden = Object(_web_vitals_lib_getVisibilityWatcher__WEBPACK_IMPORTED_MODULE_6__["getVisibilityWatcher"])(); // Only report if the page wasn't hidden prior to the web vital.

                  var shouldRecord = entry.startTime < firstHidden.firstHiddenTime;

                  if (entry.name === 'first-paint' && shouldRecord) {
                    _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding FP');

                    _this._measurements['fp'] = {
                      value: entry.startTime
                    };
                    _this._measurements['mark.fp'] = {
                      value: startTimestamp
                    };
                  }

                  if (entry.name === 'first-contentful-paint' && shouldRecord) {
                    _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding FCP');

                    _this._measurements['fcp'] = {
                      value: entry.startTime
                    };
                    _this._measurements['mark.fcp'] = {
                      value: startTimestamp
                    };
                  }

                  break;
                }

              case 'resource':
                {
                  var resourceName = entry.name.replace(global.location.origin, '');
                  var endTimestamp = addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin); // We remember the entry script end time to calculate the difference to the first init mark

                  if (entryScriptStartTimestamp === undefined && (entryScriptSrc || '').indexOf(resourceName) > -1) {
                    entryScriptStartTimestamp = endTimestamp;
                  }

                  break;
                }

              default: // Ignore other entry types.

            }
          });

          if (entryScriptStartTimestamp !== undefined && tracingInitMarkStartTime !== undefined) {
            _startChild(transaction, {
              description: 'evaluation',
              endTimestamp: tracingInitMarkStartTime,
              op: 'script',
              startTimestamp: entryScriptStartTimestamp
            });
          }

          this._performanceCursor = Math.max(performance.getEntries().length - 1, 0);

          this._trackNavigator(transaction); // Measurements are only available for pageload transactions


          if (transaction.op === 'pageload') {
            // normalize applicable web vital values to be relative to transaction.startTimestamp
            var timeOrigin_1 = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["browserPerformanceTimeOrigin"]); // Generate TTFB (Time to First Byte), which measured as the time between the beginning of the transaction and the
            // start of the response in milliseconds

            if (typeof responseStartTimestamp === 'number') {
              _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding TTFB');

              this._measurements['ttfb'] = {
                value: (responseStartTimestamp - transaction.startTimestamp) * 1000
              };

              if (typeof requestStartTimestamp === 'number' && requestStartTimestamp <= responseStartTimestamp) {
                // Capture the time spent making the request and receiving the first byte of the response.
                // This is the time between the start of the request and the start of the response in milliseconds.
                this._measurements['ttfb.requestTime'] = {
                  value: (responseStartTimestamp - requestStartTimestamp) * 1000
                };
              }
            }

            ['fcp', 'fp', 'lcp'].forEach(function (name) {
              if (!_this._measurements[name] || timeOrigin_1 >= transaction.startTimestamp) {
                return;
              } // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin.
              // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need
              // to be adjusted to be relative to transaction.startTimestamp.


              var oldValue = _this._measurements[name].value;
              var measurementTimestamp = timeOrigin_1 + Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(oldValue); // normalizedValue should be in milliseconds

              var normalizedValue = Math.abs((measurementTimestamp - transaction.startTimestamp) * 1000);
              var delta = normalizedValue - oldValue;

              _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log("[Measurements] Normalized " + name + " from " + oldValue + " to " + normalizedValue + " (" + delta + ")");

              _this._measurements[name].value = normalizedValue;
            });

            if (this._measurements['mark.fid'] && this._measurements['fid']) {
              // create span for FID
              _startChild(transaction, {
                description: 'first input delay',
                endTimestamp: this._measurements['mark.fid'].value + Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(this._measurements['fid'].value),
                op: 'web.vitals',
                startTimestamp: this._measurements['mark.fid'].value
              });
            } // If FCP is not recorded we should not record the cls value
            // according to the new definition of CLS.


            if (!('fcp' in this._measurements)) {
              delete this._measurements.cls;
            }

            transaction.setMeasurements(this._measurements);

            this._tagMetricInfo(transaction);
          }
        };
        /** Add LCP / CLS data to transaction to allow debugging */


        MetricsInstrumentation.prototype._tagMetricInfo = function (transaction) {
          if (this._lcpEntry) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding LCP Data'); // Capture Properties of the LCP element that contributes to the LCP.


            if (this._lcpEntry.element) {
              transaction.setTag('lcp.element', Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["htmlTreeAsString"])(this._lcpEntry.element));
            }

            if (this._lcpEntry.id) {
              transaction.setTag('lcp.id', this._lcpEntry.id);
            }

            if (this._lcpEntry.url) {
              // Trim URL to the first 200 characters.
              transaction.setTag('lcp.url', this._lcpEntry.url.trim().slice(0, 200));
            }

            transaction.setTag('lcp.size', this._lcpEntry.size);
          } // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift


          if (this._clsEntry && this._clsEntry.sources) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding CLS Data');

            this._clsEntry.sources.forEach(function (source, index) {
              return transaction.setTag("cls.source." + (index + 1), Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["htmlTreeAsString"])(source.node));
            });
          }
        };
        /** Starts tracking the Cumulative Layout Shift on the current page. */


        MetricsInstrumentation.prototype._trackCLS = function () {
          var _this = this; // See:
          // https://web.dev/evolving-cls/
          // https://web.dev/cls-web-tooling/


          Object(_web_vitals_getCLS__WEBPACK_IMPORTED_MODULE_3__["getCLS"])(function (metric) {
            var entry = metric.entries.pop();

            if (!entry) {
              return;
            }

            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding CLS');

            _this._measurements['cls'] = {
              value: metric.value
            };
            _this._clsEntry = entry;
          });
        };
        /**
         * Capture the information of the user agent.
         */


        MetricsInstrumentation.prototype._trackNavigator = function (transaction) {
          var navigator = global.navigator;

          if (!navigator) {
            return;
          } // track network connectivity


          var connection = navigator.connection;

          if (connection) {
            if (connection.effectiveType) {
              transaction.setTag('effectiveConnectionType', connection.effectiveType);
            }

            if (connection.type) {
              transaction.setTag('connectionType', connection.type);
            }

            if (isMeasurementValue(connection.rtt)) {
              this._measurements['connection.rtt'] = {
                value: connection.rtt
              };
            }

            if (isMeasurementValue(connection.downlink)) {
              this._measurements['connection.downlink'] = {
                value: connection.downlink
              };
            }
          }

          if (isMeasurementValue(navigator.deviceMemory)) {
            transaction.setTag('deviceMemory', String(navigator.deviceMemory));
          }

          if (isMeasurementValue(navigator.hardwareConcurrency)) {
            transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency));
          }
        };
        /** Starts tracking the Largest Contentful Paint on the current page. */


        MetricsInstrumentation.prototype._trackLCP = function (reportAllChanges) {
          var _this = this;

          Object(_web_vitals_getLCP__WEBPACK_IMPORTED_MODULE_5__["getLCP"])(function (metric) {
            var entry = metric.entries.pop();

            if (!entry) {
              return;
            }

            var timeOrigin = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["browserPerformanceTimeOrigin"]);
            var startTime = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.startTime);

            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding LCP');

            _this._measurements['lcp'] = {
              value: metric.value
            };
            _this._measurements['mark.lcp'] = {
              value: timeOrigin + startTime
            };
            _this._lcpEntry = entry;
          }, reportAllChanges);
        };
        /** Starts tracking the First Input Delay on the current page. */


        MetricsInstrumentation.prototype._trackFID = function () {
          var _this = this;

          Object(_web_vitals_getFID__WEBPACK_IMPORTED_MODULE_4__["getFID"])(function (metric) {
            var entry = metric.entries.pop();

            if (!entry) {
              return;
            }

            var timeOrigin = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["browserPerformanceTimeOrigin"]);
            var startTime = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.startTime);

            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding FID');

            _this._measurements['fid'] = {
              value: metric.value
            };
            _this._measurements['mark.fid'] = {
              value: timeOrigin + startTime
            };
          });
        };

        return MetricsInstrumentation;
      }();
      /** Instrument navigation entries */


      function addNavigationSpans(transaction, entry, timeOrigin) {
        addPerformanceNavigationTiming({
          transaction: transaction,
          entry: entry,
          event: 'unloadEvent',
          timeOrigin: timeOrigin
        });
        addPerformanceNavigationTiming({
          transaction: transaction,
          entry: entry,
          event: 'redirect',
          timeOrigin: timeOrigin
        });
        addPerformanceNavigationTiming({
          transaction: transaction,
          entry: entry,
          event: 'domContentLoadedEvent',
          timeOrigin: timeOrigin
        });
        addPerformanceNavigationTiming({
          transaction: transaction,
          entry: entry,
          event: 'loadEvent',
          timeOrigin: timeOrigin
        });
        addPerformanceNavigationTiming({
          transaction: transaction,
          entry: entry,
          event: 'connect',
          timeOrigin: timeOrigin
        });
        addPerformanceNavigationTiming({
          transaction: transaction,
          entry: entry,
          event: 'secureConnection',
          timeOrigin: timeOrigin,
          eventEnd: 'connectEnd',
          description: 'TLS/SSL'
        });
        addPerformanceNavigationTiming({
          transaction: transaction,
          entry: entry,
          event: 'fetch',
          timeOrigin: timeOrigin,
          eventEnd: 'domainLookupStart',
          description: 'cache'
        });
        addPerformanceNavigationTiming({
          transaction: transaction,
          entry: entry,
          event: 'domainLookup',
          timeOrigin: timeOrigin,
          description: 'DNS'
        });
        addRequest(transaction, entry, timeOrigin);
      }
      /** Create measure related spans */


      function addMeasureSpans(transaction, entry, startTime, duration, timeOrigin) {
        var measureStartTimestamp = timeOrigin + startTime;
        var measureEndTimestamp = measureStartTimestamp + duration;

        _startChild(transaction, {
          description: entry.name,
          endTimestamp: measureEndTimestamp,
          op: entry.entryType,
          startTimestamp: measureStartTimestamp
        });

        return measureStartTimestamp;
      }
      /** Create resource-related spans */


      function addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin) {
        // we already instrument based on fetch and xhr, so we don't need to
        // duplicate spans here.
        if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {
          return undefined;
        }

        var data = {};

        if ('transferSize' in entry) {
          data['Transfer Size'] = entry.transferSize;
        }

        if ('encodedBodySize' in entry) {
          data['Encoded Body Size'] = entry.encodedBodySize;
        }

        if ('decodedBodySize' in entry) {
          data['Decoded Body Size'] = entry.decodedBodySize;
        }

        var startTimestamp = timeOrigin + startTime;
        var endTimestamp = startTimestamp + duration;

        _startChild(transaction, {
          description: resourceName,
          endTimestamp: endTimestamp,
          op: entry.initiatorType ? "resource." + entry.initiatorType : 'resource',
          startTimestamp: startTimestamp,
          data: data
        });

        return endTimestamp;
      }
      /** Create performance navigation related spans */


      function addPerformanceNavigationTiming(props) {
        var transaction = props.transaction,
            entry = props.entry,
            event = props.event,
            timeOrigin = props.timeOrigin,
            eventEnd = props.eventEnd,
            description = props.description;
        var end = eventEnd ? entry[eventEnd] : entry[event + "End"];
        var start = entry[event + "Start"];

        if (!start || !end) {
          return;
        }

        _startChild(transaction, {
          op: 'browser',
          description: description !== null && description !== void 0 ? description : event,
          startTimestamp: timeOrigin + Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(start),
          endTimestamp: timeOrigin + Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(end)
        });
      }
      /** Create request and response related spans */


      function addRequest(transaction, entry, timeOrigin) {
        _startChild(transaction, {
          op: 'browser',
          description: 'request',
          startTimestamp: timeOrigin + Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.requestStart),
          endTimestamp: timeOrigin + Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.responseEnd)
        });

        _startChild(transaction, {
          op: 'browser',
          description: 'response',
          startTimestamp: timeOrigin + Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.responseStart),
          endTimestamp: timeOrigin + Object(_utils__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.responseEnd)
        });
      }
      /**
       * Helper function to start child on transactions. This function will make sure that the transaction will
       * use the start timestamp of the created child span if it is earlier than the transactions actual
       * start timestamp.
       */


      function _startChild(transaction, _a) {
        var startTimestamp = _a.startTimestamp,
            ctx = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__rest"])(_a, ["startTimestamp"]);

        if (startTimestamp && transaction.startTimestamp > startTimestamp) {
          transaction.startTimestamp = startTimestamp;
        }

        return transaction.startChild(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
          startTimestamp: startTimestamp
        }, ctx));
      }
      /**
       * Checks if a given value is a valid measurement value.
       */


      function isMeasurementValue(value) {
        return typeof value === 'number' && isFinite(value);
      } //# sourceMappingURL=metrics.js.map

      /***/

    },

    /***/
    "tnsW":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/audit.js ***!
      \****************************************************************/

    /*! exports provided: audit */

    /***/
    function tnsW(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "audit", function () {
        return audit;
      });
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function audit(durationSelector) {
        return function auditOperatorFunction(source) {
          return source.lift(new AuditOperator(durationSelector));
        };
      }

      var AuditOperator = /*#__PURE__*/function () {
        function AuditOperator(durationSelector) {
          _classCallCheck(this, AuditOperator);

          this.durationSelector = durationSelector;
        }

        _createClass2(AuditOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));
          }
        }]);

        return AuditOperator;
      }();

      var AuditSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP18) {
        _inherits(AuditSubscriber, _innerSubscribe__WEBP18);

        var _super278 = _createSuper(AuditSubscriber);

        function AuditSubscriber(destination, durationSelector) {
          var _this574;

          _classCallCheck(this, AuditSubscriber);

          _this574 = _super278.call(this, destination);
          _this574.durationSelector = durationSelector;
          _this574.hasValue = false;
          return _this574;
        }

        _createClass2(AuditSubscriber, [{
          key: "_next",
          value: function _next(value) {
            this.value = value;
            this.hasValue = true;

            if (!this.throttled) {
              var duration;

              try {
                var durationSelector = this.durationSelector;
                duration = durationSelector(value);
              } catch (err) {
                return this.destination.error(err);
              }

              var innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(duration, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this));

              if (!innerSubscription || innerSubscription.closed) {
                this.clearThrottle();
              } else {
                this.add(this.throttled = innerSubscription);
              }
            }
          }
        }, {
          key: "clearThrottle",
          value: function clearThrottle() {
            var value = this.value,
                hasValue = this.hasValue,
                throttled = this.throttled;

            if (throttled) {
              this.remove(throttled);
              this.throttled = undefined;
              throttled.unsubscribe();
            }

            if (hasValue) {
              this.value = undefined;
              this.hasValue = false;
              this.destination.next(value);
            }
          }
        }, {
          key: "notifyNext",
          value: function notifyNext() {
            this.clearThrottle();
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            this.clearThrottle();
          }
        }]);

        return AuditSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"]); //# sourceMappingURL=audit.js.map

      /***/

    },

    /***/
    "tyNb":
    /*!**********************************************************************!*\
      !*** ./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js ***!
      \**********************************************************************/

    /*! exports provided: ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, provideRoutes, ɵEmptyOutletComponent, ɵROUTER_PROVIDERS, ɵangular_packages_router_router_a, ɵangular_packages_router_router_b, ɵangular_packages_router_router_c, ɵangular_packages_router_router_d, ɵangular_packages_router_router_e, ɵangular_packages_router_router_f, ɵangular_packages_router_router_g, ɵangular_packages_router_router_h, ɵangular_packages_router_router_i, ɵangular_packages_router_router_j, ɵangular_packages_router_router_k, ɵangular_packages_router_router_l, ɵangular_packages_router_router_m, ɵangular_packages_router_router_n, ɵangular_packages_router_router_o, ɵassignExtraOptionsToRouter, ɵflatten */

    /***/
    function tyNb(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ActivatedRoute", function () {
        return ActivatedRoute;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ActivatedRouteSnapshot", function () {
        return ActivatedRouteSnapshot;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ActivationEnd", function () {
        return ActivationEnd;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ActivationStart", function () {
        return ActivationStart;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BaseRouteReuseStrategy", function () {
        return BaseRouteReuseStrategy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ChildActivationEnd", function () {
        return ChildActivationEnd;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ChildActivationStart", function () {
        return ChildActivationStart;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ChildrenOutletContexts", function () {
        return ChildrenOutletContexts;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DefaultUrlSerializer", function () {
        return DefaultUrlSerializer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "GuardsCheckEnd", function () {
        return GuardsCheckEnd;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "GuardsCheckStart", function () {
        return GuardsCheckStart;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NavigationCancel", function () {
        return NavigationCancel;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NavigationEnd", function () {
        return NavigationEnd;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NavigationError", function () {
        return NavigationError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NavigationStart", function () {
        return NavigationStart;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "NoPreloading", function () {
        return NoPreloading;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "OutletContext", function () {
        return OutletContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PRIMARY_OUTLET", function () {
        return PRIMARY_OUTLET;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PreloadAllModules", function () {
        return PreloadAllModules;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "PreloadingStrategy", function () {
        return PreloadingStrategy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ROUTER_CONFIGURATION", function () {
        return ROUTER_CONFIGURATION;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ROUTER_INITIALIZER", function () {
        return ROUTER_INITIALIZER;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ROUTES", function () {
        return ROUTES;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ResolveEnd", function () {
        return ResolveEnd;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ResolveStart", function () {
        return ResolveStart;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RouteConfigLoadEnd", function () {
        return RouteConfigLoadEnd;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RouteConfigLoadStart", function () {
        return RouteConfigLoadStart;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RouteReuseStrategy", function () {
        return RouteReuseStrategy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Router", function () {
        return Router;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RouterEvent", function () {
        return RouterEvent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RouterLink", function () {
        return RouterLink;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RouterLinkActive", function () {
        return RouterLinkActive;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RouterLinkWithHref", function () {
        return RouterLinkWithHref;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RouterModule", function () {
        return RouterModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RouterOutlet", function () {
        return RouterOutlet;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RouterPreloader", function () {
        return RouterPreloader;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RouterState", function () {
        return RouterState;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RouterStateSnapshot", function () {
        return RouterStateSnapshot;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RoutesRecognized", function () {
        return RoutesRecognized;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Scroll", function () {
        return Scroll;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "UrlHandlingStrategy", function () {
        return UrlHandlingStrategy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "UrlSegment", function () {
        return UrlSegment;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "UrlSegmentGroup", function () {
        return UrlSegmentGroup;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "UrlSerializer", function () {
        return UrlSerializer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "UrlTree", function () {
        return UrlTree;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VERSION", function () {
        return VERSION;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "convertToParamMap", function () {
        return convertToParamMap;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "provideRoutes", function () {
        return provideRoutes;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵEmptyOutletComponent", function () {
        return ɵEmptyOutletComponent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵROUTER_PROVIDERS", function () {
        return ROUTER_PROVIDERS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_a", function () {
        return ROUTER_FORROOT_GUARD;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_b", function () {
        return routerNgProbeToken;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_c", function () {
        return createRouterScroller;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_d", function () {
        return provideLocationStrategy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_e", function () {
        return provideForRootGuard;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_f", function () {
        return setupRouter;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_g", function () {
        return rootRoute;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_h", function () {
        return RouterInitializer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_i", function () {
        return getAppInitializer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_j", function () {
        return getBootstrapListener;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_k", function () {
        return provideRouterInitializer;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_l", function () {
        return ɵEmptyOutletComponent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_m", function () {
        return Tree;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_n", function () {
        return TreeNode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_o", function () {
        return RouterScroller;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵassignExtraOptionsToRouter", function () {
        return assignExtraOptionsToRouter;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵflatten", function () {
        return flatten;
      });
      /* harmony import */


      var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @angular/common */
      "ofXK");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! rxjs */
      "qCKp");
      /* harmony import */


      var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! rxjs/operators */
      "kU1M");
      /**
       * @license Angular v11.0.9
       * (c) 2010-2020 Google LLC. https://angular.io/
       * License: MIT
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Base for events the router goes through, as opposed to events tied to a specific
       * route. Fired one time for any given navigation.
       *
       * The following code shows how a class subscribes to router events.
       *
       * ```ts
       * class MyService {
       *   constructor(public router: Router, logger: Logger) {
       *     router.events.pipe(
       *        filter((e: Event): e is RouterEvent => e instanceof RouterEvent)
       *     ).subscribe((e: RouterEvent) => {
       *       logger.log(e.id, e.url);
       *     });
       *   }
       * }
       * ```
       *
       * @see `Event`
       * @see [Router events summary](guide/router#router-events)
       * @publicApi
       */


      var RouterEvent = function RouterEvent(
      /** A unique ID that the router assigns to every router navigation. */
      id,
      /** The URL that is the destination for this navigation. */
      url) {
        _classCallCheck(this, RouterEvent);

        this.id = id;
        this.url = url;
      };
      /**
       * An event triggered when a navigation starts.
       *
       * @publicApi
       */


      var NavigationStart = /*#__PURE__*/function (_RouterEvent) {
        _inherits(NavigationStart, _RouterEvent);

        var _super279 = _createSuper(NavigationStart);

        function NavigationStart(
        /** @docsNotRequired */
        id,
        /** @docsNotRequired */
        url) {
          var _this575;

          var navigationTrigger = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'imperative';
          var restoredState = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;

          _classCallCheck(this, NavigationStart);

          _this575 = _super279.call(this, id, url);
          _this575.navigationTrigger = navigationTrigger;
          _this575.restoredState = restoredState;
          return _this575;
        }
        /** @docsNotRequired */


        _createClass2(NavigationStart, [{
          key: "toString",
          value: function toString() {
            return "NavigationStart(id: ".concat(this.id, ", url: '").concat(this.url, "')");
          }
        }]);

        return NavigationStart;
      }(RouterEvent);
      /**
       * An event triggered when a navigation ends successfully.
       *
       * @see `NavigationStart`
       * @see `NavigationCancel`
       * @see `NavigationError`
       *
       * @publicApi
       */


      var NavigationEnd = /*#__PURE__*/function (_RouterEvent2) {
        _inherits(NavigationEnd, _RouterEvent2);

        var _super280 = _createSuper(NavigationEnd);

        function NavigationEnd(
        /** @docsNotRequired */
        id,
        /** @docsNotRequired */
        url,
        /** @docsNotRequired */
        urlAfterRedirects) {
          var _this576;

          _classCallCheck(this, NavigationEnd);

          _this576 = _super280.call(this, id, url);
          _this576.urlAfterRedirects = urlAfterRedirects;
          return _this576;
        }
        /** @docsNotRequired */


        _createClass2(NavigationEnd, [{
          key: "toString",
          value: function toString() {
            return "NavigationEnd(id: ".concat(this.id, ", url: '").concat(this.url, "', urlAfterRedirects: '").concat(this.urlAfterRedirects, "')");
          }
        }]);

        return NavigationEnd;
      }(RouterEvent);
      /**
       * An event triggered when a navigation is canceled, directly or indirectly.
       * This can happen when a route guard
       * returns `false` or initiates a redirect by returning a `UrlTree`.
       *
       * @see `NavigationStart`
       * @see `NavigationEnd`
       * @see `NavigationError`
       *
       * @publicApi
       */


      var NavigationCancel = /*#__PURE__*/function (_RouterEvent3) {
        _inherits(NavigationCancel, _RouterEvent3);

        var _super281 = _createSuper(NavigationCancel);

        function NavigationCancel(
        /** @docsNotRequired */
        id,
        /** @docsNotRequired */
        url,
        /** @docsNotRequired */
        reason) {
          var _this577;

          _classCallCheck(this, NavigationCancel);

          _this577 = _super281.call(this, id, url);
          _this577.reason = reason;
          return _this577;
        }
        /** @docsNotRequired */


        _createClass2(NavigationCancel, [{
          key: "toString",
          value: function toString() {
            return "NavigationCancel(id: ".concat(this.id, ", url: '").concat(this.url, "')");
          }
        }]);

        return NavigationCancel;
      }(RouterEvent);
      /**
       * An event triggered when a navigation fails due to an unexpected error.
       *
       * @see `NavigationStart`
       * @see `NavigationEnd`
       * @see `NavigationCancel`
       *
       * @publicApi
       */


      var NavigationError = /*#__PURE__*/function (_RouterEvent4) {
        _inherits(NavigationError, _RouterEvent4);

        var _super282 = _createSuper(NavigationError);

        function NavigationError(
        /** @docsNotRequired */
        id,
        /** @docsNotRequired */
        url,
        /** @docsNotRequired */
        error) {
          var _this578;

          _classCallCheck(this, NavigationError);

          _this578 = _super282.call(this, id, url);
          _this578.error = error;
          return _this578;
        }
        /** @docsNotRequired */


        _createClass2(NavigationError, [{
          key: "toString",
          value: function toString() {
            return "NavigationError(id: ".concat(this.id, ", url: '").concat(this.url, "', error: ").concat(this.error, ")");
          }
        }]);

        return NavigationError;
      }(RouterEvent);
      /**
       * An event triggered when routes are recognized.
       *
       * @publicApi
       */


      var RoutesRecognized = /*#__PURE__*/function (_RouterEvent5) {
        _inherits(RoutesRecognized, _RouterEvent5);

        var _super283 = _createSuper(RoutesRecognized);

        function RoutesRecognized(
        /** @docsNotRequired */
        id,
        /** @docsNotRequired */
        url,
        /** @docsNotRequired */
        urlAfterRedirects,
        /** @docsNotRequired */
        state) {
          var _this579;

          _classCallCheck(this, RoutesRecognized);

          _this579 = _super283.call(this, id, url);
          _this579.urlAfterRedirects = urlAfterRedirects;
          _this579.state = state;
          return _this579;
        }
        /** @docsNotRequired */


        _createClass2(RoutesRecognized, [{
          key: "toString",
          value: function toString() {
            return "RoutesRecognized(id: ".concat(this.id, ", url: '").concat(this.url, "', urlAfterRedirects: '").concat(this.urlAfterRedirects, "', state: ").concat(this.state, ")");
          }
        }]);

        return RoutesRecognized;
      }(RouterEvent);
      /**
       * An event triggered at the start of the Guard phase of routing.
       *
       * @see `GuardsCheckEnd`
       *
       * @publicApi
       */


      var GuardsCheckStart = /*#__PURE__*/function (_RouterEvent6) {
        _inherits(GuardsCheckStart, _RouterEvent6);

        var _super284 = _createSuper(GuardsCheckStart);

        function GuardsCheckStart(
        /** @docsNotRequired */
        id,
        /** @docsNotRequired */
        url,
        /** @docsNotRequired */
        urlAfterRedirects,
        /** @docsNotRequired */
        state) {
          var _this580;

          _classCallCheck(this, GuardsCheckStart);

          _this580 = _super284.call(this, id, url);
          _this580.urlAfterRedirects = urlAfterRedirects;
          _this580.state = state;
          return _this580;
        }

        _createClass2(GuardsCheckStart, [{
          key: "toString",
          value: function toString() {
            return "GuardsCheckStart(id: ".concat(this.id, ", url: '").concat(this.url, "', urlAfterRedirects: '").concat(this.urlAfterRedirects, "', state: ").concat(this.state, ")");
          }
        }]);

        return GuardsCheckStart;
      }(RouterEvent);
      /**
       * An event triggered at the end of the Guard phase of routing.
       *
       * @see `GuardsCheckStart`
       *
       * @publicApi
       */


      var GuardsCheckEnd = /*#__PURE__*/function (_RouterEvent7) {
        _inherits(GuardsCheckEnd, _RouterEvent7);

        var _super285 = _createSuper(GuardsCheckEnd);

        function GuardsCheckEnd(
        /** @docsNotRequired */
        id,
        /** @docsNotRequired */
        url,
        /** @docsNotRequired */
        urlAfterRedirects,
        /** @docsNotRequired */
        state,
        /** @docsNotRequired */
        shouldActivate) {
          var _this581;

          _classCallCheck(this, GuardsCheckEnd);

          _this581 = _super285.call(this, id, url);
          _this581.urlAfterRedirects = urlAfterRedirects;
          _this581.state = state;
          _this581.shouldActivate = shouldActivate;
          return _this581;
        }

        _createClass2(GuardsCheckEnd, [{
          key: "toString",
          value: function toString() {
            return "GuardsCheckEnd(id: ".concat(this.id, ", url: '").concat(this.url, "', urlAfterRedirects: '").concat(this.urlAfterRedirects, "', state: ").concat(this.state, ", shouldActivate: ").concat(this.shouldActivate, ")");
          }
        }]);

        return GuardsCheckEnd;
      }(RouterEvent);
      /**
       * An event triggered at the the start of the Resolve phase of routing.
       *
       * Runs in the "resolve" phase whether or not there is anything to resolve.
       * In future, may change to only run when there are things to be resolved.
       *
       * @see `ResolveEnd`
       *
       * @publicApi
       */


      var ResolveStart = /*#__PURE__*/function (_RouterEvent8) {
        _inherits(ResolveStart, _RouterEvent8);

        var _super286 = _createSuper(ResolveStart);

        function ResolveStart(
        /** @docsNotRequired */
        id,
        /** @docsNotRequired */
        url,
        /** @docsNotRequired */
        urlAfterRedirects,
        /** @docsNotRequired */
        state) {
          var _this582;

          _classCallCheck(this, ResolveStart);

          _this582 = _super286.call(this, id, url);
          _this582.urlAfterRedirects = urlAfterRedirects;
          _this582.state = state;
          return _this582;
        }

        _createClass2(ResolveStart, [{
          key: "toString",
          value: function toString() {
            return "ResolveStart(id: ".concat(this.id, ", url: '").concat(this.url, "', urlAfterRedirects: '").concat(this.urlAfterRedirects, "', state: ").concat(this.state, ")");
          }
        }]);

        return ResolveStart;
      }(RouterEvent);
      /**
       * An event triggered at the end of the Resolve phase of routing.
       * @see `ResolveStart`.
       *
       * @publicApi
       */


      var ResolveEnd = /*#__PURE__*/function (_RouterEvent9) {
        _inherits(ResolveEnd, _RouterEvent9);

        var _super287 = _createSuper(ResolveEnd);

        function ResolveEnd(
        /** @docsNotRequired */
        id,
        /** @docsNotRequired */
        url,
        /** @docsNotRequired */
        urlAfterRedirects,
        /** @docsNotRequired */
        state) {
          var _this583;

          _classCallCheck(this, ResolveEnd);

          _this583 = _super287.call(this, id, url);
          _this583.urlAfterRedirects = urlAfterRedirects;
          _this583.state = state;
          return _this583;
        }

        _createClass2(ResolveEnd, [{
          key: "toString",
          value: function toString() {
            return "ResolveEnd(id: ".concat(this.id, ", url: '").concat(this.url, "', urlAfterRedirects: '").concat(this.urlAfterRedirects, "', state: ").concat(this.state, ")");
          }
        }]);

        return ResolveEnd;
      }(RouterEvent);
      /**
       * An event triggered before lazy loading a route configuration.
       *
       * @see `RouteConfigLoadEnd`
       *
       * @publicApi
       */


      var RouteConfigLoadStart = /*#__PURE__*/function () {
        function RouteConfigLoadStart(
        /** @docsNotRequired */
        route) {
          _classCallCheck(this, RouteConfigLoadStart);

          this.route = route;
        }

        _createClass2(RouteConfigLoadStart, [{
          key: "toString",
          value: function toString() {
            return "RouteConfigLoadStart(path: ".concat(this.route.path, ")");
          }
        }]);

        return RouteConfigLoadStart;
      }();
      /**
       * An event triggered when a route has been lazy loaded.
       *
       * @see `RouteConfigLoadStart`
       *
       * @publicApi
       */


      var RouteConfigLoadEnd = /*#__PURE__*/function () {
        function RouteConfigLoadEnd(
        /** @docsNotRequired */
        route) {
          _classCallCheck(this, RouteConfigLoadEnd);

          this.route = route;
        }

        _createClass2(RouteConfigLoadEnd, [{
          key: "toString",
          value: function toString() {
            return "RouteConfigLoadEnd(path: ".concat(this.route.path, ")");
          }
        }]);

        return RouteConfigLoadEnd;
      }();
      /**
       * An event triggered at the start of the child-activation
       * part of the Resolve phase of routing.
       * @see  `ChildActivationEnd`
       * @see `ResolveStart`
       *
       * @publicApi
       */


      var ChildActivationStart = /*#__PURE__*/function () {
        function ChildActivationStart(
        /** @docsNotRequired */
        snapshot) {
          _classCallCheck(this, ChildActivationStart);

          this.snapshot = snapshot;
        }

        _createClass2(ChildActivationStart, [{
          key: "toString",
          value: function toString() {
            var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';
            return "ChildActivationStart(path: '".concat(path, "')");
          }
        }]);

        return ChildActivationStart;
      }();
      /**
       * An event triggered at the end of the child-activation part
       * of the Resolve phase of routing.
       * @see `ChildActivationStart`
       * @see `ResolveStart`
       * @publicApi
       */


      var ChildActivationEnd = /*#__PURE__*/function () {
        function ChildActivationEnd(
        /** @docsNotRequired */
        snapshot) {
          _classCallCheck(this, ChildActivationEnd);

          this.snapshot = snapshot;
        }

        _createClass2(ChildActivationEnd, [{
          key: "toString",
          value: function toString() {
            var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';
            return "ChildActivationEnd(path: '".concat(path, "')");
          }
        }]);

        return ChildActivationEnd;
      }();
      /**
       * An event triggered at the start of the activation part
       * of the Resolve phase of routing.
       * @see `ActivationEnd`
       * @see `ResolveStart`
       *
       * @publicApi
       */


      var ActivationStart = /*#__PURE__*/function () {
        function ActivationStart(
        /** @docsNotRequired */
        snapshot) {
          _classCallCheck(this, ActivationStart);

          this.snapshot = snapshot;
        }

        _createClass2(ActivationStart, [{
          key: "toString",
          value: function toString() {
            var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';
            return "ActivationStart(path: '".concat(path, "')");
          }
        }]);

        return ActivationStart;
      }();
      /**
       * An event triggered at the end of the activation part
       * of the Resolve phase of routing.
       * @see `ActivationStart`
       * @see `ResolveStart`
       *
       * @publicApi
       */


      var ActivationEnd = /*#__PURE__*/function () {
        function ActivationEnd(
        /** @docsNotRequired */
        snapshot) {
          _classCallCheck(this, ActivationEnd);

          this.snapshot = snapshot;
        }

        _createClass2(ActivationEnd, [{
          key: "toString",
          value: function toString() {
            var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';
            return "ActivationEnd(path: '".concat(path, "')");
          }
        }]);

        return ActivationEnd;
      }();
      /**
       * An event triggered by scrolling.
       *
       * @publicApi
       */


      var Scroll = /*#__PURE__*/function () {
        function Scroll(
        /** @docsNotRequired */
        routerEvent,
        /** @docsNotRequired */
        position,
        /** @docsNotRequired */
        anchor) {
          _classCallCheck(this, Scroll);

          this.routerEvent = routerEvent;
          this.position = position;
          this.anchor = anchor;
        }

        _createClass2(Scroll, [{
          key: "toString",
          value: function toString() {
            var pos = this.position ? "".concat(this.position[0], ", ").concat(this.position[1]) : null;
            return "Scroll(anchor: '".concat(this.anchor, "', position: '").concat(pos, "')");
          }
        }]);

        return Scroll;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * The primary routing outlet.
       *
       * @publicApi
       */


      var PRIMARY_OUTLET = 'primary';

      var ParamsAsMap = /*#__PURE__*/function () {
        function ParamsAsMap(params) {
          _classCallCheck(this, ParamsAsMap);

          this.params = params || {};
        }

        _createClass2(ParamsAsMap, [{
          key: "has",
          value: function has(name) {
            return Object.prototype.hasOwnProperty.call(this.params, name);
          }
        }, {
          key: "get",
          value: function get(name) {
            if (this.has(name)) {
              var v = this.params[name];
              return Array.isArray(v) ? v[0] : v;
            }

            return null;
          }
        }, {
          key: "getAll",
          value: function getAll(name) {
            if (this.has(name)) {
              var v = this.params[name];
              return Array.isArray(v) ? v : [v];
            }

            return [];
          }
        }, {
          key: "keys",
          get: function get() {
            return Object.keys(this.params);
          }
        }]);

        return ParamsAsMap;
      }();
      /**
       * Converts a `Params` instance to a `ParamMap`.
       * @param params The instance to convert.
       * @returns The new map instance.
       *
       * @publicApi
       */


      function convertToParamMap(params) {
        return new ParamsAsMap(params);
      }

      var NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';

      function navigationCancelingError(message) {
        var error = Error('NavigationCancelingError: ' + message);
        error[NAVIGATION_CANCELING_ERROR] = true;
        return error;
      }

      function isNavigationCancelingError(error) {
        return error && error[NAVIGATION_CANCELING_ERROR];
      } // Matches the route configuration (`route`) against the actual URL (`segments`).


      function defaultUrlMatcher(segments, segmentGroup, route) {
        var parts = route.path.split('/');

        if (parts.length > segments.length) {
          // The actual URL is shorter than the config, no match
          return null;
        }

        if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || parts.length < segments.length)) {
          // The config is longer than the actual URL but we are looking for a full match, return null
          return null;
        }

        var posParams = {}; // Check each config part against the actual URL

        for (var index = 0; index < parts.length; index++) {
          var part = parts[index];
          var segment = segments[index];
          var isParameter = part.startsWith(':');

          if (isParameter) {
            posParams[part.substring(1)] = segment;
          } else if (part !== segment.path) {
            // The actual URL part does not match the config, no match
            return null;
          }
        }

        return {
          consumed: segments.slice(0, parts.length),
          posParams: posParams
        };
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function shallowEqualArrays(a, b) {
        if (a.length !== b.length) return false;

        for (var i = 0; i < a.length; ++i) {
          if (!shallowEqual(a[i], b[i])) return false;
        }

        return true;
      }

      function shallowEqual(a, b) {
        // Casting Object.keys return values to include `undefined` as there are some cases
        // in IE 11 where this can happen. Cannot provide a test because the behavior only
        // exists in certain circumstances in IE 11, therefore doing this cast ensures the
        // logic is correct for when this edge case is hit.
        var k1 = Object.keys(a);
        var k2 = Object.keys(b);

        if (!k1 || !k2 || k1.length != k2.length) {
          return false;
        }

        var key;

        for (var i = 0; i < k1.length; i++) {
          key = k1[i];

          if (!equalArraysOrString(a[key], b[key])) {
            return false;
          }
        }

        return true;
      }
      /**
       * Test equality for arrays of strings or a string.
       */


      function equalArraysOrString(a, b) {
        if (Array.isArray(a) && Array.isArray(b)) {
          if (a.length !== b.length) return false;

          var aSorted = _toConsumableArray(a).sort();

          var bSorted = _toConsumableArray(b).sort();

          return aSorted.every(function (val, index) {
            return bSorted[index] === val;
          });
        } else {
          return a === b;
        }
      }
      /**
       * Flattens single-level nested arrays.
       */


      function flatten(arr) {
        return Array.prototype.concat.apply([], arr);
      }
      /**
       * Return the last element of an array.
       */


      function last(a) {
        return a.length > 0 ? a[a.length - 1] : null;
      }
      /**
       * Verifys all booleans in an array are `true`.
       */


      function and(bools) {
        return !bools.some(function (v) {
          return !v;
        });
      }

      function forEach(map, callback) {
        for (var prop in map) {
          if (map.hasOwnProperty(prop)) {
            callback(map[prop], prop);
          }
        }
      }

      function wrapIntoObservable(value) {
        if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵisObservable"])(value)) {
          return value;
        }

        if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵisPromise"])(value)) {
          // Use `Promise.resolve()` to wrap promise-like instances.
          // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the
          // change detection.
          return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(Promise.resolve(value));
        }

        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(value);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function createEmptyUrlTree() {
        return new UrlTree(new UrlSegmentGroup([], {}), {}, null);
      }

      function containsTree(container, containee, exact) {
        if (exact) {
          return equalQueryParams(container.queryParams, containee.queryParams) && equalSegmentGroups(container.root, containee.root);
        }

        return containsQueryParams(container.queryParams, containee.queryParams) && containsSegmentGroup(container.root, containee.root);
      }

      function equalQueryParams(container, containee) {
        // TODO: This does not handle array params correctly.
        return shallowEqual(container, containee);
      }

      function equalSegmentGroups(container, containee) {
        if (!equalPath(container.segments, containee.segments)) return false;
        if (container.numberOfChildren !== containee.numberOfChildren) return false;

        for (var c in containee.children) {
          if (!container.children[c]) return false;
          if (!equalSegmentGroups(container.children[c], containee.children[c])) return false;
        }

        return true;
      }

      function containsQueryParams(container, containee) {
        return Object.keys(containee).length <= Object.keys(container).length && Object.keys(containee).every(function (key) {
          return equalArraysOrString(container[key], containee[key]);
        });
      }

      function containsSegmentGroup(container, containee) {
        return containsSegmentGroupHelper(container, containee, containee.segments);
      }

      function containsSegmentGroupHelper(container, containee, containeePaths) {
        if (container.segments.length > containeePaths.length) {
          var current = container.segments.slice(0, containeePaths.length);
          if (!equalPath(current, containeePaths)) return false;
          if (containee.hasChildren()) return false;
          return true;
        } else if (container.segments.length === containeePaths.length) {
          if (!equalPath(container.segments, containeePaths)) return false;

          for (var c in containee.children) {
            if (!container.children[c]) return false;
            if (!containsSegmentGroup(container.children[c], containee.children[c])) return false;
          }

          return true;
        } else {
          var _current = containeePaths.slice(0, container.segments.length);

          var next = containeePaths.slice(container.segments.length);
          if (!equalPath(container.segments, _current)) return false;
          if (!container.children[PRIMARY_OUTLET]) return false;
          return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);
        }
      }
      /**
       * @description
       *
       * Represents the parsed URL.
       *
       * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a
       * serialized tree.
       * UrlTree is a data structure that provides a lot of affordances in dealing with URLs
       *
       * @usageNotes
       * ### Example
       *
       * ```
       * @Component({templateUrl:'template.html'})
       * class MyComponent {
       *   constructor(router: Router) {
       *     const tree: UrlTree =
       *       router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');
       *     const f = tree.fragment; // return 'fragment'
       *     const q = tree.queryParams; // returns {debug: 'true'}
       *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];
       *     const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'
       *     g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'
       *     g.children['support'].segments; // return 1 segment 'help'
       *   }
       * }
       * ```
       *
       * @publicApi
       */


      var UrlTree = /*#__PURE__*/function () {
        /** @internal */
        function UrlTree(
        /** The root segment group of the URL tree */
        root,
        /** The query params of the URL */
        queryParams,
        /** The fragment of the URL */
        fragment) {
          _classCallCheck(this, UrlTree);

          this.root = root;
          this.queryParams = queryParams;
          this.fragment = fragment;
        }

        _createClass2(UrlTree, [{
          key: "queryParamMap",
          get: function get() {
            if (!this._queryParamMap) {
              this._queryParamMap = convertToParamMap(this.queryParams);
            }

            return this._queryParamMap;
          }
          /** @docsNotRequired */

        }, {
          key: "toString",
          value: function toString() {
            return DEFAULT_SERIALIZER.serialize(this);
          }
        }]);

        return UrlTree;
      }();
      /**
       * @description
       *
       * Represents the parsed URL segment group.
       *
       * See `UrlTree` for more information.
       *
       * @publicApi
       */


      var UrlSegmentGroup = /*#__PURE__*/function () {
        function UrlSegmentGroup(
        /** The URL segments of this group. See `UrlSegment` for more information */
        segments,
        /** The list of children of this group */
        children) {
          var _this584 = this;

          _classCallCheck(this, UrlSegmentGroup);

          this.segments = segments;
          this.children = children;
          /** The parent node in the url tree */

          this.parent = null;
          forEach(children, function (v, k) {
            return v.parent = _this584;
          });
        }
        /** Whether the segment has child segments */


        _createClass2(UrlSegmentGroup, [{
          key: "hasChildren",
          value: function hasChildren() {
            return this.numberOfChildren > 0;
          }
          /** Number of child segments */

        }, {
          key: "numberOfChildren",
          get: function get() {
            return Object.keys(this.children).length;
          }
          /** @docsNotRequired */

        }, {
          key: "toString",
          value: function toString() {
            return serializePaths(this);
          }
        }]);

        return UrlSegmentGroup;
      }();
      /**
       * @description
       *
       * Represents a single URL segment.
       *
       * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix
       * parameters associated with the segment.
       *
       * @usageNotes
       * ### Example
       *
       * ```
       * @Component({templateUrl:'template.html'})
       * class MyComponent {
       *   constructor(router: Router) {
       *     const tree: UrlTree = router.parseUrl('/team;id=33');
       *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];
       *     const s: UrlSegment[] = g.segments;
       *     s[0].path; // returns 'team'
       *     s[0].parameters; // returns {id: 33}
       *   }
       * }
       * ```
       *
       * @publicApi
       */


      var UrlSegment = /*#__PURE__*/function () {
        function UrlSegment(
        /** The path part of a URL segment */
        path,
        /** The matrix parameters associated with a segment */
        parameters) {
          _classCallCheck(this, UrlSegment);

          this.path = path;
          this.parameters = parameters;
        }

        _createClass2(UrlSegment, [{
          key: "parameterMap",
          get: function get() {
            if (!this._parameterMap) {
              this._parameterMap = convertToParamMap(this.parameters);
            }

            return this._parameterMap;
          }
          /** @docsNotRequired */

        }, {
          key: "toString",
          value: function toString() {
            return serializePath(this);
          }
        }]);

        return UrlSegment;
      }();

      function equalSegments(as, bs) {
        return equalPath(as, bs) && as.every(function (a, i) {
          return shallowEqual(a.parameters, bs[i].parameters);
        });
      }

      function equalPath(as, bs) {
        if (as.length !== bs.length) return false;
        return as.every(function (a, i) {
          return a.path === bs[i].path;
        });
      }

      function mapChildrenIntoArray(segment, fn) {
        var res = [];
        forEach(segment.children, function (child, childOutlet) {
          if (childOutlet === PRIMARY_OUTLET) {
            res = res.concat(fn(child, childOutlet));
          }
        });
        forEach(segment.children, function (child, childOutlet) {
          if (childOutlet !== PRIMARY_OUTLET) {
            res = res.concat(fn(child, childOutlet));
          }
        });
        return res;
      }
      /**
       * @description
       *
       * Serializes and deserializes a URL string into a URL tree.
       *
       * The url serialization strategy is customizable. You can
       * make all URLs case insensitive by providing a custom UrlSerializer.
       *
       * See `DefaultUrlSerializer` for an example of a URL serializer.
       *
       * @publicApi
       */


      var UrlSerializer = function UrlSerializer() {
        _classCallCheck(this, UrlSerializer);
      };
      /**
       * @description
       *
       * A default implementation of the `UrlSerializer`.
       *
       * Example URLs:
       *
       * ```
       * /inbox/33(popup:compose)
       * /inbox/33;open=true/messages/44
       * ```
       *
       * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the
       * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to
       * specify route specific parameters.
       *
       * @publicApi
       */


      var DefaultUrlSerializer = /*#__PURE__*/function () {
        function DefaultUrlSerializer() {
          _classCallCheck(this, DefaultUrlSerializer);
        }

        _createClass2(DefaultUrlSerializer, [{
          key: "parse",
          value:
          /** Parses a url into a `UrlTree` */
          function parse(url) {
            var p = new UrlParser(url);
            return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());
          }
          /** Converts a `UrlTree` into a url */

        }, {
          key: "serialize",
          value: function serialize(tree) {
            var segment = "/".concat(serializeSegment(tree.root, true));
            var query = serializeQueryParams(tree.queryParams);
            var fragment = typeof tree.fragment === "string" ? "#".concat(encodeUriFragment(tree.fragment)) : '';
            return "".concat(segment).concat(query).concat(fragment);
          }
        }]);

        return DefaultUrlSerializer;
      }();

      var DEFAULT_SERIALIZER = new DefaultUrlSerializer();

      function serializePaths(segment) {
        return segment.segments.map(function (p) {
          return serializePath(p);
        }).join('/');
      }

      function serializeSegment(segment, root) {
        if (!segment.hasChildren()) {
          return serializePaths(segment);
        }

        if (root) {
          var primary = segment.children[PRIMARY_OUTLET] ? serializeSegment(segment.children[PRIMARY_OUTLET], false) : '';
          var children = [];
          forEach(segment.children, function (v, k) {
            if (k !== PRIMARY_OUTLET) {
              children.push("".concat(k, ":").concat(serializeSegment(v, false)));
            }
          });
          return children.length > 0 ? "".concat(primary, "(").concat(children.join('//'), ")") : primary;
        } else {
          var _children = mapChildrenIntoArray(segment, function (v, k) {
            if (k === PRIMARY_OUTLET) {
              return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];
            }

            return ["".concat(k, ":").concat(serializeSegment(v, false))];
          }); // use no parenthesis if the only child is a primary outlet route


          if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {
            return "".concat(serializePaths(segment), "/").concat(_children[0]);
          }

          return "".concat(serializePaths(segment), "/(").concat(_children.join('//'), ")");
        }
      }
      /**
       * Encodes a URI string with the default encoding. This function will only ever be called from
       * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need
       * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't
       * have to be encoded per https://url.spec.whatwg.org.
       */


      function encodeUriString(s) {
        return encodeURIComponent(s).replace(/%40/g, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',');
      }
      /**
       * This function should be used to encode both keys and values in a query string key/value. In
       * the following URL, you need to call encodeUriQuery on "k" and "v":
       *
       * http://www.site.org/html;mk=mv?k=v#f
       */


      function encodeUriQuery(s) {
        return encodeUriString(s).replace(/%3B/gi, ';');
      }
      /**
       * This function should be used to encode a URL fragment. In the following URL, you need to call
       * encodeUriFragment on "f":
       *
       * http://www.site.org/html;mk=mv?k=v#f
       */


      function encodeUriFragment(s) {
        return encodeURI(s);
      }
      /**
       * This function should be run on any URI segment as well as the key and value in a key/value
       * pair for matrix params. In the following URL, you need to call encodeUriSegment on "html",
       * "mk", and "mv":
       *
       * http://www.site.org/html;mk=mv?k=v#f
       */


      function encodeUriSegment(s) {
        return encodeUriString(s).replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/%26/gi, '&');
      }

      function decode(s) {
        return decodeURIComponent(s);
      } // Query keys/values should have the "+" replaced first, as "+" in a query string is " ".
      // decodeURIComponent function will not decode "+" as a space.


      function decodeQuery(s) {
        return decode(s.replace(/\+/g, '%20'));
      }

      function serializePath(path) {
        return "".concat(encodeUriSegment(path.path)).concat(serializeMatrixParams(path.parameters));
      }

      function serializeMatrixParams(params) {
        return Object.keys(params).map(function (key) {
          return ";".concat(encodeUriSegment(key), "=").concat(encodeUriSegment(params[key]));
        }).join('');
      }

      function serializeQueryParams(params) {
        var strParams = Object.keys(params).map(function (name) {
          var value = params[name];
          return Array.isArray(value) ? value.map(function (v) {
            return "".concat(encodeUriQuery(name), "=").concat(encodeUriQuery(v));
          }).join('&') : "".concat(encodeUriQuery(name), "=").concat(encodeUriQuery(value));
        });
        return strParams.length ? "?".concat(strParams.join('&')) : '';
      }

      var SEGMENT_RE = /^[^\/()?;=#]+/;

      function matchSegments(str) {
        var match = str.match(SEGMENT_RE);
        return match ? match[0] : '';
      }

      var QUERY_PARAM_RE = /^[^=?&#]+/; // Return the name of the query param at the start of the string or an empty string

      function matchQueryParams(str) {
        var match = str.match(QUERY_PARAM_RE);
        return match ? match[0] : '';
      }

      var QUERY_PARAM_VALUE_RE = /^[^?&#]+/; // Return the value of the query param at the start of the string or an empty string

      function matchUrlQueryParamValue(str) {
        var match = str.match(QUERY_PARAM_VALUE_RE);
        return match ? match[0] : '';
      }

      var UrlParser = /*#__PURE__*/function () {
        function UrlParser(url) {
          _classCallCheck(this, UrlParser);

          this.url = url;
          this.remaining = url;
        }

        _createClass2(UrlParser, [{
          key: "parseRootSegment",
          value: function parseRootSegment() {
            this.consumeOptional('/');

            if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {
              return new UrlSegmentGroup([], {});
            } // The root segment group never has segments


            return new UrlSegmentGroup([], this.parseChildren());
          }
        }, {
          key: "parseQueryParams",
          value: function parseQueryParams() {
            var params = {};

            if (this.consumeOptional('?')) {
              do {
                this.parseQueryParam(params);
              } while (this.consumeOptional('&'));
            }

            return params;
          }
        }, {
          key: "parseFragment",
          value: function parseFragment() {
            return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;
          }
        }, {
          key: "parseChildren",
          value: function parseChildren() {
            if (this.remaining === '') {
              return {};
            }

            this.consumeOptional('/');
            var segments = [];

            if (!this.peekStartsWith('(')) {
              segments.push(this.parseSegment());
            }

            while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {
              this.capture('/');
              segments.push(this.parseSegment());
            }

            var children = {};

            if (this.peekStartsWith('/(')) {
              this.capture('/');
              children = this.parseParens(true);
            }

            var res = {};

            if (this.peekStartsWith('(')) {
              res = this.parseParens(false);
            }

            if (segments.length > 0 || Object.keys(children).length > 0) {
              res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);
            }

            return res;
          } // parse a segment with its matrix parameters
          // ie `name;k1=v1;k2`

        }, {
          key: "parseSegment",
          value: function parseSegment() {
            var path = matchSegments(this.remaining);

            if (path === '' && this.peekStartsWith(';')) {
              throw new Error("Empty path url segment cannot have parameters: '".concat(this.remaining, "'."));
            }

            this.capture(path);
            return new UrlSegment(decode(path), this.parseMatrixParams());
          }
        }, {
          key: "parseMatrixParams",
          value: function parseMatrixParams() {
            var params = {};

            while (this.consumeOptional(';')) {
              this.parseParam(params);
            }

            return params;
          }
        }, {
          key: "parseParam",
          value: function parseParam(params) {
            var key = matchSegments(this.remaining);

            if (!key) {
              return;
            }

            this.capture(key);
            var value = '';

            if (this.consumeOptional('=')) {
              var valueMatch = matchSegments(this.remaining);

              if (valueMatch) {
                value = valueMatch;
                this.capture(value);
              }
            }

            params[decode(key)] = decode(value);
          } // Parse a single query parameter `name[=value]`

        }, {
          key: "parseQueryParam",
          value: function parseQueryParam(params) {
            var key = matchQueryParams(this.remaining);

            if (!key) {
              return;
            }

            this.capture(key);
            var value = '';

            if (this.consumeOptional('=')) {
              var valueMatch = matchUrlQueryParamValue(this.remaining);

              if (valueMatch) {
                value = valueMatch;
                this.capture(value);
              }
            }

            var decodedKey = decodeQuery(key);
            var decodedVal = decodeQuery(value);

            if (params.hasOwnProperty(decodedKey)) {
              // Append to existing values
              var currentVal = params[decodedKey];

              if (!Array.isArray(currentVal)) {
                currentVal = [currentVal];
                params[decodedKey] = currentVal;
              }

              currentVal.push(decodedVal);
            } else {
              // Create a new value
              params[decodedKey] = decodedVal;
            }
          } // parse `(a/b//outlet_name:c/d)`

        }, {
          key: "parseParens",
          value: function parseParens(allowPrimary) {
            var segments = {};
            this.capture('(');

            while (!this.consumeOptional(')') && this.remaining.length > 0) {
              var path = matchSegments(this.remaining);
              var next = this.remaining[path.length]; // if is is not one of these characters, then the segment was unescaped
              // or the group was not closed

              if (next !== '/' && next !== ')' && next !== ';') {
                throw new Error("Cannot parse url '".concat(this.url, "'"));
              }

              var outletName = undefined;

              if (path.indexOf(':') > -1) {
                outletName = path.substr(0, path.indexOf(':'));
                this.capture(outletName);
                this.capture(':');
              } else if (allowPrimary) {
                outletName = PRIMARY_OUTLET;
              }

              var children = this.parseChildren();
              segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] : new UrlSegmentGroup([], children);
              this.consumeOptional('//');
            }

            return segments;
          }
        }, {
          key: "peekStartsWith",
          value: function peekStartsWith(str) {
            return this.remaining.startsWith(str);
          } // Consumes the prefix when it is present and returns whether it has been consumed

        }, {
          key: "consumeOptional",
          value: function consumeOptional(str) {
            if (this.peekStartsWith(str)) {
              this.remaining = this.remaining.substring(str.length);
              return true;
            }

            return false;
          }
        }, {
          key: "capture",
          value: function capture(str) {
            if (!this.consumeOptional(str)) {
              throw new Error("Expected \"".concat(str, "\"."));
            }
          }
        }]);

        return UrlParser;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var Tree = /*#__PURE__*/function () {
        function Tree(root) {
          _classCallCheck(this, Tree);

          this._root = root;
        }

        _createClass2(Tree, [{
          key: "root",
          get: function get() {
            return this._root.value;
          }
          /**
           * @internal
           */

        }, {
          key: "parent",
          value: function parent(t) {
            var p = this.pathFromRoot(t);
            return p.length > 1 ? p[p.length - 2] : null;
          }
          /**
           * @internal
           */

        }, {
          key: "children",
          value: function children(t) {
            var n = findNode(t, this._root);
            return n ? n.children.map(function (t) {
              return t.value;
            }) : [];
          }
          /**
           * @internal
           */

        }, {
          key: "firstChild",
          value: function firstChild(t) {
            var n = findNode(t, this._root);
            return n && n.children.length > 0 ? n.children[0].value : null;
          }
          /**
           * @internal
           */

        }, {
          key: "siblings",
          value: function siblings(t) {
            var p = findPath(t, this._root);
            if (p.length < 2) return [];
            var c = p[p.length - 2].children.map(function (c) {
              return c.value;
            });
            return c.filter(function (cc) {
              return cc !== t;
            });
          }
          /**
           * @internal
           */

        }, {
          key: "pathFromRoot",
          value: function pathFromRoot(t) {
            return findPath(t, this._root).map(function (s) {
              return s.value;
            });
          }
        }]);

        return Tree;
      }(); // DFS for the node matching the value


      function findNode(value, node) {
        if (value === node.value) return node;

        var _iterator69 = _createForOfIteratorHelper(node.children),
            _step68;

        try {
          for (_iterator69.s(); !(_step68 = _iterator69.n()).done;) {
            var child = _step68.value;

            var _node2 = findNode(value, child);

            if (_node2) return _node2;
          }
        } catch (err) {
          _iterator69.e(err);
        } finally {
          _iterator69.f();
        }

        return null;
      } // Return the path to the node with the given value using DFS


      function findPath(value, node) {
        if (value === node.value) return [node];

        var _iterator70 = _createForOfIteratorHelper(node.children),
            _step69;

        try {
          for (_iterator70.s(); !(_step69 = _iterator70.n()).done;) {
            var child = _step69.value;
            var path = findPath(value, child);

            if (path.length) {
              path.unshift(node);
              return path;
            }
          }
        } catch (err) {
          _iterator70.e(err);
        } finally {
          _iterator70.f();
        }

        return [];
      }

      var TreeNode = /*#__PURE__*/function () {
        function TreeNode(value, children) {
          _classCallCheck(this, TreeNode);

          this.value = value;
          this.children = children;
        }

        _createClass2(TreeNode, [{
          key: "toString",
          value: function toString() {
            return "TreeNode(".concat(this.value, ")");
          }
        }]);

        return TreeNode;
      }(); // Return the list of T indexed by outlet name


      function nodeChildrenAsMap(node) {
        var map = {};

        if (node) {
          node.children.forEach(function (child) {
            return map[child.value.outlet] = child;
          });
        }

        return map;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Represents the state of the router as a tree of activated routes.
       *
       * @usageNotes
       *
       * Every node in the route tree is an `ActivatedRoute` instance
       * that knows about the "consumed" URL segments, the extracted parameters,
       * and the resolved data.
       * Use the `ActivatedRoute` properties to traverse the tree from any node.
       *
       * The following fragment shows how a component gets the root node
       * of the current state to establish its own route tree:
       *
       * ```
       * @Component({templateUrl:'template.html'})
       * class MyComponent {
       *   constructor(router: Router) {
       *     const state: RouterState = router.routerState;
       *     const root: ActivatedRoute = state.root;
       *     const child = root.firstChild;
       *     const id: Observable<string> = child.params.map(p => p.id);
       *     //...
       *   }
       * }
       * ```
       *
       * @see `ActivatedRoute`
       * @see [Getting route information](guide/router#getting-route-information)
       *
       * @publicApi
       */


      var RouterState = /*#__PURE__*/function (_Tree) {
        _inherits(RouterState, _Tree);

        var _super288 = _createSuper(RouterState);

        /** @internal */
        function RouterState(root,
        /** The current snapshot of the router state */
        snapshot) {
          var _this585;

          _classCallCheck(this, RouterState);

          _this585 = _super288.call(this, root);
          _this585.snapshot = snapshot;
          setRouterState(_assertThisInitialized(_this585), root);
          return _this585;
        }

        _createClass2(RouterState, [{
          key: "toString",
          value: function toString() {
            return this.snapshot.toString();
          }
        }]);

        return RouterState;
      }(Tree);

      function createEmptyState(urlTree, rootComponent) {
        var snapshot = createEmptyStateSnapshot(urlTree, rootComponent);
        var emptyUrl = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]([new UrlSegment('', {})]);
        var emptyParams = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({});
        var emptyData = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({});
        var emptyQueryParams = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({});
        var fragment = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]('');
        var activated = new ActivatedRoute(emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, snapshot.root);
        activated.snapshot = snapshot.root;
        return new RouterState(new TreeNode(activated, []), snapshot);
      }

      function createEmptyStateSnapshot(urlTree, rootComponent) {
        var emptyParams = {};
        var emptyData = {};
        var emptyQueryParams = {};
        var fragment = '';
        var activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, urlTree.root, -1, {});
        return new RouterStateSnapshot('', new TreeNode(activated, []));
      }
      /**
       * Provides access to information about a route associated with a component
       * that is loaded in an outlet.
       * Use to traverse the `RouterState` tree and extract information from nodes.
       *
       * The following example shows how to construct a component using information from a
       * currently activated route.
       *
       * {@example router/activated-route/module.ts region="activated-route"
       *     header="activated-route.component.ts"}
       *
       * @see [Getting route information](guide/router#getting-route-information)
       *
       * @publicApi
       */


      var ActivatedRoute = /*#__PURE__*/function () {
        /** @internal */
        function ActivatedRoute(
        /** An observable of the URL segments matched by this route. */
        url,
        /** An observable of the matrix parameters scoped to this route. */
        params,
        /** An observable of the query parameters shared by all the routes. */
        queryParams,
        /** An observable of the URL fragment shared by all the routes. */
        fragment,
        /** An observable of the static and resolved data of this route. */
        data,
        /** The outlet name of the route, a constant. */
        outlet,
        /** The component of the route, a constant. */
        // TODO(vsavkin): remove |string
        component, futureSnapshot) {
          _classCallCheck(this, ActivatedRoute);

          this.url = url;
          this.params = params;
          this.queryParams = queryParams;
          this.fragment = fragment;
          this.data = data;
          this.outlet = outlet;
          this.component = component;
          this._futureSnapshot = futureSnapshot;
        }
        /** The configuration used to match this route. */


        _createClass2(ActivatedRoute, [{
          key: "routeConfig",
          get: function get() {
            return this._futureSnapshot.routeConfig;
          }
          /** The root of the router state. */

        }, {
          key: "root",
          get: function get() {
            return this._routerState.root;
          }
          /** The parent of this route in the router state tree. */

        }, {
          key: "parent",
          get: function get() {
            return this._routerState.parent(this);
          }
          /** The first child of this route in the router state tree. */

        }, {
          key: "firstChild",
          get: function get() {
            return this._routerState.firstChild(this);
          }
          /** The children of this route in the router state tree. */

        }, {
          key: "children",
          get: function get() {
            return this._routerState.children(this);
          }
          /** The path from the root of the router state tree to this route. */

        }, {
          key: "pathFromRoot",
          get: function get() {
            return this._routerState.pathFromRoot(this);
          }
          /**
           * An Observable that contains a map of the required and optional parameters
           * specific to the route.
           * The map supports retrieving single and multiple values from the same parameter.
           */

        }, {
          key: "paramMap",
          get: function get() {
            if (!this._paramMap) {
              this._paramMap = this.params.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (p) {
                return convertToParamMap(p);
              }));
            }

            return this._paramMap;
          }
          /**
           * An Observable that contains a map of the query parameters available to all routes.
           * The map supports retrieving single and multiple values from the query parameter.
           */

        }, {
          key: "queryParamMap",
          get: function get() {
            if (!this._queryParamMap) {
              this._queryParamMap = this.queryParams.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (p) {
                return convertToParamMap(p);
              }));
            }

            return this._queryParamMap;
          }
        }, {
          key: "toString",
          value: function toString() {
            return this.snapshot ? this.snapshot.toString() : "Future(".concat(this._futureSnapshot, ")");
          }
        }]);

        return ActivatedRoute;
      }();
      /**
       * Returns the inherited params, data, and resolve for a given route.
       * By default, this only inherits values up to the nearest path-less or component-less route.
       * @internal
       */


      function inheritedParamsDataResolve(route) {
        var paramsInheritanceStrategy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'emptyOnly';
        var pathFromRoot = route.pathFromRoot;
        var inheritingStartingFrom = 0;

        if (paramsInheritanceStrategy !== 'always') {
          inheritingStartingFrom = pathFromRoot.length - 1;

          while (inheritingStartingFrom >= 1) {
            var current = pathFromRoot[inheritingStartingFrom];
            var parent = pathFromRoot[inheritingStartingFrom - 1]; // current route is an empty path => inherits its parent's params and data

            if (current.routeConfig && current.routeConfig.path === '') {
              inheritingStartingFrom--; // parent is componentless => current route should inherit its params and data
            } else if (!parent.component) {
              inheritingStartingFrom--;
            } else {
              break;
            }
          }
        }

        return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));
      }
      /** @internal */


      function flattenInherited(pathFromRoot) {
        return pathFromRoot.reduce(function (res, curr) {
          var params = Object.assign(Object.assign({}, res.params), curr.params);
          var data = Object.assign(Object.assign({}, res.data), curr.data);
          var resolve = Object.assign(Object.assign({}, res.resolve), curr._resolvedData);
          return {
            params: params,
            data: data,
            resolve: resolve
          };
        }, {
          params: {},
          data: {},
          resolve: {}
        });
      }
      /**
       * @description
       *
       * Contains the information about a route associated with a component loaded in an
       * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to
       * traverse the router state tree.
       *
       * The following example initializes a component with route information extracted
       * from the snapshot of the root node at the time of creation.
       *
       * ```
       * @Component({templateUrl:'./my-component.html'})
       * class MyComponent {
       *   constructor(route: ActivatedRoute) {
       *     const id: string = route.snapshot.params.id;
       *     const url: string = route.snapshot.url.join('');
       *     const user = route.snapshot.data.user;
       *   }
       * }
       * ```
       *
       * @publicApi
       */


      var ActivatedRouteSnapshot = /*#__PURE__*/function () {
        /** @internal */
        function ActivatedRouteSnapshot(
        /** The URL segments matched by this route */
        url,
        /**
         *  The matrix parameters scoped to this route.
         *
         *  You can compute all params (or data) in the router state or to get params outside
         *  of an activated component by traversing the `RouterState` tree as in the following
         *  example:
         *  ```
         *  collectRouteParams(router: Router) {
         *    let params = {};
         *    let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];
         *    while (stack.length > 0) {
         *      const route = stack.pop()!;
         *      params = {...params, ...route.params};
         *      stack.push(...route.children);
         *    }
         *    return params;
         *  }
         *  ```
         */
        params,
        /** The query parameters shared by all the routes */
        queryParams,
        /** The URL fragment shared by all the routes */
        fragment,
        /** The static and resolved data of this route */
        data,
        /** The outlet name of the route */
        outlet,
        /** The component of the route */
        component, routeConfig, urlSegment, lastPathIndex, resolve) {
          _classCallCheck(this, ActivatedRouteSnapshot);

          this.url = url;
          this.params = params;
          this.queryParams = queryParams;
          this.fragment = fragment;
          this.data = data;
          this.outlet = outlet;
          this.component = component;
          this.routeConfig = routeConfig;
          this._urlSegment = urlSegment;
          this._lastPathIndex = lastPathIndex;
          this._resolve = resolve;
        }
        /** The root of the router state */


        _createClass2(ActivatedRouteSnapshot, [{
          key: "root",
          get: function get() {
            return this._routerState.root;
          }
          /** The parent of this route in the router state tree */

        }, {
          key: "parent",
          get: function get() {
            return this._routerState.parent(this);
          }
          /** The first child of this route in the router state tree */

        }, {
          key: "firstChild",
          get: function get() {
            return this._routerState.firstChild(this);
          }
          /** The children of this route in the router state tree */

        }, {
          key: "children",
          get: function get() {
            return this._routerState.children(this);
          }
          /** The path from the root of the router state tree to this route */

        }, {
          key: "pathFromRoot",
          get: function get() {
            return this._routerState.pathFromRoot(this);
          }
        }, {
          key: "paramMap",
          get: function get() {
            if (!this._paramMap) {
              this._paramMap = convertToParamMap(this.params);
            }

            return this._paramMap;
          }
        }, {
          key: "queryParamMap",
          get: function get() {
            if (!this._queryParamMap) {
              this._queryParamMap = convertToParamMap(this.queryParams);
            }

            return this._queryParamMap;
          }
        }, {
          key: "toString",
          value: function toString() {
            var url = this.url.map(function (segment) {
              return segment.toString();
            }).join('/');
            var matched = this.routeConfig ? this.routeConfig.path : '';
            return "Route(url:'".concat(url, "', path:'").concat(matched, "')");
          }
        }]);

        return ActivatedRouteSnapshot;
      }();
      /**
       * @description
       *
       * Represents the state of the router at a moment in time.
       *
       * This is a tree of activated route snapshots. Every node in this tree knows about
       * the "consumed" URL segments, the extracted parameters, and the resolved data.
       *
       * The following example shows how a component is initialized with information
       * from the snapshot of the root node's state at the time of creation.
       *
       * ```
       * @Component({templateUrl:'template.html'})
       * class MyComponent {
       *   constructor(router: Router) {
       *     const state: RouterState = router.routerState;
       *     const snapshot: RouterStateSnapshot = state.snapshot;
       *     const root: ActivatedRouteSnapshot = snapshot.root;
       *     const child = root.firstChild;
       *     const id: Observable<string> = child.params.map(p => p.id);
       *     //...
       *   }
       * }
       * ```
       *
       * @publicApi
       */


      var RouterStateSnapshot = /*#__PURE__*/function (_Tree2) {
        _inherits(RouterStateSnapshot, _Tree2);

        var _super289 = _createSuper(RouterStateSnapshot);

        /** @internal */
        function RouterStateSnapshot(
        /** The url from which this snapshot was created */
        url, root) {
          var _this586;

          _classCallCheck(this, RouterStateSnapshot);

          _this586 = _super289.call(this, root);
          _this586.url = url;
          setRouterState(_assertThisInitialized(_this586), root);
          return _this586;
        }

        _createClass2(RouterStateSnapshot, [{
          key: "toString",
          value: function toString() {
            return serializeNode(this._root);
          }
        }]);

        return RouterStateSnapshot;
      }(Tree);

      function setRouterState(state, node) {
        node.value._routerState = state;
        node.children.forEach(function (c) {
          return setRouterState(state, c);
        });
      }

      function serializeNode(node) {
        var c = node.children.length > 0 ? " { ".concat(node.children.map(serializeNode).join(', '), " } ") : '';
        return "".concat(node.value).concat(c);
      }
      /**
       * The expectation is that the activate route is created with the right set of parameters.
       * So we push new values into the observables only when they are not the initial values.
       * And we detect that by checking if the snapshot field is set.
       */


      function advanceActivatedRoute(route) {
        if (route.snapshot) {
          var currentSnapshot = route.snapshot;
          var nextSnapshot = route._futureSnapshot;
          route.snapshot = nextSnapshot;

          if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {
            route.queryParams.next(nextSnapshot.queryParams);
          }

          if (currentSnapshot.fragment !== nextSnapshot.fragment) {
            route.fragment.next(nextSnapshot.fragment);
          }

          if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {
            route.params.next(nextSnapshot.params);
          }

          if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {
            route.url.next(nextSnapshot.url);
          }

          if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {
            route.data.next(nextSnapshot.data);
          }
        } else {
          route.snapshot = route._futureSnapshot; // this is for resolved data

          route.data.next(route._futureSnapshot.data);
        }
      }

      function equalParamsAndUrlSegments(a, b) {
        var equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);
        var parentsMismatch = !a.parent !== !b.parent;
        return equalUrlParams && !parentsMismatch && (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function createRouterState(routeReuseStrategy, curr, prevState) {
        var root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);
        return new RouterState(root, curr);
      }

      function createNode(routeReuseStrategy, curr, prevState) {
        // reuse an activated route that is currently displayed on the screen
        if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {
          var value = prevState.value;
          value._futureSnapshot = curr.value;
          var children = createOrReuseChildren(routeReuseStrategy, curr, prevState);
          return new TreeNode(value, children); // retrieve an activated route that is used to be displayed, but is not currently displayed
        } else {
          var detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);

          if (detachedRouteHandle) {
            var _tree = detachedRouteHandle.route;
            setFutureSnapshotsOfActivatedRoutes(curr, _tree);
            return _tree;
          } else {
            var _value13 = createActivatedRoute(curr.value);

            var _children2 = curr.children.map(function (c) {
              return createNode(routeReuseStrategy, c);
            });

            return new TreeNode(_value13, _children2);
          }
        }
      }

      function setFutureSnapshotsOfActivatedRoutes(curr, result) {
        if (curr.value.routeConfig !== result.value.routeConfig) {
          throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');
        }

        if (curr.children.length !== result.children.length) {
          throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');
        }

        result.value._futureSnapshot = curr.value;

        for (var i = 0; i < curr.children.length; ++i) {
          setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);
        }
      }

      function createOrReuseChildren(routeReuseStrategy, curr, prevState) {
        return curr.children.map(function (child) {
          var _iterator71 = _createForOfIteratorHelper(prevState.children),
              _step70;

          try {
            for (_iterator71.s(); !(_step70 = _iterator71.n()).done;) {
              var p = _step70.value;

              if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {
                return createNode(routeReuseStrategy, child, p);
              }
            }
          } catch (err) {
            _iterator71.e(err);
          } finally {
            _iterator71.f();
          }

          return createNode(routeReuseStrategy, child);
        });
      }

      function createActivatedRoute(c) {
        return new ActivatedRoute(new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.url), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.params), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.queryParams), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.fragment), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.data), c.outlet, c.component, c);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function _createUrlTree(route, urlTree, commands, queryParams, fragment) {
        if (commands.length === 0) {
          return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);
        }

        var nav = computeNavigation(commands);

        if (nav.toRoot()) {
          return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);
        }

        var startingPosition = findStartingPosition(nav, urlTree, route);
        var segmentGroup = startingPosition.processChildren ? updateSegmentGroupChildren(startingPosition.segmentGroup, startingPosition.index, nav.commands) : updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);
        return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);
      }

      function isMatrixParams(command) {
        return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;
      }
      /**
       * Determines if a given command has an `outlets` map. When we encounter a command
       * with an outlets k/v map, we need to apply each outlet individually to the existing segment.
       */


      function isCommandWithOutlets(command) {
        return typeof command === 'object' && command != null && command.outlets;
      }

      function tree(oldSegmentGroup, newSegmentGroup, urlTree, queryParams, fragment) {
        var qp = {};

        if (queryParams) {
          forEach(queryParams, function (value, name) {
            qp[name] = Array.isArray(value) ? value.map(function (v) {
              return "".concat(v);
            }) : "".concat(value);
          });
        }

        if (urlTree.root === oldSegmentGroup) {
          return new UrlTree(newSegmentGroup, qp, fragment);
        }

        return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);
      }

      function replaceSegment(current, oldSegment, newSegment) {
        var children = {};
        forEach(current.children, function (c, outletName) {
          if (c === oldSegment) {
            children[outletName] = newSegment;
          } else {
            children[outletName] = replaceSegment(c, oldSegment, newSegment);
          }
        });
        return new UrlSegmentGroup(current.segments, children);
      }

      var Navigation = /*#__PURE__*/function () {
        function Navigation(isAbsolute, numberOfDoubleDots, commands) {
          _classCallCheck(this, Navigation);

          this.isAbsolute = isAbsolute;
          this.numberOfDoubleDots = numberOfDoubleDots;
          this.commands = commands;

          if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {
            throw new Error('Root segment cannot have matrix parameters');
          }

          var cmdWithOutlet = commands.find(isCommandWithOutlets);

          if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {
            throw new Error('{outlets:{}} has to be the last command');
          }
        }

        _createClass2(Navigation, [{
          key: "toRoot",
          value: function toRoot() {
            return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';
          }
        }]);

        return Navigation;
      }();
      /** Transforms commands to a normalized `Navigation` */


      function computeNavigation(commands) {
        if (typeof commands[0] === 'string' && commands.length === 1 && commands[0] === '/') {
          return new Navigation(true, 0, commands);
        }

        var numberOfDoubleDots = 0;
        var isAbsolute = false;
        var res = commands.reduce(function (res, cmd, cmdIdx) {
          if (typeof cmd === 'object' && cmd != null) {
            if (cmd.outlets) {
              var outlets = {};
              forEach(cmd.outlets, function (commands, name) {
                outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;
              });
              return [].concat(_toConsumableArray(res), [{
                outlets: outlets
              }]);
            }

            if (cmd.segmentPath) {
              return [].concat(_toConsumableArray(res), [cmd.segmentPath]);
            }
          }

          if (!(typeof cmd === 'string')) {
            return [].concat(_toConsumableArray(res), [cmd]);
          }

          if (cmdIdx === 0) {
            cmd.split('/').forEach(function (urlPart, partIndex) {
              if (partIndex == 0 && urlPart === '.') {// skip './a'
              } else if (partIndex == 0 && urlPart === '') {
                //  '/a'
                isAbsolute = true;
              } else if (urlPart === '..') {
                //  '../a'
                numberOfDoubleDots++;
              } else if (urlPart != '') {
                res.push(urlPart);
              }
            });
            return res;
          }

          return [].concat(_toConsumableArray(res), [cmd]);
        }, []);
        return new Navigation(isAbsolute, numberOfDoubleDots, res);
      }

      var Position = function Position(segmentGroup, processChildren, index) {
        _classCallCheck(this, Position);

        this.segmentGroup = segmentGroup;
        this.processChildren = processChildren;
        this.index = index;
      };

      function findStartingPosition(nav, tree, route) {
        if (nav.isAbsolute) {
          return new Position(tree.root, true, 0);
        }

        if (route.snapshot._lastPathIndex === -1) {
          var segmentGroup = route.snapshot._urlSegment; // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children
          // see issue #26224, #13011, #35687
          // However, if the ActivatedRoute is the root we should process children like above.

          var processChildren = segmentGroup === tree.root;
          return new Position(segmentGroup, processChildren, 0);
        }

        var modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;
        var index = route.snapshot._lastPathIndex + modifier;
        return createPositionApplyingDoubleDots(route.snapshot._urlSegment, index, nav.numberOfDoubleDots);
      }

      function createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {
        var g = group;
        var ci = index;
        var dd = numberOfDoubleDots;

        while (dd > ci) {
          dd -= ci;
          g = g.parent;

          if (!g) {
            throw new Error('Invalid number of \'../\'');
          }

          ci = g.segments.length;
        }

        return new Position(g, false, ci - dd);
      }

      function getOutlets(commands) {
        if (isCommandWithOutlets(commands[0])) {
          return commands[0].outlets;
        }

        return _defineProperty({}, PRIMARY_OUTLET, commands);
      }

      function updateSegmentGroup(segmentGroup, startIndex, commands) {
        if (!segmentGroup) {
          segmentGroup = new UrlSegmentGroup([], {});
        }

        if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {
          return updateSegmentGroupChildren(segmentGroup, startIndex, commands);
        }

        var m = prefixedWith(segmentGroup, startIndex, commands);
        var slicedCommands = commands.slice(m.commandIndex);

        if (m.match && m.pathIndex < segmentGroup.segments.length) {
          var g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});
          g.children[PRIMARY_OUTLET] = new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);
          return updateSegmentGroupChildren(g, 0, slicedCommands);
        } else if (m.match && slicedCommands.length === 0) {
          return new UrlSegmentGroup(segmentGroup.segments, {});
        } else if (m.match && !segmentGroup.hasChildren()) {
          return createNewSegmentGroup(segmentGroup, startIndex, commands);
        } else if (m.match) {
          return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);
        } else {
          return createNewSegmentGroup(segmentGroup, startIndex, commands);
        }
      }

      function updateSegmentGroupChildren(segmentGroup, startIndex, commands) {
        if (commands.length === 0) {
          return new UrlSegmentGroup(segmentGroup.segments, {});
        } else {
          var outlets = getOutlets(commands);
          var children = {};
          forEach(outlets, function (commands, outlet) {
            if (typeof commands === 'string') {
              commands = [commands];
            }

            if (commands !== null) {
              children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);
            }
          });
          forEach(segmentGroup.children, function (child, childOutlet) {
            if (outlets[childOutlet] === undefined) {
              children[childOutlet] = child;
            }
          });
          return new UrlSegmentGroup(segmentGroup.segments, children);
        }
      }

      function prefixedWith(segmentGroup, startIndex, commands) {
        var currentCommandIndex = 0;
        var currentPathIndex = startIndex;
        var noMatch = {
          match: false,
          pathIndex: 0,
          commandIndex: 0
        };

        while (currentPathIndex < segmentGroup.segments.length) {
          if (currentCommandIndex >= commands.length) return noMatch;
          var path = segmentGroup.segments[currentPathIndex];
          var command = commands[currentCommandIndex]; // Do not try to consume command as part of the prefixing if it has outlets because it can
          // contain outlets other than the one being processed. Consuming the outlets command would
          // result in other outlets being ignored.

          if (isCommandWithOutlets(command)) {
            break;
          }

          var curr = "".concat(command);
          var next = currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;
          if (currentPathIndex > 0 && curr === undefined) break;

          if (curr && next && typeof next === 'object' && next.outlets === undefined) {
            if (!compare(curr, next, path)) return noMatch;
            currentCommandIndex += 2;
          } else {
            if (!compare(curr, {}, path)) return noMatch;
            currentCommandIndex++;
          }

          currentPathIndex++;
        }

        return {
          match: true,
          pathIndex: currentPathIndex,
          commandIndex: currentCommandIndex
        };
      }

      function createNewSegmentGroup(segmentGroup, startIndex, commands) {
        var paths = segmentGroup.segments.slice(0, startIndex);
        var i = 0;

        while (i < commands.length) {
          var command = commands[i];

          if (isCommandWithOutlets(command)) {
            var children = createNewSegmentChildren(command.outlets);
            return new UrlSegmentGroup(paths, children);
          } // if we start with an object literal, we need to reuse the path part from the segment


          if (i === 0 && isMatrixParams(commands[0])) {
            var p = segmentGroup.segments[startIndex];
            paths.push(new UrlSegment(p.path, commands[0]));
            i++;
            continue;
          }

          var curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : "".concat(command);
          var next = i < commands.length - 1 ? commands[i + 1] : null;

          if (curr && next && isMatrixParams(next)) {
            paths.push(new UrlSegment(curr, stringify(next)));
            i += 2;
          } else {
            paths.push(new UrlSegment(curr, {}));
            i++;
          }
        }

        return new UrlSegmentGroup(paths, {});
      }

      function createNewSegmentChildren(outlets) {
        var children = {};
        forEach(outlets, function (commands, outlet) {
          if (typeof commands === 'string') {
            commands = [commands];
          }

          if (commands !== null) {
            children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);
          }
        });
        return children;
      }

      function stringify(params) {
        var res = {};
        forEach(params, function (v, k) {
          return res[k] = "".concat(v);
        });
        return res;
      }

      function compare(path, params, segment) {
        return path == segment.path && shallowEqual(params, segment.parameters);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var activateRoutes = function activateRoutes(rootContexts, routeReuseStrategy, forwardEvent) {
        return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (t) {
          new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent).activate(rootContexts);
          return t;
        });
      };

      var ActivateRoutes = /*#__PURE__*/function () {
        function ActivateRoutes(routeReuseStrategy, futureState, currState, forwardEvent) {
          _classCallCheck(this, ActivateRoutes);

          this.routeReuseStrategy = routeReuseStrategy;
          this.futureState = futureState;
          this.currState = currState;
          this.forwardEvent = forwardEvent;
        }

        _createClass2(ActivateRoutes, [{
          key: "activate",
          value: function activate(parentContexts) {
            var futureRoot = this.futureState._root;
            var currRoot = this.currState ? this.currState._root : null;
            this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);
            advanceActivatedRoute(this.futureState.root);
            this.activateChildRoutes(futureRoot, currRoot, parentContexts);
          } // De-activate the child route that are not re-used for the future state

        }, {
          key: "deactivateChildRoutes",
          value: function deactivateChildRoutes(futureNode, currNode, contexts) {
            var _this587 = this;

            var children = nodeChildrenAsMap(currNode); // Recurse on the routes active in the future state to de-activate deeper children

            futureNode.children.forEach(function (futureChild) {
              var childOutletName = futureChild.value.outlet;

              _this587.deactivateRoutes(futureChild, children[childOutletName], contexts);

              delete children[childOutletName];
            }); // De-activate the routes that will not be re-used

            forEach(children, function (v, childName) {
              _this587.deactivateRouteAndItsChildren(v, contexts);
            });
          }
        }, {
          key: "deactivateRoutes",
          value: function deactivateRoutes(futureNode, currNode, parentContext) {
            var future = futureNode.value;
            var curr = currNode ? currNode.value : null;

            if (future === curr) {
              // Reusing the node, check to see if the children need to be de-activated
              if (future.component) {
                // If we have a normal route, we need to go through an outlet.
                var context = parentContext.getContext(future.outlet);

                if (context) {
                  this.deactivateChildRoutes(futureNode, currNode, context.children);
                }
              } else {
                // if we have a componentless route, we recurse but keep the same outlet map.
                this.deactivateChildRoutes(futureNode, currNode, parentContext);
              }
            } else {
              if (curr) {
                // Deactivate the current route which will not be re-used
                this.deactivateRouteAndItsChildren(currNode, parentContext);
              }
            }
          }
        }, {
          key: "deactivateRouteAndItsChildren",
          value: function deactivateRouteAndItsChildren(route, parentContexts) {
            if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {
              this.detachAndStoreRouteSubtree(route, parentContexts);
            } else {
              this.deactivateRouteAndOutlet(route, parentContexts);
            }
          }
        }, {
          key: "detachAndStoreRouteSubtree",
          value: function detachAndStoreRouteSubtree(route, parentContexts) {
            var context = parentContexts.getContext(route.value.outlet);

            if (context && context.outlet) {
              var componentRef = context.outlet.detach();
              var contexts = context.children.onOutletDeactivated();
              this.routeReuseStrategy.store(route.value.snapshot, {
                componentRef: componentRef,
                route: route,
                contexts: contexts
              });
            }
          }
        }, {
          key: "deactivateRouteAndOutlet",
          value: function deactivateRouteAndOutlet(route, parentContexts) {
            var context = parentContexts.getContext(route.value.outlet); // The context could be `null` if we are on a componentless route but there may still be
            // children that need deactivating.

            var contexts = context && route.value.component ? context.children : parentContexts;
            var children = nodeChildrenAsMap(route);

            for (var _i45 = 0, _Object$keys7 = Object.keys(children); _i45 < _Object$keys7.length; _i45++) {
              var childOutlet = _Object$keys7[_i45];
              this.deactivateRouteAndItsChildren(children[childOutlet], contexts);
            }

            if (context && context.outlet) {
              // Destroy the component
              context.outlet.deactivate(); // Destroy the contexts for all the outlets that were in the component

              context.children.onOutletDeactivated();
            }
          }
        }, {
          key: "activateChildRoutes",
          value: function activateChildRoutes(futureNode, currNode, contexts) {
            var _this588 = this;

            var children = nodeChildrenAsMap(currNode);
            futureNode.children.forEach(function (c) {
              _this588.activateRoutes(c, children[c.value.outlet], contexts);

              _this588.forwardEvent(new ActivationEnd(c.value.snapshot));
            });

            if (futureNode.children.length) {
              this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));
            }
          }
        }, {
          key: "activateRoutes",
          value: function activateRoutes(futureNode, currNode, parentContexts) {
            var future = futureNode.value;
            var curr = currNode ? currNode.value : null;
            advanceActivatedRoute(future); // reusing the node

            if (future === curr) {
              if (future.component) {
                // If we have a normal route, we need to go through an outlet.
                var context = parentContexts.getOrCreateContext(future.outlet);
                this.activateChildRoutes(futureNode, currNode, context.children);
              } else {
                // if we have a componentless route, we recurse but keep the same outlet map.
                this.activateChildRoutes(futureNode, currNode, parentContexts);
              }
            } else {
              if (future.component) {
                // if we have a normal route, we need to place the component into the outlet and recurse.
                var _context44 = parentContexts.getOrCreateContext(future.outlet);

                if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {
                  var stored = this.routeReuseStrategy.retrieve(future.snapshot);
                  this.routeReuseStrategy.store(future.snapshot, null);

                  _context44.children.onOutletReAttached(stored.contexts);

                  _context44.attachRef = stored.componentRef;
                  _context44.route = stored.route.value;

                  if (_context44.outlet) {
                    // Attach right away when the outlet has already been instantiated
                    // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated
                    _context44.outlet.attach(stored.componentRef, stored.route.value);
                  }

                  advanceActivatedRouteNodeAndItsChildren(stored.route);
                } else {
                  var config = parentLoadedConfig(future.snapshot);
                  var cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;
                  _context44.attachRef = null;
                  _context44.route = future;
                  _context44.resolver = cmpFactoryResolver;

                  if (_context44.outlet) {
                    // Activate the outlet when it has already been instantiated
                    // Otherwise it will get activated from its `ngOnInit` when instantiated
                    _context44.outlet.activateWith(future, cmpFactoryResolver);
                  }

                  this.activateChildRoutes(futureNode, null, _context44.children);
                }
              } else {
                // if we have a componentless route, we recurse but keep the same outlet map.
                this.activateChildRoutes(futureNode, null, parentContexts);
              }
            }
          }
        }]);

        return ActivateRoutes;
      }();

      function advanceActivatedRouteNodeAndItsChildren(node) {
        advanceActivatedRoute(node.value);
        node.children.forEach(advanceActivatedRouteNodeAndItsChildren);
      }

      function parentLoadedConfig(snapshot) {
        for (var s = snapshot.parent; s; s = s.parent) {
          var route = s.routeConfig;
          if (route && route._loadedConfig) return route._loadedConfig;
          if (route && route.component) return null;
        }

        return null;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var LoadedRouterConfig = function LoadedRouterConfig(routes, module) {
        _classCallCheck(this, LoadedRouterConfig);

        this.routes = routes;
        this.module = module;
      };
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Simple function check, but generic so type inference will flow. Example:
       *
       * function product(a: number, b: number) {
       *   return a * b;
       * }
       *
       * if (isFunction<product>(fn)) {
       *   return fn(1, 2);
       * } else {
       *   throw "Must provide the `product` function";
       * }
       */


      function isFunction(v) {
        return typeof v === 'function';
      }

      function isBoolean(v) {
        return typeof v === 'boolean';
      }

      function isUrlTree(v) {
        return v instanceof UrlTree;
      }

      function isCanLoad(guard) {
        return guard && isFunction(guard.canLoad);
      }

      function isCanActivate(guard) {
        return guard && isFunction(guard.canActivate);
      }

      function isCanActivateChild(guard) {
        return guard && isFunction(guard.canActivateChild);
      }

      function isCanDeactivate(guard) {
        return guard && isFunction(guard.canDeactivate);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var INITIAL_VALUE = Symbol('INITIAL_VALUE');

      function prioritizedGuardValue() {
        return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (obs) {
          return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["combineLatest"])(obs.map(function (o) {
            return o.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["take"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["startWith"])(INITIAL_VALUE));
          })).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["scan"])(function (acc, list) {
            var isPending = false;
            return list.reduce(function (innerAcc, val, i) {
              if (innerAcc !== INITIAL_VALUE) return innerAcc; // Toggle pending flag if any values haven't been set yet

              if (val === INITIAL_VALUE) isPending = true; // Any other return values are only valid if we haven't yet hit a pending
              // call. This guarantees that in the case of a guard at the bottom of the
              // tree that returns a redirect, we will wait for the higher priority
              // guard at the top to finish before performing the redirect.

              if (!isPending) {
                // Early return when we hit a `false` value as that should always
                // cancel navigation
                if (val === false) return val;

                if (i === list.length - 1 || isUrlTree(val)) {
                  return val;
                }
              }

              return innerAcc;
            }, acc);
          }, INITIAL_VALUE), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])(function (item) {
            return item !== INITIAL_VALUE;
          }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (item) {
            return isUrlTree(item) ? item : item === true;
          }), //
          Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["take"])(1));
        });
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * This component is used internally within the router to be a placeholder when an empty
       * router-outlet is needed. For example, with a config such as:
       *
       * `{path: 'parent', outlet: 'nav', children: [...]}`
       *
       * In order to render, there needs to be a component on this config, which will default
       * to this `EmptyOutletComponent`.
       */


      var ɵEmptyOutletComponent = function ɵEmptyOutletComponent() {
        _classCallCheck(this, ɵEmptyOutletComponent);
      };

      ɵEmptyOutletComponent.ɵfac = function ɵEmptyOutletComponent_Factory(t) {
        return new (t || ɵEmptyOutletComponent)();
      };

      ɵEmptyOutletComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: ɵEmptyOutletComponent,
        selectors: [["ng-component"]],
        decls: 1,
        vars: 0,
        template: function ɵEmptyOutletComponent_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](0, "router-outlet");
          }
        },
        directives: function directives() {
          return [RouterOutlet];
        },
        encapsulation: 2
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](ɵEmptyOutletComponent, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            template: "<router-outlet></router-outlet>"
          }]
        }], null, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function validateConfig(config) {
        var parentPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';

        // forEach doesn't iterate undefined values
        for (var i = 0; i < config.length; i++) {
          var route = config[i];
          var fullPath = getFullPath(parentPath, route);
          validateNode(route, fullPath);
        }
      }

      function validateNode(route, fullPath) {
        if (typeof ngDevMode === 'undefined' || ngDevMode) {
          if (!route) {
            throw new Error("\n      Invalid configuration of route '".concat(fullPath, "': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    "));
          }

          if (Array.isArray(route)) {
            throw new Error("Invalid configuration of route '".concat(fullPath, "': Array cannot be specified"));
          }

          if (!route.component && !route.children && !route.loadChildren && route.outlet && route.outlet !== PRIMARY_OUTLET) {
            throw new Error("Invalid configuration of route '".concat(fullPath, "': a componentless route without children or loadChildren cannot have a named outlet set"));
          }

          if (route.redirectTo && route.children) {
            throw new Error("Invalid configuration of route '".concat(fullPath, "': redirectTo and children cannot be used together"));
          }

          if (route.redirectTo && route.loadChildren) {
            throw new Error("Invalid configuration of route '".concat(fullPath, "': redirectTo and loadChildren cannot be used together"));
          }

          if (route.children && route.loadChildren) {
            throw new Error("Invalid configuration of route '".concat(fullPath, "': children and loadChildren cannot be used together"));
          }

          if (route.redirectTo && route.component) {
            throw new Error("Invalid configuration of route '".concat(fullPath, "': redirectTo and component cannot be used together"));
          }

          if (route.path && route.matcher) {
            throw new Error("Invalid configuration of route '".concat(fullPath, "': path and matcher cannot be used together"));
          }

          if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {
            throw new Error("Invalid configuration of route '".concat(fullPath, "'. One of the following must be provided: component, redirectTo, children or loadChildren"));
          }

          if (route.path === void 0 && route.matcher === void 0) {
            throw new Error("Invalid configuration of route '".concat(fullPath, "': routes must have either a path or a matcher specified"));
          }

          if (typeof route.path === 'string' && route.path.charAt(0) === '/') {
            throw new Error("Invalid configuration of route '".concat(fullPath, "': path cannot start with a slash"));
          }

          if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {
            var exp = "The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.";
            throw new Error("Invalid configuration of route '{path: \"".concat(fullPath, "\", redirectTo: \"").concat(route.redirectTo, "\"}': please provide 'pathMatch'. ").concat(exp));
          }

          if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {
            throw new Error("Invalid configuration of route '".concat(fullPath, "': pathMatch can only be set to 'prefix' or 'full'"));
          }
        }

        if (route.children) {
          validateConfig(route.children, fullPath);
        }
      }

      function getFullPath(parentPath, currentRoute) {
        if (!currentRoute) {
          return parentPath;
        }

        if (!parentPath && !currentRoute.path) {
          return '';
        } else if (parentPath && !currentRoute.path) {
          return "".concat(parentPath, "/");
        } else if (!parentPath && currentRoute.path) {
          return currentRoute.path;
        } else {
          return "".concat(parentPath, "/").concat(currentRoute.path);
        }
      }
      /**
       * Makes a copy of the config and adds any default required properties.
       */


      function standardizeConfig(r) {
        var children = r.children && r.children.map(standardizeConfig);
        var c = children ? Object.assign(Object.assign({}, r), {
          children: children
        }) : Object.assign({}, r);

        if (!c.component && (children || c.loadChildren) && c.outlet && c.outlet !== PRIMARY_OUTLET) {
          c.component = ɵEmptyOutletComponent;
        }

        return c;
      }
      /** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */


      function getOutlet(route) {
        return route.outlet || PRIMARY_OUTLET;
      }
      /**
       * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.
       * The order of the configs is otherwise preserved.
       */


      function sortByMatchingOutlets(routes, outletName) {
        var sortedConfig = routes.filter(function (r) {
          return getOutlet(r) === outletName;
        });
        sortedConfig.push.apply(sortedConfig, _toConsumableArray(routes.filter(function (r) {
          return getOutlet(r) !== outletName;
        })));
        return sortedConfig;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var noMatch = {
        matched: false,
        consumedSegments: [],
        lastChild: 0,
        parameters: {},
        positionalParamSegments: {}
      };

      function match(segmentGroup, route, segments) {
        var _a;

        if (route.path === '') {
          if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {
            return Object.assign({}, noMatch);
          }

          return {
            matched: true,
            consumedSegments: [],
            lastChild: 0,
            parameters: {},
            positionalParamSegments: {}
          };
        }

        var matcher = route.matcher || defaultUrlMatcher;
        var res = matcher(segments, segmentGroup, route);
        if (!res) return Object.assign({}, noMatch);
        var posParams = {};
        forEach(res.posParams, function (v, k) {
          posParams[k] = v.path;
        });
        var parameters = res.consumed.length > 0 ? Object.assign(Object.assign({}, posParams), res.consumed[res.consumed.length - 1].parameters) : posParams;
        return {
          matched: true,
          consumedSegments: res.consumed,
          lastChild: res.consumed.length,
          // TODO(atscott): investigate combining parameters and positionalParamSegments
          parameters: parameters,
          positionalParamSegments: (_a = res.posParams) !== null && _a !== void 0 ? _a : {}
        };
      }

      function split(segmentGroup, consumedSegments, slicedSegments, config) {
        var relativeLinkResolution = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'corrected';

        if (slicedSegments.length > 0 && containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {
          var _s2 = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(segmentGroup, consumedSegments, config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));

          _s2._sourceSegment = segmentGroup;
          _s2._segmentIndexShift = consumedSegments.length;
          return {
            segmentGroup: _s2,
            slicedSegments: []
          };
        }

        if (slicedSegments.length === 0 && containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {
          var _s3 = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children, relativeLinkResolution));

          _s3._sourceSegment = segmentGroup;
          _s3._segmentIndexShift = consumedSegments.length;
          return {
            segmentGroup: _s3,
            slicedSegments: slicedSegments
          };
        }

        var s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);
        s._sourceSegment = segmentGroup;
        s._segmentIndexShift = consumedSegments.length;
        return {
          segmentGroup: s,
          slicedSegments: slicedSegments
        };
      }

      function addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, routes, children, relativeLinkResolution) {
        var res = {};

        var _iterator72 = _createForOfIteratorHelper(routes),
            _step71;

        try {
          for (_iterator72.s(); !(_step71 = _iterator72.n()).done;) {
            var r = _step71.value;

            if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {
              var s = new UrlSegmentGroup([], {});
              s._sourceSegment = segmentGroup;

              if (relativeLinkResolution === 'legacy') {
                s._segmentIndexShift = segmentGroup.segments.length;
              } else {
                s._segmentIndexShift = consumedSegments.length;
              }

              res[getOutlet(r)] = s;
            }
          }
        } catch (err) {
          _iterator72.e(err);
        } finally {
          _iterator72.f();
        }

        return Object.assign(Object.assign({}, children), res);
      }

      function createChildrenForEmptyPaths(segmentGroup, consumedSegments, routes, primarySegment) {
        var res = {};
        res[PRIMARY_OUTLET] = primarySegment;
        primarySegment._sourceSegment = segmentGroup;
        primarySegment._segmentIndexShift = consumedSegments.length;

        var _iterator73 = _createForOfIteratorHelper(routes),
            _step72;

        try {
          for (_iterator73.s(); !(_step72 = _iterator73.n()).done;) {
            var r = _step72.value;

            if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {
              var s = new UrlSegmentGroup([], {});
              s._sourceSegment = segmentGroup;
              s._segmentIndexShift = consumedSegments.length;
              res[getOutlet(r)] = s;
            }
          }
        } catch (err) {
          _iterator73.e(err);
        } finally {
          _iterator73.f();
        }

        return res;
      }

      function containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {
        return routes.some(function (r) {
          return emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET;
        });
      }

      function containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {
        return routes.some(function (r) {
          return emptyPathMatch(segmentGroup, slicedSegments, r);
        });
      }

      function emptyPathMatch(segmentGroup, slicedSegments, r) {
        if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {
          return false;
        }

        return r.path === '';
      }
      /**
       * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without
       * verifying that its children are a full match for the remainder of the `rawSegment` children as
       * well.
       */


      function isImmediateMatch(route, rawSegment, segments, outlet) {
        // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to
        // a config like
        // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`
        // or even
        // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`
        //
        // The exception here is when the segment outlet is for the primary outlet. This would
        // result in a match inside the named outlet because all children there are written as primary
        // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like
        // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`
        // This should only match if the url is `/(x:b)`.
        if (getOutlet(route) !== outlet && (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) {
          return false;
        }

        if (route.path === '**') {
          return true;
        }

        return match(rawSegment, route, segments).matched;
      }

      function noLeftoversInUrl(segmentGroup, segments, outlet) {
        return segments.length === 0 && !segmentGroup.children[outlet];
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var NoMatch = function NoMatch(segmentGroup) {
        _classCallCheck(this, NoMatch);

        this.segmentGroup = segmentGroup || null;
      };

      var AbsoluteRedirect = function AbsoluteRedirect(urlTree) {
        _classCallCheck(this, AbsoluteRedirect);

        this.urlTree = urlTree;
      };

      function noMatch$1(segmentGroup) {
        return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"](function (obs) {
          return obs.error(new NoMatch(segmentGroup));
        });
      }

      function absoluteRedirect(newTree) {
        return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"](function (obs) {
          return obs.error(new AbsoluteRedirect(newTree));
        });
      }

      function namedOutletsRedirect(redirectTo) {
        return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"](function (obs) {
          return obs.error(new Error("Only absolute redirects can have named outlets. redirectTo: '".concat(redirectTo, "'")));
        });
      }

      function canLoadFails(route) {
        return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"](function (obs) {
          return obs.error(navigationCancelingError("Cannot load children because the guard of the route \"path: '".concat(route.path, "'\" returned false")));
        });
      }
      /**
       * Returns the `UrlTree` with the redirection applied.
       *
       * Lazy modules are loaded along the way.
       */


      function applyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {
        return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();
      }

      var ApplyRedirects = /*#__PURE__*/function () {
        function ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {
          _classCallCheck(this, ApplyRedirects);

          this.configLoader = configLoader;
          this.urlSerializer = urlSerializer;
          this.urlTree = urlTree;
          this.config = config;
          this.allowRedirects = true;
          this.ngModule = moduleInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]);
        }

        _createClass2(ApplyRedirects, [{
          key: "apply",
          value: function apply() {
            var _this589 = this;

            var splitGroup = split(this.urlTree.root, [], [], this.config).segmentGroup; // TODO(atscott): creating a new segment removes the _sourceSegment _segmentIndexShift, which is
            // only necessary to prevent failures in tests which assert exact object matches. The `split` is
            // now shared between `applyRedirects` and `recognize` but only the `recognize` step needs these
            // properties. Before the implementations were merged, the `applyRedirects` would not assign
            // them. We should be able to remove this logic as a "breaking change" but should do some more
            // investigation into the failures first.

            var rootSegmentGroup = new UrlSegmentGroup(splitGroup.segments, splitGroup.children);
            var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, rootSegmentGroup, PRIMARY_OUTLET);
            var urlTrees$ = expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (rootSegmentGroup) {
              return _this589.createUrlTree(squashSegmentGroup(rootSegmentGroup), _this589.urlTree.queryParams, _this589.urlTree.fragment);
            }));
            return urlTrees$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(function (e) {
              if (e instanceof AbsoluteRedirect) {
                // after an absolute redirect we do not apply any more redirects!
                _this589.allowRedirects = false; // we need to run matching, so we can fetch all lazy-loaded modules

                return _this589.match(e.urlTree);
              }

              if (e instanceof NoMatch) {
                throw _this589.noMatchError(e);
              }

              throw e;
            }));
          }
        }, {
          key: "match",
          value: function match(tree) {
            var _this590 = this;

            var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);
            var mapped$ = expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (rootSegmentGroup) {
              return _this590.createUrlTree(squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment);
            }));
            return mapped$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(function (e) {
              if (e instanceof NoMatch) {
                throw _this590.noMatchError(e);
              }

              throw e;
            }));
          }
        }, {
          key: "noMatchError",
          value: function noMatchError(e) {
            return new Error("Cannot match any routes. URL Segment: '".concat(e.segmentGroup, "'"));
          }
        }, {
          key: "createUrlTree",
          value: function createUrlTree(rootCandidate, queryParams, fragment) {
            var root = rootCandidate.segments.length > 0 ? new UrlSegmentGroup([], _defineProperty({}, PRIMARY_OUTLET, rootCandidate)) : rootCandidate;
            return new UrlTree(root, queryParams, fragment);
          }
        }, {
          key: "expandSegmentGroup",
          value: function expandSegmentGroup(ngModule, routes, segmentGroup, outlet) {
            if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {
              return this.expandChildren(ngModule, routes, segmentGroup).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (children) {
                return new UrlSegmentGroup([], children);
              }));
            }

            return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);
          } // Recursively expand segment groups for all the child outlets

        }, {
          key: "expandChildren",
          value: function expandChildren(ngModule, routes, segmentGroup) {
            var _this591 = this;

            // Expand outlets one at a time, starting with the primary outlet. We need to do it this way
            // because an absolute redirect from the primary outlet takes precedence.
            var childOutlets = [];

            for (var _i46 = 0, _Object$keys8 = Object.keys(segmentGroup.children); _i46 < _Object$keys8.length; _i46++) {
              var child = _Object$keys8[_i46];

              if (child === 'primary') {
                childOutlets.unshift(child);
              } else {
                childOutlets.push(child);
              }
            }

            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(childOutlets).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])(function (childOutlet) {
              var child = segmentGroup.children[childOutlet]; // Sort the routes so routes with outlets that match the the segment appear
              // first, followed by routes for other outlets, which might match if they have an
              // empty path.

              var sortedRoutes = sortByMatchingOutlets(routes, childOutlet);
              return _this591.expandSegmentGroup(ngModule, sortedRoutes, child, childOutlet).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (s) {
                return {
                  segment: s,
                  outlet: childOutlet
                };
              }));
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["scan"])(function (children, expandedChild) {
              children[expandedChild.outlet] = expandedChild.segment;
              return children;
            }, {}), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["last"])());
          }
        }, {
          key: "expandSegment",
          value: function expandSegment(ngModule, segmentGroup, routes, segments, outlet, allowRedirects) {
            var _this592 = this;

            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(routes).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])(function (r) {
              var expanded$ = _this592.expandSegmentAgainstRoute(ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);

              return expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(function (e) {
                if (e instanceof NoMatch) {
                  return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null);
                }

                throw e;
              }));
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])(function (s) {
              return !!s;
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(function (e, _) {
              if (e instanceof rxjs__WEBPACK_IMPORTED_MODULE_2__["EmptyError"] || e.name === 'EmptyError') {
                if (noLeftoversInUrl(segmentGroup, segments, outlet)) {
                  return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new UrlSegmentGroup([], {}));
                }

                throw new NoMatch(segmentGroup);
              }

              throw e;
            }));
          }
        }, {
          key: "expandSegmentAgainstRoute",
          value: function expandSegmentAgainstRoute(ngModule, segmentGroup, routes, route, paths, outlet, allowRedirects) {
            if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {
              return noMatch$1(segmentGroup);
            }

            if (route.redirectTo === undefined) {
              return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths, outlet);
            }

            if (allowRedirects && this.allowRedirects) {
              return this.expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, paths, outlet);
            }

            return noMatch$1(segmentGroup);
          }
        }, {
          key: "expandSegmentAgainstRouteUsingRedirect",
          value: function expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet) {
            if (route.path === '**') {
              return this.expandWildCardWithParamsAgainstRouteUsingRedirect(ngModule, routes, route, outlet);
            }

            return this.expandRegularSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet);
          }
        }, {
          key: "expandWildCardWithParamsAgainstRouteUsingRedirect",
          value: function expandWildCardWithParamsAgainstRouteUsingRedirect(ngModule, routes, route, outlet) {
            var _this593 = this;

            var newTree = this.applyRedirectCommands([], route.redirectTo, {});

            if (route.redirectTo.startsWith('/')) {
              return absoluteRedirect(newTree);
            }

            return this.lineralizeSegments(route, newTree).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (newSegments) {
              var group = new UrlSegmentGroup(newSegments, {});
              return _this593.expandSegment(ngModule, group, routes, newSegments, outlet, false);
            }));
          }
        }, {
          key: "expandRegularSegmentAgainstRouteUsingRedirect",
          value: function expandRegularSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet) {
            var _this594 = this;

            var _match = match(segmentGroup, route, segments),
                matched = _match.matched,
                consumedSegments = _match.consumedSegments,
                lastChild = _match.lastChild,
                positionalParamSegments = _match.positionalParamSegments;

            if (!matched) return noMatch$1(segmentGroup);
            var newTree = this.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments);

            if (route.redirectTo.startsWith('/')) {
              return absoluteRedirect(newTree);
            }

            return this.lineralizeSegments(route, newTree).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (newSegments) {
              return _this594.expandSegment(ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet, false);
            }));
          }
        }, {
          key: "matchSegmentAgainstRoute",
          value: function matchSegmentAgainstRoute(ngModule, rawSegmentGroup, route, segments, outlet) {
            var _this595 = this;

            if (route.path === '**') {
              if (route.loadChildren) {
                return this.configLoader.load(ngModule.injector, route).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (cfg) {
                  route._loadedConfig = cfg;
                  return new UrlSegmentGroup(segments, {});
                }));
              }

              return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new UrlSegmentGroup(segments, {}));
            }

            var _match2 = match(rawSegmentGroup, route, segments),
                matched = _match2.matched,
                consumedSegments = _match2.consumedSegments,
                lastChild = _match2.lastChild;

            if (!matched) return noMatch$1(rawSegmentGroup);
            var rawSlicedSegments = segments.slice(lastChild);
            var childConfig$ = this.getChildConfig(ngModule, route, segments);
            return childConfig$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (routerConfig) {
              var childModule = routerConfig.module;
              var childConfig = routerConfig.routes;

              var _split2 = split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig),
                  splitSegmentGroup = _split2.segmentGroup,
                  slicedSegments = _split2.slicedSegments; // See comment on the other call to `split` about why this is necessary.


              var segmentGroup = new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children);

              if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {
                var _expanded$ = _this595.expandChildren(childModule, childConfig, segmentGroup);

                return _expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (children) {
                  return new UrlSegmentGroup(consumedSegments, children);
                }));
              }

              if (childConfig.length === 0 && slicedSegments.length === 0) {
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new UrlSegmentGroup(consumedSegments, {}));
              }

              var matchedOnOutlet = getOutlet(route) === outlet;

              var expanded$ = _this595.expandSegment(childModule, segmentGroup, childConfig, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet, true);

              return expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (cs) {
                return new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children);
              }));
            }));
          }
        }, {
          key: "getChildConfig",
          value: function getChildConfig(ngModule, route, segments) {
            var _this596 = this;

            if (route.children) {
              // The children belong to the same module
              return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new LoadedRouterConfig(route.children, ngModule));
            }

            if (route.loadChildren) {
              // lazy children belong to the loaded module
              if (route._loadedConfig !== undefined) {
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(route._loadedConfig);
              }

              return this.runCanLoadGuards(ngModule.injector, route, segments).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (shouldLoadResult) {
                if (shouldLoadResult) {
                  return _this596.configLoader.load(ngModule.injector, route).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (cfg) {
                    route._loadedConfig = cfg;
                    return cfg;
                  }));
                }

                return canLoadFails(route);
              }));
            }

            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new LoadedRouterConfig([], ngModule));
          }
        }, {
          key: "runCanLoadGuards",
          value: function runCanLoadGuards(moduleInjector, route, segments) {
            var _this597 = this;

            var canLoad = route.canLoad;
            if (!canLoad || canLoad.length === 0) return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true);
            var canLoadObservables = canLoad.map(function (injectionToken) {
              var guard = moduleInjector.get(injectionToken);
              var guardVal;

              if (isCanLoad(guard)) {
                guardVal = guard.canLoad(route, segments);
              } else if (isFunction(guard)) {
                guardVal = guard(route, segments);
              } else {
                throw new Error('Invalid CanLoad guard');
              }

              return wrapIntoObservable(guardVal);
            });
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canLoadObservables).pipe(prioritizedGuardValue(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (result) {
              if (!isUrlTree(result)) return;
              var error = navigationCancelingError("Redirecting to \"".concat(_this597.urlSerializer.serialize(result), "\""));
              error.url = result;
              throw error;
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (result) {
              return result === true;
            }));
          }
        }, {
          key: "lineralizeSegments",
          value: function lineralizeSegments(route, urlTree) {
            var res = [];
            var c = urlTree.root;

            while (true) {
              res = res.concat(c.segments);

              if (c.numberOfChildren === 0) {
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(res);
              }

              if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {
                return namedOutletsRedirect(route.redirectTo);
              }

              c = c.children[PRIMARY_OUTLET];
            }
          }
        }, {
          key: "applyRedirectCommands",
          value: function applyRedirectCommands(segments, redirectTo, posParams) {
            return this.applyRedirectCreatreUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);
          }
        }, {
          key: "applyRedirectCreatreUrlTree",
          value: function applyRedirectCreatreUrlTree(redirectTo, urlTree, segments, posParams) {
            var newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);
            return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment);
          }
        }, {
          key: "createQueryParams",
          value: function createQueryParams(redirectToParams, actualParams) {
            var res = {};
            forEach(redirectToParams, function (v, k) {
              var copySourceValue = typeof v === 'string' && v.startsWith(':');

              if (copySourceValue) {
                var sourceName = v.substring(1);
                res[k] = actualParams[sourceName];
              } else {
                res[k] = v;
              }
            });
            return res;
          }
        }, {
          key: "createSegmentGroup",
          value: function createSegmentGroup(redirectTo, group, segments, posParams) {
            var _this598 = this;

            var updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);
            var children = {};
            forEach(group.children, function (child, name) {
              children[name] = _this598.createSegmentGroup(redirectTo, child, segments, posParams);
            });
            return new UrlSegmentGroup(updatedSegments, children);
          }
        }, {
          key: "createSegments",
          value: function createSegments(redirectTo, redirectToSegments, actualSegments, posParams) {
            var _this599 = this;

            return redirectToSegments.map(function (s) {
              return s.path.startsWith(':') ? _this599.findPosParam(redirectTo, s, posParams) : _this599.findOrReturn(s, actualSegments);
            });
          }
        }, {
          key: "findPosParam",
          value: function findPosParam(redirectTo, redirectToUrlSegment, posParams) {
            var pos = posParams[redirectToUrlSegment.path.substring(1)];
            if (!pos) throw new Error("Cannot redirect to '".concat(redirectTo, "'. Cannot find '").concat(redirectToUrlSegment.path, "'."));
            return pos;
          }
        }, {
          key: "findOrReturn",
          value: function findOrReturn(redirectToUrlSegment, actualSegments) {
            var idx = 0;

            var _iterator74 = _createForOfIteratorHelper(actualSegments),
                _step73;

            try {
              for (_iterator74.s(); !(_step73 = _iterator74.n()).done;) {
                var s = _step73.value;

                if (s.path === redirectToUrlSegment.path) {
                  actualSegments.splice(idx);
                  return s;
                }

                idx++;
              }
            } catch (err) {
              _iterator74.e(err);
            } finally {
              _iterator74.f();
            }

            return redirectToUrlSegment;
          }
        }]);

        return ApplyRedirects;
      }();
      /**
       * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.
       *
       * When a segment group has only one child which is a primary outlet, merges that child into the
       * parent. That is, the child segment group's segments are merged into the `s` and the child's
       * children become the children of `s`. Think of this like a 'squash', merging the child segment
       * group into the parent.
       */


      function mergeTrivialChildren(s) {
        if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {
          var c = s.children[PRIMARY_OUTLET];
          return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);
        }

        return s;
      }
      /**
       * Recursively merges primary segment children into their parents and also drops empty children
       * (those which have no segments and no children themselves). The latter prevents serializing a
       * group into something like `/a(aux:)`, where `aux` is an empty child segment.
       */


      function squashSegmentGroup(segmentGroup) {
        var newChildren = {};

        for (var _i47 = 0, _Object$keys9 = Object.keys(segmentGroup.children); _i47 < _Object$keys9.length; _i47++) {
          var childOutlet = _Object$keys9[_i47];
          var child = segmentGroup.children[childOutlet];
          var childCandidate = squashSegmentGroup(child); // don't add empty children

          if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {
            newChildren[childOutlet] = childCandidate;
          }
        }

        var s = new UrlSegmentGroup(segmentGroup.segments, newChildren);
        return mergeTrivialChildren(s);
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function applyRedirects$1(moduleInjector, configLoader, urlSerializer, config) {
        return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (t) {
          return applyRedirects(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (urlAfterRedirects) {
            return Object.assign(Object.assign({}, t), {
              urlAfterRedirects: urlAfterRedirects
            });
          }));
        });
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var CanActivate = function CanActivate(path) {
        _classCallCheck(this, CanActivate);

        this.path = path;
        this.route = this.path[this.path.length - 1];
      };

      var CanDeactivate = function CanDeactivate(component, route) {
        _classCallCheck(this, CanDeactivate);

        this.component = component;
        this.route = route;
      };

      function getAllRouteGuards(future, curr, parentContexts) {
        var futureRoot = future._root;
        var currRoot = curr ? curr._root : null;
        return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);
      }

      function getCanActivateChild(p) {
        var canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;
        if (!canActivateChild || canActivateChild.length === 0) return null;
        return {
          node: p,
          guards: canActivateChild
        };
      }

      function getToken(token, snapshot, moduleInjector) {
        var config = getClosestLoadedConfig(snapshot);
        var injector = config ? config.module.injector : moduleInjector;
        return injector.get(token);
      }

      function getClosestLoadedConfig(snapshot) {
        if (!snapshot) return null;

        for (var s = snapshot.parent; s; s = s.parent) {
          var route = s.routeConfig;
          if (route && route._loadedConfig) return route._loadedConfig;
        }

        return null;
      }

      function getChildRouteGuards(futureNode, currNode, contexts, futurePath) {
        var checks = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
          canDeactivateChecks: [],
          canActivateChecks: []
        };
        var prevChildren = nodeChildrenAsMap(currNode); // Process the children of the future route

        futureNode.children.forEach(function (c) {
          getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);
          delete prevChildren[c.value.outlet];
        }); // Process any children left from the current route (not active for the future route)

        forEach(prevChildren, function (v, k) {
          return deactivateRouteAndItsChildren(v, contexts.getContext(k), checks);
        });
        return checks;
      }

      function getRouteGuards(futureNode, currNode, parentContexts, futurePath) {
        var checks = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
          canDeactivateChecks: [],
          canActivateChecks: []
        };
        var future = futureNode.value;
        var curr = currNode ? currNode.value : null;
        var context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null; // reusing the node

        if (curr && future.routeConfig === curr.routeConfig) {
          var shouldRun = shouldRunGuardsAndResolvers(curr, future, future.routeConfig.runGuardsAndResolvers);

          if (shouldRun) {
            checks.canActivateChecks.push(new CanActivate(futurePath));
          } else {
            // we need to set the data
            future.data = curr.data;
            future._resolvedData = curr._resolvedData;
          } // If we have a component, we need to go through an outlet.


          if (future.component) {
            getChildRouteGuards(futureNode, currNode, context ? context.children : null, futurePath, checks); // if we have a componentless route, we recurse but keep the same outlet map.
          } else {
            getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);
          }

          if (shouldRun && context && context.outlet && context.outlet.isActivated) {
            checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));
          }
        } else {
          if (curr) {
            deactivateRouteAndItsChildren(currNode, context, checks);
          }

          checks.canActivateChecks.push(new CanActivate(futurePath)); // If we have a component, we need to go through an outlet.

          if (future.component) {
            getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks); // if we have a componentless route, we recurse but keep the same outlet map.
          } else {
            getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);
          }
        }

        return checks;
      }

      function shouldRunGuardsAndResolvers(curr, future, mode) {
        if (typeof mode === 'function') {
          return mode(curr, future);
        }

        switch (mode) {
          case 'pathParamsChange':
            return !equalPath(curr.url, future.url);

          case 'pathParamsOrQueryParamsChange':
            return !equalPath(curr.url, future.url) || !shallowEqual(curr.queryParams, future.queryParams);

          case 'always':
            return true;

          case 'paramsOrQueryParamsChange':
            return !equalParamsAndUrlSegments(curr, future) || !shallowEqual(curr.queryParams, future.queryParams);

          case 'paramsChange':
          default:
            return !equalParamsAndUrlSegments(curr, future);
        }
      }

      function deactivateRouteAndItsChildren(route, context, checks) {
        var children = nodeChildrenAsMap(route);
        var r = route.value;
        forEach(children, function (node, childName) {
          if (!r.component) {
            deactivateRouteAndItsChildren(node, context, checks);
          } else if (context) {
            deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);
          } else {
            deactivateRouteAndItsChildren(node, null, checks);
          }
        });

        if (!r.component) {
          checks.canDeactivateChecks.push(new CanDeactivate(null, r));
        } else if (context && context.outlet && context.outlet.isActivated) {
          checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));
        } else {
          checks.canDeactivateChecks.push(new CanDeactivate(null, r));
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function checkGuards(moduleInjector, forwardEvent) {
        return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (t) {
          var targetSnapshot = t.targetSnapshot,
              currentSnapshot = t.currentSnapshot,
              _t$guards = t.guards,
              canActivateChecks = _t$guards.canActivateChecks,
              canDeactivateChecks = _t$guards.canDeactivateChecks;

          if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(Object.assign(Object.assign({}, t), {
              guardsResult: true
            }));
          }

          return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, moduleInjector).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (canDeactivate) {
            return canDeactivate && isBoolean(canDeactivate) ? runCanActivateChecks(targetSnapshot, canActivateChecks, moduleInjector, forwardEvent) : Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canDeactivate);
          }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (guardsResult) {
            return Object.assign(Object.assign({}, t), {
              guardsResult: guardsResult
            });
          }));
        });
      }

      function runCanDeactivateChecks(checks, futureRSS, currRSS, moduleInjector) {
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(checks).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (check) {
          return runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector);
        }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])(function (result) {
          return result !== true;
        }, true));
      }

      function runCanActivateChecks(futureSnapshot, checks, moduleInjector, forwardEvent) {
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(checks).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])(function (check) {
          return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["concat"])(fireChildActivationStart(check.route.parent, forwardEvent), fireActivationStart(check.route, forwardEvent), runCanActivateChild(futureSnapshot, check.path, moduleInjector), runCanActivate(futureSnapshot, check.route, moduleInjector));
        }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])(function (result) {
          return result !== true;
        }, true));
      }
      /**
       * This should fire off `ActivationStart` events for each route being activated at this
       * level.
       * In other words, if you're activating `a` and `b` below, `path` will contain the
       * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always
       * return
       * `true` so checks continue to run.
       */


      function fireActivationStart(snapshot, forwardEvent) {
        if (snapshot !== null && forwardEvent) {
          forwardEvent(new ActivationStart(snapshot));
        }

        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true);
      }
      /**
       * This should fire off `ChildActivationStart` events for each route being activated at this
       * level.
       * In other words, if you're activating `a` and `b` below, `path` will contain the
       * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always
       * return
       * `true` so checks continue to run.
       */


      function fireChildActivationStart(snapshot, forwardEvent) {
        if (snapshot !== null && forwardEvent) {
          forwardEvent(new ChildActivationStart(snapshot));
        }

        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true);
      }

      function runCanActivate(futureRSS, futureARS, moduleInjector) {
        var canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;
        if (!canActivate || canActivate.length === 0) return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true);
        var canActivateObservables = canActivate.map(function (c) {
          return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["defer"])(function () {
            var guard = getToken(c, futureARS, moduleInjector);
            var observable;

            if (isCanActivate(guard)) {
              observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));
            } else if (isFunction(guard)) {
              observable = wrapIntoObservable(guard(futureARS, futureRSS));
            } else {
              throw new Error('Invalid CanActivate guard');
            }

            return observable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])());
          });
        });
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canActivateObservables).pipe(prioritizedGuardValue());
      }

      function runCanActivateChild(futureRSS, path, moduleInjector) {
        var futureARS = path[path.length - 1];
        var canActivateChildGuards = path.slice(0, path.length - 1).reverse().map(function (p) {
          return getCanActivateChild(p);
        }).filter(function (_) {
          return _ !== null;
        });
        var canActivateChildGuardsMapped = canActivateChildGuards.map(function (d) {
          return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["defer"])(function () {
            var guardsMapped = d.guards.map(function (c) {
              var guard = getToken(c, d.node, moduleInjector);
              var observable;

              if (isCanActivateChild(guard)) {
                observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));
              } else if (isFunction(guard)) {
                observable = wrapIntoObservable(guard(futureARS, futureRSS));
              } else {
                throw new Error('Invalid CanActivateChild guard');
              }

              return observable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])());
            });
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(guardsMapped).pipe(prioritizedGuardValue());
          });
        });
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());
      }

      function runCanDeactivate(component, currARS, currRSS, futureRSS, moduleInjector) {
        var canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;
        if (!canDeactivate || canDeactivate.length === 0) return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true);
        var canDeactivateObservables = canDeactivate.map(function (c) {
          var guard = getToken(c, currARS, moduleInjector);
          var observable;

          if (isCanDeactivate(guard)) {
            observable = wrapIntoObservable(guard.canDeactivate(component, currARS, currRSS, futureRSS));
          } else if (isFunction(guard)) {
            observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));
          } else {
            throw new Error('Invalid CanDeactivate guard');
          }

          return observable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])());
        });
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canDeactivateObservables).pipe(prioritizedGuardValue());
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var NoMatch$1 = function NoMatch$1() {
        _classCallCheck(this, NoMatch$1);
      };

      function newObservableError(e) {
        // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead.
        return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"](function (obs) {
          return obs.error(e);
        });
      }

      function recognize(rootComponentType, config, urlTree, url) {
        var paramsInheritanceStrategy = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'emptyOnly';
        var relativeLinkResolution = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'legacy';

        try {
          var result = new Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution).recognize();

          if (result === null) {
            return newObservableError(new NoMatch$1());
          } else {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(result);
          }
        } catch (e) {
          // Catch the potential error from recognize due to duplicate outlet matches and return as an
          // `Observable` error instead.
          return newObservableError(e);
        }
      }

      var Recognizer = /*#__PURE__*/function () {
        function Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) {
          _classCallCheck(this, Recognizer);

          this.rootComponentType = rootComponentType;
          this.config = config;
          this.urlTree = urlTree;
          this.url = url;
          this.paramsInheritanceStrategy = paramsInheritanceStrategy;
          this.relativeLinkResolution = relativeLinkResolution;
        }

        _createClass2(Recognizer, [{
          key: "recognize",
          value: function recognize() {
            var rootSegmentGroup = split(this.urlTree.root, [], [], this.config.filter(function (c) {
              return c.redirectTo === undefined;
            }), this.relativeLinkResolution).segmentGroup;
            var children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);

            if (children === null) {
              return null;
            } // Use Object.freeze to prevent readers of the Router state from modifying it outside of a
            // navigation, resulting in the router being out of sync with the browser.


            var root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});
            var rootNode = new TreeNode(root, children);
            var routeState = new RouterStateSnapshot(this.url, rootNode);
            this.inheritParamsAndData(routeState._root);
            return routeState;
          }
        }, {
          key: "inheritParamsAndData",
          value: function inheritParamsAndData(routeNode) {
            var _this600 = this;

            var route = routeNode.value;
            var i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);
            route.params = Object.freeze(i.params);
            route.data = Object.freeze(i.data);
            routeNode.children.forEach(function (n) {
              return _this600.inheritParamsAndData(n);
            });
          }
        }, {
          key: "processSegmentGroup",
          value: function processSegmentGroup(config, segmentGroup, outlet) {
            if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {
              return this.processChildren(config, segmentGroup);
            }

            return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);
          }
          /**
           * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if
           * we cannot find a match for _any_ of the children.
           *
           * @param config - The `Routes` to match against
           * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the
           *     config.
           */

        }, {
          key: "processChildren",
          value: function processChildren(config, segmentGroup) {
            var children = [];

            for (var _i48 = 0, _Object$keys10 = Object.keys(segmentGroup.children); _i48 < _Object$keys10.length; _i48++) {
              var childOutlet = _Object$keys10[_i48];
              var child = segmentGroup.children[childOutlet]; // Sort the config so that routes with outlets that match the one being activated appear
              // first, followed by routes for other outlets, which might match if they have an empty path.

              var sortedConfig = sortByMatchingOutlets(config, childOutlet);
              var outletChildren = this.processSegmentGroup(sortedConfig, child, childOutlet);

              if (outletChildren === null) {
                // Configs must match all segment children so because we did not find a match for this
                // outlet, return `null`.
                return null;
              }

              children.push.apply(children, _toConsumableArray(outletChildren));
            } // Because we may have matched two outlets to the same empty path segment, we can have multiple
            // activated results for the same outlet. We should merge the children of these results so the
            // final return value is only one `TreeNode` per outlet.


            var mergedChildren = mergeEmptyPathMatches(children);

            if (typeof ngDevMode === 'undefined' || ngDevMode) {
              // This should really never happen - we are only taking the first match for each outlet and
              // merge the empty path matches.
              checkOutletNameUniqueness(mergedChildren);
            }

            sortActivatedRouteSnapshots(mergedChildren);
            return mergedChildren;
          }
        }, {
          key: "processSegment",
          value: function processSegment(config, segmentGroup, segments, outlet) {
            var _iterator75 = _createForOfIteratorHelper(config),
                _step74;

            try {
              for (_iterator75.s(); !(_step74 = _iterator75.n()).done;) {
                var r = _step74.value;
                var children = this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);

                if (children !== null) {
                  return children;
                }
              }
            } catch (err) {
              _iterator75.e(err);
            } finally {
              _iterator75.f();
            }

            if (noLeftoversInUrl(segmentGroup, segments, outlet)) {
              return [];
            }

            return null;
          }
        }, {
          key: "processSegmentAgainstRoute",
          value: function processSegmentAgainstRoute(route, rawSegment, segments, outlet) {
            if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet)) return null;
            var snapshot;
            var consumedSegments = [];
            var rawSlicedSegments = [];

            if (route.path === '**') {
              var params = segments.length > 0 ? last(segments).parameters : {};
              snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), getOutlet(route), route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length, getResolve(route));
            } else {
              var result = match(rawSegment, route, segments);

              if (!result.matched) {
                return null;
              }

              consumedSegments = result.consumedSegments;
              rawSlicedSegments = segments.slice(result.lastChild);
              snapshot = new ActivatedRouteSnapshot(consumedSegments, result.parameters, Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), getOutlet(route), route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));
            }

            var childConfig = getChildConfig(route);

            var _split3 = split(rawSegment, consumedSegments, rawSlicedSegments, // Filter out routes with redirectTo because we are trying to create activated route
            // snapshots and don't handle redirects here. That should have been done in
            // `applyRedirects`.
            childConfig.filter(function (c) {
              return c.redirectTo === undefined;
            }), this.relativeLinkResolution),
                segmentGroup = _split3.segmentGroup,
                slicedSegments = _split3.slicedSegments;

            if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {
              var _children3 = this.processChildren(childConfig, segmentGroup);

              if (_children3 === null) {
                return null;
              }

              return [new TreeNode(snapshot, _children3)];
            }

            if (childConfig.length === 0 && slicedSegments.length === 0) {
              return [new TreeNode(snapshot, [])];
            }

            var matchedOnOutlet = getOutlet(route) === outlet; // If we matched a config due to empty path match on a different outlet, we need to continue
            // passing the current outlet for the segment rather than switch to PRIMARY.
            // Note that we switch to primary when we have a match because outlet configs look like this:
            // {path: 'a', outlet: 'a', children: [
            //  {path: 'b', component: B},
            //  {path: 'c', component: C},
            // ]}
            // Notice that the children of the named outlet are configured with the primary outlet

            var children = this.processSegment(childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet);

            if (children === null) {
              return null;
            }

            return [new TreeNode(snapshot, children)];
          }
        }]);

        return Recognizer;
      }();

      function sortActivatedRouteSnapshots(nodes) {
        nodes.sort(function (a, b) {
          if (a.value.outlet === PRIMARY_OUTLET) return -1;
          if (b.value.outlet === PRIMARY_OUTLET) return 1;
          return a.value.outlet.localeCompare(b.value.outlet);
        });
      }

      function getChildConfig(route) {
        if (route.children) {
          return route.children;
        }

        if (route.loadChildren) {
          return route._loadedConfig.routes;
        }

        return [];
      }

      function hasEmptyPathConfig(node) {
        var config = node.value.routeConfig;
        return config && config.path === '' && config.redirectTo === undefined;
      }
      /**
       * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with the
       * children from each duplicate. This is necessary because different outlets can match a single
       * empty path route config and the results need to then be merged.
       */


      function mergeEmptyPathMatches(nodes) {
        var result = [];

        var _iterator76 = _createForOfIteratorHelper(nodes),
            _step75;

        try {
          var _loop8 = function _loop8() {
            var node = _step75.value;

            if (!hasEmptyPathConfig(node)) {
              result.push(node);
              return "continue";
            }

            var duplicateEmptyPathNode = result.find(function (resultNode) {
              return node.value.routeConfig === resultNode.value.routeConfig;
            });

            if (duplicateEmptyPathNode !== undefined) {
              var _duplicateEmptyPathNo;

              (_duplicateEmptyPathNo = duplicateEmptyPathNode.children).push.apply(_duplicateEmptyPathNo, _toConsumableArray(node.children));
            } else {
              result.push(node);
            }
          };

          for (_iterator76.s(); !(_step75 = _iterator76.n()).done;) {
            var _ret2 = _loop8();

            if (_ret2 === "continue") continue;
          }
        } catch (err) {
          _iterator76.e(err);
        } finally {
          _iterator76.f();
        }

        return result;
      }

      function checkOutletNameUniqueness(nodes) {
        var names = {};
        nodes.forEach(function (n) {
          var routeWithSameOutletName = names[n.value.outlet];

          if (routeWithSameOutletName) {
            var p = routeWithSameOutletName.url.map(function (s) {
              return s.toString();
            }).join('/');
            var c = n.value.url.map(function (s) {
              return s.toString();
            }).join('/');
            throw new Error("Two segments cannot have the same outlet name: '".concat(p, "' and '").concat(c, "'."));
          }

          names[n.value.outlet] = n.value;
        });
      }

      function getSourceSegmentGroup(segmentGroup) {
        var s = segmentGroup;

        while (s._sourceSegment) {
          s = s._sourceSegment;
        }

        return s;
      }

      function getPathIndexShift(segmentGroup) {
        var s = segmentGroup;
        var res = s._segmentIndexShift ? s._segmentIndexShift : 0;

        while (s._sourceSegment) {
          s = s._sourceSegment;
          res += s._segmentIndexShift ? s._segmentIndexShift : 0;
        }

        return res - 1;
      }

      function getData(route) {
        return route.data || {};
      }

      function getResolve(route) {
        return route.resolve || {};
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function recognize$1(rootComponentType, config, serializer, paramsInheritanceStrategy, relativeLinkResolution) {
        return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (t) {
          return recognize(rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects), paramsInheritanceStrategy, relativeLinkResolution).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (targetSnapshot) {
            return Object.assign(Object.assign({}, t), {
              targetSnapshot: targetSnapshot
            });
          }));
        });
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function resolveData(paramsInheritanceStrategy, moduleInjector) {
        return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (t) {
          var targetSnapshot = t.targetSnapshot,
              canActivateChecks = t.guards.canActivateChecks;

          if (!canActivateChecks.length) {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t);
          }

          var canActivateChecksResolved = 0;
          return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(canActivateChecks).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])(function (check) {
            return runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, moduleInjector);
          }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function () {
            return canActivateChecksResolved++;
          }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["takeLast"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (_) {
            return canActivateChecksResolved === canActivateChecks.length ? Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t) : rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
          }));
        });
      }

      function runResolve(futureARS, futureRSS, paramsInheritanceStrategy, moduleInjector) {
        var resolve = futureARS._resolve;
        return resolveNode(resolve, futureARS, futureRSS, moduleInjector).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (resolvedData) {
          futureARS._resolvedData = resolvedData;
          futureARS.data = Object.assign(Object.assign({}, futureARS.data), inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve);
          return null;
        }));
      }

      function resolveNode(resolve, futureARS, futureRSS, moduleInjector) {
        var keys = Object.keys(resolve);

        if (keys.length === 0) {
          return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])({});
        }

        var data = {};
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(keys).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (key) {
          return getResolver(resolve[key], futureARS, futureRSS, moduleInjector).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (value) {
            data[key] = value;
          }));
        }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["takeLast"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function () {
          // Ensure all resolvers returned values, otherwise don't emit any "next" and just complete
          // the chain which will cancel navigation
          if (Object.keys(data).length === keys.length) {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(data);
          }

          return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
        }));
      }

      function getResolver(injectionToken, futureARS, futureRSS, moduleInjector) {
        var resolver = getToken(injectionToken, futureARS, moduleInjector);
        return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) : wrapIntoObservable(resolver(futureARS, futureRSS));
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Perform a side effect through a switchMap for every emission on the source Observable,
       * but return an Observable that is identical to the source. It's essentially the same as
       * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,
       * it will wait before continuing with the original value.
       */


      function switchTap(next) {
        return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (v) {
          var nextResult = next(v);

          if (nextResult) {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(nextResult).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function () {
              return v;
            }));
          }

          return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(v);
        });
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description
       *
       * Provides a way to customize when activated routes get reused.
       *
       * @publicApi
       */


      var RouteReuseStrategy = function RouteReuseStrategy() {
        _classCallCheck(this, RouteReuseStrategy);
      };
      /**
       * @description
       *
       * This base route reuse strategy only reuses routes when the matched router configs are
       * identical. This prevents components from being destroyed and recreated
       * when just the fragment or query parameters change
       * (that is, the existing component is _reused_).
       *
       * This strategy does not store any routes for later reuse.
       *
       * Angular uses this strategy by default.
       *
       *
       * It can be used as a base class for custom route reuse strategies, i.e. you can create your own
       * class that extends the `BaseRouteReuseStrategy` one.
       * @publicApi
       */


      var BaseRouteReuseStrategy = /*#__PURE__*/function () {
        function BaseRouteReuseStrategy() {
          _classCallCheck(this, BaseRouteReuseStrategy);
        }

        _createClass2(BaseRouteReuseStrategy, [{
          key: "shouldDetach",
          value:
          /**
           * Whether the given route should detach for later reuse.
           * Always returns false for `BaseRouteReuseStrategy`.
           * */
          function shouldDetach(route) {
            return false;
          }
          /**
           * A no-op; the route is never stored since this strategy never detaches routes for later re-use.
           */

        }, {
          key: "store",
          value: function store(route, detachedTree) {}
          /** Returns `false`, meaning the route (and its subtree) is never reattached */

        }, {
          key: "shouldAttach",
          value: function shouldAttach(route) {
            return false;
          }
          /** Returns `null` because this strategy does not store routes for later re-use. */

        }, {
          key: "retrieve",
          value: function retrieve(route) {
            return null;
          }
          /**
           * Determines if a route should be reused.
           * This strategy returns `true` when the future route config and current route config are
           * identical.
           */

        }, {
          key: "shouldReuseRoute",
          value: function shouldReuseRoute(future, curr) {
            return future.routeConfig === curr.routeConfig;
          }
        }]);

        return BaseRouteReuseStrategy;
      }();

      var DefaultRouteReuseStrategy = /*#__PURE__*/function (_BaseRouteReuseStrate) {
        _inherits(DefaultRouteReuseStrategy, _BaseRouteReuseStrate);

        var _super290 = _createSuper(DefaultRouteReuseStrategy);

        function DefaultRouteReuseStrategy() {
          _classCallCheck(this, DefaultRouteReuseStrategy);

          return _super290.apply(this, arguments);
        }

        return DefaultRouteReuseStrategy;
      }(BaseRouteReuseStrategy);
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * The [DI token](guide/glossary/#di-token) for a router configuration.
       * @see `ROUTES`
       * @publicApi
       */


      var ROUTES = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ROUTES');

      var RouterConfigLoader = /*#__PURE__*/function () {
        function RouterConfigLoader(loader, compiler, onLoadStartListener, onLoadEndListener) {
          _classCallCheck(this, RouterConfigLoader);

          this.loader = loader;
          this.compiler = compiler;
          this.onLoadStartListener = onLoadStartListener;
          this.onLoadEndListener = onLoadEndListener;
        }

        _createClass2(RouterConfigLoader, [{
          key: "load",
          value: function load(parentInjector, route) {
            var _this601 = this;

            if (this.onLoadStartListener) {
              this.onLoadStartListener(route);
            }

            var moduleFactory$ = this.loadModuleFactory(route.loadChildren);
            return moduleFactory$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (factory) {
              if (_this601.onLoadEndListener) {
                _this601.onLoadEndListener(route);
              }

              var module = factory.create(parentInjector);
              return new LoadedRouterConfig(flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);
            }));
          }
        }, {
          key: "loadModuleFactory",
          value: function loadModuleFactory(loadChildren) {
            var _this602 = this;

            if (typeof loadChildren === 'string') {
              return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(this.loader.load(loadChildren));
            } else {
              return wrapIntoObservable(loadChildren()).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (t) {
                if (t instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactory"]) {
                  return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t);
                } else {
                  return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(_this602.compiler.compileModuleAsync(t));
                }
              }));
            }
          }
        }]);

        return RouterConfigLoader;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Store contextual information about a `RouterOutlet`
       *
       * @publicApi
       */


      var OutletContext = function OutletContext() {
        _classCallCheck(this, OutletContext);

        this.outlet = null;
        this.route = null;
        this.resolver = null;
        this.children = new ChildrenOutletContexts();
        this.attachRef = null;
      };
      /**
       * Store contextual information about the children (= nested) `RouterOutlet`
       *
       * @publicApi
       */


      var ChildrenOutletContexts = /*#__PURE__*/function () {
        function ChildrenOutletContexts() {
          _classCallCheck(this, ChildrenOutletContexts);

          // contexts for child outlets, by name.
          this.contexts = new Map();
        }
        /** Called when a `RouterOutlet` directive is instantiated */


        _createClass2(ChildrenOutletContexts, [{
          key: "onChildOutletCreated",
          value: function onChildOutletCreated(childName, outlet) {
            var context = this.getOrCreateContext(childName);
            context.outlet = outlet;
            this.contexts.set(childName, context);
          }
          /**
           * Called when a `RouterOutlet` directive is destroyed.
           * We need to keep the context as the outlet could be destroyed inside a NgIf and might be
           * re-created later.
           */

        }, {
          key: "onChildOutletDestroyed",
          value: function onChildOutletDestroyed(childName) {
            var context = this.getContext(childName);

            if (context) {
              context.outlet = null;
            }
          }
          /**
           * Called when the corresponding route is deactivated during navigation.
           * Because the component get destroyed, all children outlet are destroyed.
           */

        }, {
          key: "onOutletDeactivated",
          value: function onOutletDeactivated() {
            var contexts = this.contexts;
            this.contexts = new Map();
            return contexts;
          }
        }, {
          key: "onOutletReAttached",
          value: function onOutletReAttached(contexts) {
            this.contexts = contexts;
          }
        }, {
          key: "getOrCreateContext",
          value: function getOrCreateContext(childName) {
            var context = this.getContext(childName);

            if (!context) {
              context = new OutletContext();
              this.contexts.set(childName, context);
            }

            return context;
          }
        }, {
          key: "getContext",
          value: function getContext(childName) {
            return this.contexts.get(childName) || null;
          }
        }]);

        return ChildrenOutletContexts;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description
       *
       * Provides a way to migrate AngularJS applications to Angular.
       *
       * @publicApi
       */


      var UrlHandlingStrategy = function UrlHandlingStrategy() {
        _classCallCheck(this, UrlHandlingStrategy);
      };
      /**
       * @publicApi
       */


      var DefaultUrlHandlingStrategy = /*#__PURE__*/function () {
        function DefaultUrlHandlingStrategy() {
          _classCallCheck(this, DefaultUrlHandlingStrategy);
        }

        _createClass2(DefaultUrlHandlingStrategy, [{
          key: "shouldProcessUrl",
          value: function shouldProcessUrl(url) {
            return true;
          }
        }, {
          key: "extract",
          value: function extract(url) {
            return url;
          }
        }, {
          key: "merge",
          value: function merge(newUrlPart, wholeUrl) {
            return newUrlPart;
          }
        }]);

        return DefaultUrlHandlingStrategy;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      function defaultErrorHandler(error) {
        throw error;
      }

      function defaultMalformedUriErrorHandler(error, urlSerializer, url) {
        return urlSerializer.parse('/');
      }
      /**
       * @internal
       */


      function defaultRouterHook(snapshot, runExtras) {
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null);
      }
      /**
       * @description
       *
       * A service that provides navigation among views and URL manipulation capabilities.
       *
       * @see `Route`.
       * @see [Routing and Navigation Guide](guide/router).
       *
       * @ngModule RouterModule
       *
       * @publicApi
       */


      var Router = /*#__PURE__*/function () {
        /**
         * Creates the router service.
         */
        // TODO: vsavkin make internal after the final is out.
        function Router(rootComponentType, urlSerializer, rootContexts, location, injector, loader, compiler, config) {
          var _this603 = this;

          _classCallCheck(this, Router);

          this.rootComponentType = rootComponentType;
          this.urlSerializer = urlSerializer;
          this.rootContexts = rootContexts;
          this.location = location;
          this.config = config;
          this.lastSuccessfulNavigation = null;
          this.currentNavigation = null;
          /**
           * Tracks the previously seen location change from the location subscription so we can compare
           * the two latest to see if they are duplicates. See setUpLocationChangeListener.
           */

          this.lastLocationChangeInfo = null;
          this.navigationId = 0;
          this.isNgZoneEnabled = false;
          /**
           * An event stream for routing events in this NgModule.
           */

          this.events = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
          /**
           * A handler for navigation errors in this NgModule.
           */

          this.errorHandler = defaultErrorHandler;
          /**
           * A handler for errors thrown by `Router.parseUrl(url)`
           * when `url` contains an invalid character.
           * The most common case is a `%` sign
           * that's not encoded and is not part of a percent encoded sequence.
           */

          this.malformedUriErrorHandler = defaultMalformedUriErrorHandler;
          /**
           * True if at least one navigation event has occurred,
           * false otherwise.
           */

          this.navigated = false;
          this.lastSuccessfulId = -1;
          /**
           * Hooks that enable you to pause navigation,
           * either before or after the preactivation phase.
           * Used by `RouterModule`.
           *
           * @internal
           */

          this.hooks = {
            beforePreactivation: defaultRouterHook,
            afterPreactivation: defaultRouterHook
          };
          /**
           * A strategy for extracting and merging URLs.
           * Used for AngularJS to Angular migrations.
           */

          this.urlHandlingStrategy = new DefaultUrlHandlingStrategy();
          /**
           * A strategy for re-using routes.
           */

          this.routeReuseStrategy = new DefaultRouteReuseStrategy();
          /**
           * How to handle a navigation request to the current URL. One of:
           * - `'ignore'` :  The router ignores the request.
           * - `'reload'` : The router reloads the URL. Use to implement a "refresh" feature.
           */

          this.onSameUrlNavigation = 'ignore';
          /**
           * How to merge parameters, data, and resolved data from parent to child
           * routes. One of:
           *
           * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data
           * for path-less or component-less routes.
           * - `'always'` : Inherit parent parameters, data, and resolved data
           * for all child routes.
           */

          this.paramsInheritanceStrategy = 'emptyOnly';
          /**
           * Determines when the router updates the browser URL.
           * By default (`"deferred"`), updates the browser URL after navigation has finished.
           * Set to `'eager'` to update the browser URL at the beginning of navigation.
           * You can choose to update early so that, if navigation fails,
           * you can show an error message with the URL that failed.
           */

          this.urlUpdateStrategy = 'deferred';
          /**
           * Enables a bug fix that corrects relative link resolution in components with empty paths.
           * @see `RouterModule`
           */

          this.relativeLinkResolution = 'corrected';

          var onLoadStart = function onLoadStart(r) {
            return _this603.triggerEvent(new RouteConfigLoadStart(r));
          };

          var onLoadEnd = function onLoadEnd(r) {
            return _this603.triggerEvent(new RouteConfigLoadEnd(r));
          };

          this.ngModule = injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]);
          this.console = injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]);
          var ngZone = injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]);
          this.isNgZoneEnabled = ngZone instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"] && _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"].isInAngularZone();
          this.resetConfig(config);
          this.currentUrlTree = createEmptyUrlTree();
          this.rawUrlTree = this.currentUrlTree;
          this.browserUrlTree = this.currentUrlTree;
          this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);
          this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);
          this.transitions = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({
            id: 0,
            currentUrlTree: this.currentUrlTree,
            currentRawUrl: this.currentUrlTree,
            extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),
            urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),
            rawUrl: this.currentUrlTree,
            extras: {},
            resolve: null,
            reject: null,
            promise: Promise.resolve(true),
            source: 'imperative',
            restoredState: null,
            currentSnapshot: this.routerState.snapshot,
            targetSnapshot: null,
            currentRouterState: this.routerState,
            targetRouterState: null,
            guards: {
              canActivateChecks: [],
              canDeactivateChecks: []
            },
            guardsResult: null
          });
          this.navigations = this.setupNavigations(this.transitions);
          this.processNavigations();
        }

        _createClass2(Router, [{
          key: "setupNavigations",
          value: function setupNavigations(transitions) {
            var _this604 = this;

            var eventsSubject = this.events;
            return transitions.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])(function (t) {
              return t.id !== 0;
            }), // Extract URL
            Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (t) {
              return Object.assign(Object.assign({}, t), {
                extractedUrl: _this604.urlHandlingStrategy.extract(t.rawUrl)
              });
            }), // Using switchMap so we cancel executing navigations when a new one comes in
            Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (t) {
              var completed = false;
              var errored = false;
              return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe( // Store the Navigation object
              Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) {
                _this604.currentNavigation = {
                  id: t.id,
                  initialUrl: t.currentRawUrl,
                  extractedUrl: t.extractedUrl,
                  trigger: t.source,
                  extras: t.extras,
                  previousNavigation: _this604.lastSuccessfulNavigation ? Object.assign(Object.assign({}, _this604.lastSuccessfulNavigation), {
                    previousNavigation: null
                  }) : null
                };
              }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (t) {
                var urlTransition = !_this604.navigated || t.extractedUrl.toString() !== _this604.browserUrlTree.toString();

                var processCurrentUrl = (_this604.onSameUrlNavigation === 'reload' ? true : urlTransition) && _this604.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);

                if (processCurrentUrl) {
                  return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe( // Fire NavigationStart event
                  Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (t) {
                    var transition = _this604.transitions.getValue();

                    eventsSubject.next(new NavigationStart(t.id, _this604.serializeUrl(t.extractedUrl), t.source, t.restoredState));

                    if (transition !== _this604.transitions.getValue()) {
                      return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
                    } // This delay is required to match old behavior that forced
                    // navigation to always be async


                    return Promise.resolve(t);
                  }), // ApplyRedirects
                  applyRedirects$1(_this604.ngModule.injector, _this604.configLoader, _this604.urlSerializer, _this604.config), // Update the currentNavigation
                  Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) {
                    _this604.currentNavigation = Object.assign(Object.assign({}, _this604.currentNavigation), {
                      finalUrl: t.urlAfterRedirects
                    });
                  }), // Recognize
                  recognize$1(_this604.rootComponentType, _this604.config, function (url) {
                    return _this604.serializeUrl(url);
                  }, _this604.paramsInheritanceStrategy, _this604.relativeLinkResolution), // Update URL if in `eager` update mode
                  Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) {
                    if (_this604.urlUpdateStrategy === 'eager') {
                      if (!t.extras.skipLocationChange) {
                        _this604.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id, t.extras.state);
                      }

                      _this604.browserUrlTree = t.urlAfterRedirects;
                    } // Fire RoutesRecognized


                    var routesRecognized = new RoutesRecognized(t.id, _this604.serializeUrl(t.extractedUrl), _this604.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
                    eventsSubject.next(routesRecognized);
                  }));
                } else {
                  var processPreviousUrl = urlTransition && _this604.rawUrlTree && _this604.urlHandlingStrategy.shouldProcessUrl(_this604.rawUrlTree);
                  /* When the current URL shouldn't be processed, but the previous one was,
                   * we handle this "error condition" by navigating to the previously
                   * successful URL, but leaving the URL intact.*/


                  if (processPreviousUrl) {
                    var id = t.id,
                        extractedUrl = t.extractedUrl,
                        source = t.source,
                        restoredState = t.restoredState,
                        extras = t.extras;
                    var navStart = new NavigationStart(id, _this604.serializeUrl(extractedUrl), source, restoredState);
                    eventsSubject.next(navStart);
                    var targetSnapshot = createEmptyState(extractedUrl, _this604.rootComponentType).snapshot;
                    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(Object.assign(Object.assign({}, t), {
                      targetSnapshot: targetSnapshot,
                      urlAfterRedirects: extractedUrl,
                      extras: Object.assign(Object.assign({}, extras), {
                        skipLocationChange: false,
                        replaceUrl: false
                      })
                    }));
                  } else {
                    /* When neither the current or previous URL can be processed, do nothing
                     * other than update router's internal reference to the current "settled"
                     * URL. This way the next navigation will be coming from the current URL
                     * in the browser.
                     */
                    _this604.rawUrlTree = t.rawUrl;
                    _this604.browserUrlTree = t.urlAfterRedirects;
                    t.resolve(null);
                    return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
                  }
                }
              }), // Before Preactivation
              switchTap(function (t) {
                var targetSnapshot = t.targetSnapshot,
                    navigationId = t.id,
                    appliedUrlTree = t.extractedUrl,
                    rawUrlTree = t.rawUrl,
                    _t$extras = t.extras,
                    skipLocationChange = _t$extras.skipLocationChange,
                    replaceUrl = _t$extras.replaceUrl;
                return _this604.hooks.beforePreactivation(targetSnapshot, {
                  navigationId: navigationId,
                  appliedUrlTree: appliedUrlTree,
                  rawUrlTree: rawUrlTree,
                  skipLocationChange: !!skipLocationChange,
                  replaceUrl: !!replaceUrl
                });
              }), // --- GUARDS ---
              Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) {
                var guardsStart = new GuardsCheckStart(t.id, _this604.serializeUrl(t.extractedUrl), _this604.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);

                _this604.triggerEvent(guardsStart);
              }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (t) {
                return Object.assign(Object.assign({}, t), {
                  guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, _this604.rootContexts)
                });
              }), checkGuards(_this604.ngModule.injector, function (evt) {
                return _this604.triggerEvent(evt);
              }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) {
                if (isUrlTree(t.guardsResult)) {
                  var error = navigationCancelingError("Redirecting to \"".concat(_this604.serializeUrl(t.guardsResult), "\""));
                  error.url = t.guardsResult;
                  throw error;
                }

                var guardsEnd = new GuardsCheckEnd(t.id, _this604.serializeUrl(t.extractedUrl), _this604.serializeUrl(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);

                _this604.triggerEvent(guardsEnd);
              }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])(function (t) {
                if (!t.guardsResult) {
                  _this604.resetUrlToCurrentUrlTree();

                  var navCancel = new NavigationCancel(t.id, _this604.serializeUrl(t.extractedUrl), '');
                  eventsSubject.next(navCancel);
                  t.resolve(false);
                  return false;
                }

                return true;
              }), // --- RESOLVE ---
              switchTap(function (t) {
                if (t.guards.canActivateChecks.length) {
                  return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) {
                    var resolveStart = new ResolveStart(t.id, _this604.serializeUrl(t.extractedUrl), _this604.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);

                    _this604.triggerEvent(resolveStart);
                  }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(function (t) {
                    var dataResolved = false;
                    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe(resolveData(_this604.paramsInheritanceStrategy, _this604.ngModule.injector), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])({
                      next: function next() {
                        return dataResolved = true;
                      },
                      complete: function complete() {
                        if (!dataResolved) {
                          var navCancel = new NavigationCancel(t.id, _this604.serializeUrl(t.extractedUrl), "At least one route resolver didn't emit any value.");
                          eventsSubject.next(navCancel);
                          t.resolve(false);
                        }
                      }
                    }));
                  }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) {
                    var resolveEnd = new ResolveEnd(t.id, _this604.serializeUrl(t.extractedUrl), _this604.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);

                    _this604.triggerEvent(resolveEnd);
                  }));
                }

                return undefined;
              }), // --- AFTER PREACTIVATION ---
              switchTap(function (t) {
                var targetSnapshot = t.targetSnapshot,
                    navigationId = t.id,
                    appliedUrlTree = t.extractedUrl,
                    rawUrlTree = t.rawUrl,
                    _t$extras2 = t.extras,
                    skipLocationChange = _t$extras2.skipLocationChange,
                    replaceUrl = _t$extras2.replaceUrl;
                return _this604.hooks.afterPreactivation(targetSnapshot, {
                  navigationId: navigationId,
                  appliedUrlTree: appliedUrlTree,
                  rawUrlTree: rawUrlTree,
                  skipLocationChange: !!skipLocationChange,
                  replaceUrl: !!replaceUrl
                });
              }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (t) {
                var targetRouterState = createRouterState(_this604.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);
                return Object.assign(Object.assign({}, t), {
                  targetRouterState: targetRouterState
                });
              }),
              /* Once here, we are about to activate syncronously. The assumption is this
                 will succeed, and user code may read from the Router service. Therefore
                 before activation, we need to update router properties storing the current
                 URL and the RouterState, as well as updated the browser URL. All this should
                 happen *before* activating. */
              Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (t) {
                _this604.currentUrlTree = t.urlAfterRedirects;
                _this604.rawUrlTree = _this604.urlHandlingStrategy.merge(_this604.currentUrlTree, t.rawUrl);
                _this604.routerState = t.targetRouterState;

                if (_this604.urlUpdateStrategy === 'deferred') {
                  if (!t.extras.skipLocationChange) {
                    _this604.setBrowserUrl(_this604.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);
                  }

                  _this604.browserUrlTree = t.urlAfterRedirects;
                }
              }), activateRoutes(_this604.rootContexts, _this604.routeReuseStrategy, function (evt) {
                return _this604.triggerEvent(evt);
              }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])({
                next: function next() {
                  completed = true;
                },
                complete: function complete() {
                  completed = true;
                }
              }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["finalize"])(function () {
                /* When the navigation stream finishes either through error or success, we
                 * set the `completed` or `errored` flag. However, there are some situations
                 * where we could get here without either of those being set. For instance, a
                 * redirect during NavigationStart. Therefore, this is a catch-all to make
                 * sure the NavigationCancel
                 * event is fired when a navigation gets cancelled but not caught by other
                 * means. */
                if (!completed && !errored) {
                  // Must reset to current URL tree here to ensure history.state is set. On a
                  // fresh page load, if a new navigation comes in before a successful
                  // navigation completes, there will be nothing in
                  // history.state.navigationId. This can cause sync problems with AngularJS
                  // sync code which looks for a value here in order to determine whether or
                  // not to handle a given popstate event or to leave it to the Angular
                  // router.
                  _this604.resetUrlToCurrentUrlTree();

                  var navCancel = new NavigationCancel(t.id, _this604.serializeUrl(t.extractedUrl), "Navigation ID ".concat(t.id, " is not equal to the current navigation id ").concat(_this604.navigationId));
                  eventsSubject.next(navCancel);
                  t.resolve(false);
                } // currentNavigation should always be reset to null here. If navigation was
                // successful, lastSuccessfulTransition will have already been set. Therefore
                // we can safely set currentNavigation to null here.


                _this604.currentNavigation = null;
              }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(function (e) {
                errored = true;
                /* This error type is issued during Redirect, and is handled as a
                 * cancellation rather than an error. */

                if (isNavigationCancelingError(e)) {
                  var redirecting = isUrlTree(e.url);

                  if (!redirecting) {
                    // Set property only if we're not redirecting. If we landed on a page and
                    // redirect to `/` route, the new navigation is going to see the `/`
                    // isn't a change from the default currentUrlTree and won't navigate.
                    // This is only applicable with initial navigation, so setting
                    // `navigated` only when not redirecting resolves this scenario.
                    _this604.navigated = true;

                    _this604.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);
                  }

                  var navCancel = new NavigationCancel(t.id, _this604.serializeUrl(t.extractedUrl), e.message);
                  eventsSubject.next(navCancel); // When redirecting, we need to delay resolving the navigation
                  // promise and push it to the redirect navigation

                  if (!redirecting) {
                    t.resolve(false);
                  } else {
                    // setTimeout is required so this navigation finishes with
                    // the return EMPTY below. If it isn't allowed to finish
                    // processing, there can be multiple navigations to the same
                    // URL.
                    setTimeout(function () {
                      var mergedTree = _this604.urlHandlingStrategy.merge(e.url, _this604.rawUrlTree);

                      var extras = {
                        skipLocationChange: t.extras.skipLocationChange,
                        replaceUrl: _this604.urlUpdateStrategy === 'eager'
                      };

                      _this604.scheduleNavigation(mergedTree, 'imperative', null, extras, {
                        resolve: t.resolve,
                        reject: t.reject,
                        promise: t.promise
                      });
                    }, 0);
                  }
                  /* All other errors should reset to the router's internal URL reference to
                   * the pre-error state. */

                } else {
                  _this604.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);

                  var navError = new NavigationError(t.id, _this604.serializeUrl(t.extractedUrl), e);
                  eventsSubject.next(navError);

                  try {
                    t.resolve(_this604.errorHandler(e));
                  } catch (ee) {
                    t.reject(ee);
                  }
                }

                return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
              })); // TODO(jasonaden): remove cast once g3 is on updated TypeScript
            }));
          }
          /**
           * @internal
           * TODO: this should be removed once the constructor of the router made internal
           */

        }, {
          key: "resetRootComponentType",
          value: function resetRootComponentType(rootComponentType) {
            this.rootComponentType = rootComponentType; // TODO: vsavkin router 4.0 should make the root component set to null
            // this will simplify the lifecycle of the router.

            this.routerState.root.component = this.rootComponentType;
          }
        }, {
          key: "getTransition",
          value: function getTransition() {
            var transition = this.transitions.value; // This value needs to be set. Other values such as extractedUrl are set on initial navigation
            // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not
            // processing the previous URL.

            transition.urlAfterRedirects = this.browserUrlTree;
            return transition;
          }
        }, {
          key: "setTransition",
          value: function setTransition(t) {
            this.transitions.next(Object.assign(Object.assign({}, this.getTransition()), t));
          }
          /**
           * Sets up the location change listener and performs the initial navigation.
           */

        }, {
          key: "initialNavigation",
          value: function initialNavigation() {
            this.setUpLocationChangeListener();

            if (this.navigationId === 0) {
              this.navigateByUrl(this.location.path(true), {
                replaceUrl: true
              });
            }
          }
          /**
           * Sets up the location change listener. This listener detects navigations triggered from outside
           * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router
           * navigation so that the correct events, guards, etc. are triggered.
           */

        }, {
          key: "setUpLocationChangeListener",
          value: function setUpLocationChangeListener() {
            var _this605 = this;

            // Don't need to use Zone.wrap any more, because zone.js
            // already patch onPopState, so location change callback will
            // run into ngZone
            if (!this.locationSubscription) {
              this.locationSubscription = this.location.subscribe(function (event) {
                var currentChange = _this605.extractLocationChangeInfoFromEvent(event);

                if (_this605.shouldScheduleNavigation(_this605.lastLocationChangeInfo, currentChange)) {
                  // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS
                  // hybrid apps.
                  setTimeout(function () {
                    var source = currentChange.source,
                        state = currentChange.state,
                        urlTree = currentChange.urlTree;
                    var extras = {
                      replaceUrl: true
                    };

                    if (state) {
                      var stateCopy = Object.assign({}, state);
                      delete stateCopy.navigationId;

                      if (Object.keys(stateCopy).length !== 0) {
                        extras.state = stateCopy;
                      }
                    }

                    _this605.scheduleNavigation(urlTree, source, state, extras);
                  }, 0);
                }

                _this605.lastLocationChangeInfo = currentChange;
              });
            }
          }
          /** Extracts router-related information from a `PopStateEvent`. */

        }, {
          key: "extractLocationChangeInfoFromEvent",
          value: function extractLocationChangeInfoFromEvent(change) {
            var _a;

            return {
              source: change['type'] === 'popstate' ? 'popstate' : 'hashchange',
              urlTree: this.parseUrl(change['url']),
              // Navigations coming from Angular router have a navigationId state
              // property. When this exists, restore the state.
              state: ((_a = change.state) === null || _a === void 0 ? void 0 : _a.navigationId) ? change.state : null,
              transitionId: this.getTransition().id
            };
          }
          /**
           * Determines whether two events triggered by the Location subscription are due to the same
           * navigation. The location subscription can fire two events (popstate and hashchange) for a
           * single navigation. The second one should be ignored, that is, we should not schedule another
           * navigation in the Router.
           */

        }, {
          key: "shouldScheduleNavigation",
          value: function shouldScheduleNavigation(previous, current) {
            if (!previous) return true;
            var sameDestination = current.urlTree.toString() === previous.urlTree.toString();
            var eventsOccurredAtSameTime = current.transitionId === previous.transitionId;

            if (!eventsOccurredAtSameTime || !sameDestination) {
              return true;
            }

            if (current.source === 'hashchange' && previous.source === 'popstate' || current.source === 'popstate' && previous.source === 'hashchange') {
              return false;
            }

            return true;
          }
          /** The current URL. */

        }, {
          key: "url",
          get: function get() {
            return this.serializeUrl(this.currentUrlTree);
          }
          /** The current Navigation object if one exists */

        }, {
          key: "getCurrentNavigation",
          value: function getCurrentNavigation() {
            return this.currentNavigation;
          }
          /** @internal */

        }, {
          key: "triggerEvent",
          value: function triggerEvent(event) {
            this.events.next(event);
          }
          /**
           * Resets the route configuration used for navigation and generating links.
           *
           * @param config The route array for the new configuration.
           *
           * @usageNotes
           *
           * ```
           * router.resetConfig([
           *  { path: 'team/:id', component: TeamCmp, children: [
           *    { path: 'simple', component: SimpleCmp },
           *    { path: 'user/:name', component: UserCmp }
           *  ]}
           * ]);
           * ```
           */

        }, {
          key: "resetConfig",
          value: function resetConfig(config) {
            validateConfig(config);
            this.config = config.map(standardizeConfig);
            this.navigated = false;
            this.lastSuccessfulId = -1;
          }
          /** @nodoc */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this.dispose();
          }
          /** Disposes of the router. */

        }, {
          key: "dispose",
          value: function dispose() {
            if (this.locationSubscription) {
              this.locationSubscription.unsubscribe();
              this.locationSubscription = undefined;
            }
          }
          /**
           * Appends URL segments to the current URL tree to create a new URL tree.
           *
           * @param commands An array of URL fragments with which to construct the new URL tree.
           * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path
           * segments, followed by the parameters for each segment.
           * The fragments are applied to the current URL tree or the one provided  in the `relativeTo`
           * property of the options object, if supplied.
           * @param navigationExtras Options that control the navigation strategy.
           * @returns The new URL tree.
           *
           * @usageNotes
           *
           * ```
           * // create /team/33/user/11
           * router.createUrlTree(['/team', 33, 'user', 11]);
           *
           * // create /team/33;expand=true/user/11
           * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);
           *
           * // you can collapse static segments like this (this works only with the first passed-in value):
           * router.createUrlTree(['/team/33/user', userId]);
           *
           * // If the first segment can contain slashes, and you do not want the router to split it,
           * // you can do the following:
           * router.createUrlTree([{segmentPath: '/one/two'}]);
           *
           * // create /team/33/(user/11//right:chat)
           * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);
           *
           * // remove the right secondary node
           * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);
           *
           * // assuming the current url is `/team/33/user/11` and the route points to `user/11`
           *
           * // navigate to /team/33/user/11/details
           * router.createUrlTree(['details'], {relativeTo: route});
           *
           * // navigate to /team/33/user/22
           * router.createUrlTree(['../22'], {relativeTo: route});
           *
           * // navigate to /team/44/user/22
           * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});
           * ```
           */

        }, {
          key: "createUrlTree",
          value: function createUrlTree(commands) {
            var navigationExtras = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
            var relativeTo = navigationExtras.relativeTo,
                queryParams = navigationExtras.queryParams,
                fragment = navigationExtras.fragment,
                queryParamsHandling = navigationExtras.queryParamsHandling,
                preserveFragment = navigationExtras.preserveFragment;
            var a = relativeTo || this.routerState.root;
            var f = preserveFragment ? this.currentUrlTree.fragment : fragment;
            var q = null;

            switch (queryParamsHandling) {
              case 'merge':
                q = Object.assign(Object.assign({}, this.currentUrlTree.queryParams), queryParams);
                break;

              case 'preserve':
                q = this.currentUrlTree.queryParams;
                break;

              default:
                q = queryParams || null;
            }

            if (q !== null) {
              q = this.removeEmptyProps(q);
            }

            return _createUrlTree(a, this.currentUrlTree, commands, q, f);
          }
          /**
           * Navigates to a view using an absolute route path.
           *
           * @param url An absolute path for a defined route. The function does not apply any delta to the
           *     current URL.
           * @param extras An object containing properties that modify the navigation strategy.
           *
           * @returns A Promise that resolves to 'true' when navigation succeeds,
           * to 'false' when navigation fails, or is rejected on error.
           *
           * @usageNotes
           *
           * The following calls request navigation to an absolute path.
           *
           * ```
           * router.navigateByUrl("/team/33/user/11");
           *
           * // Navigate without updating the URL
           * router.navigateByUrl("/team/33/user/11", { skipLocationChange: true });
           * ```
           *
           * @see [Routing and Navigation guide](guide/router)
           *
           */

        }, {
          key: "navigateByUrl",
          value: function navigateByUrl(url) {
            var extras = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
              skipLocationChange: false
            };

            if (typeof ngDevMode === 'undefined' || ngDevMode && this.isNgZoneEnabled && !_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"].isInAngularZone()) {
              this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");
            }

            var urlTree = isUrlTree(url) ? url : this.parseUrl(url);
            var mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);
            return this.scheduleNavigation(mergedTree, 'imperative', null, extras);
          }
          /**
           * Navigate based on the provided array of commands and a starting point.
           * If no starting route is provided, the navigation is absolute.
           *
           * @param commands An array of URL fragments with which to construct the target URL.
           * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path
           * segments, followed by the parameters for each segment.
           * The fragments are applied to the current URL or the one provided  in the `relativeTo` property
           * of the options object, if supplied.
           * @param extras An options object that determines how the URL should be constructed or
           *     interpreted.
           *
           * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation
           *     fails,
           * or is rejected on error.
           *
           * @usageNotes
           *
           * The following calls request navigation to a dynamic route path relative to the current URL.
           *
           * ```
           * router.navigate(['team', 33, 'user', 11], {relativeTo: route});
           *
           * // Navigate without updating the URL, overriding the default behavior
           * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});
           * ```
           *
           * @see [Routing and Navigation guide](guide/router)
           *
           */

        }, {
          key: "navigate",
          value: function navigate(commands) {
            var extras = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
              skipLocationChange: false
            };
            validateCommands(commands);
            return this.navigateByUrl(this.createUrlTree(commands, extras), extras);
          }
          /** Serializes a `UrlTree` into a string */

        }, {
          key: "serializeUrl",
          value: function serializeUrl(url) {
            return this.urlSerializer.serialize(url);
          }
          /** Parses a string into a `UrlTree` */

        }, {
          key: "parseUrl",
          value: function parseUrl(url) {
            var urlTree;

            try {
              urlTree = this.urlSerializer.parse(url);
            } catch (e) {
              urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);
            }

            return urlTree;
          }
          /** Returns whether the url is activated */

        }, {
          key: "isActive",
          value: function isActive(url, exact) {
            if (isUrlTree(url)) {
              return containsTree(this.currentUrlTree, url, exact);
            }

            var urlTree = this.parseUrl(url);
            return containsTree(this.currentUrlTree, urlTree, exact);
          }
        }, {
          key: "removeEmptyProps",
          value: function removeEmptyProps(params) {
            return Object.keys(params).reduce(function (result, key) {
              var value = params[key];

              if (value !== null && value !== undefined) {
                result[key] = value;
              }

              return result;
            }, {});
          }
        }, {
          key: "processNavigations",
          value: function processNavigations() {
            var _this606 = this;

            this.navigations.subscribe(function (t) {
              _this606.navigated = true;
              _this606.lastSuccessfulId = t.id;

              _this606.events.next(new NavigationEnd(t.id, _this606.serializeUrl(t.extractedUrl), _this606.serializeUrl(_this606.currentUrlTree)));

              _this606.lastSuccessfulNavigation = _this606.currentNavigation;
              _this606.currentNavigation = null;
              t.resolve(true);
            }, function (e) {
              _this606.console.warn("Unhandled Navigation Error: ");
            });
          }
        }, {
          key: "scheduleNavigation",
          value: function scheduleNavigation(rawUrl, source, restoredState, extras, priorPromise) {
            // * Imperative navigations (router.navigate) might trigger additional navigations to the same
            //   URL via a popstate event and the locationChangeListener. We should skip these duplicate
            //   navs. Duplicates may also be triggered by attempts to sync AngularJS and Angular router
            //   states.
            // * Imperative navigations can be cancelled by router guards, meaning the URL won't change. If
            //   the user follows that with a navigation using the back/forward button or manual URL change,
            //   the destination may be the same as the previous imperative attempt. We should not skip
            //   these navigations because it's a separate case from the one above -- it's not a duplicate
            //   navigation.
            var lastNavigation = this.getTransition(); // We don't want to skip duplicate successful navs if they're imperative because
            // onSameUrlNavigation could be 'reload' (so the duplicate is intended).

            var browserNavPrecededByRouterNav = source !== 'imperative' && (lastNavigation === null || lastNavigation === void 0 ? void 0 : lastNavigation.source) === 'imperative';
            var lastNavigationSucceeded = this.lastSuccessfulId === lastNavigation.id; // If the last navigation succeeded or is in flight, we can use the rawUrl as the comparison.
            // However, if it failed, we should compare to the final result (urlAfterRedirects).

            var lastNavigationUrl = lastNavigationSucceeded || this.currentNavigation ? lastNavigation.rawUrl : lastNavigation.urlAfterRedirects;
            var duplicateNav = lastNavigationUrl.toString() === rawUrl.toString();

            if (browserNavPrecededByRouterNav && duplicateNav) {
              return Promise.resolve(true); // return value is not used
            }

            var resolve;
            var reject;
            var promise;

            if (priorPromise) {
              resolve = priorPromise.resolve;
              reject = priorPromise.reject;
              promise = priorPromise.promise;
            } else {
              promise = new Promise(function (res, rej) {
                resolve = res;
                reject = rej;
              });
            }

            var id = ++this.navigationId;
            this.setTransition({
              id: id,
              source: source,
              restoredState: restoredState,
              currentUrlTree: this.currentUrlTree,
              currentRawUrl: this.rawUrlTree,
              rawUrl: rawUrl,
              extras: extras,
              resolve: resolve,
              reject: reject,
              promise: promise,
              currentSnapshot: this.routerState.snapshot,
              currentRouterState: this.routerState
            }); // Make sure that the error is propagated even though `processNavigations` catch
            // handler does not rethrow

            return promise["catch"](function (e) {
              return Promise.reject(e);
            });
          }
        }, {
          key: "setBrowserUrl",
          value: function setBrowserUrl(url, replaceUrl, id, state) {
            var path = this.urlSerializer.serialize(url);
            state = state || {};

            if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {
              // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.
              this.location.replaceState(path, '', Object.assign(Object.assign({}, state), {
                navigationId: id
              }));
            } else {
              this.location.go(path, '', Object.assign(Object.assign({}, state), {
                navigationId: id
              }));
            }
          }
        }, {
          key: "resetStateAndUrl",
          value: function resetStateAndUrl(storedState, storedUrl, rawUrl) {
            this.routerState = storedState;
            this.currentUrlTree = storedUrl;
            this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);
            this.resetUrlToCurrentUrlTree();
          }
        }, {
          key: "resetUrlToCurrentUrlTree",
          value: function resetUrlToCurrentUrlTree() {
            this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', {
              navigationId: this.lastSuccessfulId
            });
          }
        }]);

        return Router;
      }();

      Router.ɵfac = function Router_Factory(t) {
        return new (t || Router)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Type"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](UrlSerializer), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](ChildrenOutletContexts), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](undefined));
      };

      Router.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: Router,
        factory: Router.ɵfac
      });

      Router.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Type"]
        }, {
          type: UrlSerializer
        }, {
          type: ChildrenOutletContexts
        }, {
          type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]
        }, {
          type: undefined
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](Router, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Type"]
          }, {
            type: UrlSerializer
          }, {
            type: ChildrenOutletContexts
          }, {
            type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]
          }, {
            type: undefined
          }];
        }, null);
      })();

      function validateCommands(commands) {
        for (var i = 0; i < commands.length; i++) {
          var cmd = commands[i];

          if (cmd == null) {
            throw new Error("The requested path contains ".concat(cmd, " segment at index ").concat(i));
          }
        }
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description
       *
       * When applied to an element in a template, makes that element a link
       * that initiates navigation to a route. Navigation opens one or more routed components
       * in one or more `<router-outlet>` locations on the page.
       *
       * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,
       * the following creates a static link to the route:
       * `<a routerLink="/user/bob">link to user component</a>`
       *
       * You can use dynamic values to generate the link.
       * For a dynamic link, pass an array of path segments,
       * followed by the params for each segment.
       * For example, `['/team', teamId, 'user', userName, {details: true}]`
       * generates a link to `/team/11/user/bob;details=true`.
       *
       * Multiple static segments can be merged into one term and combined with dynamic segements.
       * For example, `['/team/11/user', userName, {details: true}]`
       *
       * The input that you provide to the link is treated as a delta to the current URL.
       * For instance, suppose the current URL is `/user/(box//aux:team)`.
       * The link `<a [routerLink]="['/user/jim']">Jim</a>` creates the URL
       * `/user/(jim//aux:team)`.
       * See {@link Router#createUrlTree createUrlTree} for more information.
       *
       * @usageNotes
       *
       * You can use absolute or relative paths in a link, set query parameters,
       * control how parameters are handled, and keep a history of navigation states.
       *
       * ### Relative link paths
       *
       * The first segment name can be prepended with `/`, `./`, or `../`.
       * * If the first segment begins with `/`, the router looks up the route from the root of the
       *   app.
       * * If the first segment begins with `./`, or doesn't begin with a slash, the router
       *   looks in the children of the current activated route.
       * * If the first segment begins with `../`, the router goes up one level in the route tree.
       *
       * ### Setting and handling query params and fragments
       *
       * The following link adds a query parameter and a fragment to the generated URL:
       *
       * ```
       * <a [routerLink]="['/user/bob']" [queryParams]="{debug: true}" fragment="education">
       *   link to user component
       * </a>
       * ```
       * By default, the directive constructs the new URL using the given query parameters.
       * The example generates the link: `/user/bob?debug=true#education`.
       *
       * You can instruct the directive to handle query parameters differently
       * by specifying the `queryParamsHandling` option in the link.
       * Allowed values are:
       *
       *  - `'merge'`: Merge the given `queryParams` into the current query params.
       *  - `'preserve'`: Preserve the current query params.
       *
       * For example:
       *
       * ```
       * <a [routerLink]="['/user/bob']" [queryParams]="{debug: true}" queryParamsHandling="merge">
       *   link to user component
       * </a>
       * ```
       *
       * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.
       *
       * ### Preserving navigation history
       *
       * You can provide a `state` value to be persisted to the browser's
       * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).
       * For example:
       *
       * ```
       * <a [routerLink]="['/user/bob']" [state]="{tracingId: 123}">
       *   link to user component
       * </a>
       * ```
       *
       * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved
       * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`
       * event:
       *
       * ```
       * // Get NavigationStart events
       * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {
       *   const navigation = router.getCurrentNavigation();
       *   tracingService.trace({id: navigation.extras.state.tracingId});
       * });
       * ```
       *
       * @ngModule RouterModule
       *
       * @publicApi
       */


      var RouterLink = /*#__PURE__*/function () {
        function RouterLink(router, route, tabIndex, renderer, el) {
          _classCallCheck(this, RouterLink);

          this.router = router;
          this.route = route;
          this.commands = [];
          /** @internal */

          this.onChanges = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();

          if (tabIndex == null) {
            renderer.setAttribute(el.nativeElement, 'tabindex', '0');
          }
        }
        /** @nodoc */


        _createClass2(RouterLink, [{
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes
            // to the RouterLinks it's tracking.
            this.onChanges.next(this);
          }
          /**
           * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.
           *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.
           *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`
           *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`
           * @see {@link Router#createUrlTree Router#createUrlTree}
           */

        }, {
          key: "routerLink",
          set: function set(commands) {
            if (commands != null) {
              this.commands = Array.isArray(commands) ? commands : [commands];
            } else {
              this.commands = [];
            }
          }
          /** @nodoc */

        }, {
          key: "onClick",
          value: function onClick() {
            var extras = {
              skipLocationChange: attrBoolValue(this.skipLocationChange),
              replaceUrl: attrBoolValue(this.replaceUrl),
              state: this.state
            };
            this.router.navigateByUrl(this.urlTree, extras);
            return true;
          }
        }, {
          key: "urlTree",
          get: function get() {
            return this.router.createUrlTree(this.commands, {
              relativeTo: this.route,
              queryParams: this.queryParams,
              fragment: this.fragment,
              queryParamsHandling: this.queryParamsHandling,
              preserveFragment: attrBoolValue(this.preserveFragment)
            });
          }
        }]);

        return RouterLink;
      }();

      RouterLink.ɵfac = function RouterLink_Factory(t) {
        return new (t || RouterLink)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](ActivatedRoute), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinjectAttribute"]('tabindex'), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]));
      };

      RouterLink.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: RouterLink,
        selectors: [["", "routerLink", "", 5, "a", 5, "area"]],
        hostBindings: function RouterLink_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function RouterLink_click_HostBindingHandler() {
              return ctx.onClick();
            });
          }
        },
        inputs: {
          routerLink: "routerLink",
          queryParams: "queryParams",
          fragment: "fragment",
          queryParamsHandling: "queryParamsHandling",
          preserveFragment: "preserveFragment",
          skipLocationChange: "skipLocationChange",
          replaceUrl: "replaceUrl",
          state: "state"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]]
      });

      RouterLink.ctorParameters = function () {
        return [{
          type: Router
        }, {
          type: ActivatedRoute
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"],
            args: ['tabindex']
          }]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }];
      };

      RouterLink.propDecorators = {
        queryParams: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        fragment: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        queryParamsHandling: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        preserveFragment: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        skipLocationChange: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        replaceUrl: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        state: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        routerLink: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        onClick: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"],
          args: ['click']
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterLink, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            selector: ':not(a):not(area)[routerLink]'
          }]
        }], function () {
          return [{
            type: Router
          }, {
            type: ActivatedRoute
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"],
              args: ['tabindex']
            }]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }];
        }, {
          routerLink: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],

          /** @nodoc */
          onClick: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"],
            args: ['click']
          }],
          queryParams: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          fragment: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          queryParamsHandling: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          preserveFragment: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          skipLocationChange: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          replaceUrl: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          state: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }]
        });
      })();
      /**
       * @description
       *
       * Lets you link to specific routes in your app.
       *
       * See `RouterLink` for more information.
       *
       * @ngModule RouterModule
       *
       * @publicApi
       */


      var RouterLinkWithHref = /*#__PURE__*/function () {
        function RouterLinkWithHref(router, route, locationStrategy) {
          var _this607 = this;

          _classCallCheck(this, RouterLinkWithHref);

          this.router = router;
          this.route = route;
          this.locationStrategy = locationStrategy;
          this.commands = [];
          /** @internal */

          this.onChanges = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
          this.subscription = router.events.subscribe(function (s) {
            if (s instanceof NavigationEnd) {
              _this607.updateTargetUrlAndHref();
            }
          });
        }
        /**
         * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.
         *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.
         *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`
         *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`
         * @see {@link Router#createUrlTree Router#createUrlTree}
         */


        _createClass2(RouterLinkWithHref, [{
          key: "routerLink",
          set: function set(commands) {
            if (commands != null) {
              this.commands = Array.isArray(commands) ? commands : [commands];
            } else {
              this.commands = [];
            }
          }
          /** @nodoc */

        }, {
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            this.updateTargetUrlAndHref();
            this.onChanges.next(this);
          }
          /** @nodoc */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this.subscription.unsubscribe();
          }
          /** @nodoc */

        }, {
          key: "onClick",
          value: function onClick(button, ctrlKey, shiftKey, altKey, metaKey) {
            if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {
              return true;
            }

            if (typeof this.target === 'string' && this.target != '_self') {
              return true;
            }

            var extras = {
              skipLocationChange: attrBoolValue(this.skipLocationChange),
              replaceUrl: attrBoolValue(this.replaceUrl),
              state: this.state
            };
            this.router.navigateByUrl(this.urlTree, extras);
            return false;
          }
        }, {
          key: "updateTargetUrlAndHref",
          value: function updateTargetUrlAndHref() {
            this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));
          }
        }, {
          key: "urlTree",
          get: function get() {
            return this.router.createUrlTree(this.commands, {
              relativeTo: this.route,
              queryParams: this.queryParams,
              fragment: this.fragment,
              queryParamsHandling: this.queryParamsHandling,
              preserveFragment: attrBoolValue(this.preserveFragment)
            });
          }
        }]);

        return RouterLinkWithHref;
      }();

      RouterLinkWithHref.ɵfac = function RouterLinkWithHref_Factory(t) {
        return new (t || RouterLinkWithHref)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](ActivatedRoute), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["LocationStrategy"]));
      };

      RouterLinkWithHref.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: RouterLinkWithHref,
        selectors: [["a", "routerLink", ""], ["area", "routerLink", ""]],
        hostVars: 2,
        hostBindings: function RouterLinkWithHref_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function RouterLinkWithHref_click_HostBindingHandler($event) {
              return ctx.onClick($event.button, $event.ctrlKey, $event.shiftKey, $event.altKey, $event.metaKey);
            });
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵhostProperty"]("href", ctx.href, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsanitizeUrl"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵattribute"]("target", ctx.target);
          }
        },
        inputs: {
          routerLink: "routerLink",
          target: "target",
          queryParams: "queryParams",
          fragment: "fragment",
          queryParamsHandling: "queryParamsHandling",
          preserveFragment: "preserveFragment",
          skipLocationChange: "skipLocationChange",
          replaceUrl: "replaceUrl",
          state: "state"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]]
      });

      RouterLinkWithHref.ctorParameters = function () {
        return [{
          type: Router
        }, {
          type: ActivatedRoute
        }, {
          type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["LocationStrategy"]
        }];
      };

      RouterLinkWithHref.propDecorators = {
        target: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostBinding"],
          args: ['attr.target']
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        queryParams: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        fragment: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        queryParamsHandling: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        preserveFragment: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        skipLocationChange: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        replaceUrl: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        state: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        href: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostBinding"]
        }],
        routerLink: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        onClick: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"],
          args: ['click', ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey']]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterLinkWithHref, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            selector: 'a[routerLink],area[routerLink]'
          }]
        }], function () {
          return [{
            type: Router
          }, {
            type: ActivatedRoute
          }, {
            type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["LocationStrategy"]
          }];
        }, {
          routerLink: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],

          /** @nodoc */
          onClick: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"],
            args: ['click', ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey']]
          }],
          href: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostBinding"]
          }],
          target: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostBinding"],
            args: ['attr.target']
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          queryParams: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          fragment: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          queryParamsHandling: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          preserveFragment: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          skipLocationChange: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          replaceUrl: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          state: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }]
        });
      })();

      function attrBoolValue(s) {
        return s === '' || !!s;
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       *
       * @description
       *
       * Tracks whether the linked route of an element is currently active, and allows you
       * to specify one or more CSS classes to add to the element when the linked route
       * is active.
       *
       * Use this directive to create a visual distinction for elements associated with an active route.
       * For example, the following code highlights the word "Bob" when the the router
       * activates the associated route:
       *
       * ```
       * <a routerLink="/user/bob" routerLinkActive="active-link">Bob</a>
       * ```
       *
       * Whenever the URL is either '/user' or '/user/bob', the "active-link" class is
       * added to the anchor tag. If the URL changes, the class is removed.
       *
       * You can set more than one class using a space-separated string or an array.
       * For example:
       *
       * ```
       * <a routerLink="/user/bob" routerLinkActive="class1 class2">Bob</a>
       * <a routerLink="/user/bob" [routerLinkActive]="['class1', 'class2']">Bob</a>
       * ```
       *
       * To add the classes only when the URL matches the link exactly, add the option `exact: true`:
       *
       * ```
       * <a routerLink="/user/bob" routerLinkActive="active-link" [routerLinkActiveOptions]="{exact:
       * true}">Bob</a>
       * ```
       *
       * To directly check the `isActive` status of the link, assign the `RouterLinkActive`
       * instance to a template variable.
       * For example, the following checks the status without assigning any CSS classes:
       *
       * ```
       * <a routerLink="/user/bob" routerLinkActive #rla="routerLinkActive">
       *   Bob {{ rla.isActive ? '(already open)' : ''}}
       * </a>
       * ```
       *
       * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.
       * For example, the following sets the active-link class on the `<div>`  parent tag
       * when the URL is either '/user/jim' or '/user/bob'.
       *
       * ```
       * <div routerLinkActive="active-link" [routerLinkActiveOptions]="{exact: true}">
       *   <a routerLink="/user/jim">Jim</a>
       *   <a routerLink="/user/bob">Bob</a>
       * </div>
       * ```
       *
       * @ngModule RouterModule
       *
       * @publicApi
       */


      var RouterLinkActive = /*#__PURE__*/function () {
        function RouterLinkActive(router, element, renderer, cdr, link, linkWithHref) {
          var _this608 = this;

          _classCallCheck(this, RouterLinkActive);

          this.router = router;
          this.element = element;
          this.renderer = renderer;
          this.cdr = cdr;
          this.link = link;
          this.linkWithHref = linkWithHref;
          this.classes = [];
          this.isActive = false;
          this.routerLinkActiveOptions = {
            exact: false
          };
          this.routerEventsSubscription = router.events.subscribe(function (s) {
            if (s instanceof NavigationEnd) {
              _this608.update();
            }
          });
        }
        /** @nodoc */


        _createClass2(RouterLinkActive, [{
          key: "ngAfterContentInit",
          value: function ngAfterContentInit() {
            var _this609 = this;

            // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).
            Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(this.links.changes, this.linksWithHrefs.changes, Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null)).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeAll"])()).subscribe(function (_) {
              _this609.update();

              _this609.subscribeToEachLinkOnChanges();
            });
          }
        }, {
          key: "subscribeToEachLinkOnChanges",
          value: function subscribeToEachLinkOnChanges() {
            var _this610 = this;

            var _a;

            (_a = this.linkInputChangesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
            var allLinkChanges = [].concat(_toConsumableArray(this.links.toArray()), _toConsumableArray(this.linksWithHrefs.toArray()), [this.link, this.linkWithHref]).filter(function (link) {
              return !!link;
            }).map(function (link) {
              return link.onChanges;
            });
            this.linkInputChangesSubscription = Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(allLinkChanges).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeAll"])()).subscribe(function (link) {
              if (_this610.isActive !== _this610.isLinkActive(_this610.router)(link)) {
                _this610.update();
              }
            });
          }
        }, {
          key: "routerLinkActive",
          set: function set(data) {
            var classes = Array.isArray(data) ? data : data.split(' ');
            this.classes = classes.filter(function (c) {
              return !!c;
            });
          }
          /** @nodoc */

        }, {
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            this.update();
          }
          /** @nodoc */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            var _a;

            this.routerEventsSubscription.unsubscribe();
            (_a = this.linkInputChangesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
          }
        }, {
          key: "update",
          value: function update() {
            var _this611 = this;

            if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;
            Promise.resolve().then(function () {
              var hasActiveLinks = _this611.hasActiveLinks();

              if (_this611.isActive !== hasActiveLinks) {
                _this611.isActive = hasActiveLinks;

                _this611.cdr.markForCheck();

                _this611.classes.forEach(function (c) {
                  if (hasActiveLinks) {
                    _this611.renderer.addClass(_this611.element.nativeElement, c);
                  } else {
                    _this611.renderer.removeClass(_this611.element.nativeElement, c);
                  }
                });
              }
            });
          }
        }, {
          key: "isLinkActive",
          value: function isLinkActive(router) {
            var _this612 = this;

            return function (link) {
              return router.isActive(link.urlTree, _this612.routerLinkActiveOptions.exact);
            };
          }
        }, {
          key: "hasActiveLinks",
          value: function hasActiveLinks() {
            var isActiveCheckFn = this.isLinkActive(this.router);
            return this.link && isActiveCheckFn(this.link) || this.linkWithHref && isActiveCheckFn(this.linkWithHref) || this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);
          }
        }]);

        return RouterLinkActive;
      }();

      RouterLinkActive.ɵfac = function RouterLinkActive_Factory(t) {
        return new (t || RouterLinkActive)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](RouterLink, 8), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](RouterLinkWithHref, 8));
      };

      RouterLinkActive.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: RouterLinkActive,
        selectors: [["", "routerLinkActive", ""]],
        contentQueries: function RouterLinkActive_ContentQueries(rf, ctx, dirIndex) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](dirIndex, RouterLink, true);

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](dirIndex, RouterLinkWithHref, true);
          }

          if (rf & 2) {
            var _t;

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.links = _t);
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.linksWithHrefs = _t);
          }
        },
        inputs: {
          routerLinkActiveOptions: "routerLinkActiveOptions",
          routerLinkActive: "routerLinkActive"
        },
        exportAs: ["routerLinkActive"],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]]
      });

      RouterLinkActive.ctorParameters = function () {
        return [{
          type: Router
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }, {
          type: RouterLink,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
          }]
        }, {
          type: RouterLinkWithHref,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
          }]
        }];
      };

      RouterLinkActive.propDecorators = {
        links: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"],
          args: [RouterLink, {
            descendants: true
          }]
        }],
        linksWithHrefs: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"],
          args: [RouterLinkWithHref, {
            descendants: true
          }]
        }],
        routerLinkActiveOptions: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        routerLinkActive: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterLinkActive, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            selector: '[routerLinkActive]',
            exportAs: 'routerLinkActive'
          }]
        }], function () {
          return [{
            type: Router
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }, {
            type: RouterLink,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
            }]
          }, {
            type: RouterLinkWithHref,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
            }]
          }];
        }, {
          routerLinkActiveOptions: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          routerLinkActive: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          links: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"],
            args: [RouterLink, {
              descendants: true
            }]
          }],
          linksWithHrefs: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"],
            args: [RouterLinkWithHref, {
              descendants: true
            }]
          }]
        });
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description
       *
       * Acts as a placeholder that Angular dynamically fills based on the current router state.
       *
       * Each outlet can have a unique name, determined by the optional `name` attribute.
       * The name cannot be set or changed dynamically. If not set, default value is "primary".
       *
       * ```
       * <router-outlet></router-outlet>
       * <router-outlet name='left'></router-outlet>
       * <router-outlet name='right'></router-outlet>
       * ```
       *
       * Named outlets can be the targets of secondary routes.
       * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:
       *
       * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`
       *
       * Using named outlets and secondary routes, you can target multiple outlets in
       * the same `RouterLink` directive.
       *
       * The router keeps track of separate branches in a navigation tree for each named outlet and
       * generates a representation of that tree in the URL.
       * The URL for a secondary route uses the following syntax to specify both the primary and secondary
       * routes at the same time:
       *
       * `http://base-path/primary-route-path(outlet-name:route-path)`
       *
       * A router outlet emits an activate event when a new component is instantiated,
       * and a deactivate event when a component is destroyed.
       *
       * ```
       * <router-outlet
       *   (activate)='onActivate($event)'
       *   (deactivate)='onDeactivate($event)'></router-outlet>
       * ```
       *
       * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets "Example of a named
       * outlet and secondary route configuration").
       * @see `RouterLink`
       * @see `Route`
       * @ngModule RouterModule
       *
       * @publicApi
       */


      var RouterOutlet = /*#__PURE__*/function () {
        function RouterOutlet(parentContexts, location, resolver, name, changeDetector) {
          _classCallCheck(this, RouterOutlet);

          this.parentContexts = parentContexts;
          this.location = location;
          this.resolver = resolver;
          this.changeDetector = changeDetector;
          this.activated = null;
          this._activatedRoute = null;
          this.activateEvents = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
          this.deactivateEvents = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
          this.name = name || PRIMARY_OUTLET;
          parentContexts.onChildOutletCreated(this.name, this);
        }
        /** @nodoc */


        _createClass2(RouterOutlet, [{
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this.parentContexts.onChildOutletDestroyed(this.name);
          }
          /** @nodoc */

        }, {
          key: "ngOnInit",
          value: function ngOnInit() {
            if (!this.activated) {
              // If the outlet was not instantiated at the time the route got activated we need to populate
              // the outlet when it is initialized (ie inside a NgIf)
              var context = this.parentContexts.getContext(this.name);

              if (context && context.route) {
                if (context.attachRef) {
                  // `attachRef` is populated when there is an existing component to mount
                  this.attach(context.attachRef, context.route);
                } else {
                  // otherwise the component defined in the configuration is created
                  this.activateWith(context.route, context.resolver || null);
                }
              }
            }
          }
        }, {
          key: "isActivated",
          get: function get() {
            return !!this.activated;
          }
        }, {
          key: "component",
          get: function get() {
            if (!this.activated) throw new Error('Outlet is not activated');
            return this.activated.instance;
          }
        }, {
          key: "activatedRoute",
          get: function get() {
            if (!this.activated) throw new Error('Outlet is not activated');
            return this._activatedRoute;
          }
        }, {
          key: "activatedRouteData",
          get: function get() {
            if (this._activatedRoute) {
              return this._activatedRoute.snapshot.data;
            }

            return {};
          }
          /**
           * Called when the `RouteReuseStrategy` instructs to detach the subtree
           */

        }, {
          key: "detach",
          value: function detach() {
            if (!this.activated) throw new Error('Outlet is not activated');
            this.location.detach();
            var cmp = this.activated;
            this.activated = null;
            this._activatedRoute = null;
            return cmp;
          }
          /**
           * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
           */

        }, {
          key: "attach",
          value: function attach(ref, activatedRoute) {
            this.activated = ref;
            this._activatedRoute = activatedRoute;
            this.location.insert(ref.hostView);
          }
        }, {
          key: "deactivate",
          value: function deactivate() {
            if (this.activated) {
              var c = this.component;
              this.activated.destroy();
              this.activated = null;
              this._activatedRoute = null;
              this.deactivateEvents.emit(c);
            }
          }
        }, {
          key: "activateWith",
          value: function activateWith(activatedRoute, resolver) {
            if (this.isActivated) {
              throw new Error('Cannot activate an already activated outlet');
            }

            this._activatedRoute = activatedRoute;
            var snapshot = activatedRoute._futureSnapshot;
            var component = snapshot.routeConfig.component;
            resolver = resolver || this.resolver;
            var factory = resolver.resolveComponentFactory(component);
            var childContexts = this.parentContexts.getOrCreateContext(this.name).children;
            var injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);
            this.activated = this.location.createComponent(factory, this.location.length, injector); // Calling `markForCheck` to make sure we will run the change detection when the
            // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.

            this.changeDetector.markForCheck();
            this.activateEvents.emit(this.activated.instance);
          }
        }]);

        return RouterOutlet;
      }();

      RouterOutlet.ɵfac = function RouterOutlet_Factory(t) {
        return new (t || RouterOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](ChildrenOutletContexts), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinjectAttribute"]('name'), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]));
      };

      RouterOutlet.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: RouterOutlet,
        selectors: [["router-outlet"]],
        outputs: {
          activateEvents: "activate",
          deactivateEvents: "deactivate"
        },
        exportAs: ["outlet"]
      });

      RouterOutlet.ctorParameters = function () {
        return [{
          type: ChildrenOutletContexts
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]
        }, {
          type: String,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"],
            args: ['name']
          }]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
        }];
      };

      RouterOutlet.propDecorators = {
        activateEvents: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"],
          args: ['activate']
        }],
        deactivateEvents: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"],
          args: ['deactivate']
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterOutlet, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            selector: 'router-outlet',
            exportAs: 'outlet'
          }]
        }], function () {
          return [{
            type: ChildrenOutletContexts
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]
          }, {
            type: String,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"],
              args: ['name']
            }]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
          }];
        }, {
          activateEvents: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"],
            args: ['activate']
          }],
          deactivateEvents: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"],
            args: ['deactivate']
          }]
        });
      })();

      var OutletInjector = /*#__PURE__*/function () {
        function OutletInjector(route, childContexts, parent) {
          _classCallCheck(this, OutletInjector);

          this.route = route;
          this.childContexts = childContexts;
          this.parent = parent;
        }

        _createClass2(OutletInjector, [{
          key: "get",
          value: function get(token, notFoundValue) {
            if (token === ActivatedRoute) {
              return this.route;
            }

            if (token === ChildrenOutletContexts) {
              return this.childContexts;
            }

            return this.parent.get(token, notFoundValue);
          }
        }]);

        return OutletInjector;
      }();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @description
       *
       * Provides a preloading strategy.
       *
       * @publicApi
       */


      var PreloadingStrategy = function PreloadingStrategy() {
        _classCallCheck(this, PreloadingStrategy);
      };
      /**
       * @description
       *
       * Provides a preloading strategy that preloads all modules as quickly as possible.
       *
       * ```
       * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})
       * ```
       *
       * @publicApi
       */


      var PreloadAllModules = /*#__PURE__*/function () {
        function PreloadAllModules() {
          _classCallCheck(this, PreloadAllModules);
        }

        _createClass2(PreloadAllModules, [{
          key: "preload",
          value: function preload(route, fn) {
            return fn().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(function () {
              return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null);
            }));
          }
        }]);

        return PreloadAllModules;
      }();
      /**
       * @description
       *
       * Provides a preloading strategy that does not preload any modules.
       *
       * This strategy is enabled by default.
       *
       * @publicApi
       */


      var NoPreloading = /*#__PURE__*/function () {
        function NoPreloading() {
          _classCallCheck(this, NoPreloading);
        }

        _createClass2(NoPreloading, [{
          key: "preload",
          value: function preload(route, fn) {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null);
          }
        }]);

        return NoPreloading;
      }();
      /**
       * The preloader optimistically loads all router configurations to
       * make navigations into lazily-loaded sections of the application faster.
       *
       * The preloader runs in the background. When the router bootstraps, the preloader
       * starts listening to all navigation events. After every such event, the preloader
       * will check if any configurations can be loaded lazily.
       *
       * If a route is protected by `canLoad` guards, the preloaded will not load it.
       *
       * @publicApi
       */


      var RouterPreloader = /*#__PURE__*/function () {
        function RouterPreloader(router, moduleLoader, compiler, injector, preloadingStrategy) {
          _classCallCheck(this, RouterPreloader);

          this.router = router;
          this.injector = injector;
          this.preloadingStrategy = preloadingStrategy;

          var onStartLoad = function onStartLoad(r) {
            return router.triggerEvent(new RouteConfigLoadStart(r));
          };

          var onEndLoad = function onEndLoad(r) {
            return router.triggerEvent(new RouteConfigLoadEnd(r));
          };

          this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);
        }

        _createClass2(RouterPreloader, [{
          key: "setUpPreloading",
          value: function setUpPreloading() {
            var _this613 = this;

            this.subscription = this.router.events.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])(function (e) {
              return e instanceof NavigationEnd;
            }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])(function () {
              return _this613.preload();
            })).subscribe(function () {});
          }
        }, {
          key: "preload",
          value: function preload() {
            var ngModule = this.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]);
            return this.processRoutes(ngModule, this.router.config);
          }
          /** @nodoc */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            if (this.subscription) {
              this.subscription.unsubscribe();
            }
          }
        }, {
          key: "processRoutes",
          value: function processRoutes(ngModule, routes) {
            var res = [];

            var _iterator77 = _createForOfIteratorHelper(routes),
                _step76;

            try {
              for (_iterator77.s(); !(_step76 = _iterator77.n()).done;) {
                var route = _step76.value;

                // we already have the config loaded, just recurse
                if (route.loadChildren && !route.canLoad && route._loadedConfig) {
                  var childConfig = route._loadedConfig;
                  res.push(this.processRoutes(childConfig.module, childConfig.routes)); // no config loaded, fetch the config
                } else if (route.loadChildren && !route.canLoad) {
                  res.push(this.preloadConfig(ngModule, route)); // recurse into children
                } else if (route.children) {
                  res.push(this.processRoutes(ngModule, route.children));
                }
              }
            } catch (err) {
              _iterator77.e(err);
            } finally {
              _iterator77.f();
            }

            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(res).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeAll"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (_) {
              return void 0;
            }));
          }
        }, {
          key: "preloadConfig",
          value: function preloadConfig(ngModule, route) {
            var _this614 = this;

            return this.preloadingStrategy.preload(route, function () {
              var loaded$ = _this614.loader.load(ngModule.injector, route);

              return loaded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(function (config) {
                route._loadedConfig = config;
                return _this614.processRoutes(config.module, config.routes);
              }));
            });
          }
        }]);

        return RouterPreloader;
      }();

      RouterPreloader.ɵfac = function RouterPreloader_Factory(t) {
        return new (t || RouterPreloader)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](PreloadingStrategy));
      };

      RouterPreloader.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: RouterPreloader,
        factory: RouterPreloader.ɵfac
      });

      RouterPreloader.ctorParameters = function () {
        return [{
          type: Router
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
        }, {
          type: PreloadingStrategy
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterPreloader, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [{
            type: Router
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
          }, {
            type: PreloadingStrategy
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */


      var RouterScroller = /*#__PURE__*/function () {
        function RouterScroller(router,
        /** @docsNotRequired */
        viewportScroller) {
          var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

          _classCallCheck(this, RouterScroller);

          this.router = router;
          this.viewportScroller = viewportScroller;
          this.options = options;
          this.lastId = 0;
          this.lastSource = 'imperative';
          this.restoredId = 0;
          this.store = {}; // Default both options to 'disabled'

          options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';
          options.anchorScrolling = options.anchorScrolling || 'disabled';
        }

        _createClass2(RouterScroller, [{
          key: "init",
          value: function init() {
            // we want to disable the automatic scrolling because having two places
            // responsible for scrolling results race conditions, especially given
            // that browser don't implement this behavior consistently
            if (this.options.scrollPositionRestoration !== 'disabled') {
              this.viewportScroller.setHistoryScrollRestoration('manual');
            }

            this.routerEventsSubscription = this.createScrollEvents();
            this.scrollEventsSubscription = this.consumeScrollEvents();
          }
        }, {
          key: "createScrollEvents",
          value: function createScrollEvents() {
            var _this615 = this;

            return this.router.events.subscribe(function (e) {
              if (e instanceof NavigationStart) {
                // store the scroll position of the current stable navigations.
                _this615.store[_this615.lastId] = _this615.viewportScroller.getScrollPosition();
                _this615.lastSource = e.navigationTrigger;
                _this615.restoredId = e.restoredState ? e.restoredState.navigationId : 0;
              } else if (e instanceof NavigationEnd) {
                _this615.lastId = e.id;

                _this615.scheduleScrollEvent(e, _this615.router.parseUrl(e.urlAfterRedirects).fragment);
              }
            });
          }
        }, {
          key: "consumeScrollEvents",
          value: function consumeScrollEvents() {
            var _this616 = this;

            return this.router.events.subscribe(function (e) {
              if (!(e instanceof Scroll)) return; // a popstate event. The pop state event will always ignore anchor scrolling.

              if (e.position) {
                if (_this616.options.scrollPositionRestoration === 'top') {
                  _this616.viewportScroller.scrollToPosition([0, 0]);
                } else if (_this616.options.scrollPositionRestoration === 'enabled') {
                  _this616.viewportScroller.scrollToPosition(e.position);
                } // imperative navigation "forward"

              } else {
                if (e.anchor && _this616.options.anchorScrolling === 'enabled') {
                  _this616.viewportScroller.scrollToAnchor(e.anchor);
                } else if (_this616.options.scrollPositionRestoration !== 'disabled') {
                  _this616.viewportScroller.scrollToPosition([0, 0]);
                }
              }
            });
          }
        }, {
          key: "scheduleScrollEvent",
          value: function scheduleScrollEvent(routerEvent, anchor) {
            this.router.triggerEvent(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));
          }
          /** @nodoc */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            if (this.routerEventsSubscription) {
              this.routerEventsSubscription.unsubscribe();
            }

            if (this.scrollEventsSubscription) {
              this.scrollEventsSubscription.unsubscribe();
            }
          }
        }]);

        return RouterScroller;
      }();

      RouterScroller.ɵfac = function RouterScroller_Factory(t) {
        return new (t || RouterScroller)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["ViewportScroller"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](undefined));
      };

      RouterScroller.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: RouterScroller,
        factory: RouterScroller.ɵfac
      });

      RouterScroller.ctorParameters = function () {
        return [{
          type: Router
        }, {
          type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["ViewportScroller"]
        }, {
          type: undefined
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterScroller, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [{
            type: Router
          }, {
            type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["ViewportScroller"]
          }, {
            type: undefined
          }];
        }, null);
      })();
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * The directives defined in the `RouterModule`.
       */


      var ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent];
      /**
       * A [DI token](guide/glossary/#di-token) for the router service.
       *
       * @publicApi
       */

      var ROUTER_CONFIGURATION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ROUTER_CONFIGURATION');
      /**
       * @docsNotRequired
       */

      var ROUTER_FORROOT_GUARD = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ROUTER_FORROOT_GUARD');
      var ɵ0 = {
        enableTracing: false
      };
      var ROUTER_PROVIDERS = [_angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"], {
        provide: UrlSerializer,
        useClass: DefaultUrlSerializer
      }, {
        provide: Router,
        useFactory: setupRouter,
        deps: [UrlSerializer, ChildrenOutletContexts, _angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"], ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()], [RouteReuseStrategy, new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()]]
      }, ChildrenOutletContexts, {
        provide: ActivatedRoute,
        useFactory: rootRoute,
        deps: [Router]
      }, {
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"],
        useClass: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SystemJsNgModuleLoader"]
      }, RouterPreloader, NoPreloading, PreloadAllModules, {
        provide: ROUTER_CONFIGURATION,
        useValue: ɵ0
      }];

      function routerNgProbeToken() {
        return new _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgProbeToken"]('Router', Router);
      }
      /**
       * @description
       *
       * Adds directives and providers for in-app navigation among views defined in an application.
       * Use the Angular `Router` service to declaratively specify application states and manage state
       * transitions.
       *
       * You can import this NgModule multiple times, once for each lazy-loaded bundle.
       * However, only one `Router` service can be active.
       * To ensure this, there are two ways to register routes when importing this module:
       *
       * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given
       * routes, and the `Router` service itself.
       * * The `forChild()` method creates an `NgModule` that contains all the directives and the given
       * routes, but does not include the `Router` service.
       *
       * @see [Routing and Navigation guide](guide/router) for an
       * overview of how the `Router` service should be used.
       *
       * @publicApi
       */


      var RouterModule = /*#__PURE__*/function () {
        // Note: We are injecting the Router so it gets created eagerly...
        function RouterModule(guard, router) {
          _classCallCheck(this, RouterModule);
        }
        /**
         * Creates and configures a module with all the router providers and directives.
         * Optionally sets up an application listener to perform an initial navigation.
         *
         * When registering the NgModule at the root, import as follows:
         *
         * ```
         * @NgModule({
         *   imports: [RouterModule.forRoot(ROUTES)]
         * })
         * class MyNgModule {}
         * ```
         *
         * @param routes An array of `Route` objects that define the navigation paths for the application.
         * @param config An `ExtraOptions` configuration object that controls how navigation is performed.
         * @return The new `NgModule`.
         *
         */


        _createClass2(RouterModule, null, [{
          key: "forRoot",
          value: function forRoot(routes, config) {
            return {
              ngModule: RouterModule,
              providers: [ROUTER_PROVIDERS, provideRoutes(routes), {
                provide: ROUTER_FORROOT_GUARD,
                useFactory: provideForRootGuard,
                deps: [[Router, new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"]()]]
              }, {
                provide: ROUTER_CONFIGURATION,
                useValue: config ? config : {}
              }, {
                provide: _angular_common__WEBPACK_IMPORTED_MODULE_0__["LocationStrategy"],
                useFactory: provideLocationStrategy,
                deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["PlatformLocation"], [new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["APP_BASE_HREF"]), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()], ROUTER_CONFIGURATION]
              }, {
                provide: RouterScroller,
                useFactory: createRouterScroller,
                deps: [Router, _angular_common__WEBPACK_IMPORTED_MODULE_0__["ViewportScroller"], ROUTER_CONFIGURATION]
              }, {
                provide: PreloadingStrategy,
                useExisting: config && config.preloadingStrategy ? config.preloadingStrategy : NoPreloading
              }, {
                provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgProbeToken"],
                multi: true,
                useFactory: routerNgProbeToken
              }, provideRouterInitializer()]
            };
          }
          /**
           * Creates a module with all the router directives and a provider registering routes,
           * without creating a new Router service.
           * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:
           *
           * ```
           * @NgModule({
           *   imports: [RouterModule.forChild(ROUTES)]
           * })
           * class MyNgModule {}
           * ```
           *
           * @param routes An array of `Route` objects that define the navigation paths for the submodule.
           * @return The new NgModule.
           *
           */

        }, {
          key: "forChild",
          value: function forChild(routes) {
            return {
              ngModule: RouterModule,
              providers: [provideRoutes(routes)]
            };
          }
        }]);

        return RouterModule;
      }();

      RouterModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({
        type: RouterModule
      });
      RouterModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({
        factory: function RouterModule_Factory(t) {
          return new (t || RouterModule)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](ROUTER_FORROOT_GUARD, 8), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](Router, 8));
        }
      });

      RouterModule.ctorParameters = function () {
        return [{
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [ROUTER_FORROOT_GUARD]
          }]
        }, {
          type: Router,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
          }]
        }];
      };

      (function () {
        (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsetNgModuleScope"](RouterModule, {
          declarations: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent],
          exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"],
          args: [{
            declarations: ROUTER_DIRECTIVES,
            exports: ROUTER_DIRECTIVES,
            entryComponents: [ɵEmptyOutletComponent]
          }]
        }], function () {
          return [{
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [ROUTER_FORROOT_GUARD]
            }]
          }, {
            type: Router,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
            }]
          }];
        }, null);
      })();

      function createRouterScroller(router, viewportScroller, config) {
        if (config.scrollOffset) {
          viewportScroller.setOffset(config.scrollOffset);
        }

        return new RouterScroller(router, viewportScroller, config);
      }

      function provideLocationStrategy(platformLocationStrategy, baseHref) {
        var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
        return options.useHash ? new _angular_common__WEBPACK_IMPORTED_MODULE_0__["HashLocationStrategy"](platformLocationStrategy, baseHref) : new _angular_common__WEBPACK_IMPORTED_MODULE_0__["PathLocationStrategy"](platformLocationStrategy, baseHref);
      }

      function provideForRootGuard(router) {
        if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) {
          throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");
        }

        return 'guarded';
      }
      /**
       * Registers a [DI provider](guide/glossary#provider) for a set of routes.
       * @param routes The route configuration to provide.
       *
       * @usageNotes
       *
       * ```
       * @NgModule({
       *   imports: [RouterModule.forChild(ROUTES)],
       *   providers: [provideRoutes(EXTRA_ROUTES)]
       * })
       * class MyNgModule {}
       * ```
       *
       * @publicApi
       */


      function provideRoutes(routes) {
        return [{
          provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ANALYZE_FOR_ENTRY_COMPONENTS"],
          multi: true,
          useValue: routes
        }, {
          provide: ROUTES,
          multi: true,
          useValue: routes
        }];
      }

      function setupRouter(urlSerializer, contexts, location, injector, loader, compiler, config) {
        var opts = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : {};
        var urlHandlingStrategy = arguments.length > 8 ? arguments[8] : undefined;
        var routeReuseStrategy = arguments.length > 9 ? arguments[9] : undefined;
        var router = new Router(null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));

        if (urlHandlingStrategy) {
          router.urlHandlingStrategy = urlHandlingStrategy;
        }

        if (routeReuseStrategy) {
          router.routeReuseStrategy = routeReuseStrategy;
        }

        assignExtraOptionsToRouter(opts, router);

        if (opts.enableTracing) {
          var dom = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])();
          router.events.subscribe(function (e) {
            dom.logGroup("Router Event: ".concat(e.constructor.name));
            dom.log(e.toString());
            dom.log(e);
            dom.logGroupEnd();
          });
        }

        return router;
      }

      function assignExtraOptionsToRouter(opts, router) {
        if (opts.errorHandler) {
          router.errorHandler = opts.errorHandler;
        }

        if (opts.malformedUriErrorHandler) {
          router.malformedUriErrorHandler = opts.malformedUriErrorHandler;
        }

        if (opts.onSameUrlNavigation) {
          router.onSameUrlNavigation = opts.onSameUrlNavigation;
        }

        if (opts.paramsInheritanceStrategy) {
          router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;
        }

        if (opts.relativeLinkResolution) {
          router.relativeLinkResolution = opts.relativeLinkResolution;
        }

        if (opts.urlUpdateStrategy) {
          router.urlUpdateStrategy = opts.urlUpdateStrategy;
        }
      }

      function rootRoute(router) {
        return router.routerState.root;
      }
      /**
       * Router initialization requires two steps:
       *
       * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if
       * a resolver or a guard executes asynchronously.
       *
       * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the
       * `afterPreactivation` hook provided by the router.
       * The router navigation starts, reaches the point when preactivation is done, and then
       * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.
       */


      var RouterInitializer = /*#__PURE__*/function () {
        function RouterInitializer(injector) {
          _classCallCheck(this, RouterInitializer);

          this.injector = injector;
          this.initNavigation = false;
          this.resultOfPreactivationDone = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
        }

        _createClass2(RouterInitializer, [{
          key: "appInitializer",
          value: function appInitializer() {
            var _this617 = this;

            var p = this.injector.get(_angular_common__WEBPACK_IMPORTED_MODULE_0__["LOCATION_INITIALIZED"], Promise.resolve(null));
            return p.then(function () {
              var resolve = null;
              var res = new Promise(function (r) {
                return resolve = r;
              });

              var router = _this617.injector.get(Router);

              var opts = _this617.injector.get(ROUTER_CONFIGURATION);

              if (opts.initialNavigation === 'disabled') {
                router.setUpLocationChangeListener();
                resolve(true);
              } else if ( // TODO: enabled is deprecated as of v11, can be removed in v13
              opts.initialNavigation === 'enabled' || opts.initialNavigation === 'enabledBlocking') {
                router.hooks.afterPreactivation = function () {
                  // only the initial navigation should be delayed
                  if (!_this617.initNavigation) {
                    _this617.initNavigation = true;
                    resolve(true);
                    return _this617.resultOfPreactivationDone; // subsequent navigations should not be delayed
                  } else {
                    return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null);
                  }
                };

                router.initialNavigation();
              } else {
                resolve(true);
              }

              return res;
            });
          }
        }, {
          key: "bootstrapListener",
          value: function bootstrapListener(bootstrappedComponentRef) {
            var opts = this.injector.get(ROUTER_CONFIGURATION);
            var preloader = this.injector.get(RouterPreloader);
            var routerScroller = this.injector.get(RouterScroller);
            var router = this.injector.get(Router);
            var ref = this.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"]);

            if (bootstrappedComponentRef !== ref.components[0]) {
              return;
            } // Default case


            if (opts.initialNavigation === 'enabledNonBlocking' || opts.initialNavigation === undefined) {
              router.initialNavigation();
            }

            preloader.setUpPreloading();
            routerScroller.init();
            router.resetRootComponentType(ref.componentTypes[0]);
            this.resultOfPreactivationDone.next(null);
            this.resultOfPreactivationDone.complete();
          }
        }]);

        return RouterInitializer;
      }();

      RouterInitializer.ɵfac = function RouterInitializer_Factory(t) {
        return new (t || RouterInitializer)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]));
      };

      RouterInitializer.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: RouterInitializer,
        factory: RouterInitializer.ɵfac
      });

      RouterInitializer.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterInitializer, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
          }];
        }, null);
      })();

      function getAppInitializer(r) {
        return r.appInitializer.bind(r);
      }

      function getBootstrapListener(r) {
        return r.bootstrapListener.bind(r);
      }
      /**
       * A [DI token](guide/glossary/#di-token) for the router initializer that
       * is called after the app is bootstrapped.
       *
       * @publicApi
       */


      var ROUTER_INITIALIZER = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('Router Initializer');

      function provideRouterInitializer() {
        return [RouterInitializer, {
          provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_INITIALIZER"],
          multi: true,
          useFactory: getAppInitializer,
          deps: [RouterInitializer]
        }, {
          provide: ROUTER_INITIALIZER,
          useFactory: getBootstrapListener,
          deps: [RouterInitializer]
        }, {
          provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_BOOTSTRAP_LISTENER"],
          multi: true,
          useExisting: ROUTER_INITIALIZER
        }];
      }
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @publicApi
       */


      var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Version"]('11.0.9');
      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */
      // This file only reexports content of the `src` folder. Keep it that way.

      /**
       * @license
       * Copyright Google LLC All Rights Reserved.
       *
       * Use of this source code is governed by an MIT-style license that can be
       * found in the LICENSE file at https://angular.io/license
       */

      /**
       * Generated bundle index. Do not edit.
       */
      //# sourceMappingURL=router.js.map

      /***/
    },

    /***/
    "uC2i":
    /*!*******************************************************************************!*\
      !*** ./node_modules/@ionic-native/core/__ivy_ngcc__/decorators/interfaces.js ***!
      \*******************************************************************************/

    /*! no exports provided */

    /***/
    function uC2i(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=interfaces.js.map

      /***/

    },

    /***/
    "uTdr":
    /*!****************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/onErrorResumeNext.js ***!
      \****************************************************************************/

    /*! exports provided: onErrorResumeNext, onErrorResumeNextStatic */

    /***/
    function uTdr(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function () {
        return onErrorResumeNext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "onErrorResumeNextStatic", function () {
        return onErrorResumeNextStatic;
      });
      /* harmony import */


      var _observable_from__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../observable/from */
      "Cfvw");
      /* harmony import */


      var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/isArray */
      "DH7j");
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function onErrorResumeNext() {
        for (var _len52 = arguments.length, nextSources = new Array(_len52), _key53 = 0; _key53 < _len52; _key53++) {
          nextSources[_key53] = arguments[_key53];
        }

        if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(nextSources[0])) {
          nextSources = nextSources[0];
        }

        return function (source) {
          return source.lift(new OnErrorResumeNextOperator(nextSources));
        };
      }

      function onErrorResumeNextStatic() {
        for (var _len53 = arguments.length, nextSources = new Array(_len53), _key54 = 0; _key54 < _len53; _key54++) {
          nextSources[_key54] = arguments[_key54];
        }

        var source = undefined;

        if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(nextSources[0])) {
          nextSources = nextSources[0];
        }

        source = nextSources.shift();
        return Object(_observable_from__WEBPACK_IMPORTED_MODULE_0__["from"])(source).lift(new OnErrorResumeNextOperator(nextSources));
      }

      var OnErrorResumeNextOperator = /*#__PURE__*/function () {
        function OnErrorResumeNextOperator(nextSources) {
          _classCallCheck(this, OnErrorResumeNextOperator);

          this.nextSources = nextSources;
        }

        _createClass2(OnErrorResumeNextOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));
          }
        }]);

        return OnErrorResumeNextOperator;
      }();

      var OnErrorResumeNextSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP19) {
        _inherits(OnErrorResumeNextSubscriber, _innerSubscribe__WEBP19);

        var _super291 = _createSuper(OnErrorResumeNextSubscriber);

        function OnErrorResumeNextSubscriber(destination, nextSources) {
          var _this618;

          _classCallCheck(this, OnErrorResumeNextSubscriber);

          _this618 = _super291.call(this, destination);
          _this618.destination = destination;
          _this618.nextSources = nextSources;
          return _this618;
        }

        _createClass2(OnErrorResumeNextSubscriber, [{
          key: "notifyError",
          value: function notifyError() {
            this.subscribeToNextSource();
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            this.subscribeToNextSource();
          }
        }, {
          key: "_error",
          value: function _error(err) {
            this.subscribeToNextSource();
            this.unsubscribe();
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.subscribeToNextSource();
            this.unsubscribe();
          }
        }, {
          key: "subscribeToNextSource",
          value: function subscribeToNextSource() {
            var next = this.nextSources.shift();

            if (!!next) {
              var innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this);
              var destination = this.destination;
              destination.add(innerSubscriber);
              var innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(next, innerSubscriber);

              if (innerSubscription !== innerSubscriber) {
                destination.add(innerSubscription);
              }
            } else {
              this.destination.complete();
            }
          }
        }]);

        return OnErrorResumeNextSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"]); //# sourceMappingURL=onErrorResumeNext.js.map

      /***/

    },

    /***/
    "un/a":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/retry.js ***!
      \****************************************************************/

    /*! exports provided: retry */

    /***/
    function unA(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "retry", function () {
        return retry;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function retry() {
        var count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
        return function (source) {
          return source.lift(new RetryOperator(count, source));
        };
      }

      var RetryOperator = /*#__PURE__*/function () {
        function RetryOperator(count, source) {
          _classCallCheck(this, RetryOperator);

          this.count = count;
          this.source = source;
        }

        _createClass2(RetryOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));
          }
        }]);

        return RetryOperator;
      }();

      var RetrySubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_43) {
        _inherits(RetrySubscriber, _Subscriber__WEBPACK_43);

        var _super292 = _createSuper(RetrySubscriber);

        function RetrySubscriber(destination, count, source) {
          var _this619;

          _classCallCheck(this, RetrySubscriber);

          _this619 = _super292.call(this, destination);
          _this619.count = count;
          _this619.source = source;
          return _this619;
        }

        _createClass2(RetrySubscriber, [{
          key: "error",
          value: function error(err) {
            if (!this.isStopped) {
              var source = this.source,
                  count = this.count;

              if (count === 0) {
                return _get(_getPrototypeOf(RetrySubscriber.prototype), "error", this).call(this, err);
              } else if (count > -1) {
                this.count = count - 1;
              }

              source.subscribe(this._unsubscribeAndRecycle());
            }
          }
        }]);

        return RetrySubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=retry.js.map

      /***/

    },

    /***/
    "uzXi":
    /*!***********************************************!*\
      !*** ./node_modules/@sentry/hub/esm/index.js ***!
      \***********************************************/

    /*! exports provided: addGlobalEventProcessor, Scope, Session, SessionFlusher, getActiveDomain, getCurrentHub, getHubFromCarrier, getMainCarrier, Hub, makeMain, setHubOnCarrier */

    /***/
    function uzXi(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _scope__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./scope */
      "KjyA");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "addGlobalEventProcessor", function () {
        return _scope__WEBPACK_IMPORTED_MODULE_0__["addGlobalEventProcessor"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Scope", function () {
        return _scope__WEBPACK_IMPORTED_MODULE_0__["Scope"];
      });
      /* harmony import */


      var _session__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./session */
      "xS++");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Session", function () {
        return _session__WEBPACK_IMPORTED_MODULE_1__["Session"];
      });
      /* harmony import */


      var _sessionflusher__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./sessionflusher */
      "JuT4");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "SessionFlusher", function () {
        return _sessionflusher__WEBPACK_IMPORTED_MODULE_2__["SessionFlusher"];
      });
      /* harmony import */


      var _hub__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./hub */
      "lW6c");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getActiveDomain", function () {
        return _hub__WEBPACK_IMPORTED_MODULE_3__["getActiveDomain"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getCurrentHub", function () {
        return _hub__WEBPACK_IMPORTED_MODULE_3__["getCurrentHub"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getHubFromCarrier", function () {
        return _hub__WEBPACK_IMPORTED_MODULE_3__["getHubFromCarrier"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getMainCarrier", function () {
        return _hub__WEBPACK_IMPORTED_MODULE_3__["getMainCarrier"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Hub", function () {
        return _hub__WEBPACK_IMPORTED_MODULE_3__["Hub"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "makeMain", function () {
        return _hub__WEBPACK_IMPORTED_MODULE_3__["makeMain"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setHubOnCarrier", function () {
        return _hub__WEBPACK_IMPORTED_MODULE_3__["setHubOnCarrier"];
      }); //# sourceMappingURL=index.js.map

      /***/

    },

    /***/
    "v06m":
    /*!*******************************************************************!*\
      !*** ./node_modules/@capacitor/clipboard/dist/esm/definitions.js ***!
      \*******************************************************************/

    /*! no exports provided */

    /***/
    function v06m(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=definitions.js.map

      /***/

    },

    /***/
    "vFt6":
    /*!***************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/browser.js ***!
      \***************************************************/

    /*! exports provided: htmlTreeAsString, getLocationHref */

    /***/
    function vFt6(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "htmlTreeAsString", function () {
        return htmlTreeAsString;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getLocationHref", function () {
        return getLocationHref;
      });
      /* harmony import */


      var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./global */
      "z+RT");
      /* harmony import */


      var _is__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./is */
      "9AQC");
      /**
       * Given a child DOM element, returns a query-selector statement describing that
       * and its ancestors
       * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
       * @returns generated DOM path
       */


      function htmlTreeAsString(elem, keyAttrs) {
        // try/catch both:
        // - accessing event.target (see getsentry/raven-js#838, #768)
        // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly
        // - can throw an exception in some circumstances.
        try {
          var currentElem = elem;
          var MAX_TRAVERSE_HEIGHT = 5;
          var MAX_OUTPUT_LEN = 80;
          var out = [];
          var height = 0;
          var len = 0;
          var separator = ' > ';
          var sepLength = separator.length;
          var nextStr = void 0; // eslint-disable-next-line no-plusplus

          while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {
            nextStr = _htmlElementAsString(currentElem, keyAttrs); // bail out if
            // - nextStr is the 'html' element
            // - the length of the string that would be created exceeds MAX_OUTPUT_LEN
            //   (ignore this limit if we are on the first iteration)

            if (nextStr === 'html' || height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN) {
              break;
            }

            out.push(nextStr);
            len += nextStr.length;
            currentElem = currentElem.parentNode;
          }

          return out.reverse().join(separator);
        } catch (_oO) {
          return '<unknown>';
        }
      }
      /**
       * Returns a simple, query-selector representation of a DOM element
       * e.g. [HTMLElement] => input#foo.btn[name=baz]
       * @returns generated DOM path
       */


      function _htmlElementAsString(el, keyAttrs) {
        var _a, _b;

        var elem = el;
        var out = [];
        var className;
        var classes;
        var key;
        var attr;
        var i;

        if (!elem || !elem.tagName) {
          return '';
        }

        out.push(elem.tagName.toLowerCase()); // Pairs of attribute keys defined in `serializeAttribute` and their values on element.

        var keyAttrPairs = ((_a = keyAttrs) === null || _a === void 0 ? void 0 : _a.length) ? keyAttrs.filter(function (keyAttr) {
          return elem.getAttribute(keyAttr);
        }).map(function (keyAttr) {
          return [keyAttr, elem.getAttribute(keyAttr)];
        }) : null;

        if ((_b = keyAttrPairs) === null || _b === void 0 ? void 0 : _b.length) {
          keyAttrPairs.forEach(function (keyAttrPair) {
            out.push("[" + keyAttrPair[0] + "=\"" + keyAttrPair[1] + "\"]");
          });
        } else {
          if (elem.id) {
            out.push("#" + elem.id);
          } // eslint-disable-next-line prefer-const


          className = elem.className;

          if (className && Object(_is__WEBPACK_IMPORTED_MODULE_1__["isString"])(className)) {
            classes = className.split(/\s+/);

            for (i = 0; i < classes.length; i++) {
              out.push("." + classes[i]);
            }
          }
        }

        var allowedAttrs = ['type', 'name', 'title', 'alt'];

        for (i = 0; i < allowedAttrs.length; i++) {
          key = allowedAttrs[i];
          attr = elem.getAttribute(key);

          if (attr) {
            out.push("[" + key + "=\"" + attr + "\"]");
          }
        }

        return out.join('');
      }
      /**
       * A safe form of location.href
       */


      function getLocationHref() {
        var global = Object(_global__WEBPACK_IMPORTED_MODULE_0__["getGlobalObject"])();

        try {
          return global.document.location.href;
        } catch (oO) {
          return '';
        }
      } //# sourceMappingURL=browser.js.map

      /***/

    },

    /***/
    "vkgz":
    /*!**************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/tap.js ***!
      \**************************************************************/

    /*! exports provided: tap */

    /***/
    function vkgz(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "tap", function () {
        return tap;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");
      /* harmony import */


      var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/noop */
      "KqfI");
      /* harmony import */


      var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../util/isFunction */
      "n6bG");

      function tap(nextOrObserver, error, complete) {
        return function tapOperatorFunction(source) {
          return source.lift(new DoOperator(nextOrObserver, error, complete));
        };
      }

      var DoOperator = /*#__PURE__*/function () {
        function DoOperator(nextOrObserver, error, complete) {
          _classCallCheck(this, DoOperator);

          this.nextOrObserver = nextOrObserver;
          this.error = error;
          this.complete = complete;
        }

        _createClass2(DoOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));
          }
        }]);

        return DoOperator;
      }();

      var TapSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_44) {
        _inherits(TapSubscriber, _Subscriber__WEBPACK_44);

        var _super293 = _createSuper(TapSubscriber);

        function TapSubscriber(destination, observerOrNext, error, complete) {
          var _this620;

          _classCallCheck(this, TapSubscriber);

          _this620 = _super293.call(this, destination);
          _this620._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];
          _this620._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];
          _this620._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];
          _this620._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];
          _this620._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];

          if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(observerOrNext)) {
            _this620._context = _assertThisInitialized(_this620);
            _this620._tapNext = observerOrNext;
          } else if (observerOrNext) {
            _this620._context = observerOrNext;
            _this620._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];
            _this620._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];
            _this620._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];
          }

          return _this620;
        }

        _createClass2(TapSubscriber, [{
          key: "_next",
          value: function _next(value) {
            try {
              this._tapNext.call(this._context, value);
            } catch (err) {
              this.destination.error(err);
              return;
            }

            this.destination.next(value);
          }
        }, {
          key: "_error",
          value: function _error(err) {
            try {
              this._tapError.call(this._context, err);
            } catch (err) {
              this.destination.error(err);
              return;
            }

            this.destination.error(err);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            try {
              this._tapComplete.call(this._context);
            } catch (err) {
              this.destination.error(err);
              return;
            }

            return this.destination.complete();
          }
        }]);

        return TapSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=tap.js.map

      /***/

    },

    /***/
    "vqkR":
    /*!********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/skipUntil.js ***!
      \********************************************************************/

    /*! exports provided: skipUntil */

    /***/
    function vqkR(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "skipUntil", function () {
        return skipUntil;
      });
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function skipUntil(notifier) {
        return function (source) {
          return source.lift(new SkipUntilOperator(notifier));
        };
      }

      var SkipUntilOperator = /*#__PURE__*/function () {
        function SkipUntilOperator(notifier) {
          _classCallCheck(this, SkipUntilOperator);

          this.notifier = notifier;
        }

        _createClass2(SkipUntilOperator, [{
          key: "call",
          value: function call(destination, source) {
            return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
          }
        }]);

        return SkipUntilOperator;
      }();

      var SkipUntilSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP20) {
        _inherits(SkipUntilSubscriber, _innerSubscribe__WEBP20);

        var _super294 = _createSuper(SkipUntilSubscriber);

        function SkipUntilSubscriber(destination, notifier) {
          var _this621;

          _classCallCheck(this, SkipUntilSubscriber);

          _this621 = _super294.call(this, destination);
          _this621.hasValue = false;
          var innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](_assertThisInitialized(_this621));

          _this621.add(innerSubscriber);

          _this621.innerSubscription = innerSubscriber;
          var innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(notifier, innerSubscriber);

          if (innerSubscription !== innerSubscriber) {
            _this621.add(innerSubscription);

            _this621.innerSubscription = innerSubscription;
          }

          return _this621;
        }

        _createClass2(SkipUntilSubscriber, [{
          key: "_next",
          value: function _next(value) {
            if (this.hasValue) {
              _get(_getPrototypeOf(SkipUntilSubscriber.prototype), "_next", this).call(this, value);
            }
          }
        }, {
          key: "notifyNext",
          value: function notifyNext() {
            this.hasValue = true;

            if (this.innerSubscription) {
              this.innerSubscription.unsubscribe();
            }
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {}
        }]);

        return SkipUntilSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"]); //# sourceMappingURL=skipUntil.js.map

      /***/

    },

    /***/
    "vzc1":
    /*!*****************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/helpers.js ***!
      \*****************************************************/

    /*! exports provided: shouldIgnoreOnError, ignoreNextOnError, wrap, injectReportDialog */

    /***/
    function vzc1(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "shouldIgnoreOnError", function () {
        return shouldIgnoreOnError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ignoreNextOnError", function () {
        return ignoreNextOnError;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "wrap", function () {
        return wrap;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "injectReportDialog", function () {
        return injectReportDialog;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/core */
      "wBhU");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");

      var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["getGlobalObject"])();
      var ignoreOnError = 0;
      /**
       * @hidden
       */

      function shouldIgnoreOnError() {
        return ignoreOnError > 0;
      }
      /**
       * @hidden
       */


      function ignoreNextOnError() {
        // onerror should trigger before setTimeout
        ignoreOnError += 1;
        setTimeout(function () {
          ignoreOnError -= 1;
        });
      }
      /**
       * Instruments the given function and sends an event to Sentry every time the
       * function throws an exception.
       *
       * @param fn A function to wrap.
       * @returns The wrapped function.
       * @hidden
       */


      function wrap(fn, options, before) {
        if (options === void 0) {
          options = {};
        }

        if (typeof fn !== 'function') {
          return fn;
        }

        try {
          // We don't wanna wrap it twice
          if (fn.__sentry__) {
            return fn;
          } // If this has already been wrapped in the past, return that wrapped function


          if (fn.__sentry_wrapped__) {
            return fn.__sentry_wrapped__;
          }
        } catch (e) {
          // Just accessing custom props in some Selenium environments
          // can cause a "Permission denied" exception (see raven-js#495).
          // Bail on wrapping and return the function as-is (defers to window.onerror).
          return fn;
        }
        /* eslint-disable prefer-rest-params */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any


        var sentryWrapped = function sentryWrapped() {
          var args = Array.prototype.slice.call(arguments);

          try {
            if (before && typeof before === 'function') {
              before.apply(this, arguments);
            } // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access


            var wrappedArguments = args.map(function (arg) {
              return wrap(arg, options);
            });

            if (fn.handleEvent) {
              // Attempt to invoke user-land function
              // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
              //       means the sentry.javascript SDK caught an error invoking your application code. This
              //       is expected behavior and NOT indicative of a bug with sentry.javascript.
              // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
              return fn.handleEvent.apply(this, wrappedArguments);
            } // Attempt to invoke user-land function
            // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
            //       means the sentry.javascript SDK caught an error invoking your application code. This
            //       is expected behavior and NOT indicative of a bug with sentry.javascript.


            return fn.apply(this, wrappedArguments);
          } catch (ex) {
            ignoreNextOnError();
            Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["withScope"])(function (scope) {
              scope.addEventProcessor(function (event) {
                var processedEvent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, event);

                if (options.mechanism) {
                  Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["addExceptionTypeValue"])(processedEvent, undefined, undefined);
                  Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["addExceptionMechanism"])(processedEvent, options.mechanism);
                }

                processedEvent.extra = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, processedEvent.extra), {
                  arguments: args
                });
                return processedEvent;
              });
              Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["captureException"])(ex);
            });
            throw ex;
          }
        };
        /* eslint-enable prefer-rest-params */
        // Accessing some objects may throw
        // ref: https://github.com/getsentry/sentry-javascript/issues/1168


        try {
          for (var property in fn) {
            if (Object.prototype.hasOwnProperty.call(fn, property)) {
              sentryWrapped[property] = fn[property];
            }
          }
        } catch (_oO) {} // eslint-disable-line no-empty


        fn.prototype = fn.prototype || {};
        sentryWrapped.prototype = fn.prototype;
        Object.defineProperty(fn, '__sentry_wrapped__', {
          enumerable: false,
          value: sentryWrapped
        }); // Signal that this function has been wrapped/filled already
        // for both debugging and to prevent it to being wrapped/filled twice

        Object.defineProperties(sentryWrapped, {
          __sentry__: {
            enumerable: false,
            value: true
          },
          __sentry_original__: {
            enumerable: false,
            value: fn
          }
        }); // Restore original function name (not all browsers allow that)

        try {
          var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');

          if (descriptor.configurable) {
            Object.defineProperty(sentryWrapped, 'name', {
              get: function get() {
                return fn.name;
              }
            });
          } // eslint-disable-next-line no-empty

        } catch (_oO) {}

        return sentryWrapped;
      }
      /**
       * Injects the Report Dialog script
       * @hidden
       */


      function injectReportDialog(options) {
        if (options === void 0) {
          options = {};
        }

        if (!global.document) {
          return;
        }

        if (!options.eventId) {
          _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].error("Missing eventId option in showReportDialog call");

          return;
        }

        if (!options.dsn) {
          _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].error("Missing dsn option in showReportDialog call");

          return;
        }

        var script = global.document.createElement('script');
        script.async = true;
        script.src = new _sentry_core__WEBPACK_IMPORTED_MODULE_1__["API"](options.dsn).getReportDialogEndpoint(options);

        if (options.onLoad) {
          // eslint-disable-next-line @typescript-eslint/unbound-method
          script.onload = options.onLoad;
        }

        var injectionPoint = global.document.head || global.document.body;

        if (injectionPoint) {
          injectionPoint.appendChild(script);
        }
      } //# sourceMappingURL=helpers.js.map

      /***/

    },

    /***/
    "w1tV":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/share.js ***!
      \****************************************************************/

    /*! exports provided: share */

    /***/
    function w1tV(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "share", function () {
        return share;
      });
      /* harmony import */


      var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./multicast */
      "oB13");
      /* harmony import */


      var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./refCount */
      "x+ZX");
      /* harmony import */


      var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../Subject */
      "XNiG");

      function shareSubjectFactory() {
        return new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
      }

      function share() {
        return function (source) {
          return Object(_refCount__WEBPACK_IMPORTED_MODULE_1__["refCount"])()(Object(_multicast__WEBPACK_IMPORTED_MODULE_0__["multicast"])(shareSubjectFactory)(source));
        };
      } //# sourceMappingURL=share.js.map

      /***/

    },

    /***/
    "wBhU":
    /*!************************************************!*\
      !*** ./node_modules/@sentry/core/esm/index.js ***!
      \************************************************/

    /*! exports provided: addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, startTransaction, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, makeMain, Scope, API, BaseClient, BaseBackend, eventToSentryRequest, sessionToSentryRequest, initAndBind, NoopTransport, SDK_VERSION, Integrations */

    /***/
    function wBhU(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _sentry_minimal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/minimal */
      "gtzJ");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "addBreadcrumb", function () {
        return _sentry_minimal__WEBPACK_IMPORTED_MODULE_0__["addBreadcrumb"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "captureException", function () {
        return _sentry_minimal__WEBPACK_IMPORTED_MODULE_0__["captureException"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "captureEvent", function () {
        return _sentry_minimal__WEBPACK_IMPORTED_MODULE_0__["captureEvent"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "captureMessage", function () {
        return _sentry_minimal__WEBPACK_IMPORTED_MODULE_0__["captureMessage"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "configureScope", function () {
        return _sentry_minimal__WEBPACK_IMPORTED_MODULE_0__["configureScope"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "startTransaction", function () {
        return _sentry_minimal__WEBPACK_IMPORTED_MODULE_0__["startTransaction"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setContext", function () {
        return _sentry_minimal__WEBPACK_IMPORTED_MODULE_0__["setContext"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setExtra", function () {
        return _sentry_minimal__WEBPACK_IMPORTED_MODULE_0__["setExtra"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setExtras", function () {
        return _sentry_minimal__WEBPACK_IMPORTED_MODULE_0__["setExtras"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setTag", function () {
        return _sentry_minimal__WEBPACK_IMPORTED_MODULE_0__["setTag"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setTags", function () {
        return _sentry_minimal__WEBPACK_IMPORTED_MODULE_0__["setTags"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "setUser", function () {
        return _sentry_minimal__WEBPACK_IMPORTED_MODULE_0__["setUser"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "withScope", function () {
        return _sentry_minimal__WEBPACK_IMPORTED_MODULE_0__["withScope"];
      });
      /* harmony import */


      var _sentry_hub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/hub */
      "uzXi");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "addGlobalEventProcessor", function () {
        return _sentry_hub__WEBPACK_IMPORTED_MODULE_1__["addGlobalEventProcessor"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getCurrentHub", function () {
        return _sentry_hub__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "getHubFromCarrier", function () {
        return _sentry_hub__WEBPACK_IMPORTED_MODULE_1__["getHubFromCarrier"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Hub", function () {
        return _sentry_hub__WEBPACK_IMPORTED_MODULE_1__["Hub"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "makeMain", function () {
        return _sentry_hub__WEBPACK_IMPORTED_MODULE_1__["makeMain"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "Scope", function () {
        return _sentry_hub__WEBPACK_IMPORTED_MODULE_1__["Scope"];
      });
      /* harmony import */


      var _api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./api */
      "3MsT");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "API", function () {
        return _api__WEBPACK_IMPORTED_MODULE_2__["API"];
      });
      /* harmony import */


      var _baseclient__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./baseclient */
      "oMcV");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "BaseClient", function () {
        return _baseclient__WEBPACK_IMPORTED_MODULE_3__["BaseClient"];
      });
      /* harmony import */


      var _basebackend__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./basebackend */
      "/3cH");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "BaseBackend", function () {
        return _basebackend__WEBPACK_IMPORTED_MODULE_4__["BaseBackend"];
      });
      /* harmony import */


      var _request__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./request */
      "KRiW");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "eventToSentryRequest", function () {
        return _request__WEBPACK_IMPORTED_MODULE_5__["eventToSentryRequest"];
      });
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "sessionToSentryRequest", function () {
        return _request__WEBPACK_IMPORTED_MODULE_5__["sessionToSentryRequest"];
      });
      /* harmony import */


      var _sdk__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ./sdk */
      "QQmx");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "initAndBind", function () {
        return _sdk__WEBPACK_IMPORTED_MODULE_6__["initAndBind"];
      });
      /* harmony import */


      var _transports_noop__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! ./transports/noop */
      "31uO");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "NoopTransport", function () {
        return _transports_noop__WEBPACK_IMPORTED_MODULE_7__["NoopTransport"];
      });
      /* harmony import */


      var _version__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
      /*! ./version */
      "+KVS");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "SDK_VERSION", function () {
        return _version__WEBPACK_IMPORTED_MODULE_8__["SDK_VERSION"];
      });
      /* harmony import */


      var _integrations__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
      /*! ./integrations */
      "ox7Z");
      /* harmony reexport (module object) */


      __webpack_require__.d(__webpack_exports__, "Integrations", function () {
        return _integrations__WEBPACK_IMPORTED_MODULE_9__;
      }); //# sourceMappingURL=index.js.map

      /***/

    },

    /***/
    "wCA9":
    /*!************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/memo.js ***!
      \************************************************/

    /*! exports provided: Memo */

    /***/
    function wCA9(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Memo", function () {
        return Memo;
      });
      /* eslint-disable @typescript-eslint/no-unsafe-member-access */

      /* eslint-disable @typescript-eslint/no-explicit-any */

      /* eslint-disable @typescript-eslint/explicit-module-boundary-types */

      /**
       * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.
       */


      var Memo =
      /** @class */
      function () {
        function Memo() {
          this._hasWeakSet = typeof WeakSet === 'function';
          this._inner = this._hasWeakSet ? new WeakSet() : [];
        }
        /**
         * Sets obj to remember.
         * @param obj Object to remember
         */


        Memo.prototype.memoize = function (obj) {
          if (this._hasWeakSet) {
            if (this._inner.has(obj)) {
              return true;
            }

            this._inner.add(obj);

            return false;
          } // eslint-disable-next-line @typescript-eslint/prefer-for-of


          for (var i = 0; i < this._inner.length; i++) {
            var value = this._inner[i];

            if (value === obj) {
              return true;
            }
          }

          this._inner.push(obj);

          return false;
        };
        /**
         * Removes object from internal storage.
         * @param obj Object to forget
         */


        Memo.prototype.unmemoize = function (obj) {
          if (this._hasWeakSet) {
            this._inner["delete"](obj);
          } else {
            for (var i = 0; i < this._inner.length; i++) {
              if (this._inner[i] === obj) {
                this._inner.splice(i, 1);

                break;
              }
            }
          }
        };

        return Memo;
      }(); //# sourceMappingURL=memo.js.map

      /***/

    },

    /***/
    "wEJo":
    /*!*************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/index-7a8b7a1c.js ***!
      \*************************************************************/

    /*! exports provided: B, C, H, N, a, b, c, d, e, f, g, h, i, j, k, p, r, s, w */

    /***/
    function wEJo(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "B", function () {
        return Build;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "C", function () {
        return CSS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "H", function () {
        return Host;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "N", function () {
        return NAMESPACE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "a", function () {
        return promiseResolve;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "b", function () {
        return bootstrapLazy;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "c", function () {
        return writeTask;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "d", function () {
        return doc;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "e", function () {
        return createEvent;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "f", function () {
        return readTask;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "g", function () {
        return getMode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "h", function () {
        return h;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "i", function () {
        return getElement;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "j", function () {
        return forceUpdate;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "k", function () {
        return getAssetPath;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "p", function () {
        return plt;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "r", function () {
        return registerInstance;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "s", function () {
        return setMode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "w", function () {
        return win;
      });

      var NAMESPACE = 'ionic';
      var scopeId;
      var contentRef;
      var hostTagName;
      var useNativeShadowDom = false;
      var checkSlotFallbackVisibility = false;
      var checkSlotRelocate = false;
      var isSvgMode = false;
      var queuePending = false;
      var win = typeof window !== 'undefined' ? window : {};
      var CSS = win.CSS;
      var doc = win.document || {
        head: {}
      };
      var plt = {
        $flags$: 0,
        $resourcesUrl$: '',
        jmp: function jmp(h) {
          return h();
        },
        raf: function raf(h) {
          return requestAnimationFrame(h);
        },
        ael: function ael(el, eventName, listener, opts) {
          return el.addEventListener(eventName, listener, opts);
        },
        rel: function rel(el, eventName, listener, opts) {
          return el.removeEventListener(eventName, listener, opts);
        },
        ce: function ce(eventName, opts) {
          return new CustomEvent(eventName, opts);
        }
      };

      var supportsShadow = /*@__PURE__*/function () {
        return (doc.head.attachShadow + '').indexOf('[native') > -1;
      }();

      var promiseResolve = function promiseResolve(v) {
        return Promise.resolve(v);
      };

      var supportsConstructibleStylesheets = /*@__PURE__*/function () {
        try {
          new CSSStyleSheet();
          return typeof new CSSStyleSheet().replace === 'function';
        } catch (e) {}

        return false;
      }();

      var addHostEventListeners = function addHostEventListeners(elm, hostRef, listeners, attachParentListeners) {
        if (listeners) {
          listeners.map(function (_ref112) {
            var _ref113 = _slicedToArray(_ref112, 3),
                flags = _ref113[0],
                name = _ref113[1],
                method = _ref113[2];

            var target = getHostListenerTarget(elm, flags);
            var handler = hostListenerProxy(hostRef, method);
            var opts = hostListenerOpts(flags);
            plt.ael(target, name, handler, opts);
            (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(function () {
              return plt.rel(target, name, handler, opts);
            });
          });
        }
      };

      var hostListenerProxy = function hostListenerProxy(hostRef, methodName) {
        return function (ev) {
          try {
            {
              if (hostRef.$flags$ & 256
              /* isListenReady */
              ) {
                // instance is ready, let's call it's member method for this event
                hostRef.$lazyInstance$[methodName](ev);
              } else {
                (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
              }
            }
          } catch (e) {
            consoleError(e);
          }
        };
      };

      var getHostListenerTarget = function getHostListenerTarget(elm, flags) {
        if (flags & 4
        /* TargetDocument */
        ) return doc;
        if (flags & 8
        /* TargetWindow */
        ) return win;
        if (flags & 16
        /* TargetBody */
        ) return doc.body;
        return elm;
      }; // prettier-ignore


      var hostListenerOpts = function hostListenerOpts(flags) {
        return (flags & 2
        /* Capture */
        ) !== 0;
      };

      var CONTENT_REF_ID = 'r';
      var ORG_LOCATION_ID = 'o';
      var SLOT_NODE_ID = 's';
      var TEXT_NODE_ID = 't';
      var HYDRATE_ID = 's-id';
      var HYDRATED_STYLE_ID = 'sty-id';
      var HYDRATE_CHILD_ID = 'c-id';
      var HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
      var XLINK_NS = 'http://www.w3.org/1999/xlink';

      var createTime = function createTime(fnName) {
        var tagName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
        {
          return function () {
            return;
          };
        }
      };

      var uniqueTime = function uniqueTime(key, measureText) {
        {
          return function () {
            return;
          };
        }
      };

      var rootAppliedStyles = new WeakMap();

      var registerStyle = function registerStyle(scopeId, cssText, allowCS) {
        var style = styles.get(scopeId);

        if (supportsConstructibleStylesheets && allowCS) {
          style = style || new CSSStyleSheet();
          style.replace(cssText);
        } else {
          style = cssText;
        }

        styles.set(scopeId, style);
      };

      var addStyle = function addStyle(styleContainerNode, cmpMeta, mode, hostElm) {
        var scopeId = getScopeId(cmpMeta, mode);
        var style = styles.get(scopeId); // if an element is NOT connected then getRootNode() will return the wrong root node
        // so the fallback is to always use the document for the root node in those cases

        styleContainerNode = styleContainerNode.nodeType === 11
        /* DocumentFragment */
        ? styleContainerNode : doc;

        if (style) {
          if (typeof style === 'string') {
            styleContainerNode = styleContainerNode.head || styleContainerNode;
            var appliedStyles = rootAppliedStyles.get(styleContainerNode);
            var styleElm;

            if (!appliedStyles) {
              rootAppliedStyles.set(styleContainerNode, appliedStyles = new Set());
            }

            if (!appliedStyles.has(scopeId)) {
              if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector("[".concat(HYDRATED_STYLE_ID, "=\"").concat(scopeId, "\"]")))) {
                // This is only happening on native shadow-dom, do not needs CSS var shim
                styleElm.innerHTML = style;
              } else {
                if (plt.$cssShim$) {
                  styleElm = plt.$cssShim$.createHostStyle(hostElm, scopeId, style, !!(cmpMeta.$flags$ & 10
                  /* needsScopedEncapsulation */
                  ));
                  var newScopeId = styleElm['s-sc'];

                  if (newScopeId) {
                    scopeId = newScopeId; // we don't want to add this styleID to the appliedStyles Set
                    // since the cssVarShim might need to apply several different
                    // stylesheets for the same component

                    appliedStyles = null;
                  }
                } else {
                  styleElm = doc.createElement('style');
                  styleElm.innerHTML = style;
                }

                styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
              }

              if (appliedStyles) {
                appliedStyles.add(scopeId);
              }
            }
          } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
            styleContainerNode.adoptedStyleSheets = [].concat(_toConsumableArray(styleContainerNode.adoptedStyleSheets), [style]);
          }
        }

        return scopeId;
      };

      var attachStyles = function attachStyles(hostRef) {
        var cmpMeta = hostRef.$cmpMeta$;
        var elm = hostRef.$hostElement$;
        var flags = cmpMeta.$flags$;
        var endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
        var scopeId = addStyle(supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta, hostRef.$modeName$, elm);

        if (flags & 10
        /* needsScopedEncapsulation */
        ) {
          // only required when we're NOT using native shadow dom (slot)
          // or this browser doesn't support native shadow dom
          // and this host element was NOT created with SSR
          // let's pick out the inner content for slot projection
          // create a node to represent where the original
          // content was first placed, which is useful later on
          // DOM WRITE!!
          elm['s-sc'] = scopeId;
          elm.classList.add(scopeId + '-h');

          if (flags & 2
          /* scopedCssEncapsulation */
          ) {
            elm.classList.add(scopeId + '-s');
          }
        }

        endAttachStyles();
      };

      var getScopeId = function getScopeId(cmp, mode) {
        return 'sc-' + (mode && cmp.$flags$ & 32
        /* hasMode */
        ? cmp.$tagName$ + '-' + mode : cmp.$tagName$);
      };

      var convertScopedToShadow = function convertScopedToShadow(css) {
        return css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{');
      }; // Private


      var computeMode = function computeMode(elm) {
        return modeResolutionChain.map(function (h) {
          return h(elm);
        }).find(function (m) {
          return !!m;
        });
      }; // Public


      var setMode = function setMode(handler) {
        return modeResolutionChain.push(handler);
      };

      var getMode = function getMode(ref) {
        return getHostRef(ref).$modeName$;
      };
      /**
       * Default style mode id
       */

      /**
       * Reusable empty obj/array
       * Don't add values to these!!
       */


      var EMPTY_OBJ = {};
      /**
       * Namespaces
       */

      var SVG_NS = 'http://www.w3.org/2000/svg';
      var HTML_NS = 'http://www.w3.org/1999/xhtml';

      var isDef = function isDef(v) {
        return v != null;
      };

      var isComplexType = function isComplexType(o) {
        // https://jsperf.com/typeof-fn-object/5
        o = typeof o;
        return o === 'object' || o === 'function';
      };
      /**
       * Production h() function based on Preact by
       * Jason Miller (@developit)
       * Licensed under the MIT License
       * https://github.com/developit/preact/blob/master/LICENSE
       *
       * Modified for Stencil's compiler and vdom
       */
      // const stack: any[] = [];
      // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
      // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;


      var h = function h(nodeName, vnodeData) {
        var child = null;
        var key = null;
        var slotName = null;
        var simple = false;
        var lastSimple = false;
        var vNodeChildren = [];

        var walk = function walk(c) {
          for (var i = 0; i < c.length; i++) {
            child = c[i];

            if (Array.isArray(child)) {
              walk(child);
            } else if (child != null && typeof child !== 'boolean') {
              if (simple = typeof nodeName !== 'function' && !isComplexType(child)) {
                child = String(child);
              }

              if (simple && lastSimple) {
                // If the previous child was simple (string), we merge both
                vNodeChildren[vNodeChildren.length - 1].$text$ += child;
              } else {
                // Append a new vNode, if it's text, we create a text vNode
                vNodeChildren.push(simple ? newVNode(null, child) : child);
              }

              lastSimple = simple;
            }
          }
        };

        for (var _len54 = arguments.length, children = new Array(_len54 > 2 ? _len54 - 2 : 0), _key55 = 2; _key55 < _len54; _key55++) {
          children[_key55 - 2] = arguments[_key55];
        }

        walk(children);

        if (vnodeData) {
          // normalize class / classname attributes
          if (vnodeData.key) {
            key = vnodeData.key;
          }

          if (vnodeData.name) {
            slotName = vnodeData.name;
          }

          {
            var classData = vnodeData.className || vnodeData["class"];

            if (classData) {
              vnodeData["class"] = typeof classData !== 'object' ? classData : Object.keys(classData).filter(function (k) {
                return classData[k];
              }).join(' ');
            }
          }
        }

        if (typeof nodeName === 'function') {
          // nodeName is a functional component
          return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
        }

        var vnode = newVNode(nodeName, null);
        vnode.$attrs$ = vnodeData;

        if (vNodeChildren.length > 0) {
          vnode.$children$ = vNodeChildren;
        }

        {
          vnode.$key$ = key;
        }
        {
          vnode.$name$ = slotName;
        }
        return vnode;
      };

      var newVNode = function newVNode(tag, text) {
        var vnode = {
          $flags$: 0,
          $tag$: tag,
          $text$: text,
          $elm$: null,
          $children$: null
        };
        {
          vnode.$attrs$ = null;
        }
        {
          vnode.$key$ = null;
        }
        {
          vnode.$name$ = null;
        }
        return vnode;
      };

      var Host = {};

      var isHost = function isHost(node) {
        return node && node.$tag$ === Host;
      };

      var vdomFnUtils = {
        forEach: function forEach(children, cb) {
          return children.map(convertToPublic).forEach(cb);
        },
        map: function map(children, cb) {
          return children.map(convertToPublic).map(cb).map(convertToPrivate);
        }
      };

      var convertToPublic = function convertToPublic(node) {
        return {
          vattrs: node.$attrs$,
          vchildren: node.$children$,
          vkey: node.$key$,
          vname: node.$name$,
          vtag: node.$tag$,
          vtext: node.$text$
        };
      };

      var convertToPrivate = function convertToPrivate(node) {
        if (typeof node.vtag === 'function') {
          var vnodeData = Object.assign({}, node.vattrs);

          if (node.vkey) {
            vnodeData.key = node.vkey;
          }

          if (node.vname) {
            vnodeData.name = node.vname;
          }

          return h.apply(void 0, [node.vtag, vnodeData].concat(_toConsumableArray(node.vchildren || [])));
        }

        var vnode = newVNode(node.vtag, node.vtext);
        vnode.$attrs$ = node.vattrs;
        vnode.$children$ = node.vchildren;
        vnode.$key$ = node.vkey;
        vnode.$name$ = node.vname;
        return vnode;
      };
      /**
       * Production setAccessor() function based on Preact by
       * Jason Miller (@developit)
       * Licensed under the MIT License
       * https://github.com/developit/preact/blob/master/LICENSE
       *
       * Modified for Stencil's compiler and vdom
       */


      var setAccessor = function setAccessor(elm, memberName, oldValue, newValue, isSvg, flags) {
        if (oldValue !== newValue) {
          var isProp = isMemberInElement(elm, memberName);
          var ln = memberName.toLowerCase();

          if (memberName === 'class') {
            var classList = elm.classList;
            var oldClasses = parseClassList(oldValue);
            var newClasses = parseClassList(newValue);
            classList.remove.apply(classList, _toConsumableArray(oldClasses.filter(function (c) {
              return c && !newClasses.includes(c);
            })));
            classList.add.apply(classList, _toConsumableArray(newClasses.filter(function (c) {
              return c && !oldClasses.includes(c);
            })));
          } else if (memberName === 'style') {
            // update style attribute, css properties and values
            {
              for (var prop in oldValue) {
                if (!newValue || newValue[prop] == null) {
                  if (prop.includes('-')) {
                    elm.style.removeProperty(prop);
                  } else {
                    elm.style[prop] = '';
                  }
                }
              }
            }

            for (var _prop in newValue) {
              if (!oldValue || newValue[_prop] !== oldValue[_prop]) {
                if (_prop.includes('-')) {
                  elm.style.setProperty(_prop, newValue[_prop]);
                } else {
                  elm.style[_prop] = newValue[_prop];
                }
              }
            }
          } else if (memberName === 'key') ;else if (memberName === 'ref') {
            // minifier will clean this up
            if (newValue) {
              newValue(elm);
            }
          } else if (!isProp && memberName[0] === 'o' && memberName[1] === 'n') {
            // Event Handlers
            // so if the member name starts with "on" and the 3rd characters is
            // a capital letter, and it's not already a member on the element,
            // then we're assuming it's an event listener
            if (memberName[2] === '-') {
              // on- prefixed events
              // allows to be explicit about the dom event to listen without any magic
              // under the hood:
              // <my-cmp on-click> // listens for "click"
              // <my-cmp on-Click> // listens for "Click"
              // <my-cmp on-ionChange> // listens for "ionChange"
              // <my-cmp on-EVENTS> // listens for "EVENTS"
              memberName = memberName.slice(3);
            } else if (isMemberInElement(win, ln)) {
              // standard event
              // the JSX attribute could have been "onMouseOver" and the
              // member name "onmouseover" is on the window's prototype
              // so let's add the listener "mouseover", which is all lowercased
              memberName = ln.slice(2);
            } else {
              // custom event
              // the JSX attribute could have been "onMyCustomEvent"
              // so let's trim off the "on" prefix and lowercase the first character
              // and add the listener "myCustomEvent"
              // except for the first character, we keep the event name case
              memberName = ln[2] + memberName.slice(3);
            }

            if (oldValue) {
              plt.rel(elm, memberName, oldValue, false);
            }

            if (newValue) {
              plt.ael(elm, memberName, newValue, false);
            }
          } else {
            // Set property if it exists and it's not a SVG
            var isComplex = isComplexType(newValue);

            if ((isProp || isComplex && newValue !== null) && !isSvg) {
              try {
                if (!elm.tagName.includes('-')) {
                  var n = newValue == null ? '' : newValue; // Workaround for Safari, moving the <input> caret when re-assigning the same valued

                  if (memberName === 'list') {
                    isProp = false; // tslint:disable-next-line: triple-equals
                  } else if (oldValue == null || elm[memberName] != n) {
                    elm[memberName] = n;
                  }
                } else {
                  elm[memberName] = newValue;
                }
              } catch (e) {}
            }
            /**
             * Need to manually update attribute if:
             * - memberName is not an attribute
             * - if we are rendering the host element in order to reflect attribute
             * - if it's a SVG, since properties might not work in <svg>
             * - if the newValue is null/undefined or 'false'.
             */


            var xlink = false;
            {
              if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
                memberName = ln;
                xlink = true;
              }
            }

            if (newValue == null || newValue === false) {
              if (newValue !== false || elm.getAttribute(memberName) === '') {
                if (xlink) {
                  elm.removeAttributeNS(XLINK_NS, memberName);
                } else {
                  elm.removeAttribute(memberName);
                }
              }
            } else if ((!isProp || flags & 4
            /* isHost */
            || isSvg) && !isComplex) {
              newValue = newValue === true ? '' : newValue;

              if (xlink) {
                elm.setAttributeNS(XLINK_NS, memberName, newValue);
              } else {
                elm.setAttribute(memberName, newValue);
              }
            }
          }
        }
      };

      var parseClassListRegex = /\s/;

      var parseClassList = function parseClassList(value) {
        return !value ? [] : value.split(parseClassListRegex);
      };

      var updateElement = function updateElement(oldVnode, newVnode, isSvgMode, memberName) {
        // if the element passed in is a shadow root, which is a document fragment
        // then we want to be adding attrs/props to the shadow root's "host" element
        // if it's not a shadow root, then we add attrs/props to the same element
        var elm = newVnode.$elm$.nodeType === 11
        /* DocumentFragment */
        && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
        var oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
        var newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
        {
          // remove attributes no longer present on the vnode by setting them to undefined
          for (memberName in oldVnodeAttrs) {
            if (!(memberName in newVnodeAttrs)) {
              setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
            }
          }
        } // add new & update changed attributes

        for (memberName in newVnodeAttrs) {
          setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
        }
      };

      var createElm = function createElm(oldParentVNode, newParentVNode, childIndex, parentElm) {
        // tslint:disable-next-line: prefer-const
        var newVNode = newParentVNode.$children$[childIndex];
        var i = 0;
        var elm;
        var childNode;
        var oldVNode;

        if (!useNativeShadowDom) {
          // remember for later we need to check to relocate nodes
          checkSlotRelocate = true;

          if (newVNode.$tag$ === 'slot') {
            if (scopeId) {
              // scoped css needs to add its scoped id to the parent element
              parentElm.classList.add(scopeId + '-s');
            }

            newVNode.$flags$ |= newVNode.$children$ ? // slot element has fallback content
            2
            /* isSlotFallback */
            : // slot element does not have fallback content
            1
            /* isSlotReference */
            ;
          }
        }

        if (newVNode.$text$ !== null) {
          // create text node
          elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
        } else if (newVNode.$flags$ & 1
        /* isSlotReference */
        ) {
          // create a slot reference node
          elm = newVNode.$elm$ = doc.createTextNode('');
        } else {
          if (!isSvgMode) {
            isSvgMode = newVNode.$tag$ === 'svg';
          } // create element


          elm = newVNode.$elm$ = doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2
          /* isSlotFallback */
          ? 'slot-fb' : newVNode.$tag$);

          if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
            isSvgMode = false;
          } // add css classes, attrs, props, listeners, etc.


          {
            updateElement(null, newVNode, isSvgMode);
          }

          if (isDef(scopeId) && elm['s-si'] !== scopeId) {
            // if there is a scopeId and this is the initial render
            // then let's add the scopeId as a css class
            elm.classList.add(elm['s-si'] = scopeId);
          }

          if (newVNode.$children$) {
            for (i = 0; i < newVNode.$children$.length; ++i) {
              // create the node
              childNode = createElm(oldParentVNode, newVNode, i, elm); // return node could have been null

              if (childNode) {
                // append our new node
                elm.appendChild(childNode);
              }
            }
          }

          {
            if (newVNode.$tag$ === 'svg') {
              // Only reset the SVG context when we're exiting <svg> element
              isSvgMode = false;
            } else if (elm.tagName === 'foreignObject') {
              // Reenter SVG context when we're exiting <foreignObject> element
              isSvgMode = true;
            }
          }
        }

        {
          elm['s-hn'] = hostTagName;

          if (newVNode.$flags$ & (2
          /* isSlotFallback */
          | 1
          /* isSlotReference */
          )) {
            // remember the content reference comment
            elm['s-sr'] = true; // remember the content reference comment

            elm['s-cr'] = contentRef; // remember the slot name, or empty string for default slot

            elm['s-sn'] = newVNode.$name$ || ''; // check if we've got an old vnode for this slot

            oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];

            if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
              // we've got an old slot vnode and the wrapper is being replaced
              // so let's move the old slot content back to it's original location
              putBackInOriginalLocation(oldParentVNode.$elm$, false);
            }
          }
        }
        return elm;
      };

      var putBackInOriginalLocation = function putBackInOriginalLocation(parentElm, recursive) {
        plt.$flags$ |= 1
        /* isTmpDisconnected */
        ;
        var oldSlotChildNodes = parentElm.childNodes;

        for (var i = oldSlotChildNodes.length - 1; i >= 0; i--) {
          var childNode = oldSlotChildNodes[i];

          if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
            // // this child node in the old element is from another component
            // // remove this node from the old slot's parent
            // childNode.remove();
            // and relocate it back to it's original location
            parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode)); // remove the old original location comment entirely
            // later on the patch function will know what to do
            // and move this to the correct spot in need be

            childNode['s-ol'].remove();
            childNode['s-ol'] = undefined;
            checkSlotRelocate = true;
          }

          if (recursive) {
            putBackInOriginalLocation(childNode, recursive);
          }
        }

        plt.$flags$ &= ~1
        /* isTmpDisconnected */
        ;
      };

      var addVnodes = function addVnodes(parentElm, before, parentVNode, vnodes, startIdx, endIdx) {
        var containerElm = parentElm['s-cr'] && parentElm['s-cr'].parentNode || parentElm;
        var childNode;

        if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
          containerElm = containerElm.shadowRoot;
        }

        for (; startIdx <= endIdx; ++startIdx) {
          if (vnodes[startIdx]) {
            childNode = createElm(null, parentVNode, startIdx, parentElm);

            if (childNode) {
              vnodes[startIdx].$elm$ = childNode;
              containerElm.insertBefore(childNode, referenceNode(before));
            }
          }
        }
      };

      var removeVnodes = function removeVnodes(vnodes, startIdx, endIdx, vnode, elm) {
        for (; startIdx <= endIdx; ++startIdx) {
          if (vnode = vnodes[startIdx]) {
            elm = vnode.$elm$;
            callNodeRefs(vnode);
            {
              // we're removing this element
              // so it's possible we need to show slot fallback content now
              checkSlotFallbackVisibility = true;

              if (elm['s-ol']) {
                // remove the original location comment
                elm['s-ol'].remove();
              } else {
                // it's possible that child nodes of the node
                // that's being removed are slot nodes
                putBackInOriginalLocation(elm, true);
              }
            } // remove the vnode's element from the dom

            elm.remove();
          }
        }
      };

      var updateChildren = function updateChildren(parentElm, oldCh, newVNode, newCh) {
        var oldStartIdx = 0;
        var newStartIdx = 0;
        var idxInOld = 0;
        var i = 0;
        var oldEndIdx = oldCh.length - 1;
        var oldStartVnode = oldCh[0];
        var oldEndVnode = oldCh[oldEndIdx];
        var newEndIdx = newCh.length - 1;
        var newStartVnode = newCh[0];
        var newEndVnode = newCh[newEndIdx];
        var node;
        var elmToMove;

        while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
          if (oldStartVnode == null) {
            // Vnode might have been moved left
            oldStartVnode = oldCh[++oldStartIdx];
          } else if (oldEndVnode == null) {
            oldEndVnode = oldCh[--oldEndIdx];
          } else if (newStartVnode == null) {
            newStartVnode = newCh[++newStartIdx];
          } else if (newEndVnode == null) {
            newEndVnode = newCh[--newEndIdx];
          } else if (isSameVnode(oldStartVnode, newStartVnode)) {
            patch(oldStartVnode, newStartVnode);
            oldStartVnode = oldCh[++oldStartIdx];
            newStartVnode = newCh[++newStartIdx];
          } else if (isSameVnode(oldEndVnode, newEndVnode)) {
            patch(oldEndVnode, newEndVnode);
            oldEndVnode = oldCh[--oldEndIdx];
            newEndVnode = newCh[--newEndIdx];
          } else if (isSameVnode(oldStartVnode, newEndVnode)) {
            // Vnode moved right
            if (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot') {
              putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
            }

            patch(oldStartVnode, newEndVnode);
            parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
            oldStartVnode = oldCh[++oldStartIdx];
            newEndVnode = newCh[--newEndIdx];
          } else if (isSameVnode(oldEndVnode, newStartVnode)) {
            // Vnode moved left
            if (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot') {
              putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
            }

            patch(oldEndVnode, newStartVnode);
            parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
            oldEndVnode = oldCh[--oldEndIdx];
            newStartVnode = newCh[++newStartIdx];
          } else {
            // createKeyToOldIdx
            idxInOld = -1;
            {
              for (i = oldStartIdx; i <= oldEndIdx; ++i) {
                if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
                  idxInOld = i;
                  break;
                }
              }
            }

            if (idxInOld >= 0) {
              elmToMove = oldCh[idxInOld];

              if (elmToMove.$tag$ !== newStartVnode.$tag$) {
                node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
              } else {
                patch(elmToMove, newStartVnode);
                oldCh[idxInOld] = undefined;
                node = elmToMove.$elm$;
              }

              newStartVnode = newCh[++newStartIdx];
            } else {
              // new element
              node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
              newStartVnode = newCh[++newStartIdx];
            }

            if (node) {
              {
                parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
              }
            }
          }
        }

        if (oldStartIdx > oldEndIdx) {
          addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
        } else if (newStartIdx > newEndIdx) {
          removeVnodes(oldCh, oldStartIdx, oldEndIdx);
        }
      };

      var isSameVnode = function isSameVnode(vnode1, vnode2) {
        // compare if two vnode to see if they're "technically" the same
        // need to have the same element tag, and same key to be the same
        if (vnode1.$tag$ === vnode2.$tag$) {
          if (vnode1.$tag$ === 'slot') {
            return vnode1.$name$ === vnode2.$name$;
          }

          {
            return vnode1.$key$ === vnode2.$key$;
          }
        }

        return false;
      };

      var referenceNode = function referenceNode(node) {
        // this node was relocated to a new location in the dom
        // because of some other component's slot
        // but we still have an html comment in place of where
        // it's original location was according to it's original vdom
        return node && node['s-ol'] || node;
      };

      var parentReferenceNode = function parentReferenceNode(node) {
        return (node['s-ol'] ? node['s-ol'] : node).parentNode;
      };

      var patch = function patch(oldVNode, newVNode) {
        var elm = newVNode.$elm$ = oldVNode.$elm$;
        var oldChildren = oldVNode.$children$;
        var newChildren = newVNode.$children$;
        var tag = newVNode.$tag$;
        var text = newVNode.$text$;
        var defaultHolder;

        if (text === null) {
          {
            // test if we're rendering an svg element, or still rendering nodes inside of one
            // only add this to the when the compiler sees we're using an svg somewhere
            isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
          } // element node

          {
            if (tag === 'slot') ;else {
              // either this is the first render of an element OR it's an update
              // AND we already know it's possible it could have changed
              // this updates the element's css classes, attrs, props, listeners, etc.
              updateElement(oldVNode, newVNode, isSvgMode);
            }
          }

          if (oldChildren !== null && newChildren !== null) {
            // looks like there's child vnodes for both the old and new vnodes
            updateChildren(elm, oldChildren, newVNode, newChildren);
          } else if (newChildren !== null) {
            // no old child vnodes, but there are new child vnodes to add
            if (oldVNode.$text$ !== null) {
              // the old vnode was text, so be sure to clear it out
              elm.textContent = '';
            } // add the new vnode children


            addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
          } else if (oldChildren !== null) {
            // no new child vnodes, but there are old child vnodes to remove
            removeVnodes(oldChildren, 0, oldChildren.length - 1);
          }

          if (isSvgMode && tag === 'svg') {
            isSvgMode = false;
          }
        } else if (defaultHolder = elm['s-cr']) {
          // this element has slotted content
          defaultHolder.parentNode.textContent = text;
        } else if (oldVNode.$text$ !== text) {
          // update the text content for the text only vnode
          // and also only if the text is different than before
          elm.data = text;
        }
      };

      var updateFallbackSlotVisibility = function updateFallbackSlotVisibility(elm) {
        // tslint:disable-next-line: prefer-const
        var childNodes = elm.childNodes;
        var childNode;
        var i;
        var ilen;
        var j;
        var slotNameAttr;
        var nodeType;

        for (i = 0, ilen = childNodes.length; i < ilen; i++) {
          childNode = childNodes[i];

          if (childNode.nodeType === 1
          /* ElementNode */
          ) {
            if (childNode['s-sr']) {
              // this is a slot fallback node
              // get the slot name for this slot reference node
              slotNameAttr = childNode['s-sn']; // by default always show a fallback slot node
              // then hide it if there are other slots in the light dom

              childNode.hidden = false;

              for (j = 0; j < ilen; j++) {
                nodeType = childNodes[j].nodeType;

                if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
                  // this sibling node is from a different component OR is a named fallback slot node
                  if (nodeType === 1
                  /* ElementNode */
                  && slotNameAttr === childNodes[j].getAttribute('slot')) {
                    childNode.hidden = true;
                    break;
                  }
                } else {
                  // this is a default fallback slot node
                  // any element or text node (with content)
                  // should hide the default fallback slot node
                  if (nodeType === 1
                  /* ElementNode */
                  || nodeType === 3
                  /* TextNode */
                  && childNodes[j].textContent.trim() !== '') {
                    childNode.hidden = true;
                    break;
                  }
                }
              }
            } // keep drilling down


            updateFallbackSlotVisibility(childNode);
          }
        }
      };

      var relocateNodes = [];

      var relocateSlotContent = function relocateSlotContent(elm) {
        // tslint:disable-next-line: prefer-const
        var childNode;
        var node;
        var hostContentNodes;
        var slotNameAttr;
        var relocateNodeData;
        var j;
        var i = 0;
        var childNodes = elm.childNodes;
        var ilen = childNodes.length;

        for (; i < ilen; i++) {
          childNode = childNodes[i];

          if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
            // first got the content reference comment node
            // then we got it's parent, which is where all the host content is in now
            hostContentNodes = node.parentNode.childNodes;
            slotNameAttr = childNode['s-sn'];

            for (j = hostContentNodes.length - 1; j >= 0; j--) {
              node = hostContentNodes[j];

              if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
                // let's do some relocating to its new home
                // but never relocate a content reference node
                // that is suppose to always represent the original content location
                if (isNodeLocatedInSlot(node, slotNameAttr)) {
                  // it's possible we've already decided to relocate this node
                  relocateNodeData = relocateNodes.find(function (r) {
                    return r.$nodeToRelocate$ === node;
                  }); // made some changes to slots
                  // let's make sure we also double check
                  // fallbacks are correctly hidden or shown

                  checkSlotFallbackVisibility = true;
                  node['s-sn'] = node['s-sn'] || slotNameAttr;

                  if (relocateNodeData) {
                    // previously we never found a slot home for this node
                    // but turns out we did, so let's remember it now
                    relocateNodeData.$slotRefNode$ = childNode;
                  } else {
                    // add to our list of nodes to relocate
                    relocateNodes.push({
                      $slotRefNode$: childNode,
                      $nodeToRelocate$: node
                    });
                  }

                  if (node['s-sr']) {
                    relocateNodes.map(function (relocateNode) {
                      if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
                        relocateNodeData = relocateNodes.find(function (r) {
                          return r.$nodeToRelocate$ === node;
                        });

                        if (relocateNodeData && !relocateNode.$slotRefNode$) {
                          relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
                        }
                      }
                    });
                  }
                } else if (!relocateNodes.some(function (r) {
                  return r.$nodeToRelocate$ === node;
                })) {
                  // so far this element does not have a slot home, not setting slotRefNode on purpose
                  // if we never find a home for this element then we'll need to hide it
                  relocateNodes.push({
                    $nodeToRelocate$: node
                  });
                }
              }
            }
          }

          if (childNode.nodeType === 1
          /* ElementNode */
          ) {
            relocateSlotContent(childNode);
          }
        }
      };

      var isNodeLocatedInSlot = function isNodeLocatedInSlot(nodeToRelocate, slotNameAttr) {
        if (nodeToRelocate.nodeType === 1
        /* ElementNode */
        ) {
          if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
            return true;
          }

          if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
            return true;
          }

          return false;
        }

        if (nodeToRelocate['s-sn'] === slotNameAttr) {
          return true;
        }

        return slotNameAttr === '';
      };

      var callNodeRefs = function callNodeRefs(vNode) {
        {
          vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
          vNode.$children$ && vNode.$children$.map(callNodeRefs);
        }
      };

      var renderVdom = function renderVdom(hostRef, renderFnResults) {
        var hostElm = hostRef.$hostElement$;
        var cmpMeta = hostRef.$cmpMeta$;
        var oldVNode = hostRef.$vnode$ || newVNode(null, null);
        var rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
        hostTagName = hostElm.tagName;

        if (cmpMeta.$attrsToReflect$) {
          rootVnode.$attrs$ = rootVnode.$attrs$ || {};
          cmpMeta.$attrsToReflect$.map(function (_ref114) {
            var _ref115 = _slicedToArray(_ref114, 2),
                propName = _ref115[0],
                attribute = _ref115[1];

            return rootVnode.$attrs$[attribute] = hostElm[propName];
          });
        }

        rootVnode.$tag$ = null;
        rootVnode.$flags$ |= 4
        /* isHost */
        ;
        hostRef.$vnode$ = rootVnode;
        rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm;
        {
          scopeId = hostElm['s-sc'];
        }
        {
          contentRef = hostElm['s-cr'];
          useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1
          /* shadowDomEncapsulation */
          ) !== 0; // always reset

          checkSlotFallbackVisibility = false;
        } // synchronous patch

        patch(oldVNode, rootVnode);
        {
          // while we're moving nodes around existing nodes, temporarily disable
          // the disconnectCallback from working
          plt.$flags$ |= 1
          /* isTmpDisconnected */
          ;

          if (checkSlotRelocate) {
            relocateSlotContent(rootVnode.$elm$);
            var relocateData;
            var nodeToRelocate;
            var orgLocationNode;
            var parentNodeRef;
            var insertBeforeNode;
            var refNode;
            var i = 0;

            for (; i < relocateNodes.length; i++) {
              relocateData = relocateNodes[i];
              nodeToRelocate = relocateData.$nodeToRelocate$;

              if (!nodeToRelocate['s-ol']) {
                // add a reference node marking this node's original location
                // keep a reference to this node for later lookups
                orgLocationNode = doc.createTextNode('');
                orgLocationNode['s-nr'] = nodeToRelocate;
                nodeToRelocate.parentNode.insertBefore(nodeToRelocate['s-ol'] = orgLocationNode, nodeToRelocate);
              }
            }

            for (i = 0; i < relocateNodes.length; i++) {
              relocateData = relocateNodes[i];
              nodeToRelocate = relocateData.$nodeToRelocate$;

              if (relocateData.$slotRefNode$) {
                // by default we're just going to insert it directly
                // after the slot reference node
                parentNodeRef = relocateData.$slotRefNode$.parentNode;
                insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
                orgLocationNode = nodeToRelocate['s-ol'];

                while (orgLocationNode = orgLocationNode.previousSibling) {
                  refNode = orgLocationNode['s-nr'];

                  if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
                    refNode = refNode.nextSibling;

                    if (!refNode || !refNode['s-nr']) {
                      insertBeforeNode = refNode;
                      break;
                    }
                  }
                }

                if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
                  // we've checked that it's worth while to relocate
                  // since that the node to relocate
                  // has a different next sibling or parent relocated
                  if (nodeToRelocate !== insertBeforeNode) {
                    if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
                      // probably a component in the index.html that doesn't have it's hostname set
                      nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
                    } // add it back to the dom but in its new home


                    parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
                  }
                }
              } else {
                // this node doesn't have a slot home to go to, so let's hide it
                if (nodeToRelocate.nodeType === 1
                /* ElementNode */
                ) {
                  nodeToRelocate.hidden = true;
                }
              }
            }
          }

          if (checkSlotFallbackVisibility) {
            updateFallbackSlotVisibility(rootVnode.$elm$);
          } // done moving nodes around
          // allow the disconnect callback to work again


          plt.$flags$ &= ~1
          /* isTmpDisconnected */
          ; // always reset

          relocateNodes.length = 0;
        }
      };

      var getElement = function getElement(ref) {
        return getHostRef(ref).$hostElement$;
      };

      var createEvent = function createEvent(ref, name, flags) {
        var elm = getElement(ref);
        return {
          emit: function emit(detail) {
            return emitEvent(elm, name, {
              bubbles: !!(flags & 4
              /* Bubbles */
              ),
              composed: !!(flags & 2
              /* Composed */
              ),
              cancelable: !!(flags & 1
              /* Cancellable */
              ),
              detail: detail
            });
          }
        };
      };

      var emitEvent = function emitEvent(elm, name, opts) {
        var ev = plt.ce(name, opts);
        elm.dispatchEvent(ev);
        return ev;
      };

      var attachToAncestor = function attachToAncestor(hostRef, ancestorComponent) {
        if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
          ancestorComponent['s-p'].push(new Promise(function (r) {
            return hostRef.$onRenderResolve$ = r;
          }));
        }
      };

      var scheduleUpdate = function scheduleUpdate(hostRef, isInitialLoad) {
        {
          hostRef.$flags$ |= 16
          /* isQueuedForUpdate */
          ;
        }

        if (hostRef.$flags$ & 4
        /* isWaitingForChildren */
        ) {
          hostRef.$flags$ |= 512
          /* needsRerender */
          ;
          return;
        }

        attachToAncestor(hostRef, hostRef.$ancestorComponent$); // there is no ancestor component or the ancestor component
        // has already fired off its lifecycle update then
        // fire off the initial update

        var dispatch = function dispatch() {
          return dispatchHooks(hostRef, isInitialLoad);
        };

        return writeTask(dispatch);
      };

      var dispatchHooks = function dispatchHooks(hostRef, isInitialLoad) {
        var endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
        var instance = hostRef.$lazyInstance$;
        var promise;

        if (isInitialLoad) {
          {
            hostRef.$flags$ |= 256
            /* isListenReady */
            ;

            if (hostRef.$queuedListeners$) {
              hostRef.$queuedListeners$.map(function (_ref116) {
                var _ref117 = _slicedToArray(_ref116, 2),
                    methodName = _ref117[0],
                    event = _ref117[1];

                return safeCall(instance, methodName, event);
              });
              hostRef.$queuedListeners$ = null;
            }
          }
          {
            promise = safeCall(instance, 'componentWillLoad');
          }
        }

        {
          promise = then(promise, function () {
            return safeCall(instance, 'componentWillRender');
          });
        }
        endSchedule();
        return then(promise, function () {
          return updateComponent(hostRef, instance, isInitialLoad);
        });
      };

      var updateComponent = /*#__PURE__*/function () {
        var _ref118 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee40(hostRef, instance, isInitialLoad) {
          var elm, endUpdate, rc, endRender, childrenPromises, postUpdate;
          return regeneratorRuntime.wrap(function _callee40$(_context45) {
            while (1) {
              switch (_context45.prev = _context45.next) {
                case 0:
                  // updateComponent
                  elm = hostRef.$hostElement$;
                  endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
                  rc = elm['s-rc'];

                  if (isInitialLoad) {
                    // DOM WRITE!
                    attachStyles(hostRef);
                  }

                  endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
                  callRender(hostRef, instance);

                  if (plt.$cssShim$) {
                    plt.$cssShim$.updateHost(elm);
                  }

                  if (rc) {
                    // ok, so turns out there are some child host elements
                    // waiting on this parent element to load
                    // let's fire off all update callbacks waiting
                    rc.map(function (cb) {
                      return cb();
                    });
                    elm['s-rc'] = undefined;
                  }

                  endRender();
                  endUpdate();
                  childrenPromises = elm['s-p'];

                  postUpdate = function postUpdate() {
                    return postUpdateComponent(hostRef);
                  };

                  if (childrenPromises.length === 0) {
                    postUpdate();
                  } else {
                    Promise.all(childrenPromises).then(postUpdate);
                    hostRef.$flags$ |= 4
                    /* isWaitingForChildren */
                    ;
                    childrenPromises.length = 0;
                  }

                case 13:
                case "end":
                  return _context45.stop();
              }
            }
          }, _callee40);
        }));

        return function updateComponent(_x46, _x47, _x48) {
          return _ref118.apply(this, arguments);
        };
      }();

      var callRender = function callRender(hostRef, instance, elm) {
        try {
          instance = instance.render && instance.render();
          {
            hostRef.$flags$ &= ~16
            /* isQueuedForUpdate */
            ;
          }
          {
            hostRef.$flags$ |= 2
            /* hasRendered */
            ;
          }
          {
            {
              // looks like we've got child nodes to render into this host element
              // or we need to update the css class/attrs on the host element
              // DOM WRITE!
              {
                renderVdom(hostRef, instance);
              }
            }
          }
        } catch (e) {
          consoleError(e, hostRef.$hostElement$);
        }

        return null;
      };

      var postUpdateComponent = function postUpdateComponent(hostRef) {
        var tagName = hostRef.$cmpMeta$.$tagName$;
        var elm = hostRef.$hostElement$;
        var endPostUpdate = createTime('postUpdate', tagName);
        var instance = hostRef.$lazyInstance$;
        var ancestorComponent = hostRef.$ancestorComponent$;

        if (!(hostRef.$flags$ & 64
        /* hasLoadedComponent */
        )) {
          hostRef.$flags$ |= 64
          /* hasLoadedComponent */
          ;
          {
            // DOM WRITE!
            addHydratedFlag(elm);
          }
          {
            safeCall(instance, 'componentDidLoad');
          }
          endPostUpdate();
          {
            hostRef.$onReadyResolve$(elm);

            if (!ancestorComponent) {
              appDidLoad();
            }
          }
        } else {
          {
            safeCall(instance, 'componentDidUpdate');
          }
          endPostUpdate();
        }

        {
          hostRef.$onInstanceResolve$(elm);
        } // load events fire from bottom to top
        // the deepest elements load first then bubbles up

        {
          if (hostRef.$onRenderResolve$) {
            hostRef.$onRenderResolve$();
            hostRef.$onRenderResolve$ = undefined;
          }

          if (hostRef.$flags$ & 512
          /* needsRerender */
          ) {
            nextTick(function () {
              return scheduleUpdate(hostRef, false);
            });
          }

          hostRef.$flags$ &= ~(4
          /* isWaitingForChildren */
          | 512
          /* needsRerender */
          );
        } // ( •_•)
        // ( •_•)>⌐■-■
        // (⌐■_■)
      };

      var forceUpdate = function forceUpdate(ref) {
        {
          var hostRef = getHostRef(ref);
          var isConnected = hostRef.$hostElement$.isConnected;

          if (isConnected && (hostRef.$flags$ & (2
          /* hasRendered */
          | 16
          /* isQueuedForUpdate */
          )) === 2
          /* hasRendered */
          ) {
            scheduleUpdate(hostRef, false);
          } // Returns "true" when the forced update was successfully scheduled


          return isConnected;
        }
      };

      var appDidLoad = function appDidLoad(who) {
        // on appload
        // we have finish the first big initial render
        {
          addHydratedFlag(doc.documentElement);
        }
        nextTick(function () {
          return emitEvent(win, 'appload', {
            detail: {
              namespace: NAMESPACE
            }
          });
        });
      };

      var safeCall = function safeCall(instance, method, arg) {
        if (instance && instance[method]) {
          try {
            return instance[method](arg);
          } catch (e) {
            consoleError(e);
          }
        }

        return undefined;
      };

      var then = function then(promise, thenFn) {
        return promise && promise.then ? promise.then(thenFn) : thenFn();
      };

      var addHydratedFlag = function addHydratedFlag(elm) {
        return elm.classList.add('hydrated');
      };

      var initializeClientHydrate = function initializeClientHydrate(hostElm, tagName, hostId, hostRef) {
        var endHydrate = createTime('hydrateClient', tagName);
        var shadowRoot = hostElm.shadowRoot;
        var childRenderNodes = [];
        var slotNodes = [];
        var shadowRootNodes = shadowRoot ? [] : null;
        var vnode = hostRef.$vnode$ = newVNode(tagName, null);

        if (!plt.$orgLocNodes$) {
          initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = new Map());
        }

        hostElm[HYDRATE_ID] = hostId;
        hostElm.removeAttribute(HYDRATE_ID);
        clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
        childRenderNodes.map(function (c) {
          var orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
          var orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
          var node = c.$elm$;

          if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {
            orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
          }

          if (!shadowRoot) {
            node['s-hn'] = tagName;

            if (orgLocationNode) {
              node['s-ol'] = orgLocationNode;
              node['s-ol']['s-nr'] = node;
            }
          }

          plt.$orgLocNodes$["delete"](orgLocationId);
        });

        if (shadowRoot) {
          shadowRootNodes.map(function (shadowRootNode) {
            if (shadowRootNode) {
              shadowRoot.appendChild(shadowRootNode);
            }
          });
        }

        endHydrate();
      };

      var clientHydrate = function clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) {
        var childNodeType;
        var childIdSplt;
        var childVNode;
        var i;

        if (node.nodeType === 1
        /* ElementNode */
        ) {
          childNodeType = node.getAttribute(HYDRATE_CHILD_ID);

          if (childNodeType) {
            // got the node data from the element's attribute
            // `${hostId}.${nodeId}.${depth}.${index}`
            childIdSplt = childNodeType.split('.');

            if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {
              childVNode = {
                $flags$: 0,
                $hostId$: childIdSplt[0],
                $nodeId$: childIdSplt[1],
                $depth$: childIdSplt[2],
                $index$: childIdSplt[3],
                $tag$: node.tagName.toLowerCase(),
                $elm$: node,
                $attrs$: null,
                $children$: null,
                $key$: null,
                $name$: null,
                $text$: null
              };
              childRenderNodes.push(childVNode);
              node.removeAttribute(HYDRATE_CHILD_ID); // this is a new child vnode
              // so ensure its parent vnode has the vchildren array

              if (!parentVNode.$children$) {
                parentVNode.$children$ = [];
              } // add our child vnode to a specific index of the vnode's children


              parentVNode.$children$[childVNode.$index$] = childVNode; // this is now the new parent vnode for all the next child checks

              parentVNode = childVNode;

              if (shadowRootNodes && childVNode.$depth$ === '0') {
                shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
              }
            }
          } // recursively drill down, end to start so we can remove nodes


          for (i = node.childNodes.length - 1; i >= 0; i--) {
            clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);
          }

          if (node.shadowRoot) {
            // keep drilling down through the shadow root nodes
            for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {
              clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);
            }
          }
        } else if (node.nodeType === 8
        /* CommentNode */
        ) {
          // `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`
          childIdSplt = node.nodeValue.split('.');

          if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {
            // comment node for either the host id or a 0 host id
            childNodeType = childIdSplt[0];
            childVNode = {
              $flags$: 0,
              $hostId$: childIdSplt[1],
              $nodeId$: childIdSplt[2],
              $depth$: childIdSplt[3],
              $index$: childIdSplt[4],
              $elm$: node,
              $attrs$: null,
              $children$: null,
              $key$: null,
              $name$: null,
              $tag$: null,
              $text$: null
            };

            if (childNodeType === TEXT_NODE_ID) {
              childVNode.$elm$ = node.nextSibling;

              if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3
              /* TextNode */
              ) {
                childVNode.$text$ = childVNode.$elm$.textContent;
                childRenderNodes.push(childVNode); // remove the text comment since it's no longer needed

                node.remove();

                if (!parentVNode.$children$) {
                  parentVNode.$children$ = [];
                }

                parentVNode.$children$[childVNode.$index$] = childVNode;

                if (shadowRootNodes && childVNode.$depth$ === '0') {
                  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
                }
              }
            } else if (childVNode.$hostId$ === hostId) {
              // this comment node is specifcally for this host id
              if (childNodeType === SLOT_NODE_ID) {
                // `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;
                childVNode.$tag$ = 'slot';

                if (childIdSplt[5]) {
                  node['s-sn'] = childVNode.$name$ = childIdSplt[5];
                } else {
                  node['s-sn'] = '';
                }

                node['s-sr'] = true;

                if (shadowRootNodes) {
                  // browser support shadowRoot and this is a shadow dom component
                  // create an actual slot element
                  childVNode.$elm$ = doc.createElement(childVNode.$tag$);

                  if (childVNode.$name$) {
                    // add the slot name attribute
                    childVNode.$elm$.setAttribute('name', childVNode.$name$);
                  } // insert the new slot element before the slot comment


                  node.parentNode.insertBefore(childVNode.$elm$, node); // remove the slot comment since it's not needed for shadow

                  node.remove();

                  if (childVNode.$depth$ === '0') {
                    shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
                  }
                }

                slotNodes.push(childVNode);

                if (!parentVNode.$children$) {
                  parentVNode.$children$ = [];
                }

                parentVNode.$children$[childVNode.$index$] = childVNode;
              } else if (childNodeType === CONTENT_REF_ID) {
                // `${CONTENT_REF_ID}.${hostId}`;
                if (shadowRootNodes) {
                  // remove the content ref comment since it's not needed for shadow
                  node.remove();
                } else {
                  hostElm['s-cr'] = node;
                  node['s-cn'] = true;
                }
              }
            }
          }
        } else if (parentVNode && parentVNode.$tag$ === 'style') {
          var vnode = newVNode(null, node.textContent);
          vnode.$elm$ = node;
          vnode.$index$ = '0';
          parentVNode.$children$ = [vnode];
        }
      };

      var initializeDocumentHydrate = function initializeDocumentHydrate(node, orgLocNodes) {
        if (node.nodeType === 1
        /* ElementNode */
        ) {
          var i = 0;

          for (; i < node.childNodes.length; i++) {
            initializeDocumentHydrate(node.childNodes[i], orgLocNodes);
          }

          if (node.shadowRoot) {
            for (i = 0; i < node.shadowRoot.childNodes.length; i++) {
              initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);
            }
          }
        } else if (node.nodeType === 8
        /* CommentNode */
        ) {
          var childIdSplt = node.nodeValue.split('.');

          if (childIdSplt[0] === ORG_LOCATION_ID) {
            orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);
            node.nodeValue = ''; // useful to know if the original location is
            // the root light-dom of a shadow dom component

            node['s-en'] = childIdSplt[3];
          }
        }
      };

      var parsePropertyValue = function parsePropertyValue(propValue, propType) {
        // ensure this value is of the correct prop type
        if (propValue != null && !isComplexType(propValue)) {
          if (propType & 4
          /* Boolean */
          ) {
            // per the HTML spec, any string value means it is a boolean true value
            // but we'll cheat here and say that the string "false" is the boolean false
            return propValue === 'false' ? false : propValue === '' || !!propValue;
          }

          if (propType & 2
          /* Number */
          ) {
            // force it to be a number
            return parseFloat(propValue);
          }

          if (propType & 1
          /* String */
          ) {
            // could have been passed as a number or boolean
            // but we still want it as a string
            return String(propValue);
          } // redundant return here for better minification


          return propValue;
        } // not sure exactly what type we want
        // so no need to change to a different type


        return propValue;
      };

      var getValue = function getValue(ref, propName) {
        return getHostRef(ref).$instanceValues$.get(propName);
      };

      var setValue = function setValue(ref, propName, newVal, cmpMeta) {
        // check our new property value against our internal value
        var hostRef = getHostRef(ref);
        var elm = hostRef.$hostElement$;
        var oldVal = hostRef.$instanceValues$.get(propName);
        var flags = hostRef.$flags$;
        var instance = hostRef.$lazyInstance$;
        newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);

        if ((!(flags & 8
        /* isConstructingInstance */
        ) || oldVal === undefined) && newVal !== oldVal) {
          // gadzooks! the property's value has changed!!
          // set our new value!
          hostRef.$instanceValues$.set(propName, newVal);

          if (instance) {
            // get an array of method names of watch functions to call
            if (cmpMeta.$watchers$ && flags & 128
            /* isWatchReady */
            ) {
              var watchMethods = cmpMeta.$watchers$[propName];

              if (watchMethods) {
                // this instance is watching for when this property changed
                watchMethods.map(function (watchMethodName) {
                  try {
                    // fire off each of the watch methods that are watching this property
                    instance[watchMethodName](newVal, oldVal, propName);
                  } catch (e) {
                    consoleError(e, elm);
                  }
                });
              }
            }

            if ((flags & (2
            /* hasRendered */
            | 16
            /* isQueuedForUpdate */
            )) === 2
            /* hasRendered */
            ) {
              // looks like this value actually changed, so we've got work to do!
              // but only if we've already rendered, otherwise just chill out
              // queue that we need to do an update, but don't worry about queuing
              // up millions cuz this function ensures it only runs once
              scheduleUpdate(hostRef, false);
            }
          }
        }
      };

      var proxyComponent = function proxyComponent(Cstr, cmpMeta, flags) {
        if (cmpMeta.$members$) {
          if (Cstr.watchers) {
            cmpMeta.$watchers$ = Cstr.watchers;
          } // It's better to have a const than two Object.entries()


          var members = Object.entries(cmpMeta.$members$);
          var prototype = Cstr.prototype;
          members.map(function (_ref119) {
            var _ref120 = _slicedToArray(_ref119, 2),
                memberName = _ref120[0],
                _ref120$ = _slicedToArray(_ref120[1], 1),
                memberFlags = _ref120$[0];

            if (memberFlags & 31
            /* Prop */
            || flags & 2
            /* proxyState */
            && memberFlags & 32
            /* State */
            ) {
              // proxyComponent - prop
              Object.defineProperty(prototype, memberName, {
                get: function get() {
                  // proxyComponent, get value
                  return getValue(this, memberName);
                },
                set: function set(newValue) {
                  // proxyComponent, set value
                  setValue(this, memberName, newValue, cmpMeta);
                },
                configurable: true,
                enumerable: true
              });
            } else if (flags & 1
            /* isElementConstructor */
            && memberFlags & 64
            /* Method */
            ) {
              // proxyComponent - method
              Object.defineProperty(prototype, memberName, {
                value: function value() {
                  for (var _len55 = arguments.length, args = new Array(_len55), _key56 = 0; _key56 < _len55; _key56++) {
                    args[_key56] = arguments[_key56];
                  }

                  var ref = getHostRef(this);
                  return ref.$onInstancePromise$.then(function () {
                    var _ref$$lazyInstance$;

                    return (_ref$$lazyInstance$ = ref.$lazyInstance$)[memberName].apply(_ref$$lazyInstance$, args);
                  });
                }
              });
            }
          });

          if (flags & 1
          /* isElementConstructor */
          ) {
            var attrNameToPropName = new Map();

            prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
              var _this622 = this;

              plt.jmp(function () {
                var propName = attrNameToPropName.get(attrName);
                _this622[propName] = newValue === null && typeof _this622[propName] === 'boolean' ? false : newValue;
              });
            }; // create an array of attributes to observe
            // and also create a map of html attribute name to js property name


            Cstr.observedAttributes = members.filter(function (_ref121) {
              var _ref122 = _slicedToArray(_ref121, 2),
                  _ = _ref122[0],
                  m = _ref122[1];

              return m[0] & 15;
            }
            /* HasAttribute */
            ) // filter to only keep props that should match attributes
            .map(function (_ref123) {
              var _ref124 = _slicedToArray(_ref123, 2),
                  propName = _ref124[0],
                  m = _ref124[1];

              var attrName = m[1] || propName;
              attrNameToPropName.set(attrName, propName);

              if (m[0] & 512
              /* ReflectAttr */
              ) {
                cmpMeta.$attrsToReflect$.push([propName, attrName]);
              }

              return attrName;
            });
          }
        }

        return Cstr;
      };

      var initializeComponent = /*#__PURE__*/function () {
        var _ref125 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee41(elm, hostRef, cmpMeta, hmrVersionId, Cstr) {
          var endLoad, endNewInstance, style, _scopeId, endRegisterStyles, ancestorComponent, schedule;

          return regeneratorRuntime.wrap(function _callee41$(_context46) {
            while (1) {
              switch (_context46.prev = _context46.next) {
                case 0:
                  if (!((hostRef.$flags$ & 32
                  /* hasInitializedComponent */
                  ) === 0)) {
                    _context46.next = 29;
                    break;
                  }

                  // we haven't initialized this element yet
                  hostRef.$flags$ |= 32
                  /* hasInitializedComponent */
                  ; // lazy loaded components
                  // request the component's implementation to be
                  // wired up with the host element

                  Cstr = loadModule(cmpMeta);

                  if (!Cstr.then) {
                    _context46.next = 9;
                    break;
                  }

                  // Await creates a micro-task avoid if possible
                  endLoad = uniqueTime();
                  _context46.next = 7;
                  return Cstr;

                case 7:
                  Cstr = _context46.sent;
                  endLoad();

                case 9:
                  if (!Cstr.isProxied) {
                    // we'eve never proxied this Constructor before
                    // let's add the getters/setters to its prototype before
                    // the first time we create an instance of the implementation
                    {
                      cmpMeta.$watchers$ = Cstr.watchers;
                    }
                    proxyComponent(Cstr, cmpMeta, 2
                    /* proxyState */
                    );
                    Cstr.isProxied = true;
                  }

                  endNewInstance = createTime('createInstance', cmpMeta.$tagName$); // ok, time to construct the instance
                  // but let's keep track of when we start and stop
                  // so that the getters/setters don't incorrectly step on data

                  hostRef.$flags$ |= 8
                  /* isConstructingInstance */
                  ;

                  // construct the lazy-loaded component implementation
                  // passing the hostRef is very important during
                  // construction in order to directly wire together the
                  // host element and the lazy-loaded instance
                  try {
                    new Cstr(hostRef);
                  } catch (e) {
                    consoleError(e);
                  }

                  hostRef.$flags$ &= ~8
                  /* isConstructingInstance */
                  ;
                  hostRef.$flags$ |= 128
                  /* isWatchReady */
                  ;
                  endNewInstance();
                  fireConnectedCallback(hostRef.$lazyInstance$);

                  if (!Cstr.style) {
                    _context46.next = 29;
                    break;
                  }

                  // this component has styles but we haven't registered them yet
                  style = Cstr.style;

                  if (typeof style !== 'string') {
                    style = style[hostRef.$modeName$ = computeMode(elm)];
                  }

                  _scopeId = getScopeId(cmpMeta, hostRef.$modeName$);

                  if (styles.has(_scopeId)) {
                    _context46.next = 29;
                    break;
                  }

                  endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);

                  if (!(cmpMeta.$flags$ & 8
                  /* needsShadowDomShim */
                  )) {
                    _context46.next = 27;
                    break;
                  }

                  _context46.next = 26;
                  return __webpack_require__.e(
                  /*! import() | shadow-css-a3f00b33-js */
                  "shadow-css-a3f00b33-js").then(__webpack_require__.bind(null,
                  /*! ./shadow-css-a3f00b33.js */
                  "JmUR")).then(function (m) {
                    return m.scopeCss(style, _scopeId, false);
                  });

                case 26:
                  style = _context46.sent;

                case 27:
                  registerStyle(_scopeId, style, !!(cmpMeta.$flags$ & 1
                  /* shadowDomEncapsulation */
                  ));
                  endRegisterStyles();

                case 29:
                  // we've successfully created a lazy instance
                  ancestorComponent = hostRef.$ancestorComponent$;

                  schedule = function schedule() {
                    return scheduleUpdate(hostRef, true);
                  };

                  if (ancestorComponent && ancestorComponent['s-rc']) {
                    // this is the intial load and this component it has an ancestor component
                    // but the ancestor component has NOT fired its will update lifecycle yet
                    // so let's just cool our jets and wait for the ancestor to continue first
                    // this will get fired off when the ancestor component
                    // finally gets around to rendering its lazy self
                    // fire off the initial update
                    ancestorComponent['s-rc'].push(schedule);
                  } else {
                    schedule();
                  }

                case 32:
                case "end":
                  return _context46.stop();
              }
            }
          }, _callee41);
        }));

        return function initializeComponent(_x49, _x50, _x51, _x52, _x53) {
          return _ref125.apply(this, arguments);
        };
      }();

      var fireConnectedCallback = function fireConnectedCallback(instance) {
        {
          safeCall(instance, 'connectedCallback');
        }
      };

      var _connectedCallback = function connectedCallback(elm) {
        if ((plt.$flags$ & 1
        /* isTmpDisconnected */
        ) === 0) {
          var hostRef = getHostRef(elm);
          var cmpMeta = hostRef.$cmpMeta$;
          var endConnected = createTime('connectedCallback', cmpMeta.$tagName$);

          if (!(hostRef.$flags$ & 1
          /* hasConnected */
          )) {
            // first time this component has connected
            hostRef.$flags$ |= 1
            /* hasConnected */
            ;
            var hostId;
            {
              hostId = elm.getAttribute(HYDRATE_ID);

              if (hostId) {
                if (supportsShadow && cmpMeta.$flags$ & 1
                /* shadowDomEncapsulation */
                ) {
                  var _scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode'));

                  elm.classList.remove(_scopeId2 + '-h', _scopeId2 + '-s');
                }

                initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
              }
            }

            if (!hostId) {
              // initUpdate
              // if the slot polyfill is required we'll need to put some nodes
              // in here to act as original content anchors as we move nodes around
              // host element has been connected to the DOM
              if (cmpMeta.$flags$ & (4
              /* hasSlotRelocation */
              | 8
              /* needsShadowDomShim */
              )) {
                setContentReference(elm);
              }
            }

            {
              // find the first ancestor component (if there is one) and register
              // this component as one of the actively loading child components for its ancestor
              var ancestorComponent = elm;

              while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
                // climb up the ancestors looking for the first
                // component that hasn't finished its lifecycle update yet
                if (ancestorComponent.nodeType === 1
                /* ElementNode */
                && ancestorComponent.hasAttribute('s-id') && ancestorComponent['s-p'] || ancestorComponent['s-p']) {
                  // we found this components first ancestor component
                  // keep a reference to this component's ancestor component
                  attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
                  break;
                }
              }
            } // Lazy properties
            // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties

            if (cmpMeta.$members$) {
              Object.entries(cmpMeta.$members$).map(function (_ref126) {
                var _ref127 = _slicedToArray(_ref126, 2),
                    memberName = _ref127[0],
                    _ref127$ = _slicedToArray(_ref127[1], 1),
                    memberFlags = _ref127$[0];

                if (memberFlags & 31
                /* Prop */
                && elm.hasOwnProperty(memberName)) {
                  var value = elm[memberName];
                  delete elm[memberName];
                  elm[memberName] = value;
                }
              });
            }

            {
              // connectedCallback, taskQueue, initialLoad
              // angular sets attribute AFTER connectCallback
              // https://github.com/angular/angular/issues/18909
              // https://github.com/angular/angular/issues/19940
              nextTick(function () {
                return initializeComponent(elm, hostRef, cmpMeta);
              });
            }
          } else {
            // not the first time this has connected
            // reattach any event listeners to the host
            // since they would have been removed when disconnected
            addHostEventListeners(elm, hostRef, cmpMeta.$listeners$); // fire off connectedCallback() on component instance

            fireConnectedCallback(hostRef.$lazyInstance$);
          }

          endConnected();
        }
      };

      var setContentReference = function setContentReference(elm) {
        // only required when we're NOT using native shadow dom (slot)
        // or this browser doesn't support native shadow dom
        // and this host element was NOT created with SSR
        // let's pick out the inner content for slot projection
        // create a node to represent where the original
        // content was first placed, which is useful later on
        var contentRefElm = elm['s-cr'] = doc.createComment('');
        contentRefElm['s-cn'] = true;
        elm.insertBefore(contentRefElm, elm.firstChild);
      };

      var _disconnectedCallback = function disconnectedCallback(elm) {
        if ((plt.$flags$ & 1
        /* isTmpDisconnected */
        ) === 0) {
          var hostRef = getHostRef(elm);
          var instance = hostRef.$lazyInstance$;
          {
            if (hostRef.$rmListeners$) {
              hostRef.$rmListeners$.map(function (rmListener) {
                return rmListener();
              });
              hostRef.$rmListeners$ = undefined;
            }
          } // clear CSS var-shim tracking

          if (plt.$cssShim$) {
            plt.$cssShim$.removeHost(elm);
          }

          {
            safeCall(instance, 'disconnectedCallback');
          }
        }
      };

      var bootstrapLazy = function bootstrapLazy(lazyBundles) {
        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
        var endBootstrap = createTime();
        var cmpTags = [];
        var exclude = options.exclude || [];
        var customElements = win.customElements;
        var head = doc.head;
        var metaCharset = /*@__PURE__*/head.querySelector('meta[charset]');
        var visibilityStyle = /*@__PURE__*/doc.createElement('style');
        var deferredConnectedCallbacks = [];
        var styles = /*@__PURE__*/doc.querySelectorAll("[".concat(HYDRATED_STYLE_ID, "]"));
        var appLoadFallback;
        var isBootstrapping = true;
        var i = 0;
        Object.assign(plt, options);
        plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
        {
          // If the app is already hydrated there is not point to disable the
          // async queue. This will improve the first input delay
          plt.$flags$ |= 2
          /* appLoaded */
          ;
        }
        {
          for (; i < styles.length; i++) {
            registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
          }
        }
        lazyBundles.map(function (lazyBundle) {
          return lazyBundle[1].map(function (compactMeta) {
            var cmpMeta = {
              $flags$: compactMeta[0],
              $tagName$: compactMeta[1],
              $members$: compactMeta[2],
              $listeners$: compactMeta[3]
            };
            {
              cmpMeta.$members$ = compactMeta[2];
            }
            {
              cmpMeta.$listeners$ = compactMeta[3];
            }
            {
              cmpMeta.$attrsToReflect$ = [];
            }
            {
              cmpMeta.$watchers$ = {};
            }

            if (!supportsShadow && cmpMeta.$flags$ & 1
            /* shadowDomEncapsulation */
            ) {
              cmpMeta.$flags$ |= 8
              /* needsShadowDomShim */
              ;
            }

            var tagName = cmpMeta.$tagName$;

            var HostElement = /*#__PURE__*/function (_HTMLElement) {
              _inherits(HostElement, _HTMLElement);

              var _super295 = _createSuper(HostElement);

              // StencilLazyHost
              function HostElement(self) {
                var _this623;

                _classCallCheck(this, HostElement);

                // @ts-ignore
                _this623 = _super295.call(this, self);
                self = _assertThisInitialized(_this623);
                registerHost(self, cmpMeta);

                if (cmpMeta.$flags$ & 1
                /* shadowDomEncapsulation */
                ) {
                  // this component is using shadow dom
                  // and this browser supports shadow dom
                  // add the read-only property "shadowRoot" to the host element
                  // adding the shadow root build conditionals to minimize runtime
                  if (supportsShadow) {
                    {
                      self.attachShadow({
                        mode: 'open',
                        delegatesFocus: !!(cmpMeta.$flags$ & 16
                        /* shadowDelegatesFocus */
                        )
                      });
                    }
                  } else if (!('shadowRoot' in self)) {
                    self.shadowRoot = self;
                  }
                }

                return _this623;
              }

              _createClass2(HostElement, [{
                key: "connectedCallback",
                value: function connectedCallback() {
                  var _this624 = this;

                  if (appLoadFallback) {
                    clearTimeout(appLoadFallback);
                    appLoadFallback = null;
                  }

                  if (isBootstrapping) {
                    // connectedCallback will be processed once all components have been registered
                    deferredConnectedCallbacks.push(this);
                  } else {
                    plt.jmp(function () {
                      return _connectedCallback(_this624);
                    });
                  }
                }
              }, {
                key: "disconnectedCallback",
                value: function disconnectedCallback() {
                  var _this625 = this;

                  plt.jmp(function () {
                    return _disconnectedCallback(_this625);
                  });
                }
              }, {
                key: "componentOnReady",
                value: function componentOnReady() {
                  return getHostRef(this).$onReadyPromise$;
                }
              }]);

              return HostElement;
            }( /*#__PURE__*/_wrapNativeSuper(HTMLElement));

            cmpMeta.$lazyBundleId$ = lazyBundle[0];

            if (!exclude.includes(tagName) && !customElements.get(tagName)) {
              cmpTags.push(tagName);
              customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1
              /* isElementConstructor */
              ));
            }
          });
        });
        {
          visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
          visibilityStyle.setAttribute('data-styles', '');
          head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
        } // Process deferred connectedCallbacks now all components have been registered

        isBootstrapping = false;

        if (deferredConnectedCallbacks.length) {
          deferredConnectedCallbacks.map(function (host) {
            return host.connectedCallback();
          });
        } else {
          {
            plt.jmp(function () {
              return appLoadFallback = setTimeout(appDidLoad, 30);
            });
          }
        } // Fallback appLoad event


        endBootstrap();
      };

      var getAssetPath = function getAssetPath(path) {
        var assetUrl = new URL(path, plt.$resourcesUrl$);
        return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
      };

      var hostRefs = new WeakMap();

      var getHostRef = function getHostRef(ref) {
        return hostRefs.get(ref);
      };

      var registerInstance = function registerInstance(lazyInstance, hostRef) {
        return hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
      };

      var registerHost = function registerHost(elm, cmpMeta) {
        var hostRef = {
          $flags$: 0,
          $hostElement$: elm,
          $cmpMeta$: cmpMeta,
          $instanceValues$: new Map()
        };
        {
          hostRef.$onInstancePromise$ = new Promise(function (r) {
            return hostRef.$onInstanceResolve$ = r;
          });
        }
        {
          hostRef.$onReadyPromise$ = new Promise(function (r) {
            return hostRef.$onReadyResolve$ = r;
          });
          elm['s-p'] = [];
          elm['s-rc'] = [];
        }
        addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
        return hostRefs.set(elm, hostRef);
      };

      var isMemberInElement = function isMemberInElement(elm, memberName) {
        return memberName in elm;
      };

      var consoleError = function consoleError(e, el) {
        return (0, console.error)(e, el);
      };

      var cmpModules = /*@__PURE__*/new Map();

      var loadModule = function loadModule(cmpMeta, hostRef, hmrVersionId) {
        // loadModuleImport
        var exportName = cmpMeta.$tagName$.replace(/-/g, '_');
        var bundleId = cmpMeta.$lazyBundleId$;
        var module = cmpModules.get(bundleId);

        if (module) {
          return module[exportName];
        }

        return __webpack_require__("kLfG")("./".concat(bundleId, ".entry.js")).then(function (importedModule) {
          {
            cmpModules.set(bundleId, importedModule);
          }
          return importedModule[exportName];
        }, consoleError);
      };

      var styles = new Map();
      var modeResolutionChain = [];
      var queueDomReads = [];
      var queueDomWrites = [];

      var queueTask = function queueTask(queue, write) {
        return function (cb) {
          queue.push(cb);

          if (!queuePending) {
            queuePending = true;

            if (write && plt.$flags$ & 4
            /* queueSync */
            ) {
              nextTick(flush);
            } else {
              plt.raf(flush);
            }
          }
        };
      };

      var consume = function consume(queue) {
        for (var i = 0; i < queue.length; i++) {
          try {
            queue[i](performance.now());
          } catch (e) {
            consoleError(e);
          }
        }

        queue.length = 0;
      };

      var flush = function flush() {
        // always force a bunch of medium callbacks to run, but still have
        // a throttle on how many can run in a certain time
        // DOM READS!!!
        consume(queueDomReads); // DOM WRITES!!!

        {
          consume(queueDomWrites);

          if (queuePending = queueDomReads.length > 0) {
            // still more to do yet, but we've run out of time
            // let's let this thing cool off and try again in the next tick
            plt.raf(flush);
          }
        }
      };

      var nextTick = /*@__PURE__*/function nextTick(cb) {
        return promiseResolve().then(cb);
      };

      var readTask = /*@__PURE__*/queueTask(queueDomReads, false);
      var writeTask = /*@__PURE__*/queueTask(queueDomWrites, true);
      var Build = {
        isDev: false,
        isBrowser: true,
        isServer: false,
        isTesting: false
      };
      /***/
    },

    /***/
    "wO+i":
    /*!****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/pluck.js ***!
      \****************************************************************/

    /*! exports provided: pluck */

    /***/
    function wOI(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "pluck", function () {
        return pluck;
      });
      /* harmony import */


      var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./map */
      "lJxs");

      function pluck() {
        for (var _len56 = arguments.length, properties = new Array(_len56), _key57 = 0; _key57 < _len56; _key57++) {
          properties[_key57] = arguments[_key57];
        }

        var length = properties.length;

        if (length === 0) {
          throw new Error('list of properties cannot be empty.');
        }

        return function (source) {
          return Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])(plucker(properties, length))(source);
        };
      }

      function plucker(props, length) {
        var mapper = function mapper(x) {
          var currentProp = x;

          for (var i = 0; i < length; i++) {
            var p = currentProp != null ? currentProp[props[i]] : undefined;

            if (p !== void 0) {
              currentProp = p;
            } else {
              return undefined;
            }
          }

          return currentProp;
        };

        return mapper;
      } //# sourceMappingURL=pluck.js.map

      /***/

    },

    /***/
    "wytX":
    /*!*******************************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/integrations/trycatch.js ***!
      \*******************************************************************/

    /*! exports provided: TryCatch */

    /***/
    function wytX(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "TryCatch", function () {
        return TryCatch;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../helpers */
      "vzc1");

      var DEFAULT_EVENT_TARGET = ['EventTarget', 'Window', 'Node', 'ApplicationCache', 'AudioTrackList', 'ChannelMergerNode', 'CryptoOperation', 'EventSource', 'FileReader', 'HTMLUnknownElement', 'IDBDatabase', 'IDBRequest', 'IDBTransaction', 'KeyOperation', 'MediaController', 'MessagePort', 'ModalWindow', 'Notification', 'SVGElementInstance', 'Screen', 'TextTrack', 'TextTrackCue', 'TextTrackList', 'WebSocket', 'WebSocketWorker', 'Worker', 'XMLHttpRequest', 'XMLHttpRequestEventTarget', 'XMLHttpRequestUpload'];
      /** Wrap timer functions and event targets to catch errors and provide better meta data */

      var TryCatch =
      /** @class */
      function () {
        /**
         * @inheritDoc
         */
        function TryCatch(options) {
          /**
           * @inheritDoc
           */
          this.name = TryCatch.id;
          this._options = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
            XMLHttpRequest: true,
            eventTarget: true,
            requestAnimationFrame: true,
            setInterval: true,
            setTimeout: true
          }, options);
        }
        /**
         * Wrap timer functions and event targets to catch errors
         * and provide better metadata.
         */


        TryCatch.prototype.setupOnce = function () {
          var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getGlobalObject"])();

          if (this._options.setTimeout) {
            Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["fill"])(global, 'setTimeout', this._wrapTimeFunction.bind(this));
          }

          if (this._options.setInterval) {
            Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["fill"])(global, 'setInterval', this._wrapTimeFunction.bind(this));
          }

          if (this._options.requestAnimationFrame) {
            Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["fill"])(global, 'requestAnimationFrame', this._wrapRAF.bind(this));
          }

          if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {
            Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["fill"])(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this));
          }

          if (this._options.eventTarget) {
            var eventTarget = Array.isArray(this._options.eventTarget) ? this._options.eventTarget : DEFAULT_EVENT_TARGET;
            eventTarget.forEach(this._wrapEventTarget.bind(this));
          }
        };
        /** JSDoc */


        TryCatch.prototype._wrapTimeFunction = function (original) {
          // eslint-disable-next-line @typescript-eslint/no-explicit-any
          return function () {
            var args = [];

            for (var _i = 0; _i < arguments.length; _i++) {
              args[_i] = arguments[_i];
            }

            var originalCallback = args[0];
            args[0] = Object(_helpers__WEBPACK_IMPORTED_MODULE_2__["wrap"])(originalCallback, {
              mechanism: {
                data: {
                  "function": Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getFunctionName"])(original)
                },
                handled: true,
                type: 'instrument'
              }
            });
            return original.apply(this, args);
          };
        };
        /** JSDoc */
        // eslint-disable-next-line @typescript-eslint/no-explicit-any


        TryCatch.prototype._wrapRAF = function (original) {
          // eslint-disable-next-line @typescript-eslint/no-explicit-any
          return function (callback) {
            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
            return original.call(this, Object(_helpers__WEBPACK_IMPORTED_MODULE_2__["wrap"])(callback, {
              mechanism: {
                data: {
                  "function": 'requestAnimationFrame',
                  handler: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getFunctionName"])(original)
                },
                handled: true,
                type: 'instrument'
              }
            }));
          };
        };
        /** JSDoc */


        TryCatch.prototype._wrapEventTarget = function (target) {
          // eslint-disable-next-line @typescript-eslint/no-explicit-any
          var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getGlobalObject"])(); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access

          var proto = global[target] && global[target].prototype; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins

          if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {
            return;
          }

          Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["fill"])(proto, 'addEventListener', function (original) {
            return function (eventName, fn, options) {
              try {
                if (typeof fn.handleEvent === 'function') {
                  fn.handleEvent = Object(_helpers__WEBPACK_IMPORTED_MODULE_2__["wrap"])(fn.handleEvent.bind(fn), {
                    mechanism: {
                      data: {
                        "function": 'handleEvent',
                        handler: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getFunctionName"])(fn),
                        target: target
                      },
                      handled: true,
                      type: 'instrument'
                    }
                  });
                }
              } catch (err) {// can sometimes get 'Permission denied to access property "handle Event'
              }

              return original.call(this, eventName, // eslint-disable-next-line @typescript-eslint/no-explicit-any
              Object(_helpers__WEBPACK_IMPORTED_MODULE_2__["wrap"])(fn, {
                mechanism: {
                  data: {
                    "function": 'addEventListener',
                    handler: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getFunctionName"])(fn),
                    target: target
                  },
                  handled: true,
                  type: 'instrument'
                }
              }), options);
            };
          });
          Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["fill"])(proto, 'removeEventListener', function (originalRemoveEventListener) {
            return function (eventName, fn, options) {
              var _a;
              /**
               * There are 2 possible scenarios here:
               *
               * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified
               * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function
               * as a pass-through, and call original `removeEventListener` with it.
               *
               * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using
               * our wrapped version of `addEventListener`, which internally calls `wrap` helper.
               * This helper "wraps" whole callback inside a try/catch statement, and attached appropriate metadata to it,
               * in order for us to make a distinction between wrapped/non-wrapped functions possible.
               * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.
               *
               * When someone adds a handler prior to initialization, and then do it again, but after,
               * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible
               * to get rid of the initial handler and it'd stick there forever.
               */


              var wrappedEventHandler = fn;

              try {
                var originalEventHandler = (_a = wrappedEventHandler) === null || _a === void 0 ? void 0 : _a.__sentry_wrapped__;

                if (originalEventHandler) {
                  originalRemoveEventListener.call(this, eventName, originalEventHandler, options);
                }
              } catch (e) {// ignore, accessing __sentry_wrapped__ will throw in some Selenium environments
              }

              return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);
            };
          });
        };
        /** JSDoc */


        TryCatch.prototype._wrapXHR = function (originalSend) {
          // eslint-disable-next-line @typescript-eslint/no-explicit-any
          return function () {
            var args = [];

            for (var _i = 0; _i < arguments.length; _i++) {
              args[_i] = arguments[_i];
            } // eslint-disable-next-line @typescript-eslint/no-this-alias


            var xhr = this;
            var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];
            xmlHttpRequestProps.forEach(function (prop) {
              if (prop in xhr && typeof xhr[prop] === 'function') {
                // eslint-disable-next-line @typescript-eslint/no-explicit-any
                Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["fill"])(xhr, prop, function (original) {
                  var wrapOptions = {
                    mechanism: {
                      data: {
                        "function": prop,
                        handler: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getFunctionName"])(original)
                      },
                      handled: true,
                      type: 'instrument'
                    }
                  }; // If Instrument integration has been called before TryCatch, get the name of original function

                  if (original.__sentry_original__) {
                    wrapOptions.mechanism.data.handler = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getFunctionName"])(original.__sentry_original__);
                  } // Otherwise wrap directly


                  return Object(_helpers__WEBPACK_IMPORTED_MODULE_2__["wrap"])(original, wrapOptions);
                });
              }
            });
            return originalSend.apply(this, args);
          };
        };
        /**
         * @inheritDoc
         */


        TryCatch.id = 'TryCatch';
        return TryCatch;
      }(); //# sourceMappingURL=trycatch.js.map

      /***/

    },

    /***/
    "x+ZX":
    /*!*******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/refCount.js ***!
      \*******************************************************************/

    /*! exports provided: refCount */

    /***/
    function xZX(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "refCount", function () {
        return refCount;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function refCount() {
        return function refCountOperatorFunction(source) {
          return source.lift(new RefCountOperator(source));
        };
      }

      var RefCountOperator = /*#__PURE__*/function () {
        function RefCountOperator(connectable) {
          _classCallCheck(this, RefCountOperator);

          this.connectable = connectable;
        }

        _createClass2(RefCountOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            var connectable = this.connectable;
            connectable._refCount++;
            var refCounter = new RefCountSubscriber(subscriber, connectable);
            var subscription = source.subscribe(refCounter);

            if (!refCounter.closed) {
              refCounter.connection = connectable.connect();
            }

            return subscription;
          }
        }]);

        return RefCountOperator;
      }();

      var RefCountSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_45) {
        _inherits(RefCountSubscriber, _Subscriber__WEBPACK_45);

        var _super296 = _createSuper(RefCountSubscriber);

        function RefCountSubscriber(destination, connectable) {
          var _this626;

          _classCallCheck(this, RefCountSubscriber);

          _this626 = _super296.call(this, destination);
          _this626.connectable = connectable;
          return _this626;
        }

        _createClass2(RefCountSubscriber, [{
          key: "_unsubscribe",
          value: function _unsubscribe() {
            var connectable = this.connectable;

            if (!connectable) {
              this.connection = null;
              return;
            }

            this.connectable = null;
            var refCount = connectable._refCount;

            if (refCount <= 0) {
              this.connection = null;
              return;
            }

            connectable._refCount = refCount - 1;

            if (refCount > 1) {
              this.connection = null;
              return;
            }

            var connection = this.connection;
            var sharedConnection = connectable._connection;
            this.connection = null;

            if (sharedConnection && (!connection || sharedConnection === connection)) {
              sharedConnection.unsubscribe();
            }
          }
        }]);

        return RefCountSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=refCount.js.map

      /***/

    },

    /***/
    "x7I3":
    /*!*********************************************************************!*\
      !*** ./node_modules/@firebase/webchannel-wrapper/dist/index.esm.js ***!
      \*********************************************************************/

    /*! exports provided: default, ErrorCode, Event, EventType, FetchXmlHttpFactory, Stat, WebChannel, XhrIo, createWebChannelTransport, getStatEventTarget */

    /***/
    function x7I3(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ErrorCode", function () {
        return ErrorCode;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Event", function () {
        return Event;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "EventType", function () {
        return EventType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FetchXmlHttpFactory", function () {
        return FetchXmlHttpFactory;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Stat", function () {
        return Stat;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "WebChannel", function () {
        return WebChannel;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "XhrIo", function () {
        return XhrIo;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "createWebChannelTransport", function () {
        return createWebChannelTransport;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getStatEventTarget", function () {
        return getStatEventTarget;
      });
      /*! *****************************************************************************
      Copyright (c) Microsoft Corporation.
      
      Permission to use, copy, modify, and/or distribute this software for any
      purpose with or without fee is hereby granted.
      
      THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
      REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
      AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
      INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
      LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
      OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
      PERFORMANCE OF THIS SOFTWARE.
      ***************************************************************************** */

      /* global Reflect, Promise */


      var _extendStatics3 = function extendStatics(d, b) {
        _extendStatics3 = Object.setPrototypeOf || {
          __proto__: []
        } instanceof Array && function (d, b) {
          d.__proto__ = b;
        } || function (d, b) {
          for (var p in b) {
            if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
          }
        };

        return _extendStatics3(d, b);
      };

      function __extends(d, b) {
        if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");

        _extendStatics3(d, b);

        function __() {
          this.constructor = d;
        }

        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      }

      function __values(o) {
        var s = typeof Symbol === "function" && Symbol.iterator,
            m = s && o[s],
            i = 0;
        if (m) return m.call(o);
        if (o && typeof o.length === "number") return {
          next: function next() {
            if (o && i >= o.length) o = void 0;
            return {
              value: o && o[i++],
              done: !o
            };
          }
        };
        throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
      }

      var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
      var k,
          goog = goog || {},
          l = commonjsGlobal || self;

      function aa() {}

      function ba(a) {
        var b = typeof a;
        b = "object" != b ? b : a ? Array.isArray(a) ? "array" : b : "null";
        return "array" == b || "object" == b && "number" == typeof a.length;
      }

      function p(a) {
        var b = typeof a;
        return "object" == b && null != a || "function" == b;
      }

      function da(a) {
        return Object.prototype.hasOwnProperty.call(a, ea) && a[ea] || (a[ea] = ++fa);
      }

      var ea = "closure_uid_" + (1E9 * Math.random() >>> 0),
          fa = 0;

      function ha(a, b, c) {
        return a.call.apply(a.bind, arguments);
      }

      function ia(a, b, c) {
        if (!a) throw Error();

        if (2 < arguments.length) {
          var d = Array.prototype.slice.call(arguments, 2);
          return function () {
            var e = Array.prototype.slice.call(arguments);
            Array.prototype.unshift.apply(e, d);
            return a.apply(b, e);
          };
        }

        return function () {
          return a.apply(b, arguments);
        };
      }

      function q(a, b, c) {
        Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? q = ha : q = ia;
        return q.apply(null, arguments);
      }

      function ja(a, b) {
        var c = Array.prototype.slice.call(arguments, 1);
        return function () {
          var d = c.slice();
          d.push.apply(d, arguments);
          return a.apply(this, d);
        };
      }

      function t(a, b) {
        function c() {}

        c.prototype = b.prototype;
        a.Z = b.prototype;
        a.prototype = new c();
        a.prototype.constructor = a;

        a.Vb = function (d, e, f) {
          for (var h = Array(arguments.length - 2), n = 2; n < arguments.length; n++) {
            h[n - 2] = arguments[n];
          }

          return b.prototype[e].apply(d, h);
        };
      }

      function v() {
        this.s = this.s;
        this.o = this.o;
      }

      var ka = 0,
          la = {};
      v.prototype.s = !1;

      v.prototype.na = function () {
        if (!this.s && (this.s = !0, this.M(), 0 != ka)) {
          var a = da(this);
          delete la[a];
        }
      };

      v.prototype.M = function () {
        if (this.o) for (; this.o.length;) {
          this.o.shift()();
        }
      };

      var ma = Array.prototype.indexOf ? function (a, b) {
        return Array.prototype.indexOf.call(a, b, void 0);
      } : function (a, b) {
        if ("string" === typeof a) return "string" !== typeof b || 1 != b.length ? -1 : a.indexOf(b, 0);

        for (var c = 0; c < a.length; c++) {
          if (c in a && a[c] === b) return c;
        }

        return -1;
      },
          na = Array.prototype.forEach ? function (a, b, c) {
        Array.prototype.forEach.call(a, b, c);
      } : function (a, b, c) {
        var d = a.length,
            e = "string" === typeof a ? a.split("") : a;

        for (var f = 0; f < d; f++) {
          f in e && b.call(c, e[f], f, a);
        }
      };

      function oa(a) {
        a: {
          var b = pa;
          var c = a.length,
              d = "string" === typeof a ? a.split("") : a;

          for (var e = 0; e < c; e++) {
            if (e in d && b.call(void 0, d[e], e, a)) {
              b = e;
              break a;
            }
          }

          b = -1;
        }

        return 0 > b ? null : "string" === typeof a ? a.charAt(b) : a[b];
      }

      function qa(a) {
        return Array.prototype.concat.apply([], arguments);
      }

      function ra(a) {
        var b = a.length;

        if (0 < b) {
          var c = Array(b);

          for (var d = 0; d < b; d++) {
            c[d] = a[d];
          }

          return c;
        }

        return [];
      }

      function sa(a) {
        return /^[\s\xa0]*$/.test(a);
      }

      var ta = String.prototype.trim ? function (a) {
        return a.trim();
      } : function (a) {
        return /^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1];
      };

      function w(a, b) {
        return -1 != a.indexOf(b);
      }

      function ua(a, b) {
        return a < b ? -1 : a > b ? 1 : 0;
      }

      var x;

      a: {
        var va = l.navigator;

        if (va) {
          var wa = va.userAgent;

          if (wa) {
            x = wa;
            break a;
          }
        }

        x = "";
      }

      function xa(a, b, c) {
        for (var d in a) {
          b.call(c, a[d], d, a);
        }
      }

      function ya(a) {
        var b = {};

        for (var c in a) {
          b[c] = a[c];
        }

        return b;
      }

      var za = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");

      function Aa(a, b) {
        var c, d;

        for (var e = 1; e < arguments.length; e++) {
          d = arguments[e];

          for (c in d) {
            a[c] = d[c];
          }

          for (var f = 0; f < za.length; f++) {
            c = za[f], Object.prototype.hasOwnProperty.call(d, c) && (a[c] = d[c]);
          }
        }
      }

      function Ca(a) {
        Ca[" "](a);
        return a;
      }

      Ca[" "] = aa;

      function Fa(a) {
        var b = Ga;
        return Object.prototype.hasOwnProperty.call(b, 9) ? b[9] : b[9] = a(9);
      }

      var Ha = w(x, "Opera"),
          y = w(x, "Trident") || w(x, "MSIE"),
          Ia = w(x, "Edge"),
          Ja = Ia || y,
          Ka = w(x, "Gecko") && !(w(x.toLowerCase(), "webkit") && !w(x, "Edge")) && !(w(x, "Trident") || w(x, "MSIE")) && !w(x, "Edge"),
          La = w(x.toLowerCase(), "webkit") && !w(x, "Edge");

      function Ma() {
        var a = l.document;
        return a ? a.documentMode : void 0;
      }

      var Na;

      a: {
        var Oa = "",
            Pa = function () {
          var a = x;
          if (Ka) return /rv:([^\);]+)(\)|;)/.exec(a);
          if (Ia) return /Edge\/([\d\.]+)/.exec(a);
          if (y) return /\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);
          if (La) return /WebKit\/(\S+)/.exec(a);
          if (Ha) return /(?:Version)[ \/]?(\S+)/.exec(a);
        }();

        Pa && (Oa = Pa ? Pa[1] : "");

        if (y) {
          var Qa = Ma();

          if (null != Qa && Qa > parseFloat(Oa)) {
            Na = String(Qa);
            break a;
          }
        }

        Na = Oa;
      }

      var Ga = {};

      function Ra() {
        return Fa(function () {
          var a = 0;
          var b = ta(String(Na)).split("."),
              c = ta("9").split("."),
              d = Math.max(b.length, c.length);

          for (var h = 0; 0 == a && h < d; h++) {
            var e = b[h] || "",
                f = c[h] || "";

            do {
              e = /(\d*)(\D*)(.*)/.exec(e) || ["", "", "", ""];
              f = /(\d*)(\D*)(.*)/.exec(f) || ["", "", "", ""];
              if (0 == e[0].length && 0 == f[0].length) break;
              a = ua(0 == e[1].length ? 0 : parseInt(e[1], 10), 0 == f[1].length ? 0 : parseInt(f[1], 10)) || ua(0 == e[2].length, 0 == f[2].length) || ua(e[2], f[2]);
              e = e[3];
              f = f[3];
            } while (0 == a);
          }

          return 0 <= a;
        });
      }

      var Sa;

      if (l.document && y) {
        var Ta = Ma();
        Sa = Ta ? Ta : parseInt(Na, 10) || void 0;
      } else Sa = void 0;

      var Ua = Sa;

      var Va = function () {
        if (!l.addEventListener || !Object.defineProperty) return !1;
        var a = !1,
            b = Object.defineProperty({}, "passive", {
          get: function get() {
            a = !0;
          }
        });

        try {
          l.addEventListener("test", aa, b), l.removeEventListener("test", aa, b);
        } catch (c) {}

        return a;
      }();

      function z(a, b) {
        this.type = a;
        this.g = this.target = b;
        this.defaultPrevented = !1;
      }

      z.prototype.h = function () {
        this.defaultPrevented = !0;
      };

      function A(a, b) {
        z.call(this, a ? a.type : "");
        this.relatedTarget = this.g = this.target = null;
        this.button = this.screenY = this.screenX = this.clientY = this.clientX = 0;
        this.key = "";
        this.metaKey = this.shiftKey = this.altKey = this.ctrlKey = !1;
        this.state = null;
        this.pointerId = 0;
        this.pointerType = "";
        this.i = null;

        if (a) {
          var c = this.type = a.type,
              d = a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : null;
          this.target = a.target || a.srcElement;
          this.g = b;

          if (b = a.relatedTarget) {
            if (Ka) {
              a: {
                try {
                  Ca(b.nodeName);
                  var e = !0;
                  break a;
                } catch (f) {}

                e = !1;
              }

              e || (b = null);
            }
          } else "mouseover" == c ? b = a.fromElement : "mouseout" == c && (b = a.toElement);

          this.relatedTarget = b;
          d ? (this.clientX = void 0 !== d.clientX ? d.clientX : d.pageX, this.clientY = void 0 !== d.clientY ? d.clientY : d.pageY, this.screenX = d.screenX || 0, this.screenY = d.screenY || 0) : (this.clientX = void 0 !== a.clientX ? a.clientX : a.pageX, this.clientY = void 0 !== a.clientY ? a.clientY : a.pageY, this.screenX = a.screenX || 0, this.screenY = a.screenY || 0);
          this.button = a.button;
          this.key = a.key || "";
          this.ctrlKey = a.ctrlKey;
          this.altKey = a.altKey;
          this.shiftKey = a.shiftKey;
          this.metaKey = a.metaKey;
          this.pointerId = a.pointerId || 0;
          this.pointerType = "string" === typeof a.pointerType ? a.pointerType : Wa[a.pointerType] || "";
          this.state = a.state;
          this.i = a;
          a.defaultPrevented && A.Z.h.call(this);
        }
      }

      t(A, z);
      var Wa = {
        2: "touch",
        3: "pen",
        4: "mouse"
      };

      A.prototype.h = function () {
        A.Z.h.call(this);
        var a = this.i;
        a.preventDefault ? a.preventDefault() : a.returnValue = !1;
      };

      var B = "closure_listenable_" + (1E6 * Math.random() | 0);
      var Xa = 0;

      function Ya(a, b, c, d, e) {
        this.listener = a;
        this.proxy = null;
        this.src = b;
        this.type = c;
        this.capture = !!d;
        this.ia = e;
        this.key = ++Xa;
        this.ca = this.fa = !1;
      }

      function Za(a) {
        a.ca = !0;
        a.listener = null;
        a.proxy = null;
        a.src = null;
        a.ia = null;
      }

      function $a(a) {
        this.src = a;
        this.g = {};
        this.h = 0;
      }

      $a.prototype.add = function (a, b, c, d, e) {
        var f = a.toString();
        a = this.g[f];
        a || (a = this.g[f] = [], this.h++);
        var h = ab(a, b, d, e);
        -1 < h ? (b = a[h], c || (b.fa = !1)) : (b = new Ya(b, this.src, f, !!d, e), b.fa = c, a.push(b));
        return b;
      };

      function bb(a, b) {
        var c = b.type;

        if (c in a.g) {
          var d = a.g[c],
              e = ma(d, b),
              f;
          (f = 0 <= e) && Array.prototype.splice.call(d, e, 1);
          f && (Za(b), 0 == a.g[c].length && (delete a.g[c], a.h--));
        }
      }

      function ab(a, b, c, d) {
        for (var e = 0; e < a.length; ++e) {
          var f = a[e];
          if (!f.ca && f.listener == b && f.capture == !!c && f.ia == d) return e;
        }

        return -1;
      }

      var cb = "closure_lm_" + (1E6 * Math.random() | 0),
          db = {};

      function fb(a, b, c, d, e) {
        if (d && d.once) return gb(a, b, c, d, e);

        if (Array.isArray(b)) {
          for (var f = 0; f < b.length; f++) {
            fb(a, b[f], c, d, e);
          }

          return null;
        }

        c = hb(c);
        return a && a[B] ? a.N(b, c, p(d) ? !!d.capture : !!d, e) : ib(a, b, c, !1, d, e);
      }

      function ib(a, b, c, d, e, f) {
        if (!b) throw Error("Invalid event type");
        var h = p(e) ? !!e.capture : !!e,
            n = jb(a);
        n || (a[cb] = n = new $a(a));
        c = n.add(b, c, d, h, f);
        if (c.proxy) return c;
        d = kb();
        c.proxy = d;
        d.src = a;
        d.listener = c;
        if (a.addEventListener) Va || (e = h), void 0 === e && (e = !1), a.addEventListener(b.toString(), d, e);else if (a.attachEvent) a.attachEvent(lb(b.toString()), d);else if (a.addListener && a.removeListener) a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");
        return c;
      }

      function kb() {
        function a(c) {
          return b.call(a.src, a.listener, c);
        }

        var b = mb;
        return a;
      }

      function gb(a, b, c, d, e) {
        if (Array.isArray(b)) {
          for (var f = 0; f < b.length; f++) {
            gb(a, b[f], c, d, e);
          }

          return null;
        }

        c = hb(c);
        return a && a[B] ? a.O(b, c, p(d) ? !!d.capture : !!d, e) : ib(a, b, c, !0, d, e);
      }

      function nb(a, b, c, d, e) {
        if (Array.isArray(b)) for (var f = 0; f < b.length; f++) {
          nb(a, b[f], c, d, e);
        } else (d = p(d) ? !!d.capture : !!d, c = hb(c), a && a[B]) ? (a = a.i, b = String(b).toString(), b in a.g && (f = a.g[b], c = ab(f, c, d, e), -1 < c && (Za(f[c]), Array.prototype.splice.call(f, c, 1), 0 == f.length && (delete a.g[b], a.h--)))) : a && (a = jb(a)) && (b = a.g[b.toString()], a = -1, b && (a = ab(b, c, d, e)), (c = -1 < a ? b[a] : null) && ob(c));
      }

      function ob(a) {
        if ("number" !== typeof a && a && !a.ca) {
          var b = a.src;
          if (b && b[B]) bb(b.i, a);else {
            var c = a.type,
                d = a.proxy;
            b.removeEventListener ? b.removeEventListener(c, d, a.capture) : b.detachEvent ? b.detachEvent(lb(c), d) : b.addListener && b.removeListener && b.removeListener(d);
            (c = jb(b)) ? (bb(c, a), 0 == c.h && (c.src = null, b[cb] = null)) : Za(a);
          }
        }
      }

      function lb(a) {
        return a in db ? db[a] : db[a] = "on" + a;
      }

      function mb(a, b) {
        if (a.ca) a = !0;else {
          b = new A(b, this);
          var c = a.listener,
              d = a.ia || a.src;
          a.fa && ob(a);
          a = c.call(d, b);
        }
        return a;
      }

      function jb(a) {
        a = a[cb];
        return a instanceof $a ? a : null;
      }

      var pb = "__closure_events_fn_" + (1E9 * Math.random() >>> 0);

      function hb(a) {
        if ("function" === typeof a) return a;
        a[pb] || (a[pb] = function (b) {
          return a.handleEvent(b);
        });
        return a[pb];
      }

      function C() {
        v.call(this);
        this.i = new $a(this);
        this.P = this;
        this.I = null;
      }

      t(C, v);
      C.prototype[B] = !0;

      C.prototype.removeEventListener = function (a, b, c, d) {
        nb(this, a, b, c, d);
      };

      function D(a, b) {
        var c,
            d = a.I;
        if (d) for (c = []; d; d = d.I) {
          c.push(d);
        }
        a = a.P;
        d = b.type || b;
        if ("string" === typeof b) b = new z(b, a);else if (b instanceof z) b.target = b.target || a;else {
          var e = b;
          b = new z(d, a);
          Aa(b, e);
        }
        e = !0;
        if (c) for (var f = c.length - 1; 0 <= f; f--) {
          var h = b.g = c[f];
          e = qb(h, d, !0, b) && e;
        }
        h = b.g = a;
        e = qb(h, d, !0, b) && e;
        e = qb(h, d, !1, b) && e;
        if (c) for (f = 0; f < c.length; f++) {
          h = b.g = c[f], e = qb(h, d, !1, b) && e;
        }
      }

      C.prototype.M = function () {
        C.Z.M.call(this);

        if (this.i) {
          var a = this.i,
              c;

          for (c in a.g) {
            for (var d = a.g[c], e = 0; e < d.length; e++) {
              Za(d[e]);
            }

            delete a.g[c];
            a.h--;
          }
        }

        this.I = null;
      };

      C.prototype.N = function (a, b, c, d) {
        return this.i.add(String(a), b, !1, c, d);
      };

      C.prototype.O = function (a, b, c, d) {
        return this.i.add(String(a), b, !0, c, d);
      };

      function qb(a, b, c, d) {
        b = a.i.g[String(b)];
        if (!b) return !0;
        b = b.concat();

        for (var e = !0, f = 0; f < b.length; ++f) {
          var h = b[f];

          if (h && !h.ca && h.capture == c) {
            var n = h.listener,
                u = h.ia || h.src;
            h.fa && bb(a.i, h);
            e = !1 !== n.call(u, d) && e;
          }
        }

        return e && !d.defaultPrevented;
      }

      var rb = l.JSON.stringify;

      function sb() {
        var a = tb;
        var b = null;
        a.g && (b = a.g, a.g = a.g.next, a.g || (a.h = null), b.next = null);
        return b;
      }

      var ub =
      /** @class */
      function () {
        function ub() {
          this.h = this.g = null;
        }

        ub.prototype.add = function (a, b) {
          var c = vb.get();
          c.set(a, b);
          this.h ? this.h.next = c : this.g = c;
          this.h = c;
        };

        return ub;
      }();

      var vb = new (
      /** @class */
      function () {
        function class_2(a, b) {
          this.i = a;
          this.j = b;
          this.h = 0;
          this.g = null;
        }

        class_2.prototype.get = function () {
          var a;
          0 < this.h ? (this.h--, a = this.g, this.g = a.next, a.next = null) : a = this.i();
          return a;
        };

        return class_2;
      }())(function () {
        return new wb();
      }, function (a) {
        return a.reset();
      });

      var wb =
      /** @class */
      function () {
        function wb() {
          this.next = this.g = this.h = null;
        }

        wb.prototype.set = function (a, b) {
          this.h = a;
          this.g = b;
          this.next = null;
        };

        wb.prototype.reset = function () {
          this.next = this.g = this.h = null;
        };

        return wb;
      }();

      function yb(a) {
        l.setTimeout(function () {
          throw a;
        }, 0);
      }

      function zb(a, b) {
        Ab || Bb();
        Cb || (Ab(), Cb = !0);
        tb.add(a, b);
      }

      var Ab;

      function Bb() {
        var a = l.Promise.resolve(void 0);

        Ab = function Ab() {
          a.then(Db);
        };
      }

      var Cb = !1,
          tb = new ub();

      function Db() {
        for (var a; a = sb();) {
          try {
            a.h.call(a.g);
          } catch (c) {
            yb(c);
          }

          var b = vb;
          b.j(a);
          100 > b.h && (b.h++, a.next = b.g, b.g = a);
        }

        Cb = !1;
      }

      function Eb(a, b) {
        C.call(this);
        this.h = a || 1;
        this.g = b || l;
        this.j = q(this.kb, this);
        this.l = Date.now();
      }

      t(Eb, C);
      k = Eb.prototype;
      k.da = !1;
      k.S = null;

      k.kb = function () {
        if (this.da) {
          var a = Date.now() - this.l;
          0 < a && a < .8 * this.h ? this.S = this.g.setTimeout(this.j, this.h - a) : (this.S && (this.g.clearTimeout(this.S), this.S = null), D(this, "tick"), this.da && (Fb(this), this.start()));
        }
      };

      k.start = function () {
        this.da = !0;
        this.S || (this.S = this.g.setTimeout(this.j, this.h), this.l = Date.now());
      };

      function Fb(a) {
        a.da = !1;
        a.S && (a.g.clearTimeout(a.S), a.S = null);
      }

      k.M = function () {
        Eb.Z.M.call(this);
        Fb(this);
        delete this.g;
      };

      function Gb(a, b, c) {
        if ("function" === typeof a) c && (a = q(a, c));else if (a && "function" == typeof a.handleEvent) a = q(a.handleEvent, a);else throw Error("Invalid listener argument");
        return 2147483647 < Number(b) ? -1 : l.setTimeout(a, b || 0);
      }

      function Hb(a) {
        a.g = Gb(function () {
          a.g = null;
          a.i && (a.i = !1, Hb(a));
        }, a.j);
        var b = a.h;
        a.h = null;
        a.m.apply(null, b);
      }

      var Ib =
      /** @class */
      function (_super) {
        __extends(Ib, _super);

        function Ib(a, b) {
          var _this = _super.call(this) || this;

          _this.m = a;
          _this.j = b;
          _this.h = null;
          _this.i = !1;
          _this.g = null;
          return _this;
        }

        Ib.prototype.l = function (a) {
          this.h = arguments;
          this.g ? this.i = !0 : Hb(this);
        };

        Ib.prototype.M = function () {
          _super.prototype.M.call(this);

          this.g && (l.clearTimeout(this.g), this.g = null, this.i = !1, this.h = null);
        };

        return Ib;
      }(v);

      function E(a) {
        v.call(this);
        this.h = a;
        this.g = {};
      }

      t(E, v);
      var Jb = [];

      function Kb(a, b, c, d) {
        Array.isArray(c) || (c && (Jb[0] = c.toString()), c = Jb);

        for (var e = 0; e < c.length; e++) {
          var f = fb(b, c[e], d || a.handleEvent, !1, a.h || a);
          if (!f) break;
          a.g[f.key] = f;
        }
      }

      function Lb(a) {
        xa(a.g, function (b, c) {
          this.g.hasOwnProperty(c) && ob(b);
        }, a);
        a.g = {};
      }

      E.prototype.M = function () {
        E.Z.M.call(this);
        Lb(this);
      };

      E.prototype.handleEvent = function () {
        throw Error("EventHandler.handleEvent not implemented");
      };

      function Mb() {
        this.g = !0;
      }

      Mb.prototype.Aa = function () {
        this.g = !1;
      };

      function Nb(a, b, c, d, e, f) {
        a.info(function () {
          if (a.g) {
            if (f) {
              var h = "";

              for (var n = f.split("&"), u = 0; u < n.length; u++) {
                var m = n[u].split("=");

                if (1 < m.length) {
                  var r = m[0];
                  m = m[1];
                  var G = r.split("_");
                  h = 2 <= G.length && "type" == G[1] ? h + (r + "=" + m + "&") : h + (r + "=redacted&");
                }
              }
            } else h = null;
          } else h = f;
          return "XMLHTTP REQ (" + d + ") [attempt " + e + "]: " + b + "\n" + c + "\n" + h;
        });
      }

      function Ob(a, b, c, d, e, f, h) {
        a.info(function () {
          return "XMLHTTP RESP (" + d + ") [ attempt " + e + "]: " + b + "\n" + c + "\n" + f + " " + h;
        });
      }

      function F(a, b, c, d) {
        a.info(function () {
          return "XMLHTTP TEXT (" + b + "): " + Pb(a, c) + (d ? " " + d : "");
        });
      }

      function Qb(a, b) {
        a.info(function () {
          return "TIMEOUT: " + b;
        });
      }

      Mb.prototype.info = function () {};

      function Pb(a, b) {
        if (!a.g) return b;
        if (!b) return null;

        try {
          var c = JSON.parse(b);
          if (c) for (a = 0; a < c.length; a++) {
            if (Array.isArray(c[a])) {
              var d = c[a];

              if (!(2 > d.length)) {
                var e = d[1];

                if (Array.isArray(e) && !(1 > e.length)) {
                  var f = e[0];
                  if ("noop" != f && "stop" != f && "close" != f) for (var h = 1; h < e.length; h++) {
                    e[h] = "";
                  }
                }
              }
            }
          }
          return rb(c);
        } catch (n) {
          return b;
        }
      }

      var H = {},
          Rb = null;

      function Sb() {
        return Rb = Rb || new C();
      }

      H.Ma = "serverreachability";

      function Tb(a) {
        z.call(this, H.Ma, a);
      }

      t(Tb, z);

      function I(a) {
        var b = Sb();
        D(b, new Tb(b, a));
      }

      H.STAT_EVENT = "statevent";

      function Ub(a, b) {
        z.call(this, H.STAT_EVENT, a);
        this.stat = b;
      }

      t(Ub, z);

      function J(a) {
        var b = Sb();
        D(b, new Ub(b, a));
      }

      H.Na = "timingevent";

      function Vb(a, b) {
        z.call(this, H.Na, a);
        this.size = b;
      }

      t(Vb, z);

      function K(a, b) {
        if ("function" !== typeof a) throw Error("Fn must not be null and must be a function");
        return l.setTimeout(function () {
          a();
        }, b);
      }

      var Wb = {
        NO_ERROR: 0,
        lb: 1,
        yb: 2,
        xb: 3,
        sb: 4,
        wb: 5,
        zb: 6,
        Ja: 7,
        TIMEOUT: 8,
        Cb: 9
      };
      var Xb = {
        qb: "complete",
        Mb: "success",
        Ka: "error",
        Ja: "abort",
        Eb: "ready",
        Fb: "readystatechange",
        TIMEOUT: "timeout",
        Ab: "incrementaldata",
        Db: "progress",
        tb: "downloadprogress",
        Ub: "uploadprogress"
      };

      function Yb() {}

      Yb.prototype.h = null;

      function Zb(a) {
        return a.h || (a.h = a.i());
      }

      function $b() {}

      var L = {
        OPEN: "a",
        pb: "b",
        Ka: "c",
        Bb: "d"
      };

      function ac() {
        z.call(this, "d");
      }

      t(ac, z);

      function bc() {
        z.call(this, "c");
      }

      t(bc, z);
      var cc;

      function dc() {}

      t(dc, Yb);

      dc.prototype.g = function () {
        return new XMLHttpRequest();
      };

      dc.prototype.i = function () {
        return {};
      };

      cc = new dc();

      function M(a, b, c, d) {
        this.l = a;
        this.j = b;
        this.m = c;
        this.X = d || 1;
        this.V = new E(this);
        this.P = ec;
        a = Ja ? 125 : void 0;
        this.W = new Eb(a);
        this.H = null;
        this.i = !1;
        this.s = this.A = this.v = this.K = this.F = this.Y = this.B = null;
        this.D = [];
        this.g = null;
        this.C = 0;
        this.o = this.u = null;
        this.N = -1;
        this.I = !1;
        this.O = 0;
        this.L = null;
        this.aa = this.J = this.$ = this.U = !1;
        this.h = new fc();
      }

      function fc() {
        this.i = null;
        this.g = "";
        this.h = !1;
      }

      var ec = 45E3,
          gc = {},
          hc = {};
      k = M.prototype;

      k.setTimeout = function (a) {
        this.P = a;
      };

      function ic(a, b, c) {
        a.K = 1;
        a.v = jc(N(b));
        a.s = c;
        a.U = !0;
        kc(a, null);
      }

      function kc(a, b) {
        a.F = Date.now();
        lc(a);
        a.A = N(a.v);
        var c = a.A,
            d = a.X;
        Array.isArray(d) || (d = [String(d)]);
        mc(c.h, "t", d);
        a.C = 0;
        c = a.l.H;
        a.h = new fc();
        a.g = nc(a.l, c ? b : null, !a.s);
        0 < a.O && (a.L = new Ib(q(a.Ia, a, a.g), a.O));
        Kb(a.V, a.g, "readystatechange", a.gb);
        b = a.H ? ya(a.H) : {};
        a.s ? (a.u || (a.u = "POST"), b["Content-Type"] = "application/x-www-form-urlencoded", a.g.ea(a.A, a.u, a.s, b)) : (a.u = "GET", a.g.ea(a.A, a.u, null, b));
        I(1);
        Nb(a.j, a.u, a.A, a.m, a.X, a.s);
      }

      k.gb = function (a) {
        a = a.target;
        var b = this.L;
        b && 3 == O(a) ? b.l() : this.Ia(a);
      };

      k.Ia = function (a) {
        try {
          if (a == this.g) a: {
            var r = O(this.g);
            var b = this.g.Da();
            var G = this.g.ba();

            if (!(3 > r) && (3 != r || Ja || this.g && (this.h.h || this.g.ga() || oc(this.g)))) {
              this.I || 4 != r || 7 == b || (8 == b || 0 >= G ? I(3) : I(2));
              pc(this);
              var c = this.g.ba();
              this.N = c;

              b: if (qc(this)) {
                var d = oc(this.g);
                a = "";
                var e = d.length,
                    f = 4 == O(this.g);

                if (!this.h.i) {
                  if ("undefined" === typeof TextDecoder) {
                    P(this);
                    rc(this);
                    var h = "";
                    break b;
                  }

                  this.h.i = new l.TextDecoder();
                }

                for (b = 0; b < e; b++) {
                  this.h.h = !0, a += this.h.i.decode(d[b], {
                    stream: f && b == e - 1
                  });
                }

                d.splice(0, e);
                this.h.g += a;
                this.C = 0;
                h = this.h.g;
              } else h = this.g.ga();

              this.i = 200 == c;
              Ob(this.j, this.u, this.A, this.m, this.X, r, c);

              if (this.i) {
                if (this.$ && !this.J) {
                  b: {
                    if (this.g) {
                      var n,
                          u = this.g;

                      if ((n = u.g ? u.g.getResponseHeader("X-HTTP-Initial-Response") : null) && !sa(n)) {
                        var m = n;
                        break b;
                      }
                    }

                    m = null;
                  }

                  if (c = m) F(this.j, this.m, c, "Initial handshake response via X-HTTP-Initial-Response"), this.J = !0, sc(this, c);else {
                    this.i = !1;
                    this.o = 3;
                    J(12);
                    P(this);
                    rc(this);
                    break a;
                  }
                }

                this.U ? (tc(this, r, h), Ja && this.i && 3 == r && (Kb(this.V, this.W, "tick", this.fb), this.W.start())) : (F(this.j, this.m, h, null), sc(this, h));
                4 == r && P(this);
                this.i && !this.I && (4 == r ? uc(this.l, this) : (this.i = !1, lc(this)));
              } else 400 == c && 0 < h.indexOf("Unknown SID") ? (this.o = 3, J(12)) : (this.o = 0, J(13)), P(this), rc(this);
            }
          }
        } catch (r) {} finally {}
      };

      function qc(a) {
        return a.g ? "GET" == a.u && 2 != a.K && a.l.Ba : !1;
      }

      function tc(a, b, c) {
        var d = !0,
            e;

        for (; !a.I && a.C < c.length;) {
          if (e = vc(a, c), e == hc) {
            4 == b && (a.o = 4, J(14), d = !1);
            F(a.j, a.m, null, "[Incomplete Response]");
            break;
          } else if (e == gc) {
            a.o = 4;
            J(15);
            F(a.j, a.m, c, "[Invalid Chunk]");
            d = !1;
            break;
          } else F(a.j, a.m, e, null), sc(a, e);
        }

        qc(a) && e != hc && e != gc && (a.h.g = "", a.C = 0);
        4 != b || 0 != c.length || a.h.h || (a.o = 1, J(16), d = !1);
        a.i = a.i && d;
        d ? 0 < c.length && !a.aa && (a.aa = !0, b = a.l, b.g == a && b.$ && !b.L && (b.h.info("Great, no buffering proxy detected. Bytes received: " + c.length), wc(b), b.L = !0, J(11))) : (F(a.j, a.m, c, "[Invalid Chunked Response]"), P(a), rc(a));
      }

      k.fb = function () {
        if (this.g) {
          var a = O(this.g),
              b = this.g.ga();
          this.C < b.length && (pc(this), tc(this, a, b), this.i && 4 != a && lc(this));
        }
      };

      function vc(a, b) {
        var c = a.C,
            d = b.indexOf("\n", c);
        if (-1 == d) return hc;
        c = Number(b.substring(c, d));
        if (isNaN(c)) return gc;
        d += 1;
        if (d + c > b.length) return hc;
        b = b.substr(d, c);
        a.C = d + c;
        return b;
      }

      k.cancel = function () {
        this.I = !0;
        P(this);
      };

      function lc(a) {
        a.Y = Date.now() + a.P;
        xc(a, a.P);
      }

      function xc(a, b) {
        if (null != a.B) throw Error("WatchDog timer not null");
        a.B = K(q(a.eb, a), b);
      }

      function pc(a) {
        a.B && (l.clearTimeout(a.B), a.B = null);
      }

      k.eb = function () {
        this.B = null;
        var a = Date.now();
        0 <= a - this.Y ? (Qb(this.j, this.A), 2 != this.K && (I(3), J(17)), P(this), this.o = 2, rc(this)) : xc(this, this.Y - a);
      };

      function rc(a) {
        0 == a.l.G || a.I || uc(a.l, a);
      }

      function P(a) {
        pc(a);
        var b = a.L;
        b && "function" == typeof b.na && b.na();
        a.L = null;
        Fb(a.W);
        Lb(a.V);
        a.g && (b = a.g, a.g = null, b.abort(), b.na());
      }

      function sc(a, b) {
        try {
          var c = a.l;
          if (0 != c.G && (c.g == a || yc(c.i, a))) if (c.I = a.N, !a.J && yc(c.i, a) && 3 == c.G) {
            try {
              var d = c.Ca.g.parse(b);
            } catch (m) {
              d = null;
            }

            if (Array.isArray(d) && 3 == d.length) {
              var e = d;
              if (0 == e[0]) a: {
                if (!c.u) {
                  if (c.g) if (c.g.F + 3E3 < a.F) zc(c), Ac(c);else break a;
                  Bc(c);
                  J(18);
                }
              } else c.ta = e[1], 0 < c.ta - c.U && 37500 > e[2] && c.N && 0 == c.A && !c.v && (c.v = K(q(c.ab, c), 6E3));

              if (1 >= Cc(c.i) && c.ka) {
                try {
                  c.ka();
                } catch (m) {}

                c.ka = void 0;
              }
            } else Q(c, 11);
          } else if ((a.J || c.g == a) && zc(c), !sa(b)) for (e = c.Ca.g.parse(b), b = 0; b < e.length; b++) {
            var m = e[b];
            c.U = m[0];
            m = m[1];
            if (2 == c.G) {
              if ("c" == m[0]) {
                c.J = m[1];
                c.la = m[2];
                var r = m[3];
                null != r && (c.ma = r, c.h.info("VER=" + c.ma));
                var G = m[4];
                null != G && (c.za = G, c.h.info("SVER=" + c.za));
                var Da = m[5];
                null != Da && "number" === typeof Da && 0 < Da && (d = 1.5 * Da, c.K = d, c.h.info("backChannelRequestTimeoutMs_=" + d));
                d = c;
                var ca = a.g;

                if (ca) {
                  var Ea = ca.g ? ca.g.getResponseHeader("X-Client-Wire-Protocol") : null;

                  if (Ea) {
                    var f = d.i;
                    !f.g && (w(Ea, "spdy") || w(Ea, "quic") || w(Ea, "h2")) && (f.j = f.l, f.g = new Set(), f.h && (Dc(f, f.h), f.h = null));
                  }

                  if (d.D) {
                    var xb = ca.g ? ca.g.getResponseHeader("X-HTTP-Session-Id") : null;
                    xb && (d.sa = xb, R(d.F, d.D, xb));
                  }
                }

                c.G = 3;
                c.j && c.j.xa();
                c.$ && (c.O = Date.now() - a.F, c.h.info("Handshake RTT: " + c.O + "ms"));
                d = c;
                var h = a;
                d.oa = Ec(d, d.H ? d.la : null, d.W);

                if (h.J) {
                  Fc(d.i, h);
                  var n = h,
                      u = d.K;
                  u && n.setTimeout(u);
                  n.B && (pc(n), lc(n));
                  d.g = h;
                } else Gc(d);

                0 < c.l.length && Hc(c);
              } else "stop" != m[0] && "close" != m[0] || Q(c, 7);
            } else 3 == c.G && ("stop" == m[0] || "close" == m[0] ? "stop" == m[0] ? Q(c, 7) : Ic(c) : "noop" != m[0] && c.j && c.j.wa(m), c.A = 0);
          }
          I(4);
        } catch (m) {}
      }

      function Jc(a) {
        if (a.R && "function" == typeof a.R) return a.R();
        if ("string" === typeof a) return a.split("");

        if (ba(a)) {
          for (var b = [], c = a.length, d = 0; d < c; d++) {
            b.push(a[d]);
          }

          return b;
        }

        b = [];
        c = 0;

        for (d in a) {
          b[c++] = a[d];
        }

        return b;
      }

      function Kc(a, b) {
        if (a.forEach && "function" == typeof a.forEach) a.forEach(b, void 0);else if (ba(a) || "string" === typeof a) na(a, b, void 0);else {
          if (a.T && "function" == typeof a.T) var c = a.T();else if (a.R && "function" == typeof a.R) c = void 0;else if (ba(a) || "string" === typeof a) {
            c = [];

            for (var d = a.length, e = 0; e < d; e++) {
              c.push(e);
            }
          } else for (e in c = [], d = 0, a) {
            c[d++] = e;
          }
          d = Jc(a);
          e = d.length;

          for (var f = 0; f < e; f++) {
            b.call(void 0, d[f], c && c[f], a);
          }
        }
      }

      function S(a, b) {
        this.h = {};
        this.g = [];
        this.i = 0;
        var c = arguments.length;

        if (1 < c) {
          if (c % 2) throw Error("Uneven number of arguments");

          for (var d = 0; d < c; d += 2) {
            this.set(arguments[d], arguments[d + 1]);
          }
        } else if (a) if (a instanceof S) for (c = a.T(), d = 0; d < c.length; d++) {
          this.set(c[d], a.get(c[d]));
        } else for (d in a) {
          this.set(d, a[d]);
        }
      }

      k = S.prototype;

      k.R = function () {
        Lc(this);

        for (var a = [], b = 0; b < this.g.length; b++) {
          a.push(this.h[this.g[b]]);
        }

        return a;
      };

      k.T = function () {
        Lc(this);
        return this.g.concat();
      };

      function Lc(a) {
        if (a.i != a.g.length) {
          for (var b = 0, c = 0; b < a.g.length;) {
            var d = a.g[b];
            T(a.h, d) && (a.g[c++] = d);
            b++;
          }

          a.g.length = c;
        }

        if (a.i != a.g.length) {
          var e = {};

          for (c = b = 0; b < a.g.length;) {
            d = a.g[b], T(e, d) || (a.g[c++] = d, e[d] = 1), b++;
          }

          a.g.length = c;
        }
      }

      k.get = function (a, b) {
        return T(this.h, a) ? this.h[a] : b;
      };

      k.set = function (a, b) {
        T(this.h, a) || (this.i++, this.g.push(a));
        this.h[a] = b;
      };

      k.forEach = function (a, b) {
        for (var c = this.T(), d = 0; d < c.length; d++) {
          var e = c[d],
              f = this.get(e);
          a.call(b, f, e, this);
        }
      };

      function T(a, b) {
        return Object.prototype.hasOwnProperty.call(a, b);
      }

      var Mc = /^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;

      function Nc(a, b) {
        if (a) {
          a = a.split("&");

          for (var c = 0; c < a.length; c++) {
            var d = a[c].indexOf("="),
                e = null;

            if (0 <= d) {
              var f = a[c].substring(0, d);
              e = a[c].substring(d + 1);
            } else f = a[c];

            b(f, e ? decodeURIComponent(e.replace(/\+/g, " ")) : "");
          }
        }
      }

      function U(a, b) {
        this.i = this.s = this.j = "";
        this.m = null;
        this.o = this.l = "";
        this.g = !1;

        if (a instanceof U) {
          this.g = void 0 !== b ? b : a.g;
          Oc(this, a.j);
          this.s = a.s;
          Pc(this, a.i);
          Qc(this, a.m);
          this.l = a.l;
          b = a.h;
          var c = new Rc();
          c.i = b.i;
          b.g && (c.g = new S(b.g), c.h = b.h);
          Sc(this, c);
          this.o = a.o;
        } else a && (c = String(a).match(Mc)) ? (this.g = !!b, Oc(this, c[1] || "", !0), this.s = Tc(c[2] || ""), Pc(this, c[3] || "", !0), Qc(this, c[4]), this.l = Tc(c[5] || "", !0), Sc(this, c[6] || "", !0), this.o = Tc(c[7] || "")) : (this.g = !!b, this.h = new Rc(null, this.g));
      }

      U.prototype.toString = function () {
        var a = [],
            b = this.j;
        b && a.push(Uc(b, Vc, !0), ":");
        var c = this.i;
        if (c || "file" == b) a.push("//"), (b = this.s) && a.push(Uc(b, Vc, !0), "@"), a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g, "%$1")), c = this.m, null != c && a.push(":", String(c));
        if (c = this.l) this.i && "/" != c.charAt(0) && a.push("/"), a.push(Uc(c, "/" == c.charAt(0) ? Wc : Xc, !0));
        (c = this.h.toString()) && a.push("?", c);
        (c = this.o) && a.push("#", Uc(c, Yc));
        return a.join("");
      };

      function N(a) {
        return new U(a);
      }

      function Oc(a, b, c) {
        a.j = c ? Tc(b, !0) : b;
        a.j && (a.j = a.j.replace(/:$/, ""));
      }

      function Pc(a, b, c) {
        a.i = c ? Tc(b, !0) : b;
      }

      function Qc(a, b) {
        if (b) {
          b = Number(b);
          if (isNaN(b) || 0 > b) throw Error("Bad port number " + b);
          a.m = b;
        } else a.m = null;
      }

      function Sc(a, b, c) {
        b instanceof Rc ? (a.h = b, Zc(a.h, a.g)) : (c || (b = Uc(b, $c)), a.h = new Rc(b, a.g));
      }

      function R(a, b, c) {
        a.h.set(b, c);
      }

      function jc(a) {
        R(a, "zx", Math.floor(2147483648 * Math.random()).toString(36) + Math.abs(Math.floor(2147483648 * Math.random()) ^ Date.now()).toString(36));
        return a;
      }

      function ad(a) {
        return a instanceof U ? N(a) : new U(a, void 0);
      }

      function bd(a, b, c, d) {
        var e = new U(null, void 0);
        a && Oc(e, a);
        b && Pc(e, b);
        c && Qc(e, c);
        d && (e.l = d);
        return e;
      }

      function Tc(a, b) {
        return a ? b ? decodeURI(a.replace(/%25/g, "%2525")) : decodeURIComponent(a) : "";
      }

      function Uc(a, b, c) {
        return "string" === typeof a ? (a = encodeURI(a).replace(b, cd), c && (a = a.replace(/%25([0-9a-fA-F]{2})/g, "%$1")), a) : null;
      }

      function cd(a) {
        a = a.charCodeAt(0);
        return "%" + (a >> 4 & 15).toString(16) + (a & 15).toString(16);
      }

      var Vc = /[#\/\?@]/g,
          Xc = /[#\?:]/g,
          Wc = /[#\?]/g,
          $c = /[#\?@]/g,
          Yc = /#/g;

      function Rc(a, b) {
        this.h = this.g = null;
        this.i = a || null;
        this.j = !!b;
      }

      function V(a) {
        a.g || (a.g = new S(), a.h = 0, a.i && Nc(a.i, function (b, c) {
          a.add(decodeURIComponent(b.replace(/\+/g, " ")), c);
        }));
      }

      k = Rc.prototype;

      k.add = function (a, b) {
        V(this);
        this.i = null;
        a = W(this, a);
        var c = this.g.get(a);
        c || this.g.set(a, c = []);
        c.push(b);
        this.h += 1;
        return this;
      };

      function dd(a, b) {
        V(a);
        b = W(a, b);
        T(a.g.h, b) && (a.i = null, a.h -= a.g.get(b).length, a = a.g, T(a.h, b) && (delete a.h[b], a.i--, a.g.length > 2 * a.i && Lc(a)));
      }

      function ed(a, b) {
        V(a);
        b = W(a, b);
        return T(a.g.h, b);
      }

      k.forEach = function (a, b) {
        V(this);
        this.g.forEach(function (c, d) {
          na(c, function (e) {
            a.call(b, e, d, this);
          }, this);
        }, this);
      };

      k.T = function () {
        V(this);

        for (var a = this.g.R(), b = this.g.T(), c = [], d = 0; d < b.length; d++) {
          for (var e = a[d], f = 0; f < e.length; f++) {
            c.push(b[d]);
          }
        }

        return c;
      };

      k.R = function (a) {
        V(this);
        var b = [];
        if ("string" === typeof a) ed(this, a) && (b = qa(b, this.g.get(W(this, a))));else {
          a = this.g.R();

          for (var c = 0; c < a.length; c++) {
            b = qa(b, a[c]);
          }
        }
        return b;
      };

      k.set = function (a, b) {
        V(this);
        this.i = null;
        a = W(this, a);
        ed(this, a) && (this.h -= this.g.get(a).length);
        this.g.set(a, [b]);
        this.h += 1;
        return this;
      };

      k.get = function (a, b) {
        if (!a) return b;
        a = this.R(a);
        return 0 < a.length ? String(a[0]) : b;
      };

      function mc(a, b, c) {
        dd(a, b);
        0 < c.length && (a.i = null, a.g.set(W(a, b), ra(c)), a.h += c.length);
      }

      k.toString = function () {
        if (this.i) return this.i;
        if (!this.g) return "";

        for (var a = [], b = this.g.T(), c = 0; c < b.length; c++) {
          var d = b[c],
              e = encodeURIComponent(String(d));
          d = this.R(d);

          for (var f = 0; f < d.length; f++) {
            var h = e;
            "" !== d[f] && (h += "=" + encodeURIComponent(String(d[f])));
            a.push(h);
          }
        }

        return this.i = a.join("&");
      };

      function W(a, b) {
        b = String(b);
        a.j && (b = b.toLowerCase());
        return b;
      }

      function Zc(a, b) {
        b && !a.j && (V(a), a.i = null, a.g.forEach(function (c, d) {
          var e = d.toLowerCase();
          d != e && (dd(this, d), mc(this, e, c));
        }, a));
        a.j = b;
      }

      var fd =
      /** @class */
      function () {
        function fd(a, b) {
          this.h = a;
          this.g = b;
        }

        return fd;
      }();

      function gd(a) {
        this.l = a || hd;
        l.PerformanceNavigationTiming ? (a = l.performance.getEntriesByType("navigation"), a = 0 < a.length && ("hq" == a[0].nextHopProtocol || "h2" == a[0].nextHopProtocol)) : a = !!(l.g && l.g.Ea && l.g.Ea() && l.g.Ea().Zb);
        this.j = a ? this.l : 1;
        this.g = null;
        1 < this.j && (this.g = new Set());
        this.h = null;
        this.i = [];
      }

      var hd = 10;

      function id(a) {
        return a.h ? !0 : a.g ? a.g.size >= a.j : !1;
      }

      function Cc(a) {
        return a.h ? 1 : a.g ? a.g.size : 0;
      }

      function yc(a, b) {
        return a.h ? a.h == b : a.g ? a.g.has(b) : !1;
      }

      function Dc(a, b) {
        a.g ? a.g.add(b) : a.h = b;
      }

      function Fc(a, b) {
        a.h && a.h == b ? a.h = null : a.g && a.g.has(b) && a.g["delete"](b);
      }

      gd.prototype.cancel = function () {
        var e_1, _a;

        this.i = jd(this);
        if (this.h) this.h.cancel(), this.h = null;else if (this.g && 0 !== this.g.size) {
          try {
            for (var _b = __values(this.g.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
              var a = _c.value;
              a.cancel();
            }
          } catch (e_1_1) {
            e_1 = {
              error: e_1_1
            };
          } finally {
            try {
              if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
            } finally {
              if (e_1) throw e_1.error;
            }
          }

          this.g.clear();
        }
      };

      function jd(a) {
        var e_2, _a;

        if (null != a.h) return a.i.concat(a.h.D);

        if (null != a.g && 0 !== a.g.size) {
          var b = a.i;

          try {
            for (var _b = __values(a.g.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
              var c = _c.value;
              b = b.concat(c.D);
            }
          } catch (e_2_1) {
            e_2 = {
              error: e_2_1
            };
          } finally {
            try {
              if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
            } finally {
              if (e_2) throw e_2.error;
            }
          }

          return b;
        }

        return ra(a.i);
      }

      function kd() {}

      kd.prototype.stringify = function (a) {
        return l.JSON.stringify(a, void 0);
      };

      kd.prototype.parse = function (a) {
        return l.JSON.parse(a, void 0);
      };

      function ld() {
        this.g = new kd();
      }

      function md(a, b, c) {
        var d = c || "";

        try {
          Kc(a, function (e, f) {
            var h = e;
            p(e) && (h = rb(e));
            b.push(d + f + "=" + encodeURIComponent(h));
          });
        } catch (e) {
          throw b.push(d + "type=" + encodeURIComponent("_badmap")), e;
        }
      }

      function nd(a, b) {
        var c = new Mb();

        if (l.Image) {
          var d_1 = new Image();
          d_1.onload = ja(od, c, d_1, "TestLoadImage: loaded", !0, b);
          d_1.onerror = ja(od, c, d_1, "TestLoadImage: error", !1, b);
          d_1.onabort = ja(od, c, d_1, "TestLoadImage: abort", !1, b);
          d_1.ontimeout = ja(od, c, d_1, "TestLoadImage: timeout", !1, b);
          l.setTimeout(function () {
            if (d_1.ontimeout) d_1.ontimeout();
          }, 1E4);
          d_1.src = a;
        } else b(!1);
      }

      function od(a, b, c, d, e) {
        try {
          b.onload = null, b.onerror = null, b.onabort = null, b.ontimeout = null, e(d);
        } catch (f) {}
      }

      function pd(a) {
        this.l = a.$b || null;
        this.j = a.ib || !1;
      }

      t(pd, Yb);

      pd.prototype.g = function () {
        return new qd(this.l, this.j);
      };

      pd.prototype.i = function (a) {
        return function () {
          return a;
        };
      }({});

      function qd(a, b) {
        C.call(this);
        this.D = a;
        this.u = b;
        this.m = void 0;
        this.readyState = rd;
        this.status = 0;
        this.responseType = this.responseText = this.response = this.statusText = "";
        this.onreadystatechange = null;
        this.v = new Headers();
        this.h = null;
        this.C = "GET";
        this.B = "";
        this.g = !1;
        this.A = this.j = this.l = null;
      }

      t(qd, C);
      var rd = 0;
      k = qd.prototype;

      k.open = function (a, b) {
        if (this.readyState != rd) throw this.abort(), Error("Error reopening a connection");
        this.C = a;
        this.B = b;
        this.readyState = 1;
        sd(this);
      };

      k.send = function (a) {
        if (1 != this.readyState) throw this.abort(), Error("need to call open() first. ");
        this.g = !0;
        var b = {
          headers: this.v,
          method: this.C,
          credentials: this.m,
          cache: void 0
        };
        a && (b.body = a);
        (this.D || l).fetch(new Request(this.B, b)).then(this.Va.bind(this), this.ha.bind(this));
      };

      k.abort = function () {
        this.response = this.responseText = "";
        this.v = new Headers();
        this.status = 0;
        this.j && this.j.cancel("Request was aborted.");
        1 <= this.readyState && this.g && 4 != this.readyState && (this.g = !1, td(this));
        this.readyState = rd;
      };

      k.Va = function (a) {
        if (this.g && (this.l = a, this.h || (this.status = this.l.status, this.statusText = this.l.statusText, this.h = a.headers, this.readyState = 2, sd(this)), this.g && (this.readyState = 3, sd(this), this.g))) if ("arraybuffer" === this.responseType) a.arrayBuffer().then(this.Ta.bind(this), this.ha.bind(this));else if ("undefined" !== typeof l.ReadableStream && "body" in a) {
          this.j = a.body.getReader();

          if (this.u) {
            if (this.responseType) throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');
            this.response = [];
          } else this.response = this.responseText = "", this.A = new TextDecoder();

          ud(this);
        } else a.text().then(this.Ua.bind(this), this.ha.bind(this));
      };

      function ud(a) {
        a.j.read().then(a.Sa.bind(a))["catch"](a.ha.bind(a));
      }

      k.Sa = function (a) {
        if (this.g) {
          if (this.u && a.value) this.response.push(a.value);else if (!this.u) {
            var b = a.value ? a.value : new Uint8Array(0);
            if (b = this.A.decode(b, {
              stream: !a.done
            })) this.response = this.responseText += b;
          }
          a.done ? td(this) : sd(this);
          3 == this.readyState && ud(this);
        }
      };

      k.Ua = function (a) {
        this.g && (this.response = this.responseText = a, td(this));
      };

      k.Ta = function (a) {
        this.g && (this.response = a, td(this));
      };

      k.ha = function () {
        this.g && td(this);
      };

      function td(a) {
        a.readyState = 4;
        a.l = null;
        a.j = null;
        a.A = null;
        sd(a);
      }

      k.setRequestHeader = function (a, b) {
        this.v.append(a, b);
      };

      k.getResponseHeader = function (a) {
        return this.h ? this.h.get(a.toLowerCase()) || "" : "";
      };

      k.getAllResponseHeaders = function () {
        if (!this.h) return "";
        var a = [],
            b = this.h.entries();

        for (var c = b.next(); !c.done;) {
          c = c.value, a.push(c[0] + ": " + c[1]), c = b.next();
        }

        return a.join("\r\n");
      };

      function sd(a) {
        a.onreadystatechange && a.onreadystatechange.call(a);
      }

      Object.defineProperty(qd.prototype, "withCredentials", {
        get: function get() {
          return "include" === this.m;
        },
        set: function set(a) {
          this.m = a ? "include" : "same-origin";
        }
      });
      var vd = l.JSON.parse;

      function X(a) {
        C.call(this);
        this.headers = new S();
        this.u = a || null;
        this.h = !1;
        this.C = this.g = null;
        this.H = "";
        this.m = 0;
        this.j = "";
        this.l = this.F = this.v = this.D = !1;
        this.B = 0;
        this.A = null;
        this.J = wd;
        this.K = this.L = !1;
      }

      t(X, C);
      var wd = "",
          xd = /^https?$/i,
          yd = ["POST", "PUT"];
      k = X.prototype;

      k.ea = function (a, b, c, d) {
        if (this.g) throw Error("[goog.net.XhrIo] Object is active with another request=" + this.H + "; newUri=" + a);
        b = b ? b.toUpperCase() : "GET";
        this.H = a;
        this.j = "";
        this.m = 0;
        this.D = !1;
        this.h = !0;
        this.g = this.u ? this.u.g() : cc.g();
        this.C = this.u ? Zb(this.u) : Zb(cc);
        this.g.onreadystatechange = q(this.Fa, this);

        try {
          this.F = !0, this.g.open(b, String(a), !0), this.F = !1;
        } catch (f) {
          zd(this, f);
          return;
        }

        a = c || "";
        var e = new S(this.headers);
        d && Kc(d, function (f, h) {
          e.set(h, f);
        });
        d = oa(e.T());
        c = l.FormData && a instanceof l.FormData;
        !(0 <= ma(yd, b)) || d || c || e.set("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
        e.forEach(function (f, h) {
          this.g.setRequestHeader(h, f);
        }, this);
        this.J && (this.g.responseType = this.J);
        "withCredentials" in this.g && this.g.withCredentials !== this.L && (this.g.withCredentials = this.L);

        try {
          Ad(this), 0 < this.B && ((this.K = Bd(this.g)) ? (this.g.timeout = this.B, this.g.ontimeout = q(this.pa, this)) : this.A = Gb(this.pa, this.B, this)), this.v = !0, this.g.send(a), this.v = !1;
        } catch (f) {
          zd(this, f);
        }
      };

      function Bd(a) {
        return y && Ra() && "number" === typeof a.timeout && void 0 !== a.ontimeout;
      }

      function pa(a) {
        return "content-type" == a.toLowerCase();
      }

      k.pa = function () {
        "undefined" != typeof goog && this.g && (this.j = "Timed out after " + this.B + "ms, aborting", this.m = 8, D(this, "timeout"), this.abort(8));
      };

      function zd(a, b) {
        a.h = !1;
        a.g && (a.l = !0, a.g.abort(), a.l = !1);
        a.j = b;
        a.m = 5;
        Cd(a);
        Dd(a);
      }

      function Cd(a) {
        a.D || (a.D = !0, D(a, "complete"), D(a, "error"));
      }

      k.abort = function (a) {
        this.g && this.h && (this.h = !1, this.l = !0, this.g.abort(), this.l = !1, this.m = a || 7, D(this, "complete"), D(this, "abort"), Dd(this));
      };

      k.M = function () {
        this.g && (this.h && (this.h = !1, this.l = !0, this.g.abort(), this.l = !1), Dd(this, !0));
        X.Z.M.call(this);
      };

      k.Fa = function () {
        this.s || (this.F || this.v || this.l ? Ed(this) : this.cb());
      };

      k.cb = function () {
        Ed(this);
      };

      function Ed(a) {
        if (a.h && "undefined" != typeof goog && (!a.C[1] || 4 != O(a) || 2 != a.ba())) if (a.v && 4 == O(a)) Gb(a.Fa, 0, a);else if (D(a, "readystatechange"), 4 == O(a)) {
          a.h = !1;

          try {
            var n = a.ba();

            a: switch (n) {
              case 200:
              case 201:
              case 202:
              case 204:
              case 206:
              case 304:
              case 1223:
                var b = !0;
                break a;

              default:
                b = !1;
            }

            var c;

            if (!(c = b)) {
              var d;

              if (d = 0 === n) {
                var e = String(a.H).match(Mc)[1] || null;

                if (!e && l.self && l.self.location) {
                  var f = l.self.location.protocol;
                  e = f.substr(0, f.length - 1);
                }

                d = !xd.test(e ? e.toLowerCase() : "");
              }

              c = d;
            }

            if (c) D(a, "complete"), D(a, "success");else {
              a.m = 6;

              try {
                var h = 2 < O(a) ? a.g.statusText : "";
              } catch (u) {
                h = "";
              }

              a.j = h + " [" + a.ba() + "]";
              Cd(a);
            }
          } finally {
            Dd(a);
          }
        }
      }

      function Dd(a, b) {
        if (a.g) {
          Ad(a);
          var c = a.g,
              d = a.C[0] ? aa : null;
          a.g = null;
          a.C = null;
          b || D(a, "ready");

          try {
            c.onreadystatechange = d;
          } catch (e) {}
        }
      }

      function Ad(a) {
        a.g && a.K && (a.g.ontimeout = null);
        a.A && (l.clearTimeout(a.A), a.A = null);
      }

      function O(a) {
        return a.g ? a.g.readyState : 0;
      }

      k.ba = function () {
        try {
          return 2 < O(this) ? this.g.status : -1;
        } catch (a) {
          return -1;
        }
      };

      k.ga = function () {
        try {
          return this.g ? this.g.responseText : "";
        } catch (a) {
          return "";
        }
      };

      k.Qa = function (a) {
        if (this.g) {
          var b = this.g.responseText;
          a && 0 == b.indexOf(a) && (b = b.substring(a.length));
          return vd(b);
        }
      };

      function oc(a) {
        try {
          if (!a.g) return null;
          if ("response" in a.g) return a.g.response;

          switch (a.J) {
            case wd:
            case "text":
              return a.g.responseText;

            case "arraybuffer":
              if ("mozResponseArrayBuffer" in a.g) return a.g.mozResponseArrayBuffer;
          }

          return null;
        } catch (b) {
          return null;
        }
      }

      k.Da = function () {
        return this.m;
      };

      k.La = function () {
        return "string" === typeof this.j ? this.j : String(this.j);
      };

      function Fd(a) {
        var b = "";
        xa(a, function (c, d) {
          b += d;
          b += ":";
          b += c;
          b += "\r\n";
        });
        return b;
      }

      function Gd(a, b, c) {
        a: {
          for (d in c) {
            var d = !1;
            break a;
          }

          d = !0;
        }

        d || (c = Fd(c), "string" === typeof a ? null != c && encodeURIComponent(String(c)) : R(a, b, c));
      }

      function Hd(a, b, c) {
        return c && c.internalChannelParams ? c.internalChannelParams[a] || b : b;
      }

      function Id(a) {
        this.za = 0;
        this.l = [];
        this.h = new Mb();
        this.la = this.oa = this.F = this.W = this.g = this.sa = this.D = this.aa = this.o = this.P = this.s = null;
        this.Za = this.V = 0;
        this.Xa = Hd("failFast", !1, a);
        this.N = this.v = this.u = this.m = this.j = null;
        this.X = !0;
        this.I = this.ta = this.U = -1;
        this.Y = this.A = this.C = 0;
        this.Pa = Hd("baseRetryDelayMs", 5E3, a);
        this.$a = Hd("retryDelaySeedMs", 1E4, a);
        this.Ya = Hd("forwardChannelMaxRetries", 2, a);
        this.ra = Hd("forwardChannelRequestTimeoutMs", 2E4, a);
        this.qa = a && a.xmlHttpFactory || void 0;
        this.Ba = a && a.Yb || !1;
        this.K = void 0;
        this.H = a && a.supportsCrossDomainXhr || !1;
        this.J = "";
        this.i = new gd(a && a.concurrentRequestLimit);
        this.Ca = new ld();
        this.ja = a && a.fastHandshake || !1;
        this.Ra = a && a.Wb || !1;
        a && a.Aa && this.h.Aa();
        a && a.forceLongPolling && (this.X = !1);
        this.$ = !this.ja && this.X && a && a.detectBufferingProxy || !1;
        this.ka = void 0;
        this.O = 0;
        this.L = !1;
        this.B = null;
        this.Wa = !a || !1 !== a.Xb;
      }

      k = Id.prototype;
      k.ma = 8;
      k.G = 1;

      function Ic(a) {
        Jd(a);

        if (3 == a.G) {
          var b = a.V++,
              c = N(a.F);
          R(c, "SID", a.J);
          R(c, "RID", b);
          R(c, "TYPE", "terminate");
          Kd(a, c);
          b = new M(a, a.h, b, void 0);
          b.K = 2;
          b.v = jc(N(c));
          c = !1;
          l.navigator && l.navigator.sendBeacon && (c = l.navigator.sendBeacon(b.v.toString(), ""));
          !c && l.Image && (new Image().src = b.v, c = !0);
          c || (b.g = nc(b.l, null), b.g.ea(b.v));
          b.F = Date.now();
          lc(b);
        }

        Ld(a);
      }

      k.hb = function (a) {
        try {
          this.h.info("Origin Trials invoked: " + a);
        } catch (b) {}
      };

      function Ac(a) {
        a.g && (wc(a), a.g.cancel(), a.g = null);
      }

      function Jd(a) {
        Ac(a);
        a.u && (l.clearTimeout(a.u), a.u = null);
        zc(a);
        a.i.cancel();
        a.m && ("number" === typeof a.m && l.clearTimeout(a.m), a.m = null);
      }

      function Md(a, b) {
        a.l.push(new fd(a.Za++, b));
        3 == a.G && Hc(a);
      }

      function Hc(a) {
        id(a.i) || a.m || (a.m = !0, zb(a.Ha, a), a.C = 0);
      }

      function Nd(a, b) {
        if (Cc(a.i) >= a.i.j - (a.m ? 1 : 0)) return !1;
        if (a.m) return a.l = b.D.concat(a.l), !0;
        if (1 == a.G || 2 == a.G || a.C >= (a.Xa ? 0 : a.Ya)) return !1;
        a.m = K(q(a.Ha, a, b), Od(a, a.C));
        a.C++;
        return !0;
      }

      k.Ha = function (a) {
        if (this.m) if (this.m = null, 1 == this.G) {
          if (!a) {
            this.V = Math.floor(1E5 * Math.random());
            a = this.V++;
            var e = new M(this, this.h, a, void 0);
            var f = this.s;
            this.P && (f ? (f = ya(f), Aa(f, this.P)) : f = this.P);
            null === this.o && (e.H = f);
            if (this.ja) a: {
              var b = 0;

              for (var c = 0; c < this.l.length; c++) {
                b: {
                  var d = this.l[c];

                  if ("__data__" in d.g && (d = d.g.__data__, "string" === typeof d)) {
                    d = d.length;
                    break b;
                  }

                  d = void 0;
                }

                if (void 0 === d) break;
                b += d;

                if (4096 < b) {
                  b = c;
                  break a;
                }

                if (4096 === b || c === this.l.length - 1) {
                  b = c + 1;
                  break a;
                }
              }

              b = 1E3;
            } else b = 1E3;
            b = Pd(this, e, b);
            c = N(this.F);
            R(c, "RID", a);
            R(c, "CVER", 22);
            this.D && R(c, "X-HTTP-Session-Id", this.D);
            Kd(this, c);
            this.o && f && Gd(c, this.o, f);
            Dc(this.i, e);
            this.Ra && R(c, "TYPE", "init");
            this.ja ? (R(c, "$req", b), R(c, "SID", "null"), e.$ = !0, ic(e, c, null)) : ic(e, c, b);
            this.G = 2;
          }
        } else 3 == this.G && (a ? Qd(this, a) : 0 == this.l.length || id(this.i) || Qd(this));
      };

      function Qd(a, b) {
        var c;
        b ? c = b.m : c = a.V++;
        var d = N(a.F);
        R(d, "SID", a.J);
        R(d, "RID", c);
        R(d, "AID", a.U);
        Kd(a, d);
        a.o && a.s && Gd(d, a.o, a.s);
        c = new M(a, a.h, c, a.C + 1);
        null === a.o && (c.H = a.s);
        b && (a.l = b.D.concat(a.l));
        b = Pd(a, c, 1E3);
        c.setTimeout(Math.round(.5 * a.ra) + Math.round(.5 * a.ra * Math.random()));
        Dc(a.i, c);
        ic(c, d, b);
      }

      function Kd(a, b) {
        a.j && Kc({}, function (c, d) {
          R(b, d, c);
        });
      }

      function Pd(a, b, c) {
        c = Math.min(a.l.length, c);
        var d = a.j ? q(a.j.Oa, a.j, a) : null;

        a: {
          var e = a.l;
          var f = -1;

          for (;;) {
            var h = ["count=" + c];
            -1 == f ? 0 < c ? (f = e[0].h, h.push("ofs=" + f)) : f = 0 : h.push("ofs=" + f);
            var n = !0;

            for (var u = 0; u < c; u++) {
              var m = e[u].h;
              var r = e[u].g;
              m -= f;
              if (0 > m) f = Math.max(0, e[u].h - 100), n = !1;else try {
                md(r, h, "req" + m + "_");
              } catch (G) {
                d && d(r);
              }
            }

            if (n) {
              d = h.join("&");
              break a;
            }
          }
        }

        a = a.l.splice(0, c);
        b.D = a;
        return d;
      }

      function Gc(a) {
        a.g || a.u || (a.Y = 1, zb(a.Ga, a), a.A = 0);
      }

      function Bc(a) {
        if (a.g || a.u || 3 <= a.A) return !1;
        a.Y++;
        a.u = K(q(a.Ga, a), Od(a, a.A));
        a.A++;
        return !0;
      }

      k.Ga = function () {
        this.u = null;
        Rd(this);

        if (this.$ && !(this.L || null == this.g || 0 >= this.O)) {
          var a = 2 * this.O;
          this.h.info("BP detection timer enabled: " + a);
          this.B = K(q(this.bb, this), a);
        }
      };

      k.bb = function () {
        this.B && (this.B = null, this.h.info("BP detection timeout reached."), this.h.info("Buffering proxy detected and switch to long-polling!"), this.N = !1, this.L = !0, J(10), Ac(this), Rd(this));
      };

      function wc(a) {
        null != a.B && (l.clearTimeout(a.B), a.B = null);
      }

      function Rd(a) {
        a.g = new M(a, a.h, "rpc", a.Y);
        null === a.o && (a.g.H = a.s);
        a.g.O = 0;
        var b = N(a.oa);
        R(b, "RID", "rpc");
        R(b, "SID", a.J);
        R(b, "CI", a.N ? "0" : "1");
        R(b, "AID", a.U);
        Kd(a, b);
        R(b, "TYPE", "xmlhttp");
        a.o && a.s && Gd(b, a.o, a.s);
        a.K && a.g.setTimeout(a.K);
        var c = a.g;
        a = a.la;
        c.K = 1;
        c.v = jc(N(b));
        c.s = null;
        c.U = !0;
        kc(c, a);
      }

      k.ab = function () {
        null != this.v && (this.v = null, Ac(this), Bc(this), J(19));
      };

      function zc(a) {
        null != a.v && (l.clearTimeout(a.v), a.v = null);
      }

      function uc(a, b) {
        var c = null;

        if (a.g == b) {
          zc(a);
          wc(a);
          a.g = null;
          var d = 2;
        } else if (yc(a.i, b)) c = b.D, Fc(a.i, b), d = 1;else return;

        a.I = b.N;
        if (0 != a.G) if (b.i) {
          if (1 == d) {
            c = b.s ? b.s.length : 0;
            b = Date.now() - b.F;
            var e = a.C;
            d = Sb();
            D(d, new Vb(d, c, b, e));
            Hc(a);
          } else Gc(a);
        } else if (e = b.o, 3 == e || 0 == e && 0 < a.I || !(1 == d && Nd(a, b) || 2 == d && Bc(a))) switch (c && 0 < c.length && (b = a.i, b.i = b.i.concat(c)), e) {
          case 1:
            Q(a, 5);
            break;

          case 4:
            Q(a, 10);
            break;

          case 3:
            Q(a, 6);
            break;

          default:
            Q(a, 2);
        }
      }

      function Od(a, b) {
        var c = a.Pa + Math.floor(Math.random() * a.$a);
        a.j || (c *= 2);
        return c * b;
      }

      function Q(a, b) {
        a.h.info("Error code " + b);

        if (2 == b) {
          var c = null;
          a.j && (c = null);
          var d = q(a.jb, a);
          c || (c = new U("//www.google.com/images/cleardot.gif"), l.location && "http" == l.location.protocol || Oc(c, "https"), jc(c));
          nd(c.toString(), d);
        } else J(2);

        a.G = 0;
        a.j && a.j.va(b);
        Ld(a);
        Jd(a);
      }

      k.jb = function (a) {
        a ? (this.h.info("Successfully pinged google.com"), J(2)) : (this.h.info("Failed to ping google.com"), J(1));
      };

      function Ld(a) {
        a.G = 0;
        a.I = -1;

        if (a.j) {
          if (0 != jd(a.i).length || 0 != a.l.length) a.i.i.length = 0, ra(a.l), a.l.length = 0;
          a.j.ua();
        }
      }

      function Ec(a, b, c) {
        var d = ad(c);
        if ("" != d.i) b && Pc(d, b + "." + d.i), Qc(d, d.m);else {
          var e = l.location;
          d = bd(e.protocol, b ? b + "." + e.hostname : e.hostname, +e.port, c);
        }
        a.aa && xa(a.aa, function (e, f) {
          R(d, f, e);
        });
        b = a.D;
        c = a.sa;
        b && c && R(d, b, c);
        R(d, "VER", a.ma);
        Kd(a, d);
        return d;
      }

      function nc(a, b, c) {
        if (b && !a.H) throw Error("Can't create secondary domain capable XhrIo object.");
        b = c && a.Ba && !a.qa ? new X(new pd({
          ib: !0
        })) : new X(a.qa);
        b.L = a.H;
        return b;
      }

      function Sd() {}

      k = Sd.prototype;

      k.xa = function () {};

      k.wa = function () {};

      k.va = function () {};

      k.ua = function () {};

      k.Oa = function () {};

      function Td() {
        if (y && !(10 <= Number(Ua))) throw Error("Environmental error: no available transport.");
      }

      Td.prototype.g = function (a, b) {
        return new Y(a, b);
      };

      function Y(a, b) {
        C.call(this);
        this.g = new Id(b);
        this.l = a;
        this.h = b && b.messageUrlParams || null;
        a = b && b.messageHeaders || null;
        b && b.clientProtocolHeaderRequired && (a ? a["X-Client-Protocol"] = "webchannel" : a = {
          "X-Client-Protocol": "webchannel"
        });
        this.g.s = a;
        a = b && b.initMessageHeaders || null;
        b && b.messageContentType && (a ? a["X-WebChannel-Content-Type"] = b.messageContentType : a = {
          "X-WebChannel-Content-Type": b.messageContentType
        });
        b && b.ya && (a ? a["X-WebChannel-Client-Profile"] = b.ya : a = {
          "X-WebChannel-Client-Profile": b.ya
        });
        this.g.P = a;
        (a = b && b.httpHeadersOverwriteParam) && !sa(a) && (this.g.o = a);
        this.A = b && b.supportsCrossDomainXhr || !1;
        this.v = b && b.sendRawJson || !1;
        (b = b && b.httpSessionIdParam) && !sa(b) && (this.g.D = b, a = this.h, null !== a && b in a && (a = this.h, b in a && delete a[b]));
        this.j = new Z(this);
      }

      t(Y, C);

      Y.prototype.m = function () {
        this.g.j = this.j;
        this.A && (this.g.H = !0);
        var a = this.g,
            b = this.l,
            c = this.h || void 0;
        a.Wa && (a.h.info("Origin Trials enabled."), zb(q(a.hb, a, b)));
        J(0);
        a.W = b;
        a.aa = c || {};
        a.N = a.X;
        a.F = Ec(a, null, a.W);
        Hc(a);
      };

      Y.prototype.close = function () {
        Ic(this.g);
      };

      Y.prototype.u = function (a) {
        if ("string" === typeof a) {
          var b = {};
          b.__data__ = a;
          Md(this.g, b);
        } else this.v ? (b = {}, b.__data__ = rb(a), Md(this.g, b)) : Md(this.g, a);
      };

      Y.prototype.M = function () {
        this.g.j = null;
        delete this.j;
        Ic(this.g);
        delete this.g;
        Y.Z.M.call(this);
      };

      function Ud(a) {
        ac.call(this);
        var b = a.__sm__;

        if (b) {
          a: {
            for (var c in b) {
              a = c;
              break a;
            }

            a = void 0;
          }

          if (this.i = a) a = this.i, b = null !== b && a in b ? b[a] : void 0;
          this.data = b;
        } else this.data = a;
      }

      t(Ud, ac);

      function Vd() {
        bc.call(this);
        this.status = 1;
      }

      t(Vd, bc);

      function Z(a) {
        this.g = a;
      }

      t(Z, Sd);

      Z.prototype.xa = function () {
        D(this.g, "a");
      };

      Z.prototype.wa = function (a) {
        D(this.g, new Ud(a));
      };

      Z.prototype.va = function (a) {
        D(this.g, new Vd(a));
      };

      Z.prototype.ua = function () {
        D(this.g, "b");
      };
      /*
      Copyright 2017 Google LLC
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
      */


      Td.prototype.createWebChannel = Td.prototype.g;
      Y.prototype.send = Y.prototype.u;
      Y.prototype.open = Y.prototype.m;
      Y.prototype.close = Y.prototype.close;
      Wb.NO_ERROR = 0;
      Wb.TIMEOUT = 8;
      Wb.HTTP_ERROR = 6;
      Xb.COMPLETE = "complete";
      $b.EventType = L;
      L.OPEN = "a";
      L.CLOSE = "b";
      L.ERROR = "c";
      L.MESSAGE = "d";
      C.prototype.listen = C.prototype.N;
      X.prototype.listenOnce = X.prototype.O;
      X.prototype.getLastError = X.prototype.La;
      X.prototype.getLastErrorCode = X.prototype.Da;
      X.prototype.getStatus = X.prototype.ba;
      X.prototype.getResponseJson = X.prototype.Qa;
      X.prototype.getResponseText = X.prototype.ga;
      X.prototype.send = X.prototype.ea;

      var createWebChannelTransport = function createWebChannelTransport() {
        return new Td();
      };

      var getStatEventTarget = function getStatEventTarget() {
        return Sb();
      };

      var ErrorCode = Wb;
      var EventType = Xb;
      var Event = H;
      var Stat = {
        rb: 0,
        ub: 1,
        vb: 2,
        Ob: 3,
        Tb: 4,
        Qb: 5,
        Rb: 6,
        Pb: 7,
        Nb: 8,
        Sb: 9,
        PROXY: 10,
        NOPROXY: 11,
        Lb: 12,
        Hb: 13,
        Ib: 14,
        Gb: 15,
        Jb: 16,
        Kb: 17,
        nb: 18,
        mb: 19,
        ob: 20
      };
      var FetchXmlHttpFactory = pd;
      var WebChannel = $b;
      var XhrIo = X;
      var esm = {
        createWebChannelTransport: createWebChannelTransport,
        getStatEventTarget: getStatEventTarget,
        ErrorCode: ErrorCode,
        EventType: EventType,
        Event: Event,
        Stat: Stat,
        FetchXmlHttpFactory: FetchXmlHttpFactory,
        WebChannel: WebChannel,
        XhrIo: XhrIo
      };
      /* harmony default export */

      __webpack_exports__["default"] = esm; //# sourceMappingURL=index.esm.js.map

      /***/
    },

    /***/
    "xS++":
    /*!*************************************************!*\
      !*** ./node_modules/@sentry/hub/esm/session.js ***!
      \*************************************************/

    /*! exports provided: Session */

    /***/
    function xS(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Session", function () {
        return Session;
      });
      /* harmony import */


      var _sentry_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/types */
      "PIsB");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /**
       * @inheritdoc
       */


      var Session =
      /** @class */
      function () {
        function Session(context) {
          this.errors = 0;
          this.sid = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["uuid4"])();
          this.duration = 0;
          this.status = _sentry_types__WEBPACK_IMPORTED_MODULE_0__["SessionStatus"].Ok;
          this.init = true;
          this.ignoreDuration = false; // Both timestamp and started are in seconds since the UNIX epoch.

          var startingTime = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["timestampInSeconds"])();
          this.timestamp = startingTime;
          this.started = startingTime;

          if (context) {
            this.update(context);
          }
        }
        /** JSDoc */
        // eslint-disable-next-line complexity


        Session.prototype.update = function (context) {
          if (context === void 0) {
            context = {};
          }

          if (context.user) {
            if (!this.ipAddress && context.user.ip_address) {
              this.ipAddress = context.user.ip_address;
            }

            if (!this.did && !context.did) {
              this.did = context.user.id || context.user.email || context.user.username;
            }
          }

          this.timestamp = context.timestamp || Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["timestampInSeconds"])();

          if (context.ignoreDuration) {
            this.ignoreDuration = context.ignoreDuration;
          }

          if (context.sid) {
            // Good enough uuid validation. — Kamil
            this.sid = context.sid.length === 32 ? context.sid : Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["uuid4"])();
          }

          if (context.init !== undefined) {
            this.init = context.init;
          }

          if (!this.did && context.did) {
            this.did = "" + context.did;
          }

          if (typeof context.started === 'number') {
            this.started = context.started;
          }

          if (this.ignoreDuration) {
            this.duration = undefined;
          } else if (typeof context.duration === 'number') {
            this.duration = context.duration;
          } else {
            var duration = this.timestamp - this.started;
            this.duration = duration >= 0 ? duration : 0;
          }

          if (context.release) {
            this.release = context.release;
          }

          if (context.environment) {
            this.environment = context.environment;
          }

          if (!this.ipAddress && context.ipAddress) {
            this.ipAddress = context.ipAddress;
          }

          if (!this.userAgent && context.userAgent) {
            this.userAgent = context.userAgent;
          }

          if (typeof context.errors === 'number') {
            this.errors = context.errors;
          }

          if (context.status) {
            this.status = context.status;
          }
        };
        /** JSDoc */


        Session.prototype.close = function (status) {
          if (status) {
            this.update({
              status: status
            });
          } else if (this.status === _sentry_types__WEBPACK_IMPORTED_MODULE_0__["SessionStatus"].Ok) {
            this.update({
              status: _sentry_types__WEBPACK_IMPORTED_MODULE_0__["SessionStatus"].Exited
            });
          } else {
            this.update();
          }
        };
        /** JSDoc */


        Session.prototype.toJSON = function () {
          return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dropUndefinedKeys"])({
            sid: "" + this.sid,
            init: this.init,
            // Make sure that sec is converted to ms for date constructor
            started: new Date(this.started * 1000).toISOString(),
            timestamp: new Date(this.timestamp * 1000).toISOString(),
            status: this.status,
            errors: this.errors,
            did: typeof this.did === 'number' || typeof this.did === 'string' ? "" + this.did : undefined,
            duration: this.duration,
            attrs: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dropUndefinedKeys"])({
              release: this.release,
              environment: this.environment,
              ip_address: this.ipAddress,
              user_agent: this.userAgent
            })
          });
        };

        return Session;
      }(); //# sourceMappingURL=session.js.map

      /***/

    },

    /***/
    "xbPD":
    /*!*************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/defaultIfEmpty.js ***!
      \*************************************************************************/

    /*! exports provided: defaultIfEmpty */

    /***/
    function xbPD(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function () {
        return defaultIfEmpty;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function defaultIfEmpty() {
        var defaultValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
        return function (source) {
          return source.lift(new DefaultIfEmptyOperator(defaultValue));
        };
      }

      var DefaultIfEmptyOperator = /*#__PURE__*/function () {
        function DefaultIfEmptyOperator(defaultValue) {
          _classCallCheck(this, DefaultIfEmptyOperator);

          this.defaultValue = defaultValue;
        }

        _createClass2(DefaultIfEmptyOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
          }
        }]);

        return DefaultIfEmptyOperator;
      }();

      var DefaultIfEmptySubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_46) {
        _inherits(DefaultIfEmptySubscriber, _Subscriber__WEBPACK_46);

        var _super297 = _createSuper(DefaultIfEmptySubscriber);

        function DefaultIfEmptySubscriber(destination, defaultValue) {
          var _this627;

          _classCallCheck(this, DefaultIfEmptySubscriber);

          _this627 = _super297.call(this, destination);
          _this627.defaultValue = defaultValue;
          _this627.isEmpty = true;
          return _this627;
        }

        _createClass2(DefaultIfEmptySubscriber, [{
          key: "_next",
          value: function _next(value) {
            this.isEmpty = false;
            this.destination.next(value);
          }
        }, {
          key: "_complete",
          value: function _complete() {
            if (this.isEmpty) {
              this.destination.next(this.defaultValue);
            }

            this.destination.complete();
          }
        }]);

        return DefaultIfEmptySubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=defaultIfEmpty.js.map

      /***/

    },

    /***/
    "xgIS":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/fromEvent.js ***!
      \*********************************************************************/

    /*! exports provided: fromEvent */

    /***/
    function xgIS(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "fromEvent", function () {
        return fromEvent;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/isArray */
      "DH7j");
      /* harmony import */


      var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../util/isFunction */
      "n6bG");
      /* harmony import */


      var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../operators/map */
      "lJxs");

      var toString = function () {
        return Object.prototype.toString;
      }();

      function fromEvent(target, eventName, options, resultSelector) {
        if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(options)) {
          resultSelector = options;
          options = undefined;
        }

        if (resultSelector) {
          return fromEvent(target, eventName, options).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (args) {
            return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector.apply(void 0, _toConsumableArray(args)) : resultSelector(args);
          }));
        }

        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
          function handler(e) {
            if (arguments.length > 1) {
              subscriber.next(Array.prototype.slice.call(arguments));
            } else {
              subscriber.next(e);
            }
          }

          setupSubscription(target, eventName, handler, subscriber, options);
        });
      }

      function setupSubscription(sourceObj, eventName, handler, subscriber, options) {
        var unsubscribe;

        if (isEventTarget(sourceObj)) {
          var source = sourceObj;
          sourceObj.addEventListener(eventName, handler, options);

          unsubscribe = function unsubscribe() {
            return source.removeEventListener(eventName, handler, options);
          };
        } else if (isJQueryStyleEventEmitter(sourceObj)) {
          var _source = sourceObj;
          sourceObj.on(eventName, handler);

          unsubscribe = function unsubscribe() {
            return _source.off(eventName, handler);
          };
        } else if (isNodeStyleEventEmitter(sourceObj)) {
          var _source2 = sourceObj;
          sourceObj.addListener(eventName, handler);

          unsubscribe = function unsubscribe() {
            return _source2.removeListener(eventName, handler);
          };
        } else if (sourceObj && sourceObj.length) {
          for (var i = 0, len = sourceObj.length; i < len; i++) {
            setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
          }
        } else {
          throw new TypeError('Invalid event target');
        }

        subscriber.add(unsubscribe);
      }

      function isNodeStyleEventEmitter(sourceObj) {
        return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
      }

      function isJQueryStyleEventEmitter(sourceObj) {
        return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
      }

      function isEventTarget(sourceObj) {
        return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
      } //# sourceMappingURL=fromEvent.js.map

      /***/

    },

    /***/
    "xo5E":
    /*!*************************************************************!*\
      !*** ./node_modules/@firebase/firestore/dist/esm5/index.js ***!
      \*************************************************************/

    /*! exports provided: registerFirestore */

    /***/
    function xo5E(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "registerFirestore", function () {
        return I;
      });
      /* harmony import */


      var _firebase_app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @firebase/app */
      "zIRd");
      /* harmony import */


      var _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./prebuilt-306f43d8-45d6f0b9.js */
      "pqa8");
      /* harmony import */


      var _firebase_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @firebase/component */
      "/6Yf");
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _firebase_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! @firebase/util */
      "qOnz");
      /* harmony import */


      var _firebase_logger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! @firebase/logger */
      "q/0M");
      /* harmony import */


      var _firebase_webchannel_wrapper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! @firebase/webchannel-wrapper */
      "x7I3");

      var C = {
        Firestore: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["U"],
        GeoPoint: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["C"],
        Timestamp: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["M"],
        Blob: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["a"],
        Transaction: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["j"],
        WriteBatch: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["W"],
        DocumentReference: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["z"],
        DocumentSnapshot: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["X"],
        Query: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["t"],
        QueryDocumentSnapshot: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["Z"],
        QuerySnapshot: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["n"],
        CollectionReference: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["s"],
        FieldPath: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["r"],
        FieldValue: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["o"],
        setLogLevel: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["Q"],
        CACHE_SIZE_UNLIMITED: _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["E"]
      };
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Registers the main Firestore build with the components framework.
       * Persistence can be enabled via `firebase.firestore().enablePersistence()`.
       */

      function I(e) {
        !
        /**
        * Configures Firestore as part of the Firebase SDK by calling registerService.
        *
        * @param firebase - The FirebaseNamespace to register Firestore with
        * @param firestoreFactory - A factory function that returns a new Firestore
        *    instance.
        */
        function (e, r) {
          e.INTERNAL.registerComponent(new _firebase_component__WEBPACK_IMPORTED_MODULE_2__["Component"]("firestore", function (e) {
            var t = e.getProvider("app").getImmediate();
            return r(t, e.getProvider("auth-internal"));
          }, "PUBLIC"
          /* PUBLIC */
          ).setServiceProps(Object.assign({}, C)));
        }(e, function (e, s) {
          return new _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["U"](e, new _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["T"](e, s), new _prebuilt_306f43d8_45d6f0b9_js__WEBPACK_IMPORTED_MODULE_1__["q"]());
        }), e.registerVersion("@firebase/firestore", "2.4.0");
      }

      I(_firebase_app__WEBPACK_IMPORTED_MODULE_0__["default"]); //# sourceMappingURL=index.js.map

      /***/
    },

    /***/
    "xpBP":
    /*!************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/router.js ***!
      \************************************************************/

    /*! exports provided: instrumentRoutingWithDefaults */

    /***/
    function xpBP(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "instrumentRoutingWithDefaults", function () {
        return instrumentRoutingWithDefaults;
      });
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");

      var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getGlobalObject"])();
      /**
       * Default function implementing pageload and navigation transactions
       */

      function instrumentRoutingWithDefaults(customStartTransaction, startTransactionOnPageLoad, startTransactionOnLocationChange) {
        if (startTransactionOnPageLoad === void 0) {
          startTransactionOnPageLoad = true;
        }

        if (startTransactionOnLocationChange === void 0) {
          startTransactionOnLocationChange = true;
        }

        if (!global || !global.location) {
          _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('Could not initialize routing instrumentation due to invalid location');

          return;
        }

        var startingUrl = global.location.href;
        var activeTransaction;

        if (startTransactionOnPageLoad) {
          activeTransaction = customStartTransaction({
            name: global.location.pathname,
            op: 'pageload'
          });
        }

        if (startTransactionOnLocationChange) {
          Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["addInstrumentationHandler"])({
            callback: function callback(_a) {
              var to = _a.to,
                  from = _a.from;
              /**
               * This early return is there to account for some cases where a navigation transaction starts right after
               * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't
               * create an uneccessary navigation transaction.
               *
               * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also
               * only be caused in certain development environments where the usage of a hot module reloader is causing
               * errors.
               */

              if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {
                startingUrl = undefined;
                return;
              }

              if (from !== to) {
                startingUrl = undefined;

                if (activeTransaction) {
                  _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log("[Tracing] Finishing current transaction with op: " + activeTransaction.op); // If there's an open transaction on the scope, we need to finish it before creating an new one.


                  activeTransaction.finish();
                }

                activeTransaction = customStartTransaction({
                  name: global.location.pathname,
                  op: 'navigation'
                });
              }
            },
            type: 'history'
          });
        }
      } //# sourceMappingURL=router.js.map

      /***/

    },

    /***/
    "y/t4":
    /*!*****************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/backend.js ***!
      \*****************************************************/

    /*! exports provided: BrowserBackend */

    /***/
    function yT4(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BrowserBackend", function () {
        return BrowserBackend;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/core */
      "wBhU");
      /* harmony import */


      var _sentry_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @sentry/types */
      "PIsB");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _eventbuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./eventbuilder */
      "IS+8");
      /* harmony import */


      var _transports__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./transports */
      "nXHh");
      /**
       * The Sentry Browser SDK Backend.
       * @hidden
       */


      var BrowserBackend =
      /** @class */
      function (_super) {
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BrowserBackend, _super);

        function BrowserBackend() {
          return _super !== null && _super.apply(this, arguments) || this;
        }
        /**
         * @inheritDoc
         */


        BrowserBackend.prototype.eventFromException = function (exception, hint) {
          return Object(_eventbuilder__WEBPACK_IMPORTED_MODULE_4__["eventFromException"])(this._options, exception, hint);
        };
        /**
         * @inheritDoc
         */


        BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {
          if (level === void 0) {
            level = _sentry_types__WEBPACK_IMPORTED_MODULE_2__["Severity"].Info;
          }

          return Object(_eventbuilder__WEBPACK_IMPORTED_MODULE_4__["eventFromMessage"])(this._options, message, level, hint);
        };
        /**
         * @inheritDoc
         */


        BrowserBackend.prototype._setupTransport = function () {
          if (!this._options.dsn) {
            // We return the noop transport here in case there is no Dsn.
            return _super.prototype._setupTransport.call(this);
          }

          var transportOptions = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._options.transportOptions), {
            dsn: this._options.dsn,
            tunnel: this._options.tunnel,
            sendClientReports: this._options.sendClientReports,
            _metadata: this._options._metadata
          });

          if (this._options.transport) {
            return new this._options.transport(transportOptions);
          }

          if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__["supportsFetch"])()) {
            return new _transports__WEBPACK_IMPORTED_MODULE_5__["FetchTransport"](transportOptions);
          }

          return new _transports__WEBPACK_IMPORTED_MODULE_5__["XHRTransport"](transportOptions);
        };

        return BrowserBackend;
      }(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["BaseBackend"]); //# sourceMappingURL=backend.js.map

      /***/

    },

    /***/
    "y08P":
    /*!**************************************************************************!*\
      !*** ./node_modules/@ionic/core/dist/esm/gesture-controller-31cb6bb9.js ***!
      \**************************************************************************/

    /*! exports provided: G */

    /***/
    function y08P(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "G", function () {
        return GESTURE_CONTROLLER;
      });

      var GestureController = /*#__PURE__*/function () {
        function GestureController() {
          _classCallCheck(this, GestureController);

          this.gestureId = 0;
          this.requestedStart = new Map();
          this.disabledGestures = new Map();
          this.disabledScroll = new Set();
        }
        /**
         * Creates a gesture delegate based on the GestureConfig passed
         */


        _createClass2(GestureController, [{
          key: "createGesture",
          value: function createGesture(config) {
            return new GestureDelegate(this, this.newID(), config.name, config.priority || 0, !!config.disableScroll);
          }
          /**
           * Creates a blocker that will block any other gesture events from firing. Set in the ion-gesture component.
           */

        }, {
          key: "createBlocker",
          value: function createBlocker() {
            var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            return new BlockerDelegate(this, this.newID(), opts.disable, !!opts.disableScroll);
          }
        }, {
          key: "start",
          value: function start(gestureName, id, priority) {
            if (!this.canStart(gestureName)) {
              this.requestedStart["delete"](id);
              return false;
            }

            this.requestedStart.set(id, priority);
            return true;
          }
        }, {
          key: "capture",
          value: function capture(gestureName, id, priority) {
            if (!this.start(gestureName, id, priority)) {
              return false;
            }

            var requestedStart = this.requestedStart;
            var maxPriority = -10000;
            requestedStart.forEach(function (value) {
              maxPriority = Math.max(maxPriority, value);
            });

            if (maxPriority === priority) {
              this.capturedId = id;
              requestedStart.clear();
              var event = new CustomEvent('ionGestureCaptured', {
                detail: {
                  gestureName: gestureName
                }
              });
              document.dispatchEvent(event);
              return true;
            }

            requestedStart["delete"](id);
            return false;
          }
        }, {
          key: "release",
          value: function release(id) {
            this.requestedStart["delete"](id);

            if (this.capturedId === id) {
              this.capturedId = undefined;
            }
          }
        }, {
          key: "disableGesture",
          value: function disableGesture(gestureName, id) {
            var set = this.disabledGestures.get(gestureName);

            if (set === undefined) {
              set = new Set();
              this.disabledGestures.set(gestureName, set);
            }

            set.add(id);
          }
        }, {
          key: "enableGesture",
          value: function enableGesture(gestureName, id) {
            var set = this.disabledGestures.get(gestureName);

            if (set !== undefined) {
              set["delete"](id);
            }
          }
        }, {
          key: "disableScroll",
          value: function disableScroll(id) {
            this.disabledScroll.add(id);

            if (this.disabledScroll.size === 1) {
              document.body.classList.add(BACKDROP_NO_SCROLL);
            }
          }
        }, {
          key: "enableScroll",
          value: function enableScroll(id) {
            this.disabledScroll["delete"](id);

            if (this.disabledScroll.size === 0) {
              document.body.classList.remove(BACKDROP_NO_SCROLL);
            }
          }
        }, {
          key: "canStart",
          value: function canStart(gestureName) {
            if (this.capturedId !== undefined) {
              // a gesture already captured
              return false;
            }

            if (this.isDisabled(gestureName)) {
              return false;
            }

            return true;
          }
        }, {
          key: "isCaptured",
          value: function isCaptured() {
            return this.capturedId !== undefined;
          }
        }, {
          key: "isScrollDisabled",
          value: function isScrollDisabled() {
            return this.disabledScroll.size > 0;
          }
        }, {
          key: "isDisabled",
          value: function isDisabled(gestureName) {
            var disabled = this.disabledGestures.get(gestureName);

            if (disabled && disabled.size > 0) {
              return true;
            }

            return false;
          }
        }, {
          key: "newID",
          value: function newID() {
            this.gestureId++;
            return this.gestureId;
          }
        }]);

        return GestureController;
      }();

      var GestureDelegate = /*#__PURE__*/function () {
        function GestureDelegate(ctrl, id, name, priority, disableScroll) {
          _classCallCheck(this, GestureDelegate);

          this.id = id;
          this.name = name;
          this.disableScroll = disableScroll;
          this.priority = priority * 1000000 + id;
          this.ctrl = ctrl;
        }

        _createClass2(GestureDelegate, [{
          key: "canStart",
          value: function canStart() {
            if (!this.ctrl) {
              return false;
            }

            return this.ctrl.canStart(this.name);
          }
        }, {
          key: "start",
          value: function start() {
            if (!this.ctrl) {
              return false;
            }

            return this.ctrl.start(this.name, this.id, this.priority);
          }
        }, {
          key: "capture",
          value: function capture() {
            if (!this.ctrl) {
              return false;
            }

            var captured = this.ctrl.capture(this.name, this.id, this.priority);

            if (captured && this.disableScroll) {
              this.ctrl.disableScroll(this.id);
            }

            return captured;
          }
        }, {
          key: "release",
          value: function release() {
            if (this.ctrl) {
              this.ctrl.release(this.id);

              if (this.disableScroll) {
                this.ctrl.enableScroll(this.id);
              }
            }
          }
        }, {
          key: "destroy",
          value: function destroy() {
            this.release();
            this.ctrl = undefined;
          }
        }]);

        return GestureDelegate;
      }();

      var BlockerDelegate = /*#__PURE__*/function () {
        function BlockerDelegate(ctrl, id, disable, disableScroll) {
          _classCallCheck(this, BlockerDelegate);

          this.id = id;
          this.disable = disable;
          this.disableScroll = disableScroll;
          this.ctrl = ctrl;
        }

        _createClass2(BlockerDelegate, [{
          key: "block",
          value: function block() {
            if (!this.ctrl) {
              return;
            }

            if (this.disable) {
              var _iterator78 = _createForOfIteratorHelper(this.disable),
                  _step77;

              try {
                for (_iterator78.s(); !(_step77 = _iterator78.n()).done;) {
                  var gesture = _step77.value;
                  this.ctrl.disableGesture(gesture, this.id);
                }
              } catch (err) {
                _iterator78.e(err);
              } finally {
                _iterator78.f();
              }
            }

            if (this.disableScroll) {
              this.ctrl.disableScroll(this.id);
            }
          }
        }, {
          key: "unblock",
          value: function unblock() {
            if (!this.ctrl) {
              return;
            }

            if (this.disable) {
              var _iterator79 = _createForOfIteratorHelper(this.disable),
                  _step78;

              try {
                for (_iterator79.s(); !(_step78 = _iterator79.n()).done;) {
                  var gesture = _step78.value;
                  this.ctrl.enableGesture(gesture, this.id);
                }
              } catch (err) {
                _iterator79.e(err);
              } finally {
                _iterator79.f();
              }
            }

            if (this.disableScroll) {
              this.ctrl.enableScroll(this.id);
            }
          }
        }, {
          key: "destroy",
          value: function destroy() {
            this.unblock();
            this.ctrl = undefined;
          }
        }]);

        return BlockerDelegate;
      }();

      var BACKDROP_NO_SCROLL = 'backdrop-no-scroll';
      var GESTURE_CONTROLLER = new GestureController();
      /***/
    },

    /***/
    "yCKT":
    /*!******************************************************!*\
      !*** ./node_modules/@sentry/browser/esm/tracekit.js ***!
      \******************************************************/

    /*! exports provided: computeStackTrace */

    /***/
    function yCKT(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "computeStackTrace", function () {
        return computeStackTrace;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /**
       * This was originally forked from https://github.com/occ/TraceKit, but has since been
       * largely modified and is now maintained as part of Sentry JS SDK.
       */
      // global reference to slice


      var UNKNOWN_FUNCTION = '?'; // Chromium based browsers: Chrome, Brave, new Opera, new Edge

      var chrome = /^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i; // gecko regex: `(?:bundle|\d+\.js)`: `bundle` is for react native, `\d+\.js` also but specifically for ram bundles because it
      // generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js
      // We need this specific case for now because we want no other regex to match.

      var gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
      var winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
      var geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
      var chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/; // Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108

      var reactMinifiedRegexp = /Minified React error #\d+;/i;
      /** JSDoc */
      // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types

      function computeStackTrace(ex) {
        var stack = null;
        var popSize = 0;

        if (ex) {
          if (typeof ex.framesToPop === 'number') {
            popSize = ex.framesToPop;
          } else if (reactMinifiedRegexp.test(ex.message)) {
            popSize = 1;
          }
        }

        try {
          // This must be tried first because Opera 10 *destroys*
          // its stacktrace property if you try to access the stack
          // property first!!
          stack = computeStackTraceFromStacktraceProp(ex);

          if (stack) {
            return popFrames(stack, popSize);
          }
        } catch (e) {// no-empty
        }

        try {
          stack = computeStackTraceFromStackProp(ex);

          if (stack) {
            return popFrames(stack, popSize);
          }
        } catch (e) {// no-empty
        }

        return {
          message: extractMessage(ex),
          name: ex && ex.name,
          stack: [],
          failed: true
        };
      }
      /** JSDoc */
      // eslint-disable-next-line @typescript-eslint/no-explicit-any, complexity


      function computeStackTraceFromStackProp(ex) {
        var _a, _b;

        if (!ex || !ex.stack) {
          return null;
        }

        var stack = [];
        var lines = ex.stack.split('\n');
        var isEval;
        var submatch;
        var parts;
        var element;

        for (var i = 0; i < lines.length; ++i) {
          if (parts = chrome.exec(lines[i])) {
            var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line

            isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line

            if (isEval && (submatch = chromeEval.exec(parts[2]))) {
              // throw out eval line/column and use top-most line/column number
              parts[2] = submatch[1]; // url

              parts[3] = submatch[2]; // line

              parts[4] = submatch[3]; // column
            } // Arpad: Working with the regexp above is super painful. it is quite a hack, but just stripping the `address at `
            // prefix here seems like the quickest solution for now.


            var url = parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2]; // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now
            // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)

            var func = parts[1] || UNKNOWN_FUNCTION;
            _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(extractSafariExtensionDetails(func, url), 2), func = _a[0], url = _a[1];
            element = {
              url: url,
              func: func,
              args: isNative ? [parts[2]] : [],
              line: parts[3] ? +parts[3] : null,
              column: parts[4] ? +parts[4] : null
            };
          } else if (parts = winjs.exec(lines[i])) {
            element = {
              url: parts[2],
              func: parts[1] || UNKNOWN_FUNCTION,
              args: [],
              line: +parts[3],
              column: parts[4] ? +parts[4] : null
            };
          } else if (parts = gecko.exec(lines[i])) {
            isEval = parts[3] && parts[3].indexOf(' > eval') > -1;

            if (isEval && (submatch = geckoEval.exec(parts[3]))) {
              // throw out eval line/column and use top-most line number
              parts[1] = parts[1] || "eval";
              parts[3] = submatch[1];
              parts[4] = submatch[2];
              parts[5] = ''; // no column when eval
            } else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) {
              // FireFox uses this awesome columnNumber property for its top frame
              // Also note, Firefox's column number is 0-based and everything else expects 1-based,
              // so adding 1
              // NOTE: this hack doesn't work if top-most frame is eval
              stack[0].column = ex.columnNumber + 1;
            }

            var url = parts[3];
            var func = parts[1] || UNKNOWN_FUNCTION;
            _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(extractSafariExtensionDetails(func, url), 2), func = _b[0], url = _b[1];
            element = {
              url: url,
              func: func,
              args: parts[2] ? parts[2].split(',') : [],
              line: parts[4] ? +parts[4] : null,
              column: parts[5] ? +parts[5] : null
            };
          } else {
            continue;
          }

          if (!element.func && element.line) {
            element.func = UNKNOWN_FUNCTION;
          }

          stack.push(element);
        }

        if (!stack.length) {
          return null;
        }

        return {
          message: extractMessage(ex),
          name: ex.name,
          stack: stack
        };
      }
      /** JSDoc */
      // eslint-disable-next-line @typescript-eslint/no-explicit-any


      function computeStackTraceFromStacktraceProp(ex) {
        if (!ex || !ex.stacktrace) {
          return null;
        } // Access and store the stacktrace property before doing ANYTHING
        // else to it because Opera is not very good at providing it
        // reliably in other circumstances.


        var stacktrace = ex.stacktrace;
        var opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
        var opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i;
        var lines = stacktrace.split('\n');
        var stack = [];
        var parts;

        for (var line = 0; line < lines.length; line += 2) {
          var element = null;

          if (parts = opera10Regex.exec(lines[line])) {
            element = {
              url: parts[2],
              func: parts[3],
              args: [],
              line: +parts[1],
              column: null
            };
          } else if (parts = opera11Regex.exec(lines[line])) {
            element = {
              url: parts[6],
              func: parts[3] || parts[4],
              args: parts[5] ? parts[5].split(',') : [],
              line: +parts[1],
              column: +parts[2]
            };
          }

          if (element) {
            if (!element.func && element.line) {
              element.func = UNKNOWN_FUNCTION;
            }

            stack.push(element);
          }
        }

        if (!stack.length) {
          return null;
        }

        return {
          message: extractMessage(ex),
          name: ex.name,
          stack: stack
        };
      }
      /**
       * Safari web extensions, starting version unknown, can produce "frames-only" stacktraces.
       * What it means, is that instead of format like:
       *
       * Error: wat
       *   at function@url:row:col
       *   at function@url:row:col
       *   at function@url:row:col
       *
       * it produces something like:
       *
       *   function@url:row:col
       *   function@url:row:col
       *   function@url:row:col
       *
       * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.
       * This function is extracted so that we can use it in both places without duplicating the logic.
       * Unfortunatelly "just" changing RegExp is too complicated now and making it pass all tests
       * and fix this case seems like an impossible, or at least way too time-consuming task.
       */


      var extractSafariExtensionDetails = function extractSafariExtensionDetails(func, url) {
        var isSafariExtension = func.indexOf('safari-extension') !== -1;
        var isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;
        return isSafariExtension || isSafariWebExtension ? [func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION, isSafariExtension ? "safari-extension:" + url : "safari-web-extension:" + url] : [func, url];
      };
      /** Remove N number of frames from the stack */


      function popFrames(stacktrace, popSize) {
        try {
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, stacktrace), {
            stack: stacktrace.stack.slice(popSize)
          });
        } catch (e) {
          return stacktrace;
        }
      }
      /**
       * There are cases where stacktrace.message is an Event object
       * https://github.com/getsentry/sentry-javascript/issues/1949
       * In this specific case we try to extract stacktrace.message.error.message
       */
      // eslint-disable-next-line @typescript-eslint/no-explicit-any


      function extractMessage(ex) {
        var message = ex && ex.message;

        if (!message) {
          return 'No error message';
        }

        if (message.error && typeof message.error.message === 'string') {
          return message.error.message;
        }

        return message;
      } //# sourceMappingURL=tracekit.js.map

      /***/

    },

    /***/
    "yCtX":
    /*!*********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/fromArray.js ***!
      \*********************************************************************/

    /*! exports provided: fromArray */

    /***/
    function yCtX(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "fromArray", function () {
        return fromArray;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");
      /* harmony import */


      var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/subscribeToArray */
      "ngJS");
      /* harmony import */


      var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../scheduled/scheduleArray */
      "jZKg");

      function fromArray(input, scheduler) {
        if (!scheduler) {
          return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__["subscribeToArray"])(input));
        } else {
          return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
        }
      } //# sourceMappingURL=fromArray.js.map

      /***/

    },

    /***/
    "yI9Y":
    /*!**************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/max.js ***!
      \**************************************************************/

    /*! exports provided: max */

    /***/
    function yI9Y(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "max", function () {
        return max;
      });
      /* harmony import */


      var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./reduce */
      "128B");

      function max(comparer) {
        var max = typeof comparer === 'function' ? function (x, y) {
          return comparer(x, y) > 0 ? x : y;
        } : function (x, y) {
          return x > y ? x : y;
        };
        return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(max);
      } //# sourceMappingURL=max.js.map

      /***/

    },

    /***/
    "yOzG":
    /*!***********************************************************!*\
      !*** ./node_modules/@capacitor/network/dist/esm/index.js ***!
      \***********************************************************/

    /*! exports provided: Network */

    /***/
    function yOzG(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Network", function () {
        return Network;
      });
      /* harmony import */


      var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @capacitor/core */
      "FUe0");
      /* harmony import */


      var _definitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./definitions */
      "C9T/");
      /* empty/unused harmony star reexport */


      var Network = Object(_capacitor_core__WEBPACK_IMPORTED_MODULE_0__["registerPlugin"])('Network', {
        web: function web() {
          return __webpack_require__.e(
          /*! import() | web */
          "web").then(__webpack_require__.bind(null,
          /*! ./web */
          "Fy9G")).then(function (m) {
            return new m.NetworkWeb();
          });
        }
      }); //# sourceMappingURL=index.js.map

      /***/
    },

    /***/
    "yR3O":
    /*!***************************************************************************!*\
      !*** ./node_modules/@ionic-native/core/__ivy_ngcc__/decorators/common.js ***!
      \***************************************************************************/

    /*! exports provided: ERR_CORDOVA_NOT_AVAILABLE, ERR_PLUGIN_NOT_INSTALLED, getPromise, wrapPromise, checkAvailability, instanceAvailability, setIndex, callCordovaPlugin, callInstance, getPlugin, get, pluginWarn, cordovaWarn, wrap, wrapInstance */

    /***/
    function yR3O(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ERR_CORDOVA_NOT_AVAILABLE", function () {
        return ERR_CORDOVA_NOT_AVAILABLE;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ERR_PLUGIN_NOT_INSTALLED", function () {
        return ERR_PLUGIN_NOT_INSTALLED;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getPromise", function () {
        return getPromise;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "wrapPromise", function () {
        return wrapPromise;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "checkAvailability", function () {
        return checkAvailability;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "instanceAvailability", function () {
        return instanceAvailability;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "setIndex", function () {
        return setIndex;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "callCordovaPlugin", function () {
        return callCordovaPlugin;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "callInstance", function () {
        return callInstance;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getPlugin", function () {
        return getPlugin;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "get", function () {
        return get;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "pluginWarn", function () {
        return pluginWarn;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "cordovaWarn", function () {
        return cordovaWarn;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "wrap", function () {
        return wrap;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "wrapInstance", function () {
        return wrapInstance;
      });
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! rxjs */
      "qCKp");

      var ERR_CORDOVA_NOT_AVAILABLE = {
        error: 'cordova_not_available'
      };
      var ERR_PLUGIN_NOT_INSTALLED = {
        error: 'plugin_not_installed'
      };

      function getPromise(callback) {
        var tryNativePromise = function tryNativePromise() {
          if (Promise) {
            return new Promise(function (resolve, reject) {
              callback(resolve, reject);
            });
          } else {
            console.error('No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular or on a recent browser.');
          }
        };

        if (typeof window !== 'undefined' && window.angular) {
          var doc = window.document;
          var injector = window.angular.element(doc.querySelector('[ng-app]') || doc.body).injector();

          if (injector) {
            var $q = injector.get('$q');
            return $q(function (resolve, reject) {
              callback(resolve, reject);
            });
          }

          console.warn("Angular 1 was detected but $q couldn't be retrieved. This is usually when the app is not bootstrapped on the html or body tag. Falling back to native promises which won't trigger an automatic digest when promises resolve.");
        }

        return tryNativePromise();
      }

      function wrapPromise(pluginObj, methodName, args, opts) {
        if (opts === void 0) {
          opts = {};
        }

        var pluginResult, rej;
        var p = getPromise(function (resolve, reject) {
          if (opts.destruct) {
            pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, function () {
              var args = [];

              for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
              }

              return resolve(args);
            }, function () {
              var args = [];

              for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
              }

              return reject(args);
            });
          } else {
            pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, resolve, reject);
          }

          rej = reject;
        }); // Angular throws an error on unhandled rejection, but in this case we have already printed
        // a warning that Cordova is undefined or the plugin is uninstalled, so there is no reason
        // to error

        if (pluginResult && pluginResult.error) {
          p["catch"](function () {});
          typeof rej === 'function' && rej(pluginResult.error);
        }

        return p;
      }

      function wrapOtherPromise(pluginObj, methodName, args, opts) {
        if (opts === void 0) {
          opts = {};
        }

        return getPromise(function (resolve, reject) {
          var pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts);

          if (pluginResult) {
            if (pluginResult.error) {
              reject(pluginResult.error);
            } else if (pluginResult.then) {
              pluginResult.then(resolve)["catch"](reject);
            }
          } else {
            reject({
              error: 'unexpected_error'
            });
          }
        });
      }

      function wrapObservable(pluginObj, methodName, args, opts) {
        if (opts === void 0) {
          opts = {};
        }

        return new rxjs__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (observer) {
          var pluginResult;

          if (opts.destruct) {
            pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, function () {
              var args = [];

              for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
              }

              return observer.next(args);
            }, function () {
              var args = [];

              for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
              }

              return observer.error(args);
            });
          } else {
            pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, observer.next.bind(observer), observer.error.bind(observer));
          }

          if (pluginResult && pluginResult.error) {
            observer.error(pluginResult.error);
            observer.complete();
          }

          return function () {
            try {
              if (opts.clearFunction) {
                if (opts.clearWithArgs) {
                  return callCordovaPlugin(pluginObj, opts.clearFunction, args, opts, observer.next.bind(observer), observer.error.bind(observer));
                }

                return callCordovaPlugin(pluginObj, opts.clearFunction, []);
              }
            } catch (e) {
              console.warn('Unable to clear the previous observable watch for', pluginObj.constructor.getPluginName(), methodName);
              console.warn(e);
            }
          };
        });
      }
      /**
       * Wrap the event with an observable
       * @private
       * @param event event name
       * @param element The element to attach the event listener to
       * @returns {Observable}
       */


      function wrapEventObservable(event, element) {
        element = typeof window !== 'undefined' && element ? get(window, element) : element || (typeof window !== 'undefined' ? window : {});
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_0__["fromEvent"])(element, event);
      }

      function checkAvailability(plugin, methodName, pluginName) {
        var pluginRef, pluginInstance, pluginPackage;

        if (typeof plugin === 'string') {
          pluginRef = plugin;
        } else {
          pluginRef = plugin.constructor.getPluginRef();
          pluginName = plugin.constructor.getPluginName();
          pluginPackage = plugin.constructor.getPluginInstallName();
        }

        pluginInstance = getPlugin(pluginRef);

        if (!pluginInstance || !!methodName && typeof pluginInstance[methodName] === 'undefined') {
          if (typeof window === 'undefined' || !window.cordova) {
            cordovaWarn(pluginName, methodName);
            return ERR_CORDOVA_NOT_AVAILABLE;
          }

          pluginWarn(pluginName, pluginPackage, methodName);
          return ERR_PLUGIN_NOT_INSTALLED;
        }

        return true;
      }
      /**
       * Checks if _objectInstance exists and has the method/property
       * @private
       */


      function instanceAvailability(pluginObj, methodName) {
        return pluginObj._objectInstance && (!methodName || typeof pluginObj._objectInstance[methodName] !== 'undefined');
      }

      function setIndex(args, opts, resolve, reject) {
        if (opts === void 0) {
          opts = {};
        } // ignore resolve and reject in case sync


        if (opts.sync) {
          return args;
        } // If the plugin method expects myMethod(success, err, options)


        if (opts.callbackOrder === 'reverse') {
          // Get those arguments in the order [resolve, reject, ...restOfArgs]
          args.unshift(reject);
          args.unshift(resolve);
        } else if (opts.callbackStyle === 'node') {
          args.push(function (err, result) {
            if (err) {
              reject(err);
            } else {
              resolve(result);
            }
          });
        } else if (opts.callbackStyle === 'object' && opts.successName && opts.errorName) {
          var obj = {};
          obj[opts.successName] = resolve;
          obj[opts.errorName] = reject;
          args.push(obj);
        } else if (typeof opts.successIndex !== 'undefined' || typeof opts.errorIndex !== 'undefined') {
          var setSuccessIndex = function setSuccessIndex() {
            // If we've specified a success/error index
            if (opts.successIndex > args.length) {
              args[opts.successIndex] = resolve;
            } else {
              args.splice(opts.successIndex, 0, resolve);
            }
          };

          var setErrorIndex = function setErrorIndex() {
            // We don't want that the reject cb gets spliced into the position of an optional argument that has not been
            // defined and thus causing non expected behavior.
            if (opts.errorIndex > args.length) {
              args[opts.errorIndex] = reject; // insert the reject fn at the correct specific index
            } else {
              args.splice(opts.errorIndex, 0, reject); // otherwise just splice it into the array
            }
          };

          if (opts.successIndex > opts.errorIndex) {
            setErrorIndex();
            setSuccessIndex();
          } else {
            setSuccessIndex();
            setErrorIndex();
          }
        } else {
          // Otherwise, let's tack them on to the end of the argument list
          // which is 90% of cases
          args.push(resolve);
          args.push(reject);
        }

        return args;
      }

      function callCordovaPlugin(pluginObj, methodName, args, opts, resolve, reject) {
        if (opts === void 0) {
          opts = {};
        } // Try to figure out where the success/error callbacks need to be bound
        // to our promise resolve/reject handlers.


        args = setIndex(args, opts, resolve, reject);
        var availabilityCheck = checkAvailability(pluginObj, methodName);

        if (availabilityCheck === true) {
          var pluginInstance = getPlugin(pluginObj.constructor.getPluginRef());
          return pluginInstance[methodName].apply(pluginInstance, args);
        } else {
          return availabilityCheck;
        }
      }

      function callInstance(pluginObj, methodName, args, opts, resolve, reject) {
        if (opts === void 0) {
          opts = {};
        }

        args = setIndex(args, opts, resolve, reject);

        if (instanceAvailability(pluginObj, methodName)) {
          return pluginObj._objectInstance[methodName].apply(pluginObj._objectInstance, args);
        }
      }

      function getPlugin(pluginRef) {
        if (typeof window !== 'undefined') {
          return get(window, pluginRef);
        }

        return null;
      }

      function get(element, path) {
        var paths = path.split('.');
        var obj = element;

        for (var i = 0; i < paths.length; i++) {
          if (!obj) {
            return null;
          }

          obj = obj[paths[i]];
        }

        return obj;
      }

      function pluginWarn(pluginName, plugin, method) {
        if (method) {
          console.warn('Native: tried calling ' + pluginName + '.' + method + ', but the ' + pluginName + ' plugin is not installed.');
        } else {
          console.warn("Native: tried accessing the " + pluginName + " plugin but it's not installed.");
        }

        if (plugin) {
          console.warn("Install the " + pluginName + " plugin: 'ionic cordova plugin add " + plugin + "'");
        }
      }
      /**
       * @private
       * @param pluginName
       * @param method
       */


      function cordovaWarn(pluginName, method) {
        if (typeof process === 'undefined') {
          if (method) {
            console.warn('Native: tried calling ' + pluginName + '.' + method + ', but Cordova is not available. Make sure to include cordova.js or run in a device/simulator');
          } else {
            console.warn('Native: tried accessing the ' + pluginName + ' plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator');
          }
        }
      }
      /**
       * @private
       */


      var wrap = function wrap(pluginObj, methodName, opts) {
        if (opts === void 0) {
          opts = {};
        }

        return function () {
          var args = [];

          for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
          }

          if (opts.sync) {
            // Sync doesn't wrap the plugin with a promise or observable, it returns the result as-is
            return callCordovaPlugin(pluginObj, methodName, args, opts);
          } else if (opts.observable) {
            return wrapObservable(pluginObj, methodName, args, opts);
          } else if (opts.eventObservable && opts.event) {
            return wrapEventObservable(opts.event, opts.element);
          } else if (opts.otherPromise) {
            return wrapOtherPromise(pluginObj, methodName, args, opts);
          } else {
            return wrapPromise(pluginObj, methodName, args, opts);
          }
        };
      };
      /**
       * @private
       */


      function wrapInstance(pluginObj, methodName, opts) {
        if (opts === void 0) {
          opts = {};
        }

        return function () {
          var args = [];

          for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
          }

          if (opts.sync) {
            return callInstance(pluginObj, methodName, args, opts);
          } else if (opts.observable) {
            return new rxjs__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (observer) {
              var pluginResult;

              if (opts.destruct) {
                pluginResult = callInstance(pluginObj, methodName, args, opts, function () {
                  var args = [];

                  for (var _i = 0; _i < arguments.length; _i++) {
                    args[_i] = arguments[_i];
                  }

                  return observer.next(args);
                }, function () {
                  var args = [];

                  for (var _i = 0; _i < arguments.length; _i++) {
                    args[_i] = arguments[_i];
                  }

                  return observer.error(args);
                });
              } else {
                pluginResult = callInstance(pluginObj, methodName, args, opts, observer.next.bind(observer), observer.error.bind(observer));
              }

              if (pluginResult && pluginResult.error) {
                observer.error(pluginResult.error);
              }

              return function () {
                try {
                  if (opts.clearWithArgs) {
                    return callInstance(pluginObj, opts.clearFunction, args, opts, observer.next.bind(observer), observer.error.bind(observer));
                  }

                  return callInstance(pluginObj, opts.clearFunction, []);
                } catch (e) {
                  console.warn('Unable to clear the previous observable watch for', pluginObj.constructor.getPluginName(), methodName);
                  console.warn(e);
                }
              };
            });
          } else if (opts.otherPromise) {
            return getPromise(function (resolve, reject) {
              var result;

              if (opts.destruct) {
                result = callInstance(pluginObj, methodName, args, opts, function () {
                  var args = [];

                  for (var _i = 0; _i < arguments.length; _i++) {
                    args[_i] = arguments[_i];
                  }

                  return resolve(args);
                }, function () {
                  var args = [];

                  for (var _i = 0; _i < arguments.length; _i++) {
                    args[_i] = arguments[_i];
                  }

                  return reject(args);
                });
              } else {
                result = callInstance(pluginObj, methodName, args, opts, resolve, reject);
              }

              if (result && result.then) {
                result.then(resolve, reject);
              } else {
                reject();
              }
            });
          } else {
            var pluginResult_1, rej_1;
            var p = getPromise(function (resolve, reject) {
              if (opts.destruct) {
                pluginResult_1 = callInstance(pluginObj, methodName, args, opts, function () {
                  var args = [];

                  for (var _i = 0; _i < arguments.length; _i++) {
                    args[_i] = arguments[_i];
                  }

                  return resolve(args);
                }, function () {
                  var args = [];

                  for (var _i = 0; _i < arguments.length; _i++) {
                    args[_i] = arguments[_i];
                  }

                  return reject(args);
                });
              } else {
                pluginResult_1 = callInstance(pluginObj, methodName, args, opts, resolve, reject);
              }

              rej_1 = reject;
            }); // Angular throws an error on unhandled rejection, but in this case we have already printed
            // a warning that Cordova is undefined or the plugin is uninstalled, so there is no reason
            // to error

            if (pluginResult_1 && pluginResult_1.error) {
              p["catch"](function () {});
              typeof rej_1 === 'function' && rej_1(pluginResult_1.error);
            }

            return p;
          }
        };
      } //# sourceMappingURL=common.js.map

      /***/

    },

    /***/
    "ybVP":
    /*!*********************************************************!*\
      !*** ./node_modules/@ionic/core/loader/index.es2017.js ***!
      \*********************************************************/

    /*! exports provided: applyPolyfills, defineCustomElements */

    /***/
    function ybVP(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony import */


      var _dist_esm_polyfills_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../dist/esm/polyfills/index.js */
      "b1qR");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "applyPolyfills", function () {
        return _dist_esm_polyfills_index_js__WEBPACK_IMPORTED_MODULE_0__["applyPolyfills"];
      });
      /* harmony import */


      var _dist_esm_loader_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../dist/esm/loader.js */
      "lg1s");
      /* harmony reexport (safe) */


      __webpack_require__.d(__webpack_exports__, "defineCustomElements", function () {
        return _dist_esm_loader_js__WEBPACK_IMPORTED_MODULE_1__["defineCustomElements"];
      });
      /***/

    },

    /***/
    "yksw":
    /*!***************************************************!*\
      !*** ./node_modules/@sentry/types/esm/session.js ***!
      \***************************************************/

    /*! exports provided: SessionStatus, RequestSessionStatus */

    /***/
    function yksw(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SessionStatus", function () {
        return SessionStatus;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "RequestSessionStatus", function () {
        return RequestSessionStatus;
      });
      /**
       * Session Status
       */


      var SessionStatus;

      (function (SessionStatus) {
        /** JSDoc */
        SessionStatus["Ok"] = "ok";
        /** JSDoc */

        SessionStatus["Exited"] = "exited";
        /** JSDoc */

        SessionStatus["Crashed"] = "crashed";
        /** JSDoc */

        SessionStatus["Abnormal"] = "abnormal";
      })(SessionStatus || (SessionStatus = {}));

      var RequestSessionStatus;

      (function (RequestSessionStatus) {
        /** JSDoc */
        RequestSessionStatus["Ok"] = "ok";
        /** JSDoc */

        RequestSessionStatus["Errored"] = "errored";
        /** JSDoc */

        RequestSessionStatus["Crashed"] = "crashed";
      })(RequestSessionStatus || (RequestSessionStatus = {})); //# sourceMappingURL=session.js.map

      /***/

    },

    /***/
    "yuhW":
    /*!*******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/throttle.js ***!
      \*******************************************************************/

    /*! exports provided: defaultThrottleConfig, throttle */

    /***/
    function yuhW(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "defaultThrottleConfig", function () {
        return defaultThrottleConfig;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "throttle", function () {
        return throttle;
      });
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      var defaultThrottleConfig = {
        leading: true,
        trailing: false
      };

      function throttle(durationSelector) {
        var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultThrottleConfig;
        return function (source) {
          return source.lift(new ThrottleOperator(durationSelector, !!config.leading, !!config.trailing));
        };
      }

      var ThrottleOperator = /*#__PURE__*/function () {
        function ThrottleOperator(durationSelector, leading, trailing) {
          _classCallCheck(this, ThrottleOperator);

          this.durationSelector = durationSelector;
          this.leading = leading;
          this.trailing = trailing;
        }

        _createClass2(ThrottleOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));
          }
        }]);

        return ThrottleOperator;
      }();

      var ThrottleSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP21) {
        _inherits(ThrottleSubscriber, _innerSubscribe__WEBP21);

        var _super298 = _createSuper(ThrottleSubscriber);

        function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {
          var _this628;

          _classCallCheck(this, ThrottleSubscriber);

          _this628 = _super298.call(this, destination);
          _this628.destination = destination;
          _this628.durationSelector = durationSelector;
          _this628._leading = _leading;
          _this628._trailing = _trailing;
          _this628._hasValue = false;
          return _this628;
        }

        _createClass2(ThrottleSubscriber, [{
          key: "_next",
          value: function _next(value) {
            this._hasValue = true;
            this._sendValue = value;

            if (!this._throttled) {
              if (this._leading) {
                this.send();
              } else {
                this.throttle(value);
              }
            }
          }
        }, {
          key: "send",
          value: function send() {
            var _hasValue = this._hasValue,
                _sendValue = this._sendValue;

            if (_hasValue) {
              this.destination.next(_sendValue);
              this.throttle(_sendValue);
            }

            this._hasValue = false;
            this._sendValue = undefined;
          }
        }, {
          key: "throttle",
          value: function throttle(value) {
            var duration = this.tryDurationSelector(value);

            if (!!duration) {
              this.add(this._throttled = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(duration, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this)));
            }
          }
        }, {
          key: "tryDurationSelector",
          value: function tryDurationSelector(value) {
            try {
              return this.durationSelector(value);
            } catch (err) {
              this.destination.error(err);
              return null;
            }
          }
        }, {
          key: "throttlingDone",
          value: function throttlingDone() {
            var _throttled = this._throttled,
                _trailing = this._trailing;

            if (_throttled) {
              _throttled.unsubscribe();
            }

            this._throttled = undefined;

            if (_trailing) {
              this.send();
            }
          }
        }, {
          key: "notifyNext",
          value: function notifyNext() {
            this.throttlingDone();
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            this.throttlingDone();
          }
        }]);

        return ThrottleSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"]); //# sourceMappingURL=throttle.js.map

      /***/

    },

    /***/
    "z+RT":
    /*!**************************************************!*\
      !*** ./node_modules/@sentry/utils/esm/global.js ***!
      \**************************************************/

    /*! exports provided: getGlobalObject */

    /***/
    function zRT(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getGlobalObject", function () {
        return getGlobalObject;
      });
      /* harmony import */


      var _node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./node */
      "+A1k");
      /**
       * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
       * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.
       */


      var fallbackGlobalObject = {};
      /**
       * Safely get global scope object
       *
       * @returns Global scope object
       */

      function getGlobalObject() {
        return Object(_node__WEBPACK_IMPORTED_MODULE_0__["isNodeEnv"])() ? global : typeof window !== 'undefined' // eslint-disable-line no-restricted-globals
        ? window // eslint-disable-line no-restricted-globals
        : typeof self !== 'undefined' ? self : fallbackGlobalObject;
      } //# sourceMappingURL=global.js.map

      /***/

    },

    /***/
    "z+Ro":
    /*!*****************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/util/isScheduler.js ***!
      \*****************************************************************/

    /*! exports provided: isScheduler */

    /***/
    function zRo(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "isScheduler", function () {
        return isScheduler;
      });

      function isScheduler(value) {
        return value && typeof value.schedule === 'function';
      } //# sourceMappingURL=isScheduler.js.map

      /***/

    },

    /***/
    "z6cu":
    /*!**********************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/observable/throwError.js ***!
      \**********************************************************************/

    /*! exports provided: throwError */

    /***/
    function z6cu(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "throwError", function () {
        return throwError;
      });
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Observable */
      "HDdC");

      function throwError(error, scheduler) {
        if (!scheduler) {
          return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
            return subscriber.error(error);
          });
        } else {
          return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
            return scheduler.schedule(dispatch, 0, {
              error: error,
              subscriber: subscriber
            });
          });
        }
      }

      function dispatch(_ref128) {
        var error = _ref128.error,
            subscriber = _ref128.subscriber;
        subscriber.error(error);
      } //# sourceMappingURL=throwError.js.map

      /***/

    },

    /***/
    "zHkj":
    /*!********************************************************************!*\
      !*** ./node_modules/@sentry/tracing/esm/browser/browsertracing.js ***!
      \********************************************************************/

    /*! exports provided: DEFAULT_MAX_TRANSACTION_DURATION_SECONDS, BrowserTracing, getHeaderContext, getMetaContent */

    /***/
    function zHkj(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "DEFAULT_MAX_TRANSACTION_DURATION_SECONDS", function () {
        return DEFAULT_MAX_TRANSACTION_DURATION_SECONDS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "BrowserTracing", function () {
        return BrowserTracing;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getHeaderContext", function () {
        return getHeaderContext;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "getMetaContent", function () {
        return getMetaContent;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @sentry/utils */
      "TwdF");
      /* harmony import */


      var _hubextensions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ../hubextensions */
      "Cpvd");
      /* harmony import */


      var _idletransaction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ../idletransaction */
      "MBYv");
      /* harmony import */


      var _spanstatus__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ../spanstatus */
      "bju/");
      /* harmony import */


      var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ../utils */
      "FGHR");
      /* harmony import */


      var _backgroundtab__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ./backgroundtab */
      "CJ5d");
      /* harmony import */


      var _metrics__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! ./metrics */
      "tn5i");
      /* harmony import */


      var _request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
      /*! ./request */
      "crS0");
      /* harmony import */


      var _router__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
      /*! ./router */
      "xpBP");

      var DEFAULT_MAX_TRANSACTION_DURATION_SECONDS = 600;
      var DEFAULT_BROWSER_TRACING_OPTIONS = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({
        idleTimeout: _idletransaction__WEBPACK_IMPORTED_MODULE_3__["DEFAULT_IDLE_TIMEOUT"],
        markBackgroundTransactions: true,
        maxTransactionDuration: DEFAULT_MAX_TRANSACTION_DURATION_SECONDS,
        routingInstrumentation: _router__WEBPACK_IMPORTED_MODULE_9__["instrumentRoutingWithDefaults"],
        startTransactionOnLocationChange: true,
        startTransactionOnPageLoad: true
      }, _request__WEBPACK_IMPORTED_MODULE_8__["defaultRequestInstrumentationOptions"]);
      /**
       * The Browser Tracing integration automatically instruments browser pageload/navigation
       * actions as transactions, and captures requests, metrics and errors as spans.
       *
       * The integration can be configured with a variety of options, and can be extended to use
       * any routing library. This integration uses {@see IdleTransaction} to create transactions.
       */

      var BrowserTracing =
      /** @class */
      function () {
        function BrowserTracing(_options) {
          /**
           * @inheritDoc
           */
          this.name = BrowserTracing.id;
          this._emitOptionsWarning = false;
          var tracingOrigins = _request__WEBPACK_IMPORTED_MODULE_8__["defaultRequestInstrumentationOptions"].tracingOrigins; // NOTE: Logger doesn't work in constructors, as it's initialized after integrations instances

          if (_options && _options.tracingOrigins && Array.isArray(_options.tracingOrigins) && _options.tracingOrigins.length !== 0) {
            tracingOrigins = _options.tracingOrigins;
          } else {
            this._emitOptionsWarning = true;
          }

          this.options = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, DEFAULT_BROWSER_TRACING_OPTIONS), _options), {
            tracingOrigins: tracingOrigins
          });
          this._metrics = new _metrics__WEBPACK_IMPORTED_MODULE_7__["MetricsInstrumentation"](Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, _metrics__WEBPACK_IMPORTED_MODULE_7__["DEFAULT_METRICS_INSTR_OPTIONS"]), this.options._metricOptions));
        }
        /**
         * @inheritDoc
         */


        BrowserTracing.prototype.setupOnce = function (_, getCurrentHub) {
          var _this = this;

          this._getCurrentHub = getCurrentHub;

          if (this._emitOptionsWarning) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn('[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace.');

            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn("[Tracing] We added a reasonable default for you: " + _request__WEBPACK_IMPORTED_MODULE_8__["defaultRequestInstrumentationOptions"].tracingOrigins);
          } // eslint-disable-next-line @typescript-eslint/unbound-method


          var _a = this.options,
              instrumentRouting = _a.routingInstrumentation,
              startTransactionOnLocationChange = _a.startTransactionOnLocationChange,
              startTransactionOnPageLoad = _a.startTransactionOnPageLoad,
              markBackgroundTransactions = _a.markBackgroundTransactions,
              traceFetch = _a.traceFetch,
              traceXHR = _a.traceXHR,
              tracingOrigins = _a.tracingOrigins,
              shouldCreateSpanForRequest = _a.shouldCreateSpanForRequest;
          instrumentRouting(function (context) {
            return _this._createRouteTransaction(context);
          }, startTransactionOnPageLoad, startTransactionOnLocationChange);

          if (markBackgroundTransactions) {
            Object(_backgroundtab__WEBPACK_IMPORTED_MODULE_6__["registerBackgroundTabDetection"])();
          }

          Object(_request__WEBPACK_IMPORTED_MODULE_8__["instrumentOutgoingRequests"])({
            traceFetch: traceFetch,
            traceXHR: traceXHR,
            tracingOrigins: tracingOrigins,
            shouldCreateSpanForRequest: shouldCreateSpanForRequest
          });
        };
        /** Create routing idle transaction. */


        BrowserTracing.prototype._createRouteTransaction = function (context) {
          var _this = this;

          if (!this._getCurrentHub) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn("[Tracing] Did not create " + context.op + " transaction because _getCurrentHub is invalid.");

            return undefined;
          } // eslint-disable-next-line @typescript-eslint/unbound-method


          var _a = this.options,
              beforeNavigate = _a.beforeNavigate,
              idleTimeout = _a.idleTimeout,
              maxTransactionDuration = _a.maxTransactionDuration;
          var parentContextFromHeader = context.op === 'pageload' ? getHeaderContext() : undefined;
          var expandedContext = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, context), parentContextFromHeader), {
            trimEnd: true
          });
          var modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext; // For backwards compatibility reasons, beforeNavigate can return undefined to "drop" the transaction (prevent it
          // from being sent to Sentry).

          var finalContext = modifiedContext === undefined ? Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, expandedContext), {
            sampled: false
          }) : modifiedContext;

          if (finalContext.sampled === false) {
            _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log("[Tracing] Will not send " + finalContext.op + " transaction because of beforeNavigate.");
          }

          _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log("[Tracing] Starting " + finalContext.op + " transaction on scope");

          var hub = this._getCurrentHub();

          var location = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getGlobalObject"])().location;
          var idleTransaction = Object(_hubextensions__WEBPACK_IMPORTED_MODULE_2__["startIdleTransaction"])(hub, finalContext, idleTimeout, true, {
            location: location
          });
          idleTransaction.registerBeforeFinishCallback(function (transaction, endTimestamp) {
            _this._metrics.addPerformanceEntries(transaction);

            adjustTransactionDuration(Object(_utils__WEBPACK_IMPORTED_MODULE_5__["secToMs"])(maxTransactionDuration), transaction, endTimestamp);
          });
          return idleTransaction;
        };
        /**
         * @inheritDoc
         */


        BrowserTracing.id = 'BrowserTracing';
        return BrowserTracing;
      }();
      /**
       * Gets transaction context from a sentry-trace meta.
       *
       * @returns Transaction context data from the header or undefined if there's no header or the header is malformed
       */


      function getHeaderContext() {
        var header = getMetaContent('sentry-trace');

        if (header) {
          return Object(_utils__WEBPACK_IMPORTED_MODULE_5__["extractTraceparentData"])(header);
        }

        return undefined;
      }
      /** Returns the value of a meta tag */


      function getMetaContent(metaName) {
        var el = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getGlobalObject"])().document.querySelector("meta[name=" + metaName + "]");
        return el ? el.getAttribute('content') : null;
      }
      /** Adjusts transaction value based on max transaction duration */


      function adjustTransactionDuration(maxDuration, transaction, endTimestamp) {
        var diff = endTimestamp - transaction.startTimestamp;
        var isOutdatedTransaction = endTimestamp && (diff > maxDuration || diff < 0);

        if (isOutdatedTransaction) {
          transaction.setStatus(_spanstatus__WEBPACK_IMPORTED_MODULE_4__["SpanStatus"].DeadlineExceeded);
          transaction.setTag('maxTransactionDurationExceeded', 'true');
        }
      } //# sourceMappingURL=browsertracing.js.map

      /***/

    },

    /***/
    "zIRd":
    /*!******************************************************!*\
      !*** ./node_modules/@firebase/app/dist/index.esm.js ***!
      \******************************************************/

    /*! exports provided: default, firebase */

    /***/
    function zIRd(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "firebase", function () {
        return firebase;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _firebase_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @firebase/util */
      "qOnz");
      /* harmony import */


      var _firebase_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @firebase/component */
      "/6Yf");
      /* harmony import */


      var _firebase_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @firebase/logger */
      "q/0M");
      /**
       * @license
       * Copyright 2019 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      var _a$1;

      var ERRORS = (_a$1 = {}, _a$1["no-app"
      /* NO_APP */
      ] = "No Firebase App '{$appName}' has been created - " + 'call Firebase App.initializeApp()', _a$1["bad-app-name"
      /* BAD_APP_NAME */
      ] = "Illegal App name: '{$appName}", _a$1["duplicate-app"
      /* DUPLICATE_APP */
      ] = "Firebase App named '{$appName}' already exists", _a$1["app-deleted"
      /* APP_DELETED */
      ] = "Firebase App named '{$appName}' already deleted", _a$1["invalid-app-argument"
      /* INVALID_APP_ARGUMENT */
      ] = 'firebase.{$appName}() takes either no argument or a ' + 'Firebase App instance.', _a$1["invalid-log-argument"
      /* INVALID_LOG_ARGUMENT */
      ] = 'First argument to `onLog` must be null or a function.', _a$1);
      var ERROR_FACTORY = new _firebase_util__WEBPACK_IMPORTED_MODULE_1__["ErrorFactory"]('app', 'Firebase', ERRORS);
      var name$c = "@firebase/app";
      var version$1 = "0.6.30";
      var name$b = "@firebase/analytics";
      var name$a = "@firebase/app-check";
      var name$9 = "@firebase/auth";
      var name$8 = "@firebase/database";
      var name$7 = "@firebase/functions";
      var name$6 = "@firebase/installations";
      var name$5 = "@firebase/messaging";
      var name$4 = "@firebase/performance";
      var name$3 = "@firebase/remote-config";
      var name$2 = "@firebase/storage";
      var name$1 = "@firebase/firestore";
      var name = "firebase-wrapper";
      /**
       * @license
       * Copyright 2019 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      var _a;

      var DEFAULT_ENTRY_NAME = '[DEFAULT]';
      var PLATFORM_LOG_STRING = (_a = {}, _a[name$c] = 'fire-core', _a[name$b] = 'fire-analytics', _a[name$a] = 'fire-app-check', _a[name$9] = 'fire-auth', _a[name$8] = 'fire-rtdb', _a[name$7] = 'fire-fn', _a[name$6] = 'fire-iid', _a[name$5] = 'fire-fcm', _a[name$4] = 'fire-perf', _a[name$3] = 'fire-rc', _a[name$2] = 'fire-gcs', _a[name$1] = 'fire-fst', _a['fire-js'] = 'fire-js', _a[name] = 'fire-js-all', _a);
      /**
       * @license
       * Copyright 2019 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      var logger = new _firebase_logger__WEBPACK_IMPORTED_MODULE_3__["Logger"]('@firebase/app');
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Global context object for a collection of services using
       * a shared authentication state.
       */

      var FirebaseAppImpl =
      /** @class */
      function () {
        function FirebaseAppImpl(options, config, firebase_) {
          var _this = this;

          this.firebase_ = firebase_;
          this.isDeleted_ = false;
          this.name_ = config.name;
          this.automaticDataCollectionEnabled_ = config.automaticDataCollectionEnabled || false;
          this.options_ = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["deepCopy"])(options);
          this.container = new _firebase_component__WEBPACK_IMPORTED_MODULE_2__["ComponentContainer"](config.name); // add itself to container

          this._addComponent(new _firebase_component__WEBPACK_IMPORTED_MODULE_2__["Component"]('app', function () {
            return _this;
          }, "PUBLIC"
          /* PUBLIC */
          )); // populate ComponentContainer with existing components


          this.firebase_.INTERNAL.components.forEach(function (component) {
            return _this._addComponent(component);
          });
        }

        Object.defineProperty(FirebaseAppImpl.prototype, "automaticDataCollectionEnabled", {
          get: function get() {
            this.checkDestroyed_();
            return this.automaticDataCollectionEnabled_;
          },
          set: function set(val) {
            this.checkDestroyed_();
            this.automaticDataCollectionEnabled_ = val;
          },
          enumerable: false,
          configurable: true
        });
        Object.defineProperty(FirebaseAppImpl.prototype, "name", {
          get: function get() {
            this.checkDestroyed_();
            return this.name_;
          },
          enumerable: false,
          configurable: true
        });
        Object.defineProperty(FirebaseAppImpl.prototype, "options", {
          get: function get() {
            this.checkDestroyed_();
            return this.options_;
          },
          enumerable: false,
          configurable: true
        });

        FirebaseAppImpl.prototype["delete"] = function () {
          var _this = this;

          return new Promise(function (resolve) {
            _this.checkDestroyed_();

            resolve();
          }).then(function () {
            _this.firebase_.INTERNAL.removeApp(_this.name_);

            return Promise.all(_this.container.getProviders().map(function (provider) {
              return provider["delete"]();
            }));
          }).then(function () {
            _this.isDeleted_ = true;
          });
        };
        /**
         * Return a service instance associated with this app (creating it
         * on demand), identified by the passed instanceIdentifier.
         *
         * NOTE: Currently storage and functions are the only ones that are leveraging this
         * functionality. They invoke it by calling:
         *
         * ```javascript
         * firebase.app().storage('STORAGE BUCKET ID')
         * ```
         *
         * The service name is passed to this already
         * @internal
         */


        FirebaseAppImpl.prototype._getService = function (name, instanceIdentifier) {
          var _a;

          if (instanceIdentifier === void 0) {
            instanceIdentifier = DEFAULT_ENTRY_NAME;
          }

          this.checkDestroyed_(); // Initialize instance if InstatiationMode is `EXPLICIT`.

          var provider = this.container.getProvider(name);

          if (!provider.isInitialized() && ((_a = provider.getComponent()) === null || _a === void 0 ? void 0 : _a.instantiationMode) === "EXPLICIT"
          /* EXPLICIT */
          ) {
            provider.initialize();
          } // getImmediate will always succeed because _getService is only called for registered components.


          return provider.getImmediate({
            identifier: instanceIdentifier
          });
        };
        /**
         * Remove a service instance from the cache, so we will create a new instance for this service
         * when people try to get this service again.
         *
         * NOTE: currently only firestore is using this functionality to support firestore shutdown.
         *
         * @param name The service name
         * @param instanceIdentifier instance identifier in case multiple instances are allowed
         * @internal
         */


        FirebaseAppImpl.prototype._removeServiceInstance = function (name, instanceIdentifier) {
          if (instanceIdentifier === void 0) {
            instanceIdentifier = DEFAULT_ENTRY_NAME;
          } // eslint-disable-next-line @typescript-eslint/no-explicit-any


          this.container.getProvider(name).clearInstance(instanceIdentifier);
        };
        /**
         * @param component the component being added to this app's container
         */


        FirebaseAppImpl.prototype._addComponent = function (component) {
          try {
            this.container.addComponent(component);
          } catch (e) {
            logger.debug("Component " + component.name + " failed to register with FirebaseApp " + this.name, e);
          }
        };

        FirebaseAppImpl.prototype._addOrOverwriteComponent = function (component) {
          this.container.addOrOverwriteComponent(component);
        };

        FirebaseAppImpl.prototype.toJSON = function () {
          return {
            name: this.name,
            automaticDataCollectionEnabled: this.automaticDataCollectionEnabled,
            options: this.options
          };
        };
        /**
         * This function will throw an Error if the App has already been deleted -
         * use before performing API actions on the App.
         */


        FirebaseAppImpl.prototype.checkDestroyed_ = function () {
          if (this.isDeleted_) {
            throw ERROR_FACTORY.create("app-deleted"
            /* APP_DELETED */
            , {
              appName: this.name_
            });
          }
        };

        return FirebaseAppImpl;
      }(); // Prevent dead-code elimination of these methods w/o invalid property
      // copying.


      FirebaseAppImpl.prototype.name && FirebaseAppImpl.prototype.options || FirebaseAppImpl.prototype["delete"] || console.log('dc');
      var version = "8.10.0";
      /**
       * @license
       * Copyright 2019 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Because auth can't share code with other components, we attach the utility functions
       * in an internal namespace to share code.
       * This function return a firebase namespace object without
       * any utility functions, so it can be shared between the regular firebaseNamespace and
       * the lite version.
       */

      function createFirebaseNamespaceCore(firebaseAppImpl) {
        var apps = {}; // eslint-disable-next-line @typescript-eslint/no-explicit-any

        var components = new Map(); // A namespace is a plain JavaScript Object.

        var namespace = {
          // Hack to prevent Babel from modifying the object returned
          // as the firebase namespace.
          // @ts-ignore
          __esModule: true,
          initializeApp: initializeApp,
          // @ts-ignore
          app: app,
          registerVersion: registerVersion,
          setLogLevel: _firebase_logger__WEBPACK_IMPORTED_MODULE_3__["setLogLevel"],
          onLog: onLog,
          // @ts-ignore
          apps: null,
          SDK_VERSION: version,
          INTERNAL: {
            registerComponent: registerComponent,
            removeApp: removeApp,
            components: components,
            useAsService: useAsService
          }
        }; // Inject a circular default export to allow Babel users who were previously
        // using:
        //
        //   import firebase from 'firebase';
        //   which becomes: var firebase = require('firebase').default;
        //
        // instead of
        //
        //   import * as firebase from 'firebase';
        //   which becomes: var firebase = require('firebase');
        // eslint-disable-next-line @typescript-eslint/no-explicit-any

        namespace['default'] = namespace; // firebase.apps is a read-only getter.

        Object.defineProperty(namespace, 'apps', {
          get: getApps
        });
        /**
         * Called by App.delete() - but before any services associated with the App
         * are deleted.
         */

        function removeApp(name) {
          delete apps[name];
        }
        /**
         * Get the App object for a given name (or DEFAULT).
         */


        function app(name) {
          name = name || DEFAULT_ENTRY_NAME;

          if (!Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["contains"])(apps, name)) {
            throw ERROR_FACTORY.create("no-app"
            /* NO_APP */
            , {
              appName: name
            });
          }

          return apps[name];
        } // @ts-ignore


        app['App'] = firebaseAppImpl;

        function initializeApp(options, rawConfig) {
          if (rawConfig === void 0) {
            rawConfig = {};
          }

          if (typeof rawConfig !== 'object' || rawConfig === null) {
            var name_1 = rawConfig;
            rawConfig = {
              name: name_1
            };
          }

          var config = rawConfig;

          if (config.name === undefined) {
            config.name = DEFAULT_ENTRY_NAME;
          }

          var name = config.name;

          if (typeof name !== 'string' || !name) {
            throw ERROR_FACTORY.create("bad-app-name"
            /* BAD_APP_NAME */
            , {
              appName: String(name)
            });
          }

          if (Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["contains"])(apps, name)) {
            throw ERROR_FACTORY.create("duplicate-app"
            /* DUPLICATE_APP */
            , {
              appName: name
            });
          }

          var app = new firebaseAppImpl(options, config, namespace);
          apps[name] = app;
          return app;
        }
        /*
         * Return an array of all the non-deleted FirebaseApps.
         */


        function getApps() {
          // Make a copy so caller cannot mutate the apps list.
          return Object.keys(apps).map(function (name) {
            return apps[name];
          });
        }

        function registerComponent(component) {
          var componentName = component.name;

          if (components.has(componentName)) {
            logger.debug("There were multiple attempts to register component " + componentName + ".");
            return component.type === "PUBLIC"
            /* PUBLIC */
            ? // eslint-disable-next-line @typescript-eslint/no-explicit-any
            namespace[componentName] : null;
          }

          components.set(componentName, component); // create service namespace for public components

          if (component.type === "PUBLIC"
          /* PUBLIC */
          ) {
            // The Service namespace is an accessor function ...
            var serviceNamespace = function serviceNamespace(appArg) {
              if (appArg === void 0) {
                appArg = app();
              } // eslint-disable-next-line @typescript-eslint/no-explicit-any


              if (typeof appArg[componentName] !== 'function') {
                // Invalid argument.
                // This happens in the following case: firebase.storage('gs:/')
                throw ERROR_FACTORY.create("invalid-app-argument"
                /* INVALID_APP_ARGUMENT */
                , {
                  appName: componentName
                });
              } // Forward service instance lookup to the FirebaseApp.
              // eslint-disable-next-line @typescript-eslint/no-explicit-any


              return appArg[componentName]();
            }; // ... and a container for service-level properties.


            if (component.serviceProps !== undefined) {
              Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["deepExtend"])(serviceNamespace, component.serviceProps);
            } // eslint-disable-next-line @typescript-eslint/no-explicit-any


            namespace[componentName] = serviceNamespace; // Patch the FirebaseAppImpl prototype
            // eslint-disable-next-line @typescript-eslint/no-explicit-any

            firebaseAppImpl.prototype[componentName] = // TODO: The eslint disable can be removed and the 'ignoreRestArgs'
            // option added to the no-explicit-any rule when ESlint releases it.
            // eslint-disable-next-line @typescript-eslint/no-explicit-any
            function () {
              var args = [];

              for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
              }

              var serviceFxn = this._getService.bind(this, componentName);

              return serviceFxn.apply(this, component.multipleInstances ? args : []);
            };
          } // add the component to existing app instances


          for (var _i = 0, _a = Object.keys(apps); _i < _a.length; _i++) {
            var appName = _a[_i];

            apps[appName]._addComponent(component);
          }

          return component.type === "PUBLIC"
          /* PUBLIC */
          ? // eslint-disable-next-line @typescript-eslint/no-explicit-any
          namespace[componentName] : null;
        }

        function registerVersion(libraryKeyOrName, version, variant) {
          var _a; // TODO: We can use this check to whitelist strings when/if we set up
          // a good whitelist system.


          var library = (_a = PLATFORM_LOG_STRING[libraryKeyOrName]) !== null && _a !== void 0 ? _a : libraryKeyOrName;

          if (variant) {
            library += "-" + variant;
          }

          var libraryMismatch = library.match(/\s|\//);
          var versionMismatch = version.match(/\s|\//);

          if (libraryMismatch || versionMismatch) {
            var warning = ["Unable to register library \"" + library + "\" with version \"" + version + "\":"];

            if (libraryMismatch) {
              warning.push("library name \"" + library + "\" contains illegal characters (whitespace or \"/\")");
            }

            if (libraryMismatch && versionMismatch) {
              warning.push('and');
            }

            if (versionMismatch) {
              warning.push("version name \"" + version + "\" contains illegal characters (whitespace or \"/\")");
            }

            logger.warn(warning.join(' '));
            return;
          }

          registerComponent(new _firebase_component__WEBPACK_IMPORTED_MODULE_2__["Component"](library + "-version", function () {
            return {
              library: library,
              version: version
            };
          }, "VERSION"
          /* VERSION */
          ));
        }

        function onLog(logCallback, options) {
          if (logCallback !== null && typeof logCallback !== 'function') {
            throw ERROR_FACTORY.create("invalid-log-argument"
            /* INVALID_LOG_ARGUMENT */
            );
          }

          Object(_firebase_logger__WEBPACK_IMPORTED_MODULE_3__["setUserLogHandler"])(logCallback, options);
        } // Map the requested service to a registered service name
        // (used to map auth to serverAuth service when needed).


        function useAsService(app, name) {
          if (name === 'serverAuth') {
            return null;
          }

          var useService = name;
          return useService;
        }

        return namespace;
      }
      /**
       * @license
       * Copyright 2019 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      /**
       * Return a firebase namespace object.
       *
       * In production, this will be called exactly once and the result
       * assigned to the 'firebase' global.  It may be called multiple times
       * in unit tests.
       */


      function createFirebaseNamespace() {
        var namespace = createFirebaseNamespaceCore(FirebaseAppImpl);
        namespace.INTERNAL = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, namespace.INTERNAL), {
          createFirebaseNamespace: createFirebaseNamespace,
          extendNamespace: extendNamespace,
          createSubscribe: _firebase_util__WEBPACK_IMPORTED_MODULE_1__["createSubscribe"],
          ErrorFactory: _firebase_util__WEBPACK_IMPORTED_MODULE_1__["ErrorFactory"],
          deepExtend: _firebase_util__WEBPACK_IMPORTED_MODULE_1__["deepExtend"]
        });
        /**
         * Patch the top-level firebase namespace with additional properties.
         *
         * firebase.INTERNAL.extendNamespace()
         */

        function extendNamespace(props) {
          Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["deepExtend"])(namespace, props);
        }

        return namespace;
      }

      var firebase$1 = createFirebaseNamespace();
      /**
       * @license
       * Copyright 2019 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */

      var PlatformLoggerService =
      /** @class */
      function () {
        function PlatformLoggerService(container) {
          this.container = container;
        } // In initial implementation, this will be called by installations on
        // auth token refresh, and installations will send this string.


        PlatformLoggerService.prototype.getPlatformInfoString = function () {
          var providers = this.container.getProviders(); // Loop through providers and get library/version pairs from any that are
          // version components.

          return providers.map(function (provider) {
            if (isVersionServiceProvider(provider)) {
              var service = provider.getImmediate();
              return service.library + "/" + service.version;
            } else {
              return null;
            }
          }).filter(function (logString) {
            return logString;
          }).join(' ');
        };

        return PlatformLoggerService;
      }();
      /**
       *
       * @param provider check if this provider provides a VersionService
       *
       * NOTE: Using Provider<'app-version'> is a hack to indicate that the provider
       * provides VersionService. The provider is not necessarily a 'app-version'
       * provider.
       */


      function isVersionServiceProvider(provider) {
        var component = provider.getComponent();
        return (component === null || component === void 0 ? void 0 : component.type) === "VERSION"
        /* VERSION */
        ;
      }
      /**
       * @license
       * Copyright 2019 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */


      function registerCoreComponents(firebase, variant) {
        firebase.INTERNAL.registerComponent(new _firebase_component__WEBPACK_IMPORTED_MODULE_2__["Component"]('platform-logger', function (container) {
          return new PlatformLoggerService(container);
        }, "PRIVATE"
        /* PRIVATE */
        )); // Register `app` package.

        firebase.registerVersion(name$c, version$1, variant); // Register platform SDK identifier (no version).

        firebase.registerVersion('fire-js', '');
      }
      /**
       * @license
       * Copyright 2017 Google LLC
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *   http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */
      // Firebase Lite detection test
      // eslint-disable-next-line @typescript-eslint/no-explicit-any


      if (Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["isBrowser"])() && self.firebase !== undefined) {
        logger.warn("\n    Warning: Firebase is already defined in the global scope. Please make sure\n    Firebase library is only loaded once.\n  "); // eslint-disable-next-line

        var sdkVersion = self.firebase.SDK_VERSION;

        if (sdkVersion && sdkVersion.indexOf('LITE') >= 0) {
          logger.warn("\n    Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n    You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n    ");
        }
      }

      var initializeApp = firebase$1.initializeApp; // TODO: This disable can be removed and the 'ignoreRestArgs' option added to
      // the no-explicit-any rule when ESlint releases it.
      // eslint-disable-next-line @typescript-eslint/no-explicit-any

      firebase$1.initializeApp = function () {
        var args = [];

        for (var _i = 0; _i < arguments.length; _i++) {
          args[_i] = arguments[_i];
        } // Environment check before initializing app
        // Do the check in initializeApp, so people have a chance to disable it by setting logLevel
        // in @firebase/logger


        if (Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__["isNode"])()) {
          logger.warn("\n      Warning: This is a browser-targeted Firebase bundle but it appears it is being\n      run in a Node environment.  If running in a Node environment, make sure you\n      are using the bundle specified by the \"main\" field in package.json.\n      \n      If you are using Webpack, you can specify \"main\" as the first item in\n      \"resolve.mainFields\":\n      https://webpack.js.org/configuration/resolve/#resolvemainfields\n      \n      If using Rollup, use the @rollup/plugin-node-resolve plugin and specify \"main\"\n      as the first item in \"mainFields\", e.g. ['main', 'module'].\n      https://github.com/rollup/@rollup/plugin-node-resolve\n      ");
        }

        return initializeApp.apply(undefined, args);
      };

      var firebase = firebase$1;
      registerCoreComponents(firebase);
      /* harmony default export */

      __webpack_exports__["default"] = firebase; //# sourceMappingURL=index.esm.js.map

      /***/
    },

    /***/
    "zP0r":
    /*!***************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/skip.js ***!
      \***************************************************************/

    /*! exports provided: skip */

    /***/
    function zP0r(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "skip", function () {
        return skip;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../Subscriber */
      "7o/Q");

      function skip(count) {
        return function (source) {
          return source.lift(new SkipOperator(count));
        };
      }

      var SkipOperator = /*#__PURE__*/function () {
        function SkipOperator(total) {
          _classCallCheck(this, SkipOperator);

          this.total = total;
        }

        _createClass2(SkipOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new SkipSubscriber(subscriber, this.total));
          }
        }]);

        return SkipOperator;
      }();

      var SkipSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_47) {
        _inherits(SkipSubscriber, _Subscriber__WEBPACK_47);

        var _super299 = _createSuper(SkipSubscriber);

        function SkipSubscriber(destination, total) {
          var _this629;

          _classCallCheck(this, SkipSubscriber);

          _this629 = _super299.call(this, destination);
          _this629.total = total;
          _this629.count = 0;
          return _this629;
        }

        _createClass2(SkipSubscriber, [{
          key: "_next",
          value: function _next(x) {
            if (++this.count > this.total) {
              this.destination.next(x);
            }
          }
        }]);

        return SkipSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=skip.js.map

      /***/

    },

    /***/
    "znLP":
    /*!**********************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameScheduler.js ***!
      \**********************************************************************************/

    /*! exports provided: AnimationFrameScheduler */

    /***/
    function znLP(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "AnimationFrameScheduler", function () {
        return AnimationFrameScheduler;
      });
      /* harmony import */


      var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./AsyncScheduler */
      "IjjT");

      var AnimationFrameScheduler = /*#__PURE__*/function (_AsyncScheduler__WEBP4) {
        _inherits(AnimationFrameScheduler, _AsyncScheduler__WEBP4);

        var _super300 = _createSuper(AnimationFrameScheduler);

        function AnimationFrameScheduler() {
          _classCallCheck(this, AnimationFrameScheduler);

          return _super300.apply(this, arguments);
        }

        _createClass2(AnimationFrameScheduler, [{
          key: "flush",
          value: function flush(action) {
            this.active = true;
            this.scheduled = undefined;
            var actions = this.actions;
            var error;
            var index = -1;
            var count = actions.length;
            action = action || actions.shift();

            do {
              if (error = action.execute(action.state, action.delay)) {
                break;
              }
            } while (++index < count && (action = actions.shift()));

            this.active = false;

            if (error) {
              while (++index < count && (action = actions.shift())) {
                action.unsubscribe();
              }

              throw error;
            }
          }
        }]);

        return AnimationFrameScheduler;
      }(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__["AsyncScheduler"]); //# sourceMappingURL=AnimationFrameScheduler.js.map

      /***/

    },

    /***/
    "zp1y":
    /*!*************************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/withLatestFrom.js ***!
      \*************************************************************************/

    /*! exports provided: withLatestFrom */

    /***/
    function zp1y(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "withLatestFrom", function () {
        return withLatestFrom;
      });
      /* harmony import */


      var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../OuterSubscriber */
      "l7GE");
      /* harmony import */


      var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ../util/subscribeToResult */
      "ZUHj");

      function withLatestFrom() {
        for (var _len57 = arguments.length, args = new Array(_len57), _key58 = 0; _key58 < _len57; _key58++) {
          args[_key58] = arguments[_key58];
        }

        return function (source) {
          var project;

          if (typeof args[args.length - 1] === 'function') {
            project = args.pop();
          }

          var observables = args;
          return source.lift(new WithLatestFromOperator(observables, project));
        };
      }

      var WithLatestFromOperator = /*#__PURE__*/function () {
        function WithLatestFromOperator(observables, project) {
          _classCallCheck(this, WithLatestFromOperator);

          this.observables = observables;
          this.project = project;
        }

        _createClass2(WithLatestFromOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));
          }
        }]);

        return WithLatestFromOperator;
      }();

      var WithLatestFromSubscriber = /*#__PURE__*/function (_OuterSubscriber__WEB7) {
        _inherits(WithLatestFromSubscriber, _OuterSubscriber__WEB7);

        var _super301 = _createSuper(WithLatestFromSubscriber);

        function WithLatestFromSubscriber(destination, observables, project) {
          var _this630;

          _classCallCheck(this, WithLatestFromSubscriber);

          _this630 = _super301.call(this, destination);
          _this630.observables = observables;
          _this630.project = project;
          _this630.toRespond = [];
          var len = observables.length;
          _this630.values = new Array(len);

          for (var i = 0; i < len; i++) {
            _this630.toRespond.push(i);
          }

          for (var _i49 = 0; _i49 < len; _i49++) {
            var observable = observables[_i49];

            _this630.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(_assertThisInitialized(_this630), observable, undefined, _i49));
          }

          return _this630;
        }

        _createClass2(WithLatestFromSubscriber, [{
          key: "notifyNext",
          value: function notifyNext(_outerValue, innerValue, outerIndex) {
            this.values[outerIndex] = innerValue;
            var toRespond = this.toRespond;

            if (toRespond.length > 0) {
              var found = toRespond.indexOf(outerIndex);

              if (found !== -1) {
                toRespond.splice(found, 1);
              }
            }
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {}
        }, {
          key: "_next",
          value: function _next(value) {
            if (this.toRespond.length === 0) {
              var args = [value].concat(_toConsumableArray(this.values));

              if (this.project) {
                this._tryProject(args);
              } else {
                this.destination.next(args);
              }
            }
          }
        }, {
          key: "_tryProject",
          value: function _tryProject(args) {
            var result;

            try {
              result = this.project.apply(this, args);
            } catch (err) {
              this.destination.error(err);
              return;
            }

            this.destination.next(result);
          }
        }]);

        return WithLatestFromSubscriber;
      }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"]); //# sourceMappingURL=withLatestFrom.js.map

      /***/

    },

    /***/
    "zt7V":
    /*!******************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/operators/exhaust.js ***!
      \******************************************************************/

    /*! exports provided: exhaust */

    /***/
    function zt7V(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "exhaust", function () {
        return exhaust;
      });
      /* harmony import */


      var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ../innerSubscribe */
      "zx2A");

      function exhaust() {
        return function (source) {
          return source.lift(new SwitchFirstOperator());
        };
      }

      var SwitchFirstOperator = /*#__PURE__*/function () {
        function SwitchFirstOperator() {
          _classCallCheck(this, SwitchFirstOperator);
        }

        _createClass2(SwitchFirstOperator, [{
          key: "call",
          value: function call(subscriber, source) {
            return source.subscribe(new SwitchFirstSubscriber(subscriber));
          }
        }]);

        return SwitchFirstOperator;
      }();

      var SwitchFirstSubscriber = /*#__PURE__*/function (_innerSubscribe__WEBP22) {
        _inherits(SwitchFirstSubscriber, _innerSubscribe__WEBP22);

        var _super302 = _createSuper(SwitchFirstSubscriber);

        function SwitchFirstSubscriber(destination) {
          var _this631;

          _classCallCheck(this, SwitchFirstSubscriber);

          _this631 = _super302.call(this, destination);
          _this631.hasCompleted = false;
          _this631.hasSubscription = false;
          return _this631;
        }

        _createClass2(SwitchFirstSubscriber, [{
          key: "_next",
          value: function _next(value) {
            if (!this.hasSubscription) {
              this.hasSubscription = true;
              this.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(value, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this)));
            }
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.hasCompleted = true;

            if (!this.hasSubscription) {
              this.destination.complete();
            }
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            this.hasSubscription = false;

            if (this.hasCompleted) {
              this.destination.complete();
            }
          }
        }]);

        return SwitchFirstSubscriber;
      }(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"]); //# sourceMappingURL=exhaust.js.map

      /***/

    },

    /***/
    "zx2A":
    /*!***************************************************************!*\
      !*** ./node_modules/rxjs/_esm2015/internal/innerSubscribe.js ***!
      \***************************************************************/

    /*! exports provided: SimpleInnerSubscriber, ComplexInnerSubscriber, SimpleOuterSubscriber, ComplexOuterSubscriber, innerSubscribe */

    /***/
    function zx2A(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SimpleInnerSubscriber", function () {
        return SimpleInnerSubscriber;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ComplexInnerSubscriber", function () {
        return ComplexInnerSubscriber;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SimpleOuterSubscriber", function () {
        return SimpleOuterSubscriber;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ComplexOuterSubscriber", function () {
        return ComplexOuterSubscriber;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "innerSubscribe", function () {
        return innerSubscribe;
      });
      /* harmony import */


      var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! ./Subscriber */
      "7o/Q");
      /* harmony import */


      var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! ./Observable */
      "HDdC");
      /* harmony import */


      var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./util/subscribeTo */
      "SeVD");

      var SimpleInnerSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_48) {
        _inherits(SimpleInnerSubscriber, _Subscriber__WEBPACK_48);

        var _super303 = _createSuper(SimpleInnerSubscriber);

        function SimpleInnerSubscriber(parent) {
          var _this632;

          _classCallCheck(this, SimpleInnerSubscriber);

          _this632 = _super303.call(this);
          _this632.parent = parent;
          return _this632;
        }

        _createClass2(SimpleInnerSubscriber, [{
          key: "_next",
          value: function _next(value) {
            this.parent.notifyNext(value);
          }
        }, {
          key: "_error",
          value: function _error(error) {
            this.parent.notifyError(error);
            this.unsubscribe();
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.parent.notifyComplete();
            this.unsubscribe();
          }
        }]);

        return SimpleInnerSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]);

      var ComplexInnerSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_49) {
        _inherits(ComplexInnerSubscriber, _Subscriber__WEBPACK_49);

        var _super304 = _createSuper(ComplexInnerSubscriber);

        function ComplexInnerSubscriber(parent, outerValue, outerIndex) {
          var _this633;

          _classCallCheck(this, ComplexInnerSubscriber);

          _this633 = _super304.call(this);
          _this633.parent = parent;
          _this633.outerValue = outerValue;
          _this633.outerIndex = outerIndex;
          return _this633;
        }

        _createClass2(ComplexInnerSubscriber, [{
          key: "_next",
          value: function _next(value) {
            this.parent.notifyNext(this.outerValue, value, this.outerIndex, this);
          }
        }, {
          key: "_error",
          value: function _error(error) {
            this.parent.notifyError(error);
            this.unsubscribe();
          }
        }, {
          key: "_complete",
          value: function _complete() {
            this.parent.notifyComplete(this);
            this.unsubscribe();
          }
        }]);

        return ComplexInnerSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]);

      var SimpleOuterSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_50) {
        _inherits(SimpleOuterSubscriber, _Subscriber__WEBPACK_50);

        var _super305 = _createSuper(SimpleOuterSubscriber);

        function SimpleOuterSubscriber() {
          _classCallCheck(this, SimpleOuterSubscriber);

          return _super305.apply(this, arguments);
        }

        _createClass2(SimpleOuterSubscriber, [{
          key: "notifyNext",
          value: function notifyNext(innerValue) {
            this.destination.next(innerValue);
          }
        }, {
          key: "notifyError",
          value: function notifyError(err) {
            this.destination.error(err);
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete() {
            this.destination.complete();
          }
        }]);

        return SimpleOuterSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]);

      var ComplexOuterSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_51) {
        _inherits(ComplexOuterSubscriber, _Subscriber__WEBPACK_51);

        var _super306 = _createSuper(ComplexOuterSubscriber);

        function ComplexOuterSubscriber() {
          _classCallCheck(this, ComplexOuterSubscriber);

          return _super306.apply(this, arguments);
        }

        _createClass2(ComplexOuterSubscriber, [{
          key: "notifyNext",
          value: function notifyNext(_outerValue, innerValue, _outerIndex, _innerSub) {
            this.destination.next(innerValue);
          }
        }, {
          key: "notifyError",
          value: function notifyError(error) {
            this.destination.error(error);
          }
        }, {
          key: "notifyComplete",
          value: function notifyComplete(_innerSub) {
            this.destination.complete();
          }
        }]);

        return ComplexOuterSubscriber;
      }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]);

      function innerSubscribe(result, innerSubscriber) {
        if (innerSubscriber.closed) {
          return undefined;
        }

        if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]) {
          return result.subscribe(innerSubscriber);
        }

        var subscription;

        try {
          subscription = Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_2__["subscribeTo"])(result)(innerSubscriber);
        } catch (error) {
          innerSubscriber.error(error);
        }

        return subscription;
      } //# sourceMappingURL=innerSubscribe.js.map

      /***/

    }
  }]);
})();
//# sourceMappingURL=vendor-es5.js.map